{"version":3,"file":"site.CKIOS5zI.js","sources":["../node_modules/jquery/dist/jquery.js","../Scripts/global/common/jquery.unobtrusive-ajax.js","../node_modules/lazysizes/lazysizes.js","../Scripts/helpers/mount.js","../Scripts/global/modules/loginSession.js","../Scripts/global/modules/oauth_wp.js","../node_modules/jose/dist/browser/lib/buffer_utils.js","../node_modules/jose/dist/browser/runtime/base64url.js","../node_modules/jose/dist/browser/util/errors.js","../node_modules/jose/dist/browser/lib/is_object.js","../node_modules/jose/dist/browser/util/base64url.js","../node_modules/jose/dist/browser/util/decode_jwt.js","../Scripts/global/modules/google_wp.js","../node_modules/regenerator-runtime/runtime.js","../Scripts/global/modules/bambuser_wp.js","../Scripts/helpers/jquery-replace.js","../Scripts/global/modules/menus_wp.ts","../Scripts/global/modules/captcha_wp.js","../Scripts/global/modules/checkout_wp.js","../Scripts/global/modules/customerclub_wp.js","../Scripts/global/modules/customerservice.js","../Scripts/global/modules/map-postnord_wp.js","../Scripts/global/apps/mixins/productPrice.mixin.ts","../Scripts/global/modules/delivery_wp.js","../Scripts/global/modules/inventory_wp.js","../Scripts/global/modules/favorite_wp.ts","../Scripts/global/modules/filter_wp.js","../Scripts/global/modules/forms_wp.js","../Scripts/global/modules/jeansguide_wp.js","../Scripts/global/modules/toggler_wp.ts","../Scripts/global/modules/mypage_delete_profile.ts","../Scripts/global/modules/mypage_reset_password.ts","../Scripts/global/modules/mypage_change_loyalty_email.ts","../Scripts/global/modules/mypage_edit_profile.ts","../Scripts/global/modules/mypage_wp.ts","../Scripts/global/modules/popup_wp.js","../Scripts/helpers/event-bubble.js","../Scripts/global/modules/product_wp.ts","../Scripts/global/modules/promotions_wp.js","../Scripts/global/modules/quantity_wp.ts","../Scripts/global/modules/quicksearch_wp.ts","../node_modules/@accessible360/accessible-slick/slick/slick.js","../Scripts/global/modules/slickslide_wp.js","../Scripts/global/modules/structured-video-data_wp.js","../Scripts/global/modules/tabs_wp.js","../Scripts/global/modules/teaserblock_wp.js","../Scripts/global/modules/video_wp.js","../Scripts/global/modules/vimeo-block_wp.js","../Scripts/global/modules/afterpay_wp.js","../Scripts/global/modules/chat_wp.ts","../node_modules/@vue/shared/dist/shared.esm-bundler.js","../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../Scripts/global/apps/components/icon/icon.vue","../Scripts/global/apps/components/icon/icon.model.ts","../node_modules/vue-router/dist/vue-router.mjs","../Scripts/global/apps/services/models/search.models.ts","../Scripts/global/apps/services/search.service.ts","../Scripts/global/apps/mixins/notifyClick.ts","../Scripts/global/apps/components/quickSearch/quickSearch.utils.ts","../Scripts/global/apps/components/quickSearch/suggestion.vue","../Scripts/global/apps/utils/search.utils.ts","../Scripts/global/apps/mixins/productBadge.mixin.ts","../Scripts/global/apps/components/quickSearch/product.vue","../Scripts/global/apps/components/quickSearch/quickSearch.vue","../Scripts/global/apps/views/quickSearch/quickSearch.vue","../Scripts/global/apps/components/search/facetFormats/matrixSizes.vue","../Scripts/global/apps/components/search/facetFormats/matrixSizes.vue","../Scripts/global/apps/components/search/facetFormats/suitSizes.vue","../Scripts/global/apps/components/search/facetFormats/suitSizes.vue","../Scripts/global/apps/components/search/facet.vue","../Scripts/global/apps/components/search/sort.vue","../Scripts/global/apps/components/search/facets.vue","../Scripts/global/apps/components/search/pills.vue","../Scripts/global/apps/mixins/tracking.ts","../Scripts/global/apps/components/responsiveImage/responsiveImage.vue","../Scripts/global/apps/components/responsiveImage/responsiveImage.vue","../Scripts/global/apps/mixins/productSize.mixin.ts","../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../node_modules/pinia/dist/pinia.mjs","../Scripts/global/apps/services/favorites.service.ts","../Scripts/global/apps/stores/favoritesStore.ts","../node_modules/zod/lib/index.mjs","../Scripts/global/apps/utils/API/GoogleAnalytics/GoogleAnalyticsSchema.ts","../Scripts/global/apps/utils/API/GTM.ts","../Scripts/global/apps/utils/API/Logging/LoggingAPI.ts","../Scripts/global/apps/services/models/gtm.models.ts","../Scripts/global/apps/services/gtm.service.ts","../node_modules/@vueuse/shared/index.mjs","../node_modules/@vueuse/core/index.mjs","../Scripts/global/apps/stores/productPageStore.ts","../Scripts/global/apps/components/addToCartForm/sizePickerSuit.vue","../Scripts/global/apps/components/addToCartForm/sizePickerPants.vue","../Scripts/global/apps/components/addToCartForm/sizePickerRegular.vue","../Scripts/global/apps/views/productsModule/productsModuleContentSkeleton.vue","../Scripts/global/apps/composables/useLazy.ts","../Scripts/global/apps/views/productsModule/productsModuleContent.vue","../Scripts/global/apps/utils/API/Esales/esalesAPI.ts","../Scripts/global/apps/mixins/lazy.ts","../Scripts/global/apps/composables/useUpsell.ts","../Scripts/global/apps/views/cartStatus/cartStatus.vue","../Scripts/global/apps/utils/currencyHelpers.ts","../Scripts/global/apps/services/models/checkout.models.ts","../Scripts/global/apps/components/checkout/stores/checkoutStateStore.ts","../Scripts/global/apps/components/shoppingCart/stores/shoppingCartStore.ts","../Scripts/global/apps/utils/API/APIErrors.ts","../node_modules/validator/lib/util/assertString.js","../node_modules/validator/lib/toDate.js","../node_modules/validator/lib/alpha.js","../node_modules/validator/lib/isFloat.js","../node_modules/validator/lib/toFloat.js","../node_modules/validator/lib/toInt.js","../node_modules/validator/lib/toBoolean.js","../node_modules/validator/lib/equals.js","../node_modules/validator/lib/util/toString.js","../node_modules/validator/lib/util/merge.js","../node_modules/validator/lib/contains.js","../node_modules/validator/lib/matches.js","../node_modules/validator/lib/isByteLength.js","../node_modules/validator/lib/isFQDN.js","../node_modules/validator/lib/isIP.js","../node_modules/validator/lib/isEmail.js","../node_modules/validator/lib/isURL.js","../node_modules/validator/lib/isMACAddress.js","../node_modules/validator/lib/isIPRange.js","../node_modules/validator/lib/isDate.js","../node_modules/validator/lib/isTime.js","../node_modules/validator/lib/isBoolean.js","../node_modules/validator/lib/isLocale.js","../node_modules/validator/lib/isAbaRouting.js","../node_modules/validator/lib/isAlpha.js","../node_modules/validator/lib/isAlphanumeric.js","../node_modules/validator/lib/isNumeric.js","../node_modules/validator/lib/isPassportNumber.js","../node_modules/validator/lib/isInt.js","../node_modules/validator/lib/isPort.js","../node_modules/validator/lib/isLowercase.js","../node_modules/validator/lib/isUppercase.js","../node_modules/validator/lib/isIMEI.js","../node_modules/validator/lib/isAscii.js","../node_modules/validator/lib/isFullWidth.js","../node_modules/validator/lib/isHalfWidth.js","../node_modules/validator/lib/isVariableWidth.js","../node_modules/validator/lib/isMultibyte.js","../node_modules/validator/lib/util/multilineRegex.js","../node_modules/validator/lib/isSemVer.js","../node_modules/validator/lib/isSurrogatePair.js","../node_modules/validator/lib/util/includes.js","../node_modules/validator/lib/isDecimal.js","../node_modules/validator/lib/isHexadecimal.js","../node_modules/validator/lib/isOctal.js","../node_modules/validator/lib/isDivisibleBy.js","../node_modules/validator/lib/isHexColor.js","../node_modules/validator/lib/isRgbColor.js","../node_modules/validator/lib/isHSL.js","../node_modules/validator/lib/isISRC.js","../node_modules/validator/lib/isIBAN.js","../node_modules/validator/lib/isISO31661Alpha2.js","../node_modules/validator/lib/isBIC.js","../node_modules/validator/lib/isMD5.js","../node_modules/validator/lib/isHash.js","../node_modules/validator/lib/isBase64.js","../node_modules/validator/lib/isJWT.js","../node_modules/validator/lib/isJSON.js","../node_modules/validator/lib/isEmpty.js","../node_modules/validator/lib/isLength.js","../node_modules/validator/lib/isUUID.js","../node_modules/validator/lib/isMongoId.js","../node_modules/validator/lib/isAfter.js","../node_modules/validator/lib/isBefore.js","../node_modules/validator/lib/isIn.js","../node_modules/validator/lib/isLuhnNumber.js","../node_modules/validator/lib/isCreditCard.js","../node_modules/validator/lib/isIdentityCard.js","../node_modules/validator/lib/isEAN.js","../node_modules/validator/lib/isISIN.js","../node_modules/validator/lib/isISBN.js","../node_modules/validator/lib/isISSN.js","../node_modules/validator/lib/util/algorithms.js","../node_modules/validator/lib/isTaxID.js","../node_modules/validator/lib/isMobilePhone.js","../node_modules/validator/lib/isEthereumAddress.js","../node_modules/validator/lib/isCurrency.js","../node_modules/validator/lib/isBtcAddress.js","../node_modules/validator/lib/isISO6346.js","../node_modules/validator/lib/isISO6391.js","../node_modules/validator/lib/isISO8601.js","../node_modules/validator/lib/isRFC3339.js","../node_modules/validator/lib/isISO31661Alpha3.js","../node_modules/validator/lib/isISO4217.js","../node_modules/validator/lib/isBase32.js","../node_modules/validator/lib/isBase58.js","../node_modules/validator/lib/isDataURI.js","../node_modules/validator/lib/isMagnetURI.js","../node_modules/validator/lib/rtrim.js","../node_modules/validator/lib/ltrim.js","../node_modules/validator/lib/trim.js","../node_modules/validator/lib/isMailtoURI.js","../node_modules/validator/lib/isMimeType.js","../node_modules/validator/lib/isLatLong.js","../node_modules/validator/lib/isPostalCode.js","../node_modules/validator/lib/escape.js","../node_modules/validator/lib/unescape.js","../node_modules/validator/lib/blacklist.js","../node_modules/validator/lib/stripLow.js","../node_modules/validator/lib/whitelist.js","../node_modules/validator/lib/isWhitelisted.js","../node_modules/validator/lib/normalizeEmail.js","../node_modules/validator/lib/isSlug.js","../node_modules/validator/lib/isLicensePlate.js","../node_modules/validator/lib/isStrongPassword.js","../node_modules/validator/lib/isVAT.js","../node_modules/validator/index.js","../Scripts/global/apps/utils/validationHelpers.ts","../Scripts/global/apps/utils/API/Cart/cartAPISchema.ts","../Scripts/global/apps/utils/API/Cart/cartAPI.ts","../Scripts/global/apps/services/shoppingcart.service.ts","../Scripts/global/apps/components/addToCartForm/addToCartForm.vue","../Scripts/global/apps/mixins/addToCart.mixin.ts","../Scripts/global/apps/components/productTeaser/productTeaser.vue","../Scripts/global/apps/views/categoryBlock/categoryBlock.vue","../Scripts/global/apps/views/searchPage/products.vue","../Scripts/global/apps/views/searchPage/article.vue","../Scripts/global/apps/views/searchPage/article.vue","../Scripts/global/apps/views/searchPage/articles.vue","../Scripts/global/apps/views/searchPage/articles.vue","../Scripts/global/apps/views/searchPage/store.vue","../Scripts/global/apps/views/searchPage/store.vue","../Scripts/global/apps/views/searchPage/stores.vue","../Scripts/global/apps/views/searchPage/stores.vue","../Scripts/global/apps/views/searchPage/searchPage.router.ts","../Scripts/global/apps/mixins/routing.ts","../Scripts/global/apps/components/previewBar/previewBar.vue","../Scripts/global/apps/views/searchPage/searchPage.vue","../Scripts/global/apps/views/categoryPage/categoryPage.vue","../Scripts/global/apps/views/categoryPage/categoryPage.router.ts","../Scripts/global/apps/views/productsModule/productsModule.vue","../Scripts/global/apps/views/miniCart/miniCart.vue","../node_modules/@formkit/auto-animate/index.mjs","../Scripts/global/apps/components/shoppingCart/shoppingCartError.vue","../Scripts/helpers/checkoutHelpers.ts","../Scripts/global/apps/utils/API/Customer/customerAPI.ts","../Scripts/global/apps/components/checkout/stores/customerInformationStore.ts","../Scripts/global/apps/utils/API/Postal/postalAPI.ts","../Scripts/global/apps/components/checkout/stores/deliveryInformationStore.ts","../Scripts/global/apps/utils/API/Delivery/deliveryAPISchema.ts","../Scripts/global/apps/utils/API/Delivery/deliveryAPI.ts","../Scripts/global/apps/utils/API/Payment/paymentAPISchema.ts","../Scripts/global/apps/utils/API/Payment/paymentAPI.ts","../Scripts/global/apps/components/checkout/stores/paymentInformationStore.ts","../Scripts/global/apps/services/checkout.service.ts","../Scripts/global/apps/components/shoppingCart/shoppingCartSummary.vue","../Scripts/global/apps/components/shoppingCart/shoppingCartDiscounts.vue","../Scripts/global/apps/components/shoppingCart/lineItem.vue","../Scripts/global/apps/components/shoppingCart/lineItemSkeleton.vue","../Scripts/global/apps/components/shoppingCart/topTextSkeleton.vue","../Scripts/global/apps/components/shoppingCart/shoppingCart.vue","../Scripts/global/apps/components/form/formInput.vue","../Scripts/global/apps/components/checkout/customerInformationForm.vue","../Scripts/global/apps/components/checkout/deliveryWindows.vue","../Scripts/global/apps/components/combobox/Combobox.vue","../Scripts/global/apps/components/searchbox/searchbox.vue","../Scripts/global/apps/components/checkout/deliveryLocations.vue","../Scripts/global/apps/components/checkout/deliveryInformationForm.vue","../Scripts/global/apps/components/checkout/finalizePaymentError.vue","../Scripts/global/apps/components/checkout/afterpayInstallment.vue","../Scripts/global/apps/components/checkout/paymentInformationForm.vue","../Scripts/global/apps/components/checkout/checkoutStepSelector.vue","../Scripts/global/apps/components/checkout/checkoutSummary.vue","../Scripts/global/apps/components/accordion/accordion.vue","../Scripts/global/apps/components/checkout/checkout.vue","../Scripts/global/apps/utils/API/Profile/profileAPISchema.ts","../node_modules/base64-js/index.js","../node_modules/ieee754/index.js","../node_modules/buffer/index.js","../Scripts/global/apps/utils/API/Profile/profileAPI.ts","../Scripts/global/apps/components/verification/verification.vue","../Scripts/global/apps/views/checkoutPage/checkoutPage.vue","../Scripts/global/apps/root.vue","../Scripts/global/apps/components/loyaltyDiscount/loyaltyDiscount.vue","../Scripts/global/apps/views/imageZoom/imageZoom.vue","../node_modules/@intlify/shared/dist/shared.mjs","../node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js","../node_modules/@intlify/core-base/dist/core-base.mjs","../node_modules/vue-i18n/dist/vue-i18n.mjs","../Scripts/global/apps/utils/propsMapper.ts","../Scripts/global/apps.ts","../Scripts/global/modules/header_banner.ts","../Scripts/global/modules/newsletter_signup_form/newsletter_signup_form_schema.ts","../Scripts/global/modules/newsletter_signup_form/newsletter_signup_form.ts","../Scripts/global/modules/henry_hero_block_video.ts","../Scripts/global/modules/episerver_upload_reload.ts","../Scripts/global/modules/porterbuddy-widget.ts","../Scripts/global/modules/content_performance_tracking.ts","../Scripts/global/modules/video_block.ts","../Scripts/global/modules/product_carousel.ts","../node_modules/splitting/dist/splitting.js","../Scripts/global/modules/top-band.ts","../Scripts/site.js"],"sourcesContent":["/*!\n * jQuery JavaScript Library v3.6.0\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2021-03-02T17:08Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.0\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.6\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2021-02-16\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (#9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\t// Suppress native focus or blur as it's already being fired\n\t\t// in leverageNative.\n\t\t_default: function() {\n\t\t\treturn true;\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, #12537)\n\t//   .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trcustomProp = /^--/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","/*!\r\n ** Unobtrusive Ajax support library for jQuery\r\n ** Copyright (C) Microsoft Corporation. All rights reserved.\r\n */\r\n\r\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\r\n/*global window: false, jQuery: false */\r\n\r\n(function ($) {\r\n    var data_click = \"unobtrusiveAjaxClick\",\r\n        data_validation = \"unobtrusiveValidation\";\r\n\r\n    function getFunction(code, argNames) {\r\n        var fn = window,\r\n            parts = (code || \"\").split(\".\");\r\n        while (fn && parts.length) {\r\n            fn = fn[parts.shift()];\r\n        }\r\n        if (typeof fn === \"function\") {\r\n            return fn;\r\n        }\r\n        argNames.push(code);\r\n        return Function.constructor.apply(null, argNames);\r\n    }\r\n\r\n    function isMethodProxySafe(method) {\r\n        return method === \"GET\" || method === \"POST\";\r\n    }\r\n\r\n    function asyncOnBeforeSend(xhr, method) {\r\n        if (!isMethodProxySafe(method)) {\r\n            xhr.setRequestHeader(\"X-HTTP-Method-Override\", method);\r\n        }\r\n    }\r\n\r\n    function asyncOnSuccess(element, data, contentType) {\r\n        var mode;\r\n\r\n        if (contentType.indexOf(\"application/x-javascript\") !== -1) {\r\n            // jQuery already executes JavaScript for us\r\n            return;\r\n        }\r\n\r\n        mode = (element.getAttribute(\"data-ajax-mode\") || \"\").toUpperCase();\r\n        $(element.getAttribute(\"data-ajax-update\")).each(function (i, update) {\r\n            var top;\r\n\r\n            switch (mode) {\r\n                case \"BEFORE\":\r\n                    top = update.firstChild;\r\n                    $(\"<div />\")\r\n                        .html(data)\r\n                        .contents()\r\n                        .each(function () {\r\n                            update.insertBefore(this, top);\r\n                        });\r\n                    break;\r\n                case \"AFTER\":\r\n                    $(\"<div />\")\r\n                        .html(data)\r\n                        .contents()\r\n                        .each(function () {\r\n                            update.appendChild(this);\r\n                        });\r\n                    break;\r\n                default:\r\n                    $(update).html(data);\r\n                    break;\r\n            }\r\n        });\r\n    }\r\n\r\n    function asyncRequest(element, options) {\r\n        var confirm, loading, method, duration;\r\n\r\n        confirm = element.getAttribute(\"data-ajax-confirm\");\r\n        if (confirm && !window.confirm(confirm)) {\r\n            return;\r\n        }\r\n\r\n        loading = $(element.getAttribute(\"data-ajax-loading\"));\r\n        duration = element.getAttribute(\"data-ajax-loading-duration\") || 0;\r\n\r\n        $.extend(options, {\r\n            type: element.getAttribute(\"data-ajax-method\") || undefined,\r\n            url: element.getAttribute(\"data-ajax-url\") || undefined,\r\n            beforeSend: function (xhr) {\r\n                var result;\r\n                asyncOnBeforeSend(xhr, method);\r\n                result = getFunction(element.getAttribute(\"data-ajax-begin\"), [\r\n                    \"xhr\",\r\n                ]).apply(this, arguments);\r\n                if (result !== false) {\r\n                    loading.show(duration);\r\n                }\r\n                return result;\r\n            },\r\n            complete: function () {\r\n                loading.hide(duration);\r\n                getFunction(element.getAttribute(\"data-ajax-complete\"), [\r\n                    \"xhr\",\r\n                    \"status\",\r\n                ]).apply(this, arguments);\r\n            },\r\n            success: function (data, status, xhr) {\r\n                asyncOnSuccess(\r\n                    element,\r\n                    data,\r\n                    xhr.getResponseHeader(\"Content-Type\") || \"text/html\",\r\n                );\r\n                getFunction(element.getAttribute(\"data-ajax-success\"), [\r\n                    \"data\",\r\n                    \"status\",\r\n                    \"xhr\",\r\n                ]).apply(this, arguments);\r\n            },\r\n            error: getFunction(element.getAttribute(\"data-ajax-failure\"), [\r\n                \"xhr\",\r\n                \"status\",\r\n                \"error\",\r\n            ]),\r\n        });\r\n\r\n        options.data.push({\r\n            name: \"X-Requested-With\",\r\n            value: \"XMLHttpRequest\",\r\n        });\r\n\r\n        method = options.type.toUpperCase();\r\n        if (!isMethodProxySafe(method)) {\r\n            options.type = \"POST\";\r\n            options.data.push({\r\n                name: \"X-HTTP-Method-Override\",\r\n                value: method,\r\n            });\r\n        }\r\n\r\n        $.ajax(options);\r\n    }\r\n\r\n    function validate(form) {\r\n        var validationInfo = $(form).data(data_validation);\r\n        return (\r\n            !validationInfo ||\r\n            !validationInfo.validate ||\r\n            validationInfo.validate()\r\n        );\r\n    }\r\n\r\n    $(document).on(\"click\", \"a[data-ajax=true]\", function (evt) {\r\n        evt.preventDefault();\r\n        asyncRequest(this, {\r\n            url: this.href,\r\n            type: \"GET\",\r\n            data: [],\r\n        });\r\n    });\r\n\r\n    $(document).on(\r\n        \"click\",\r\n        \"form[data-ajax=true] input[type=image]\",\r\n        function (evt) {\r\n            var name = evt.target.name,\r\n                $target = $(evt.target),\r\n                form = $target.parents(\"form\")[0],\r\n                offset = $target.offset();\r\n\r\n            $(form).data(data_click, [\r\n                {\r\n                    name: name + \".x\",\r\n                    value: Math.round(evt.pageX - offset.left),\r\n                },\r\n                {\r\n                    name: name + \".y\",\r\n                    value: Math.round(evt.pageY - offset.top),\r\n                },\r\n            ]);\r\n\r\n            setTimeout(function () {\r\n                $(form).removeData(data_click);\r\n            }, 0);\r\n        },\r\n    );\r\n\r\n    $(document).on(\"click\", \"form[data-ajax=true] :submit\", function (evt) {\r\n        var name = evt.target.name,\r\n            form = $(evt.target).parents(\"form\")[0];\r\n\r\n        $(form).data(\r\n            data_click,\r\n            name ? [{ name: name, value: evt.target.value }] : [],\r\n        );\r\n\r\n        setTimeout(function () {\r\n            $(form).removeData(data_click);\r\n        }, 0);\r\n    });\r\n\r\n    $(document).on(\"submit\", \"form[data-ajax=true]\", function (evt) {\r\n        var clickInfo = $(this).data(data_click) || [];\r\n        evt.preventDefault();\r\n        if (!validate(this)) {\r\n            return;\r\n        }\r\n        asyncRequest(this, {\r\n            url: this.action,\r\n            type: this.method || \"GET\",\r\n            data: clickInfo.concat($(this).serializeArray()),\r\n        });\r\n    });\r\n})(jQuery);\r\n","(function(window, factory) {\n\tvar lazySizes = factory(window, window.document, Date);\n\twindow.lazySizes = lazySizes;\n\tif(typeof module == 'object' && module.exports){\n\t\tmodule.exports = lazySizes;\n\t}\n}(typeof window != 'undefined' ?\n      window : {}, \n/**\n * import(\"./types/global\")\n * @typedef { import(\"./types/lazysizes-config\").LazySizesConfigPartial } LazySizesConfigPartial\n */\nfunction l(window, document, Date) { // Pass in the window Date function also for SSR because the Date class can be lost\n\t'use strict';\n\t/*jshint eqnull:true */\n\n\tvar lazysizes,\n\t\t/**\n\t\t * @type { LazySizesConfigPartial }\n\t\t */\n\t\tlazySizesCfg;\n\n\t(function(){\n\t\tvar prop;\n\n\t\tvar lazySizesDefaults = {\n\t\t\tlazyClass: 'lazyload',\n\t\t\tloadedClass: 'lazyloaded',\n\t\t\tloadingClass: 'lazyloading',\n\t\t\tpreloadClass: 'lazypreload',\n\t\t\terrorClass: 'lazyerror',\n\t\t\t//strictClass: 'lazystrict',\n\t\t\tautosizesClass: 'lazyautosizes',\n\t\t\tfastLoadedClass: 'ls-is-cached',\n\t\t\tiframeLoadMode: 0,\n\t\t\tsrcAttr: 'data-src',\n\t\t\tsrcsetAttr: 'data-srcset',\n\t\t\tsizesAttr: 'data-sizes',\n\t\t\t//preloadAfterLoad: false,\n\t\t\tminSize: 40,\n\t\t\tcustomMedia: {},\n\t\t\tinit: true,\n\t\t\texpFactor: 1.5,\n\t\t\thFac: 0.8,\n\t\t\tloadMode: 2,\n\t\t\tloadHidden: true,\n\t\t\tricTimeout: 0,\n\t\t\tthrottleDelay: 125,\n\t\t};\n\n\t\tlazySizesCfg = window.lazySizesConfig || window.lazysizesConfig || {};\n\n\t\tfor(prop in lazySizesDefaults){\n\t\t\tif(!(prop in lazySizesCfg)){\n\t\t\t\tlazySizesCfg[prop] = lazySizesDefaults[prop];\n\t\t\t}\n\t\t}\n\t})();\n\n\tif (!document || !document.getElementsByClassName) {\n\t\treturn {\n\t\t\tinit: function () {},\n\t\t\t/**\n\t\t\t * @type { LazySizesConfigPartial }\n\t\t\t */\n\t\t\tcfg: lazySizesCfg,\n\t\t\t/**\n\t\t\t * @type { true }\n\t\t\t */\n\t\t\tnoSupport: true,\n\t\t};\n\t}\n\n\tvar docElem = document.documentElement;\n\n\tvar supportPicture = window.HTMLPictureElement;\n\n\tvar _addEventListener = 'addEventListener';\n\n\tvar _getAttribute = 'getAttribute';\n\n\t/**\n\t * Update to bind to window because 'this' becomes null during SSR\n\t * builds.\n\t */\n\tvar addEventListener = window[_addEventListener].bind(window);\n\n\tvar setTimeout = window.setTimeout;\n\n\tvar requestAnimationFrame = window.requestAnimationFrame || setTimeout;\n\n\tvar requestIdleCallback = window.requestIdleCallback;\n\n\tvar regPicture = /^picture$/i;\n\n\tvar loadEvents = ['load', 'error', 'lazyincluded', '_lazyloaded'];\n\n\tvar regClassCache = {};\n\n\tvar forEach = Array.prototype.forEach;\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar hasClass = function(ele, cls) {\n\t\tif(!regClassCache[cls]){\n\t\t\tregClassCache[cls] = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n\t\t}\n\t\treturn regClassCache[cls].test(ele[_getAttribute]('class') || '') && regClassCache[cls];\n\t};\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar addClass = function(ele, cls) {\n\t\tif (!hasClass(ele, cls)){\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').trim() + ' ' + cls);\n\t\t}\n\t};\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar removeClass = function(ele, cls) {\n\t\tvar reg;\n\t\tif ((reg = hasClass(ele,cls))) {\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').replace(reg, ' '));\n\t\t}\n\t};\n\n\tvar addRemoveLoadEvents = function(dom, fn, add){\n\t\tvar action = add ? _addEventListener : 'removeEventListener';\n\t\tif(add){\n\t\t\taddRemoveLoadEvents(dom, fn);\n\t\t}\n\t\tloadEvents.forEach(function(evt){\n\t\t\tdom[action](evt, fn);\n\t\t});\n\t};\n\n\t/**\n\t * @param elem { Element }\n\t * @param name { string }\n\t * @param detail { any }\n\t * @param noBubbles { boolean }\n\t * @param noCancelable { boolean }\n\t * @returns { CustomEvent }\n\t */\n\tvar triggerEvent = function(elem, name, detail, noBubbles, noCancelable){\n\t\tvar event = document.createEvent('Event');\n\n\t\tif(!detail){\n\t\t\tdetail = {};\n\t\t}\n\n\t\tdetail.instance = lazysizes;\n\n\t\tevent.initEvent(name, !noBubbles, !noCancelable);\n\n\t\tevent.detail = detail;\n\n\t\telem.dispatchEvent(event);\n\t\treturn event;\n\t};\n\n\tvar updatePolyfill = function (el, full){\n\t\tvar polyfill;\n\t\tif( !supportPicture && ( polyfill = (window.picturefill || lazySizesCfg.pf) ) ){\n\t\t\tif(full && full.src && !el[_getAttribute]('srcset')){\n\t\t\t\tel.setAttribute('srcset', full.src);\n\t\t\t}\n\t\t\tpolyfill({reevaluate: true, elements: [el]});\n\t\t} else if(full && full.src){\n\t\t\tel.src = full.src;\n\t\t}\n\t};\n\n\tvar getCSS = function (elem, style){\n\t\treturn (getComputedStyle(elem, null) || {})[style];\n\t};\n\n\t/**\n\t *\n\t * @param elem { Element }\n\t * @param parent { Element }\n\t * @param [width] {number}\n\t * @returns {number}\n\t */\n\tvar getWidth = function(elem, parent, width){\n\t\twidth = width || elem.offsetWidth;\n\n\t\twhile(width < lazySizesCfg.minSize && parent && !elem._lazysizesWidth){\n\t\t\twidth =  parent.offsetWidth;\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\treturn width;\n\t};\n\n\tvar rAF = (function(){\n\t\tvar running, waiting;\n\t\tvar firstFns = [];\n\t\tvar secondFns = [];\n\t\tvar fns = firstFns;\n\n\t\tvar run = function(){\n\t\t\tvar runFns = fns;\n\n\t\t\tfns = firstFns.length ? secondFns : firstFns;\n\n\t\t\trunning = true;\n\t\t\twaiting = false;\n\n\t\t\twhile(runFns.length){\n\t\t\t\trunFns.shift()();\n\t\t\t}\n\n\t\t\trunning = false;\n\t\t};\n\n\t\tvar rafBatch = function(fn, queue){\n\t\t\tif(running && !queue){\n\t\t\t\tfn.apply(this, arguments);\n\t\t\t} else {\n\t\t\t\tfns.push(fn);\n\n\t\t\t\tif(!waiting){\n\t\t\t\t\twaiting = true;\n\t\t\t\t\t(document.hidden ? setTimeout : requestAnimationFrame)(run);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\trafBatch._lsFlush = run;\n\n\t\treturn rafBatch;\n\t})();\n\n\tvar rAFIt = function(fn, simple){\n\t\treturn simple ?\n\t\t\tfunction() {\n\t\t\t\trAF(fn);\n\t\t\t} :\n\t\t\tfunction(){\n\t\t\t\tvar that = this;\n\t\t\t\tvar args = arguments;\n\t\t\t\trAF(function(){\n\t\t\t\t\tfn.apply(that, args);\n\t\t\t\t});\n\t\t\t}\n\t\t;\n\t};\n\n\tvar throttle = function(fn){\n\t\tvar running;\n\t\tvar lastTime = 0;\n\t\tvar gDelay = lazySizesCfg.throttleDelay;\n\t\tvar rICTimeout = lazySizesCfg.ricTimeout;\n\t\tvar run = function(){\n\t\t\trunning = false;\n\t\t\tlastTime = Date.now();\n\t\t\tfn();\n\t\t};\n\t\tvar idleCallback = requestIdleCallback && rICTimeout > 49 ?\n\t\t\tfunction(){\n\t\t\t\trequestIdleCallback(run, {timeout: rICTimeout});\n\n\t\t\t\tif(rICTimeout !== lazySizesCfg.ricTimeout){\n\t\t\t\t\trICTimeout = lazySizesCfg.ricTimeout;\n\t\t\t\t}\n\t\t\t} :\n\t\t\trAFIt(function(){\n\t\t\t\tsetTimeout(run);\n\t\t\t}, true)\n\t\t;\n\n\t\treturn function(isPriority){\n\t\t\tvar delay;\n\n\t\t\tif((isPriority = isPriority === true)){\n\t\t\t\trICTimeout = 33;\n\t\t\t}\n\n\t\t\tif(running){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trunning =  true;\n\n\t\t\tdelay = gDelay - (Date.now() - lastTime);\n\n\t\t\tif(delay < 0){\n\t\t\t\tdelay = 0;\n\t\t\t}\n\n\t\t\tif(isPriority || delay < 9){\n\t\t\t\tidleCallback();\n\t\t\t} else {\n\t\t\t\tsetTimeout(idleCallback, delay);\n\t\t\t}\n\t\t};\n\t};\n\n\t//based on http://modernjavascript.blogspot.de/2013/08/building-better-debounce.html\n\tvar debounce = function(func) {\n\t\tvar timeout, timestamp;\n\t\tvar wait = 99;\n\t\tvar run = function(){\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tvar later = function() {\n\t\t\tvar last = Date.now() - timestamp;\n\n\t\t\tif (last < wait) {\n\t\t\t\tsetTimeout(later, wait - last);\n\t\t\t} else {\n\t\t\t\t(requestIdleCallback || run)(run);\n\t\t\t}\n\t\t};\n\n\t\treturn function() {\n\t\t\ttimestamp = Date.now();\n\n\t\t\tif (!timeout) {\n\t\t\t\ttimeout = setTimeout(later, wait);\n\t\t\t}\n\t\t};\n\t};\n\n\tvar loader = (function(){\n\t\tvar preloadElems, isCompleted, resetPreloadingTimer, loadMode, started;\n\n\t\tvar eLvW, elvH, eLtop, eLleft, eLright, eLbottom, isBodyHidden;\n\n\t\tvar regImg = /^img$/i;\n\t\tvar regIframe = /^iframe$/i;\n\n\t\tvar supportScroll = ('onscroll' in window) && !(/(gle|ing)bot/.test(navigator.userAgent));\n\n\t\tvar shrinkExpand = 0;\n\t\tvar currentExpand = 0;\n\n\t\tvar isLoading = 0;\n\t\tvar lowRuns = -1;\n\n\t\tvar resetPreloading = function(e){\n\t\t\tisLoading--;\n\t\t\tif(!e || isLoading < 0 || !e.target){\n\t\t\t\tisLoading = 0;\n\t\t\t}\n\t\t};\n\n\t\tvar isVisible = function (elem) {\n\t\t\tif (isBodyHidden == null) {\n\t\t\t\tisBodyHidden = getCSS(document.body, 'visibility') == 'hidden';\n\t\t\t}\n\n\t\t\treturn isBodyHidden || !(getCSS(elem.parentNode, 'visibility') == 'hidden' && getCSS(elem, 'visibility') == 'hidden');\n\t\t};\n\n\t\tvar isNestedVisible = function(elem, elemExpand){\n\t\t\tvar outerRect;\n\t\t\tvar parent = elem;\n\t\t\tvar visible = isVisible(elem);\n\n\t\t\teLtop -= elemExpand;\n\t\t\teLbottom += elemExpand;\n\t\t\teLleft -= elemExpand;\n\t\t\teLright += elemExpand;\n\n\t\t\twhile(visible && (parent = parent.offsetParent) && parent != document.body && parent != docElem){\n\t\t\t\tvisible = ((getCSS(parent, 'opacity') || 1) > 0);\n\n\t\t\t\tif(visible && getCSS(parent, 'overflow') != 'visible'){\n\t\t\t\t\touterRect = parent.getBoundingClientRect();\n\t\t\t\t\tvisible = eLright > outerRect.left &&\n\t\t\t\t\t\teLleft < outerRect.right &&\n\t\t\t\t\t\teLbottom > outerRect.top - 1 &&\n\t\t\t\t\t\teLtop < outerRect.bottom + 1\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn visible;\n\t\t};\n\n\t\tvar checkElements = function() {\n\t\t\tvar eLlen, i, rect, autoLoadElem, loadedSomething, elemExpand, elemNegativeExpand, elemExpandVal,\n\t\t\t\tbeforeExpandVal, defaultExpand, preloadExpand, hFac;\n\t\t\tvar lazyloadElems = lazysizes.elements;\n\n\t\t\tif((loadMode = lazySizesCfg.loadMode) && isLoading < 8 && (eLlen = lazyloadElems.length)){\n\n\t\t\t\ti = 0;\n\n\t\t\t\tlowRuns++;\n\n\t\t\t\tfor(; i < eLlen; i++){\n\n\t\t\t\t\tif(!lazyloadElems[i] || lazyloadElems[i]._lazyRace){continue;}\n\n\t\t\t\t\tif(!supportScroll || (lazysizes.prematureUnveil && lazysizes.prematureUnveil(lazyloadElems[i]))){unveilElement(lazyloadElems[i]);continue;}\n\n\t\t\t\t\tif(!(elemExpandVal = lazyloadElems[i][_getAttribute]('data-expand')) || !(elemExpand = elemExpandVal * 1)){\n\t\t\t\t\t\telemExpand = currentExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!defaultExpand) {\n\t\t\t\t\t\tdefaultExpand = (!lazySizesCfg.expand || lazySizesCfg.expand < 1) ?\n\t\t\t\t\t\t\tdocElem.clientHeight > 500 && docElem.clientWidth > 500 ? 500 : 370 :\n\t\t\t\t\t\t\tlazySizesCfg.expand;\n\n\t\t\t\t\t\tlazysizes._defEx = defaultExpand;\n\n\t\t\t\t\t\tpreloadExpand = defaultExpand * lazySizesCfg.expFactor;\n\t\t\t\t\t\thFac = lazySizesCfg.hFac;\n\t\t\t\t\t\tisBodyHidden = null;\n\n\t\t\t\t\t\tif(currentExpand < preloadExpand && isLoading < 1 && lowRuns > 2 && loadMode > 2 && !document.hidden){\n\t\t\t\t\t\t\tcurrentExpand = preloadExpand;\n\t\t\t\t\t\t\tlowRuns = 0;\n\t\t\t\t\t\t} else if(loadMode > 1 && lowRuns > 1 && isLoading < 6){\n\t\t\t\t\t\t\tcurrentExpand = defaultExpand;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentExpand = shrinkExpand;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(beforeExpandVal !== elemExpand){\n\t\t\t\t\t\teLvW = innerWidth + (elemExpand * hFac);\n\t\t\t\t\t\telvH = innerHeight + elemExpand;\n\t\t\t\t\t\telemNegativeExpand = elemExpand * -1;\n\t\t\t\t\t\tbeforeExpandVal = elemExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\trect = lazyloadElems[i].getBoundingClientRect();\n\n\t\t\t\t\tif ((eLbottom = rect.bottom) >= elemNegativeExpand &&\n\t\t\t\t\t\t(eLtop = rect.top) <= elvH &&\n\t\t\t\t\t\t(eLright = rect.right) >= elemNegativeExpand * hFac &&\n\t\t\t\t\t\t(eLleft = rect.left) <= eLvW &&\n\t\t\t\t\t\t(eLbottom || eLright || eLleft || eLtop) &&\n\t\t\t\t\t\t(lazySizesCfg.loadHidden || isVisible(lazyloadElems[i])) &&\n\t\t\t\t\t\t((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){\n\t\t\t\t\t\tunveilElement(lazyloadElems[i]);\n\t\t\t\t\t\tloadedSomething = true;\n\t\t\t\t\t\tif(isLoading > 9){break;}\n\t\t\t\t\t} else if(!loadedSomething && isCompleted && !autoLoadElem &&\n\t\t\t\t\t\tisLoading < 4 && lowRuns < 4 && loadMode > 2 &&\n\t\t\t\t\t\t(preloadElems[0] || lazySizesCfg.preloadAfterLoad) &&\n\t\t\t\t\t\t(preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr) != 'auto')))){\n\t\t\t\t\t\tautoLoadElem = preloadElems[0] || lazyloadElems[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(autoLoadElem && !loadedSomething){\n\t\t\t\t\tunveilElement(autoLoadElem);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar throttledCheckElements = throttle(checkElements);\n\n\t\tvar switchLoadingClass = function(e){\n\t\t\tvar elem = e.target;\n\n\t\t\tif (elem._lazyCache) {\n\t\t\t\tdelete elem._lazyCache;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresetPreloading(e);\n\t\t\taddClass(elem, lazySizesCfg.loadedClass);\n\t\t\tremoveClass(elem, lazySizesCfg.loadingClass);\n\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass);\n\t\t\ttriggerEvent(elem, 'lazyloaded');\n\t\t};\n\t\tvar rafedSwitchLoadingClass = rAFIt(switchLoadingClass);\n\t\tvar rafSwitchLoadingClass = function(e){\n\t\t\trafedSwitchLoadingClass({target: e.target});\n\t\t};\n\n\t\tvar changeIframeSrc = function(elem, src){\n\t\t\tvar loadMode = elem.getAttribute('data-load-mode') || lazySizesCfg.iframeLoadMode;\n\n\t\t\t// loadMode can be also a string!\n\t\t\tif (loadMode == 0) {\n\t\t\t\telem.contentWindow.location.replace(src);\n\t\t\t} else if (loadMode == 1) {\n\t\t\t\telem.src = src;\n\t\t\t}\n\t\t};\n\n\t\tvar handleSources = function(source){\n\t\t\tvar customMedia;\n\n\t\t\tvar sourceSrcset = source[_getAttribute](lazySizesCfg.srcsetAttr);\n\n\t\t\tif( (customMedia = lazySizesCfg.customMedia[source[_getAttribute]('data-media') || source[_getAttribute]('media')]) ){\n\t\t\t\tsource.setAttribute('media', customMedia);\n\t\t\t}\n\n\t\t\tif(sourceSrcset){\n\t\t\t\tsource.setAttribute('srcset', sourceSrcset);\n\t\t\t}\n\t\t};\n\n\t\tvar lazyUnveil = rAFIt(function (elem, detail, isAuto, sizes, isImg){\n\t\t\tvar src, srcset, parent, isPicture, event, firesLoad;\n\n\t\t\tif(!(event = triggerEvent(elem, 'lazybeforeunveil', detail)).defaultPrevented){\n\n\t\t\t\tif(sizes){\n\t\t\t\t\tif(isAuto){\n\t\t\t\t\t\taddClass(elem, lazySizesCfg.autosizesClass);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.setAttribute('sizes', sizes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsrcset = elem[_getAttribute](lazySizesCfg.srcsetAttr);\n\t\t\t\tsrc = elem[_getAttribute](lazySizesCfg.srcAttr);\n\n\t\t\t\tif(isImg) {\n\t\t\t\t\tparent = elem.parentNode;\n\t\t\t\t\tisPicture = parent && regPicture.test(parent.nodeName || '');\n\t\t\t\t}\n\n\t\t\t\tfiresLoad = detail.firesLoad || (('src' in elem) && (srcset || src || isPicture));\n\n\t\t\t\tevent = {target: elem};\n\n\t\t\t\taddClass(elem, lazySizesCfg.loadingClass);\n\n\t\t\t\tif(firesLoad){\n\t\t\t\t\tclearTimeout(resetPreloadingTimer);\n\t\t\t\t\tresetPreloadingTimer = setTimeout(resetPreloading, 2500);\n\t\t\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass, true);\n\t\t\t\t}\n\n\t\t\t\tif(isPicture){\n\t\t\t\t\tforEach.call(parent.getElementsByTagName('source'), handleSources);\n\t\t\t\t}\n\n\t\t\t\tif(srcset){\n\t\t\t\t\telem.setAttribute('srcset', srcset);\n\t\t\t\t} else if(src && !isPicture){\n\t\t\t\t\tif(regIframe.test(elem.nodeName)){\n\t\t\t\t\t\tchangeIframeSrc(elem, src);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.src = src;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isImg && (srcset || isPicture)){\n\t\t\t\t\tupdatePolyfill(elem, {src: src});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(elem._lazyRace){\n\t\t\t\tdelete elem._lazyRace;\n\t\t\t}\n\t\t\tremoveClass(elem, lazySizesCfg.lazyClass);\n\n\t\t\trAF(function(){\n\t\t\t\t// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)\n\t\t\t\tvar isLoaded = elem.complete && elem.naturalWidth > 1;\n\n\t\t\t\tif( !firesLoad || isLoaded){\n\t\t\t\t\tif (isLoaded) {\n\t\t\t\t\t\taddClass(elem, lazySizesCfg.fastLoadedClass);\n\t\t\t\t\t}\n\t\t\t\t\tswitchLoadingClass(event);\n\t\t\t\t\telem._lazyCache = true;\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif ('_lazyCache' in elem) {\n\t\t\t\t\t\t\tdelete elem._lazyCache;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 9);\n\t\t\t\t}\n\t\t\t\tif (elem.loading == 'lazy') {\n\t\t\t\t\tisLoading--;\n\t\t\t\t}\n\t\t\t}, true);\n\t\t});\n\n\t\t/**\n\t\t *\n\t\t * @param elem { Element }\n\t\t */\n\t\tvar unveilElement = function (elem){\n\t\t\tif (elem._lazyRace) {return;}\n\t\t\tvar detail;\n\n\t\t\tvar isImg = regImg.test(elem.nodeName);\n\n\t\t\t//allow using sizes=\"auto\", but don't use. it's invalid. Use data-sizes=\"auto\" or a valid value for sizes instead (i.e.: sizes=\"80vw\")\n\t\t\tvar sizes = isImg && (elem[_getAttribute](lazySizesCfg.sizesAttr) || elem[_getAttribute]('sizes'));\n\t\t\tvar isAuto = sizes == 'auto';\n\n\t\t\tif( (isAuto || !isCompleted) && isImg && (elem[_getAttribute]('src') || elem.srcset) && !elem.complete && !hasClass(elem, lazySizesCfg.errorClass) && hasClass(elem, lazySizesCfg.lazyClass)){return;}\n\n\t\t\tdetail = triggerEvent(elem, 'lazyunveilread').detail;\n\n\t\t\tif(isAuto){\n\t\t\t\t autoSizer.updateElem(elem, true, elem.offsetWidth);\n\t\t\t}\n\n\t\t\telem._lazyRace = true;\n\t\t\tisLoading++;\n\n\t\t\tlazyUnveil(elem, detail, isAuto, sizes, isImg);\n\t\t};\n\n\t\tvar afterScroll = debounce(function(){\n\t\t\tlazySizesCfg.loadMode = 3;\n\t\t\tthrottledCheckElements();\n\t\t});\n\n\t\tvar altLoadmodeScrollListner = function(){\n\t\t\tif(lazySizesCfg.loadMode == 3){\n\t\t\t\tlazySizesCfg.loadMode = 2;\n\t\t\t}\n\t\t\tafterScroll();\n\t\t};\n\n\t\tvar onload = function(){\n\t\t\tif(isCompleted){return;}\n\t\t\tif(Date.now() - started < 999){\n\t\t\t\tsetTimeout(onload, 999);\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\tisCompleted = true;\n\n\t\t\tlazySizesCfg.loadMode = 3;\n\n\t\t\tthrottledCheckElements();\n\n\t\t\taddEventListener('scroll', altLoadmodeScrollListner, true);\n\t\t};\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tstarted = Date.now();\n\n\t\t\t\tlazysizes.elements = document.getElementsByClassName(lazySizesCfg.lazyClass);\n\t\t\t\tpreloadElems = document.getElementsByClassName(lazySizesCfg.lazyClass + ' ' + lazySizesCfg.preloadClass);\n\n\t\t\t\taddEventListener('scroll', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('resize', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('pageshow', function (e) {\n\t\t\t\t\tif (e.persisted) {\n\t\t\t\t\t\tvar loadingElements = document.querySelectorAll('.' + lazySizesCfg.loadingClass);\n\n\t\t\t\t\t\tif (loadingElements.length && loadingElements.forEach) {\n\t\t\t\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\t\t\t\tloadingElements.forEach( function (img) {\n\t\t\t\t\t\t\t\t\tif (img.complete) {\n\t\t\t\t\t\t\t\t\t\tunveilElement(img);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif(window.MutationObserver){\n\t\t\t\t\tnew MutationObserver( throttledCheckElements ).observe( docElem, {childList: true, subtree: true, attributes: true} );\n\t\t\t\t} else {\n\t\t\t\t\tdocElem[_addEventListener]('DOMNodeInserted', throttledCheckElements, true);\n\t\t\t\t\tdocElem[_addEventListener]('DOMAttrModified', throttledCheckElements, true);\n\t\t\t\t\tsetInterval(throttledCheckElements, 999);\n\t\t\t\t}\n\n\t\t\t\taddEventListener('hashchange', throttledCheckElements, true);\n\n\t\t\t\t//, 'fullscreenchange'\n\t\t\t\t['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend'].forEach(function(name){\n\t\t\t\t\tdocument[_addEventListener](name, throttledCheckElements, true);\n\t\t\t\t});\n\n\t\t\t\tif((/d$|^c/.test(document.readyState))){\n\t\t\t\t\tonload();\n\t\t\t\t} else {\n\t\t\t\t\taddEventListener('load', onload);\n\t\t\t\t\tdocument[_addEventListener]('DOMContentLoaded', throttledCheckElements);\n\t\t\t\t\tsetTimeout(onload, 20000);\n\t\t\t\t}\n\n\t\t\t\tif(lazysizes.elements.length){\n\t\t\t\t\tcheckElements();\n\t\t\t\t\trAF._lsFlush();\n\t\t\t\t} else {\n\t\t\t\t\tthrottledCheckElements();\n\t\t\t\t}\n\t\t\t},\n\t\t\tcheckElems: throttledCheckElements,\n\t\t\tunveil: unveilElement,\n\t\t\t_aLSL: altLoadmodeScrollListner,\n\t\t};\n\t})();\n\n\n\tvar autoSizer = (function(){\n\t\tvar autosizesElems;\n\n\t\tvar sizeElement = rAFIt(function(elem, parent, event, width){\n\t\t\tvar sources, i, len;\n\t\t\telem._lazysizesWidth = width;\n\t\t\twidth += 'px';\n\n\t\t\telem.setAttribute('sizes', width);\n\n\t\t\tif(regPicture.test(parent.nodeName || '')){\n\t\t\t\tsources = parent.getElementsByTagName('source');\n\t\t\t\tfor(i = 0, len = sources.length; i < len; i++){\n\t\t\t\t\tsources[i].setAttribute('sizes', width);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!event.detail.dataAttr){\n\t\t\t\tupdatePolyfill(elem, event.detail);\n\t\t\t}\n\t\t});\n\t\t/**\n\t\t *\n\t\t * @param elem {Element}\n\t\t * @param dataAttr\n\t\t * @param [width] { number }\n\t\t */\n\t\tvar getSizeElement = function (elem, dataAttr, width){\n\t\t\tvar event;\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif(parent){\n\t\t\t\twidth = getWidth(elem, parent, width);\n\t\t\t\tevent = triggerEvent(elem, 'lazybeforesizes', {width: width, dataAttr: !!dataAttr});\n\n\t\t\t\tif(!event.defaultPrevented){\n\t\t\t\t\twidth = event.detail.width;\n\n\t\t\t\t\tif(width && width !== elem._lazysizesWidth){\n\t\t\t\t\t\tsizeElement(elem, parent, event, width);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar updateElementsSizes = function(){\n\t\t\tvar i;\n\t\t\tvar len = autosizesElems.length;\n\t\t\tif(len){\n\t\t\t\ti = 0;\n\n\t\t\t\tfor(; i < len; i++){\n\t\t\t\t\tgetSizeElement(autosizesElems[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar debouncedUpdateElementsSizes = debounce(updateElementsSizes);\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tautosizesElems = document.getElementsByClassName(lazySizesCfg.autosizesClass);\n\t\t\t\taddEventListener('resize', debouncedUpdateElementsSizes);\n\t\t\t},\n\t\t\tcheckElems: debouncedUpdateElementsSizes,\n\t\t\tupdateElem: getSizeElement\n\t\t};\n\t})();\n\n\tvar init = function(){\n\t\tif(!init.i && document.getElementsByClassName){\n\t\t\tinit.i = true;\n\t\t\tautoSizer._();\n\t\t\tloader._();\n\t\t}\n\t};\n\n\tsetTimeout(function(){\n\t\tif(lazySizesCfg.init){\n\t\t\tinit();\n\t\t}\n\t});\n\n\tlazysizes = {\n\t\t/**\n\t\t * @type { LazySizesConfigPartial }\n\t\t */\n\t\tcfg: lazySizesCfg,\n\t\tautoSizer: autoSizer,\n\t\tloader: loader,\n\t\tinit: init,\n\t\tuP: updatePolyfill,\n\t\taC: addClass,\n\t\trC: removeClass,\n\t\thC: hasClass,\n\t\tfire: triggerEvent,\n\t\tgW: getWidth,\n\t\trAF: rAF,\n\t};\n\n\treturn lazysizes;\n}\n));\n","export default function Mount(className, Module) {\r\n    const targets = document.getElementsByClassName(className);\r\n\r\n    for (let i = targets.length - 1; i >= 0; i -= 1) {\r\n        new Module(targets[i], className);\r\n    }\r\n}\r\n","const loginSession = () => {\r\n    const login = document.querySelectorAll('._js-login');\r\n    const loginFinished = document.querySelectorAll('._js-login-finished');\r\n    const phoneNumberInput = document.querySelectorAll('._js-phone-input');\r\n\r\n    if (login) {\r\n        login.forEach(l => {\r\n            l.addEventListener('click', event => {\r\n                window.sessionStorage.setItem('currentPage', window.location.href);\r\n            });\r\n        });\r\n    }\r\n\r\n    if (loginFinished) {\r\n        loginFinished.forEach(l => {\r\n            l.addEventListener('click', event => {\r\n                const storedPage = window.sessionStorage.getItem('currentPage');\r\n                const storedPhoneNumber = window.sessionStorage.getItem('phoneNumber');\r\n                if (storedPage) {\r\n                    event.preventDefault();\r\n                    window.location = storedPage;\r\n                    window.sessionStorage.removeItem('currentPage');\r\n                }\r\n\r\n                if (storedPhoneNumber) {\r\n                    window.sessionStorage.removeItem('phoneNumber');\r\n                }\r\n            });\r\n        });\r\n    }\r\n\r\n    if (phoneNumberInput) {        \r\n        const storedPhoneNumber = window.sessionStorage.getItem('phoneNumber');\r\n        //check if validates\r\n        phoneNumberInput.forEach(pnr => {\r\n            pnr.addEventListener('blur', event => {\r\n                window.sessionStorage.setItem('phoneNumber', pnr.value);\r\n            });\r\n            if (storedPhoneNumber) {\r\n                pnr.value = storedPhoneNumber;\r\n            }\r\n        });\r\n    }\r\n};\r\n\r\nexport const loginSessionInit = () => {\r\n    loginSession();\r\n};\r\n","export const oauthFunctions = {\r\n    doLogin: (loginUrl, idToken) => {\r\n        return $.ajax({\r\n            url: loginUrl,\r\n            data: { idtoken: idToken },\r\n            type: 'POST',\r\n            contentType: 'application/x-www-form-urlencoded',\r\n            cache: false\r\n        });\r\n    },\r\n\r\n    doRegistration: (regUrl, idToken, email) => {\r\n        return $.ajax({\r\n            url: regUrl,\r\n            data: { token: idToken, email: email },\r\n            type: 'POST',\r\n            contentType: 'application/x-www-form-urlencoded',\r\n            cache: false\r\n        });\r\n    },\r\n\r\n    doCreation: (createUrl, idToken, firstName, lastName, email, locale) => {\r\n        return $.ajax({\r\n            url: createUrl,\r\n            data: { token: idToken, firstName: firstName, lastName: lastName, email: email, locale: locale },\r\n            type: 'POST',\r\n            contentType: 'application/x-www-form-urlencoded',\r\n            cache: false\r\n        });\r\n    }\r\n};\r\n","import digest from '../runtime/digest.js';\nexport const encoder = new TextEncoder();\nexport const decoder = new TextDecoder();\nconst MAX_INT32 = 2 ** 32;\nexport function concat(...buffers) {\n    const size = buffers.reduce((acc, { length }) => acc + length, 0);\n    const buf = new Uint8Array(size);\n    let i = 0;\n    buffers.forEach((buffer) => {\n        buf.set(buffer, i);\n        i += buffer.length;\n    });\n    return buf;\n}\nexport function p2s(alg, p2sInput) {\n    return concat(encoder.encode(alg), new Uint8Array([0]), p2sInput);\n}\nfunction writeUInt32BE(buf, value, offset) {\n    if (value < 0 || value >= MAX_INT32) {\n        throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n    }\n    buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset);\n}\nexport function uint64be(value) {\n    const high = Math.floor(value / MAX_INT32);\n    const low = value % MAX_INT32;\n    const buf = new Uint8Array(8);\n    writeUInt32BE(buf, high, 0);\n    writeUInt32BE(buf, low, 4);\n    return buf;\n}\nexport function uint32be(value) {\n    const buf = new Uint8Array(4);\n    writeUInt32BE(buf, value);\n    return buf;\n}\nexport function lengthAndInput(input) {\n    return concat(uint32be(input.length), input);\n}\nexport async function concatKdf(secret, bits, value) {\n    const iterations = Math.ceil((bits >> 3) / 32);\n    const res = new Uint8Array(iterations * 32);\n    for (let iter = 0; iter < iterations; iter++) {\n        const buf = new Uint8Array(4 + secret.length + value.length);\n        buf.set(uint32be(iter + 1));\n        buf.set(secret, 4);\n        buf.set(value, 4 + secret.length);\n        res.set(await digest('sha256', buf), iter * 32);\n    }\n    return res.slice(0, bits >> 3);\n}\n","import { encoder, decoder } from '../lib/buffer_utils.js';\nexport const encodeBase64 = (input) => {\n    let unencoded = input;\n    if (typeof unencoded === 'string') {\n        unencoded = encoder.encode(unencoded);\n    }\n    const CHUNK_SIZE = 0x8000;\n    const arr = [];\n    for (let i = 0; i < unencoded.length; i += CHUNK_SIZE) {\n        arr.push(String.fromCharCode.apply(null, unencoded.subarray(i, i + CHUNK_SIZE)));\n    }\n    return btoa(arr.join(''));\n};\nexport const encode = (input) => {\n    return encodeBase64(input).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\nexport const decodeBase64 = (encoded) => {\n    const binary = atob(encoded);\n    const bytes = new Uint8Array(binary.length);\n    for (let i = 0; i < binary.length; i++) {\n        bytes[i] = binary.charCodeAt(i);\n    }\n    return bytes;\n};\nexport const decode = (input) => {\n    let encoded = input;\n    if (encoded instanceof Uint8Array) {\n        encoded = decoder.decode(encoded);\n    }\n    encoded = encoded.replace(/-/g, '+').replace(/_/g, '/').replace(/\\s/g, '');\n    try {\n        return decodeBase64(encoded);\n    }\n    catch (_a) {\n        throw new TypeError('The input to be decoded is not correctly encoded.');\n    }\n};\n","export class JOSEError extends Error {\n    static get code() {\n        return 'ERR_JOSE_GENERIC';\n    }\n    constructor(message) {\n        var _a;\n        super(message);\n        this.code = 'ERR_JOSE_GENERIC';\n        this.name = this.constructor.name;\n        (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor);\n    }\n}\nexport class JWTClaimValidationFailed extends JOSEError {\n    static get code() {\n        return 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n    }\n    constructor(message, claim = 'unspecified', reason = 'unspecified') {\n        super(message);\n        this.code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n        this.claim = claim;\n        this.reason = reason;\n    }\n}\nexport class JWTExpired extends JOSEError {\n    static get code() {\n        return 'ERR_JWT_EXPIRED';\n    }\n    constructor(message, claim = 'unspecified', reason = 'unspecified') {\n        super(message);\n        this.code = 'ERR_JWT_EXPIRED';\n        this.claim = claim;\n        this.reason = reason;\n    }\n}\nexport class JOSEAlgNotAllowed extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n    }\n    static get code() {\n        return 'ERR_JOSE_ALG_NOT_ALLOWED';\n    }\n}\nexport class JOSENotSupported extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JOSE_NOT_SUPPORTED';\n    }\n    static get code() {\n        return 'ERR_JOSE_NOT_SUPPORTED';\n    }\n}\nexport class JWEDecryptionFailed extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWE_DECRYPTION_FAILED';\n        this.message = 'decryption operation failed';\n    }\n    static get code() {\n        return 'ERR_JWE_DECRYPTION_FAILED';\n    }\n}\nexport class JWEInvalid extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWE_INVALID';\n    }\n    static get code() {\n        return 'ERR_JWE_INVALID';\n    }\n}\nexport class JWSInvalid extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWS_INVALID';\n    }\n    static get code() {\n        return 'ERR_JWS_INVALID';\n    }\n}\nexport class JWTInvalid extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWT_INVALID';\n    }\n    static get code() {\n        return 'ERR_JWT_INVALID';\n    }\n}\nexport class JWKInvalid extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWK_INVALID';\n    }\n    static get code() {\n        return 'ERR_JWK_INVALID';\n    }\n}\nexport class JWKSInvalid extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWKS_INVALID';\n    }\n    static get code() {\n        return 'ERR_JWKS_INVALID';\n    }\n}\nexport class JWKSNoMatchingKey extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWKS_NO_MATCHING_KEY';\n        this.message = 'no applicable key found in the JSON Web Key Set';\n    }\n    static get code() {\n        return 'ERR_JWKS_NO_MATCHING_KEY';\n    }\n}\nexport class JWKSMultipleMatchingKeys extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n        this.message = 'multiple matching keys found in the JSON Web Key Set';\n    }\n    static get code() {\n        return 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n    }\n}\nSymbol.asyncIterator;\nexport class JWKSTimeout extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWKS_TIMEOUT';\n        this.message = 'request timed out';\n    }\n    static get code() {\n        return 'ERR_JWKS_TIMEOUT';\n    }\n}\nexport class JWSSignatureVerificationFailed extends JOSEError {\n    constructor() {\n        super(...arguments);\n        this.code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n        this.message = 'signature verification failed';\n    }\n    static get code() {\n        return 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n    }\n}\n","function isObjectLike(value) {\n    return typeof value === 'object' && value !== null;\n}\nexport default function isObject(input) {\n    if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n        return false;\n    }\n    if (Object.getPrototypeOf(input) === null) {\n        return true;\n    }\n    let proto = input;\n    while (Object.getPrototypeOf(proto) !== null) {\n        proto = Object.getPrototypeOf(proto);\n    }\n    return Object.getPrototypeOf(input) === proto;\n}\n","import * as base64url from '../runtime/base64url.js';\nexport const encode = base64url.encode;\nexport const decode = base64url.decode;\n","import { decode as base64url } from './base64url.js';\nimport { decoder } from '../lib/buffer_utils.js';\nimport isObject from '../lib/is_object.js';\nimport { JWTInvalid } from './errors.js';\nexport function decodeJwt(jwt) {\n    if (typeof jwt !== 'string')\n        throw new JWTInvalid('JWTs must use Compact JWS serialization, JWT must be a string');\n    const { 1: payload, length } = jwt.split('.');\n    if (length === 5)\n        throw new JWTInvalid('Only JWTs using Compact JWS serialization can be decoded');\n    if (length !== 3)\n        throw new JWTInvalid('Invalid JWT');\n    if (!payload)\n        throw new JWTInvalid('JWTs must contain a payload');\n    let decoded;\n    try {\n        decoded = base64url(payload);\n    }\n    catch (_a) {\n        throw new JWTInvalid('Failed to parse the base64url encoded payload');\n    }\n    let result;\n    try {\n        result = JSON.parse(decoder.decode(decoded));\n    }\n    catch (_b) {\n        throw new JWTInvalid('Failed to parse the decoded payload as JSON');\n    }\n    if (!isObject(result))\n        throw new JWTInvalid('Invalid JWT Claims Set');\n    return result;\n}\n","import { decodeJwt } from 'jose';\r\nimport { oauthFunctions } from './oauth_wp';\r\n\r\nexport let googleLoginUrls = {};\r\n\r\nexport const googleLoginFunctions = {\r\n    init: (urls) => {\r\n        googleLoginUrls = urls;\r\n    },\r\n\r\n    onSuccess: (googleUser) => {\r\n        const profile = decodeJwt(googleUser.credential);\r\n        if (profile) {\r\n            if (googleLoginUrls) {\r\n                const idToken = googleUser.credential;\r\n                oauthFunctions.doLogin(googleLoginUrls.loginUrl, idToken).then(function (data) {\r\n                    if (data.DoRegistration) {\r\n                        // Success, but not connected\r\n                        oauthFunctions.doRegistration(googleLoginUrls.connectUrl, idToken, profile.email, '')\r\n                            .then(function (data) {\r\n                                if (data.DoCreate) {\r\n                                    oauthFunctions.doCreation(googleLoginUrls.createUrl,\r\n                                        idToken,\r\n                                        profile.given_name,\r\n                                        profile.family_name,\r\n                                        profile.email)\r\n                                        .then(function (data) {\r\n                                            if (!data.Success) {\r\n                                                console.log(data.Message);\r\n                                            }\r\n                                            window.voice.googleLogin.signOut();\r\n                                        });\r\n                                } else if (!data.Success) {\r\n                                    console.log(data.Message);\r\n                                }\r\n                                window.voice.googleLogin.signOut();\r\n                            });\r\n                    } else {\r\n                        window.voice.googleLogin.signOut();\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    },\r\n\r\n    onFailure: (data) => {\r\n        console.log('Login failure: ' + data.error);\r\n    }\r\n};\r\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = GeneratorFunctionPrototype;\n  defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n  defineProperty(\n    GeneratorFunctionPrototype,\n    \"constructor\",\n    { value: GeneratorFunction, configurable: true }\n  );\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    defineProperty(this, \"_invoke\", { value: enqueue });\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  });\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var methodName = context.method;\n    var method = delegate.iterator[methodName];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method, or a missing .next mehtod, always terminate the\n      // yield* loop.\n      context.delegate = null;\n\n      // Note: [\"return\"] must be used for ES3 parsing compatibility.\n      if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n        // If the delegate iterator has a return method, give it a\n        // chance to clean up.\n        context.method = \"return\";\n        context.arg = undefined;\n        maybeInvokeDelegate(delegate, context);\n\n        if (context.method === \"throw\") {\n          // If maybeInvokeDelegate(context) changed context.method from\n          // \"return\" to \"throw\", let that override the TypeError below.\n          return ContinueSentinel;\n        }\n      }\n      if (methodName !== \"return\") {\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a '\" + methodName + \"' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function() {\n    return this;\n  });\n\n  define(Gp, \"toString\", function() {\n    return \"[object Generator]\";\n  });\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(val) {\n    var object = Object(val);\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","//When using gulp this file was written using async, but that wasn't supported by gulp,\r\n//therefore the old version used to include facebooks regeneratorRuntime, and the file was\r\n//compiled from es5 to es6, thats why the code contains 'regeneratorRuntime', '_context' and other\r\n//other code that looks generated.\r\nimport 'regenerator-runtime/runtime';\r\n\r\nconst bambuser = () => {\r\n    const bambuserTrigger = document.querySelector('[data-bambuser-trigger]');\r\n    if (bambuserTrigger) {\r\n        let scriptNode;\r\n\r\n        (function () {\r\n            const bambuserShowId = bambuserTrigger.getAttribute('data-bambuser-show-id');\r\n            const bambuserLocale = bambuserTrigger.getAttribute('data-locale');\r\n            const bambuserCurrency = bambuserTrigger.getAttribute('data-currency');\r\n            const bambuserCartUrl = bambuserTrigger.getAttribute('data-checkout-url');\r\n\r\n            if (!window.initBambuserLiveShopping) {\r\n                (function () {\r\n                    const getProducts = function getProducts(products) {\r\n                        let response;\r\n                        return regeneratorRuntime.async(function getProducts$(_context) {\r\n                            while (1) {\r\n                                switch (_context.prev = _context.next) {\r\n                                case 0:\r\n                                    _context.next = 2;\r\n                                    return regeneratorRuntime.awrap(fetch('/publicapi/bambuser/products?codes=' + products.map(function (p) {\r\n                                        return p.ref;\r\n                                    }).join('&codes=')));\r\n\r\n                                case 2:\r\n                                    response = _context.sent;\r\n                                    _context.next = 5;\r\n                                    return regeneratorRuntime.awrap(response.json());\r\n\r\n                                case 5:\r\n                                    return _context.abrupt('return', _context.sent);\r\n\r\n                                case 6:\r\n                                case 'end':\r\n                                    return _context.stop();\r\n                                }\r\n                            }\r\n                        }, null, null, null, Promise);\r\n                    };\r\n\r\n                    const addToCart = function addToCart(code, quantity) {\r\n                        let response;\r\n                        return regeneratorRuntime.async(function addToCart$(_context2) {\r\n                            while (1) {\r\n                                switch (_context2.prev = _context2.next) {\r\n                                case 0:\r\n                                    _context2.next = 2;\r\n                                    return regeneratorRuntime.awrap(fetch('/publicapi/bambuser/cart', {\r\n                                        method: 'POST',\r\n                                        headers: {\r\n                                            'Content-Type': 'application/json'\r\n                                        },\r\n                                        body: JSON.stringify({\r\n                                            code: code,\r\n                                            quantity: quantity\r\n                                        })\r\n                                    }));\r\n\r\n                                case 2:\r\n                                    response = _context2.sent;\r\n                                    _context2.next = 5;\r\n                                    return regeneratorRuntime.awrap(response.json());\r\n\r\n                                case 5:\r\n                                    return _context2.abrupt('return', _context2.sent);\r\n\r\n                                case 6:\r\n                                case 'end':\r\n                                    return _context2.stop();\r\n                                }\r\n                            }\r\n                        }, null, null, null, Promise);\r\n                    };\r\n\r\n                    const updateCartItem = function updateCartItem(code, quantity) {\r\n                        let response;\r\n                        return regeneratorRuntime.async(function updateCartItem$(_context3) {\r\n                            while (1) {\r\n                                switch (_context3.prev = _context3.next) {\r\n                                case 0:\r\n                                    _context3.next = 2;\r\n                                    return regeneratorRuntime.awrap(fetch('/publicapi/bambuser/cart', {\r\n                                        method: 'POST',\r\n                                        headers: {\r\n                                            'Content-Type': 'application/json'\r\n                                        },\r\n                                        body: JSON.stringify({\r\n                                            code: code,\r\n                                            quantity: quantity\r\n                                        })\r\n                                    }));\r\n\r\n                                case 2:\r\n                                    response = _context3.sent;\r\n                                    _context3.next = 5;\r\n                                    return regeneratorRuntime.awrap(response.json());\r\n\r\n                                case 5:\r\n                                    return _context3.abrupt('return', _context3.sent);\r\n\r\n                                case 6:\r\n                                case 'end':\r\n                                    return _context3.stop();\r\n                                }\r\n                            }\r\n                        }, null, null, null, Promise);\r\n                    };\r\n\r\n                    const isCartEmpty = function isCartEmpty() {\r\n                        let response;\r\n                        return regeneratorRuntime.async(function isCartEmpty$(_context4) {\r\n                            while (1) {\r\n                                switch (_context4.prev = _context4.next) {\r\n                                case 0:\r\n                                    _context4.next = 2;\r\n                                    return regeneratorRuntime.awrap(fetch('/publicapi/bambuser/cart'));\r\n\r\n                                case 2:\r\n                                    response = _context4.sent;\r\n                                    _context4.next = 5;\r\n                                    return regeneratorRuntime.awrap(response.json());\r\n\r\n                                case 5:\r\n                                    return _context4.abrupt('return', _context4.sent);\r\n\r\n                                case 6:\r\n                                case 'end':\r\n                                    return _context4.stop();\r\n                                }\r\n                            }\r\n                        }, null, null, null, Promise);\r\n                    };\r\n\r\n                    window.onBambuserLiveShoppingReady = function (player) {\r\n                        player.configure({\r\n                            locale: bambuserLocale,\r\n                            currency: bambuserCurrency\r\n                        });\r\n                        player.on(player.EVENT.PROVIDE_PRODUCT_DATA, function (event) {\r\n                            //get products based on sku from bambuser\r\n                            getProducts(event.products).then(function (epiProducts) {\r\n                                event.products.forEach(function (_ref) {\r\n                                    const sku = _ref.ref;\r\n                                    const url = _ref.url;\r\n                                    const bambuserId = _ref.id;\r\n                                    const epiProduct = epiProducts.find(function (p) {\r\n                                        return p.QueryCode === sku;\r\n                                    });\r\n\r\n                                    if (epiProduct) {\r\n                                        player.updateProduct(bambuserId, function (productFactory) {\r\n                                            return productFactory.inheritFromPlaceholder() // -> The .product() method takes a function\r\n                                                //    returning a product detail object\r\n                                                .product(function (productDetailFactory) {\r\n                                                    return productDetailFactory // Localized name of the product\r\n                                                        .name(epiProduct.Name) // Brand name to display for the product\r\n                                                        .brandName(epiProduct.Brand) // Localized description for the product\r\n                                                        // Supports text or HTML string\r\n                                                        // Disabled by default, contact your support at Bambuser for activation.\r\n                                                        // .description(yourProduct.description)\r\n                                                        // sku (or any other identifier for your product)\r\n                                                        // NOTE: Should be the same as your product reference\r\n                                                        // defined in Bambuser Dashboard\r\n                                                        .sku(epiProduct.QueryCode) // Describes which index in the variations list below\r\n                                                        // contains the default variation\r\n                                                        // (e.g. if variations contain colors, and you want to display\r\n                                                        //  the white version of a shirt, send the index for the white variation)\r\n                                                        .defaultVariationIndex(0) // -> The .variations() method takes a function\r\n                                                        //    returning an array of variations\r\n                                                        .variations(function (variationFactory) {\r\n                                                            return epiProduct.Colors.map(function (variation) {\r\n                                                                return (// VariationFactory contains a factory returning a new instance of a variation\r\n                                                                    variationFactory() // -> (Optional) The .attributes() method takes a function\r\n                                                                        //    defines color attribute for the variation\r\n                                                                        // .attributes((attributeFactory) =>\r\n                                                                        //     attributeFactory\r\n                                                                        //         // Color name in the variation dropdown selector,\r\n                                                                        //         .colorName(variation.ColorName)\r\n                                                                        //         // (Optional) Color Hex code e.g. '#7d58ee'\r\n                                                                        //         .colorHexCode(variation.ColorHex)\r\n                                                                        // )\r\n                                                                        // List of image urls for the variation\r\n                                                                        // ordered the same as you want it displayed\r\n                                                                        .imageUrls(variation.ImageUrls) // Name of the variation\r\n                                                                        // Shown if colorName is not provided as attribute.\r\n                                                                        .name(variation.Name) // sku (or any other identifier for your product)\r\n                                                                        // specific down to this variation\r\n                                                                        .sku(variation.Code) // -> The .sizes() method takes a function that\r\n                                                                        //    returns an array of sizes\r\n                                                                        .sizes(function (sizeFactory) {\r\n                                                                            return variation.Sizes.map(function (size) {\r\n                                                                                return (// s contains a factory returning a new instance of a variation\r\n                                                                                    sizeFactory() // Name of the size\r\n                                                                                        // (used in dropdowns)\r\n                                                                                        .name(size.Size) // Set whether this combination of\r\n                                                                                        // variation and size is in stock\r\n                                                                                        .inStock(size.InStock) // sku (or any other identifier for your product)\r\n                                                                                        // specific down to this size (used for add-to-cart)\r\n                                                                                        .sku(size.Code) // -> The price method contains a new chain\r\n                                                                                        //    defines price for the variation and size combo\r\n                                                                                        .price(function (priceFactory) {\r\n                                                                                            return priceFactory // currency to show price in\r\n                                                                                                // Optional - overrides the default currency\r\n                                                                                                .currency(size.Currency) // current price as a number\r\n                                                                                                .current(size.Price) // (Optional) original price\r\n                                                                                                // Used in case the current is a sale price\r\n                                                                                                .original(size.OriginalPrice);\r\n                                                                                        })\r\n                                                                                );\r\n                                                                            });\r\n                                                                        })\r\n                                                                );\r\n                                                            });\r\n                                                        });\r\n                                                });\r\n                                        });\r\n                                    }\r\n                                });\r\n                            });\r\n                        });\r\n                        player.on(player.EVENT.ADD_TO_CART, function (addedItem, callback) {\r\n                            addToCart(addedItem.sku, 1).then(function () {\r\n                                callback(true); // item successfully added to cart\r\n                            }).catch(function (error) {\r\n                                if (error.type === 'out-of-stock') {\r\n                                    // Unsuccessful due to 'out of stock'\r\n                                    callback({\r\n                                        success: false,\r\n                                        reason: 'out-of-stock'\r\n                                    });\r\n                                } else {\r\n                                    // Unsuccessful due to other problems\r\n                                    callback(false);\r\n                                }\r\n                            });\r\n                        });\r\n                        player.on(player.EVENT.UPDATE_ITEM_IN_CART, function (updatedItem, callback) {\r\n                            updateCartItem(updatedItem.sku, updatedItem.quantity).then(function () {\r\n                                // cart update was successful\r\n                                callback(true);\r\n                            }).catch(function (error) {\r\n                                if (error.type === 'out-of-stock') {\r\n                                    callback({\r\n                                        success: false,\r\n                                        reason: 'out-of-stock'\r\n                                    });\r\n                                } else {\r\n                                    callback(false);\r\n                                }\r\n                            });\r\n                        });\r\n                        player.on(player.EVENT.CHECKOUT, function () {\r\n                            player.showCheckout(bambuserCartUrl);\r\n                        });\r\n                        player.on(player.EVENT.SYNC_CART_STATE, function () {\r\n                            //As of 29.09.21 the documentation https://bambuser.com/docs/one-to-many/cart-integration/#sync-the-player-cart says:\r\n                            // > Currently, the update cart does not support anything more than emptying the player cart.\r\n                            // Use your method to check if the user has checkout\r\n                            isCartEmpty().then(function (data) {\r\n                                if (data.CartItems && data.CartItems.length === 0) {\r\n                                    // Emptying the in-player cart\r\n                                    player.updateCart({\r\n                                        items: []\r\n                                    });\r\n                                }\r\n                            }).catch(function (error) {\r\n                                console.log(error);\r\n                            });\r\n                        });\r\n                    };\r\n\r\n                    window.initBambuserLiveShopping = function (item) {\r\n                        window.initBambuserLiveShopping.queue.push(item);\r\n                    };\r\n\r\n                    window.initBambuserLiveShopping.queue = [];\r\n                    scriptNode = document.createElement('script');\r\n                    scriptNode['src'] = 'https://lcx-embed-eu.bambuser.com/schibsted-partnerstudio/embed.js';\r\n                    document.body.appendChild(scriptNode);\r\n                })();\r\n            }\r\n\r\n            window.initBambuserLiveShopping({\r\n                showId: bambuserShowId,\r\n                node: document.getElementById('bambuser-cta'),\r\n                type: 'overlay'\r\n            });\r\n        })();\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    bambuser();\r\n};\r\n","//Helper functions to replace jquery faster\r\n//Primarily covers \"$\" functionality\r\n\r\n//Returns an iterable array\r\nconst selectAll = (selector) => {\r\n    return Array.from(document.querySelectorAll(selector));\r\n};\r\nexport default selectAll;\r\n\r\nexport const selectOne = (selector) => {\r\n    return selectAll(selector)[0];\r\n};\r\n\r\nexport const ready = (fn) => {\r\n    if (document.readyState != \"loading\") {\r\n        fn();\r\n    } else {\r\n        document.addEventListener(\"DOMContentLoaded\", fn);\r\n    }\r\n};\r\n","import selectAll, { selectOne } from '../../helpers/jquery-replace';\r\n\r\nconst updateIndicator = (el: HTMLElement) => {\r\n    const indicator = selectOne('.nav-main__link-indicator') as HTMLElement;\r\n    if (indicator) {\r\n        indicator.style.left = el.offsetLeft + 'px';\r\n    }\r\n};\r\n\r\nconst makeParentIndicator = (el: HTMLElement) => {\r\n    const template = document.createElement('template');\r\n    template.innerHTML = '<span class=\\'nav-main__link-indicator u-hide-for-small\\' style=\\'left:' + el.offsetLeft + 'px; width:' + el.offsetWidth + 'px;\\'></span>';\r\n    const globalHeader = selectOne('.global-header') as HTMLElement;\r\n    if (globalHeader) {\r\n        globalHeader.appendChild(template.content);\r\n    }\r\n};\r\n\r\nexport default class Menu {\r\n    constructor(element: HTMLElement) {\r\n        // Height of header\r\n        const header = document.getElementsByTagName('header')[0];\r\n        const headerContentElement = document.getElementById('_js-global-header__content');\r\n        const headerHeight = headerContentElement ? headerContentElement.offsetHeight : 0;\r\n        header.style.setProperty('--header-height-total', `${headerContentElement?.offsetHeight ?? 0}px`);\r\n\r\n        if (headerContentElement) {\r\n            const resizeObserver = new ResizeObserver(() => {\r\n                header.style.setProperty('--header-height-total', `${headerContentElement.offsetHeight - (headerContentElement.classList.contains(\"collapsed\") ? 28 : 0)}px`);\r\n            });\r\n            resizeObserver.observe(headerContentElement);\r\n        }\r\n\r\n        const onLoad = () => {\r\n            if (headerHeight != null) {\r\n                (selectOne('body') as HTMLElement).style['--headerHeight'] = headerHeight;\r\n            }\r\n        };\r\n\r\n        if (document.readyState != 'loading'){\r\n            onLoad();\r\n        } else {\r\n            document.addEventListener('DOMContentLoaded', onLoad);\r\n        }\r\n    \r\n        // Toogle mega menu desktop hover\r\n        const mainItems = selectAll('._js-nav-main-item');\r\n        mainItems.forEach((el: HTMLElement) => {\r\n            const menuTrigger = el.querySelector('._js-nav-main-expander') as HTMLElement;\r\n            const menuToExpand = el;\r\n            const menuToExpandContainer = el.querySelector('._js-mega-menu-container') as HTMLElement;\r\n        \r\n            menuTrigger.addEventListener('mouseenter', (e: Event) => {\r\n                if (window.matchMedia('(min-width: 64.0625em)').matches) {\r\n                    e.preventDefault();\r\n                    selectAll('._js-nav-main-item').forEach((e: HTMLElement) => e.classList.remove('is-expanded'));\r\n                    menuToExpand.classList.add('is-expanded');\r\n                }\r\n            });\r\n        \r\n            menuToExpandContainer.addEventListener('mouseleave', () => {\r\n                if (window.matchMedia('(min-width: 64.0625em)').matches) {\r\n                    menuToExpand.classList.remove('is-expanded');\r\n                }\r\n            });\r\n        });\r\n        \r\n        // Toggle Mobile menu\r\n        selectAll('._js-mobile-menu-trigger').forEach((e: HTMLElement) => {\r\n            e.addEventListener('click', () => {\r\n                element.classList.toggle('is-active');\r\n                (selectOne('body') as HTMLElement).classList.toggle('u-overflow-hidden');\r\n            });\r\n        });\r\n        \r\n        // Toggle mobile submenus\r\n        const mobileExpanders = selectAll('._js-nav-main-expander');\r\n\r\n        mobileExpanders.forEach((expander: HTMLElement) => {\r\n            expander.addEventListener('click', (e) => {\r\n                if (window.matchMedia('(max-width: 64.0625em)').matches) {\r\n                    e.preventDefault();\r\n                    (expander.closest('._js-nav-main-item') as HTMLElement).classList.toggle('is-expanded');\r\n                }\r\n            });\r\n        });\r\n\r\n        \r\n        if (selectAll('.nav-main__link.self').length > 0) {\r\n            const menuElement = selectOne('.nav-main__link.self') as HTMLElement;\r\n            makeParentIndicator(menuElement);\r\n        \r\n            window.onresize = () => {\r\n                updateIndicator(menuElement);\r\n            };\r\n        } else if (selectAll('.nav-main__link.on-path').length > 0) {\r\n            const menuElement = selectOne('.nav-main__link.on-path') as HTMLElement;\r\n            makeParentIndicator(menuElement);\r\n            window.onresize = () => {\r\n                updateIndicator(menuElement);\r\n            };\r\n        }\r\n    }\r\n}\r\n","import axios from 'axios';\r\n\r\nconst captcha = () => {\r\n    const form = document.querySelector('#submitCaptcha').closest('form');\r\n\r\n    if (form && form.checkValidity()) {\r\n        const refreshUrl = form.action;\r\n        const data = new FormData(form);\r\n        let obj = {};\r\n        for (let [key, value] of data) {\r\n            obj[key] = value;\r\n        }\r\n\r\n        const ajax = axios.create({\r\n            headers: {\r\n                'X-Requested-With': 'XMLHttpRequest'\r\n            },\r\n        });\r\n\r\n        ajax.post(refreshUrl, data)\r\n            .then(response => {\r\n                document.querySelector('._js-captcha-response').replaceWith(response.data);\r\n            });\r\n    } else {\r\n        grecaptcha.reset();\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    captcha();\r\n};\r\n","import axios from 'axios';\r\nimport {scrollToTarget} from '../../utils';\r\n\r\nexport const checkoutFunctions = {\r\n    togglePhoneLookup: () => {\r\n        const status = document.querySelector('._js-PhoneLookupStatus').value || 'false';\r\n        const formTarget = document.querySelector('._js-adressModelForm');\r\n        const inputs = document.querySelectorAll('#_js-FormData input[type=text], #_js-FormData input[type=tel]');\r\n\r\n        if (status === 'True' || status === 'true') {\r\n            document.querySelector('._js-PhoneLookupHitText').style.display = 'none';\r\n            document.querySelector('._js-PhoneLookupNoHitText').style.display = 'block';\r\n        } else {\r\n            // Scroll to form\r\n            scrollToTarget(formTarget);\r\n            voice.scrolltotarget.scrollPage(formTarget);\r\n            // Animate Inputs\r\n            inputs.addClass('autofilled');\r\n        }\r\n    },\r\n\r\n    basketUpdateBegin: () => {\r\n        const form = document.querySelector('._js-ajax-form');\r\n        form.querySelectorAll('button,input').forEach(element => {\r\n            element.disabled = true;\r\n        });\r\n    },\r\n\r\n    basketUpdateSuccess: function () {\r\n        document.querySelectorAll('._jsBasketUpdateCallbackTarget').forEach((index, target) => {\r\n            const refreshUrl = target.dataset.refreshUrl;\r\n            if (refreshUrl) {\r\n                const ajax = axios.create({\r\n                    headers: {\r\n                        'X-Requested-With': 'XMLHttpRequest',\r\n                        'type': 'html',\r\n                    },\r\n                });\r\n                ajax.post(refreshUrl, {})\r\n                    .then(response => {\r\n                        target.replaceWith(response.data);\r\n                    });\r\n            }\r\n        });\r\n    },\r\n\r\n    basketUpdateComplete: function () {\r\n        const form = document.querySelector('._js-ajax-form');\r\n        form.querySelectorAll('button,input').forEach(element => {\r\n            element.disabled = false;\r\n        });\r\n    },\r\n};\r\n\r\nexport const initCheckout = () => {\r\n    // Hide Phone lookup error\r\n    const phoneLookupNoHit = document.querySelector('._js-PhoneLookupNoHitText');\r\n    const phoneLookupHit = document.querySelector('._js-PhoneLookupHitText');\r\n\r\n    if (phoneLookupNoHit && phoneLookupHit) {\r\n        phoneLookupNoHit.style.display = 'none';\r\n        phoneLookupHit.style.display = 'block';\r\n    }\r\n\r\n    // Remember me\r\n    // Password\r\n    const addPassword = document.querySelector('._js-add-password');\r\n    const selectPassword = document.querySelector('._js-select-password');\r\n    const repeatPassword = document.querySelector('._js-password-repeat');\r\n    const originalpassword = document.querySelector('._js-password-original');\r\n\r\n    let toggled = false;\r\n\r\n    if (addPassword && selectPassword && repeatPassword && originalpassword) {\r\n        if (addPassword && addPassword.checked) {\r\n            toggled = true;\r\n            if (selectPassword && selectPassword.querySelector('input')) {\r\n                selectPassword.querySelector('input').setAttribute('required', true);\r\n            }\r\n        } else {\r\n            toggled = false;\r\n            selectPassword.classList.add('is-hidden');\r\n        }\r\n\r\n        addPassword.addEventListener('change', () => {\r\n            toggled = !toggled;\r\n            selectPassword.classList.toggle('is-hidden');\r\n            selectPassword.querySelector('input').setAttribute('required', toggled);\r\n            repeatPassword.querySelector('input').setAttribute('required', toggled);\r\n        });\r\n\r\n        originalpassword.addEventListener('change', () => {\r\n            originalpassword.setAttribute('pattern', originalpassword.value);\r\n        });\r\n\r\n        repeatPassword.addEventListener('input', e => {\r\n            e.target.setCustomValidity('');\r\n        });\r\n\r\n        repeatPassword.addEventListener('invalid', e => {\r\n            const message = e.target.dataset.validationMessage;\r\n            if (message && message.length > 0) {\r\n                e.target.setCustomValidity(message);\r\n            }\r\n        });\r\n    }\r\n\r\n\r\n    const afterPayNumber = document.querySelector('._js-afterpay-number');\r\n    const afterPayOption = document.querySelector('._js-payment-option[value=afterpay]');\r\n\r\n    if (afterPayOption) {\r\n        const afterPayStatusInitial = document.querySelector('._js-payment-option[value=afterpay]').checked;\r\n\r\n        if (afterPayStatusInitial) {\r\n            afterPayNumber.setAttribute('required', true);\r\n            afterPayNumber.setAttribute('disabled', false);\r\n        } else {\r\n            afterPayNumber.setAttribute('required', false);\r\n            afterPayNumber.setAttribute('disabled', true);\r\n        }\r\n    }\r\n\r\n    const paymentOption = document.querySelector('._js-payment-option');\r\n    if (paymentOption) {\r\n        paymentOption.addEventListener('change', () => {\r\n            const afterPayOption = document.querySelector('._js-payment-option[value=afterpay]');\r\n\r\n            if (afterPayOption) {\r\n                if (afterPayOption.checked) {\r\n                    afterPayNumber.setAttribute('required', true);\r\n                    afterPayNumber.setAttribute('disabled', false);\r\n                } else {\r\n                    afterPayNumber.setAttribute('required', false);\r\n                    afterPayNumber.setAttribute('disabled', true);\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    const orderForm = document.querySelector('#orderForm');\r\n    const payButton = document.querySelector('._js-btn-pay');\r\n    if (orderForm && payButton) {\r\n        orderForm.addEventListener('submit', () => {\r\n            payButton.setAttribute('disabled', 'disabled');\r\n        });\r\n    }\r\n};\r\n","import {\r\n    expand,\r\n    scrollToTarget\r\n} from '../../utils';\r\n\r\nconst customerClub = () => {\r\n    const button = document.querySelector('._js-terms-button');\r\n\r\n    if (button) {\r\n        button.addEventListener('click', e => {\r\n            e.preventDefault();\r\n\r\n            const id = e.target.id;\r\n            const lipScoreToggleButton = document.querySelector('#terms-accordion-btn');\r\n\r\n            if (lipScoreToggleButton) {\r\n                if (!lipScoreToggleButton.classList.contains('is-active')) {\r\n                    expand(lipScoreToggleButton);\r\n                }\r\n            }\r\n\r\n            scrollToTarget(id);\r\n        });\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    customerClub();\r\n};\r\n","const customerservice = () => {\r\n    const navigation = document.querySelector('.layout-customerservice__navigation-wrapper'),\r\n        navigationElements = document.querySelectorAll('.layout-customerservice__nav-box');\r\n\r\n    if (navigation && navigationElements && navigationElements.length > 3) {\r\n        for (var i = 0; i < navigationElements.length; i++) {\r\n            if (navigationElements[i].classList.contains('self')) {\r\n                navigation.scrollLeft = navigationElements[i].offsetLeft;\r\n            }\r\n        }\r\n\r\n        navigation.scrollLeft = navigation.scrollLeft;\r\n    }\r\n}\r\n\r\nexport const init = () => {\r\n    customerservice()\r\n}\r\n","import { currentDelivery } from './delivery_wp';\r\nexport const initPostNordMap = () => {\r\n    const myLatLng = {lat: 60, lng: 10};\r\n    const adrsLength = document.querySelectorAll('[data-latitude]');\r\n    const bounds = new google.maps.LatLngBounds();\r\n    const markers = [];\r\n\r\n    // Create a map object and specify the DOM element for display.\r\n    const map = new google.maps.Map(document.getElementById('map'), {\r\n        center: myLatLng,\r\n        fullscreenControl: false,\r\n        mapTypeControl: false,\r\n        zoom: 2,\r\n        maxZoom: 18,\r\n        styles: [\r\n            {\r\n                'featureType': 'poi.business',\r\n                'stylers': [\r\n                    {\r\n                        'visibility': 'off'\r\n                    }\r\n                ]\r\n            }\r\n        ]\r\n    });\r\n\r\n    // Loop through elements\r\n    let i = 0, num = adrsLength.length;\r\n    for (; i < num; i++) {\r\n        setInfoWindow(i);\r\n    }\r\n\r\n    function setInfoWindow(i) {\r\n        const currentName = adrsLength[i].dataset.name;\r\n        let currentLat = adrsLength[i].dataset.latitude;\r\n        let currentLng = adrsLength[i].dataset.longitude;\r\n        const currentAddress = adrsLength[i].dataset.address;\r\n        const currentStore = adrsLength[i].dataset.pickuptype;\r\n\r\n\r\n        // Marker style\r\n        const postNordBox = {\r\n            path: 'M7,18V43H43V18H7ZM20,28H12V22h8v6Zm4-12H7l5-9H24v9Zm2-9H38l5,9H26V7Z',\r\n            fillColor: 'black',\r\n            fillOpacity: 1,\r\n            scale: .5,\r\n            strokeColor: 'white',\r\n            strokeWeight: 1,\r\n            anchor: new google.maps.Point(30, 30)\r\n        };\r\n\r\n        const matchLogo = {\r\n            path: 'M16,0C7.1,0,0,7.2,0,16s10.7,13,16,26c5-13,16-17.2,16-26S24.8,0,16,0z M25.3,7.4v17.1c0,0.1-0.1,0.1-0.1,0.1h-3.7c-0.1,0-0.1-0.1-0.1-0.1V13.8c0-0.1-0.1,0-0.1-0.1s-0.1,0-0.1,0l-5.2,8h-0.1l-0.1-0.1l-5.2-8h-0.1c-0.1,0-0.1,0.1-0.1,0.1v9.9v0.8c0,0.1-0.1,0.1-0.1,0.1H6.7c-0.1,0-0.1-0.1-0.1-0.1v-0.8V8.1V7.4c0-0.1,0.1-0.2,0.1-0.2h4.1c0.1,0,0.2,0.1,0.3,0.1l4.9,7.8l0.1,0.1h0.1l0.1-0.1L21,7.3c0.1-0.1,0.2-0.1,0.3-0.1h4C25.4,7.2,25.4,7.3,25.3,7.4z',\r\n            fillColor: 'red',\r\n            strokeWeight: 0,\r\n            fillOpacity: 1,\r\n            scale: .75\r\n\r\n        };\r\n\r\n        const boysLogo = {\r\n            path: 'M12.1,9.5c0-1.2-0.7-1.8-1.4-2c0.6-0.3,1-0.8,1-1.6c0-0.8-0.5-2-2.6-2H4.7v8.1h4.6C10.7,11.9,12.1,11.1,12.1,9.5z M7.2,5.7h1.3c0.5,0,0.9,0.1,0.9,0.6C9.3,6.8,9,7,8.5,7H7.2V5.7z M7.2,10V8.5h1.6c0.6,0,0.9,0.3,0.9,0.7c0,0.6-0.5,0.8-1,0.8H7.2, M8,16c4.4,0,8-3.6,8-8c0-4.4-3.6-8-8-8C3.6,0,0,3.6,0,8C0,12.4,3.6,16,8,16z M8,1.4c3.6,0,6.6,3,6.6,6.6c0,3.6-3,6.6-6.6,6.6c-3.6,0-6.6-3-6.6-6.6C1.4,4.4,4.4,1.4,8,1.4z',\r\n            fillColor: '#eb690b',\r\n            fillOpacity: 1,\r\n            strokeColor: '#eb690b',\r\n            strokeWeight: 0,\r\n            scale: 1.2\r\n        };\r\n        const vicLogo = {\r\n            path: 'M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8c4.4,0,8-3.6,8-8S12.4,0,8,0z M3.8,10.4L1,5.6h1.1l1.7,2.9l1.6-2.9h1.1L3.8,10.4z M8.5,10.3H7.5V5.6h0.9V10.3z M12.4,10.4C11,10.4,9.8,9.3,9.8,8c0-1.3,1.1-2.4,2.6-2.4c0.9,0,1.7,0.5,2.2,1.1l-0.8,0.5c-0.3-0.4-0.8-0.7-1.4-0.7c-0.9,0-1.6,0.7-1.6,1.5c0,0.8,0.7,1.5,1.6,1.5c0.6,0,1.1-0.3,1.4-0.7l0.8,0.5C14.1,9.9,13.3,10.4,12.4,10.4z',\r\n            fillColor: 'black',\r\n            fillOpacity: 1,\r\n            strokeColor: 'black',\r\n            strokeWeight: 0,\r\n            scale: 1\r\n        };\r\n\r\n        const currentSymbol = currentStore === 'Match' ? matchLogo : currentStore === 'Boys' ? boysLogo : currentStore === 'Vic' ? vicLogo : postNordBox;\r\n\r\n        if (window.google.maps) {\r\n            let geocoder = new google.maps.Geocoder;\r\n            geocoder.geocode({'address': currentAddress}, function (results, status) {\r\n                if (status == window.google.maps.GeocoderStatus.OK) {\r\n                    currentLat = results[0].geometry.location.lat();\r\n                    currentLng = results[0].geometry.location.lng();\r\n                }\r\n\r\n                // Infowindow\r\n                const infowindow = new google.maps.InfoWindow({\r\n                    content: currentName\r\n                });\r\n\r\n                const marker = new google.maps.Marker({\r\n                    map: map,\r\n                    position: new google.maps.LatLng(currentLat, currentLng),\r\n                    title: currentName,\r\n                    icon: currentSymbol,\r\n                    infowindow: infowindow\r\n                });\r\n\r\n                markers.push(marker);\r\n\r\n                // Click events\r\n                marker.addListener('click',\r\n                    function () {\r\n                        let el = adrsLength[i].id;\r\n                        hideAllInfoWindows();\r\n                        infowindow.open(map, marker);\r\n                        currentDelivery(el);\r\n                        map.setZoom(14);\r\n                        map.panTo(marker.position);\r\n                    });\r\n\r\n            });\r\n            bounds.extend(new google.maps.LatLng(currentLat, currentLng));\r\n        }\r\n    }\r\n\r\n    function hideAllInfoWindows() {\r\n        markers.forEach(function (marker) {\r\n            marker.infowindow.close(map, marker);\r\n        });\r\n    }\r\n\r\n    map.fitBounds(bounds);\r\n\r\n    return markers;\r\n};\r\n","import { Product } from \"../services/search.service\";\r\n\r\n/**\r\n * Format price range\r\n */\r\nfunction formatPriceRange(minPrice, maxPrice): string {\r\n    if (minPrice === maxPrice) {\r\n        return formatPrice(maxPrice);\r\n    }\r\n\r\n    return `${formatPrice(minPrice)} - ${formatPrice(maxPrice)}`;\r\n}\r\n\r\n/**\r\n * Format price\r\n */\r\nexport function formatPrice(price: number): string {\r\n    const formattedPrice = new Intl.NumberFormat(\"nb-NB\").format(price);\r\n\r\n    if (formattedPrice.indexOf(\",\") !== -1) {\r\n        const splitFormattedPrice = `${formattedPrice}`.split(\",\")[0];\r\n        return `${splitFormattedPrice},-`;\r\n    }\r\n\r\n    return `${formattedPrice},-`;\r\n}\r\n\r\nexport function formatWithoutRounding(price: number): string {\r\n    price = Math.round(price * 100) / 100;\r\n\r\n    const formattedPrice = new Intl.NumberFormat(\"nb-NB\", {\r\n        minimumFractionDigits: 2,\r\n    }).format(price);\r\n\r\n    return formattedPrice;\r\n}\r\n\r\nexport function formatPriceWithDash(price: number): string {\r\n    price = Math.round(price * 100) / 100;\r\n\r\n    const formattedPrice = new Intl.NumberFormat(\"nb-NB\", {\r\n        minimumFractionDigits: 2,\r\n    }).format(price);\r\n\r\n    const [integerPart, decimalPart] = formattedPrice.split(\",\");\r\n\r\n    if (decimalPart === \"00\") {\r\n        return `${integerPart},-`;\r\n    }\r\n\r\n    return formattedPrice;\r\n}\r\n\r\nfunction hasModifiedPrice(product: Product) {\r\n    return !(\r\n        product.listPrice.min === product.sellingPrice.max &&\r\n        product.listPrice.min === product.sellingPrice.max\r\n    );\r\n}\r\nexport function computePrice(product: Product): string {\r\n    return hasModifiedPrice(product)\r\n        ? \"\"\r\n        : formatPriceRange(product.listPrice.min, product.listPrice.max);\r\n}\r\n\r\nexport function computeNewPrice(product: Product): string {\r\n    return hasModifiedPrice(product)\r\n        ? formatPriceRange(product.sellingPrice.min, product.sellingPrice.max)\r\n        : \"\";\r\n}\r\n\r\nexport function computeOldPrice(product: Product): string {\r\n    return hasModifiedPrice(product)\r\n        ? formatPriceRange(product.listPrice.min, product.listPrice.max)\r\n        : \"\";\r\n}\r\n\r\nexport function priceAsNumber(product: Product): number {\r\n    if (hasModifiedPrice(product)) {\r\n        return product.sellingPrice.max;\r\n    }\r\n\r\n    return product.listPrice.max;\r\n}\r\n\r\nfunction oldPriceAsNumber(product: Product): number {\r\n    return product.listPrice.max;\r\n}\r\n\r\nexport function computeRebate(product: Product): string {\r\n    if (!hasModifiedPrice(product)) {\r\n        return \"0\";\r\n    }\r\n\r\n    return (\r\n        Math.floor(\r\n            ((oldPriceAsNumber(product) - priceAsNumber(product)) /\r\n                oldPriceAsNumber(product)) *\r\n                100,\r\n        ) + \"\"\r\n    );\r\n}\r\n","import axios from 'axios';\r\nimport { initPostNordMap } from './map-postnord_wp';\r\nimport { formatNumber } from '../../utils';\r\nimport { pushShippingOption } from './gtmdata_wp';\r\nimport { formatPriceWithDash } from '../../global/apps/mixins/productPrice.mixin';\r\n\r\nconst moreDeliveryPoints = document.querySelector('._js-moredeliverypoints');\r\nconst moreChoices = document.querySelector('._js-delivery-more-choices');\r\nconst deliveryPoints = document.querySelectorAll('._js-delivery-point');\r\nconst deliveryPointMain = document.querySelector('.delivery-point__main');\r\nconst shipmentPlace = document.querySelector('._js-shipmentplace');\r\nconst sumDelivery = document.querySelector('._js-sumdelivery');\r\nconst sumCost = document.querySelector('._js-sumcost');\r\nconst sumItems = document.querySelector('._js-sumitems');\r\nlet initialSumItems = null;\r\nconst pbWrapper = document.querySelector('.porterbuddy-wrapper');\r\n\r\nconst ajax = axios.create({\r\n    headers: {\r\n        'X-Requested-With': 'XMLHttpRequest',\r\n    },\r\n});\r\n\r\nconst voiceDelivery = {\r\n    deliveryWindow: null,\r\n    validateWindow: function () {\r\n        const deliveryWindows = window.porterbuddy.availabilityResponse.deliveryWindows;\r\n        let valid = false;\r\n\r\n        Object.keys(deliveryWindows).forEach(function (key) {\r\n            if (deliveryWindows[key].start === voiceDelivery.deliveryWindow.start &&\r\n                deliveryWindows[key].end === voiceDelivery.deliveryWindow.end) {\r\n                valid = true;\r\n            }\r\n        });\r\n\r\n        return valid;\r\n    },\r\n};\r\n\r\nconst delivery = () => {\r\n    document.addEventListener('readystatechange', event => {\r\n        if (event.target.readyState === 'complete') {\r\n            const $porterRadioBtn = $('._js-select-porterbuddy .delivery-point__choose');\r\n            if ($porterRadioBtn.is(':checked')) {\r\n                $porterRadioBtn.trigger('click');\r\n            }\r\n        }\r\n    });\r\n\r\n    let markers;\r\n    if (document.querySelector('#map')) {\r\n        markers = initPostNordMap();\r\n    }\r\n\r\n    // Calculating summaryBox items\r\n    if (sumItems) {\r\n        initialSumItems = sumItems.dataset.sumitems;\r\n    }\r\n\r\n    // Setup\r\n    const deliveryPoints = document.querySelectorAll('._js-delivery-point');\r\n    if (deliveryPoints && deliveryPoints.length > 0) {\r\n        deliveryPoints.forEach(point => {\r\n            const input = point.querySelector('input');\r\n            if (input && input.checked) {\r\n                point.classList.add('is-selected');\r\n            }\r\n        });\r\n    }\r\n\r\n    // Set up porterbuddy widget\r\n    const porterbuddyWidget = document.querySelector('#porterbuddy-widget');\r\n    if (porterbuddyWidget) {\r\n        const porterBuddyInput = document.querySelector('._js-select-porterbuddy .delivery-point__choose');\r\n\r\n        if (porterbuddyWidget && porterBuddyInput) {\r\n            if (porterBuddyInput.checked) {\r\n                ajax.get('/publicapi/SelectedPorterbuddyDeliveryWindow')\r\n                    .then(response => {\r\n                        voiceDelivery.deliveryWindow = response.data;\r\n                    });\r\n            }\r\n\r\n            window.porterbuddy = {\r\n                token: porterbuddyWidget.dataset.pbToken,\r\n                view: porterbuddyWidget.dataset.pbView,\r\n                availabilityResponse: JSON.parse(porterbuddyWidget.dataset.pbAvailability),\r\n                alternateAvailabilityView: true,\r\n                resetContext: true,\r\n                wrapInForm: true,\r\n                updateDeliveryWindowsInterval: 300,\r\n                onComment: function (comment) {\r\n                    ajax.post('/publicapi/PorterBuddyComment', {\r\n                        comment\r\n                    });\r\n                },\r\n                onLeaveAtDoorstep: function (leaveAtDoorstep) {\r\n                    ajax.post('/publicapi/PorterBuddyLeaveAtDoorstep', {\r\n                        leaveAtDoorstep\r\n                    });\r\n                },\r\n                onSelectDeliveryWindow: function (window) {\r\n                    ajax.post('/publicapi/SelectPorterBuddy', {\r\n                        window\r\n                    }).then(response => {\r\n                        const sumDelivery = document.querySelector('._js-sumdelivery');\r\n                        if (sumDelivery) {\r\n                            sumDelivery.innerHTML = response.data === \"0,-\" ? 'Fri frakt' : response.data;\r\n                        }\r\n                    });\r\n                },\r\n                onSetCallbacks: function (callbacks) {\r\n                    voiceDelivery.updateDeliveryWindows = callbacks.updateDeliveryWindows;\r\n                    voiceDelivery.setSelectedDeliveryWindow = callbacks.setSelectedDeliveryWindow;\r\n                }\r\n            };\r\n        }\r\n    }\r\n\r\n    const porterbuddyInitTrigger = document.querySelector('._js-select-porterbuddy .delivery-point__choose');\r\n    if (porterbuddyInitTrigger) {\r\n        porterbuddyInitTrigger.addEventListener('click', () => {\r\n            pbWrapper.classList.remove('is-hidden');\r\n\r\n            setTimeout(() => {\r\n                voiceDelivery.updateDeliveryWindows(porterbuddyWidget.dataset.pbAvailability);\r\n\r\n                if (voiceDelivery.deliveryWindow && voiceDelivery.validateWindow()) {\r\n                    voiceDelivery.setSelectedDeliveryWindow(voiceDelivery.deliveryWindow);\r\n                } else {\r\n                    deliveryObject.setSelectedDeliveryWindow(null, true);\r\n                    const timeTable = document.querySelector('.pb-matrix__timetable');\r\n                    if (timeTable) {\r\n                        timeTable.querySelector('[data-index=\"0\"]').click();\r\n                    }\r\n                }\r\n\r\n                window.dispatchEvent(new Event('resize'));\r\n            }, 100);\r\n        });\r\n    }\r\n\r\n    // Click delivery point\r\n    if (deliveryPoints && deliveryPoints.length > 0) {\r\n        deliveryPoints.forEach(point => {\r\n            point.addEventListener('click', e => {\r\n                if (point.classList.contains('_js-select-porterbuddy')) {\r\n                    pbWrapper.classList.remove('is-hidden');\r\n                    setTimeout(() => {\r\n                        voiceDelivery.updateDeliveryWindows(porterbuddyWidget.dataset.pbAvailability);\r\n\r\n                        if (voiceDelivery.deliveryWindow && voiceDelivery.validateWindow()) {\r\n                            voiceDelivery.setSelectedDeliveryWindow(voiceDelivery.deliveryWindow);\r\n                        } else {\r\n                            deliveryObject.setSelectedDeliveryWindow(null, true);\r\n                            const timeTable = document.querySelector('.pb-matrix__timetable');\r\n                            if (timeTable) {\r\n                                timeTable.querySelector('[data-index=\"0\"]').click();\r\n                            }\r\n                        }\r\n\r\n                        window.dispatchEvent(new Event('resize'));\r\n                    }, 100);\r\n                } else {\r\n                    if (pbWrapper)\r\n                        pbWrapper.classList.add('is-hidden');\r\n                }\r\n\r\n                const name = point.dataset.name;\r\n                markers.forEach(function (marker) {\r\n                    if (name === marker.title) {\r\n                        window.google.maps.event.trigger(marker, 'click');\r\n                    }\r\n                });\r\n\r\n                const currentLocation = point.id;\r\n                pushShippingOption(point.dataset.trackingname);\r\n\r\n                currentDelivery(currentLocation);\r\n                e.preventDefault();\r\n            });\r\n        });\r\n    }\r\n\r\n    // More items\r\n    if (moreDeliveryPoints) {\r\n        moreDeliveryPoints.addEventListener('click', e => {\r\n            e.target.classList.add('is-hidden');\r\n\r\n            if (moreChoices) {\r\n                moreChoices.classList.remove('is-hidden');\r\n            }\r\n\r\n            if (deliveryPointMain) {\r\n                deliveryPointMain.classList.remove('inactive');\r\n            }\r\n        });\r\n    }\r\n\r\n    // Toogle map\r\n    const deliveryMap = document.querySelector('._js-delivery-map-toggler');\r\n\r\n    if (deliveryMap) {\r\n        deliveryMap.addEventListener('click', () => {\r\n            if (moreDeliveryPoints) {\r\n                moreDeliveryPoints.classList.add('is-hidden');\r\n            }\r\n\r\n            if (moreChoices) {\r\n                moreChoices.classList.remove('is-hidden');\r\n            }\r\n\r\n            if (deliveryPointMain) {\r\n                deliveryPointMain.classList.remove('inactive');\r\n            }\r\n        });\r\n    }\r\n\r\n    // Opening hours\r\n    const openingHours = document.querySelectorAll('._js-toggle-openinghours');\r\n    if (openingHours && openingHours.length > 0) {\r\n        openingHours.forEach(button => {\r\n            button.addEventListener('click', () => {\r\n                button.parentNode.querySelector('._js-delivery-openinghours').classList.toggle('is-active');\r\n            });\r\n        });\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    delivery();\r\n};\r\n\r\n// Calculating summaryBox items\r\nexport const summaryPrice = (newPrice, place) => {\r\n    if (shipmentPlace) {\r\n        shipmentPlace.innerHTML = `(${place})`;\r\n    }\r\n\r\n    if (newPrice == 0) {\r\n        const newSumCost = formatNumber(initialSumItems);\r\n        document.querySelector('._js-sumdelivery').innerHTML = 'Fri frakt';\r\n        document.querySelector('._js-sumcost').innerHTML = formatNumber(newSumCost);\r\n    } else {\r\n        const intialSumItemsNumber = parseFloat(initialSumItems.replace(',', '.'));\r\n        const intialSumItemsNumberFormatted = parseFloat(intialSumItemsNumber.toFixed(2));\r\n        const shippingPriceFloat = parseFloat(newPrice.replace(',', '.'));\r\n        const shippingPriceFloatFormatted = parseFloat(shippingPriceFloat.toFixed(2));\r\n        const newSumCost = formatPriceWithDash(intialSumItemsNumberFormatted + shippingPriceFloatFormatted);\r\n        sumDelivery.innerHTML = formatNumber(newPrice);\r\n        sumCost.innerHTML = formatNumber(newSumCost);\r\n    }\r\n};\r\n\r\n// Set current delivery\r\nexport const currentDelivery = elementId => {\r\n    const el = document.getElementById(elementId);\r\n    el.querySelector('input').checked = true;\r\n\r\n    if (deliveryPoints && deliveryPoints.length > 0) {\r\n        deliveryPoints.forEach(point => {\r\n            const isCurrent = point.id;\r\n            const input = point.querySelector('input');\r\n            const isIt = input.checked ? input.value : null;\r\n\r\n            if (isCurrent === isIt) {\r\n                if (el) {\r\n                    el.classList.add('is-selected');\r\n                }\r\n\r\n                let currentShipmentPrice = input.dataset.shipmentprice;\r\n                let shipmentPlace = input.dataset.name;\r\n\r\n                if (!currentShipmentPrice) {\r\n                    if (input.closest('[data-shipmentprice]')) {\r\n                        currentShipmentPrice = input.closest('[data-shipmentprice]').dataset.shipmentprice;\r\n                    }\r\n                }\r\n\r\n                if (!shipmentPlace) {\r\n                    if (input.closest('[data-name]')) {\r\n                        shipmentPlace = input.closest('[data-name]').dataset.name;\r\n                    }\r\n                }\r\n\r\n                if (currentShipmentPrice && shipmentPlace) {\r\n                    summaryPrice(currentShipmentPrice, shipmentPlace);\r\n                }\r\n\r\n            } else {\r\n                if (el) {\r\n                    el.classList.remove('is-selected');\r\n                }\r\n            }\r\n        });\r\n    }\r\n};\r\n","import axios from 'axios';\r\nimport {notifyInventory} from './gtmdata_wp';\r\n\r\nconst validate = inputControl => {\r\n    if (inputControl) {\r\n        const value = inputControl.value;\r\n        if (inputControl.required && value.length === 0) {\r\n            return false;\r\n        }\r\n        if (inputControl.pattern) {\r\n            return RegExp(inputControl.pattern).test(value);\r\n        }\r\n        return true;\r\n    } else {\r\n        return false;\r\n    }\r\n};\r\n\r\nconst showInventoryNotificationSubscriptionButton = () => {\r\n    let hasAnySoldOutSizes = false;\r\n\r\n    document.querySelectorAll('._jsSizeSelector').forEach(i => {\r\n        if (i.classList.contains('_js-inventory-soldout')) {\r\n            hasAnySoldOutSizes = true;\r\n        }\r\n    });\r\n\r\n    if (!hasAnySoldOutSizes) {\r\n        $('._js-inventory-nofitication-btn-container').hide();\r\n    }\r\n};\r\n\r\nconst postNotificationRequest = (emailAddressInput, selectedSizeInput) => {\r\n    const notificationTriggers = document.querySelectorAll('#inventoryNotification .select-size__trigger');\r\n\r\n    notificationTriggers.forEach(t => {\r\n        t.removeAttribute('style');\r\n    });\r\n\r\n    if (selectedSizeInput && !validate(emailAddressInput)) {\r\n        emailAddressInput.style.borderColor = 'red';\r\n    }\r\n\r\n    if (selectedSizeInput && validate(emailAddressInput)) {\r\n        const inventoryNotification = document.getElementById('inventoryNotification');\r\n        const inventoryNotificationSuccess = document.querySelector('.inventory-notification__success');\r\n        emailAddressInput.removeAttribute('style');\r\n\r\n        const ajax = axios.create({\r\n            headers: {\r\n                'X-Requested-With': 'XMLHttpRequest'\r\n            },\r\n        });\r\n\r\n        const inventoryNotificationData = {\r\n            EmailAddress: emailAddressInput.value,\r\n            SkuCode: selectedSizeInput\r\n        };\r\n\r\n        ajax.post('/publicapi/Inventory/inventoryNotification', inventoryNotificationData)\r\n            .then(response => {\r\n                inventoryNotification.classList.add('is-success');\r\n                inventoryNotificationSuccess.innerHTML = response.data;\r\n                notifyInventory();\r\n            }).catch(response => {\r\n                inventoryNotification.classList.add('is-failure');\r\n                inventoryNotificationSuccess.innerHTML = response.response.data;\r\n            });\r\n    }\r\n};\r\n\r\nconst inventory = () => {\r\n    showInventoryNotificationSubscriptionButton();\r\n    const notificationLabel = document.querySelector('._js-inventory-notification-label');\r\n    const notificationButton = document.querySelector('._js-inventory-notification-btn');\r\n    const notificationButtonContainer = document.querySelector('._js-inventory-nofitication-btn-container');\r\n    const notificationEmail = document.getElementById('notificationemail');\r\n\r\n    // If there are any sizes in reminder modal, show button to toggle modal\r\n    if (notificationLabel && notificationButton) {\r\n        notificationButton.classList.remove('is-hidden');\r\n        notificationButtonContainer.classList.remove('is-hidden');\r\n    }\r\n\r\n    // When hitting enter-key submit form\r\n    if (notificationEmail) {\r\n        notificationEmail.addEventListener('keyup', e => {\r\n            if (e.keyCode === 13) {\r\n                const currentSelectedSize = document.querySelector('.inventory-notification ._jsSizeSelector:checked')[0];\r\n                if (currentSelectedSize) {\r\n                    postNotificationRequest(e.target, currentSelectedSize.value);\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    // Post request to be notified\r\n    document.querySelectorAll('._js-post-inventory-notification').forEach(b => {\r\n        b.addEventListener('click', e => {\r\n            const notificationTriggers = document.querySelectorAll('#inventoryNotification .select-size__trigger');\r\n            const currentSelectedSize = document.querySelector('.inventory-notification ._jsSizeSelector:checked');\r\n            const emailAddress = e.target.previousElementSibling;\r\n            if (currentSelectedSize && emailAddress) {\r\n                postNotificationRequest(emailAddress, currentSelectedSize.value);\r\n            }\r\n            if (!currentSelectedSize){\r\n                notificationTriggers.forEach(t => {\r\n                    t.style.borderColor = 'red';\r\n                });\r\n            }\r\n        });\r\n    });\r\n\r\n    // Reset modal after fail\r\n    document.querySelectorAll('._js-inventory-failbtn').forEach(b => {\r\n        b.addEventListener('click', e => {\r\n            document.getElementById('inventoryNotification').classList.remove('is-failure');\r\n            document.querySelector('.inventory-notification__success').innerHTML = '';\r\n        });\r\n    });\r\n};\r\n\r\n//For Vue component rendering of inventory notification\r\nexport const vueInventory = () => {\r\n    showInventoryNotificationSubscriptionButton();\r\n    const notificationLabel = document.querySelector('._js-inventory-notification-label');\r\n    const notificationButton = document.querySelector('._js-vue-inventory-notification-btn');\r\n    const notificationButtonContainer = document.querySelector('._js-vue-inventory-nofitication-btn-container');\r\n    const notificationEmail = document.getElementById('notificationemail');\r\n\r\n    // If there are any sizes in reminder modal, show button to toggle modal\r\n    if (notificationLabel && notificationButton) {\r\n        notificationButton.classList.remove('is-hidden');\r\n        notificationButtonContainer.classList.remove('is-hidden');\r\n    }\r\n\r\n    // When hitting enter-key submit form\r\n    if (notificationEmail) {\r\n        notificationEmail.addEventListener('keyup', e => {\r\n            if (e.keyCode === 13) {\r\n                const currentSelectedSize = document.querySelector('.inventory-notification ._jsSizeSelector:checked')[0];\r\n                if (currentSelectedSize) {\r\n                    postNotificationRequest(e.target, currentSelectedSize.value);\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    // Post request to be notified\r\n    document.querySelectorAll('._js-post-inventory-notification').forEach(b => {\r\n        b.addEventListener('click', e => {\r\n            const notificationTriggers = document.querySelectorAll('#inventoryNotification .select-size__trigger');\r\n            const currentSelectedSize = document.querySelector('.inventory-notification ._jsSizeSelector:checked');\r\n            const emailAddress = e.target.previousElementSibling;\r\n            if (currentSelectedSize && emailAddress) {\r\n                postNotificationRequest(emailAddress, currentSelectedSize.value);\r\n            }\r\n            if (!currentSelectedSize){\r\n                notificationTriggers.forEach(t => {\r\n                    t.style.borderColor = 'red';\r\n                });\r\n            }\r\n        });\r\n    });\r\n\r\n    // Reset modal after fail\r\n    document.querySelectorAll('._js-inventory-failbtn').forEach(b => {\r\n        b.addEventListener('click', e => {\r\n            document.getElementById('inventoryNotification').classList.remove('is-failure');\r\n            document.querySelector('.inventory-notification__success').innerHTML = '';\r\n        });\r\n    });\r\n};\r\n\r\nexport const init = () => {\r\n    inventory();\r\n};\r\n","import axios from 'axios';\r\n\r\nconst ajax = axios.create({\r\n    headers: {\r\n        'X-Requested-With': 'XMLHttpRequest',\r\n    },\r\n});\r\n\r\nconst getProducts = (): number[] => {\r\n    const ids: number[] = [];\r\n    document.querySelectorAll('._js-product-variation').forEach((p) => {\r\n        const variationId = (p as HTMLElement).dataset.variationId;\r\n        if (variationId) {\r\n            ids.push(parseInt(variationId));\r\n        }\r\n    });\r\n    return ids;\r\n};\r\n\r\nconst markFavorites = (ids: number[]): void => {\r\n    ids.forEach(id => {\r\n        const product = document.querySelector(`[data-variation-id=\"${id}\"]`) as HTMLElement | null;\r\n        product?.classList.add('is-loved');\r\n        const teaser = document.querySelector(`[data-variation-id=\"${id}\"] .teaser-product__lovebutton`) as HTMLElement | null;\r\n        if (teaser) {\r\n            const loveButton = teaser.querySelector('._js-love')  as HTMLElement | null;\r\n            loveButton?.classList.add('is-loved');\r\n        }\r\n    });\r\n};\r\n\r\nconst filterArrays = (favorites: number[]): void => {\r\n    const productsOnPage = getProducts();\r\n    const hits = productsOnPage.filter((p) => favorites.includes(p));\r\n    markFavorites(hits);\r\n};\r\n\r\nconst getFavorites = (): void => {\r\n    ajax.get<number[]>('/cart/GetFavorites').then(response => {\r\n        filterArrays(response.data);\r\n    });\r\n};\r\n\r\nconst toggleFavorite = (element: HTMLElement): void => {\r\n    const productCode = element.dataset.productcode;\r\n    if (productCode) {\r\n        ajax.post('/cart/ToggleFavorite',\r\n            {\r\n                productCode: productCode\r\n            }).then(() => {\r\n            element.classList.contains('is-loved') ? element.classList.remove('is-loved') : element.classList.add('is-loved');\r\n            updateFavoritesCount();\r\n        });\r\n    }\r\n};\r\n\r\nconst addToFavoritesBegin = (): void => {\r\n    const favoriteCart = document.querySelector('._js-favoritecart') as HTMLElement | null;\r\n    favoriteCart?.classList.add('is-animating');\r\n};\r\n\r\nconst updateFavoritesCount = (): void => {\r\n    const favoriteCart = document.querySelector('._js-favoritecart') as HTMLElement | null;\r\n    if (!favoriteCart) {\r\n        return;\r\n    }\r\n    ajax.get('/cart/GetFavoritesCount').then(response => {\r\n        addToFavoritesBegin();\r\n        const miniCartAmount = favoriteCart?.querySelector('._js-minicart-amount') as HTMLElement | null;\r\n        if (miniCartAmount) {\r\n            miniCartAmount.innerHTML = response.data\r\n            ? response.data.toString()\r\n            : \"\";\r\n        }\r\n    });\r\n};\r\n\r\nconst favorite = (): void => {\r\n    if (getProducts().length > 0) {\r\n        getFavorites();\r\n    }\r\n\r\n    const favoriteToggles = document.querySelectorAll('._jsloveContainer, ._js-love');\r\n\r\n    if (favoriteToggles && favoriteToggles.length > 0) {\r\n        favoriteToggles.forEach(toggle => {\r\n            toggle.addEventListener('click', () => {\r\n                toggleFavorite(toggle as HTMLElement);\r\n            });\r\n        });\r\n    }\r\n};\r\n\r\nexport const initFavorites = (): void => {\r\n    favorite();\r\n};\r\n\r\nexport const updateFavorites = (): void => {\r\n    updateFavoritesCount();\r\n};\r\n","const filter = () => {\r\n    document.querySelectorAll('._js-filter-trigger').forEach(trigger => {\r\n        const uniqueID = `f${Math.round(new Date().getTime() + (Math.random() * 100))}`;\r\n        trigger.classList.remove('is-active');\r\n        trigger.nextElementSibling.id = uniqueID;\r\n        trigger.setAttribute('role',  'button');\r\n        trigger.setAttribute('aria-controls', uniqueID);\r\n        trigger.setAttribute('expanded', 'false');\r\n        // Remove tabindex on hidden content controlled by trigger\r\n        const content = document.querySelector(`#${uniqueID}`);\r\n        content.querySelectorAll('button, input, a').forEach(c => {\r\n            c.setAttribute('tabindex', '-1');\r\n        });\r\n\r\n        trigger.addEventListener('click', e => {\r\n            e.preventDefault();\r\n            const target = e.target;\r\n            const categoryElement = target.closest('._js-filter-category');\r\n\r\n            Array.from(categoryElement.parentElement.children).forEach(c => {\r\n                //remove expanded from siblings\r\n                if (categoryElement !== c) {\r\n                    c.classList.remove('is-expanded');\r\n                    //Remove aria expanded from collapsed filter button\r\n                    const button = c.querySelector('._js-filter-trigger');\r\n\r\n                    if (button) {\r\n                        button.setAttribute('aria-expanded', 'false');\r\n                    }\r\n                }\r\n            });\r\n\r\n            //toggle expanded on itself\r\n            categoryElement.classList.toggle('is-expanded');\r\n\r\n            // Aria expand current\r\n            trigger.setAttribute('aria-expanded', 'true');\r\n        });\r\n    });\r\n\r\n    //mobile filters\r\n    let toggledFilter = false;\r\n    document.querySelectorAll('._js-filter-mobile-toggler').forEach(trigger => {\r\n        trigger.addEventListener('click', e => {\r\n            e.preventDefault();\r\n            toggledFilter = !toggledFilter;\r\n            trigger.setAttribute('aria-expanded', toggledFilter);\r\n\r\n            document.getElementById(trigger.dataset.togglewhat).classList.toggle('is-active');\r\n        });\r\n    });\r\n\r\n    //Move sort on mobile\r\n    // Move breadcumb when necessary\r\n    const mq = window.matchMedia('(max-width: 47.9375em)');//max-width 767\r\n    if (mq.matches) {\r\n        const source = document.getElementById('productFilter');\r\n        const target = document.getElementById('mobileFiltertarget');\r\n\r\n        if (source && target) {\r\n            target.insertAdjacentElement('beforeend', source);\r\n        }\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    filter();\r\n};\r\n","const forms = () => {\r\n    document.querySelectorAll('input select textarea').forEach(i => {\r\n        i.addEventListener('blur', e => {\r\n            e.target.classList.add('_js-input-touched');\r\n        });\r\n    });\r\n\r\n    document.querySelectorAll(':required').forEach(requiredElement => {\r\n        const label = document.querySelector(`label[for=\"${requiredElement.id}\"]`) || requiredElement.closest('label');\r\n        if (label) {\r\n            label.classList.add('is-required');\r\n        }\r\n    });\r\n\r\n    // Submit different form\r\n    document.querySelectorAll('._js-submit-other').forEach(trigger => {\r\n        trigger.addEventListener('click', e => {\r\n            e.preventDefault();\r\n\r\n            const targetFormId = trigger.dataset.targetForm;\r\n            const targetForm = document.getElementById(targetFormId);\r\n\r\n            if (targetForm) {\r\n                targetForm.submit();\r\n            }\r\n        });\r\n    });\r\n\r\n    //Submit forms on radio change (ie search page)\r\n    document.querySelectorAll('._js-submit-form').forEach(trigger => {\r\n        trigger.addEventListener('change', e => {\r\n            e.target.closest('form').submit();\r\n        });\r\n    });\r\n\r\n    setupDeliveryMoreChoices();\r\n\r\n    // Show password - refactor when needed\r\n    //$('._js-show-password-toggle').on(\"click\", function () {\r\n    //    var input = $(this).parent().siblings(\"._js-show-password-input\")[0];\r\n    //    if ($(input).is(\":password\")) {\r\n    //        $(input).attr(\"type\", \"text\");\r\n    //    } else if ($(input).is(\":text\")) {\r\n    //        $(input).attr(\"type\", \"password\");\r\n    //    }\r\n    //});\r\n};\r\n\r\nconst setupDeliveryMoreChoices = () => {\r\n    const deliveryMoreChoicesContainer = document.querySelector('._js-delivery-more-choices');\r\n    if (!deliveryMoreChoicesContainer) return;\r\n\r\n    const inputPostalCode = deliveryMoreChoicesContainer.querySelector('#pickupPointPostalCode');\r\n    const inputCity = deliveryMoreChoicesContainer.querySelector('#pickupPointCity');\r\n    const submitButton = deliveryMoreChoicesContainer.querySelector('button');\r\n    const feedback = deliveryMoreChoicesContainer.querySelector('#delivery-point-feedback');\r\n\r\n    if (!inputPostalCode || !inputCity || !feedback) return;\r\n\r\n    submitButton.addEventListener('click', (e) => {\r\n        if (!inputPostalCode.value || !inputCity.value) {\r\n            e.preventDefault();\r\n            feedback.classList.add('delivery-point__feedback--visible');\r\n        }\r\n    });\r\n\r\n    submitButton.addEventListener('focus', e => {\r\n        if (inputPostalCode.value && inputCity.value) {\r\n            e.preventDefault();\r\n            submitButton.setAttribute('type', 'submit');\r\n        }\r\n    });\r\n\r\n    submitButton.addEventListener('blur', e => {\r\n        submitButton.setAttribute('type', 'button');\r\n    });\r\n};\r\n\r\nexport const initForms = () => {\r\n    forms();\r\n};\r\n","const trackPageView = (pathRoot, virtualPath) => {\r\n    const trackData = {\r\n        'event': 'pageVirtual', // GTM Event Trigger\r\n        'pageVirtual': pathRoot + virtualPath // Virtuell URL\r\n    };\r\n    if (window.dataLayer) {\r\n        window.dataLayer.push(trackData);\r\n    }\r\n};\r\n\r\nconst trackEvent = (pathRoot, virtualPath, action, label) => {\r\n    const trackData = {\r\n        'event': 'jeansguide', // GTM Event Trigger\r\n        'eventCategory': 'Jeans Guide',\r\n        'eventAction': action,\r\n        'eventLabel': label,\r\n        'pageVirtual': pathRoot + virtualPath\r\n    };\r\n    dataLayer.push(trackData);\r\n};\r\n\r\nconst labelSelector = el => {\r\n    const label = document.querySelector('input[name=' + el + ']:checked');\r\n    if (label) {\r\n        return label.dataset.label;\r\n    }\r\n};\r\n\r\nconst trackSlideChange = (el, resultObject) => {\r\n    let pathRoot = window.location.pathname;\r\n    if (!pathRoot.endsWith('/')) {\r\n        pathRoot += '/';\r\n    }\r\n\r\n    if (el === 2) {\r\n        trackPageView(pathRoot, 'storrelse');\r\n    } else if (el === 3) {\r\n        trackEvent(\r\n            pathRoot,\r\n            'storrelse',\r\n            'Størrelse',\r\n            `Livvidde; ${labelSelector('step2a')}|Lengde: ${labelSelector('step2b')}`\r\n        );\r\n        trackPageView(pathRoot, 'passform-lar');\r\n    } else if (el === 4) {\r\n        trackEvent(\r\n            pathRoot,\r\n            'passform-lar',\r\n            'Passform lår',\r\n            `Mine lår er: ${labelSelector('step3a')}|Jeg liker jeansen ved låret: ${labelSelector('step3b')}`\r\n        );\r\n        trackPageView(pathRoot, 'passform-legger');\r\n    } else if (el === 5) {\r\n        trackEvent(\r\n            pathRoot,\r\n            'passform-legger',\r\n            'Passform legger',\r\n            `Mine legger er: ${labelSelector('step4a')}|Jeg liker jeansen ved leggen: ${labelSelector('step4b')}`\r\n        );\r\n        trackPageView(pathRoot, 'fullfort');\r\n        trackEvent(\r\n            pathRoot,\r\n            'fullfort',\r\n            'Fullført',\r\n            `${resultObject.name}:${resultObject.waist}|${resultObject.top.fit}|${resultObject.bottom.fit}`\r\n        );\r\n    } else if (el === 1337) {\r\n        trackEvent(\r\n            pathRoot,\r\n            'fullfort',\r\n            'Fullført',\r\n            `${resultObject.name}:${resultObject.waist}|${resultObject.top.fit}|${resultObject.bottom.fit}`\r\n        );\r\n    }\r\n};\r\n\r\nconst changeSlide = step => {\r\n    const results = document.querySelector('._js-jeansguide-results');\r\n    if (step == 1 || step == 2 && results) {\r\n        results.classList.remove('is-filtered');\r\n    }\r\n    document.querySelectorAll('._js-jeansguide-step').forEach(s => {\r\n        if (s.dataset.step != step) {\r\n            s.classList.remove('is-active');\r\n            s.setAttribute('aria-expanded', 'false');\r\n        } else {\r\n            s.classList.add('is-active');\r\n            s.setAttribute('aria-expanded', 'true');\r\n        }\r\n    });\r\n\r\n    trackSlideChange(step);\r\n};\r\n\r\nconst selector = el => document.querySelector(`input[name=\"${el}\"]:checked`).value;\r\n\r\n// Filter list v 2.0\r\n// Used to find correct row or col number in size table\r\nconst findColumnOrRow = me => {\r\n    if (me === 'thin') {\r\n        return {\r\n            'columns': [0, 1, 2]\r\n        };\r\n    }\r\n    if (me === 'medium') {\r\n        return {\r\n            'columns': [3, 4, 5]\r\n        };\r\n    }\r\n    if (me === 'wide') {\r\n        return {\r\n            'columns': [6, 7, 8]\r\n        };\r\n    }\r\n};\r\n\r\n// Log result in top\r\nconst logResult = currentArray => {\r\n    document.querySelectorAll('.jeansguide__final-result__item').forEach(el => {\r\n        el.remove();\r\n    });\r\n\r\n    for (var i = 0; i < currentArray.length; i++) {\r\n        const obj = currentArray[i];\r\n        const result = '<div class=\\'jeansguide__final-result__item\\'><img src=\\'' + obj.img + '\\' /><h3 class=\\'h3\\'>' + obj.name + '</h3><p class=\\'u-text-center\\'>' + obj.waist + '<br>' + obj.top.fit + '<br>' + obj.bottom.fit + '</p></div>';\r\n        document.querySelector('._js-jeansguide-final-result').insertAdjacentHTML('beforeend', result);\r\n        trackSlideChange(1337, obj);\r\n    }\r\n};\r\n\r\nconst displayElement  = currentArray => {\r\n    for (var i = 0; i < currentArray.length; i++) {\r\n        const obj = currentArray[i];\r\n        for (var e = 0; e < obj.sku.length; e++) {\r\n            document.querySelectorAll(`[data-productid=\"${obj.sku[e]}\"]`).forEach(el => {\r\n                el.classList.add('foundyou');\r\n            });\r\n        }\r\n    }\r\n};\r\n\r\nconst filterJeansList2D = step => {\r\n    if (window.jeansjson) {\r\n        // Clear results\r\n        document.querySelectorAll('[data-productid]').forEach(p => {\r\n            p.classList.remove('foundyou');\r\n        });\r\n\r\n        // Filter only on step 2\r\n        if (step > 2) {\r\n            document.querySelectorAll('._js-jeansguide-results').forEach(el => {\r\n                el.classList.add('is-filtered');\r\n            });\r\n        }\r\n\r\n        // Input from user\r\n        const tMe = selector('step3a');\r\n        const tJeans = selector('step3b');\r\n        const bMe = selector('step4a');\r\n        const bJeans = selector('step4b');\r\n\r\n        // Find my row-/colspan\r\n        const rowArray = findColumnOrRow(bMe);\r\n        const colArray = findColumnOrRow(tMe);\r\n\r\n        // Find correct row/col\r\n        const rowNumber = rowArray.columns[bJeans];\r\n        const colNumber = colArray.columns[tJeans];\r\n\r\n        // Look up in correct \"tablecell\"\r\n        const hit = window.jeansjson[0].table[rowNumber][colNumber];\r\n\r\n        // All pants in array\r\n        const pantsArray = window.jeansjson[0].pants;\r\n\r\n        // Filter ids from pant array\r\n        const filteredPants = pantsArray.filter(item => {\r\n            if (item.id == hit[0] || item.id == hit[1]) {\r\n                return item;\r\n            }\r\n        });\r\n\r\n        // Helper\r\n        console.log('Rad:', rowNumber, 'Kolonne:', colNumber, 'Resultat:', hit[0], hit[1]);\r\n\r\n        // Do stuff with divs\r\n        logResult(filteredPants);\r\n        displayElement(filteredPants);\r\n    }\r\n};\r\n\r\nconst jeansguide = () => {\r\n    document.querySelectorAll('.result .teaser-product').forEach(t => {\r\n        const prodId = t.dataset.productid;\r\n        const result = t.closest('.result');\r\n        if (result && prodId) {\r\n            result.dataset.productid = prodId;\r\n        }\r\n    });\r\n\r\n    document.querySelectorAll('._js-jeansguide-button-start').forEach(b => {\r\n        b.addEventListener('click', e => {\r\n            changeSlide(e.target.dataset.stepAction);\r\n        });\r\n    });\r\n\r\n    document.querySelectorAll('._js-jeansguide-button-prev').forEach(el => {\r\n        el.addEventListener('click', e => {\r\n            document.querySelectorAll('.jeansguide__final-result__item').forEach(e => {\r\n                e.remove();\r\n            });\r\n            changeSlide(e.target.dataset.stepAction);\r\n        });\r\n    });\r\n\r\n    document.querySelectorAll('._js-jeansguide-button').forEach(b => {\r\n        b.addEventListener('click', e => {\r\n            const target = e.target;\r\n            const targetSlide = target.dataset.stepAction;\r\n            const stepContent = target.closest('.jeansguide__step__content');\r\n\r\n            if (stepContent) {\r\n                const fieldsetInvalid = stepContent.querySelectorAll('input:invalid');\r\n                const fieldsetValid = stepContent.querySelectorAll('input');\r\n\r\n                if (fieldsetInvalid.length == 0) {\r\n                    fieldsetValid.forEach(el => {\r\n                        el.classList.remove('invalid');\r\n                    });\r\n\r\n                    changeSlide(targetSlide);\r\n\r\n                    if (targetSlide == 5) {\r\n                        filterJeansList2D(targetSlide);\r\n                    }\r\n                } else {\r\n                    fieldsetInvalid.forEach(el => {\r\n                        el.classList.add('invalid');\r\n                    });\r\n                }\r\n            }\r\n        });\r\n    });\r\n};\r\n\r\nexport const init = () => {\r\n    jeansguide();\r\n};\r\n","const toggleElement = (isToggled: boolean, element: HTMLElement) => {\r\n    element.setAttribute('aria-expanded', isToggled.toString());\r\n    element.classList.toggle('is-active');\r\n    const elementToToggle = document.getElementById(element.dataset.togglewhat as string);\r\n\r\n    if (elementToToggle) {\r\n        elementToToggle.classList.toggle('is-active');\r\n        elementToToggle.querySelectorAll<HTMLElement>('button, input, a').forEach(el => {\r\n            el.setAttribute('tabindex', `${isToggled ? '0' : '-1'}`);\r\n        });\r\n\r\n        elementToToggle.focus();\r\n\r\n        elementToToggle.dispatchEvent(\r\n            new CustomEvent('elementToggled')\r\n        );\r\n    }\r\n\r\n    //Ugly edgecases, but the modals rely on stackcontext being the same as the headers. Remove sticky from productdetails when modals open, add it when closing. \r\n    //Find a better solution for this later, this is a quick fix.\r\n    if(element.dataset.togglewhat === 'storeInventory') {\r\n        document.getElementById('product-details')?.classList.toggle('sticky');\r\n    }\r\n    if(element.dataset.togglewhat === 'sizeguide') {\r\n        document.getElementById('product-details')?.classList.toggle('sticky');\r\n    }\r\n    if(element.dataset.togglewhat === 'inventoryNotification') {\r\n        document.getElementById('product-details')?.classList.toggle('sticky');\r\n    }\r\n};\r\n\r\nconst toggler = () => {\r\n    let isToggled = false;\r\n\r\n    document.querySelectorAll<HTMLElement>('._js-generic-toggler').forEach(trigger => {\r\n        const controlsWhat = trigger.dataset.togglewhat as string;\r\n\r\n        trigger.setAttribute('aria-controls', controlsWhat);\r\n        trigger.setAttribute('aria-expanded', 'true');\r\n\r\n        // Remove tabindex on hidden content controlled by trigger\r\n        const controlsElement = document.getElementById(controlsWhat);\r\n        if (controlsElement) {\r\n            controlsElement.querySelectorAll<HTMLElement>('button, input, a').forEach(el => {\r\n                el.setAttribute('tabindex', '-1');\r\n            });\r\n        }\r\n\r\n        trigger.addEventListener('click', (e: Event) => {\r\n            if ((e.currentTarget as HTMLElement).nodeName !== 'INPUT') {\r\n                e.preventDefault();\r\n            }\r\n            isToggled = !isToggled;\r\n            //Use currentTarget to find the the element that fired the event.\r\n            //If there is a button with an svg inside e.target could be the svg,\r\n            //we want the button element\r\n            toggleElement(isToggled, e.currentTarget as HTMLElement);\r\n        });\r\n    });\r\n\r\n    //Needs to use triggerNested if elemtn is inside another toggler\r\n    let toggledNested = false;\r\n    document.querySelectorAll<HTMLElement>('._js-generic-toggler-nested').forEach(el => {\r\n        el.addEventListener('click', (e: Event) => {\r\n            e.preventDefault();\r\n            toggledNested = !toggledNested;\r\n            //Use currentTarget to find the the element that fired the event.\r\n            //If there is a button with an svg inside e.target could be the svg,\r\n            //we want the button element\r\n            toggleElement(toggledNested, e.currentTarget as HTMLElement);\r\n        });\r\n    });\r\n};\r\n\r\nexport const vueComponentToggler = () => {\r\n    let isToggled = false;\r\n\r\n    document.querySelectorAll<HTMLElement>('._js-vue-component-toggler').forEach(trigger => {\r\n        const controlsWhat = trigger.dataset.togglewhat as string;\r\n\r\n        trigger.setAttribute('aria-controls', controlsWhat);\r\n        trigger.setAttribute('aria-expanded', 'true');\r\n\r\n        // Remove tabindex on hidden content controlled by trigger\r\n        const controlsElement = document.getElementById(controlsWhat);\r\n        if (controlsElement) {\r\n            controlsElement.querySelectorAll<HTMLElement>('button, input, a').forEach(el => {\r\n                el.setAttribute('tabindex', '-1');\r\n            });\r\n        }\r\n\r\n        trigger.addEventListener('click', e => {\r\n            if (trigger.nodeName !== 'INPUT') {\r\n                e.preventDefault();\r\n            }\r\n            isToggled = !isToggled;\r\n            //Use currentTarget to find the the element that fired the event.\r\n            //If there is a button with an svg inside e.target could be the svg,\r\n            //we want the button element\r\n            toggleElement(isToggled, e.currentTarget as HTMLElement);\r\n        });\r\n    });\r\n};\r\n\r\nexport const initToggle = () => {\r\n    toggler();\r\n};\r\n\r\nexport const closeOpenElement = (element: HTMLElement): void => {\r\n    toggleElement(true, element);\r\n};\r\n","export default class DeleteProfile {\r\n    private DELETE_ENDPOINT = '/min-side/DeleteProfile';\r\n\r\n    private form: HTMLElement;\r\n    private submitTrigger: HTMLElement | null;\r\n    private feedbackSuccess: HTMLElement | null;\r\n    private feedbackError: HTMLElement | null;\r\n    private profileData: HTMLFormElement | null;\r\n\r\n    constructor(element) {\r\n        this.form = element;\r\n        this.submitTrigger = this.form.querySelector('input[type=\"submit\"]');\r\n        this.feedbackSuccess = this.form.querySelector('.feedback--success');\r\n        this.feedbackError = this.form.querySelector('.feedback--error');\r\n        this.profileData = document.querySelector('._js-mypage-profile');\r\n        this.init();\r\n    }\r\n\r\n    init = () => {\r\n        this.initSubmit();\r\n    };\r\n\r\n    private initSubmit = () => {\r\n        if (!this.submitTrigger) return;\r\n\r\n        this.form.addEventListener('submit', (e) => {\r\n            e.preventDefault();\r\n            this.handleSubmit();\r\n        });\r\n    };\r\n\r\n    private handleSubmit = () => {\r\n        this.updateDetailsBegin();\r\n        const success = this.requestDeletion();\r\n        this.updateDetailsComplete(success);\r\n    };\r\n\r\n    private requestDeletion = async() => {\r\n        if (!this.profileData) return;\r\n        \r\n        const formData = new FormData(this.profileData);\r\n        if (!formData) return;\r\n\r\n        const request = new Request(this.DELETE_ENDPOINT, {\r\n            method: 'POST',\r\n            body: formData\r\n        });\r\n\r\n        try {\r\n            const res = await fetch(request);\r\n            return res.ok;\r\n        } catch (error) {\r\n            return false;\r\n        }\r\n    };\r\n\r\n    private updateDetailsBegin = () => {\r\n        this.submitTrigger?.setAttribute('disabled', 'true');\r\n        this.feedbackError?.classList.remove('delete-profile__feedback--visible');\r\n        this.feedbackSuccess?.classList.remove('delete-profile__feedback--visible');\r\n    };\r\n\r\n    private updateDetailsComplete = (success) => {\r\n        this.submitTrigger?.removeAttribute('disabled');    \r\n\r\n        if (success && !this.feedbackSuccess?.classList.contains('delete-profile__feedback--visible')) {\r\n            this.feedbackSuccess?.classList.add('delete-profile__feedback--visible');\r\n            return;\r\n        }\r\n\r\n        if (!this.feedbackError?.classList.contains('delete-profile__feedback--visible')) this.feedbackError?.classList.add('delete-profile__feedback--visible');\r\n    };\r\n}\r\n","export default class ResetPassword {\r\n    private RESET_PASSWORD_ENDPOINT = '/Login/ResetPassword';\r\n\r\n    private form: HTMLElement;\r\n    private submitTrigger: HTMLElement | null;\r\n    private feedbackSuccess: HTMLElement | null;\r\n    private feedbackError: HTMLElement | null;\r\n    private profileData: HTMLFormElement | null;\r\n    private email: string | undefined;\r\n\r\n    constructor(element) {\r\n        this.form = element;\r\n        this.email = this.form.dataset.email;\r\n        this.submitTrigger = this.form.querySelector('input[type=\"submit\"]');\r\n        this.feedbackSuccess = this.form.querySelector('.feedback--success');\r\n        this.feedbackError = this.form.querySelector('.feedback--error');\r\n        this.profileData = document.querySelector(\r\n            '._js-mypage-profile'\r\n        ) as HTMLFormElement;\r\n\r\n        this.init();\r\n    }\r\n\r\n    init = () => {\r\n        this.initSubmit();\r\n    };\r\n\r\n    private initSubmit = () => {\r\n        this.form?.addEventListener('submit', async (e) => {\r\n            e.preventDefault();\r\n            this.resetPasswordBegin();\r\n            const success = await this.resetPassword();\r\n            this.resetPasswordComplete(success);\r\n        });\r\n        return;\r\n    };\r\n\r\n    private resetPassword = async () => {\r\n        if (!this.profileData || !this.email) return false;\r\n\r\n        const body = new FormData();\r\n        body.append('email', this.email);\r\n\r\n        try {\r\n            const res = await fetch(this.RESET_PASSWORD_ENDPOINT, {\r\n                method: 'POST',\r\n                body: body,\r\n            });\r\n            return res.ok;\r\n        } catch (error) {\r\n            return false;\r\n        }\r\n    };\r\n\r\n    private resetPasswordBegin = () => {\r\n        this.submitTrigger?.setAttribute('disabled', 'true');\r\n        this.feedbackError?.classList.remove(\r\n            'reset-password__feedback--visible'\r\n        );\r\n        this.feedbackSuccess?.classList.remove(\r\n            'reset-password__feedback--visible'\r\n        );\r\n    };\r\n\r\n    private resetPasswordComplete = (success) => {\r\n        this.submitTrigger?.removeAttribute('disabled');\r\n\r\n        if (success && !this.feedbackSuccess?.classList.contains('reset-password__feedback--visible')) {\r\n            this.feedbackSuccess?.classList.add('reset-password__feedback--visible');\r\n            return;\r\n        }\r\n\r\n        if (!this.feedbackError?.classList.contains('reset-password__feedback--visible')) {\r\n            this.feedbackError?.classList.add('reset-password__feedback--visible');\r\n        }\r\n    };\r\n}\r\n","export default class ChangeLoyaltyEmail {\r\n    private UPDATE_LOYALTY_CLUB_EMAIL_ENDPOINT = '/min-side/UpdateLoyaltyClubEmail';\r\n\r\n    private form: HTMLElement;\r\n    private submitTrigger: HTMLElement | null;\r\n    private feedbackSuccess: HTMLElement | null;\r\n    private feedbackErrorGeneric: HTMLElement | null;\r\n    private feedbackInUse: HTMLElement | null;\r\n    private emailInput: HTMLInputElement | null;\r\n\r\n    constructor(element) {\r\n        this.form = element;\r\n        this.emailInput = this.form.querySelector('[type=\"email\"]');\r\n        this.submitTrigger = this.form.querySelector('input[type=\"submit\"]');\r\n        this.feedbackSuccess = this.form.querySelector('.change-loyalty-email__feedback--success');\r\n        this.feedbackInUse = this.form.querySelector('.change-loyalty-email__feedback--error-in-use');\r\n        this.feedbackErrorGeneric = this.form.querySelector('.change-loyalty-email__feedback--error-generic');\r\n\r\n        this.init();\r\n    }\r\n\r\n    init = () => {\r\n        this.initSubmit();\r\n    };\r\n\r\n    private initSubmit = () => {\r\n        this.form?.addEventListener('submit', async (e) => {\r\n            e.preventDefault();\r\n            this.ChangeLoyaltyEmailBegin();\r\n            const res = await this.ChangeLoyaltyEmail();\r\n            this.ChangeLoyaltyEmailComplete(res);\r\n        });\r\n        return;\r\n    };\r\n\r\n    private ChangeLoyaltyEmail = async () => {\r\n        if (!this.emailInput?.value) return false;\r\n\r\n        const body = new FormData();\r\n        body.append('email', this.emailInput.value);\r\n\r\n        try {\r\n            const res = await fetch(this.UPDATE_LOYALTY_CLUB_EMAIL_ENDPOINT, {\r\n                method: 'POST',\r\n                body: body,\r\n            });\r\n            return res;\r\n        } catch (error) {\r\n            return false;\r\n        }\r\n    };\r\n\r\n    private ChangeLoyaltyEmailBegin = () => {\r\n        this.submitTrigger?.setAttribute('disabled', 'true');\r\n\r\n        this.feedbackErrorGeneric?.classList.remove(\r\n            'change-loyalty-email__feedback--visible'\r\n        );\r\n\r\n        this.feedbackSuccess?.classList.remove(\r\n            'change-loyalty-email__feedback--visible'\r\n        );\r\n\r\n        this.feedbackInUse?.classList.remove(\r\n            'change-loyalty-email__feedback--visible'\r\n        );\r\n    };\r\n\r\n    private ChangeLoyaltyEmailComplete = (response) => {\r\n        this.submitTrigger?.removeAttribute('disabled');\r\n\r\n        if (response.status === 200 && !this.feedbackSuccess?.classList.contains('change-loyalty-email__feedback--visible')) {\r\n            this.feedbackSuccess?.classList.add('change-loyalty-email__feedback--visible');\r\n            return;\r\n        }\r\n\r\n        if (response.status === 409 && !this.feedbackInUse?.classList.contains('change-loyalty-email__feedback--visible')) {\r\n            this.feedbackInUse?.classList.add('change-loyalty-email__feedback--visible');\r\n            return;\r\n        }\r\n\r\n        if (!this.feedbackErrorGeneric?.classList.contains('reset-password__feedback--visible')) {\r\n            this.feedbackErrorGeneric?.classList.add('change-loyalty-email__feedback--visible');\r\n        }\r\n    };\r\n}\r\n","export default class EditProfile {\r\n    private SAVE_PROFILE_DATA_ENDPOINT = '/min-side/SaveProfileData';\r\n\r\n    private form: HTMLFormElement | null;\r\n    private fieldset: HTMLElement | null;\r\n    private saveButton: HTMLElement | null;\r\n    private status: HTMLElement | null;\r\n\r\n    constructor(element) {\r\n        this.form = element;\r\n        this.fieldset = element.querySelector('._js-mypage-profile fieldset');\r\n        this.saveButton = element.querySelector('._js-btn-mypage-save');\r\n        this.status = element.querySelector('._js-mypage-save-status');\r\n        this.initSubmit();\r\n    }\r\n\r\n    init = () => {\r\n        this.initSubmit();\r\n    };\r\n\r\n    private initSubmit = () => {\r\n        this.form?.addEventListener('submit', async (e) => {\r\n            e.preventDefault();\r\n\r\n            const success = await this.saveData();\r\n            if (success) this.updatedetailsSuccess();\r\n            this.updatedetailsComplete();\r\n        });\r\n        return;\r\n    };\r\n\r\n    private saveData = async () => {\r\n        if (!this.form) return;\r\n\r\n        const body = new FormData(this.form);\r\n        this.updatedetailsBegin();\r\n\r\n        try {\r\n            const res = await fetch(this.SAVE_PROFILE_DATA_ENDPOINT, {\r\n                method: 'POST',\r\n                body: body,\r\n            });\r\n            return res.ok;\r\n        } catch (error) {\r\n            return false;\r\n        }\r\n    };\r\n\r\n    private updatedetailsBegin = () => {\r\n        this.fieldset?.setAttribute('disabled', 'disabled');\r\n        this.saveButton?.classList.add('is-animating');\r\n        this.saveButton?.setAttribute('disabled', 'disabled');\r\n    };\r\n\r\n    private updatedetailsComplete = () => {\r\n        this.fieldset?.removeAttribute('disabled');\r\n        this.saveButton?.classList.remove('is-animating');\r\n        this.saveButton?.removeAttribute('disabled');\r\n    };\r\n\r\n    private updatedetailsSuccess = () => {\r\n        if (!this.status) return;\r\n\r\n        this.status.style.display = 'block';\r\n\r\n        setTimeout(() => {\r\n            if (this.status) this.status.style.display = 'none';\r\n        }, 4000);\r\n    };\r\n}\r\n","//Global functions only accessed by razor views.\r\nimport Mount from '../../helpers/mount';\r\nimport DeleteProfile from '../../global/modules/mypage_delete_profile';\r\nimport ResetPassword from '../../global/modules/mypage_reset_password';\r\nimport ChangeLoyaltyEmail from '../../global/modules/mypage_change_loyalty_email';\r\nimport EditProfile from '../../global/modules/mypage_edit_profile';\r\n\r\n//TODO: Rewrite to class, rewrite to eventlisteners, remove from global object, remove Ajax form on mypage\r\nexport const myPageFunctions = {\r\n    // Loyalty club consents\r\n    updateconsentsBegin: (): void =>  {\r\n        document.querySelector('._js-consents')?.setAttribute('disabled', 'disabled');\r\n        const consentSave = document.querySelector('._js-btn-consents-save') as HTMLElement;\r\n        consentSave?.classList.add('is-animating');\r\n        consentSave?.setAttribute('disabled', 'disabled');\r\n    },\r\n    updateconsentsSuccess: (): void => {\r\n        const consentSave = document.querySelector('._js-btn-consents-save') as HTMLElement;\r\n        consentSave?.classList.remove('is-animating');\r\n        consentSave?.removeAttribute('disabled');\r\n    },\r\n    updateconsentsComplete: (): void => {\r\n        const saveStatus = document.querySelector('._js-consents-save-status') as HTMLElement;\r\n        saveStatus.style.display = 'block';\r\n        setTimeout(() => {\r\n            saveStatus.style.display = 'none';\r\n        }, 4000);\r\n        handleConsentForm();\r\n    },\r\n    navToLoyalty: () => {\r\n        handleConsentForm();\r\n    }\r\n};\r\n\r\nconst handleConsentForm = (): void => {\r\n    //Get all required fields\r\n    const emailConsent = document.getElementById('EmailConsent') as HTMLInputElement | null;;\r\n    const smsConsent = document.getElementById('SmsConsent') as HTMLInputElement | null;;\r\n    if (!emailConsent || !smsConsent) return;\r\n    emailConsent.addEventListener('input', (e) => {\r\n        checkSelections(e.target as HTMLInputElement, smsConsent);\r\n    });\r\n    smsConsent.addEventListener('input', (e) => {\r\n        checkSelections(e.target as HTMLInputElement, emailConsent);\r\n    });\r\n    checkSelections(emailConsent, smsConsent);\r\n};\r\n\r\nconst checkSelections = (node1: HTMLInputElement, node2: HTMLInputElement) => {\r\n    //If one is selected, disable required on other field.\r\n    //If none is selected, make both required\r\n    node1.checked ? node2.removeAttribute('required') : node2.setAttribute('required', '');\r\n    node2.checked ? node1.removeAttribute('required') : node1.setAttribute('required', '');\r\n};\r\n\r\nexport default class Mypage {\r\n    saveButton: HTMLElement | null = document.querySelector('._js-btn-mypage-save');\r\n    status: HTMLElement | null = document.querySelector('._js-mypage-save-status');\r\n    profileField: HTMLElement | null = document.querySelector('._js-mypage-profile');\r\n\r\n    constructor() {\r\n        this.initMutationObserver();\r\n        handleConsentForm();\r\n    }\r\n\r\n    /**\r\n  * Custom init for modules. Listener required because the viewModel is occasionally rerendered without a page reload through ajax actionlinks.\r\n  */\r\n    initMutationObserver = (): void => {\r\n        const ajaxContent = document.getElementById('ajax-content');\r\n        if (!ajaxContent) return;\r\n\r\n        const observer = new MutationObserver((mutationList, observer) => {\r\n            mutationList.forEach((mutation) => {\r\n                if (mutation.type == 'childList') {\r\n                    Mount('_js-mypage-delete-profile', DeleteProfile);\r\n                    Mount('_js-mypage-reset-password', ResetPassword);\r\n                    Mount('_js-change-loyalty-club-email', ChangeLoyaltyEmail);\r\n                    Mount('_js-mypage-profile', EditProfile);\r\n                }\r\n            });\r\n        });\r\n\r\n        const config = { childList: true, subtree: false };\r\n        observer.observe(ajaxContent, config);\r\n    };\r\n}\r\n","import {getCookie, setCookie} from '../../utils';\r\n\r\nconst popup = () => {\r\n    let $popup = $('[data-popup]'),\r\n        popupCount,\r\n        popupName = $popup.data('popup-name'),\r\n        popupFrequency = Number($popup.data('popup-session-frequency')),\r\n        popupTrigger = $popup.data('popup-trigger'),\r\n        sessionCookieName = popupName,\r\n        sustainedCookieName = popupName + 'Sustained',\r\n        popupCookieVal,\r\n        sustainedPopupCookieVal = getCookie(sustainedCookieName);\r\n\r\n    if (sustainedPopupCookieVal) {\r\n        popupCount = Number(sustainedPopupCookieVal);\r\n    } else {\r\n        popupCount = 0;\r\n    }\r\n\r\n    if (popupTrigger === 'onload') {\r\n        popupCookieVal = getCookie(sessionCookieName);\r\n\r\n        if (popupCookieVal !== 'v' && popupCount < popupFrequency) {\r\n            setCookie(sessionCookieName, 'v', '0.08');//about two hours expiration\r\n            setCookie(sustainedCookieName, popupCount + 1, '60');//lasts two months\r\n            $popup.addClass('is-active');\r\n        } else {\r\n            setCookie(sessionCookieName, 'v', '0.08');//about two hours expiration\r\n        }\r\n    }\r\n\r\n    $popup\r\n        .on('click', function () {\r\n            $popup.removeClass('is-active');\r\n        })\r\n        .on('click', '[data-close-popup]', function () {\r\n            $popup.removeClass('is-active');\r\n        })\r\n        .on('click', '.popup__content', function (event) {\r\n            event.stopPropagation();\r\n        });\r\n};\r\n\r\nexport const init = () => {\r\n    popup();\r\n};\r\n\r\n","/**\r\n * Function to handle event bubbling. Event bubbles up to containing element and triggers event if it hits an element matching the class selector.\r\n * @param {HTMLElement} element - Upper element. Registers events below in DOM, and events will not bubble past this.\r\n * @param {string} eventType - String describing DOM Event type, e.g. 'click'.\r\n * @param {string} className - Class you're looking for\r\n * @param {(e: Event)} handler - Function to be executed on first matching element\r\n */\r\nconst bubbleEvent = (element, eventType, className, handler) => {\r\n    element.addEventListener(\r\n        eventType,\r\n        (e) => {\r\n            //Event bubbling to handle slowloading/hidden link\r\n            for (\r\n                let target = e.target;\r\n                target && target !== element;\r\n                target = target.parentNode\r\n            ) {\r\n                if (target.matches(\".\" + className)) {\r\n                    handler.call(target, e);\r\n                    break;\r\n                }\r\n            }\r\n        },\r\n        false,\r\n    );\r\n};\r\n\r\nexport default bubbleEvent;\r\n","import {scrollToTarget} from '../../utils';\r\nimport bubbleEvent from '../../helpers/event-bubble';\r\n\r\nexport default class Product  {\r\n    constructor(element: HTMLElement){\r\n\r\n        bubbleEvent(element, 'click', 'lipscore-rating-review-link', this.handleLipscoreClick.bind(this));\r\n    \r\n        bubbleEvent(element, 'click', '_js-extended-details-link', this.handleExtendedDetailsClick.bind(this));\r\n    \r\n        // Display \"No reviews\"  if no lipscore-review-content\r\n        window.addEventListener('load', () => {\r\n            setTimeout(() => {\r\n                const reviewContent = Array.from(element.getElementsByClassName('lipscore-review-content'));\r\n                if(reviewContent && reviewContent.length < 1){\r\n                    const noReviewsElement = element.querySelector('._js-lipscore-no-reviews') as HTMLElement;\r\n                    noReviewsElement?.classList.remove('is-hidden');\r\n                } else {\r\n                    const reviewCountElement = element.querySelector('.lipscore-rating-review-count') as HTMLElement;\r\n                    const reviewCount = reviewCountElement?.textContent;\r\n                    const reviewListCount = element.querySelector('._js-lipscore-reviews-number');\r\n                    if(reviewCount && reviewListCount){\r\n                        reviewListCount.textContent = reviewListCount.textContent + ' (' + reviewCount + ')';\r\n                    }\r\n                }\r\n            }, 3000);\r\n        });\r\n\r\n        // If only-choice (one-size) check radiobutton\r\n        let sizes = Array.from(element.getElementsByClassName('_js-select-size--onesize')) as HTMLElement[];\r\n        sizes = sizes.filter(element => !element.firstElementChild?.hasAttribute('disabled'));\r\n        if (sizes.length === 1){\r\n            sizes[0].firstElementChild?.setAttribute('checked', 'checked');\r\n        }\r\n\r\n    }\r\n\r\n    handleLipscoreClick(e: Event): void {\r\n        e.preventDefault();\r\n\r\n        const target = e.target as HTMLElement;\r\n        const lipScoreAccordion = document.getElementById('lipscore-accordion');\r\n        if (lipScoreAccordion && !lipScoreAccordion.hasAttribute('open')) {\r\n            lipScoreAccordion.setAttribute('open', '');\r\n        }\r\n        const id = target.getAttribute('href');\r\n        scrollToTarget(id);\r\n    }\r\n\r\n    handleExtendedDetailsClick(e: Event): void {\r\n        e.preventDefault();\r\n\r\n        const target = e.target as HTMLElement;\r\n        const extendedDetailsAccordion = document.getElementById('extended-details-accordion');\r\n        if (extendedDetailsAccordion && !extendedDetailsAccordion.hasAttribute('open')) {\r\n            extendedDetailsAccordion.setAttribute('open', '');\r\n        }\r\n        const id = target.getAttribute('href');\r\n        scrollToTarget(id);\r\n    }\r\n}\r\n","const promotions = () => {\r\n    // Disable enter key to force user to use submit-promotion button\r\n    $('._js-promotions-input').keypress(function (e) {\r\n        if (e.keyCode === 13) {\r\n            e.preventDefault();\r\n        }\r\n    });\r\n};\r\n\r\nexport const init = () => {\r\n    promotions();\r\n};\r\n","import bubbleEvent from '../../helpers/event-bubble';\r\n\r\nexport default class Quantity {\r\n    //TODO add API call here, remove from global object, remove Ajax Form\r\n    constructor(element: HTMLElement){\r\n        //We replace the DOM subtree everytime we increase the item count, need to use event delegation for event listeners\r\n        bubbleEvent(element, 'click', '_js-quantity-button', this.eventHandler);\r\n    }\r\n    eventHandler(event: Event) {\r\n        const target = event.target as HTMLElement;\r\n        const inputElement = target.parentNode?.querySelector('input') as HTMLInputElement;\r\n\r\n        if (!inputElement) return;\r\n\r\n        const oldValue = parseFloat(inputElement.value);\r\n        let newVal: number;\r\n\r\n        if (target.classList.contains('_js-quantity-button-inc')) {\r\n            newVal = oldValue + 1;\r\n        } else {\r\n            // Don't allow decrementing below zero\r\n            if (oldValue > 1) {\r\n                newVal = oldValue - 1;\r\n            } else {\r\n                newVal = 1;\r\n            }\r\n        }\r\n        inputElement.value = newVal.toString();\r\n    }\r\n}\r\n","export default class Quicksearch {\r\n    constructor(element: HTMLElement) {\r\n        // Quicksearch\r\n        // TODO: Toggle aria on AND off\r\n        // Close when clicking outside search area\r\n        element.addEventListener('click', function () {\r\n            const quicksearchInput = document.querySelector('._js-quicksearch-input') as HTMLElement | null;\r\n            quicksearchInput?.focus();\r\n        });\r\n\r\n    }\r\n}\r\n\r\n","/*\n       (accessible)\n     _ _      _       _\n ___| (_) ___| | __  (_)___\n/ __| | |/ __| |/ /  | / __|\n\\__ \\ | | (__|   < _ | \\__ \\\n|___/_|_|\\___|_|\\_(_)/ |___/\n                   |__/\n\n Version: 1.8.1@accessible360.1\n  Author: Jason Webb (Accessible360)\n Website: https://accessible360.com\n    Docs: https://accessible360.github.io/accessible-slick\n    Repo: https://github.com/Accessible360/accessible-slick\n  Issues: https://github.com/Accessible360/accessible-slick/issues\n\n */\n/* global window, document, define, jQuery, setInterval, clearInterval */\n;(function(factory) {\n    'use strict';\n    if (typeof define === 'function' && define.amd) {\n        define(['jquery'], factory);\n    } else if (typeof exports !== 'undefined') {\n        module.exports = factory(require('jquery'));\n    } else {\n        factory(jQuery);\n    }\n\n}(function($) {\n    'use strict';\n    var Slick = window.Slick || {};\n\n    Slick = (function() {\n\n        var instanceUid = 0;\n\n        function Slick(element, settings) {\n\n            var _ = this, dataSettings;\n\n            _.defaults = {\n                adaptiveHeight: false,\n                appendArrows: $(element),\n                appendDots: $(element),\n                arrows: true,\n                arrowsPlacement: null,\n                asNavFor: null,\n                prevArrow: '<button class=\"slick-prev\" type=\"button\">'\n                            + '<span class=\"slick-prev-icon\" aria-hidden=\"true\"></span>'\n                            + '<span class=\"slick-sr-only\">Previous</span>'\n                         + '</button>',\n                nextArrow: '<button class=\"slick-next\" type=\"button\">'\n                            + '<span class=\"slick-next-icon\" aria-hidden=\"true\"></span>'\n                            + '<span class=\"slick-sr-only\">Next</span>'\n                         + '</button>',\n                autoplay: false,\n                autoplaySpeed: 3000,\n                centerMode: false,\n                centerPadding: '50px',\n                cssEase: 'ease',\n                customPaging: function(slider, i) {\n                    return $('<button type=\"button\">'\n                                + '<span class=\"slick-dot-icon\" aria-hidden=\"true\"></span>'\n                                + '<span class=\"slick-sr-only\">Go to slide ' + (i+1) + '</span>'\n                            + '</button>');\n                },\n                dots: false,\n                dotsClass: 'slick-dots',\n                draggable: true,\n                easing: 'linear',\n                edgeFriction: 0.35,\n                fade: false,\n                infinite: true,\n                initialSlide: 0,\n                instructionsText: null,\n                lazyLoad: 'ondemand',\n                mobileFirst: false,\n                playIcon: '<span class=\"slick-play-icon\" aria-hidden=\"true\"></span>',\n                pauseIcon: '<span class=\"slick-pause-icon\" aria-hidden=\"true\"></span>',\n                pauseOnHover: true,\n                pauseOnFocus: true,\n                pauseOnDotsHover: false,\n                regionLabel: 'carousel',\n                respondTo: 'window',\n                responsive: null,\n                rows: 1,\n                rtl: false,\n                slide: '',\n                slidesPerRow: 1,\n                slidesToShow: 1,\n                slidesToScroll: 1,\n                speed: 500,\n                swipe: true,\n                swipeToSlide: false,\n                touchMove: true,\n                touchThreshold: 5,\n                useAutoplayToggleButton: true,\n                useCSS: true,\n                useGroupRole: true,\n                useTransform: true,\n                variableWidth: false,\n                vertical: false,\n                verticalSwiping: false,\n                waitForAnimate: true,\n                zIndex: 1000\n            };\n\n            _.initials = {\n                animating: false,\n                dragging: false,\n                autoPlayTimer: null,\n                currentDirection: 0,\n                currentLeft: null,\n                currentSlide: 0,\n                direction: 1,\n                $dots: null,\n                $instructionsText: null,\n                listWidth: null,\n                listHeight: null,\n                loadIndex: 0,\n                $nextArrow: null,\n                $pauseButton: null,\n                $pauseIcon: null,\n                $playIcon: null,\n                $prevArrow: null,\n                scrolling: false,\n                slideCount: null,\n                slideWidth: null,\n                $slideTrack: null,\n                $slides: null,\n                sliding: false,\n                slideOffset: 0,\n                swipeLeft: null,\n                swiping: false,\n                $list: null,\n                touchObject: {},\n                transformsEnabled: false,\n                unslicked: false\n            };\n\n            $.extend(_, _.initials);\n\n            _.activeBreakpoint = null;\n            _.animType = null;\n            _.animProp = null;\n            _.breakpoints = [];\n            _.breakpointSettings = [];\n            _.cssTransitions = false;\n            _.focussed = false;\n            _.interrupted = false;\n            _.hidden = 'hidden';\n            _.paused = true;\n            _.positionProp = null;\n            _.respondTo = null;\n            _.rowCount = 1;\n            _.shouldClick = true;\n            _.$slider = $(element);\n            _.$slidesCache = null;\n            _.transformType = null;\n            _.transitionType = null;\n            _.visibilityChange = 'visibilitychange';\n            _.windowWidth = 0;\n            _.windowTimer = null;\n\n            dataSettings = $(element).data('slick') || {};\n\n            _.options = $.extend({}, _.defaults, settings, dataSettings);\n\n            _.currentSlide = _.options.initialSlide;\n\n            _.originalSettings = _.options;\n\n            if (typeof document.mozHidden !== 'undefined') {\n                _.hidden = 'mozHidden';\n                _.visibilityChange = 'mozvisibilitychange';\n            } else if (typeof document.webkitHidden !== 'undefined') {\n                _.hidden = 'webkitHidden';\n                _.visibilityChange = 'webkitvisibilitychange';\n            }\n\n            _.autoPlay = $.proxy(_.autoPlay, _);\n            _.autoPlayClear = $.proxy(_.autoPlayClear, _);\n            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);\n            _.autoPlayToggleHandler = $.proxy(_.autoPlayToggleHandler, _);\n            _.changeSlide = $.proxy(_.changeSlide, _);\n            _.clickHandler = $.proxy(_.clickHandler, _);\n            _.selectHandler = $.proxy(_.selectHandler, _);\n            _.setPosition = $.proxy(_.setPosition, _);\n            _.swipeHandler = $.proxy(_.swipeHandler, _);\n            _.dragHandler = $.proxy(_.dragHandler, _);\n\n            _.instanceUid = instanceUid++;\n\n            // A simple way to check for HTML strings\n            // Strict HTML recognition (must start with <)\n            // Extracted from jQuery v1.11 source\n            _.htmlExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*)$/;\n\n\n            _.registerBreakpoints();\n            _.init(true);\n\n        }\n\n        return Slick;\n\n    }());\n\n    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {\n\n        var _ = this;\n\n        if (typeof(index) === 'boolean') {\n            addBefore = index;\n            index = null;\n        } else if (index < 0 || (index >= _.slideCount)) {\n            return false;\n        }\n\n        _.unload();\n\n        if (typeof(index) === 'number') {\n            if (index === 0 && _.$slides.length === 0) {\n                $(markup).appendTo(_.$slideTrack);\n            } else if (addBefore) {\n                $(markup).insertBefore(_.$slides.eq(index));\n            } else {\n                $(markup).insertAfter(_.$slides.eq(index));\n            }\n        } else {\n            if (addBefore === true) {\n                $(markup).prependTo(_.$slideTrack);\n            } else {\n                $(markup).appendTo(_.$slideTrack);\n            }\n        }\n\n        _.$slides = _.$slideTrack.children(this.options.slide);\n\n        _.$slideTrack.children(this.options.slide).detach();\n\n        _.$slideTrack.append(_.$slides);\n\n        _.$slides.each(function(index, element) {\n            $(element).attr('data-slick-index', index);\n            $(element).attr('role', 'group');\n            $(element).attr('aria-label', 'slide ' + index);\n        });\n\n        _.$slidesCache = _.$slides;\n\n        _.reinit();\n\n    };\n\n    Slick.prototype.animateHeight = function() {\n        var _ = this;\n        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n            _.$list.animate({\n                height: targetHeight\n            }, _.options.speed);\n        }\n    };\n\n    Slick.prototype.animateSlide = function(targetLeft, callback) {\n\n        var animProps = {},\n            _ = this;\n\n        _.animateHeight();\n\n        if (_.options.rtl === true && _.options.vertical === false) {\n            targetLeft = -targetLeft;\n        }\n        if (_.transformsEnabled === false) {\n            if (_.options.vertical === false) {\n                _.$slideTrack.animate({\n                    left: targetLeft\n                }, _.options.speed, _.options.easing, callback);\n            } else {\n                _.$slideTrack.animate({\n                    top: targetLeft\n                }, _.options.speed, _.options.easing, callback);\n            }\n\n        } else {\n\n            if (_.cssTransitions === false) {\n                if (_.options.rtl === true) {\n                    _.currentLeft = -(_.currentLeft);\n                }\n                $({\n                    animStart: _.currentLeft\n                }).animate({\n                    animStart: targetLeft\n                }, {\n                    duration: _.options.speed,\n                    easing: _.options.easing,\n                    step: function(now) {\n                        now = Math.ceil(now);\n                        if (_.options.vertical === false) {\n                            animProps[_.animType] = 'translate(' +\n                                now + 'px, 0px)';\n                            _.$slideTrack.css(animProps);\n                        } else {\n                            animProps[_.animType] = 'translate(0px,' +\n                                now + 'px)';\n                            _.$slideTrack.css(animProps);\n                        }\n                    },\n                    complete: function() {\n                        if (callback) {\n                            callback.call();\n                        }\n                    }\n                });\n\n            } else {\n\n                _.applyTransition();\n                targetLeft = Math.ceil(targetLeft);\n\n                if (_.options.vertical === false) {\n                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';\n                } else {\n                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';\n                }\n                _.$slideTrack.css(animProps);\n\n                if (callback) {\n                    setTimeout(function() {\n\n                        _.disableTransition();\n\n                        callback.call();\n                    }, _.options.speed);\n                }\n\n            }\n\n        }\n\n    };\n\n    Slick.prototype.getNavTarget = function() {\n\n        var _ = this,\n            asNavFor = _.options.asNavFor;\n\n        if ( asNavFor && asNavFor !== null ) {\n            asNavFor = $(asNavFor).not(_.$slider);\n        }\n\n        return asNavFor;\n\n    };\n\n    Slick.prototype.asNavFor = function(index) {\n\n        var _ = this,\n            asNavFor = _.getNavTarget();\n\n        if ( asNavFor !== null && typeof asNavFor === 'object' ) {\n            asNavFor.each(function() {\n                var target = $(this).slick('getSlick');\n                if(!target.unslicked) {\n                    target.slideHandler(index, true);\n                }\n            });\n        }\n\n    };\n\n    Slick.prototype.applyTransition = function(slide) {\n\n        var _ = this,\n            transition = {};\n\n        if (_.options.fade === false) {\n            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;\n        } else {\n            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;\n        }\n\n        if (_.options.fade === false) {\n            _.$slideTrack.css(transition);\n        } else {\n            _.$slides.eq(slide).css(transition);\n        }\n\n    };\n\n    Slick.prototype.autoPlay = function() {\n\n        var _ = this;\n\n        _.autoPlayClear();\n\n        if ( _.slideCount > _.options.slidesToShow ) {\n            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );\n        }\n\n    };\n\n    Slick.prototype.autoPlayClear = function() {\n\n        var _ = this;\n\n        if (_.autoPlayTimer) {\n            clearInterval(_.autoPlayTimer);\n        }\n\n    };\n\n    Slick.prototype.autoPlayIterator = function() {\n\n        var _ = this,\n            slideTo = _.currentSlide + _.options.slidesToScroll;\n\n        if ( !_.paused && !_.interrupted && !_.focussed ) {\n\n            if ( _.options.infinite === false ) {\n\n                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {\n                    _.direction = 0;\n                }\n\n                else if ( _.direction === 0 ) {\n\n                    slideTo = _.currentSlide - _.options.slidesToScroll;\n\n                    if ( _.currentSlide - 1 === 0 ) {\n                        _.direction = 1;\n                    }\n\n                }\n\n            }\n\n            _.slideHandler( slideTo );\n\n        }\n\n    };\n\n    Slick.prototype.autoPlayToggleHandler = function() {\n        var _ = this;\n\n        if(_.paused) {\n            _.$playIcon.css('display', 'none');\n            _.$pauseIcon.css('display', 'inline');\n\n            _.$pauseButton.find('.slick-play-text').attr('style', 'display: none');\n            _.$pauseButton.find('.slick-pause-text').removeAttr('style');\n\n            _.slickPlay();\n        } else {\n            _.$playIcon.css('display', 'inline');\n            _.$pauseIcon.css('display', 'none');\n\n            _.$pauseButton.find('.slick-play-text').removeAttr('style');\n            _.$pauseButton.find('.slick-pause-text').attr('style', 'display: none');\n\n            _.slickPause();\n        }\n    };\n\n    Slick.prototype.buildArrows = function() {\n\n        var _ = this;\n\n        if (_.options.arrows === true ) {\n\n            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');\n            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');\n\n            if( _.slideCount > _.options.slidesToShow ) {\n\n                if (_.htmlExpr.test(_.options.prevArrow)) {\n                    if(_.options.arrowsPlacement != null) {\n                        switch(_.options.arrowsPlacement) {\n                            case 'beforeSlides':\n                            case 'split':\n                                console.log('test');\n                                _.$prevArrow.prependTo(_.options.appendArrows);\n                                break;\n\n                            case 'afterSlides':\n                                _.$prevArrow.appendTo(_.options.appendArrows);\n                                break;\n                        }\n\n                    } else {\n                        _.$prevArrow.prependTo(_.options.appendArrows);\n                    }\n                }\n\n                if (_.htmlExpr.test(_.options.nextArrow)) {\n                    if(_.options.arrowsPlacement != null) {\n                        switch(_.options.arrowsPlacement) {\n                            case 'beforeSlides':\n                                console.log('test2');\n                                _.$prevArrow.after(_.$nextArrow);\n                                break;\n\n                            case 'afterSlides':\n                            case 'split':\n                                _.$nextArrow.appendTo(_.options.appendArrows);\n                        }\n                    } else {\n                       _.$nextArrow.appendTo(_.options.appendArrows);\n                    }\n                }\n\n                if (_.options.infinite !== true) {\n                    _.$prevArrow\n                        .addClass('slick-disabled')\n                        .prop('disabled', true);\n                }\n\n            } else {\n\n                _.$prevArrow.add( _.$nextArrow )\n\n                    .addClass('slick-hidden')\n                    .prop('disabled', true);\n            }\n\n        }\n\n    };\n\n    Slick.prototype.buildDots = function() {\n\n        var _ = this,\n            i, dot;\n\n        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n            _.$slider.addClass('slick-dotted');\n\n            dot = $('<ul />').addClass(_.options.dotsClass);\n\n            for (i = 0; i <= _.getDotCount(); i += 1) {\n                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));\n            }\n\n            _.$dots = dot.appendTo(_.options.appendDots);\n\n            _.$dots.find('li').first().addClass('slick-active');\n\n        }\n\n    };\n\n    Slick.prototype.buildOut = function() {\n\n        var _ = this;\n\n        _.$slides =\n            _.$slider\n                .children( _.options.slide + ':not(.slick-cloned)')\n                .addClass('slick-slide');\n\n        _.slideCount = _.$slides.length;\n\n        _.$slides.each(function(index, element) {\n            $(element)\n                .attr('data-slick-index', index)\n                .data('originalStyling', $(element).attr('style') || '');\n\n            if(_.options.useGroupRole) {\n                $(element)\n                    .attr('role', 'group')\n                    .attr('aria-label', 'slide ' + (index + 1));\n            }\n        });\n\n        _.$slider.addClass('slick-slider');\n\n        _.$slider.attr('role', 'region');\n        _.$slider.attr('aria-label', _.options.regionLabel);\n\n        _.$slideTrack = (_.slideCount === 0) ?\n            $('<div class=\"slick-track\"/>').appendTo(_.$slider) :\n            _.$slides.wrapAll('<div class=\"slick-track\"/>').parent();\n\n        _.$list = _.$slideTrack.wrap(\n            '<div class=\"slick-list\"/>').parent();\n        _.$slideTrack.css('opacity', 0);\n\n        if (_.options.centerMode === true || _.options.swipeToSlide === true) {\n            _.options.slidesToScroll = 1;\n        }\n\n        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');\n\n        _.setupInfinite();\n\n        _.buildArrows();\n\n        _.buildDots();\n\n        _.updateDots();\n\n\n        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n\n        if (_.options.draggable === true) {\n            _.$list.addClass('draggable');\n        }\n\n        if ( _.options.autoplay && _.options.useAutoplayToggleButton ) {\n            _.$pauseIcon = $(_.options.pauseIcon).attr('aria-hidden', true);\n            _.$playIcon = $(_.options.playIcon).attr('aria-hidden', true);\n\n            _.$pauseButton = $('<button type=\"button\" class=\"slick-autoplay-toggle-button\">');\n            _.$pauseButton.append(_.$pauseIcon);\n            _.$pauseButton.append(_.$playIcon.css('display', 'none'));\n            _.$pauseButton.append($('<span class=\"slick-pause-text slick-sr-only\">Pause</span>'));\n            _.$pauseButton.append($('<span class=\"slick-play-text slick-sr-only\" style=\"display: none\">Play</span>'));\n\n            _.$pauseButton.prependTo(_.$slider);\n        }\n\n        if((_.options.instructionsText != null && _.options.instructionsText != '')) {\n            _.$instructionsText = $('<p class=\"slick-instructions slick-sr-only\">' + _.options.instructionsText + '</p>');\n            _.$instructionsText.prependTo(_.$slider);\n        }\n\n    };\n\n    Slick.prototype.buildRows = function() {\n\n        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;\n\n        newSlides = document.createDocumentFragment();\n        originalSlides = _.$slider.children();\n\n        if(_.options.rows > 0) {\n\n            slidesPerSection = _.options.slidesPerRow * _.options.rows;\n            numOfSlides = Math.ceil(\n                originalSlides.length / slidesPerSection\n            );\n\n            for(a = 0; a < numOfSlides; a++){\n                var slide = document.createElement('div');\n                for(b = 0; b < _.options.rows; b++) {\n                    var row = document.createElement('div');\n                    for(c = 0; c < _.options.slidesPerRow; c++) {\n                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));\n                        if (originalSlides.get(target)) {\n                            row.appendChild(originalSlides.get(target));\n                        }\n                    }\n                    slide.appendChild(row);\n                }\n                newSlides.appendChild(slide);\n            }\n\n            _.$slider.empty().append(newSlides);\n            _.$slider.children().children().children()\n                .css({\n                    'width':(100 / _.options.slidesPerRow) + '%',\n                    'display': 'inline-block'\n                });\n\n        }\n\n    };\n\n    Slick.prototype.checkResponsive = function(initial, forceUpdate) {\n\n        var _ = this,\n            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;\n        var sliderWidth = _.$slider.width();\n        var windowWidth = window.innerWidth || $(window).width();\n\n        if (_.respondTo === 'window') {\n            respondToWidth = windowWidth;\n        } else if (_.respondTo === 'slider') {\n            respondToWidth = sliderWidth;\n        } else if (_.respondTo === 'min') {\n            respondToWidth = Math.min(windowWidth, sliderWidth);\n        }\n\n        if ( _.options.responsive &&\n            _.options.responsive.length &&\n            _.options.responsive !== null) {\n\n            targetBreakpoint = null;\n\n            for (breakpoint in _.breakpoints) {\n                if (_.breakpoints.hasOwnProperty(breakpoint)) {\n                    if (_.originalSettings.mobileFirst === false) {\n                        if (respondToWidth < _.breakpoints[breakpoint]) {\n                            targetBreakpoint = _.breakpoints[breakpoint];\n                        }\n                    } else {\n                        if (respondToWidth > _.breakpoints[breakpoint]) {\n                            targetBreakpoint = _.breakpoints[breakpoint];\n                        }\n                    }\n                }\n            }\n\n            if (targetBreakpoint !== null) {\n                if (_.activeBreakpoint !== null) {\n                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {\n                        _.activeBreakpoint =\n                            targetBreakpoint;\n                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n                            _.unslick(targetBreakpoint);\n                        } else {\n                            _.options = $.extend({}, _.originalSettings,\n                                _.breakpointSettings[\n                                    targetBreakpoint]);\n                            if (initial === true) {\n                                _.currentSlide = _.options.initialSlide;\n                            }\n                            _.refresh(initial);\n                        }\n                        triggerBreakpoint = targetBreakpoint;\n                    }\n                } else {\n                    _.activeBreakpoint = targetBreakpoint;\n                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n                        _.unslick(targetBreakpoint);\n                    } else {\n                        _.options = $.extend({}, _.originalSettings,\n                            _.breakpointSettings[\n                                targetBreakpoint]);\n                        if (initial === true) {\n                            _.currentSlide = _.options.initialSlide;\n                        }\n                        _.refresh(initial);\n                    }\n                    triggerBreakpoint = targetBreakpoint;\n                }\n            } else {\n                if (_.activeBreakpoint !== null) {\n                    _.activeBreakpoint = null;\n                    _.options = _.originalSettings;\n                    if (initial === true) {\n                        _.currentSlide = _.options.initialSlide;\n                    }\n                    _.refresh(initial);\n                    triggerBreakpoint = targetBreakpoint;\n                }\n            }\n\n            // only trigger breakpoints during an actual break. not on initialize.\n            if( !initial && triggerBreakpoint !== false ) {\n                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);\n            }\n        }\n\n    };\n\n    Slick.prototype.changeSlide = function(event, dontAnimate) {\n\n        var _ = this,\n            $target = $(event.currentTarget),\n            indexOffset, slideOffset, unevenOffset;\n\n        // If target is a link, prevent default action.\n        if($target.is('a')) {\n            event.preventDefault();\n        }\n\n        // If target is not the <li> element (ie: a child), find the <li>.\n        if(!$target.is('li')) {\n            $target = $target.closest('li');\n        }\n\n        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);\n        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;\n\n        switch (event.data.message) {\n\n            case 'previous':\n                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;\n                if (_.slideCount > _.options.slidesToShow) {\n                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);\n                }\n                break;\n\n            case 'next':\n                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;\n                if (_.slideCount > _.options.slidesToShow) {\n                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);\n                }\n                break;\n\n            case 'index':\n                var index = event.data.index === 0 ? 0 :\n                    event.data.index || $target.index() * _.options.slidesToScroll;\n\n                _.slideHandler(_.checkNavigable(index), false, dontAnimate);\n                $target.children().trigger('focus');\n                break;\n\n            default:\n                return;\n        }\n\n    };\n\n    Slick.prototype.checkNavigable = function(index) {\n\n        var _ = this,\n            navigables, prevNavigable;\n\n        navigables = _.getNavigableIndexes();\n        prevNavigable = 0;\n        if (index > navigables[navigables.length - 1]) {\n            index = navigables[navigables.length - 1];\n        } else {\n            for (var n in navigables) {\n                if (index < navigables[n]) {\n                    index = prevNavigable;\n                    break;\n                }\n                prevNavigable = navigables[n];\n            }\n        }\n\n        return index;\n    };\n\n    Slick.prototype.cleanUpEvents = function() {\n\n        var _ = this;\n\n        if(_.options.autoplay && _.options.useAutoplayToggleButton) {\n            _.$pauseButton.off('click.slick', _.autoPlayToggleHandler);\n        }\n\n        if (_.options.dots && _.$dots !== null) {\n\n            $('li', _.$dots)\n                .off('click.slick', _.changeSlide)\n                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))\n                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n        }\n\n        _.$slider.off('focus.slick blur.slick');\n\n        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);\n            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);\n        }\n\n        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);\n        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);\n        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);\n        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);\n\n        _.$list.off('click.slick', _.clickHandler);\n\n        $(document).off(_.visibilityChange, _.visibility);\n\n        _.cleanUpSlideEvents();\n\n        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);\n\n        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);\n\n        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);\n\n        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);\n\n    };\n\n    Slick.prototype.cleanUpSlideEvents = function() {\n\n        var _ = this;\n\n        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));\n        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n    };\n\n    Slick.prototype.cleanUpRows = function() {\n\n        var _ = this, originalSlides;\n\n        if(_.options.rows > 0) {\n            originalSlides = _.$slides.children().children();\n            originalSlides.removeAttr('style');\n            _.$slider.empty().append(originalSlides);\n        }\n\n    };\n\n    Slick.prototype.clickHandler = function(event) {\n\n        var _ = this;\n\n        if (_.shouldClick === false) {\n            event.stopImmediatePropagation();\n            event.stopPropagation();\n            event.preventDefault();\n        }\n\n    };\n\n    Slick.prototype.destroy = function(refresh) {\n\n        var _ = this;\n\n        _.autoPlayClear();\n\n        _.touchObject = {};\n\n        _.cleanUpEvents();\n\n        $('.slick-cloned', _.$slider).detach();\n\n        if(_.options.autoplay && _.options.useAutoplayToggleButton) {\n            _.$pauseButton.remove();\n        }\n\n        if (_.$dots) {\n            _.$dots.remove();\n        }\n\n        if ( _.$prevArrow && _.$prevArrow.length ) {\n\n            _.$prevArrow\n                .removeClass('slick-disabled slick-arrow slick-hidden')\n                .prop('disabled', false)\n                .css('display','');\n\n            if ( _.htmlExpr.test( _.options.prevArrow )) {\n                _.$prevArrow.remove();\n            }\n        }\n\n        if ( _.$nextArrow && _.$nextArrow.length ) {\n\n            _.$nextArrow\n                .removeClass('slick-disabled slick-arrow slick-hidden')\n                .prop('disabled', false)\n                .css('display','');\n\n            if ( _.htmlExpr.test( _.options.nextArrow )) {\n                _.$nextArrow.remove();\n            }\n        }\n\n\n        if (_.$slides) {\n\n            _.$slides\n                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')\n                .removeAttr('aria-hidden')\n                .removeAttr('data-slick-index')\n                .each(function(){\n                    $(this).attr('style', $(this).data('originalStyling'));\n                });\n\n            _.$slideTrack.children(this.options.slide).detach();\n\n            _.$slideTrack.detach();\n\n            _.$list.detach();\n\n            _.$slider.append(_.$slides);\n        }\n\n        _.cleanUpRows();\n\n        _.$slider.removeClass('slick-slider');\n        _.$slider.removeClass('slick-initialized');\n        _.$slider.removeClass('slick-dotted');\n\n        _.unslicked = true;\n\n        if(!refresh) {\n            _.$slider.trigger('destroy', [_]);\n        }\n\n    };\n\n    Slick.prototype.disableTransition = function(slide) {\n\n        var _ = this,\n            transition = {};\n\n        transition[_.transitionType] = '';\n\n        if (_.options.fade === false) {\n            _.$slideTrack.css(transition);\n        } else {\n            _.$slides.eq(slide).css(transition);\n        }\n\n    };\n\n    Slick.prototype.fadeSlide = function(slideIndex, callback) {\n\n        var _ = this;\n\n        if (_.cssTransitions === false) {\n\n            _.$slides.eq(slideIndex).css({\n                zIndex: _.options.zIndex\n            });\n\n            _.$slides.eq(slideIndex).animate({\n                opacity: 1\n            }, _.options.speed, _.options.easing, callback);\n\n        } else {\n\n            _.applyTransition(slideIndex);\n\n            _.$slides.eq(slideIndex).css({\n                opacity: 1,\n                zIndex: _.options.zIndex\n            });\n\n            if (callback) {\n                setTimeout(function() {\n\n                    _.disableTransition(slideIndex);\n\n                    callback.call();\n                }, _.options.speed);\n            }\n\n        }\n\n    };\n\n    Slick.prototype.fadeSlideOut = function(slideIndex) {\n\n        var _ = this;\n\n        if (_.cssTransitions === false) {\n\n            _.$slides.eq(slideIndex).animate({\n                opacity: 0,\n                zIndex: _.options.zIndex - 2\n            }, _.options.speed, _.options.easing);\n\n        } else {\n\n            _.applyTransition(slideIndex);\n\n            _.$slides.eq(slideIndex).css({\n                opacity: 0,\n                zIndex: _.options.zIndex - 2\n            });\n\n        }\n\n    };\n\n    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {\n\n        var _ = this;\n\n        if (filter !== null) {\n\n            _.$slidesCache = _.$slides;\n\n            _.unload();\n\n            _.$slideTrack.children(this.options.slide).detach();\n\n            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);\n\n            _.reinit();\n\n        }\n\n    };\n\n    Slick.prototype.focusHandler = function() {\n\n        var _ = this;\n\n        // If any child element receives focus within the slider we need to pause the autoplay\n        _.$slider\n            .off('focus.slick blur.slick')\n            .on(\n                'focus.slick',\n                '*',\n                function(event) {\n                    var $sf = $(this);\n\n                    setTimeout(function() {\n                        if( _.options.pauseOnFocus ) {\n                            if ($sf.is(':focus')) {\n                                _.focussed = true;\n                                _.autoPlay();\n                            }\n                        }\n                    }, 0);\n                }\n            ).on(\n                'blur.slick',\n                '*',\n                function(event) {\n                    var $sf = $(this);\n\n                    // When a blur occurs on any elements within the slider we become unfocused\n                    if( _.options.pauseOnFocus ) {\n                        _.focussed = false;\n                        _.autoPlay();\n                    }\n                }\n            );\n    };\n\n    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {\n\n        var _ = this;\n        return _.currentSlide;\n\n    };\n\n    Slick.prototype.getDotCount = function() {\n\n        var _ = this;\n\n        var breakPoint = 0;\n        var counter = 0;\n        var pagerQty = 0;\n\n        if (_.options.infinite === true) {\n            if (_.slideCount <= _.options.slidesToShow) {\n                 ++pagerQty;\n            } else {\n                while (breakPoint < _.slideCount) {\n                    ++pagerQty;\n                    breakPoint = counter + _.options.slidesToScroll;\n                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n                }\n            }\n        } else if (_.options.centerMode === true) {\n            pagerQty = _.slideCount;\n        } else if(!_.options.asNavFor) {\n            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);\n        }else {\n            while (breakPoint < _.slideCount) {\n                ++pagerQty;\n                breakPoint = counter + _.options.slidesToScroll;\n                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n            }\n        }\n\n        return pagerQty - 1;\n\n    };\n\n    Slick.prototype.getLeft = function(slideIndex) {\n\n        var _ = this,\n            targetLeft,\n            verticalHeight,\n            verticalOffset = 0,\n            targetSlide,\n            coef;\n\n        _.slideOffset = 0;\n        verticalHeight = _.$slides.first().outerHeight(true);\n\n        if (_.options.infinite === true) {\n            if (_.slideCount > _.options.slidesToShow) {\n                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;\n                coef = -1\n\n                if (_.options.vertical === true && _.options.centerMode === true) {\n                    if (_.options.slidesToShow === 2) {\n                        coef = -1.5;\n                    } else if (_.options.slidesToShow === 1) {\n                        coef = -2\n                    }\n                }\n                verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;\n            }\n            if (_.slideCount % _.options.slidesToScroll !== 0) {\n                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {\n                    if (slideIndex > _.slideCount) {\n                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;\n                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;\n                    } else {\n                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;\n                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;\n                    }\n                }\n            }\n        } else {\n            if (slideIndex + _.options.slidesToShow > _.slideCount) {\n                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;\n                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;\n            }\n        }\n\n        if (_.slideCount <= _.options.slidesToShow) {\n            _.slideOffset = 0;\n            verticalOffset = 0;\n        }\n\n        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {\n            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);\n        } else if (_.options.centerMode === true && _.options.infinite === true) {\n            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;\n        } else if (_.options.centerMode === true) {\n            _.slideOffset = 0;\n            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);\n        }\n\n        if (_.options.vertical === false) {\n            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;\n        } else {\n            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;\n        }\n\n        if (_.options.variableWidth === true) {\n\n            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n            } else {\n                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);\n            }\n\n            if (_.options.rtl === true) {\n                if (targetSlide[0]) {\n                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n                } else {\n                    targetLeft =  0;\n                }\n            } else {\n                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n            }\n\n            if (_.options.centerMode === true) {\n                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n                } else {\n                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);\n                }\n\n                if (_.options.rtl === true) {\n                    if (targetSlide[0]) {\n                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n                    } else {\n                        targetLeft =  0;\n                    }\n                } else {\n                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n                }\n\n                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;\n            }\n        }\n\n        return targetLeft;\n\n    };\n\n    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {\n\n        var _ = this;\n\n        return _.options[option];\n\n    };\n\n    Slick.prototype.getNavigableIndexes = function() {\n\n        var _ = this,\n            breakPoint = 0,\n            counter = 0,\n            indexes = [],\n            max;\n\n        if (_.options.infinite === false) {\n            max = _.slideCount;\n        } else {\n            breakPoint = _.options.slidesToScroll * -1;\n            counter = _.options.slidesToScroll * -1;\n            max = _.slideCount * 2;\n        }\n\n        while (breakPoint < max) {\n            indexes.push(breakPoint);\n            breakPoint = counter + _.options.slidesToScroll;\n            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n        }\n\n        return indexes;\n\n    };\n\n    Slick.prototype.getSlick = function() {\n\n        return this;\n\n    };\n\n    Slick.prototype.getSlideCount = function() {\n\n        var _ = this,\n            slidesTraversed, swipedSlide, swipeTarget, centerOffset;\n\n        centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0;\n        swipeTarget = (_.swipeLeft * -1) + centerOffset;\n\n        if (_.options.swipeToSlide === true) {\n\n            _.$slideTrack.find('.slick-slide').each(function(index, slide) {\n\n                var slideOuterWidth, slideOffset, slideRightBoundary;\n                slideOuterWidth = $(slide).outerWidth();\n                slideOffset = slide.offsetLeft;\n                if (_.options.centerMode !== true) {\n                    slideOffset += (slideOuterWidth / 2);\n                }\n\n                slideRightBoundary = slideOffset + (slideOuterWidth);\n\n                if (swipeTarget < slideRightBoundary) {\n                    swipedSlide = slide;\n                    return false;\n                }\n            });\n\n            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;\n\n            return slidesTraversed;\n\n        } else {\n            return _.options.slidesToScroll;\n        }\n\n    };\n\n    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {\n\n        var _ = this;\n\n        _.changeSlide({\n            data: {\n                message: 'index',\n                index: parseInt(slide)\n            }\n        }, dontAnimate);\n\n    };\n\n    Slick.prototype.init = function(creation) {\n\n        var _ = this;\n\n        if (!$(_.$slider).hasClass('slick-initialized')) {\n\n            $(_.$slider).addClass('slick-initialized');\n\n            _.buildRows();\n            _.buildOut();\n            _.setProps();\n            _.startLoad();\n            _.loadSlider();\n            _.initializeEvents();\n            _.updateArrows();\n            _.updateDots();\n            _.checkResponsive(true);\n            _.focusHandler();\n\n        }\n\n        if (creation) {\n            _.$slider.trigger('init', [_]);\n        }\n\n        if ( _.options.autoplay ) {\n\n            _.paused = false;\n            _.autoPlay();\n\n        }\n\n        _.updateSlideVisibility();\n\n        if(_.options.accessibility != undefined) {\n            console.warn('accessibility setting is no longer supported.')\n        }\n\n        if(_.options.focusOnChange != undefined) {\n            console.warn('focusOnChange is no longer supported.');\n        }\n\n        if(_.options.focusOnSelect != undefined) {\n            console.warn('focusOnSelect is no longer supported.');\n        }\n\n    };\n\n    Slick.prototype.initArrowEvents = function() {\n\n        var _ = this;\n\n        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n            _.$prevArrow\n               .off('click.slick')\n               .on('click.slick', {\n                    message: 'previous'\n               }, _.changeSlide);\n            _.$nextArrow\n               .off('click.slick')\n               .on('click.slick', {\n                    message: 'next'\n               }, _.changeSlide);\n        }\n\n    };\n\n    Slick.prototype.initDotEvents = function() {\n\n        var _ = this;\n\n        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n            $('li', _.$dots).on('click.slick', {\n                message: 'index'\n            }, _.changeSlide);\n        }\n\n        if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {\n\n            $('li', _.$dots)\n                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))\n                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n        }\n\n    };\n\n    Slick.prototype.initSlideEvents = function() {\n\n        var _ = this;\n\n        if ( _.options.pauseOnHover ) {\n\n            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));\n            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n        }\n\n    };\n\n    Slick.prototype.initializeEvents = function() {\n\n        var _ = this;\n\n        _.initArrowEvents();\n\n        _.initDotEvents();\n        _.initSlideEvents();\n\n        if(_.options.autoplay && _.options.useAutoplayToggleButton) {\n            _.$pauseButton.on('click.slick', _.autoPlayToggleHandler);\n        }\n\n        _.$list.on('touchstart.slick mousedown.slick', {\n            action: 'start'\n        }, _.swipeHandler);\n        _.$list.on('touchmove.slick mousemove.slick', {\n            action: 'move'\n        }, _.swipeHandler);\n        _.$list.on('touchend.slick mouseup.slick', {\n            action: 'end'\n        }, _.swipeHandler);\n        _.$list.on('touchcancel.slick mouseleave.slick', {\n            action: 'end'\n        }, _.swipeHandler);\n\n        _.$list.on('click.slick', _.clickHandler);\n\n        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));\n\n        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));\n\n        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));\n\n        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);\n\n        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);\n        $(_.setPosition);\n\n    };\n\n    Slick.prototype.initUI = function() {\n\n        var _ = this;\n\n        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n\n            _.$prevArrow.show();\n            _.$nextArrow.show();\n\n        }\n\n        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n            _.$dots.show();\n\n        }\n\n    };\n\n    Slick.prototype.lazyLoad = function() {\n\n        var _ = this,\n            loadRange, cloneRange, rangeStart, rangeEnd;\n\n        function loadImages(imagesScope) {\n\n            $('img[data-lazy]', imagesScope).each(function() {\n\n                var image = $(this),\n                    imageSource = $(this).attr('data-lazy'),\n                    imageSrcSet = $(this).attr('data-srcset'),\n                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),\n                    imageToLoad = document.createElement('img');\n\n                imageToLoad.onload = function() {\n\n                    image\n                        .animate({ opacity: 0 }, 100, function() {\n\n                            if (imageSrcSet) {\n                                image\n                                    .attr('srcset', imageSrcSet );\n\n                                if (imageSizes) {\n                                    image\n                                        .attr('sizes', imageSizes );\n                                }\n                            }\n\n                            image\n                                .attr('src', imageSource)\n                                .animate({ opacity: 1 }, 200, function() {\n                                    image\n                                        .removeAttr('data-lazy data-srcset data-sizes')\n                                        .removeClass('slick-loading');\n                                });\n                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);\n                        });\n\n                };\n\n                imageToLoad.onerror = function() {\n\n                    image\n                        .removeAttr( 'data-lazy' )\n                        .removeClass( 'slick-loading' )\n                        .addClass( 'slick-lazyload-error' );\n\n                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);\n\n                };\n\n                imageToLoad.src = imageSource;\n\n            });\n\n        }\n\n        if (_.options.centerMode === true) {\n            if (_.options.infinite === true) {\n                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);\n                rangeEnd = rangeStart + _.options.slidesToShow + 2;\n            } else {\n                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));\n                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;\n            }\n        } else {\n            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;\n            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);\n            if (_.options.fade === true) {\n                if (rangeStart > 0) rangeStart--;\n                if (rangeEnd <= _.slideCount) rangeEnd++;\n            }\n        }\n\n        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);\n\n        if (_.options.lazyLoad === 'anticipated') {\n            var prevSlide = rangeStart - 1,\n                nextSlide = rangeEnd,\n                $slides = _.$slider.find('.slick-slide');\n\n            for (var i = 0; i < _.options.slidesToScroll; i++) {\n                if (prevSlide < 0) prevSlide = _.slideCount - 1;\n                loadRange = loadRange.add($slides.eq(prevSlide));\n                loadRange = loadRange.add($slides.eq(nextSlide));\n                prevSlide--;\n                nextSlide++;\n            }\n        }\n\n        loadImages(loadRange);\n\n        if (_.slideCount <= _.options.slidesToShow) {\n            cloneRange = _.$slider.find('.slick-slide');\n            loadImages(cloneRange);\n        } else\n        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {\n            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);\n            loadImages(cloneRange);\n        } else if (_.currentSlide === 0) {\n            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);\n            loadImages(cloneRange);\n        }\n\n    };\n\n    Slick.prototype.loadSlider = function() {\n\n        var _ = this;\n\n        _.setPosition();\n\n        _.$slideTrack.css({\n            opacity: 1\n        });\n\n        _.$slider.removeClass('slick-loading');\n\n        _.initUI();\n\n        if (_.options.lazyLoad === 'progressive') {\n            _.progressiveLazyLoad();\n        }\n\n    };\n\n    Slick.prototype.next = Slick.prototype.slickNext = function() {\n\n        var _ = this;\n\n        _.changeSlide({\n            data: {\n                message: 'next'\n            }\n        });\n\n    };\n\n    Slick.prototype.orientationChange = function() {\n\n        var _ = this;\n\n        _.checkResponsive();\n        _.setPosition();\n\n    };\n\n    Slick.prototype.pause = Slick.prototype.slickPause = function() {\n\n        var _ = this;\n\n        _.autoPlayClear();\n        _.paused = true;\n\n    };\n\n    Slick.prototype.play = Slick.prototype.slickPlay = function() {\n\n        var _ = this;\n\n        _.autoPlay();\n        _.options.autoplay = true;\n        _.paused = false;\n        _.focussed = false;\n        _.interrupted = false;\n\n    };\n\n    Slick.prototype.postSlide = function(index) {\n\n        var _ = this;\n\n        if( !_.unslicked ) {\n\n            _.$slider.trigger('afterChange', [_, index]);\n\n            _.animating = false;\n\n            if (_.slideCount > _.options.slidesToShow) {\n                _.setPosition();\n            }\n\n            _.swipeLeft = null;\n\n            if ( _.options.autoplay ) {\n                _.autoPlay();\n            }\n\n            _.updateSlideVisibility();\n\n        }\n\n    };\n\n    Slick.prototype.prev = Slick.prototype.slickPrev = function() {\n\n        var _ = this;\n\n        _.changeSlide({\n            data: {\n                message: 'previous'\n            }\n        });\n\n    };\n\n    Slick.prototype.preventDefault = function(event) {\n\n        event.preventDefault();\n\n    };\n\n    Slick.prototype.progressiveLazyLoad = function( tryCount ) {\n\n        tryCount = tryCount || 1;\n\n        var _ = this,\n            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),\n            image,\n            imageSource,\n            imageSrcSet,\n            imageSizes,\n            imageToLoad;\n\n        if ( $imgsToLoad.length ) {\n\n            image = $imgsToLoad.first();\n            imageSource = image.attr('data-lazy');\n            imageSrcSet = image.attr('data-srcset');\n            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');\n            imageToLoad = document.createElement('img');\n\n            imageToLoad.onload = function() {\n\n                if (imageSrcSet) {\n                    image\n                        .attr('srcset', imageSrcSet );\n\n                    if (imageSizes) {\n                        image\n                            .attr('sizes', imageSizes );\n                    }\n                }\n\n                image\n                    .attr( 'src', imageSource )\n                    .removeAttr('data-lazy data-srcset data-sizes')\n                    .removeClass('slick-loading');\n\n                if ( _.options.adaptiveHeight === true ) {\n                    _.setPosition();\n                }\n\n                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);\n                _.progressiveLazyLoad();\n\n            };\n\n            imageToLoad.onerror = function() {\n\n                if ( tryCount < 3 ) {\n\n                    /**\n                     * try to load the image 3 times,\n                     * leave a slight delay so we don't get\n                     * servers blocking the request.\n                     */\n                    setTimeout( function() {\n                        _.progressiveLazyLoad( tryCount + 1 );\n                    }, 500 );\n\n                } else {\n\n                    image\n                        .removeAttr( 'data-lazy' )\n                        .removeClass( 'slick-loading' )\n                        .addClass( 'slick-lazyload-error' );\n\n                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);\n\n                    _.progressiveLazyLoad();\n\n                }\n\n            };\n\n            imageToLoad.src = imageSource;\n\n        } else {\n\n            _.$slider.trigger('allImagesLoaded', [ _ ]);\n\n        }\n\n    };\n\n    Slick.prototype.refresh = function( initializing ) {\n\n        var _ = this, currentSlide, lastVisibleIndex;\n\n        lastVisibleIndex = _.slideCount - _.options.slidesToShow;\n\n        // in non-infinite sliders, we don't want to go past the\n        // last visible index.\n        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {\n            _.currentSlide = lastVisibleIndex;\n        }\n\n        // if less slides than to show, go to start.\n        if ( _.slideCount <= _.options.slidesToShow ) {\n            _.currentSlide = 0;\n\n        }\n\n        currentSlide = _.currentSlide;\n\n        _.destroy(true);\n\n        $.extend(_, _.initials, { currentSlide: currentSlide });\n\n        _.init();\n\n        if( !initializing ) {\n\n            _.changeSlide({\n                data: {\n                    message: 'index',\n                    index: currentSlide\n                }\n            }, false);\n\n        }\n\n    };\n\n    Slick.prototype.registerBreakpoints = function() {\n\n        var _ = this, breakpoint, currentBreakpoint, l,\n            responsiveSettings = _.options.responsive || null;\n\n        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {\n\n            _.respondTo = _.options.respondTo || 'window';\n\n            for ( breakpoint in responsiveSettings ) {\n\n                l = _.breakpoints.length-1;\n\n                if (responsiveSettings.hasOwnProperty(breakpoint)) {\n                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;\n\n                    // loop through the breakpoints and cut out any existing\n                    // ones with the same breakpoint number, we don't want dupes.\n                    while( l >= 0 ) {\n                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {\n                            _.breakpoints.splice(l,1);\n                        }\n                        l--;\n                    }\n\n                    _.breakpoints.push(currentBreakpoint);\n                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;\n\n                }\n\n            }\n\n            _.breakpoints.sort(function(a, b) {\n                return ( _.options.mobileFirst ) ? a-b : b-a;\n            });\n\n        }\n\n    };\n\n    Slick.prototype.reinit = function() {\n\n        var _ = this;\n\n        _.$slides =\n            _.$slideTrack\n                .children(_.options.slide)\n                .addClass('slick-slide');\n\n        _.slideCount = _.$slides.length;\n\n        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {\n            _.currentSlide = _.currentSlide - _.options.slidesToScroll;\n        }\n\n        if (_.slideCount <= _.options.slidesToShow) {\n            _.currentSlide = 0;\n        }\n\n        _.registerBreakpoints();\n\n        _.setProps();\n        _.setupInfinite();\n        _.buildArrows();\n        _.updateArrows();\n        _.initArrowEvents();\n        _.buildDots();\n        _.updateDots();\n        _.initDotEvents();\n        _.cleanUpSlideEvents();\n        _.initSlideEvents();\n\n        _.checkResponsive(false, true);\n\n        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n\n        _.setPosition();\n        _.focusHandler();\n\n        _.paused = !_.options.autoplay;\n        _.autoPlay();\n\n        _.$slider.trigger('reInit', [_]);\n\n    };\n\n    Slick.prototype.resize = function() {\n\n        var _ = this;\n\n        if ($(window).width() !== _.windowWidth) {\n            clearTimeout(_.windowDelay);\n            _.windowDelay = window.setTimeout(function() {\n                _.windowWidth = $(window).width();\n                _.checkResponsive();\n                if( !_.unslicked ) { _.setPosition(); }\n            }, 50);\n        }\n    };\n\n    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {\n\n        var _ = this;\n\n        if (typeof(index) === 'boolean') {\n            removeBefore = index;\n            index = removeBefore === true ? 0 : _.slideCount - 1;\n        } else {\n            index = removeBefore === true ? --index : index;\n        }\n\n        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {\n            return false;\n        }\n\n        _.unload();\n\n        if (removeAll === true) {\n            _.$slideTrack.children().remove();\n        } else {\n            _.$slideTrack.children(this.options.slide).eq(index).remove();\n        }\n\n        _.$slides = _.$slideTrack.children(this.options.slide);\n\n        _.$slideTrack.children(this.options.slide).detach();\n\n        _.$slideTrack.append(_.$slides);\n\n        _.$slidesCache = _.$slides;\n\n        _.reinit();\n\n    };\n\n    Slick.prototype.setCSS = function(position) {\n\n        var _ = this,\n            positionProps = {},\n            x, y;\n\n        if (_.options.rtl === true) {\n            position = -position;\n        }\n        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';\n        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';\n\n        positionProps[_.positionProp] = position;\n\n        if (_.transformsEnabled === false) {\n            _.$slideTrack.css(positionProps);\n        } else {\n            positionProps = {};\n            if (_.cssTransitions === false) {\n                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';\n                _.$slideTrack.css(positionProps);\n            } else {\n                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';\n                _.$slideTrack.css(positionProps);\n            }\n        }\n\n    };\n\n    Slick.prototype.setDimensions = function() {\n\n        var _ = this;\n\n        if (_.options.vertical === false) {\n            if (_.options.centerMode === true) {\n                _.$list.css({\n                    padding: ('0px ' + _.options.centerPadding)\n                });\n            }\n        } else {\n            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);\n            if (_.options.centerMode === true) {\n                _.$list.css({\n                    padding: (_.options.centerPadding + ' 0px')\n                });\n            }\n        }\n\n        _.listWidth = _.$list.width();\n        _.listHeight = _.$list.height();\n\n\n        if (_.options.vertical === false && _.options.variableWidth === false) {\n            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);\n            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));\n\n        } else if (_.options.variableWidth === true) {\n            _.$slideTrack.width(5000 * _.slideCount);\n        } else {\n            _.slideWidth = Math.ceil(_.listWidth);\n            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));\n        }\n\n        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();\n        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);\n\n    };\n\n    Slick.prototype.setFade = function() {\n\n        var _ = this,\n            targetLeft;\n\n        _.$slides.each(function(index, element) {\n            targetLeft = (_.slideWidth * index) * -1;\n            if (_.options.rtl === true) {\n                $(element).css({\n                    position: 'relative',\n                    right: targetLeft,\n                    top: 0,\n                    zIndex: _.options.zIndex - 2,\n                    opacity: 0\n                });\n            } else {\n                $(element).css({\n                    position: 'relative',\n                    left: targetLeft,\n                    top: 0,\n                    zIndex: _.options.zIndex - 2,\n                    opacity: 0\n                });\n            }\n        });\n\n        _.$slides.eq(_.currentSlide).css({\n            zIndex: _.options.zIndex - 1,\n            opacity: 1\n        });\n\n    };\n\n    Slick.prototype.setHeight = function() {\n\n        var _ = this;\n\n        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n            _.$list.css('height', targetHeight);\n        }\n\n    };\n\n    Slick.prototype.setOption =\n    Slick.prototype.slickSetOption = function() {\n\n        /**\n         * accepts arguments in format of:\n         *\n         *  - for changing a single option's value:\n         *     .slick(\"setOption\", option, value, refresh )\n         *\n         *  - for changing a set of responsive options:\n         *     .slick(\"setOption\", 'responsive', [{}, ...], refresh )\n         *\n         *  - for updating multiple values at once (not responsive)\n         *     .slick(\"setOption\", { 'option': value, ... }, refresh )\n         */\n\n        var _ = this, l, item, option, value, refresh = false, type;\n\n        if( $.type( arguments[0] ) === 'object' ) {\n\n            option =  arguments[0];\n            refresh = arguments[1];\n            type = 'multiple';\n\n        } else if ( $.type( arguments[0] ) === 'string' ) {\n\n            option =  arguments[0];\n            value = arguments[1];\n            refresh = arguments[2];\n\n            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {\n\n                type = 'responsive';\n\n            } else if ( typeof arguments[1] !== 'undefined' ) {\n\n                type = 'single';\n\n            }\n\n        }\n\n        if ( type === 'single' ) {\n\n            _.options[option] = value;\n\n\n        } else if ( type === 'multiple' ) {\n\n            $.each( option , function( opt, val ) {\n\n                _.options[opt] = val;\n\n            });\n\n\n        } else if ( type === 'responsive' ) {\n\n            for ( item in value ) {\n\n                if( $.type( _.options.responsive ) !== 'array' ) {\n\n                    _.options.responsive = [ value[item] ];\n\n                } else {\n\n                    l = _.options.responsive.length-1;\n\n                    // loop through the responsive object and splice out duplicates.\n                    while( l >= 0 ) {\n\n                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {\n\n                            _.options.responsive.splice(l,1);\n\n                        }\n\n                        l--;\n\n                    }\n\n                    _.options.responsive.push( value[item] );\n\n                }\n\n            }\n\n        }\n\n        if ( refresh ) {\n\n            _.unload();\n            _.reinit();\n\n        }\n\n    };\n\n    Slick.prototype.setPosition = function() {\n\n        var _ = this;\n\n        _.setDimensions();\n\n        _.setHeight();\n\n        if (_.options.fade === false) {\n            _.setCSS(_.getLeft(_.currentSlide));\n        } else {\n            _.setFade();\n        }\n\n        _.$slider.trigger('setPosition', [_]);\n\n    };\n\n    Slick.prototype.setProps = function() {\n\n        var _ = this,\n            bodyStyle = document.body.style;\n\n        _.positionProp = _.options.vertical === true ? 'top' : 'left';\n\n        if (_.positionProp === 'top') {\n            _.$slider.addClass('slick-vertical');\n        } else {\n            _.$slider.removeClass('slick-vertical');\n        }\n\n        if (bodyStyle.WebkitTransition !== undefined ||\n            bodyStyle.MozTransition !== undefined ||\n            bodyStyle.msTransition !== undefined) {\n            if (_.options.useCSS === true) {\n                _.cssTransitions = true;\n            }\n        }\n\n        if ( _.options.fade ) {\n            if ( typeof _.options.zIndex === 'number' ) {\n                if( _.options.zIndex < 3 ) {\n                    _.options.zIndex = 3;\n                }\n            } else {\n                _.options.zIndex = _.defaults.zIndex;\n            }\n        }\n\n        if (bodyStyle.OTransform !== undefined) {\n            _.animType = 'OTransform';\n            _.transformType = '-o-transform';\n            _.transitionType = 'OTransition';\n            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n        }\n        if (bodyStyle.MozTransform !== undefined) {\n            _.animType = 'MozTransform';\n            _.transformType = '-moz-transform';\n            _.transitionType = 'MozTransition';\n            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;\n        }\n        if (bodyStyle.webkitTransform !== undefined) {\n            _.animType = 'webkitTransform';\n            _.transformType = '-webkit-transform';\n            _.transitionType = 'webkitTransition';\n            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n        }\n        if (bodyStyle.msTransform !== undefined) {\n            _.animType = 'msTransform';\n            _.transformType = '-ms-transform';\n            _.transitionType = 'msTransition';\n            if (bodyStyle.msTransform === undefined) _.animType = false;\n        }\n        if (bodyStyle.transform !== undefined && _.animType !== false) {\n            _.animType = 'transform';\n            _.transformType = 'transform';\n            _.transitionType = 'transition';\n        }\n        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);\n    };\n\n\n    Slick.prototype.setSlideClasses = function(index) {\n\n        var _ = this,\n            centerOffset, allSlides, indexOffset, remainder;\n\n        allSlides = _.$slider\n            .find('.slick-slide')\n            .removeClass('slick-active slick-center slick-current')\n            .attr('aria-hidden', 'true')\n            .attr('aria-label', function() {\n                return $(this).attr('aria-label').replace(' (centered)', '');\n            });\n\n        _.$slides\n            .eq(index)\n            .addClass('slick-current');\n\n        if (_.options.centerMode === true) {\n\n            var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;\n\n            centerOffset = Math.floor(_.options.slidesToShow / 2);\n\n            if (_.options.infinite === true) {\n\n                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {\n                    _.$slides\n                        .slice(index - centerOffset + evenCoef, index + centerOffset + 1)\n                        .addClass('slick-active')\n                        .removeAttr('aria-hidden');\n\n                } else {\n\n                    indexOffset = _.options.slidesToShow + index;\n                    allSlides\n                        .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)\n                        .addClass('slick-active')\n                        .removeAttr('aria-hidden');\n\n                }\n\n                if (index === 0) {\n\n                    allSlides\n                        .eq( _.options.slidesToShow + _.slideCount + 1 )\n                        .addClass('slick-center')\n                        .attr('aria-label', function() {\n                            return $(this).attr('aria-label') + ' (centered)';\n                        });\n\n                } else if (index === _.slideCount - 1) {\n\n                    allSlides\n                        .eq(_.options.slidesToShow)\n                        .addClass('slick-center')\n                        .attr('aria-label', function() {\n                            return $(this).attr('aria-label') + ' (centered)';\n                        });\n\n                }\n\n            }\n\n            _.$slides\n                .eq(index)\n                .addClass('slick-center')\n                .attr('aria-label', function() {\n                    return $(this).attr('aria-label') + ' (centered)';\n                });\n\n        } else {\n\n            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {\n\n                _.$slides\n                    .slice(index, index + _.options.slidesToShow)\n                    .addClass('slick-active')\n                    .removeAttr('aria-hidden');\n\n            } else if (allSlides.length <= _.options.slidesToShow) {\n\n                allSlides\n                    .addClass('slick-active')\n                    .removeAttr('aria-hidden');\n\n            } else {\n\n                remainder = _.slideCount % _.options.slidesToShow;\n                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;\n\n                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {\n\n                    allSlides\n                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)\n                        .addClass('slick-active')\n                        .removeAttr('aria-hidden');\n\n                } else {\n\n                    allSlides\n                        .slice(indexOffset, indexOffset + _.options.slidesToShow)\n                        .addClass('slick-active')\n                        .removeAttr('aria-hidden');\n\n                }\n\n            }\n\n        }\n\n        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {\n            _.lazyLoad();\n        }\n    };\n\n    Slick.prototype.setupInfinite = function() {\n\n        var _ = this,\n            i, slideIndex, infiniteCount;\n\n        if (_.options.fade === true) {\n            _.options.centerMode = false;\n        }\n\n        if (_.options.infinite === true && _.options.fade === false) {\n\n            slideIndex = null;\n\n            if (_.slideCount > _.options.slidesToShow) {\n\n                if (_.options.centerMode === true) {\n                    infiniteCount = _.options.slidesToShow + 1;\n                } else {\n                    infiniteCount = _.options.slidesToShow;\n                }\n\n                for (i = _.slideCount; i > (_.slideCount -\n                        infiniteCount); i -= 1) {\n                    slideIndex = i - 1;\n                    $(_.$slides[slideIndex]).clone(true).attr('id', '')\n                        .attr('data-slick-index', slideIndex - _.slideCount)\n                        .prependTo(_.$slideTrack).addClass('slick-cloned');\n                }\n                for (i = 0; i < infiniteCount  + _.slideCount; i += 1) {\n                    slideIndex = i;\n                    $(_.$slides[slideIndex]).clone(true).attr('id', '')\n                        .attr('data-slick-index', slideIndex + _.slideCount)\n                        .appendTo(_.$slideTrack).addClass('slick-cloned');\n                }\n                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {\n                    $(this).attr('id', '');\n                });\n\n            }\n\n        }\n\n    };\n\n    Slick.prototype.interrupt = function( toggle ) {\n\n        var _ = this;\n\n        if( !toggle ) {\n            _.autoPlay();\n        }\n        _.interrupted = toggle;\n\n    };\n\n    Slick.prototype.selectHandler = function(event) {\n\n        var _ = this;\n\n        var targetElement =\n            $(event.target).is('.slick-slide') ?\n                $(event.target) :\n                $(event.target).parents('.slick-slide');\n\n        var index = parseInt(targetElement.attr('data-slick-index'));\n\n        if (!index) index = 0;\n\n        if (_.slideCount <= _.options.slidesToShow) {\n\n            _.slideHandler(index, false, true);\n            return;\n\n        }\n\n        _.slideHandler(index);\n\n    };\n\n    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {\n\n        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,\n            _ = this, navTarget;\n\n        sync = sync || false;\n\n        if (_.animating === true && _.options.waitForAnimate === true) {\n            return;\n        }\n\n        if (_.options.fade === true && _.currentSlide === index) {\n            return;\n        }\n\n        if (sync === false) {\n            _.asNavFor(index);\n        }\n\n        targetSlide = index;\n        targetLeft = _.getLeft(targetSlide);\n        slideLeft = _.getLeft(_.currentSlide);\n\n        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;\n\n        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {\n            if (_.options.fade === false) {\n                targetSlide = _.currentSlide;\n                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {\n                    _.animateSlide(slideLeft, function() {\n                        _.postSlide(targetSlide);\n                    });\n                } else {\n                    _.postSlide(targetSlide);\n                }\n            }\n            return;\n        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {\n            if (_.options.fade === false) {\n                targetSlide = _.currentSlide;\n                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {\n                    _.animateSlide(slideLeft, function() {\n                        _.postSlide(targetSlide);\n                    });\n                } else {\n                    _.postSlide(targetSlide);\n                }\n            }\n            return;\n        }\n\n        if ( _.options.autoplay ) {\n            clearInterval(_.autoPlayTimer);\n        }\n\n        if (targetSlide < 0) {\n            if (_.slideCount % _.options.slidesToScroll !== 0) {\n                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);\n            } else {\n                animSlide = _.slideCount + targetSlide;\n            }\n        } else if (targetSlide >= _.slideCount) {\n            if (_.slideCount % _.options.slidesToScroll !== 0) {\n                animSlide = 0;\n            } else {\n                animSlide = targetSlide - _.slideCount;\n            }\n        } else {\n            animSlide = targetSlide;\n        }\n\n        _.animating = true;\n\n        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);\n\n        oldSlide = _.currentSlide;\n        _.currentSlide = animSlide;\n\n        _.setSlideClasses(_.currentSlide);\n\n        if ( _.options.asNavFor ) {\n\n            navTarget = _.getNavTarget();\n            navTarget = navTarget.slick('getSlick');\n\n            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {\n                navTarget.setSlideClasses(_.currentSlide);\n            }\n\n        }\n\n        _.updateDots();\n        _.updateArrows();\n\n        if (_.options.fade === true) {\n            if (dontAnimate !== true) {\n\n                _.fadeSlideOut(oldSlide);\n\n                _.fadeSlide(animSlide, function() {\n                    _.postSlide(animSlide);\n                });\n\n            } else {\n                _.postSlide(animSlide);\n            }\n            _.animateHeight();\n            return;\n        }\n\n        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {\n            _.animateSlide(targetLeft, function() {\n                _.postSlide(animSlide);\n            });\n        } else {\n            _.postSlide(animSlide);\n        }\n\n    };\n\n    Slick.prototype.startLoad = function() {\n\n        var _ = this;\n\n        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n\n            _.$prevArrow.hide();\n            _.$nextArrow.hide();\n\n        }\n\n        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n            _.$dots.hide();\n\n        }\n\n        _.$slider.addClass('slick-loading');\n\n    };\n\n    Slick.prototype.swipeDirection = function() {\n\n        var xDist, yDist, r, swipeAngle, _ = this;\n\n        xDist = _.touchObject.startX - _.touchObject.curX;\n        yDist = _.touchObject.startY - _.touchObject.curY;\n        r = Math.atan2(yDist, xDist);\n\n        swipeAngle = Math.round(r * 180 / Math.PI);\n        if (swipeAngle < 0) {\n            swipeAngle = 360 - Math.abs(swipeAngle);\n        }\n\n        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {\n            return (_.options.rtl === false ? 'left' : 'right');\n        }\n        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {\n            return (_.options.rtl === false ? 'left' : 'right');\n        }\n        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {\n            return (_.options.rtl === false ? 'right' : 'left');\n        }\n        if (_.options.verticalSwiping === true) {\n            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {\n                return 'down';\n            } else {\n                return 'up';\n            }\n        }\n\n        return 'vertical';\n\n    };\n\n    Slick.prototype.swipeEnd = function(event) {\n\n        var _ = this,\n            slideCount,\n            direction;\n\n        _.dragging = false;\n        _.swiping = false;\n\n        if (_.scrolling) {\n            _.scrolling = false;\n            return false;\n        }\n\n        _.interrupted = false;\n        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;\n\n        if ( _.touchObject.curX === undefined ) {\n            return false;\n        }\n\n        if ( _.touchObject.edgeHit === true ) {\n            _.$slider.trigger('edge', [_, _.swipeDirection() ]);\n        }\n\n        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {\n\n            direction = _.swipeDirection();\n\n            switch ( direction ) {\n\n                case 'left':\n                case 'down':\n\n                    slideCount =\n                        _.options.swipeToSlide ?\n                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :\n                            _.currentSlide + _.getSlideCount();\n\n                    _.currentDirection = 0;\n\n                    break;\n\n                case 'right':\n                case 'up':\n\n                    slideCount =\n                        _.options.swipeToSlide ?\n                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :\n                            _.currentSlide - _.getSlideCount();\n\n                    _.currentDirection = 1;\n\n                    break;\n\n                default:\n\n\n            }\n\n            if( direction != 'vertical' ) {\n\n                _.slideHandler( slideCount );\n                _.touchObject = {};\n                _.$slider.trigger('swipe', [_, direction ]);\n\n            }\n\n        } else {\n\n            if ( _.touchObject.startX !== _.touchObject.curX ) {\n\n                _.slideHandler( _.currentSlide );\n                _.touchObject = {};\n\n            }\n\n        }\n\n    };\n\n    Slick.prototype.swipeHandler = function(event) {\n\n        var _ = this;\n\n        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {\n            return;\n        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {\n            return;\n        }\n\n        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?\n            event.originalEvent.touches.length : 1;\n\n        _.touchObject.minSwipe = _.listWidth / _.options\n            .touchThreshold;\n\n        if (_.options.verticalSwiping === true) {\n            _.touchObject.minSwipe = _.listHeight / _.options\n                .touchThreshold;\n        }\n\n        switch (event.data.action) {\n\n            case 'start':\n                _.swipeStart(event);\n                break;\n\n            case 'move':\n                _.swipeMove(event);\n                break;\n\n            case 'end':\n                _.swipeEnd(event);\n                break;\n\n        }\n\n    };\n\n    Slick.prototype.swipeMove = function(event) {\n\n        var _ = this,\n            edgeWasHit = false,\n            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;\n\n        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;\n\n        if (!_.dragging || _.scrolling || touches && touches.length !== 1) {\n            return false;\n        }\n\n        curLeft = _.getLeft(_.currentSlide);\n\n        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;\n        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;\n\n        _.touchObject.swipeLength = Math.round(Math.sqrt(\n            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));\n\n        verticalSwipeLength = Math.round(Math.sqrt(\n            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));\n\n        if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {\n            _.scrolling = true;\n            return false;\n        }\n\n        if (_.options.verticalSwiping === true) {\n            _.touchObject.swipeLength = verticalSwipeLength;\n        }\n\n        swipeDirection = _.swipeDirection();\n\n        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {\n            _.swiping = true;\n            event.preventDefault();\n        }\n\n        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);\n        if (_.options.verticalSwiping === true) {\n            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;\n        }\n\n\n        swipeLength = _.touchObject.swipeLength;\n\n        _.touchObject.edgeHit = false;\n\n        if (_.options.infinite === false) {\n            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {\n                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;\n                _.touchObject.edgeHit = true;\n            }\n        }\n\n        if (_.options.vertical === false) {\n            _.swipeLeft = curLeft + swipeLength * positionOffset;\n        } else {\n            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;\n        }\n        if (_.options.verticalSwiping === true) {\n            _.swipeLeft = curLeft + swipeLength * positionOffset;\n        }\n\n        if (_.options.fade === true || _.options.touchMove === false) {\n            return false;\n        }\n\n        if (_.animating === true) {\n            _.swipeLeft = null;\n            return false;\n        }\n\n        _.setCSS(_.swipeLeft);\n\n    };\n\n    Slick.prototype.swipeStart = function(event) {\n\n        var _ = this,\n            touches;\n\n        _.interrupted = true;\n\n        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {\n            _.touchObject = {};\n            return false;\n        }\n\n        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {\n            touches = event.originalEvent.touches[0];\n        }\n\n        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;\n        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;\n\n        _.dragging = true;\n\n    };\n\n    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {\n\n        var _ = this;\n\n        if (_.$slidesCache !== null) {\n\n            _.unload();\n\n            _.$slideTrack.children(this.options.slide).detach();\n\n            _.$slidesCache.appendTo(_.$slideTrack);\n\n            _.reinit();\n\n        }\n\n    };\n\n    Slick.prototype.unload = function() {\n\n        var _ = this;\n\n        $('.slick-cloned', _.$slider).remove();\n\n        if (_.$dots) {\n            _.$dots.remove();\n        }\n\n        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {\n            _.$prevArrow.remove();\n        }\n\n        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {\n            _.$nextArrow.remove();\n        }\n\n        _.$slides\n            .removeClass('slick-slide slick-active slick-visible slick-current')\n            .attr('aria-hidden', 'true')\n            .css('width', '');\n\n    };\n\n    Slick.prototype.unslick = function(fromBreakpoint) {\n\n        var _ = this;\n        _.$slider.trigger('unslick', [_, fromBreakpoint]);\n        _.destroy();\n\n    };\n\n    Slick.prototype.updateArrows = function() {\n\n        var _ = this,\n            centerOffset;\n\n        centerOffset = Math.floor(_.options.slidesToShow / 2);\n\n        if ( _.options.arrows === true &&\n            _.slideCount > _.options.slidesToShow &&\n            !_.options.infinite ) {\n\n            _.$prevArrow.removeClass('slick-disabled').prop('disabled', false);\n            _.$nextArrow.removeClass('slick-disabled').prop('disabled', false);\n\n            if (_.currentSlide === 0) {\n\n                _.$prevArrow.addClass('slick-disabled').prop('disabled', true);\n                _.$nextArrow.removeClass('slick-disabled').prop('disabled', false);\n\n            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {\n\n                _.$nextArrow.addClass('slick-disabled').prop('disabled', true);\n                _.$prevArrow.removeClass('slick-disabled').prop('disabled', false);\n\n            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {\n\n                _.$nextArrow.addClass('slick-disabled').prop('disabled', true);\n                _.$prevArrow.removeClass('slick-disabled').prop('disabled', false);\n\n            }\n\n        }\n\n    };\n\n    Slick.prototype.updateDots = function() {\n\n        var _ = this;\n\n        if (_.$dots !== null) {\n\n            _.$dots\n                .find('li')\n                    .removeClass('slick-active')\n                    .find('button')\n                        .removeAttr('aria-current')\n                        .end()\n                    .end();\n\n            _.$dots\n                .find('li')\n                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))\n                    .addClass('slick-active')\n                    .find('button')\n                        .attr('aria-current', true)\n                        .end()\n                    .end();\n\n        }\n\n    };\n\n    Slick.prototype.updateSlideVisibility = function() {\n        var _ = this;\n\n        _.$slideTrack\n            .find('.slick-slide')\n                .attr('aria-hidden', 'true')\n                .find('a, input, button, select')\n                    .attr('tabindex', '-1');\n\n        _.$slideTrack\n            .find('.slick-active')\n                .removeAttr('aria-hidden')\n                .find('a, input, button, select')\n                    .removeAttr('tabindex');\n    }\n\n    Slick.prototype.visibility = function() {\n\n        var _ = this;\n\n        if ( _.options.autoplay ) {\n\n            if ( document[_.hidden] ) {\n\n                _.interrupted = true;\n\n            } else {\n\n                _.interrupted = false;\n\n            }\n\n        }\n\n    };\n\n    $.fn.slick = function() {\n        var _ = this,\n            opt = arguments[0],\n            args = Array.prototype.slice.call(arguments, 1),\n            l = _.length,\n            i,\n            ret;\n        for (i = 0; i < l; i++) {\n            if (typeof opt == 'object' || typeof opt == 'undefined')\n                _[i].slick = new Slick(_[i], opt);\n            else\n                ret = _[i].slick[opt].apply(_[i].slick, args);\n            if (typeof ret != 'undefined') return ret;\n        }\n        return _;\n    };\n\n}));\n","import '@accessible360/accessible-slick';\r\n\r\nconst SELECTORS = {\r\n    main: '._js-gallery-main-image',\r\n    mainGallery: '.main-gallery',\r\n    thumbs: '._js-gallery-nav',\r\n    thumbsSide: '._js-gallery-side-nav',\r\n    mainThumbs: '._js-gallery-next-btn',\r\n    sideGallery: '.side-gallery',\r\n    largeImage: '.large-image',\r\n    showcasedItem: '.main-gallery__showcased',\r\n    indexable: '.thumbnail'\r\n};\r\n\r\nconst slickslide = () => {\r\n    if ($('._js-gallery').length > 0) {\r\n        let currentSideItemIndex = 0;\r\n        const windowSize = $(window).width();\r\n        const mainGallery = $(SELECTORS.mainGallery);\r\n        const showcasedItem = $(SELECTORS.showcasedItem);\r\n        const sideGalleryItems = $(SELECTORS.thumbsSide).parent().find(SELECTORS.largeImage);\r\n        const thumbnailItems = $(SELECTORS.thumbsSide).parent().find(SELECTORS.indexable);\r\n        let showcasedItemLargeImage;\r\n\r\n        mainGallery.hide();\r\n\r\n        $(SELECTORS.thumbs).removeClass('is-hidden');\r\n\r\n        //Set first image in main image div\r\n        if (thumbnailItems.length > 0) {\r\n            thumbnailItems[0].click;\r\n            $(SELECTORS.showcasedItem).append(sideGalleryItems[0].cloneNode(true));\r\n\r\n            // Now that an first image has been created, we can populate the variable for that image\r\n            showcasedItemLargeImage = $(SELECTORS.showcasedItem).find(SELECTORS.largeImage)[0];\r\n\r\n            if (showcasedItemLargeImage[0] && showcasedItemLargeImage[0].nodeName === 'VIDEO'){\r\n                showcasedItemLargeImage[0].play();\r\n            }\r\n            $(SELECTORS.main).append($('._jsloveContainer'));\r\n        }\r\n\r\n\r\n        $(SELECTORS.indexable).on('click', function (e) {\r\n            const current = $(this);\r\n\r\n            removePreviousActiveSidePanel();\r\n\r\n            for (var i = 0; i < thumbnailItems.length; i++) {\r\n                if (current[0] === thumbnailItems[i]) {\r\n                    currentSideItemIndex = i;\r\n                }\r\n            }\r\n\r\n            replaceLargeImage();\r\n        });\r\n\r\n        // ARROW NAVIGATION\r\n        $('body').on('click', '.slick-arrow', function () {\r\n            $('.slick-slide.slick-active').each(function () {\r\n                if (window.lazySizes) {\r\n                    window.lazySizes.init();\r\n                }\r\n            });\r\n        });\r\n\r\n        // MAIN IMAGE NAVIGATION\r\n        $(SELECTORS.mainThumbs).on('click', function(e) {\r\n            const button = $(this);\r\n            const amountOfItems = sideGalleryItems.length;\r\n\r\n            //Remove previous selected galleryItem from sidepanel\r\n            removePreviousActiveSidePanel();\r\n\r\n            //Navigate forward in gallery\r\n            if(button.hasClass('right-arrow')) {\r\n\r\n                //At last image of imagelist\r\n                if(currentSideItemIndex === amountOfItems -1) {\r\n                    currentSideItemIndex = 0;\r\n                }else{\r\n                    currentSideItemIndex = currentSideItemIndex +1;\r\n                }\r\n            }\r\n\r\n            //Navigate backwards in gallery\r\n            else if(button.hasClass('left-arrow')){\r\n\r\n                if(currentSideItemIndex === 0) {\r\n                    currentSideItemIndex = sideGalleryItems.length -1;\r\n                }else{\r\n                    currentSideItemIndex = currentSideItemIndex -1;\r\n                }\r\n            }\r\n\r\n            replaceLargeImage();\r\n        });\r\n\r\n        //Show active image on sidegallery\r\n        function replaceLargeImage() {\r\n            thumbnailItems[currentSideItemIndex].classList.add('active-slide');\r\n\r\n            const currentItemToDisplay = sideGalleryItems[currentSideItemIndex];\r\n            $(SELECTORS.showcasedItem).html(currentItemToDisplay.cloneNode(true));\r\n\r\n            if (currentItemToDisplay.nodeName === 'VIDEO') {\r\n                $(SELECTORS.showcasedItem).find(SELECTORS.largeImage)[0].play();\r\n            }\r\n\r\n            runMainImageAnimation();\r\n        }\r\n\r\n        function removePreviousActiveSidePanel(){\r\n            if (thumbnailItems.length > 0){\r\n                for (var i = 0; i < thumbnailItems.length; i++) {\r\n                    if (thumbnailItems[i].classList.contains('active-slide')) {\r\n                        thumbnailItems[i].classList.remove('active-slide');\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        function runMainImageAnimation(){\r\n            showcasedItem.hide();\r\n            showcasedItem.fadeIn();\r\n        }\r\n\r\n        $(window).on('load',function () {\r\n            if (windowSize < 600) {\r\n                const mobileGallery = $('#mobile-gallery');\r\n                mobileGallery.append(mainGallery);\r\n            }\r\n\r\n            $(SELECTORS.mainThumbs).css({opacity:1});\r\n            $('.loader').hide();\r\n            mainGallery.show();\r\n\r\n        });\r\n\r\n        // block / generic\r\n        $('._js-gallery-generic').slick({\r\n            slidesToShow: 1,\r\n            slidesToScroll: 1,\r\n            arrows: true,\r\n            infinite: true\r\n        });\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    slickslide();\r\n};\r\n","const getData = videoid => {\r\n    /**\r\n     * Extract id if videoid is provided as an url: \"https://vimeo.com/123\"\r\n     */\r\n    if(typeof(videoid) === 'string') {\r\n        videoid = videoid.replace('https://vimeo.com/', '');\r\n    }\r\n\r\n    /**\r\n     * Get meta data\r\n     */\r\n    $.getJSON('https://vimeo.com/api/v2/video/' + videoid + '.json',\r\n        {\r\n            format: 'json'\r\n        })\r\n        .done(function(data) {\r\n            if (!data[0].description) {\r\n                return false;\r\n            }\r\n            data = {\r\n                '@context': 'https://schema.org',\r\n                '@type': 'VideoObject',\r\n                'contentUrl': data[0].url,\r\n                'name': data[0].title,\r\n                'description': data[0].description,\r\n                'thumbnailUrl': data[0].thumbnail_medium,\r\n                'uploadDate': data[0].upload_date\r\n            };\r\n\r\n            let script;\r\n            script = document.createElement('script');\r\n            script.type = 'application/ld+json';\r\n            script.innerHTML = JSON.stringify(data);\r\n            document.getElementsByTagName('head')[0].appendChild(script);\r\n        });\r\n};\r\n\r\nconst structuredVideoData = () => {\r\n    $('[data-videoobject-id]').each(function() {\r\n        getData($(this).data('videoobject-id'));\r\n    });\r\n};\r\n\r\nexport const init = () => {\r\n    structuredVideoData();\r\n};\r\n","const tabs = () => {\r\n    const hash = window.location.hash.replace('#', '');\r\n\r\n    // Tab click\r\n    $('._js-tab-trigger').each(function() {\r\n        $(this).on('click',\r\n            function(event) {\r\n                event.preventDefault();\r\n\r\n                const parent = $(this).closest('._js-tab-wrapper');\r\n                const contentTabs = parent.find('._js-tab-trigger');\r\n                const contentPanels = parent.find('._js-tab-content');\r\n                const target = $(this).attr('aria-controls');\r\n\r\n                contentTabs.each(function() {\r\n                    $(this).removeClass('is-active');\r\n                    $(this).attr('aria-expanded', 'false');\r\n                });\r\n\r\n                contentPanels.each(function() {\r\n                    $(this).removeClass('is-active');\r\n                });\r\n\r\n                $(this).attr('aria-expanded', 'true');\r\n                $(this).addClass('is-active');\r\n                $('#' + target).addClass('is-active');\r\n\r\n                if (history.pushState) {\r\n                    history.pushState(null, null, '#' + target);\r\n                } else {\r\n                    location.hash = target;\r\n                }\r\n\r\n                // Special cases\r\n                if (target === 'login-tab-2') {\r\n                    $('#orderForm').hide();\r\n                } else if (target === 'login-tab-1') {\r\n                    $('#orderForm').show();\r\n                } else if (target === 'search-results-products') {\r\n                    $('#product-categories:not(.is-hidden)').show();\r\n                    $('#search-results-articles').hide();\r\n                    $('#back-to-products').hide();\r\n                } else if (target === 'search-results-articles') {\r\n                    $('#product-categories').hide();\r\n                    $('#search-results-articles').show();\r\n                    $('#back-to-products').show();\r\n                    if (window.lazySizes) {\r\n                        window.lazySizes.init();\r\n                    }\r\n                }\r\n            });\r\n    });\r\n\r\n    // Check hash\r\n    if (hash) {\r\n        $('._js-tab-trigger').each(function() {\r\n            if ($(this).attr('aria-controls') === hash) {\r\n                $(this).click();\r\n            }\r\n        });\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    tabs();\r\n};\r\n","let resizedFinished = null;\r\nconst teaserblock = () => {\r\n    const mq = window.matchMedia('(min-width: 64em)');\r\n    checkMq();\r\n\r\n    function checkMq() {\r\n        if ($('._js-gallery-teaserblock').length) {\r\n            $('._js-gallery-teaserblock').each(function() {\r\n                if (mq.matches) {\r\n                    if (!$(this).hasClass('slick-initialized')) {\r\n                        $(this).slick({\r\n                            slidesToShow: 4,\r\n                            slidesToScroll: 1,\r\n                            arrows: true,\r\n                            infinite: false\r\n                        });\r\n                    }\r\n                } else {\r\n                    if ($(this).hasClass('slick-initialized')) {\r\n                        $(this).slick('unslick');\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    $(window).on('resize', function () {\r\n        clearTimeout(resizedFinished);\r\n        resizedFinished = setTimeout(function () {\r\n            checkMq();\r\n        }, 250);\r\n    });\r\n};\r\n\r\nexport const init = () => {\r\n    teaserblock();\r\n};\r\n","const scaleVideo = (el, width, height) => {\r\n    const srcWidth = width;\r\n    const srcHeight = height;\r\n    const ratio = srcWidth / srcHeight;\r\n\r\n    if (ratio >= 1) {\r\n        $('#' + el).closest('.category-grid__item').addClass('category-grid__item--double');\r\n        $('#' + el).closest('.gallery__item').css('grid-column', 'span 2');\r\n    }\r\n};\r\n\r\nconst controlvideo = el => {\r\n    const videoElement = document.getElementById(el);\r\n    const controls = videoElement.nextElementSibling;\r\n\r\n    // Video controls\r\n    $(controls).on('click', function () {\r\n        if (videoElement.paused) {\r\n            $(controls).removeClass('playbtn');\r\n            videoElement.play();\r\n        } else {\r\n            videoElement.pause();\r\n            $(controls).addClass('playbtn');\r\n        }\r\n    });\r\n};\r\n\r\n\r\nconst video = () => {\r\n    let playerLarge;\r\n    let options;\r\n    const videoPresent = $('#heroVideo').length;\r\n    const fullVideoPresent = $('#fullvideo').length;\r\n\r\n    if (window.Vimeo) {\r\n        if (fullVideoPresent !== 0 && videoPresent == 0) {\r\n\r\n            options = {\r\n                width: 1080,\r\n                loop: true\r\n            };\r\n\r\n            playerLarge = new Vimeo.Player('heroVideoLarge', options);\r\n\r\n            playerLarge.setVolume(.5);\r\n\r\n            $('._js-open-video').on('click', function () {\r\n                playerLarge.play().then(function () {\r\n                    // the video was paused\r\n                    playerLarge.setVolume(.5);\r\n                }).catch(function (reason) {\r\n                    // Error\r\n                    console.log(reason);\r\n                });\r\n            });\r\n\r\n            $('._js-close-video').on('click', function () {\r\n                playerLarge.pause();\r\n            });\r\n        }\r\n        if (fullVideoPresent !== 0 && videoPresent !== 0) {\r\n\r\n            options = {\r\n                width: 1080,\r\n                loop: true\r\n            };\r\n\r\n            const player = new window.Vimeo.Player('heroVideo', options);\r\n            playerLarge = new window.Vimeo.Player('heroVideoLarge', options);\r\n\r\n            player.setVolume(0);\r\n            playerLarge.setVolume(.5);\r\n\r\n            $('._js-open-video').on('click', function () {\r\n                player.pause();\r\n                playerLarge.play().then(function () {\r\n                    // the video was paused\r\n                    playerLarge.setVolume(.5);\r\n                }).catch(function (reason) {\r\n                    // Error\r\n                    console.log(reason);\r\n                });\r\n            });\r\n\r\n            $('._js-close-video').on('click', function () {\r\n                playerLarge.pause();\r\n                player.play().then(function () {\r\n                    player.setVolume(0);\r\n                }).catch(function (reason) {\r\n                    // Error\r\n                    console.log(reason);\r\n                });\r\n            });\r\n        }\r\n\r\n        // Product video\r\n        $('._js-product-video').each(function () {\r\n            const vidId = $(this).attr('id');\r\n            const vid = document.getElementById(vidId);\r\n            controlvideo(vidId);\r\n            const videoReady = vid.readyState;\r\n            if (videoReady >= 2) {\r\n                scaleVideo(vidId, vid.videoWidth, vid.videoHeight);\r\n            } else {\r\n                vid.addEventListener('loadedmetadata', function () {\r\n                    scaleVideo(vidId, vid.videoWidth, vid.videoHeight);\r\n                });\r\n            }\r\n        });\r\n\r\n        // Teaser video\r\n        $('._js-teaser-video').each(function () {\r\n            const videoElement = document.getElementById($(this).attr('id'));\r\n            playpause(videoElement);\r\n        });\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    video();\r\n};\r\n","export default class vimeoBlock {\r\n    constructor(element) {\r\n        const videoId = element.dataset.videoId;\r\n        const autostart = element.dataset.videoAutostart;\r\n        const background = element.dataset.videoBackground;\r\n        const mute = element.dataset.videoMuted;\r\n        const muted = autostart === true ? true : mute === true ? true : false;\r\n\r\n        const options = {\r\n            width: 1080,\r\n            autopause: true,\r\n            loop: true,\r\n            autoplay: autostart,\r\n            background: background,\r\n            muted: muted,\r\n            title: false,\r\n            byline: false,\r\n            id: videoId,\r\n        };\r\n\r\n        window.addEventListener(\"load\", () => {\r\n            new window.Vimeo.Player(\"video-\" + videoId, options);\r\n        });\r\n    }\r\n}\r\n","const afterpayFunctions = {\r\n    toggle: (container, active) => {\r\n        const afterpayElements = document.querySelectorAll('._js-afterpay');\r\n        const afterpayElementsInputs = document.querySelectorAll('._js-afterpay-input');\r\n        const currentAfterpayElement = container.querySelector('._js-afterpay');\r\n        const currentAfterpayElementInputs = container.querySelectorAll('._js-afterpay-input');\r\n\r\n        afterpayElements.forEach(afterpayElement => {\r\n            afterpayElement.classList.remove('is-active');\r\n        });\r\n\r\n        afterpayElementsInputs.forEach(afterpayElementInput => {\r\n            afterpayElementInput.setAttribute('required', false);\r\n            afterpayElementInput.setAttribute('disabled', true);\r\n        });\r\n\r\n        if (active === true) {\r\n            if (currentAfterpayElement)\r\n                currentAfterpayElement.classList.add('is-active');\r\n            if (currentAfterpayElementInputs) {\r\n                currentAfterpayElementInputs.forEach(currentAfterpayElementInput => {\r\n                    currentAfterpayElementInput.setAttribute('required', true);\r\n                    currentAfterpayElementInput.removeAttribute('disabled');\r\n                });\r\n            }\r\n        }\r\n    },\r\n\r\n    init: () => {\r\n        //Arvato\r\n        const optionInvoice = document.querySelector('._js-payment-option[value=afterpay_invoice]');\r\n        const optionInstallment = document.querySelector('._js-payment-option[value=afterpay_installment]');\r\n\r\n        //Check Arvato on pageload\r\n        if (optionInvoice && optionInvoice.checked) {\r\n            afterpayFunctions.toggle(optionInvoice.closest('.payment-option__item'), true);\r\n        } else if (optionInstallment && optionInstallment.checked) {\r\n            afterpayFunctions.toggle(optionInstallment.closest('.payment-option__item'), true);\r\n        }\r\n\r\n        //Check Arrvato on click\r\n        document.querySelectorAll('._js-payment-option')\r\n            .forEach(option => {\r\n                option.addEventListener('change', (e) => {\r\n                    const afterpayStatus = e.target.checked;\r\n                    afterpayFunctions.toggle(e.target.closest('.payment-options'), false);\r\n                    afterpayFunctions.toggle(e.target.closest('.payment-option__item'), afterpayStatus);\r\n                });\r\n            });\r\n    }\r\n};\r\n\r\nexport const init = () => {\r\n    afterpayFunctions.init();\r\n};\r\n","import { getCookie, setCookie } from '../../utils';\r\n\r\ninterface Window {\r\n    zESettings: any;\r\n    zE: (command: string, ...args: any[]) => void;\r\n}\r\n\r\ndeclare var window: Window;\r\n\r\nexport default class Chat {\r\n    private element: HTMLElement;\r\n\r\n    constructor(element: HTMLElement) {\r\n        this.element = element;\r\n\r\n        const chatActive = getCookie('chatOpen') === 'opened';\r\n        const zenid = this.element.dataset.zenid;\r\n\r\n        const load = (id: string | undefined) => {\r\n            if (!id) return;\r\n\r\n            const script = document.createElement('script');\r\n            const scriptURL = 'https://static.zdassets.com/ekr/snippet.js?key=' + id;\r\n            script.type = 'text/javascript';\r\n            script.id = 'ze-snippet';\r\n            script.async = false;\r\n            script.src = scriptURL;\r\n            document.getElementsByTagName('head')[0].appendChild(script);\r\n            this.element.classList.add('is-active');\r\n            window.zESettings = {\r\n                webWidget: {\r\n                    launcher: {\r\n                        chatLabel: {\r\n                            '*': 'Chat'\r\n                        },\r\n                        label: {\r\n                            '*': 'Åpne'\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            setTimeout(() => {\r\n                window.zE('webWidget', 'setLocale', 'no');\r\n            }, 3000);\r\n        };\r\n\r\n        if (chatActive) {\r\n            load(zenid);\r\n            this.element.classList.add('is-active');\r\n        }\r\n\r\n        this.element.addEventListener('click', () => {\r\n            setCookie('chatOpen', 'opened', '1');\r\n            load(zenid);\r\n        });\r\n    }\r\n}\r\n","/**\n* @vue/shared v3.4.38\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str, expectsLowerCase) {\n  const set = new Set(str.split(\",\"));\n  return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n  const i = arr.indexOf(el);\n  if (i > -1) {\n    arr.splice(i, 1);\n  }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n  return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n  return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n  // the leading comma is intentional so empty string \"\" is also included\n  \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n  \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (str) => {\n    const hit = cache[str];\n    return hit || (cache[str] = fn(str));\n  };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n  return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n  (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n  const s = str ? `on${capitalize(str)}` : ``;\n  return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n  for (let i = 0; i < fns.length; i++) {\n    fns[i](...arg);\n  }\n};\nconst def = (obj, key, value, writable = false) => {\n  Object.defineProperty(obj, key, {\n    configurable: true,\n    enumerable: false,\n    writable,\n    value\n  });\n};\nconst looseToNumber = (val) => {\n  const n = parseFloat(val);\n  return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n  const n = isString(val) ? Number(val) : NaN;\n  return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n  return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n  return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n  \"TEXT\": 1,\n  \"1\": \"TEXT\",\n  \"CLASS\": 2,\n  \"2\": \"CLASS\",\n  \"STYLE\": 4,\n  \"4\": \"STYLE\",\n  \"PROPS\": 8,\n  \"8\": \"PROPS\",\n  \"FULL_PROPS\": 16,\n  \"16\": \"FULL_PROPS\",\n  \"NEED_HYDRATION\": 32,\n  \"32\": \"NEED_HYDRATION\",\n  \"STABLE_FRAGMENT\": 64,\n  \"64\": \"STABLE_FRAGMENT\",\n  \"KEYED_FRAGMENT\": 128,\n  \"128\": \"KEYED_FRAGMENT\",\n  \"UNKEYED_FRAGMENT\": 256,\n  \"256\": \"UNKEYED_FRAGMENT\",\n  \"NEED_PATCH\": 512,\n  \"512\": \"NEED_PATCH\",\n  \"DYNAMIC_SLOTS\": 1024,\n  \"1024\": \"DYNAMIC_SLOTS\",\n  \"DEV_ROOT_FRAGMENT\": 2048,\n  \"2048\": \"DEV_ROOT_FRAGMENT\",\n  \"HOISTED\": -1,\n  \"-1\": \"HOISTED\",\n  \"BAIL\": -2,\n  \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n  [1]: `TEXT`,\n  [2]: `CLASS`,\n  [4]: `STYLE`,\n  [8]: `PROPS`,\n  [16]: `FULL_PROPS`,\n  [32]: `NEED_HYDRATION`,\n  [64]: `STABLE_FRAGMENT`,\n  [128]: `KEYED_FRAGMENT`,\n  [256]: `UNKEYED_FRAGMENT`,\n  [512]: `NEED_PATCH`,\n  [1024]: `DYNAMIC_SLOTS`,\n  [2048]: `DEV_ROOT_FRAGMENT`,\n  [-1]: `HOISTED`,\n  [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n  \"ELEMENT\": 1,\n  \"1\": \"ELEMENT\",\n  \"FUNCTIONAL_COMPONENT\": 2,\n  \"2\": \"FUNCTIONAL_COMPONENT\",\n  \"STATEFUL_COMPONENT\": 4,\n  \"4\": \"STATEFUL_COMPONENT\",\n  \"TEXT_CHILDREN\": 8,\n  \"8\": \"TEXT_CHILDREN\",\n  \"ARRAY_CHILDREN\": 16,\n  \"16\": \"ARRAY_CHILDREN\",\n  \"SLOTS_CHILDREN\": 32,\n  \"32\": \"SLOTS_CHILDREN\",\n  \"TELEPORT\": 64,\n  \"64\": \"TELEPORT\",\n  \"SUSPENSE\": 128,\n  \"128\": \"SUSPENSE\",\n  \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n  \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n  \"COMPONENT_KEPT_ALIVE\": 512,\n  \"512\": \"COMPONENT_KEPT_ALIVE\",\n  \"COMPONENT\": 6,\n  \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n  \"STABLE\": 1,\n  \"1\": \"STABLE\",\n  \"DYNAMIC\": 2,\n  \"2\": \"DYNAMIC\",\n  \"FORWARDED\": 3,\n  \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n  [1]: \"STABLE\",\n  [2]: \"DYNAMIC\",\n  [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n  start = Math.max(0, Math.min(start, source.length));\n  end = Math.max(0, Math.min(end, source.length));\n  if (start > end) return \"\";\n  let lines = source.split(/(\\r?\\n)/);\n  const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n  lines = lines.filter((_, idx) => idx % 2 === 0);\n  let count = 0;\n  const res = [];\n  for (let i = 0; i < lines.length; i++) {\n    count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n    if (count >= start) {\n      for (let j = i - range; j <= i + range || end > count; j++) {\n        if (j < 0 || j >= lines.length) continue;\n        const line = j + 1;\n        res.push(\n          `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}|  ${lines[j]}`\n        );\n        const lineLength = lines[j].length;\n        const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n        if (j === i) {\n          const pad = start - (count - (lineLength + newLineSeqLength));\n          const length = Math.max(\n            1,\n            end > count ? lineLength - pad : end - start\n          );\n          res.push(`   |  ` + \" \".repeat(pad) + \"^\".repeat(length));\n        } else if (j > i) {\n          if (end > count) {\n            const length = Math.max(Math.min(end - count, lineLength), 1);\n            res.push(`   |  ` + \"^\".repeat(length));\n          }\n          count += lineLength + newLineSeqLength;\n        }\n      }\n      break;\n    }\n  }\n  return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n  if (isArray(value)) {\n    const res = {};\n    for (let i = 0; i < value.length; i++) {\n      const item = value[i];\n      const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n      if (normalized) {\n        for (const key in normalized) {\n          res[key] = normalized[key];\n        }\n      }\n    }\n    return res;\n  } else if (isString(value) || isObject(value)) {\n    return value;\n  }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n  const ret = {};\n  cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n    if (item) {\n      const tmp = item.split(propertyDelimiterRE);\n      tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return ret;\n}\nfunction stringifyStyle(styles) {\n  let ret = \"\";\n  if (!styles || isString(styles)) {\n    return ret;\n  }\n  for (const key in styles) {\n    const value = styles[key];\n    if (isString(value) || typeof value === \"number\") {\n      const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n      ret += `${normalizedKey}:${value};`;\n    }\n  }\n  return ret;\n}\nfunction normalizeClass(value) {\n  let res = \"\";\n  if (isString(value)) {\n    res = value;\n  } else if (isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      const normalized = normalizeClass(value[i]);\n      if (normalized) {\n        res += normalized + \" \";\n      }\n    }\n  } else if (isObject(value)) {\n    for (const name in value) {\n      if (value[name]) {\n        res += name + \" \";\n      }\n    }\n  }\n  return res.trim();\n}\nfunction normalizeProps(props) {\n  if (!props) return null;\n  let { class: klass, style } = props;\n  if (klass && !isString(klass)) {\n    props.class = normalizeClass(klass);\n  }\n  if (style) {\n    props.style = normalizeStyle(style);\n  }\n  return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n  return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n  if (attrValidationCache.hasOwnProperty(name)) {\n    return attrValidationCache[name];\n  }\n  const isUnsafe = unsafeAttrCharRE.test(name);\n  if (isUnsafe) {\n    console.error(`unsafe attribute name: ${name}`);\n  }\n  return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n  acceptCharset: \"accept-charset\",\n  className: \"class\",\n  htmlFor: \"for\",\n  httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n  `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n  `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nfunction isRenderableAttrValue(value) {\n  if (value == null) {\n    return false;\n  }\n  const type = typeof value;\n  return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n  const str = \"\" + string;\n  const match = escapeRE.exec(str);\n  if (!match) {\n    return str;\n  }\n  let html = \"\";\n  let escaped;\n  let index;\n  let lastIndex = 0;\n  for (index = match.index; index < str.length; index++) {\n    switch (str.charCodeAt(index)) {\n      case 34:\n        escaped = \"&quot;\";\n        break;\n      case 38:\n        escaped = \"&amp;\";\n        break;\n      case 39:\n        escaped = \"&#39;\";\n        break;\n      case 60:\n        escaped = \"&lt;\";\n        break;\n      case 62:\n        escaped = \"&gt;\";\n        break;\n      default:\n        continue;\n    }\n    if (lastIndex !== index) {\n      html += str.slice(lastIndex, index);\n    }\n    lastIndex = index + 1;\n    html += escaped;\n  }\n  return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\nfunction escapeHtmlComment(src) {\n  return src.replace(commentStripRE, \"\");\n}\n\nfunction looseCompareArrays(a, b) {\n  if (a.length !== b.length) return false;\n  let equal = true;\n  for (let i = 0; equal && i < a.length; i++) {\n    equal = looseEqual(a[i], b[i]);\n  }\n  return equal;\n}\nfunction looseEqual(a, b) {\n  if (a === b) return true;\n  let aValidType = isDate(a);\n  let bValidType = isDate(b);\n  if (aValidType || bValidType) {\n    return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n  }\n  aValidType = isSymbol(a);\n  bValidType = isSymbol(b);\n  if (aValidType || bValidType) {\n    return a === b;\n  }\n  aValidType = isArray(a);\n  bValidType = isArray(b);\n  if (aValidType || bValidType) {\n    return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n  }\n  aValidType = isObject(a);\n  bValidType = isObject(b);\n  if (aValidType || bValidType) {\n    if (!aValidType || !bValidType) {\n      return false;\n    }\n    const aKeysCount = Object.keys(a).length;\n    const bKeysCount = Object.keys(b).length;\n    if (aKeysCount !== bKeysCount) {\n      return false;\n    }\n    for (const key in a) {\n      const aHasKey = a.hasOwnProperty(key);\n      const bHasKey = b.hasOwnProperty(key);\n      if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n        return false;\n      }\n    }\n  }\n  return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n  return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n  return !!(val && val.__v_isRef === true);\n};\nconst toDisplayString = (val) => {\n  return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n  if (isRef(val)) {\n    return replacer(_key, val.value);\n  } else if (isMap(val)) {\n    return {\n      [`Map(${val.size})`]: [...val.entries()].reduce(\n        (entries, [key, val2], i) => {\n          entries[stringifySymbol(key, i) + \" =>\"] = val2;\n          return entries;\n        },\n        {}\n      )\n    };\n  } else if (isSet(val)) {\n    return {\n      [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n    };\n  } else if (isSymbol(val)) {\n    return stringifySymbol(val);\n  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n    return String(val);\n  }\n  return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n  var _a;\n  return (\n    // Symbol.description in es2019+ so we need to cast here to pass\n    // the lib: es2016 check\n    isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n  );\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/**\n* @vue/reactivity v3.4.38\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { NOOP, extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n  console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n  constructor(detached = false) {\n    this.detached = detached;\n    /**\n     * @internal\n     */\n    this._active = true;\n    /**\n     * @internal\n     */\n    this.effects = [];\n    /**\n     * @internal\n     */\n    this.cleanups = [];\n    this.parent = activeEffectScope;\n    if (!detached && activeEffectScope) {\n      this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n        this\n      ) - 1;\n    }\n  }\n  get active() {\n    return this._active;\n  }\n  run(fn) {\n    if (this._active) {\n      const currentEffectScope = activeEffectScope;\n      try {\n        activeEffectScope = this;\n        return fn();\n      } finally {\n        activeEffectScope = currentEffectScope;\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(`cannot run an inactive effect scope.`);\n    }\n  }\n  /**\n   * This should only be called on non-detached scopes\n   * @internal\n   */\n  on() {\n    activeEffectScope = this;\n  }\n  /**\n   * This should only be called on non-detached scopes\n   * @internal\n   */\n  off() {\n    activeEffectScope = this.parent;\n  }\n  stop(fromParent) {\n    if (this._active) {\n      let i, l;\n      for (i = 0, l = this.effects.length; i < l; i++) {\n        this.effects[i].stop();\n      }\n      for (i = 0, l = this.cleanups.length; i < l; i++) {\n        this.cleanups[i]();\n      }\n      if (this.scopes) {\n        for (i = 0, l = this.scopes.length; i < l; i++) {\n          this.scopes[i].stop(true);\n        }\n      }\n      if (!this.detached && this.parent && !fromParent) {\n        const last = this.parent.scopes.pop();\n        if (last && last !== this) {\n          this.parent.scopes[this.index] = last;\n          last.index = this.index;\n        }\n      }\n      this.parent = void 0;\n      this._active = false;\n    }\n  }\n}\nfunction effectScope(detached) {\n  return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n  if (scope && scope.active) {\n    scope.effects.push(effect);\n  }\n}\nfunction getCurrentScope() {\n  return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n  if (activeEffectScope) {\n    activeEffectScope.cleanups.push(fn);\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn(\n      `onScopeDispose() is called when there is no active effect scope to be associated with.`\n    );\n  }\n}\n\nlet activeEffect;\nclass ReactiveEffect {\n  constructor(fn, trigger, scheduler, scope) {\n    this.fn = fn;\n    this.trigger = trigger;\n    this.scheduler = scheduler;\n    this.active = true;\n    this.deps = [];\n    /**\n     * @internal\n     */\n    this._dirtyLevel = 4;\n    /**\n     * @internal\n     */\n    this._trackId = 0;\n    /**\n     * @internal\n     */\n    this._runnings = 0;\n    /**\n     * @internal\n     */\n    this._shouldSchedule = false;\n    /**\n     * @internal\n     */\n    this._depsLength = 0;\n    recordEffectScope(this, scope);\n  }\n  get dirty() {\n    if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {\n      this._dirtyLevel = 1;\n      pauseTracking();\n      for (let i = 0; i < this._depsLength; i++) {\n        const dep = this.deps[i];\n        if (dep.computed) {\n          triggerComputed(dep.computed);\n          if (this._dirtyLevel >= 4) {\n            break;\n          }\n        }\n      }\n      if (this._dirtyLevel === 1) {\n        this._dirtyLevel = 0;\n      }\n      resetTracking();\n    }\n    return this._dirtyLevel >= 4;\n  }\n  set dirty(v) {\n    this._dirtyLevel = v ? 4 : 0;\n  }\n  run() {\n    this._dirtyLevel = 0;\n    if (!this.active) {\n      return this.fn();\n    }\n    let lastShouldTrack = shouldTrack;\n    let lastEffect = activeEffect;\n    try {\n      shouldTrack = true;\n      activeEffect = this;\n      this._runnings++;\n      preCleanupEffect(this);\n      return this.fn();\n    } finally {\n      postCleanupEffect(this);\n      this._runnings--;\n      activeEffect = lastEffect;\n      shouldTrack = lastShouldTrack;\n    }\n  }\n  stop() {\n    if (this.active) {\n      preCleanupEffect(this);\n      postCleanupEffect(this);\n      this.onStop && this.onStop();\n      this.active = false;\n    }\n  }\n}\nfunction triggerComputed(computed) {\n  return computed.value;\n}\nfunction preCleanupEffect(effect2) {\n  effect2._trackId++;\n  effect2._depsLength = 0;\n}\nfunction postCleanupEffect(effect2) {\n  if (effect2.deps.length > effect2._depsLength) {\n    for (let i = effect2._depsLength; i < effect2.deps.length; i++) {\n      cleanupDepEffect(effect2.deps[i], effect2);\n    }\n    effect2.deps.length = effect2._depsLength;\n  }\n}\nfunction cleanupDepEffect(dep, effect2) {\n  const trackId = dep.get(effect2);\n  if (trackId !== void 0 && effect2._trackId !== trackId) {\n    dep.delete(effect2);\n    if (dep.size === 0) {\n      dep.cleanup();\n    }\n  }\n}\nfunction effect(fn, options) {\n  if (fn.effect instanceof ReactiveEffect) {\n    fn = fn.effect.fn;\n  }\n  const _effect = new ReactiveEffect(fn, NOOP, () => {\n    if (_effect.dirty) {\n      _effect.run();\n    }\n  });\n  if (options) {\n    extend(_effect, options);\n    if (options.scope) recordEffectScope(_effect, options.scope);\n  }\n  if (!options || !options.lazy) {\n    _effect.run();\n  }\n  const runner = _effect.run.bind(_effect);\n  runner.effect = _effect;\n  return runner;\n}\nfunction stop(runner) {\n  runner.effect.stop();\n}\nlet shouldTrack = true;\nlet pauseScheduleStack = 0;\nconst trackStack = [];\nfunction pauseTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = false;\n}\nfunction enableTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = true;\n}\nfunction resetTracking() {\n  const last = trackStack.pop();\n  shouldTrack = last === void 0 ? true : last;\n}\nfunction pauseScheduling() {\n  pauseScheduleStack++;\n}\nfunction resetScheduling() {\n  pauseScheduleStack--;\n  while (!pauseScheduleStack && queueEffectSchedulers.length) {\n    queueEffectSchedulers.shift()();\n  }\n}\nfunction trackEffect(effect2, dep, debuggerEventExtraInfo) {\n  var _a;\n  if (dep.get(effect2) !== effect2._trackId) {\n    dep.set(effect2, effect2._trackId);\n    const oldDep = effect2.deps[effect2._depsLength];\n    if (oldDep !== dep) {\n      if (oldDep) {\n        cleanupDepEffect(oldDep, effect2);\n      }\n      effect2.deps[effect2._depsLength++] = dep;\n    } else {\n      effect2._depsLength++;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n    }\n  }\n}\nconst queueEffectSchedulers = [];\nfunction triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {\n  var _a;\n  pauseScheduling();\n  for (const effect2 of dep.keys()) {\n    let tracking;\n    if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n      effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);\n      effect2._dirtyLevel = dirtyLevel;\n    }\n    if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n      }\n      effect2.trigger();\n      if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {\n        effect2._shouldSchedule = false;\n        if (effect2.scheduler) {\n          queueEffectSchedulers.push(effect2.scheduler);\n        }\n      }\n    }\n  }\n  resetScheduling();\n}\n\nconst createDep = (cleanup, computed) => {\n  const dep = /* @__PURE__ */ new Map();\n  dep.cleanup = cleanup;\n  dep.computed = computed;\n  return dep;\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nfunction track(target, type, key) {\n  if (shouldTrack && activeEffect) {\n    let depsMap = targetMap.get(target);\n    if (!depsMap) {\n      targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n    }\n    let dep = depsMap.get(key);\n    if (!dep) {\n      depsMap.set(key, dep = createDep(() => depsMap.delete(key)));\n    }\n    trackEffect(\n      activeEffect,\n      dep,\n      !!(process.env.NODE_ENV !== \"production\") ? {\n        target,\n        type,\n        key\n      } : void 0\n    );\n  }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n  const depsMap = targetMap.get(target);\n  if (!depsMap) {\n    return;\n  }\n  let deps = [];\n  if (type === \"clear\") {\n    deps = [...depsMap.values()];\n  } else if (key === \"length\" && isArray(target)) {\n    const newLength = Number(newValue);\n    depsMap.forEach((dep, key2) => {\n      if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n        deps.push(dep);\n      }\n    });\n  } else {\n    if (key !== void 0) {\n      deps.push(depsMap.get(key));\n    }\n    switch (type) {\n      case \"add\":\n        if (!isArray(target)) {\n          deps.push(depsMap.get(ITERATE_KEY));\n          if (isMap(target)) {\n            deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n          }\n        } else if (isIntegerKey(key)) {\n          deps.push(depsMap.get(\"length\"));\n        }\n        break;\n      case \"delete\":\n        if (!isArray(target)) {\n          deps.push(depsMap.get(ITERATE_KEY));\n          if (isMap(target)) {\n            deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n          }\n        }\n        break;\n      case \"set\":\n        if (isMap(target)) {\n          deps.push(depsMap.get(ITERATE_KEY));\n        }\n        break;\n    }\n  }\n  pauseScheduling();\n  for (const dep of deps) {\n    if (dep) {\n      triggerEffects(\n        dep,\n        4,\n        !!(process.env.NODE_ENV !== \"production\") ? {\n          target,\n          type,\n          key,\n          newValue,\n          oldValue,\n          oldTarget\n        } : void 0\n      );\n    }\n  }\n  resetScheduling();\n}\nfunction getDepFromReactive(object, key) {\n  const depsMap = targetMap.get(object);\n  return depsMap && depsMap.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n  const instrumentations = {};\n  [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n    instrumentations[key] = function(...args) {\n      const arr = toRaw(this);\n      for (let i = 0, l = this.length; i < l; i++) {\n        track(arr, \"get\", i + \"\");\n      }\n      const res = arr[key](...args);\n      if (res === -1 || res === false) {\n        return arr[key](...args.map(toRaw));\n      } else {\n        return res;\n      }\n    };\n  });\n  [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n    instrumentations[key] = function(...args) {\n      pauseTracking();\n      pauseScheduling();\n      const res = toRaw(this)[key].apply(this, args);\n      resetScheduling();\n      resetTracking();\n      return res;\n    };\n  });\n  return instrumentations;\n}\nfunction hasOwnProperty(key) {\n  if (!isSymbol(key)) key = String(key);\n  const obj = toRaw(this);\n  track(obj, \"has\", key);\n  return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n  constructor(_isReadonly = false, _isShallow = false) {\n    this._isReadonly = _isReadonly;\n    this._isShallow = _isShallow;\n  }\n  get(target, key, receiver) {\n    const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_isShallow\") {\n      return isShallow2;\n    } else if (key === \"__v_raw\") {\n      if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n      // this means the receiver is a user proxy of the reactive proxy\n      Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n        return target;\n      }\n      return;\n    }\n    const targetIsArray = isArray(target);\n    if (!isReadonly2) {\n      if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n        return Reflect.get(arrayInstrumentations, key, receiver);\n      }\n      if (key === \"hasOwnProperty\") {\n        return hasOwnProperty;\n      }\n    }\n    const res = Reflect.get(target, key, receiver);\n    if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n      return res;\n    }\n    if (!isReadonly2) {\n      track(target, \"get\", key);\n    }\n    if (isShallow2) {\n      return res;\n    }\n    if (isRef(res)) {\n      return targetIsArray && isIntegerKey(key) ? res : res.value;\n    }\n    if (isObject(res)) {\n      return isReadonly2 ? readonly(res) : reactive(res);\n    }\n    return res;\n  }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(false, isShallow2);\n  }\n  set(target, key, value, receiver) {\n    let oldValue = target[key];\n    if (!this._isShallow) {\n      const isOldValueReadonly = isReadonly(oldValue);\n      if (!isShallow(value) && !isReadonly(value)) {\n        oldValue = toRaw(oldValue);\n        value = toRaw(value);\n      }\n      if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n        if (isOldValueReadonly) {\n          return false;\n        } else {\n          oldValue.value = value;\n          return true;\n        }\n      }\n    }\n    const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n    const result = Reflect.set(target, key, value, receiver);\n    if (target === toRaw(receiver)) {\n      if (!hadKey) {\n        trigger(target, \"add\", key, value);\n      } else if (hasChanged(value, oldValue)) {\n        trigger(target, \"set\", key, value, oldValue);\n      }\n    }\n    return result;\n  }\n  deleteProperty(target, key) {\n    const hadKey = hasOwn(target, key);\n    const oldValue = target[key];\n    const result = Reflect.deleteProperty(target, key);\n    if (result && hadKey) {\n      trigger(target, \"delete\", key, void 0, oldValue);\n    }\n    return result;\n  }\n  has(target, key) {\n    const result = Reflect.has(target, key);\n    if (!isSymbol(key) || !builtInSymbols.has(key)) {\n      track(target, \"has\", key);\n    }\n    return result;\n  }\n  ownKeys(target) {\n    track(\n      target,\n      \"iterate\",\n      isArray(target) ? \"length\" : ITERATE_KEY\n    );\n    return Reflect.ownKeys(target);\n  }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(true, isShallow2);\n  }\n  set(target, key) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\n        `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n        target\n      );\n    }\n    return true;\n  }\n  deleteProperty(target, key) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\n        `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n        target\n      );\n    }\n    return true;\n  }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n  true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly2 = false, isShallow2 = false) {\n  target = target[\"__v_raw\"];\n  const rawTarget = toRaw(target);\n  const rawKey = toRaw(key);\n  if (!isReadonly2) {\n    if (hasChanged(key, rawKey)) {\n      track(rawTarget, \"get\", key);\n    }\n    track(rawTarget, \"get\", rawKey);\n  }\n  const { has: has2 } = getProto(rawTarget);\n  const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n  if (has2.call(rawTarget, key)) {\n    return wrap(target.get(key));\n  } else if (has2.call(rawTarget, rawKey)) {\n    return wrap(target.get(rawKey));\n  } else if (target !== rawTarget) {\n    target.get(key);\n  }\n}\nfunction has(key, isReadonly2 = false) {\n  const target = this[\"__v_raw\"];\n  const rawTarget = toRaw(target);\n  const rawKey = toRaw(key);\n  if (!isReadonly2) {\n    if (hasChanged(key, rawKey)) {\n      track(rawTarget, \"has\", key);\n    }\n    track(rawTarget, \"has\", rawKey);\n  }\n  return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly2 = false) {\n  target = target[\"__v_raw\"];\n  !isReadonly2 && track(toRaw(target), \"iterate\", ITERATE_KEY);\n  return Reflect.get(target, \"size\", target);\n}\nfunction add(value, _isShallow = false) {\n  if (!_isShallow && !isShallow(value) && !isReadonly(value)) {\n    value = toRaw(value);\n  }\n  const target = toRaw(this);\n  const proto = getProto(target);\n  const hadKey = proto.has.call(target, value);\n  if (!hadKey) {\n    target.add(value);\n    trigger(target, \"add\", value, value);\n  }\n  return this;\n}\nfunction set(key, value, _isShallow = false) {\n  if (!_isShallow && !isShallow(value) && !isReadonly(value)) {\n    value = toRaw(value);\n  }\n  const target = toRaw(this);\n  const { has: has2, get: get2 } = getProto(target);\n  let hadKey = has2.call(target, key);\n  if (!hadKey) {\n    key = toRaw(key);\n    hadKey = has2.call(target, key);\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    checkIdentityKeys(target, has2, key);\n  }\n  const oldValue = get2.call(target, key);\n  target.set(key, value);\n  if (!hadKey) {\n    trigger(target, \"add\", key, value);\n  } else if (hasChanged(value, oldValue)) {\n    trigger(target, \"set\", key, value, oldValue);\n  }\n  return this;\n}\nfunction deleteEntry(key) {\n  const target = toRaw(this);\n  const { has: has2, get: get2 } = getProto(target);\n  let hadKey = has2.call(target, key);\n  if (!hadKey) {\n    key = toRaw(key);\n    hadKey = has2.call(target, key);\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    checkIdentityKeys(target, has2, key);\n  }\n  const oldValue = get2 ? get2.call(target, key) : void 0;\n  const result = target.delete(key);\n  if (hadKey) {\n    trigger(target, \"delete\", key, void 0, oldValue);\n  }\n  return result;\n}\nfunction clear() {\n  const target = toRaw(this);\n  const hadItems = target.size !== 0;\n  const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n  const result = target.clear();\n  if (hadItems) {\n    trigger(target, \"clear\", void 0, void 0, oldTarget);\n  }\n  return result;\n}\nfunction createForEach(isReadonly2, isShallow2) {\n  return function forEach(callback, thisArg) {\n    const observed = this;\n    const target = observed[\"__v_raw\"];\n    const rawTarget = toRaw(target);\n    const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n    !isReadonly2 && track(rawTarget, \"iterate\", ITERATE_KEY);\n    return target.forEach((value, key) => {\n      return callback.call(thisArg, wrap(value), wrap(key), observed);\n    });\n  };\n}\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n  return function(...args) {\n    const target = this[\"__v_raw\"];\n    const rawTarget = toRaw(target);\n    const targetIsMap = isMap(rawTarget);\n    const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n    const isKeyOnly = method === \"keys\" && targetIsMap;\n    const innerIterator = target[method](...args);\n    const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n    !isReadonly2 && track(\n      rawTarget,\n      \"iterate\",\n      isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n    );\n    return {\n      // iterator protocol\n      next() {\n        const { value, done } = innerIterator.next();\n        return done ? { value, done } : {\n          value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n          done\n        };\n      },\n      // iterable protocol\n      [Symbol.iterator]() {\n        return this;\n      }\n    };\n  };\n}\nfunction createReadonlyMethod(type) {\n  return function(...args) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n      warn(\n        `${capitalize(type)} operation ${key}failed: target is readonly.`,\n        toRaw(this)\n      );\n    }\n    return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n  };\n}\nfunction createInstrumentations() {\n  const mutableInstrumentations2 = {\n    get(key) {\n      return get(this, key);\n    },\n    get size() {\n      return size(this);\n    },\n    has,\n    add,\n    set,\n    delete: deleteEntry,\n    clear,\n    forEach: createForEach(false, false)\n  };\n  const shallowInstrumentations2 = {\n    get(key) {\n      return get(this, key, false, true);\n    },\n    get size() {\n      return size(this);\n    },\n    has,\n    add(value) {\n      return add.call(this, value, true);\n    },\n    set(key, value) {\n      return set.call(this, key, value, true);\n    },\n    delete: deleteEntry,\n    clear,\n    forEach: createForEach(false, true)\n  };\n  const readonlyInstrumentations2 = {\n    get(key) {\n      return get(this, key, true);\n    },\n    get size() {\n      return size(this, true);\n    },\n    has(key) {\n      return has.call(this, key, true);\n    },\n    add: createReadonlyMethod(\"add\"),\n    set: createReadonlyMethod(\"set\"),\n    delete: createReadonlyMethod(\"delete\"),\n    clear: createReadonlyMethod(\"clear\"),\n    forEach: createForEach(true, false)\n  };\n  const shallowReadonlyInstrumentations2 = {\n    get(key) {\n      return get(this, key, true, true);\n    },\n    get size() {\n      return size(this, true);\n    },\n    has(key) {\n      return has.call(this, key, true);\n    },\n    add: createReadonlyMethod(\"add\"),\n    set: createReadonlyMethod(\"set\"),\n    delete: createReadonlyMethod(\"delete\"),\n    clear: createReadonlyMethod(\"clear\"),\n    forEach: createForEach(true, true)\n  };\n  const iteratorMethods = [\n    \"keys\",\n    \"values\",\n    \"entries\",\n    Symbol.iterator\n  ];\n  iteratorMethods.forEach((method) => {\n    mutableInstrumentations2[method] = createIterableMethod(method, false, false);\n    readonlyInstrumentations2[method] = createIterableMethod(method, true, false);\n    shallowInstrumentations2[method] = createIterableMethod(method, false, true);\n    shallowReadonlyInstrumentations2[method] = createIterableMethod(\n      method,\n      true,\n      true\n    );\n  });\n  return [\n    mutableInstrumentations2,\n    readonlyInstrumentations2,\n    shallowInstrumentations2,\n    shallowReadonlyInstrumentations2\n  ];\n}\nconst [\n  mutableInstrumentations,\n  readonlyInstrumentations,\n  shallowInstrumentations,\n  shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n  const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;\n  return (target, key, receiver) => {\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_raw\") {\n      return target;\n    }\n    return Reflect.get(\n      hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n      key,\n      receiver\n    );\n  };\n}\nconst mutableCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n  const rawKey = toRaw(key);\n  if (rawKey !== key && has2.call(target, rawKey)) {\n    const type = toRawType(target);\n    warn(\n      `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n    );\n  }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n  switch (rawType) {\n    case \"Object\":\n    case \"Array\":\n      return 1 /* COMMON */;\n    case \"Map\":\n    case \"Set\":\n    case \"WeakMap\":\n    case \"WeakSet\":\n      return 2 /* COLLECTION */;\n    default:\n      return 0 /* INVALID */;\n  }\n}\nfunction getTargetType(value) {\n  return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n  if (isReadonly(target)) {\n    return target;\n  }\n  return createReactiveObject(\n    target,\n    false,\n    mutableHandlers,\n    mutableCollectionHandlers,\n    reactiveMap\n  );\n}\nfunction shallowReactive(target) {\n  return createReactiveObject(\n    target,\n    false,\n    shallowReactiveHandlers,\n    shallowCollectionHandlers,\n    shallowReactiveMap\n  );\n}\nfunction readonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    readonlyHandlers,\n    readonlyCollectionHandlers,\n    readonlyMap\n  );\n}\nfunction shallowReadonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    shallowReadonlyHandlers,\n    shallowReadonlyCollectionHandlers,\n    shallowReadonlyMap\n  );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n  if (!isObject(target)) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn(\n        `value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(\n          target\n        )}`\n      );\n    }\n    return target;\n  }\n  if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n    return target;\n  }\n  const existingProxy = proxyMap.get(target);\n  if (existingProxy) {\n    return existingProxy;\n  }\n  const targetType = getTargetType(target);\n  if (targetType === 0 /* INVALID */) {\n    return target;\n  }\n  const proxy = new Proxy(\n    target,\n    targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n  );\n  proxyMap.set(target, proxy);\n  return proxy;\n}\nfunction isReactive(value) {\n  if (isReadonly(value)) {\n    return isReactive(value[\"__v_raw\"]);\n  }\n  return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n  return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n  return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n  return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n  const raw = observed && observed[\"__v_raw\"];\n  return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n  if (Object.isExtensible(value)) {\n    def(value, \"__v_skip\", true);\n  }\n  return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nconst COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided.  Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;\nclass ComputedRefImpl {\n  constructor(getter, _setter, isReadonly, isSSR) {\n    this.getter = getter;\n    this._setter = _setter;\n    this.dep = void 0;\n    this.__v_isRef = true;\n    this[\"__v_isReadonly\"] = false;\n    this.effect = new ReactiveEffect(\n      () => getter(this._value),\n      () => triggerRefValue(\n        this,\n        this.effect._dirtyLevel === 2 ? 2 : 3\n      )\n    );\n    this.effect.computed = this;\n    this.effect.active = this._cacheable = !isSSR;\n    this[\"__v_isReadonly\"] = isReadonly;\n  }\n  get value() {\n    const self = toRaw(this);\n    if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {\n      triggerRefValue(self, 4);\n    }\n    trackRefValue(self);\n    if (self.effect._dirtyLevel >= 2) {\n      if (!!(process.env.NODE_ENV !== \"production\") && this._warnRecursive) {\n        warn(COMPUTED_SIDE_EFFECT_WARN, `\n\ngetter: `, this.getter);\n      }\n      triggerRefValue(self, 2);\n    }\n    return self._value;\n  }\n  set value(newValue) {\n    this._setter(newValue);\n  }\n  // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x\n  get _dirty() {\n    return this.effect.dirty;\n  }\n  set _dirty(v) {\n    this.effect.dirty = v;\n  }\n  // #endregion\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n  let getter;\n  let setter;\n  const onlyGetter = isFunction(getterOrOptions);\n  if (onlyGetter) {\n    getter = getterOrOptions;\n    setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n      warn(\"Write operation failed: computed value is readonly\");\n    } : NOOP;\n  } else {\n    getter = getterOrOptions.get;\n    setter = getterOrOptions.set;\n  }\n  const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n  if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n    cRef.effect.onTrack = debugOptions.onTrack;\n    cRef.effect.onTrigger = debugOptions.onTrigger;\n  }\n  return cRef;\n}\n\nfunction trackRefValue(ref2) {\n  var _a;\n  if (shouldTrack && activeEffect) {\n    ref2 = toRaw(ref2);\n    trackEffect(\n      activeEffect,\n      (_a = ref2.dep) != null ? _a : ref2.dep = createDep(\n        () => ref2.dep = void 0,\n        ref2 instanceof ComputedRefImpl ? ref2 : void 0\n      ),\n      !!(process.env.NODE_ENV !== \"production\") ? {\n        target: ref2,\n        type: \"get\",\n        key: \"value\"\n      } : void 0\n    );\n  }\n}\nfunction triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {\n  ref2 = toRaw(ref2);\n  const dep = ref2.dep;\n  if (dep) {\n    triggerEffects(\n      dep,\n      dirtyLevel,\n      !!(process.env.NODE_ENV !== \"production\") ? {\n        target: ref2,\n        type: \"set\",\n        key: \"value\",\n        newValue: newVal,\n        oldValue: oldVal\n      } : void 0\n    );\n  }\n}\nfunction isRef(r) {\n  return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n  return createRef(value, false);\n}\nfunction shallowRef(value) {\n  return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n  if (isRef(rawValue)) {\n    return rawValue;\n  }\n  return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n  constructor(value, __v_isShallow) {\n    this.__v_isShallow = __v_isShallow;\n    this.dep = void 0;\n    this.__v_isRef = true;\n    this._rawValue = __v_isShallow ? value : toRaw(value);\n    this._value = __v_isShallow ? value : toReactive(value);\n  }\n  get value() {\n    trackRefValue(this);\n    return this._value;\n  }\n  set value(newVal) {\n    const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n    newVal = useDirectValue ? newVal : toRaw(newVal);\n    if (hasChanged(newVal, this._rawValue)) {\n      const oldVal = this._rawValue;\n      this._rawValue = newVal;\n      this._value = useDirectValue ? newVal : toReactive(newVal);\n      triggerRefValue(this, 4, newVal, oldVal);\n    }\n  }\n}\nfunction triggerRef(ref2) {\n  triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n  return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n  return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n  get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n  set: (target, key, value, receiver) => {\n    const oldValue = target[key];\n    if (isRef(oldValue) && !isRef(value)) {\n      oldValue.value = value;\n      return true;\n    } else {\n      return Reflect.set(target, key, value, receiver);\n    }\n  }\n};\nfunction proxyRefs(objectWithRefs) {\n  return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n  constructor(factory) {\n    this.dep = void 0;\n    this.__v_isRef = true;\n    const { get, set } = factory(\n      () => trackRefValue(this),\n      () => triggerRefValue(this)\n    );\n    this._get = get;\n    this._set = set;\n  }\n  get value() {\n    return this._get();\n  }\n  set value(newVal) {\n    this._set(newVal);\n  }\n}\nfunction customRef(factory) {\n  return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n  if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n    warn(`toRefs() expects a reactive object but received a plain one.`);\n  }\n  const ret = isArray(object) ? new Array(object.length) : {};\n  for (const key in object) {\n    ret[key] = propertyToRef(object, key);\n  }\n  return ret;\n}\nclass ObjectRefImpl {\n  constructor(_object, _key, _defaultValue) {\n    this._object = _object;\n    this._key = _key;\n    this._defaultValue = _defaultValue;\n    this.__v_isRef = true;\n  }\n  get value() {\n    const val = this._object[this._key];\n    return val === void 0 ? this._defaultValue : val;\n  }\n  set value(newVal) {\n    this._object[this._key] = newVal;\n  }\n  get dep() {\n    return getDepFromReactive(toRaw(this._object), this._key);\n  }\n}\nclass GetterRefImpl {\n  constructor(_getter) {\n    this._getter = _getter;\n    this.__v_isRef = true;\n    this.__v_isReadonly = true;\n  }\n  get value() {\n    return this._getter();\n  }\n}\nfunction toRef(source, key, defaultValue) {\n  if (isRef(source)) {\n    return source;\n  } else if (isFunction(source)) {\n    return new GetterRefImpl(source);\n  } else if (isObject(source) && arguments.length > 1) {\n    return propertyToRef(source, key, defaultValue);\n  } else {\n    return ref(source);\n  }\n}\nfunction propertyToRef(source, key, defaultValue) {\n  const val = source[key];\n  return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nconst deferredComputed = computed;\n\nconst TrackOpTypes = {\n  \"GET\": \"get\",\n  \"HAS\": \"has\",\n  \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n  \"SET\": \"set\",\n  \"ADD\": \"add\",\n  \"DELETE\": \"delete\",\n  \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n  \"SKIP\": \"__v_skip\",\n  \"IS_REACTIVE\": \"__v_isReactive\",\n  \"IS_READONLY\": \"__v_isReadonly\",\n  \"IS_SHALLOW\": \"__v_isShallow\",\n  \"RAW\": \"__v_raw\"\n};\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseScheduling, pauseTracking, proxyRefs, reactive, readonly, ref, resetScheduling, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n","/**\n* @vue/runtime-core v3.4.38\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isReactive, ReactiveEffect, isShallow, getCurrentScope, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, EMPTY_OBJ, isObject, remove, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, hasOwn, isGloballyAllowed, NO, hyphenate, isReservedProp, EMPTY_ARR, toRawType, makeMap, def, isOn, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, hasChanged, isSet, isMap, isPlainObject, looseToNumber, isModelListener, toNumber } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n  stack.push(vnode);\n}\nfunction popWarningContext() {\n  stack.pop();\n}\nlet isWarning = false;\nfunction warn$1(msg, ...args) {\n  if (isWarning) return;\n  isWarning = true;\n  pauseTracking();\n  const instance = stack.length ? stack[stack.length - 1].component : null;\n  const appWarnHandler = instance && instance.appContext.config.warnHandler;\n  const trace = getComponentTrace();\n  if (appWarnHandler) {\n    callWithErrorHandling(\n      appWarnHandler,\n      instance,\n      11,\n      [\n        // eslint-disable-next-line no-restricted-syntax\n        msg + args.map((a) => {\n          var _a, _b;\n          return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n        }).join(\"\"),\n        instance && instance.proxy,\n        trace.map(\n          ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n        ).join(\"\\n\"),\n        trace\n      ]\n    );\n  } else {\n    const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n    if (trace.length && // avoid spamming console during tests\n    true) {\n      warnArgs.push(`\n`, ...formatTrace(trace));\n    }\n    console.warn(...warnArgs);\n  }\n  resetTracking();\n  isWarning = false;\n}\nfunction getComponentTrace() {\n  let currentVNode = stack[stack.length - 1];\n  if (!currentVNode) {\n    return [];\n  }\n  const normalizedStack = [];\n  while (currentVNode) {\n    const last = normalizedStack[0];\n    if (last && last.vnode === currentVNode) {\n      last.recurseCount++;\n    } else {\n      normalizedStack.push({\n        vnode: currentVNode,\n        recurseCount: 0\n      });\n    }\n    const parentInstance = currentVNode.component && currentVNode.component.parent;\n    currentVNode = parentInstance && parentInstance.vnode;\n  }\n  return normalizedStack;\n}\nfunction formatTrace(trace) {\n  const logs = [];\n  trace.forEach((entry, i) => {\n    logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n  });\n  return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n  const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n  const isRoot = vnode.component ? vnode.component.parent == null : false;\n  const open = ` at <${formatComponentName(\n    vnode.component,\n    vnode.type,\n    isRoot\n  )}`;\n  const close = `>` + postfix;\n  return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n  const res = [];\n  const keys = Object.keys(props);\n  keys.slice(0, 3).forEach((key) => {\n    res.push(...formatProp(key, props[key]));\n  });\n  if (keys.length > 3) {\n    res.push(` ...`);\n  }\n  return res;\n}\nfunction formatProp(key, value, raw) {\n  if (isString(value)) {\n    value = JSON.stringify(value);\n    return raw ? value : [`${key}=${value}`];\n  } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n    return raw ? value : [`${key}=${value}`];\n  } else if (isRef(value)) {\n    value = formatProp(key, toRaw(value.value), true);\n    return raw ? value : [`${key}=Ref<`, value, `>`];\n  } else if (isFunction(value)) {\n    return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n  } else {\n    value = toRaw(value);\n    return raw ? value : [`${key}=`, value];\n  }\n}\nfunction assertNumber(val, type) {\n  if (!!!(process.env.NODE_ENV !== \"production\")) return;\n  if (val === void 0) {\n    return;\n  } else if (typeof val !== \"number\") {\n    warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n  } else if (isNaN(val)) {\n    warn$1(`${type} is NaN - the duration expression might be incorrect.`);\n  }\n}\n\nconst ErrorCodes = {\n  \"SETUP_FUNCTION\": 0,\n  \"0\": \"SETUP_FUNCTION\",\n  \"RENDER_FUNCTION\": 1,\n  \"1\": \"RENDER_FUNCTION\",\n  \"WATCH_GETTER\": 2,\n  \"2\": \"WATCH_GETTER\",\n  \"WATCH_CALLBACK\": 3,\n  \"3\": \"WATCH_CALLBACK\",\n  \"WATCH_CLEANUP\": 4,\n  \"4\": \"WATCH_CLEANUP\",\n  \"NATIVE_EVENT_HANDLER\": 5,\n  \"5\": \"NATIVE_EVENT_HANDLER\",\n  \"COMPONENT_EVENT_HANDLER\": 6,\n  \"6\": \"COMPONENT_EVENT_HANDLER\",\n  \"VNODE_HOOK\": 7,\n  \"7\": \"VNODE_HOOK\",\n  \"DIRECTIVE_HOOK\": 8,\n  \"8\": \"DIRECTIVE_HOOK\",\n  \"TRANSITION_HOOK\": 9,\n  \"9\": \"TRANSITION_HOOK\",\n  \"APP_ERROR_HANDLER\": 10,\n  \"10\": \"APP_ERROR_HANDLER\",\n  \"APP_WARN_HANDLER\": 11,\n  \"11\": \"APP_WARN_HANDLER\",\n  \"FUNCTION_REF\": 12,\n  \"12\": \"FUNCTION_REF\",\n  \"ASYNC_COMPONENT_LOADER\": 13,\n  \"13\": \"ASYNC_COMPONENT_LOADER\",\n  \"SCHEDULER\": 14,\n  \"14\": \"SCHEDULER\",\n  \"COMPONENT_UPDATE\": 15,\n  \"15\": \"COMPONENT_UPDATE\"\n};\nconst ErrorTypeStrings$1 = {\n  [\"sp\"]: \"serverPrefetch hook\",\n  [\"bc\"]: \"beforeCreate hook\",\n  [\"c\"]: \"created hook\",\n  [\"bm\"]: \"beforeMount hook\",\n  [\"m\"]: \"mounted hook\",\n  [\"bu\"]: \"beforeUpdate hook\",\n  [\"u\"]: \"updated\",\n  [\"bum\"]: \"beforeUnmount hook\",\n  [\"um\"]: \"unmounted hook\",\n  [\"a\"]: \"activated hook\",\n  [\"da\"]: \"deactivated hook\",\n  [\"ec\"]: \"errorCaptured hook\",\n  [\"rtc\"]: \"renderTracked hook\",\n  [\"rtg\"]: \"renderTriggered hook\",\n  [0]: \"setup function\",\n  [1]: \"render function\",\n  [2]: \"watcher getter\",\n  [3]: \"watcher callback\",\n  [4]: \"watcher cleanup function\",\n  [5]: \"native event handler\",\n  [6]: \"component event handler\",\n  [7]: \"vnode hook\",\n  [8]: \"directive hook\",\n  [9]: \"transition hook\",\n  [10]: \"app errorHandler\",\n  [11]: \"app warnHandler\",\n  [12]: \"ref function\",\n  [13]: \"async component loader\",\n  [14]: \"scheduler flush\",\n  [15]: \"component update\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n  try {\n    return args ? fn(...args) : fn();\n  } catch (err) {\n    handleError(err, instance, type);\n  }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n  if (isFunction(fn)) {\n    const res = callWithErrorHandling(fn, instance, type, args);\n    if (res && isPromise(res)) {\n      res.catch((err) => {\n        handleError(err, instance, type);\n      });\n    }\n    return res;\n  }\n  if (isArray(fn)) {\n    const values = [];\n    for (let i = 0; i < fn.length; i++) {\n      values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n    }\n    return values;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(\n      `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`\n    );\n  }\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n  const contextVNode = instance ? instance.vnode : null;\n  if (instance) {\n    let cur = instance.parent;\n    const exposedInstance = instance.proxy;\n    const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;\n    while (cur) {\n      const errorCapturedHooks = cur.ec;\n      if (errorCapturedHooks) {\n        for (let i = 0; i < errorCapturedHooks.length; i++) {\n          if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n            return;\n          }\n        }\n      }\n      cur = cur.parent;\n    }\n    const appErrorHandler = instance.appContext.config.errorHandler;\n    if (appErrorHandler) {\n      pauseTracking();\n      callWithErrorHandling(\n        appErrorHandler,\n        null,\n        10,\n        [err, exposedInstance, errorInfo]\n      );\n      resetTracking();\n      return;\n    }\n  }\n  logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const info = ErrorTypeStrings$1[type];\n    if (contextVNode) {\n      pushWarningContext(contextVNode);\n    }\n    warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n    if (contextVNode) {\n      popWarningContext();\n    }\n    if (throwInDev) {\n      throw err;\n    } else {\n      console.error(err);\n    }\n  } else {\n    console.error(err);\n  }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n  const p = currentFlushPromise || resolvedPromise;\n  return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n  let start = flushIndex + 1;\n  let end = queue.length;\n  while (start < end) {\n    const middle = start + end >>> 1;\n    const middleJob = queue[middle];\n    const middleJobId = getId(middleJob);\n    if (middleJobId < id || middleJobId === id && middleJob.pre) {\n      start = middle + 1;\n    } else {\n      end = middle;\n    }\n  }\n  return start;\n}\nfunction queueJob(job) {\n  if (!queue.length || !queue.includes(\n    job,\n    isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n  )) {\n    if (job.id == null) {\n      queue.push(job);\n    } else {\n      queue.splice(findInsertionIndex(job.id), 0, job);\n    }\n    queueFlush();\n  }\n}\nfunction queueFlush() {\n  if (!isFlushing && !isFlushPending) {\n    isFlushPending = true;\n    currentFlushPromise = resolvedPromise.then(flushJobs);\n  }\n}\nfunction invalidateJob(job) {\n  const i = queue.indexOf(job);\n  if (i > flushIndex) {\n    queue.splice(i, 1);\n  }\n}\nfunction queuePostFlushCb(cb) {\n  if (!isArray(cb)) {\n    if (!activePostFlushCbs || !activePostFlushCbs.includes(\n      cb,\n      cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n    )) {\n      pendingPostFlushCbs.push(cb);\n    }\n  } else {\n    pendingPostFlushCbs.push(...cb);\n  }\n  queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    seen = seen || /* @__PURE__ */ new Map();\n  }\n  for (; i < queue.length; i++) {\n    const cb = queue[i];\n    if (cb && cb.pre) {\n      if (instance && cb.id !== instance.uid) {\n        continue;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n        continue;\n      }\n      queue.splice(i, 1);\n      i--;\n      cb();\n    }\n  }\n}\nfunction flushPostFlushCbs(seen) {\n  if (pendingPostFlushCbs.length) {\n    const deduped = [...new Set(pendingPostFlushCbs)].sort(\n      (a, b) => getId(a) - getId(b)\n    );\n    pendingPostFlushCbs.length = 0;\n    if (activePostFlushCbs) {\n      activePostFlushCbs.push(...deduped);\n      return;\n    }\n    activePostFlushCbs = deduped;\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      seen = seen || /* @__PURE__ */ new Map();\n    }\n    for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n      const cb = activePostFlushCbs[postFlushIndex];\n      if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n        continue;\n      }\n      if (cb.active !== false) cb();\n    }\n    activePostFlushCbs = null;\n    postFlushIndex = 0;\n  }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n  const diff = getId(a) - getId(b);\n  if (diff === 0) {\n    if (a.pre && !b.pre) return -1;\n    if (b.pre && !a.pre) return 1;\n  }\n  return diff;\n};\nfunction flushJobs(seen) {\n  isFlushPending = false;\n  isFlushing = true;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    seen = seen || /* @__PURE__ */ new Map();\n  }\n  queue.sort(comparator);\n  const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n  try {\n    for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n      const job = queue[flushIndex];\n      if (job && job.active !== false) {\n        if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n          continue;\n        }\n        callWithErrorHandling(\n          job,\n          job.i,\n          job.i ? 15 : 14\n        );\n      }\n    }\n  } finally {\n    flushIndex = 0;\n    queue.length = 0;\n    flushPostFlushCbs(seen);\n    isFlushing = false;\n    currentFlushPromise = null;\n    if (queue.length || pendingPostFlushCbs.length) {\n      flushJobs(seen);\n    }\n  }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n  if (!seen.has(fn)) {\n    seen.set(fn, 1);\n  } else {\n    const count = seen.get(fn);\n    if (count > RECURSION_LIMIT) {\n      const instance = fn.i;\n      const componentName = instance && getComponentName(instance.type);\n      handleError(\n        `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n        null,\n        10\n      );\n      return true;\n    } else {\n      seen.set(fn, count + 1);\n    }\n  }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Map();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n  getGlobalThis().__VUE_HMR_RUNTIME__ = {\n    createRecord: tryWrap(createRecord),\n    rerender: tryWrap(rerender),\n    reload: tryWrap(reload)\n  };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n  const id = instance.type.__hmrId;\n  let record = map.get(id);\n  if (!record) {\n    createRecord(id, instance.type);\n    record = map.get(id);\n  }\n  record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n  map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n  if (map.has(id)) {\n    return false;\n  }\n  map.set(id, {\n    initialDef: normalizeClassComponent(initialDef),\n    instances: /* @__PURE__ */ new Set()\n  });\n  return true;\n}\nfunction normalizeClassComponent(component) {\n  return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n  const record = map.get(id);\n  if (!record) {\n    return;\n  }\n  record.initialDef.render = newRender;\n  [...record.instances].forEach((instance) => {\n    if (newRender) {\n      instance.render = newRender;\n      normalizeClassComponent(instance.type).render = newRender;\n    }\n    instance.renderCache = [];\n    isHmrUpdating = true;\n    instance.effect.dirty = true;\n    instance.update();\n    isHmrUpdating = false;\n  });\n}\nfunction reload(id, newComp) {\n  const record = map.get(id);\n  if (!record) return;\n  newComp = normalizeClassComponent(newComp);\n  updateComponentDef(record.initialDef, newComp);\n  const instances = [...record.instances];\n  for (let i = 0; i < instances.length; i++) {\n    const instance = instances[i];\n    const oldComp = normalizeClassComponent(instance.type);\n    let dirtyInstances = hmrDirtyComponents.get(oldComp);\n    if (!dirtyInstances) {\n      if (oldComp !== record.initialDef) {\n        updateComponentDef(oldComp, newComp);\n      }\n      hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());\n    }\n    dirtyInstances.add(instance);\n    instance.appContext.propsCache.delete(instance.type);\n    instance.appContext.emitsCache.delete(instance.type);\n    instance.appContext.optionsCache.delete(instance.type);\n    if (instance.ceReload) {\n      dirtyInstances.add(instance);\n      instance.ceReload(newComp.styles);\n      dirtyInstances.delete(instance);\n    } else if (instance.parent) {\n      instance.parent.effect.dirty = true;\n      queueJob(() => {\n        instance.parent.update();\n        dirtyInstances.delete(instance);\n      });\n    } else if (instance.appContext.reload) {\n      instance.appContext.reload();\n    } else if (typeof window !== \"undefined\") {\n      window.location.reload();\n    } else {\n      console.warn(\n        \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n      );\n    }\n  }\n  queuePostFlushCb(() => {\n    hmrDirtyComponents.clear();\n  });\n}\nfunction updateComponentDef(oldComp, newComp) {\n  extend(oldComp, newComp);\n  for (const key in oldComp) {\n    if (key !== \"__file\" && !(key in newComp)) {\n      delete oldComp[key];\n    }\n  }\n}\nfunction tryWrap(fn) {\n  return (id, arg) => {\n    try {\n      return fn(id, arg);\n    } catch (e) {\n      console.error(e);\n      console.warn(\n        `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n      );\n    }\n  };\n}\n\nlet devtools$1;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n  if (devtools$1) {\n    devtools$1.emit(event, ...args);\n  } else if (!devtoolsNotInstalled) {\n    buffer.push({ event, args });\n  }\n}\nfunction setDevtoolsHook$1(hook, target) {\n  var _a, _b;\n  devtools$1 = hook;\n  if (devtools$1) {\n    devtools$1.enabled = true;\n    buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));\n    buffer = [];\n  } else if (\n    // handle late devtools injection - only do this if we are in an actual\n    // browser environment to avoid the timer handle stalling test runner exit\n    // (#4815)\n    typeof window !== \"undefined\" && // some envs mock window but not fully\n    window.HTMLElement && // also exclude jsdom\n    // eslint-disable-next-line no-restricted-syntax\n    !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n  ) {\n    const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n    replay.push((newHook) => {\n      setDevtoolsHook$1(newHook, target);\n    });\n    setTimeout(() => {\n      if (!devtools$1) {\n        target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n        devtoolsNotInstalled = true;\n        buffer = [];\n      }\n    }, 3e3);\n  } else {\n    devtoolsNotInstalled = true;\n    buffer = [];\n  }\n}\nfunction devtoolsInitApp(app, version) {\n  emit$1(\"app:init\" /* APP_INIT */, app, version, {\n    Fragment,\n    Text,\n    Comment,\n    Static\n  });\n}\nfunction devtoolsUnmountApp(app) {\n  emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n  \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n  \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n  if (devtools$1 && typeof devtools$1.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n  !devtools$1.cleanupBuffer(component)) {\n    _devtoolsComponentRemoved(component);\n  }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n  return (component) => {\n    emit$1(\n      hook,\n      component.appContext.app,\n      component.uid,\n      component.parent ? component.parent.uid : void 0,\n      component\n    );\n  };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n  \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n  \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n  return (component, type, time) => {\n    emit$1(hook, component.appContext.app, component.uid, component, type, time);\n  };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n  emit$1(\n    \"component:emit\" /* COMPONENT_EMIT */,\n    component.appContext.app,\n    component,\n    event,\n    params\n  );\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n  const prev = currentRenderingInstance;\n  currentRenderingInstance = instance;\n  currentScopeId = instance && instance.type.__scopeId || null;\n  return prev;\n}\nfunction pushScopeId(id) {\n  currentScopeId = id;\n}\nfunction popScopeId() {\n  currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n  if (!ctx) return fn;\n  if (fn._n) {\n    return fn;\n  }\n  const renderFnWithContext = (...args) => {\n    if (renderFnWithContext._d) {\n      setBlockTracking(-1);\n    }\n    const prevInstance = setCurrentRenderingInstance(ctx);\n    let res;\n    try {\n      res = fn(...args);\n    } finally {\n      setCurrentRenderingInstance(prevInstance);\n      if (renderFnWithContext._d) {\n        setBlockTracking(1);\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      devtoolsComponentUpdated(ctx);\n    }\n    return res;\n  };\n  renderFnWithContext._n = true;\n  renderFnWithContext._c = true;\n  renderFnWithContext._d = true;\n  return renderFnWithContext;\n}\n\nfunction validateDirectiveName(name) {\n  if (isBuiltInDirective(name)) {\n    warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n  }\n}\nfunction withDirectives(vnode, directives) {\n  if (currentRenderingInstance === null) {\n    !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n    return vnode;\n  }\n  const instance = getComponentPublicInstance(currentRenderingInstance);\n  const bindings = vnode.dirs || (vnode.dirs = []);\n  for (let i = 0; i < directives.length; i++) {\n    let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n    if (dir) {\n      if (isFunction(dir)) {\n        dir = {\n          mounted: dir,\n          updated: dir\n        };\n      }\n      if (dir.deep) {\n        traverse(value);\n      }\n      bindings.push({\n        dir,\n        instance,\n        value,\n        oldValue: void 0,\n        arg,\n        modifiers\n      });\n    }\n  }\n  return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n  const bindings = vnode.dirs;\n  const oldBindings = prevVNode && prevVNode.dirs;\n  for (let i = 0; i < bindings.length; i++) {\n    const binding = bindings[i];\n    if (oldBindings) {\n      binding.oldValue = oldBindings[i].value;\n    }\n    let hook = binding.dir[name];\n    if (hook) {\n      pauseTracking();\n      callWithAsyncErrorHandling(hook, instance, 8, [\n        vnode.el,\n        binding,\n        vnode,\n        prevVNode\n      ]);\n      resetTracking();\n    }\n  }\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n  const state = {\n    isMounted: false,\n    isLeaving: false,\n    isUnmounting: false,\n    leavingVNodes: /* @__PURE__ */ new Map()\n  };\n  onMounted(() => {\n    state.isMounted = true;\n  });\n  onBeforeUnmount(() => {\n    state.isUnmounting = true;\n  });\n  return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n  mode: String,\n  appear: Boolean,\n  persisted: Boolean,\n  // enter\n  onBeforeEnter: TransitionHookValidator,\n  onEnter: TransitionHookValidator,\n  onAfterEnter: TransitionHookValidator,\n  onEnterCancelled: TransitionHookValidator,\n  // leave\n  onBeforeLeave: TransitionHookValidator,\n  onLeave: TransitionHookValidator,\n  onAfterLeave: TransitionHookValidator,\n  onLeaveCancelled: TransitionHookValidator,\n  // appear\n  onBeforeAppear: TransitionHookValidator,\n  onAppear: TransitionHookValidator,\n  onAfterAppear: TransitionHookValidator,\n  onAppearCancelled: TransitionHookValidator\n};\nconst recursiveGetSubtree = (instance) => {\n  const subTree = instance.subTree;\n  return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;\n};\nconst BaseTransitionImpl = {\n  name: `BaseTransition`,\n  props: BaseTransitionPropsValidators,\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const state = useTransitionState();\n    return () => {\n      const children = slots.default && getTransitionRawChildren(slots.default(), true);\n      if (!children || !children.length) {\n        return;\n      }\n      let child = children[0];\n      if (children.length > 1) {\n        let hasFound = false;\n        for (const c of children) {\n          if (c.type !== Comment) {\n            if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n              warn$1(\n                \"<transition> can only be used on a single element or component. Use <transition-group> for lists.\"\n              );\n              break;\n            }\n            child = c;\n            hasFound = true;\n            if (!!!(process.env.NODE_ENV !== \"production\")) break;\n          }\n        }\n      }\n      const rawProps = toRaw(props);\n      const { mode } = rawProps;\n      if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n        warn$1(`invalid <transition> mode: ${mode}`);\n      }\n      if (state.isLeaving) {\n        return emptyPlaceholder(child);\n      }\n      const innerChild = getKeepAliveChild(child);\n      if (!innerChild) {\n        return emptyPlaceholder(child);\n      }\n      let enterHooks = resolveTransitionHooks(\n        innerChild,\n        rawProps,\n        state,\n        instance,\n        // #11061, ensure enterHooks is fresh after clone\n        (hooks) => enterHooks = hooks\n      );\n      setTransitionHooks(innerChild, enterHooks);\n      const oldChild = instance.subTree;\n      const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n      if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {\n        const leavingHooks = resolveTransitionHooks(\n          oldInnerChild,\n          rawProps,\n          state,\n          instance\n        );\n        setTransitionHooks(oldInnerChild, leavingHooks);\n        if (mode === \"out-in\" && innerChild.type !== Comment) {\n          state.isLeaving = true;\n          leavingHooks.afterLeave = () => {\n            state.isLeaving = false;\n            if (instance.update.active !== false) {\n              instance.effect.dirty = true;\n              instance.update();\n            }\n          };\n          return emptyPlaceholder(child);\n        } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n          leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n            const leavingVNodesCache = getLeavingNodesForType(\n              state,\n              oldInnerChild\n            );\n            leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n            el[leaveCbKey] = () => {\n              earlyRemove();\n              el[leaveCbKey] = void 0;\n              delete enterHooks.delayedLeave;\n            };\n            enterHooks.delayedLeave = delayedLeave;\n          };\n        }\n      }\n      return child;\n    };\n  }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n  const { leavingVNodes } = state;\n  let leavingVNodesCache = leavingVNodes.get(vnode.type);\n  if (!leavingVNodesCache) {\n    leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n    leavingVNodes.set(vnode.type, leavingVNodesCache);\n  }\n  return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance, postClone) {\n  const {\n    appear,\n    mode,\n    persisted = false,\n    onBeforeEnter,\n    onEnter,\n    onAfterEnter,\n    onEnterCancelled,\n    onBeforeLeave,\n    onLeave,\n    onAfterLeave,\n    onLeaveCancelled,\n    onBeforeAppear,\n    onAppear,\n    onAfterAppear,\n    onAppearCancelled\n  } = props;\n  const key = String(vnode.key);\n  const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n  const callHook = (hook, args) => {\n    hook && callWithAsyncErrorHandling(\n      hook,\n      instance,\n      9,\n      args\n    );\n  };\n  const callAsyncHook = (hook, args) => {\n    const done = args[1];\n    callHook(hook, args);\n    if (isArray(hook)) {\n      if (hook.every((hook2) => hook2.length <= 1)) done();\n    } else if (hook.length <= 1) {\n      done();\n    }\n  };\n  const hooks = {\n    mode,\n    persisted,\n    beforeEnter(el) {\n      let hook = onBeforeEnter;\n      if (!state.isMounted) {\n        if (appear) {\n          hook = onBeforeAppear || onBeforeEnter;\n        } else {\n          return;\n        }\n      }\n      if (el[leaveCbKey]) {\n        el[leaveCbKey](\n          true\n          /* cancelled */\n        );\n      }\n      const leavingVNode = leavingVNodesCache[key];\n      if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n        leavingVNode.el[leaveCbKey]();\n      }\n      callHook(hook, [el]);\n    },\n    enter(el) {\n      let hook = onEnter;\n      let afterHook = onAfterEnter;\n      let cancelHook = onEnterCancelled;\n      if (!state.isMounted) {\n        if (appear) {\n          hook = onAppear || onEnter;\n          afterHook = onAfterAppear || onAfterEnter;\n          cancelHook = onAppearCancelled || onEnterCancelled;\n        } else {\n          return;\n        }\n      }\n      let called = false;\n      const done = el[enterCbKey] = (cancelled) => {\n        if (called) return;\n        called = true;\n        if (cancelled) {\n          callHook(cancelHook, [el]);\n        } else {\n          callHook(afterHook, [el]);\n        }\n        if (hooks.delayedLeave) {\n          hooks.delayedLeave();\n        }\n        el[enterCbKey] = void 0;\n      };\n      if (hook) {\n        callAsyncHook(hook, [el, done]);\n      } else {\n        done();\n      }\n    },\n    leave(el, remove) {\n      const key2 = String(vnode.key);\n      if (el[enterCbKey]) {\n        el[enterCbKey](\n          true\n          /* cancelled */\n        );\n      }\n      if (state.isUnmounting) {\n        return remove();\n      }\n      callHook(onBeforeLeave, [el]);\n      let called = false;\n      const done = el[leaveCbKey] = (cancelled) => {\n        if (called) return;\n        called = true;\n        remove();\n        if (cancelled) {\n          callHook(onLeaveCancelled, [el]);\n        } else {\n          callHook(onAfterLeave, [el]);\n        }\n        el[leaveCbKey] = void 0;\n        if (leavingVNodesCache[key2] === vnode) {\n          delete leavingVNodesCache[key2];\n        }\n      };\n      leavingVNodesCache[key2] = vnode;\n      if (onLeave) {\n        callAsyncHook(onLeave, [el, done]);\n      } else {\n        done();\n      }\n    },\n    clone(vnode2) {\n      const hooks2 = resolveTransitionHooks(\n        vnode2,\n        props,\n        state,\n        instance,\n        postClone\n      );\n      if (postClone) postClone(hooks2);\n      return hooks2;\n    }\n  };\n  return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n  if (isKeepAlive(vnode)) {\n    vnode = cloneVNode(vnode);\n    vnode.children = null;\n    return vnode;\n  }\n}\nfunction getKeepAliveChild(vnode) {\n  if (!isKeepAlive(vnode)) {\n    return vnode;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && vnode.component) {\n    return vnode.component.subTree;\n  }\n  const { shapeFlag, children } = vnode;\n  if (children) {\n    if (shapeFlag & 16) {\n      return children[0];\n    }\n    if (shapeFlag & 32 && isFunction(children.default)) {\n      return children.default();\n    }\n  }\n}\nfunction setTransitionHooks(vnode, hooks) {\n  if (vnode.shapeFlag & 6 && vnode.component) {\n    setTransitionHooks(vnode.component.subTree, hooks);\n  } else if (vnode.shapeFlag & 128) {\n    vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n    vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n  } else {\n    vnode.transition = hooks;\n  }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n  let ret = [];\n  let keyedFragmentCount = 0;\n  for (let i = 0; i < children.length; i++) {\n    let child = children[i];\n    const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n    if (child.type === Fragment) {\n      if (child.patchFlag & 128) keyedFragmentCount++;\n      ret = ret.concat(\n        getTransitionRawChildren(child.children, keepComment, key)\n      );\n    } else if (keepComment || child.type !== Comment) {\n      ret.push(key != null ? cloneVNode(child, { key }) : child);\n    }\n  }\n  if (keyedFragmentCount > 1) {\n    for (let i = 0; i < ret.length; i++) {\n      ret[i].patchFlag = -2;\n    }\n  }\n  return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n  return isFunction(options) ? (\n    // #8326: extend call and options.name access are considered side-effects\n    // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n    /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n  ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n  if (isFunction(source)) {\n    source = { loader: source };\n  }\n  const {\n    loader,\n    loadingComponent,\n    errorComponent,\n    delay = 200,\n    timeout,\n    // undefined = never times out\n    suspensible = true,\n    onError: userOnError\n  } = source;\n  let pendingRequest = null;\n  let resolvedComp;\n  let retries = 0;\n  const retry = () => {\n    retries++;\n    pendingRequest = null;\n    return load();\n  };\n  const load = () => {\n    let thisRequest;\n    return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n      err = err instanceof Error ? err : new Error(String(err));\n      if (userOnError) {\n        return new Promise((resolve, reject) => {\n          const userRetry = () => resolve(retry());\n          const userFail = () => reject(err);\n          userOnError(err, userRetry, userFail, retries + 1);\n        });\n      } else {\n        throw err;\n      }\n    }).then((comp) => {\n      if (thisRequest !== pendingRequest && pendingRequest) {\n        return pendingRequest;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n        warn$1(\n          `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n        );\n      }\n      if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n        comp = comp.default;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n        throw new Error(`Invalid async component load result: ${comp}`);\n      }\n      resolvedComp = comp;\n      return comp;\n    }));\n  };\n  return defineComponent({\n    name: \"AsyncComponentWrapper\",\n    __asyncLoader: load,\n    get __asyncResolved() {\n      return resolvedComp;\n    },\n    setup() {\n      const instance = currentInstance;\n      if (resolvedComp) {\n        return () => createInnerComp(resolvedComp, instance);\n      }\n      const onError = (err) => {\n        pendingRequest = null;\n        handleError(\n          err,\n          instance,\n          13,\n          !errorComponent\n        );\n      };\n      if (suspensible && instance.suspense || isInSSRComponentSetup) {\n        return load().then((comp) => {\n          return () => createInnerComp(comp, instance);\n        }).catch((err) => {\n          onError(err);\n          return () => errorComponent ? createVNode(errorComponent, {\n            error: err\n          }) : null;\n        });\n      }\n      const loaded = ref(false);\n      const error = ref();\n      const delayed = ref(!!delay);\n      if (delay) {\n        setTimeout(() => {\n          delayed.value = false;\n        }, delay);\n      }\n      if (timeout != null) {\n        setTimeout(() => {\n          if (!loaded.value && !error.value) {\n            const err = new Error(\n              `Async component timed out after ${timeout}ms.`\n            );\n            onError(err);\n            error.value = err;\n          }\n        }, timeout);\n      }\n      load().then(() => {\n        loaded.value = true;\n        if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n          instance.parent.effect.dirty = true;\n          queueJob(instance.parent.update);\n        }\n      }).catch((err) => {\n        onError(err);\n        error.value = err;\n      });\n      return () => {\n        if (loaded.value && resolvedComp) {\n          return createInnerComp(resolvedComp, instance);\n        } else if (error.value && errorComponent) {\n          return createVNode(errorComponent, {\n            error: error.value\n          });\n        } else if (loadingComponent && !delayed.value) {\n          return createVNode(loadingComponent);\n        }\n      };\n    }\n  });\n}\nfunction createInnerComp(comp, parent) {\n  const { ref: ref2, props, children, ce } = parent.vnode;\n  const vnode = createVNode(comp, props, children);\n  vnode.ref = ref2;\n  vnode.ce = ce;\n  delete parent.vnode.ce;\n  return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n  name: `KeepAlive`,\n  // Marker for special handling inside the renderer. We are not using a ===\n  // check directly on KeepAlive in the renderer, because importing it directly\n  // would prevent it from being tree-shaken.\n  __isKeepAlive: true,\n  props: {\n    include: [String, RegExp, Array],\n    exclude: [String, RegExp, Array],\n    max: [String, Number]\n  },\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const sharedContext = instance.ctx;\n    if (!sharedContext.renderer) {\n      return () => {\n        const children = slots.default && slots.default();\n        return children && children.length === 1 ? children[0] : children;\n      };\n    }\n    const cache = /* @__PURE__ */ new Map();\n    const keys = /* @__PURE__ */ new Set();\n    let current = null;\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      instance.__v_cache = cache;\n    }\n    const parentSuspense = instance.suspense;\n    const {\n      renderer: {\n        p: patch,\n        m: move,\n        um: _unmount,\n        o: { createElement }\n      }\n    } = sharedContext;\n    const storageContainer = createElement(\"div\");\n    sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n      const instance2 = vnode.component;\n      move(vnode, container, anchor, 0, parentSuspense);\n      patch(\n        instance2.vnode,\n        vnode,\n        container,\n        anchor,\n        instance2,\n        parentSuspense,\n        namespace,\n        vnode.slotScopeIds,\n        optimized\n      );\n      queuePostRenderEffect(() => {\n        instance2.isDeactivated = false;\n        if (instance2.a) {\n          invokeArrayFns(instance2.a);\n        }\n        const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n        if (vnodeHook) {\n          invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n        }\n      }, parentSuspense);\n      if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n        devtoolsComponentAdded(instance2);\n      }\n    };\n    sharedContext.deactivate = (vnode) => {\n      const instance2 = vnode.component;\n      invalidateMount(instance2.m);\n      invalidateMount(instance2.a);\n      move(vnode, storageContainer, null, 1, parentSuspense);\n      queuePostRenderEffect(() => {\n        if (instance2.da) {\n          invokeArrayFns(instance2.da);\n        }\n        const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n        if (vnodeHook) {\n          invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n        }\n        instance2.isDeactivated = true;\n      }, parentSuspense);\n      if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n        devtoolsComponentAdded(instance2);\n      }\n    };\n    function unmount(vnode) {\n      resetShapeFlag(vnode);\n      _unmount(vnode, instance, parentSuspense, true);\n    }\n    function pruneCache(filter) {\n      cache.forEach((vnode, key) => {\n        const name = getComponentName(vnode.type);\n        if (name && (!filter || !filter(name))) {\n          pruneCacheEntry(key);\n        }\n      });\n    }\n    function pruneCacheEntry(key) {\n      const cached = cache.get(key);\n      if (cached && (!current || !isSameVNodeType(cached, current))) {\n        unmount(cached);\n      } else if (current) {\n        resetShapeFlag(current);\n      }\n      cache.delete(key);\n      keys.delete(key);\n    }\n    watch(\n      () => [props.include, props.exclude],\n      ([include, exclude]) => {\n        include && pruneCache((name) => matches(include, name));\n        exclude && pruneCache((name) => !matches(exclude, name));\n      },\n      // prune post-render after `current` has been updated\n      { flush: \"post\", deep: true }\n    );\n    let pendingCacheKey = null;\n    const cacheSubtree = () => {\n      if (pendingCacheKey != null) {\n        if (isSuspense(instance.subTree.type)) {\n          queuePostRenderEffect(() => {\n            cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n          }, instance.subTree.suspense);\n        } else {\n          cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n        }\n      }\n    };\n    onMounted(cacheSubtree);\n    onUpdated(cacheSubtree);\n    onBeforeUnmount(() => {\n      cache.forEach((cached) => {\n        const { subTree, suspense } = instance;\n        const vnode = getInnerChild(subTree);\n        if (cached.type === vnode.type && cached.key === vnode.key) {\n          resetShapeFlag(vnode);\n          const da = vnode.component.da;\n          da && queuePostRenderEffect(da, suspense);\n          return;\n        }\n        unmount(cached);\n      });\n    });\n    return () => {\n      pendingCacheKey = null;\n      if (!slots.default) {\n        return null;\n      }\n      const children = slots.default();\n      const rawVNode = children[0];\n      if (children.length > 1) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(`KeepAlive should contain exactly one component child.`);\n        }\n        current = null;\n        return children;\n      } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n        current = null;\n        return rawVNode;\n      }\n      let vnode = getInnerChild(rawVNode);\n      if (vnode.type === Comment) {\n        current = null;\n        return vnode;\n      }\n      const comp = vnode.type;\n      const name = getComponentName(\n        isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n      );\n      const { include, exclude, max } = props;\n      if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n        current = vnode;\n        return rawVNode;\n      }\n      const key = vnode.key == null ? comp : vnode.key;\n      const cachedVNode = cache.get(key);\n      if (vnode.el) {\n        vnode = cloneVNode(vnode);\n        if (rawVNode.shapeFlag & 128) {\n          rawVNode.ssContent = vnode;\n        }\n      }\n      pendingCacheKey = key;\n      if (cachedVNode) {\n        vnode.el = cachedVNode.el;\n        vnode.component = cachedVNode.component;\n        if (vnode.transition) {\n          setTransitionHooks(vnode, vnode.transition);\n        }\n        vnode.shapeFlag |= 512;\n        keys.delete(key);\n        keys.add(key);\n      } else {\n        keys.add(key);\n        if (max && keys.size > parseInt(max, 10)) {\n          pruneCacheEntry(keys.values().next().value);\n        }\n      }\n      vnode.shapeFlag |= 256;\n      current = vnode;\n      return isSuspense(rawVNode.type) ? rawVNode : vnode;\n    };\n  }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n  if (isArray(pattern)) {\n    return pattern.some((p) => matches(p, name));\n  } else if (isString(pattern)) {\n    return pattern.split(\",\").includes(name);\n  } else if (isRegExp(pattern)) {\n    return pattern.test(name);\n  }\n  return false;\n}\nfunction onActivated(hook, target) {\n  registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n  registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n  const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n    let current = target;\n    while (current) {\n      if (current.isDeactivated) {\n        return;\n      }\n      current = current.parent;\n    }\n    return hook();\n  });\n  injectHook(type, wrappedHook, target);\n  if (target) {\n    let current = target.parent;\n    while (current && current.parent) {\n      if (isKeepAlive(current.parent.vnode)) {\n        injectToKeepAliveRoot(wrappedHook, type, target, current);\n      }\n      current = current.parent;\n    }\n  }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n  const injected = injectHook(\n    type,\n    hook,\n    keepAliveRoot,\n    true\n    /* prepend */\n  );\n  onUnmounted(() => {\n    remove(keepAliveRoot[type], injected);\n  }, target);\n}\nfunction resetShapeFlag(vnode) {\n  vnode.shapeFlag &= ~256;\n  vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n  if (target) {\n    const hooks = target[type] || (target[type] = []);\n    const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n      pauseTracking();\n      const reset = setCurrentInstance(target);\n      const res = callWithAsyncErrorHandling(hook, target, type, args);\n      reset();\n      resetTracking();\n      return res;\n    });\n    if (prepend) {\n      hooks.unshift(wrappedHook);\n    } else {\n      hooks.push(wrappedHook);\n    }\n    return wrappedHook;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, \"\"));\n    warn$1(\n      `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n    );\n  }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => {\n  if (!isInSSRComponentSetup || lifecycle === \"sp\") {\n    injectHook(lifecycle, (...args) => hook(...args), target);\n  }\n};\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n  \"rtg\"\n);\nconst onRenderTracked = createHook(\n  \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n  injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n  if (isString(component)) {\n    return resolveAsset(COMPONENTS, component, false) || component;\n  } else {\n    return component || NULL_DYNAMIC_COMPONENT;\n  }\n}\nfunction resolveDirective(name) {\n  return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n  const instance = currentRenderingInstance || currentInstance;\n  if (instance) {\n    const Component = instance.type;\n    if (type === COMPONENTS) {\n      const selfName = getComponentName(\n        Component,\n        false\n      );\n      if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n        return Component;\n      }\n    }\n    const res = (\n      // local registration\n      // check instance[type] first which is resolved for options API\n      resolve(instance[type] || Component[type], name) || // global registration\n      resolve(instance.appContext[type], name)\n    );\n    if (!res && maybeSelfReference) {\n      return Component;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n      const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n      warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n    }\n    return res;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(\n      `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n    );\n  }\n}\nfunction resolve(registry, name) {\n  return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n  let ret;\n  const cached = cache && cache[index];\n  if (isArray(source) || isString(source)) {\n    ret = new Array(source.length);\n    for (let i = 0, l = source.length; i < l; i++) {\n      ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n    }\n  } else if (typeof source === \"number\") {\n    if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n      warn$1(`The v-for range expect an integer value but got ${source}.`);\n    }\n    ret = new Array(source);\n    for (let i = 0; i < source; i++) {\n      ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n    }\n  } else if (isObject(source)) {\n    if (source[Symbol.iterator]) {\n      ret = Array.from(\n        source,\n        (item, i) => renderItem(item, i, void 0, cached && cached[i])\n      );\n    } else {\n      const keys = Object.keys(source);\n      ret = new Array(keys.length);\n      for (let i = 0, l = keys.length; i < l; i++) {\n        const key = keys[i];\n        ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n      }\n    }\n  } else {\n    ret = [];\n  }\n  if (cache) {\n    cache[index] = ret;\n  }\n  return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n  for (let i = 0; i < dynamicSlots.length; i++) {\n    const slot = dynamicSlots[i];\n    if (isArray(slot)) {\n      for (let j = 0; j < slot.length; j++) {\n        slots[slot[j].name] = slot[j].fn;\n      }\n    } else if (slot) {\n      slots[slot.name] = slot.key ? (...args) => {\n        const res = slot.fn(...args);\n        if (res) res.key = slot.key;\n        return res;\n      } : slot.fn;\n    }\n  }\n  return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n  if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n    if (name !== \"default\") props.name = name;\n    return createVNode(\"slot\", props, fallback && fallback());\n  }\n  let slot = slots[name];\n  if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n    warn$1(\n      `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n    );\n    slot = () => [];\n  }\n  if (slot && slot._c) {\n    slot._d = false;\n  }\n  openBlock();\n  const validSlotContent = slot && ensureValidVNode(slot(props));\n  const rendered = createBlock(\n    Fragment,\n    {\n      key: (props.key || // slot content array of a dynamic conditional slot may have a branch\n      // key attached in the `createSlots` helper, respect that\n      validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content\n      (!validSlotContent && fallback ? \"_fb\" : \"\")\n    },\n    validSlotContent || (fallback ? fallback() : []),\n    validSlotContent && slots._ === 1 ? 64 : -2\n  );\n  if (!noSlotted && rendered.scopeId) {\n    rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n  }\n  if (slot && slot._c) {\n    slot._d = true;\n  }\n  return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n  return vnodes.some((child) => {\n    if (!isVNode(child)) return true;\n    if (child.type === Comment) return false;\n    if (child.type === Fragment && !ensureValidVNode(child.children))\n      return false;\n    return true;\n  }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n  const ret = {};\n  if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n    warn$1(`v-on with no argument expects an object value.`);\n    return ret;\n  }\n  for (const key in obj) {\n    ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n  }\n  return ret;\n}\n\nconst getPublicInstance = (i) => {\n  if (!i) return null;\n  if (isStatefulComponent(i)) return getComponentPublicInstance(i);\n  return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n  // Move PURE marker to new line to workaround compiler discarding it\n  // due to type annotation\n  /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n    $: (i) => i,\n    $el: (i) => i.vnode.el,\n    $data: (i) => i.data,\n    $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n    $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n    $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n    $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n    $parent: (i) => getPublicInstance(i.parent),\n    $root: (i) => getPublicInstance(i.root),\n    $emit: (i) => i.emit,\n    $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n    $forceUpdate: (i) => i.f || (i.f = () => {\n      i.effect.dirty = true;\n      queueJob(i.update);\n    }),\n    $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n    $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n  })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n  get({ _: instance }, key) {\n    if (key === \"__v_skip\") {\n      return true;\n    }\n    const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n    if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n      return true;\n    }\n    let normalizedProps;\n    if (key[0] !== \"$\") {\n      const n = accessCache[key];\n      if (n !== void 0) {\n        switch (n) {\n          case 1 /* SETUP */:\n            return setupState[key];\n          case 2 /* DATA */:\n            return data[key];\n          case 4 /* CONTEXT */:\n            return ctx[key];\n          case 3 /* PROPS */:\n            return props[key];\n        }\n      } else if (hasSetupBinding(setupState, key)) {\n        accessCache[key] = 1 /* SETUP */;\n        return setupState[key];\n      } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n        accessCache[key] = 2 /* DATA */;\n        return data[key];\n      } else if (\n        // only cache other properties when instance has declared (thus stable)\n        // props\n        (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n      ) {\n        accessCache[key] = 3 /* PROPS */;\n        return props[key];\n      } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n        accessCache[key] = 4 /* CONTEXT */;\n        return ctx[key];\n      } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n        accessCache[key] = 0 /* OTHER */;\n      }\n    }\n    const publicGetter = publicPropertiesMap[key];\n    let cssModule, globalProperties;\n    if (publicGetter) {\n      if (key === \"$attrs\") {\n        track(instance.attrs, \"get\", \"\");\n        !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n      } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n        track(instance, \"get\", key);\n      }\n      return publicGetter(instance);\n    } else if (\n      // css module (injected by vue-loader)\n      (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n    ) {\n      return cssModule;\n    } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n      accessCache[key] = 4 /* CONTEXT */;\n      return ctx[key];\n    } else if (\n      // global properties\n      globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n    ) {\n      {\n        return globalProperties[key];\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n    // to infinite warning loop\n    key.indexOf(\"__v\") !== 0)) {\n      if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n        warn$1(\n          `Property ${JSON.stringify(\n            key\n          )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n        );\n      } else if (instance === currentRenderingInstance) {\n        warn$1(\n          `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n        );\n      }\n    }\n  },\n  set({ _: instance }, key, value) {\n    const { data, setupState, ctx } = instance;\n    if (hasSetupBinding(setupState, key)) {\n      setupState[key] = value;\n      return true;\n    } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n      warn$1(`Cannot mutate <script setup> binding \"${key}\" from Options API.`);\n      return false;\n    } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n      data[key] = value;\n      return true;\n    } else if (hasOwn(instance.props, key)) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(`Attempting to mutate prop \"${key}\". Props are readonly.`);\n      return false;\n    }\n    if (key[0] === \"$\" && key.slice(1) in instance) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `Attempting to mutate public property \"${key}\". Properties starting with $ are reserved and readonly.`\n      );\n      return false;\n    } else {\n      if (!!(process.env.NODE_ENV !== \"production\") && key in instance.appContext.config.globalProperties) {\n        Object.defineProperty(ctx, key, {\n          enumerable: true,\n          configurable: true,\n          value\n        });\n      } else {\n        ctx[key] = value;\n      }\n    }\n    return true;\n  },\n  has({\n    _: { data, setupState, accessCache, ctx, appContext, propsOptions }\n  }, key) {\n    let normalizedProps;\n    return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);\n  },\n  defineProperty(target, key, descriptor) {\n    if (descriptor.get != null) {\n      target._.accessCache[key] = 0;\n    } else if (hasOwn(descriptor, \"value\")) {\n      this.set(target, key, descriptor.value, null);\n    }\n    return Reflect.defineProperty(target, key, descriptor);\n  }\n};\nif (!!(process.env.NODE_ENV !== \"production\") && true) {\n  PublicInstanceProxyHandlers.ownKeys = (target) => {\n    warn$1(\n      `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`\n    );\n    return Reflect.ownKeys(target);\n  };\n}\nconst RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(\n  {},\n  PublicInstanceProxyHandlers,\n  {\n    get(target, key) {\n      if (key === Symbol.unscopables) {\n        return;\n      }\n      return PublicInstanceProxyHandlers.get(target, key, target);\n    },\n    has(_, key) {\n      const has = key[0] !== \"_\" && !isGloballyAllowed(key);\n      if (!!(process.env.NODE_ENV !== \"production\") && !has && PublicInstanceProxyHandlers.has(_, key)) {\n        warn$1(\n          `Property ${JSON.stringify(\n            key\n          )} should not start with _ which is a reserved prefix for Vue internals.`\n        );\n      }\n      return has;\n    }\n  }\n);\nfunction createDevRenderContext(instance) {\n  const target = {};\n  Object.defineProperty(target, `_`, {\n    configurable: true,\n    enumerable: false,\n    get: () => instance\n  });\n  Object.keys(publicPropertiesMap).forEach((key) => {\n    Object.defineProperty(target, key, {\n      configurable: true,\n      enumerable: false,\n      get: () => publicPropertiesMap[key](instance),\n      // intercepted by the proxy so no need for implementation,\n      // but needed to prevent set errors\n      set: NOOP\n    });\n  });\n  return target;\n}\nfunction exposePropsOnRenderContext(instance) {\n  const {\n    ctx,\n    propsOptions: [propsOptions]\n  } = instance;\n  if (propsOptions) {\n    Object.keys(propsOptions).forEach((key) => {\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => instance.props[key],\n        set: NOOP\n      });\n    });\n  }\n}\nfunction exposeSetupStateOnRenderContext(instance) {\n  const { ctx, setupState } = instance;\n  Object.keys(toRaw(setupState)).forEach((key) => {\n    if (!setupState.__isScriptSetup) {\n      if (isReservedPrefix(key[0])) {\n        warn$1(\n          `setup() return property ${JSON.stringify(\n            key\n          )} should not start with \"$\" or \"_\" which are reserved prefixes for Vue internals.`\n        );\n        return;\n      }\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => setupState[key],\n        set: NOOP\n      });\n    }\n  });\n}\n\nconst warnRuntimeUsage = (method) => warn$1(\n  `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`\n);\nfunction defineProps() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineProps`);\n  }\n  return null;\n}\nfunction defineEmits() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineEmits`);\n  }\n  return null;\n}\nfunction defineExpose(exposed) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineExpose`);\n  }\n}\nfunction defineOptions(options) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineOptions`);\n  }\n}\nfunction defineSlots() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`defineSlots`);\n  }\n  return null;\n}\nfunction defineModel() {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(\"defineModel\");\n  }\n}\nfunction withDefaults(props, defaults) {\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    warnRuntimeUsage(`withDefaults`);\n  }\n  return null;\n}\nfunction useSlots() {\n  return getContext().slots;\n}\nfunction useAttrs() {\n  return getContext().attrs;\n}\nfunction getContext() {\n  const i = getCurrentInstance();\n  if (!!(process.env.NODE_ENV !== \"production\") && !i) {\n    warn$1(`useContext() called without active instance.`);\n  }\n  return i.setupContext || (i.setupContext = createSetupContext(i));\n}\nfunction normalizePropsOrEmits(props) {\n  return isArray(props) ? props.reduce(\n    (normalized, p) => (normalized[p] = null, normalized),\n    {}\n  ) : props;\n}\nfunction mergeDefaults(raw, defaults) {\n  const props = normalizePropsOrEmits(raw);\n  for (const key in defaults) {\n    if (key.startsWith(\"__skip\")) continue;\n    let opt = props[key];\n    if (opt) {\n      if (isArray(opt) || isFunction(opt)) {\n        opt = props[key] = { type: opt, default: defaults[key] };\n      } else {\n        opt.default = defaults[key];\n      }\n    } else if (opt === null) {\n      opt = props[key] = { default: defaults[key] };\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`props default key \"${key}\" has no corresponding declaration.`);\n    }\n    if (opt && defaults[`__skip_${key}`]) {\n      opt.skipFactory = true;\n    }\n  }\n  return props;\n}\nfunction mergeModels(a, b) {\n  if (!a || !b) return a || b;\n  if (isArray(a) && isArray(b)) return a.concat(b);\n  return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));\n}\nfunction createPropsRestProxy(props, excludedKeys) {\n  const ret = {};\n  for (const key in props) {\n    if (!excludedKeys.includes(key)) {\n      Object.defineProperty(ret, key, {\n        enumerable: true,\n        get: () => props[key]\n      });\n    }\n  }\n  return ret;\n}\nfunction withAsyncContext(getAwaitable) {\n  const ctx = getCurrentInstance();\n  if (!!(process.env.NODE_ENV !== \"production\") && !ctx) {\n    warn$1(\n      `withAsyncContext called without active current instance. This is likely a bug.`\n    );\n  }\n  let awaitable = getAwaitable();\n  unsetCurrentInstance();\n  if (isPromise(awaitable)) {\n    awaitable = awaitable.catch((e) => {\n      setCurrentInstance(ctx);\n      throw e;\n    });\n  }\n  return [awaitable, () => setCurrentInstance(ctx)];\n}\n\nfunction createDuplicateChecker() {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (type, key) => {\n    if (cache[key]) {\n      warn$1(`${type} property \"${key}\" is already defined in ${cache[key]}.`);\n    } else {\n      cache[key] = type;\n    }\n  };\n}\nlet shouldCacheAccess = true;\nfunction applyOptions(instance) {\n  const options = resolveMergedOptions(instance);\n  const publicThis = instance.proxy;\n  const ctx = instance.ctx;\n  shouldCacheAccess = false;\n  if (options.beforeCreate) {\n    callHook(options.beforeCreate, instance, \"bc\");\n  }\n  const {\n    // state\n    data: dataOptions,\n    computed: computedOptions,\n    methods,\n    watch: watchOptions,\n    provide: provideOptions,\n    inject: injectOptions,\n    // lifecycle\n    created,\n    beforeMount,\n    mounted,\n    beforeUpdate,\n    updated,\n    activated,\n    deactivated,\n    beforeDestroy,\n    beforeUnmount,\n    destroyed,\n    unmounted,\n    render,\n    renderTracked,\n    renderTriggered,\n    errorCaptured,\n    serverPrefetch,\n    // public API\n    expose,\n    inheritAttrs,\n    // assets\n    components,\n    directives,\n    filters\n  } = options;\n  const checkDuplicateProperties = !!(process.env.NODE_ENV !== \"production\") ? createDuplicateChecker() : null;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const [propsOptions] = instance.propsOptions;\n    if (propsOptions) {\n      for (const key in propsOptions) {\n        checkDuplicateProperties(\"Props\" /* PROPS */, key);\n      }\n    }\n  }\n  if (injectOptions) {\n    resolveInjections(injectOptions, ctx, checkDuplicateProperties);\n  }\n  if (methods) {\n    for (const key in methods) {\n      const methodHandler = methods[key];\n      if (isFunction(methodHandler)) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          Object.defineProperty(ctx, key, {\n            value: methodHandler.bind(publicThis),\n            configurable: true,\n            enumerable: true,\n            writable: true\n          });\n        } else {\n          ctx[key] = methodHandler.bind(publicThis);\n        }\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          checkDuplicateProperties(\"Methods\" /* METHODS */, key);\n        }\n      } else if (!!(process.env.NODE_ENV !== \"production\")) {\n        warn$1(\n          `Method \"${key}\" has type \"${typeof methodHandler}\" in the component definition. Did you reference the function correctly?`\n        );\n      }\n    }\n  }\n  if (dataOptions) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(dataOptions)) {\n      warn$1(\n        `The data option must be a function. Plain object usage is no longer supported.`\n      );\n    }\n    const data = dataOptions.call(publicThis, publicThis);\n    if (!!(process.env.NODE_ENV !== \"production\") && isPromise(data)) {\n      warn$1(\n        `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`\n      );\n    }\n    if (!isObject(data)) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(`data() should return an object.`);\n    } else {\n      instance.data = reactive(data);\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        for (const key in data) {\n          checkDuplicateProperties(\"Data\" /* DATA */, key);\n          if (!isReservedPrefix(key[0])) {\n            Object.defineProperty(ctx, key, {\n              configurable: true,\n              enumerable: true,\n              get: () => data[key],\n              set: NOOP\n            });\n          }\n        }\n      }\n    }\n  }\n  shouldCacheAccess = true;\n  if (computedOptions) {\n    for (const key in computedOptions) {\n      const opt = computedOptions[key];\n      const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;\n      if (!!(process.env.NODE_ENV !== \"production\") && get === NOOP) {\n        warn$1(`Computed property \"${key}\" has no getter.`);\n      }\n      const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== \"production\") ? () => {\n        warn$1(\n          `Write operation failed: computed property \"${key}\" is readonly.`\n        );\n      } : NOOP;\n      const c = computed({\n        get,\n        set\n      });\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => c.value,\n        set: (v) => c.value = v\n      });\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        checkDuplicateProperties(\"Computed\" /* COMPUTED */, key);\n      }\n    }\n  }\n  if (watchOptions) {\n    for (const key in watchOptions) {\n      createWatcher(watchOptions[key], ctx, publicThis, key);\n    }\n  }\n  if (provideOptions) {\n    const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;\n    Reflect.ownKeys(provides).forEach((key) => {\n      provide(key, provides[key]);\n    });\n  }\n  if (created) {\n    callHook(created, instance, \"c\");\n  }\n  function registerLifecycleHook(register, hook) {\n    if (isArray(hook)) {\n      hook.forEach((_hook) => register(_hook.bind(publicThis)));\n    } else if (hook) {\n      register(hook.bind(publicThis));\n    }\n  }\n  registerLifecycleHook(onBeforeMount, beforeMount);\n  registerLifecycleHook(onMounted, mounted);\n  registerLifecycleHook(onBeforeUpdate, beforeUpdate);\n  registerLifecycleHook(onUpdated, updated);\n  registerLifecycleHook(onActivated, activated);\n  registerLifecycleHook(onDeactivated, deactivated);\n  registerLifecycleHook(onErrorCaptured, errorCaptured);\n  registerLifecycleHook(onRenderTracked, renderTracked);\n  registerLifecycleHook(onRenderTriggered, renderTriggered);\n  registerLifecycleHook(onBeforeUnmount, beforeUnmount);\n  registerLifecycleHook(onUnmounted, unmounted);\n  registerLifecycleHook(onServerPrefetch, serverPrefetch);\n  if (isArray(expose)) {\n    if (expose.length) {\n      const exposed = instance.exposed || (instance.exposed = {});\n      expose.forEach((key) => {\n        Object.defineProperty(exposed, key, {\n          get: () => publicThis[key],\n          set: (val) => publicThis[key] = val\n        });\n      });\n    } else if (!instance.exposed) {\n      instance.exposed = {};\n    }\n  }\n  if (render && instance.render === NOOP) {\n    instance.render = render;\n  }\n  if (inheritAttrs != null) {\n    instance.inheritAttrs = inheritAttrs;\n  }\n  if (components) instance.components = components;\n  if (directives) instance.directives = directives;\n}\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {\n  if (isArray(injectOptions)) {\n    injectOptions = normalizeInject(injectOptions);\n  }\n  for (const key in injectOptions) {\n    const opt = injectOptions[key];\n    let injected;\n    if (isObject(opt)) {\n      if (\"default\" in opt) {\n        injected = inject(\n          opt.from || key,\n          opt.default,\n          true\n        );\n      } else {\n        injected = inject(opt.from || key);\n      }\n    } else {\n      injected = inject(opt);\n    }\n    if (isRef(injected)) {\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => injected.value,\n        set: (v) => injected.value = v\n      });\n    } else {\n      ctx[key] = injected;\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      checkDuplicateProperties(\"Inject\" /* INJECT */, key);\n    }\n  }\n}\nfunction callHook(hook, instance, type) {\n  callWithAsyncErrorHandling(\n    isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy),\n    instance,\n    type\n  );\n}\nfunction createWatcher(raw, ctx, publicThis, key) {\n  const getter = key.includes(\".\") ? createPathGetter(publicThis, key) : () => publicThis[key];\n  if (isString(raw)) {\n    const handler = ctx[raw];\n    if (isFunction(handler)) {\n      watch(getter, handler);\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`Invalid watch handler specified by key \"${raw}\"`, handler);\n    }\n  } else if (isFunction(raw)) {\n    watch(getter, raw.bind(publicThis));\n  } else if (isObject(raw)) {\n    if (isArray(raw)) {\n      raw.forEach((r) => createWatcher(r, ctx, publicThis, key));\n    } else {\n      const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];\n      if (isFunction(handler)) {\n        watch(getter, handler, raw);\n      } else if (!!(process.env.NODE_ENV !== \"production\")) {\n        warn$1(`Invalid watch handler specified by key \"${raw.handler}\"`, handler);\n      }\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(`Invalid watch option: \"${key}\"`, raw);\n  }\n}\nfunction resolveMergedOptions(instance) {\n  const base = instance.type;\n  const { mixins, extends: extendsOptions } = base;\n  const {\n    mixins: globalMixins,\n    optionsCache: cache,\n    config: { optionMergeStrategies }\n  } = instance.appContext;\n  const cached = cache.get(base);\n  let resolved;\n  if (cached) {\n    resolved = cached;\n  } else if (!globalMixins.length && !mixins && !extendsOptions) {\n    {\n      resolved = base;\n    }\n  } else {\n    resolved = {};\n    if (globalMixins.length) {\n      globalMixins.forEach(\n        (m) => mergeOptions(resolved, m, optionMergeStrategies, true)\n      );\n    }\n    mergeOptions(resolved, base, optionMergeStrategies);\n  }\n  if (isObject(base)) {\n    cache.set(base, resolved);\n  }\n  return resolved;\n}\nfunction mergeOptions(to, from, strats, asMixin = false) {\n  const { mixins, extends: extendsOptions } = from;\n  if (extendsOptions) {\n    mergeOptions(to, extendsOptions, strats, true);\n  }\n  if (mixins) {\n    mixins.forEach(\n      (m) => mergeOptions(to, m, strats, true)\n    );\n  }\n  for (const key in from) {\n    if (asMixin && key === \"expose\") {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `\"expose\" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`\n      );\n    } else {\n      const strat = internalOptionMergeStrats[key] || strats && strats[key];\n      to[key] = strat ? strat(to[key], from[key]) : from[key];\n    }\n  }\n  return to;\n}\nconst internalOptionMergeStrats = {\n  data: mergeDataFn,\n  props: mergeEmitsOrPropsOptions,\n  emits: mergeEmitsOrPropsOptions,\n  // objects\n  methods: mergeObjectOptions,\n  computed: mergeObjectOptions,\n  // lifecycle\n  beforeCreate: mergeAsArray,\n  created: mergeAsArray,\n  beforeMount: mergeAsArray,\n  mounted: mergeAsArray,\n  beforeUpdate: mergeAsArray,\n  updated: mergeAsArray,\n  beforeDestroy: mergeAsArray,\n  beforeUnmount: mergeAsArray,\n  destroyed: mergeAsArray,\n  unmounted: mergeAsArray,\n  activated: mergeAsArray,\n  deactivated: mergeAsArray,\n  errorCaptured: mergeAsArray,\n  serverPrefetch: mergeAsArray,\n  // assets\n  components: mergeObjectOptions,\n  directives: mergeObjectOptions,\n  // watch\n  watch: mergeWatchOptions,\n  // provide / inject\n  provide: mergeDataFn,\n  inject: mergeInject\n};\nfunction mergeDataFn(to, from) {\n  if (!from) {\n    return to;\n  }\n  if (!to) {\n    return from;\n  }\n  return function mergedDataFn() {\n    return (extend)(\n      isFunction(to) ? to.call(this, this) : to,\n      isFunction(from) ? from.call(this, this) : from\n    );\n  };\n}\nfunction mergeInject(to, from) {\n  return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\n}\nfunction normalizeInject(raw) {\n  if (isArray(raw)) {\n    const res = {};\n    for (let i = 0; i < raw.length; i++) {\n      res[raw[i]] = raw[i];\n    }\n    return res;\n  }\n  return raw;\n}\nfunction mergeAsArray(to, from) {\n  return to ? [...new Set([].concat(to, from))] : from;\n}\nfunction mergeObjectOptions(to, from) {\n  return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;\n}\nfunction mergeEmitsOrPropsOptions(to, from) {\n  if (to) {\n    if (isArray(to) && isArray(from)) {\n      return [.../* @__PURE__ */ new Set([...to, ...from])];\n    }\n    return extend(\n      /* @__PURE__ */ Object.create(null),\n      normalizePropsOrEmits(to),\n      normalizePropsOrEmits(from != null ? from : {})\n    );\n  } else {\n    return from;\n  }\n}\nfunction mergeWatchOptions(to, from) {\n  if (!to) return from;\n  if (!from) return to;\n  const merged = extend(/* @__PURE__ */ Object.create(null), to);\n  for (const key in from) {\n    merged[key] = mergeAsArray(to[key], from[key]);\n  }\n  return merged;\n}\n\nfunction createAppContext() {\n  return {\n    app: null,\n    config: {\n      isNativeTag: NO,\n      performance: false,\n      globalProperties: {},\n      optionMergeStrategies: {},\n      errorHandler: void 0,\n      warnHandler: void 0,\n      compilerOptions: {}\n    },\n    mixins: [],\n    components: {},\n    directives: {},\n    provides: /* @__PURE__ */ Object.create(null),\n    optionsCache: /* @__PURE__ */ new WeakMap(),\n    propsCache: /* @__PURE__ */ new WeakMap(),\n    emitsCache: /* @__PURE__ */ new WeakMap()\n  };\n}\nlet uid$1 = 0;\nfunction createAppAPI(render, hydrate) {\n  return function createApp(rootComponent, rootProps = null) {\n    if (!isFunction(rootComponent)) {\n      rootComponent = extend({}, rootComponent);\n    }\n    if (rootProps != null && !isObject(rootProps)) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(`root props passed to app.mount() must be an object.`);\n      rootProps = null;\n    }\n    const context = createAppContext();\n    const installedPlugins = /* @__PURE__ */ new WeakSet();\n    let isMounted = false;\n    const app = context.app = {\n      _uid: uid$1++,\n      _component: rootComponent,\n      _props: rootProps,\n      _container: null,\n      _context: context,\n      _instance: null,\n      version,\n      get config() {\n        return context.config;\n      },\n      set config(v) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\n            `app.config cannot be replaced. Modify individual options instead.`\n          );\n        }\n      },\n      use(plugin, ...options) {\n        if (installedPlugins.has(plugin)) {\n          !!(process.env.NODE_ENV !== \"production\") && warn$1(`Plugin has already been applied to target app.`);\n        } else if (plugin && isFunction(plugin.install)) {\n          installedPlugins.add(plugin);\n          plugin.install(app, ...options);\n        } else if (isFunction(plugin)) {\n          installedPlugins.add(plugin);\n          plugin(app, ...options);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\n            `A plugin must either be a function or an object with an \"install\" function.`\n          );\n        }\n        return app;\n      },\n      mixin(mixin) {\n        if (__VUE_OPTIONS_API__) {\n          if (!context.mixins.includes(mixin)) {\n            context.mixins.push(mixin);\n          } else if (!!(process.env.NODE_ENV !== \"production\")) {\n            warn$1(\n              \"Mixin has already been applied to target app\" + (mixin.name ? `: ${mixin.name}` : \"\")\n            );\n          }\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\"Mixins are only available in builds supporting Options API\");\n        }\n        return app;\n      },\n      component(name, component) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          validateComponentName(name, context.config);\n        }\n        if (!component) {\n          return context.components[name];\n        }\n        if (!!(process.env.NODE_ENV !== \"production\") && context.components[name]) {\n          warn$1(`Component \"${name}\" has already been registered in target app.`);\n        }\n        context.components[name] = component;\n        return app;\n      },\n      directive(name, directive) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          validateDirectiveName(name);\n        }\n        if (!directive) {\n          return context.directives[name];\n        }\n        if (!!(process.env.NODE_ENV !== \"production\") && context.directives[name]) {\n          warn$1(`Directive \"${name}\" has already been registered in target app.`);\n        }\n        context.directives[name] = directive;\n        return app;\n      },\n      mount(rootContainer, isHydrate, namespace) {\n        if (!isMounted) {\n          if (!!(process.env.NODE_ENV !== \"production\") && rootContainer.__vue_app__) {\n            warn$1(\n              `There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling \\`app.unmount()\\` first.`\n            );\n          }\n          const vnode = createVNode(rootComponent, rootProps);\n          vnode.appContext = context;\n          if (namespace === true) {\n            namespace = \"svg\";\n          } else if (namespace === false) {\n            namespace = void 0;\n          }\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            context.reload = () => {\n              render(\n                cloneVNode(vnode),\n                rootContainer,\n                namespace\n              );\n            };\n          }\n          if (isHydrate && hydrate) {\n            hydrate(vnode, rootContainer);\n          } else {\n            render(vnode, rootContainer, namespace);\n          }\n          isMounted = true;\n          app._container = rootContainer;\n          rootContainer.__vue_app__ = app;\n          if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n            app._instance = vnode.component;\n            devtoolsInitApp(app, version);\n          }\n          return getComponentPublicInstance(vnode.component);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\n            `App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \\`const createMyApp = () => createApp(App)\\``\n          );\n        }\n      },\n      unmount() {\n        if (isMounted) {\n          render(null, app._container);\n          if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n            app._instance = null;\n            devtoolsUnmountApp(app);\n          }\n          delete app._container.__vue_app__;\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(`Cannot unmount an app that is not mounted.`);\n        }\n      },\n      provide(key, value) {\n        if (!!(process.env.NODE_ENV !== \"production\") && key in context.provides) {\n          warn$1(\n            `App already provides property with key \"${String(key)}\". It will be overwritten with the new value.`\n          );\n        }\n        context.provides[key] = value;\n        return app;\n      },\n      runWithContext(fn) {\n        const lastApp = currentApp;\n        currentApp = app;\n        try {\n          return fn();\n        } finally {\n          currentApp = lastApp;\n        }\n      }\n    };\n    return app;\n  };\n}\nlet currentApp = null;\n\nfunction provide(key, value) {\n  if (!currentInstance) {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`provide() can only be used inside setup().`);\n    }\n  } else {\n    let provides = currentInstance.provides;\n    const parentProvides = currentInstance.parent && currentInstance.parent.provides;\n    if (parentProvides === provides) {\n      provides = currentInstance.provides = Object.create(parentProvides);\n    }\n    provides[key] = value;\n  }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n  const instance = currentInstance || currentRenderingInstance;\n  if (instance || currentApp) {\n    const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;\n    if (provides && key in provides) {\n      return provides[key];\n    } else if (arguments.length > 1) {\n      return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(`injection \"${String(key)}\" not found.`);\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(`inject() can only be used inside setup() or functional components.`);\n  }\n}\nfunction hasInjectionContext() {\n  return !!(currentInstance || currentRenderingInstance || currentApp);\n}\n\nconst internalObjectProto = {};\nconst createInternalObject = () => Object.create(internalObjectProto);\nconst isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;\n\nfunction initProps(instance, rawProps, isStateful, isSSR = false) {\n  const props = {};\n  const attrs = createInternalObject();\n  instance.propsDefaults = /* @__PURE__ */ Object.create(null);\n  setFullProps(instance, rawProps, props, attrs);\n  for (const key in instance.propsOptions[0]) {\n    if (!(key in props)) {\n      props[key] = void 0;\n    }\n  }\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    validateProps(rawProps || {}, props, instance);\n  }\n  if (isStateful) {\n    instance.props = isSSR ? props : shallowReactive(props);\n  } else {\n    if (!instance.type.props) {\n      instance.props = attrs;\n    } else {\n      instance.props = props;\n    }\n  }\n  instance.attrs = attrs;\n}\nfunction isInHmrContext(instance) {\n  while (instance) {\n    if (instance.type.__hmrId) return true;\n    instance = instance.parent;\n  }\n}\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\n  const {\n    props,\n    attrs,\n    vnode: { patchFlag }\n  } = instance;\n  const rawCurrentProps = toRaw(props);\n  const [options] = instance.propsOptions;\n  let hasAttrsChanged = false;\n  if (\n    // always force full diff in dev\n    // - #1942 if hmr is enabled with sfc component\n    // - vite#872 non-sfc component used by sfc component\n    !(!!(process.env.NODE_ENV !== \"production\") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)\n  ) {\n    if (patchFlag & 8) {\n      const propsToUpdate = instance.vnode.dynamicProps;\n      for (let i = 0; i < propsToUpdate.length; i++) {\n        let key = propsToUpdate[i];\n        if (isEmitListener(instance.emitsOptions, key)) {\n          continue;\n        }\n        const value = rawProps[key];\n        if (options) {\n          if (hasOwn(attrs, key)) {\n            if (value !== attrs[key]) {\n              attrs[key] = value;\n              hasAttrsChanged = true;\n            }\n          } else {\n            const camelizedKey = camelize(key);\n            props[camelizedKey] = resolvePropValue(\n              options,\n              rawCurrentProps,\n              camelizedKey,\n              value,\n              instance,\n              false\n            );\n          }\n        } else {\n          if (value !== attrs[key]) {\n            attrs[key] = value;\n            hasAttrsChanged = true;\n          }\n        }\n      }\n    }\n  } else {\n    if (setFullProps(instance, rawProps, props, attrs)) {\n      hasAttrsChanged = true;\n    }\n    let kebabKey;\n    for (const key in rawCurrentProps) {\n      if (!rawProps || // for camelCase\n      !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case\n      // and converted to camelCase (#955)\n      ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {\n        if (options) {\n          if (rawPrevProps && // for camelCase\n          (rawPrevProps[key] !== void 0 || // for kebab-case\n          rawPrevProps[kebabKey] !== void 0)) {\n            props[key] = resolvePropValue(\n              options,\n              rawCurrentProps,\n              key,\n              void 0,\n              instance,\n              true\n            );\n          }\n        } else {\n          delete props[key];\n        }\n      }\n    }\n    if (attrs !== rawCurrentProps) {\n      for (const key in attrs) {\n        if (!rawProps || !hasOwn(rawProps, key) && true) {\n          delete attrs[key];\n          hasAttrsChanged = true;\n        }\n      }\n    }\n  }\n  if (hasAttrsChanged) {\n    trigger(instance.attrs, \"set\", \"\");\n  }\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    validateProps(rawProps || {}, props, instance);\n  }\n}\nfunction setFullProps(instance, rawProps, props, attrs) {\n  const [options, needCastKeys] = instance.propsOptions;\n  let hasAttrsChanged = false;\n  let rawCastValues;\n  if (rawProps) {\n    for (let key in rawProps) {\n      if (isReservedProp(key)) {\n        continue;\n      }\n      const value = rawProps[key];\n      let camelKey;\n      if (options && hasOwn(options, camelKey = camelize(key))) {\n        if (!needCastKeys || !needCastKeys.includes(camelKey)) {\n          props[camelKey] = value;\n        } else {\n          (rawCastValues || (rawCastValues = {}))[camelKey] = value;\n        }\n      } else if (!isEmitListener(instance.emitsOptions, key)) {\n        if (!(key in attrs) || value !== attrs[key]) {\n          attrs[key] = value;\n          hasAttrsChanged = true;\n        }\n      }\n    }\n  }\n  if (needCastKeys) {\n    const rawCurrentProps = toRaw(props);\n    const castValues = rawCastValues || EMPTY_OBJ;\n    for (let i = 0; i < needCastKeys.length; i++) {\n      const key = needCastKeys[i];\n      props[key] = resolvePropValue(\n        options,\n        rawCurrentProps,\n        key,\n        castValues[key],\n        instance,\n        !hasOwn(castValues, key)\n      );\n    }\n  }\n  return hasAttrsChanged;\n}\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\n  const opt = options[key];\n  if (opt != null) {\n    const hasDefault = hasOwn(opt, \"default\");\n    if (hasDefault && value === void 0) {\n      const defaultValue = opt.default;\n      if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {\n        const { propsDefaults } = instance;\n        if (key in propsDefaults) {\n          value = propsDefaults[key];\n        } else {\n          const reset = setCurrentInstance(instance);\n          value = propsDefaults[key] = defaultValue.call(\n            null,\n            props\n          );\n          reset();\n        }\n      } else {\n        value = defaultValue;\n      }\n    }\n    if (opt[0 /* shouldCast */]) {\n      if (isAbsent && !hasDefault) {\n        value = false;\n      } else if (opt[1 /* shouldCastTrue */] && (value === \"\" || value === hyphenate(key))) {\n        value = true;\n      }\n    }\n  }\n  return value;\n}\nconst mixinPropsCache = /* @__PURE__ */ new WeakMap();\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\n  const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;\n  const cached = cache.get(comp);\n  if (cached) {\n    return cached;\n  }\n  const raw = comp.props;\n  const normalized = {};\n  const needCastKeys = [];\n  let hasExtends = false;\n  if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n    const extendProps = (raw2) => {\n      hasExtends = true;\n      const [props, keys] = normalizePropsOptions(raw2, appContext, true);\n      extend(normalized, props);\n      if (keys) needCastKeys.push(...keys);\n    };\n    if (!asMixin && appContext.mixins.length) {\n      appContext.mixins.forEach(extendProps);\n    }\n    if (comp.extends) {\n      extendProps(comp.extends);\n    }\n    if (comp.mixins) {\n      comp.mixins.forEach(extendProps);\n    }\n  }\n  if (!raw && !hasExtends) {\n    if (isObject(comp)) {\n      cache.set(comp, EMPTY_ARR);\n    }\n    return EMPTY_ARR;\n  }\n  if (isArray(raw)) {\n    for (let i = 0; i < raw.length; i++) {\n      if (!!(process.env.NODE_ENV !== \"production\") && !isString(raw[i])) {\n        warn$1(`props must be strings when using array syntax.`, raw[i]);\n      }\n      const normalizedKey = camelize(raw[i]);\n      if (validatePropName(normalizedKey)) {\n        normalized[normalizedKey] = EMPTY_OBJ;\n      }\n    }\n  } else if (raw) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isObject(raw)) {\n      warn$1(`invalid props options`, raw);\n    }\n    for (const key in raw) {\n      const normalizedKey = camelize(key);\n      if (validatePropName(normalizedKey)) {\n        const opt = raw[key];\n        const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);\n        const propType = prop.type;\n        let shouldCast = false;\n        let shouldCastTrue = true;\n        if (isArray(propType)) {\n          for (let index = 0; index < propType.length; ++index) {\n            const type = propType[index];\n            const typeName = isFunction(type) && type.name;\n            if (typeName === \"Boolean\") {\n              shouldCast = true;\n              break;\n            } else if (typeName === \"String\") {\n              shouldCastTrue = false;\n            }\n          }\n        } else {\n          shouldCast = isFunction(propType) && propType.name === \"Boolean\";\n        }\n        prop[0 /* shouldCast */] = shouldCast;\n        prop[1 /* shouldCastTrue */] = shouldCastTrue;\n        if (shouldCast || hasOwn(prop, \"default\")) {\n          needCastKeys.push(normalizedKey);\n        }\n      }\n    }\n  }\n  const res = [normalized, needCastKeys];\n  if (isObject(comp)) {\n    cache.set(comp, res);\n  }\n  return res;\n}\nfunction validatePropName(key) {\n  if (key[0] !== \"$\" && !isReservedProp(key)) {\n    return true;\n  } else if (!!(process.env.NODE_ENV !== \"production\")) {\n    warn$1(`Invalid prop name: \"${key}\" is a reserved property.`);\n  }\n  return false;\n}\nfunction getType(ctor) {\n  if (ctor === null) {\n    return \"null\";\n  }\n  if (typeof ctor === \"function\") {\n    return ctor.name || \"\";\n  } else if (typeof ctor === \"object\") {\n    const name = ctor.constructor && ctor.constructor.name;\n    return name || \"\";\n  }\n  return \"\";\n}\nfunction validateProps(rawProps, props, instance) {\n  const resolvedValues = toRaw(props);\n  const options = instance.propsOptions[0];\n  for (const key in options) {\n    let opt = options[key];\n    if (opt == null) continue;\n    validateProp(\n      key,\n      resolvedValues[key],\n      opt,\n      !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(resolvedValues) : resolvedValues,\n      !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))\n    );\n  }\n}\nfunction validateProp(name, value, prop, props, isAbsent) {\n  const { type, required, validator, skipCheck } = prop;\n  if (required && isAbsent) {\n    warn$1('Missing required prop: \"' + name + '\"');\n    return;\n  }\n  if (value == null && !required) {\n    return;\n  }\n  if (type != null && type !== true && !skipCheck) {\n    let isValid = false;\n    const types = isArray(type) ? type : [type];\n    const expectedTypes = [];\n    for (let i = 0; i < types.length && !isValid; i++) {\n      const { valid, expectedType } = assertType(value, types[i]);\n      expectedTypes.push(expectedType || \"\");\n      isValid = valid;\n    }\n    if (!isValid) {\n      warn$1(getInvalidTypeMessage(name, value, expectedTypes));\n      return;\n    }\n  }\n  if (validator && !validator(value, props)) {\n    warn$1('Invalid prop: custom validator check failed for prop \"' + name + '\".');\n  }\n}\nconst isSimpleType = /* @__PURE__ */ makeMap(\n  \"String,Number,Boolean,Function,Symbol,BigInt\"\n);\nfunction assertType(value, type) {\n  let valid;\n  const expectedType = getType(type);\n  if (isSimpleType(expectedType)) {\n    const t = typeof value;\n    valid = t === expectedType.toLowerCase();\n    if (!valid && t === \"object\") {\n      valid = value instanceof type;\n    }\n  } else if (expectedType === \"Object\") {\n    valid = isObject(value);\n  } else if (expectedType === \"Array\") {\n    valid = isArray(value);\n  } else if (expectedType === \"null\") {\n    valid = value === null;\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid,\n    expectedType\n  };\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n  if (expectedTypes.length === 0) {\n    return `Prop type [] for prop \"${name}\" won't match anything. Did you mean to use type Array instead?`;\n  }\n  let message = `Invalid prop: type check failed for prop \"${name}\". Expected ${expectedTypes.map(capitalize).join(\" | \")}`;\n  const expectedType = expectedTypes[0];\n  const receivedType = toRawType(value);\n  const expectedValue = styleValue(value, expectedType);\n  const receivedValue = styleValue(value, receivedType);\n  if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {\n    message += ` with value ${expectedValue}`;\n  }\n  message += `, got ${receivedType} `;\n  if (isExplicable(receivedType)) {\n    message += `with value ${receivedValue}.`;\n  }\n  return message;\n}\nfunction styleValue(value, type) {\n  if (type === \"String\") {\n    return `\"${value}\"`;\n  } else if (type === \"Number\") {\n    return `${Number(value)}`;\n  } else {\n    return `${value}`;\n  }\n}\nfunction isExplicable(type) {\n  const explicitTypes = [\"string\", \"number\", \"boolean\"];\n  return explicitTypes.some((elem) => type.toLowerCase() === elem);\n}\nfunction isBoolean(...args) {\n  return args.some((elem) => elem.toLowerCase() === \"boolean\");\n}\n\nconst isInternalKey = (key) => key[0] === \"_\" || key === \"$stable\";\nconst normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];\nconst normalizeSlot = (key, rawSlot, ctx) => {\n  if (rawSlot._n) {\n    return rawSlot;\n  }\n  const normalized = withCtx((...args) => {\n    if (!!(process.env.NODE_ENV !== \"production\") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {\n      warn$1(\n        `Slot \"${key}\" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`\n      );\n    }\n    return normalizeSlotValue(rawSlot(...args));\n  }, ctx);\n  normalized._c = false;\n  return normalized;\n};\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\n  const ctx = rawSlots._ctx;\n  for (const key in rawSlots) {\n    if (isInternalKey(key)) continue;\n    const value = rawSlots[key];\n    if (isFunction(value)) {\n      slots[key] = normalizeSlot(key, value, ctx);\n    } else if (value != null) {\n      if (!!(process.env.NODE_ENV !== \"production\") && true) {\n        warn$1(\n          `Non-function value encountered for slot \"${key}\". Prefer function slots for better performance.`\n        );\n      }\n      const normalized = normalizeSlotValue(value);\n      slots[key] = () => normalized;\n    }\n  }\n};\nconst normalizeVNodeSlots = (instance, children) => {\n  if (!!(process.env.NODE_ENV !== \"production\") && !isKeepAlive(instance.vnode) && true) {\n    warn$1(\n      `Non-function value encountered for default slot. Prefer function slots for better performance.`\n    );\n  }\n  const normalized = normalizeSlotValue(children);\n  instance.slots.default = () => normalized;\n};\nconst assignSlots = (slots, children, optimized) => {\n  for (const key in children) {\n    if (optimized || key !== \"_\") {\n      slots[key] = children[key];\n    }\n  }\n};\nconst initSlots = (instance, children, optimized) => {\n  const slots = instance.slots = createInternalObject();\n  if (instance.vnode.shapeFlag & 32) {\n    const type = children._;\n    if (type) {\n      assignSlots(slots, children, optimized);\n      if (optimized) {\n        def(slots, \"_\", type, true);\n      }\n    } else {\n      normalizeObjectSlots(children, slots);\n    }\n  } else if (children) {\n    normalizeVNodeSlots(instance, children);\n  }\n};\nconst updateSlots = (instance, children, optimized) => {\n  const { vnode, slots } = instance;\n  let needDeletionCheck = true;\n  let deletionComparisonTarget = EMPTY_OBJ;\n  if (vnode.shapeFlag & 32) {\n    const type = children._;\n    if (type) {\n      if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n        assignSlots(slots, children, optimized);\n        trigger(instance, \"set\", \"$slots\");\n      } else if (optimized && type === 1) {\n        needDeletionCheck = false;\n      } else {\n        assignSlots(slots, children, optimized);\n      }\n    } else {\n      needDeletionCheck = !children.$stable;\n      normalizeObjectSlots(children, slots);\n    }\n    deletionComparisonTarget = children;\n  } else if (children) {\n    normalizeVNodeSlots(instance, children);\n    deletionComparisonTarget = { default: 1 };\n  }\n  if (needDeletionCheck) {\n    for (const key in slots) {\n      if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {\n        delete slots[key];\n      }\n    }\n  }\n};\n\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n  if (isArray(rawRef)) {\n    rawRef.forEach(\n      (r, i) => setRef(\n        r,\n        oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),\n        parentSuspense,\n        vnode,\n        isUnmount\n      )\n    );\n    return;\n  }\n  if (isAsyncWrapper(vnode) && !isUnmount) {\n    return;\n  }\n  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n  const value = isUnmount ? null : refValue;\n  const { i: owner, r: ref } = rawRef;\n  if (!!(process.env.NODE_ENV !== \"production\") && !owner) {\n    warn$1(\n      `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`\n    );\n    return;\n  }\n  const oldRef = oldRawRef && oldRawRef.r;\n  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;\n  const setupState = owner.setupState;\n  if (oldRef != null && oldRef !== ref) {\n    if (isString(oldRef)) {\n      refs[oldRef] = null;\n      if (hasOwn(setupState, oldRef)) {\n        setupState[oldRef] = null;\n      }\n    } else if (isRef(oldRef)) {\n      oldRef.value = null;\n    }\n  }\n  if (isFunction(ref)) {\n    callWithErrorHandling(ref, owner, 12, [value, refs]);\n  } else {\n    const _isString = isString(ref);\n    const _isRef = isRef(ref);\n    if (_isString || _isRef) {\n      const doSet = () => {\n        if (rawRef.f) {\n          const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;\n          if (isUnmount) {\n            isArray(existing) && remove(existing, refValue);\n          } else {\n            if (!isArray(existing)) {\n              if (_isString) {\n                refs[ref] = [refValue];\n                if (hasOwn(setupState, ref)) {\n                  setupState[ref] = refs[ref];\n                }\n              } else {\n                ref.value = [refValue];\n                if (rawRef.k) refs[rawRef.k] = ref.value;\n              }\n            } else if (!existing.includes(refValue)) {\n              existing.push(refValue);\n            }\n          }\n        } else if (_isString) {\n          refs[ref] = value;\n          if (hasOwn(setupState, ref)) {\n            setupState[ref] = value;\n          }\n        } else if (_isRef) {\n          ref.value = value;\n          if (rawRef.k) refs[rawRef.k] = value;\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n        }\n      };\n      if (value) {\n        doSet.id = -1;\n        queuePostRenderEffect(doSet, parentSuspense);\n      } else {\n        doSet();\n      }\n    } else if (!!(process.env.NODE_ENV !== \"production\")) {\n      warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n    }\n  }\n}\n\nconst TeleportEndKey = Symbol(\"_vte\");\nconst isTeleport = (type) => type.__isTeleport;\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === \"\");\nconst isTargetSVG = (target) => typeof SVGElement !== \"undefined\" && target instanceof SVGElement;\nconst isTargetMathML = (target) => typeof MathMLElement === \"function\" && target instanceof MathMLElement;\nconst resolveTarget = (props, select) => {\n  const targetSelector = props && props.to;\n  if (isString(targetSelector)) {\n    if (!select) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`\n      );\n      return null;\n    } else {\n      const target = select(targetSelector);\n      if (!!(process.env.NODE_ENV !== \"production\") && !target && !isTeleportDisabled(props)) {\n        warn$1(\n          `Failed to locate Teleport target with selector \"${targetSelector}\". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`\n        );\n      }\n      return target;\n    }\n  } else {\n    if (!!(process.env.NODE_ENV !== \"production\") && !targetSelector && !isTeleportDisabled(props)) {\n      warn$1(`Invalid Teleport target: ${targetSelector}`);\n    }\n    return targetSelector;\n  }\n};\nconst TeleportImpl = {\n  name: \"Teleport\",\n  __isTeleport: true,\n  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {\n    const {\n      mc: mountChildren,\n      pc: patchChildren,\n      pbc: patchBlockChildren,\n      o: { insert, querySelector, createText, createComment }\n    } = internals;\n    const disabled = isTeleportDisabled(n2.props);\n    let { shapeFlag, children, dynamicChildren } = n2;\n    if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n      optimized = false;\n      dynamicChildren = null;\n    }\n    if (n1 == null) {\n      const placeholder = n2.el = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport start\") : createText(\"\");\n      const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport end\") : createText(\"\");\n      insert(placeholder, container, anchor);\n      insert(mainAnchor, container, anchor);\n      const target = n2.target = resolveTarget(n2.props, querySelector);\n      const targetAnchor = prepareAnchor(target, n2, createText, insert);\n      if (target) {\n        if (namespace === \"svg\" || isTargetSVG(target)) {\n          namespace = \"svg\";\n        } else if (namespace === \"mathml\" || isTargetMathML(target)) {\n          namespace = \"mathml\";\n        }\n      } else if (!!(process.env.NODE_ENV !== \"production\") && !disabled) {\n        warn$1(\"Invalid Teleport target on mount:\", target, `(${typeof target})`);\n      }\n      const mount = (container2, anchor2) => {\n        if (shapeFlag & 16) {\n          mountChildren(\n            children,\n            container2,\n            anchor2,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        }\n      };\n      if (disabled) {\n        mount(container, mainAnchor);\n      } else if (target) {\n        mount(target, targetAnchor);\n      }\n    } else {\n      n2.el = n1.el;\n      n2.targetStart = n1.targetStart;\n      const mainAnchor = n2.anchor = n1.anchor;\n      const target = n2.target = n1.target;\n      const targetAnchor = n2.targetAnchor = n1.targetAnchor;\n      const wasDisabled = isTeleportDisabled(n1.props);\n      const currentContainer = wasDisabled ? container : target;\n      const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;\n      if (namespace === \"svg\" || isTargetSVG(target)) {\n        namespace = \"svg\";\n      } else if (namespace === \"mathml\" || isTargetMathML(target)) {\n        namespace = \"mathml\";\n      }\n      if (dynamicChildren) {\n        patchBlockChildren(\n          n1.dynamicChildren,\n          dynamicChildren,\n          currentContainer,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds\n        );\n        traverseStaticChildren(n1, n2, true);\n      } else if (!optimized) {\n        patchChildren(\n          n1,\n          n2,\n          currentContainer,\n          currentAnchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          false\n        );\n      }\n      if (disabled) {\n        if (!wasDisabled) {\n          moveTeleport(\n            n2,\n            container,\n            mainAnchor,\n            internals,\n            1\n          );\n        } else {\n          if (n2.props && n1.props && n2.props.to !== n1.props.to) {\n            n2.props.to = n1.props.to;\n          }\n        }\n      } else {\n        if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {\n          const nextTarget = n2.target = resolveTarget(\n            n2.props,\n            querySelector\n          );\n          if (nextTarget) {\n            moveTeleport(\n              n2,\n              nextTarget,\n              null,\n              internals,\n              0\n            );\n          } else if (!!(process.env.NODE_ENV !== \"production\")) {\n            warn$1(\n              \"Invalid Teleport target on update:\",\n              target,\n              `(${typeof target})`\n            );\n          }\n        } else if (wasDisabled) {\n          moveTeleport(\n            n2,\n            target,\n            targetAnchor,\n            internals,\n            1\n          );\n        }\n      }\n    }\n    updateCssVars(n2);\n  },\n  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {\n    const {\n      shapeFlag,\n      children,\n      anchor,\n      targetStart,\n      targetAnchor,\n      target,\n      props\n    } = vnode;\n    if (target) {\n      hostRemove(targetStart);\n      hostRemove(targetAnchor);\n    }\n    doRemove && hostRemove(anchor);\n    if (shapeFlag & 16) {\n      const shouldRemove = doRemove || !isTeleportDisabled(props);\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        unmount(\n          child,\n          parentComponent,\n          parentSuspense,\n          shouldRemove,\n          !!child.dynamicChildren\n        );\n      }\n    }\n  },\n  move: moveTeleport,\n  hydrate: hydrateTeleport\n};\nfunction moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {\n  if (moveType === 0) {\n    insert(vnode.targetAnchor, container, parentAnchor);\n  }\n  const { el, anchor, shapeFlag, children, props } = vnode;\n  const isReorder = moveType === 2;\n  if (isReorder) {\n    insert(el, container, parentAnchor);\n  }\n  if (!isReorder || isTeleportDisabled(props)) {\n    if (shapeFlag & 16) {\n      for (let i = 0; i < children.length; i++) {\n        move(\n          children[i],\n          container,\n          parentAnchor,\n          2\n        );\n      }\n    }\n  }\n  if (isReorder) {\n    insert(anchor, container, parentAnchor);\n  }\n}\nfunction hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {\n  o: { nextSibling, parentNode, querySelector, insert, createText }\n}, hydrateChildren) {\n  const target = vnode.target = resolveTarget(\n    vnode.props,\n    querySelector\n  );\n  if (target) {\n    const targetNode = target._lpa || target.firstChild;\n    if (vnode.shapeFlag & 16) {\n      if (isTeleportDisabled(vnode.props)) {\n        vnode.anchor = hydrateChildren(\n          nextSibling(node),\n          vnode,\n          parentNode(node),\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n        vnode.targetStart = targetNode;\n        vnode.targetAnchor = targetNode && nextSibling(targetNode);\n      } else {\n        vnode.anchor = nextSibling(node);\n        let targetAnchor = targetNode;\n        while (targetAnchor) {\n          if (targetAnchor && targetAnchor.nodeType === 8) {\n            if (targetAnchor.data === \"teleport start anchor\") {\n              vnode.targetStart = targetAnchor;\n            } else if (targetAnchor.data === \"teleport anchor\") {\n              vnode.targetAnchor = targetAnchor;\n              target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);\n              break;\n            }\n          }\n          targetAnchor = nextSibling(targetAnchor);\n        }\n        if (!vnode.targetAnchor) {\n          prepareAnchor(target, vnode, createText, insert);\n        }\n        hydrateChildren(\n          targetNode && nextSibling(targetNode),\n          vnode,\n          target,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n      }\n    }\n    updateCssVars(vnode);\n  }\n  return vnode.anchor && nextSibling(vnode.anchor);\n}\nconst Teleport = TeleportImpl;\nfunction updateCssVars(vnode) {\n  const ctx = vnode.ctx;\n  if (ctx && ctx.ut) {\n    let node = vnode.children[0].el;\n    while (node && node !== vnode.targetAnchor) {\n      if (node.nodeType === 1) node.setAttribute(\"data-v-owner\", ctx.uid);\n      node = node.nextSibling;\n    }\n    ctx.ut();\n  }\n}\nfunction prepareAnchor(target, vnode, createText, insert) {\n  const targetStart = vnode.targetStart = createText(\"\");\n  const targetAnchor = vnode.targetAnchor = createText(\"\");\n  targetStart[TeleportEndKey] = targetAnchor;\n  if (target) {\n    insert(targetStart, target);\n    insert(targetAnchor, target);\n  }\n  return targetAnchor;\n}\n\nlet hasLoggedMismatchError = false;\nconst logMismatchError = () => {\n  if (hasLoggedMismatchError) {\n    return;\n  }\n  console.error(\"Hydration completed but contains mismatches.\");\n  hasLoggedMismatchError = true;\n};\nconst isSVGContainer = (container) => container.namespaceURI.includes(\"svg\") && container.tagName !== \"foreignObject\";\nconst isMathMLContainer = (container) => container.namespaceURI.includes(\"MathML\");\nconst getContainerType = (container) => {\n  if (isSVGContainer(container)) return \"svg\";\n  if (isMathMLContainer(container)) return \"mathml\";\n  return void 0;\n};\nconst isComment = (node) => node.nodeType === 8 /* COMMENT */;\nfunction createHydrationFunctions(rendererInternals) {\n  const {\n    mt: mountComponent,\n    p: patch,\n    o: {\n      patchProp,\n      createText,\n      nextSibling,\n      parentNode,\n      remove,\n      insert,\n      createComment\n    }\n  } = rendererInternals;\n  const hydrate = (vnode, container) => {\n    if (!container.hasChildNodes()) {\n      (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n        `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`\n      );\n      patch(null, vnode, container);\n      flushPostFlushCbs();\n      container._vnode = vnode;\n      return;\n    }\n    hydrateNode(container.firstChild, vnode, null, null, null);\n    flushPostFlushCbs();\n    container._vnode = vnode;\n  };\n  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\n    optimized = optimized || !!vnode.dynamicChildren;\n    const isFragmentStart = isComment(node) && node.data === \"[\";\n    const onMismatch = () => handleMismatch(\n      node,\n      vnode,\n      parentComponent,\n      parentSuspense,\n      slotScopeIds,\n      isFragmentStart\n    );\n    const { type, ref, shapeFlag, patchFlag } = vnode;\n    let domType = node.nodeType;\n    vnode.el = node;\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      def(node, \"__vnode\", vnode, true);\n      def(node, \"__vueParentComponent\", parentComponent, true);\n    }\n    if (patchFlag === -2) {\n      optimized = false;\n      vnode.dynamicChildren = null;\n    }\n    let nextNode = null;\n    switch (type) {\n      case Text:\n        if (domType !== 3 /* TEXT */) {\n          if (vnode.children === \"\") {\n            insert(vnode.el = createText(\"\"), parentNode(node), node);\n            nextNode = node;\n          } else {\n            nextNode = onMismatch();\n          }\n        } else {\n          if (node.data !== vnode.children) {\n            (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n              `Hydration text mismatch in`,\n              node.parentNode,\n              `\n  - rendered on server: ${JSON.stringify(\n                node.data\n              )}\n  - expected on client: ${JSON.stringify(vnode.children)}`\n            );\n            logMismatchError();\n            node.data = vnode.children;\n          }\n          nextNode = nextSibling(node);\n        }\n        break;\n      case Comment:\n        if (isTemplateNode(node)) {\n          nextNode = nextSibling(node);\n          replaceNode(\n            vnode.el = node.content.firstChild,\n            node,\n            parentComponent\n          );\n        } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {\n          nextNode = onMismatch();\n        } else {\n          nextNode = nextSibling(node);\n        }\n        break;\n      case Static:\n        if (isFragmentStart) {\n          node = nextSibling(node);\n          domType = node.nodeType;\n        }\n        if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) {\n          nextNode = node;\n          const needToAdoptContent = !vnode.children.length;\n          for (let i = 0; i < vnode.staticCount; i++) {\n            if (needToAdoptContent)\n              vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data;\n            if (i === vnode.staticCount - 1) {\n              vnode.anchor = nextNode;\n            }\n            nextNode = nextSibling(nextNode);\n          }\n          return isFragmentStart ? nextSibling(nextNode) : nextNode;\n        } else {\n          onMismatch();\n        }\n        break;\n      case Fragment:\n        if (!isFragmentStart) {\n          nextNode = onMismatch();\n        } else {\n          nextNode = hydrateFragment(\n            node,\n            vnode,\n            parentComponent,\n            parentSuspense,\n            slotScopeIds,\n            optimized\n          );\n        }\n        break;\n      default:\n        if (shapeFlag & 1) {\n          if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {\n            nextNode = onMismatch();\n          } else {\n            nextNode = hydrateElement(\n              node,\n              vnode,\n              parentComponent,\n              parentSuspense,\n              slotScopeIds,\n              optimized\n            );\n          }\n        } else if (shapeFlag & 6) {\n          vnode.slotScopeIds = slotScopeIds;\n          const container = parentNode(node);\n          if (isFragmentStart) {\n            nextNode = locateClosingAnchor(node);\n          } else if (isComment(node) && node.data === \"teleport start\") {\n            nextNode = locateClosingAnchor(node, node.data, \"teleport end\");\n          } else {\n            nextNode = nextSibling(node);\n          }\n          mountComponent(\n            vnode,\n            container,\n            null,\n            parentComponent,\n            parentSuspense,\n            getContainerType(container),\n            optimized\n          );\n          if (isAsyncWrapper(vnode)) {\n            let subTree;\n            if (isFragmentStart) {\n              subTree = createVNode(Fragment);\n              subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;\n            } else {\n              subTree = node.nodeType === 3 ? createTextVNode(\"\") : createVNode(\"div\");\n            }\n            subTree.el = node;\n            vnode.component.subTree = subTree;\n          }\n        } else if (shapeFlag & 64) {\n          if (domType !== 8 /* COMMENT */) {\n            nextNode = onMismatch();\n          } else {\n            nextNode = vnode.type.hydrate(\n              node,\n              vnode,\n              parentComponent,\n              parentSuspense,\n              slotScopeIds,\n              optimized,\n              rendererInternals,\n              hydrateChildren\n            );\n          }\n        } else if (shapeFlag & 128) {\n          nextNode = vnode.type.hydrate(\n            node,\n            vnode,\n            parentComponent,\n            parentSuspense,\n            getContainerType(parentNode(node)),\n            slotScopeIds,\n            optimized,\n            rendererInternals,\n            hydrateNode\n          );\n        } else if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {\n          warn$1(\"Invalid HostVNode type:\", type, `(${typeof type})`);\n        }\n    }\n    if (ref != null) {\n      setRef(ref, null, parentSuspense, vnode);\n    }\n    return nextNode;\n  };\n  const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    optimized = optimized || !!vnode.dynamicChildren;\n    const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;\n    const forcePatch = type === \"input\" || type === \"option\";\n    if (!!(process.env.NODE_ENV !== \"production\") || forcePatch || patchFlag !== -1) {\n      if (dirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n      }\n      let needCallTransitionHooks = false;\n      if (isTemplateNode(el)) {\n        needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;\n        const content = el.content.firstChild;\n        if (needCallTransitionHooks) {\n          transition.beforeEnter(content);\n        }\n        replaceNode(content, el, parentComponent);\n        vnode.el = el = content;\n      }\n      if (shapeFlag & 16 && // skip if element has innerHTML / textContent\n      !(props && (props.innerHTML || props.textContent))) {\n        let next = hydrateChildren(\n          el.firstChild,\n          vnode,\n          el,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n        let hasWarned = false;\n        while (next) {\n          if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n            warn$1(\n              `Hydration children mismatch on`,\n              el,\n              `\nServer rendered element contains more child nodes than client vdom.`\n            );\n            hasWarned = true;\n          }\n          logMismatchError();\n          const cur = next;\n          next = next.nextSibling;\n          remove(cur);\n        }\n      } else if (shapeFlag & 8) {\n        if (el.textContent !== vnode.children) {\n          (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n            `Hydration text content mismatch on`,\n            el,\n            `\n  - rendered on server: ${el.textContent}\n  - expected on client: ${vnode.children}`\n          );\n          logMismatchError();\n          el.textContent = vnode.children;\n        }\n      }\n      if (props) {\n        if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {\n          const isCustomElement = el.tagName.includes(\"-\");\n          for (const key in props) {\n            if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks\n            // as it could have mutated the DOM in any possible way\n            !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {\n              logMismatchError();\n            }\n            if (forcePatch && (key.endsWith(\"value\") || key === \"indeterminate\") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers\n            key[0] === \".\" || isCustomElement) {\n              patchProp(el, key, null, props[key], void 0, parentComponent);\n            }\n          }\n        } else if (props.onClick) {\n          patchProp(\n            el,\n            \"onClick\",\n            null,\n            props.onClick,\n            void 0,\n            parentComponent\n          );\n        } else if (patchFlag & 4 && isReactive(props.style)) {\n          for (const key in props.style) props.style[key];\n        }\n      }\n      let vnodeHooks;\n      if (vnodeHooks = props && props.onVnodeBeforeMount) {\n        invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n      }\n      if (dirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n      }\n      if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {\n        queueEffectWithSuspense(() => {\n          vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n          needCallTransitionHooks && transition.enter(el);\n          dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n        }, parentSuspense);\n      }\n    }\n    return el.nextSibling;\n  };\n  const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    optimized = optimized || !!parentVNode.dynamicChildren;\n    const children = parentVNode.children;\n    const l = children.length;\n    let hasWarned = false;\n    for (let i = 0; i < l; i++) {\n      const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);\n      const isText = vnode.type === Text;\n      if (node) {\n        if (isText && !optimized) {\n          let next = children[i + 1];\n          if (next && (next = normalizeVNode(next)).type === Text) {\n            insert(\n              createText(\n                node.data.slice(vnode.children.length)\n              ),\n              container,\n              nextSibling(node)\n            );\n            node.data = vnode.children;\n          }\n        }\n        node = hydrateNode(\n          node,\n          vnode,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n      } else if (isText && !vnode.children) {\n        insert(vnode.el = createText(\"\"), container);\n      } else {\n        if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n          warn$1(\n            `Hydration children mismatch on`,\n            container,\n            `\nServer rendered element contains fewer child nodes than client vdom.`\n          );\n          hasWarned = true;\n        }\n        logMismatchError();\n        patch(\n          null,\n          vnode,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          getContainerType(container),\n          slotScopeIds\n        );\n      }\n    }\n    return node;\n  };\n  const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    const { slotScopeIds: fragmentSlotScopeIds } = vnode;\n    if (fragmentSlotScopeIds) {\n      slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n    }\n    const container = parentNode(node);\n    const next = hydrateChildren(\n      nextSibling(node),\n      vnode,\n      container,\n      parentComponent,\n      parentSuspense,\n      slotScopeIds,\n      optimized\n    );\n    if (next && isComment(next) && next.data === \"]\") {\n      return nextSibling(vnode.anchor = next);\n    } else {\n      logMismatchError();\n      insert(vnode.anchor = createComment(`]`), container, next);\n      return next;\n    }\n  };\n  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {\n    (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n      `Hydration node mismatch:\n- rendered on server:`,\n      node,\n      node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === \"[\" ? `(start of fragment)` : ``,\n      `\n- expected on client:`,\n      vnode.type\n    );\n    logMismatchError();\n    vnode.el = null;\n    if (isFragment) {\n      const end = locateClosingAnchor(node);\n      while (true) {\n        const next2 = nextSibling(node);\n        if (next2 && next2 !== end) {\n          remove(next2);\n        } else {\n          break;\n        }\n      }\n    }\n    const next = nextSibling(node);\n    const container = parentNode(node);\n    remove(node);\n    patch(\n      null,\n      vnode,\n      container,\n      next,\n      parentComponent,\n      parentSuspense,\n      getContainerType(container),\n      slotScopeIds\n    );\n    return next;\n  };\n  const locateClosingAnchor = (node, open = \"[\", close = \"]\") => {\n    let match = 0;\n    while (node) {\n      node = nextSibling(node);\n      if (node && isComment(node)) {\n        if (node.data === open) match++;\n        if (node.data === close) {\n          if (match === 0) {\n            return nextSibling(node);\n          } else {\n            match--;\n          }\n        }\n      }\n    }\n    return node;\n  };\n  const replaceNode = (newNode, oldNode, parentComponent) => {\n    const parentNode2 = oldNode.parentNode;\n    if (parentNode2) {\n      parentNode2.replaceChild(newNode, oldNode);\n    }\n    let parent = parentComponent;\n    while (parent) {\n      if (parent.vnode.el === oldNode) {\n        parent.vnode.el = parent.subTree.el = newNode;\n      }\n      parent = parent.parent;\n    }\n  };\n  const isTemplateNode = (node) => {\n    return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === \"template\";\n  };\n  return [hydrate, hydrateNode];\n}\nfunction propHasMismatch(el, key, clientValue, vnode, instance) {\n  let mismatchType;\n  let mismatchKey;\n  let actual;\n  let expected;\n  if (key === \"class\") {\n    actual = el.getAttribute(\"class\");\n    expected = normalizeClass(clientValue);\n    if (!isSetEqual(toClassSet(actual || \"\"), toClassSet(expected))) {\n      mismatchType = mismatchKey = `class`;\n    }\n  } else if (key === \"style\") {\n    actual = el.getAttribute(\"style\") || \"\";\n    expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));\n    const actualMap = toStyleMap(actual);\n    const expectedMap = toStyleMap(expected);\n    if (vnode.dirs) {\n      for (const { dir, value } of vnode.dirs) {\n        if (dir.name === \"show\" && !value) {\n          expectedMap.set(\"display\", \"none\");\n        }\n      }\n    }\n    if (instance) {\n      resolveCssVars(instance, vnode, expectedMap);\n    }\n    if (!isMapEqual(actualMap, expectedMap)) {\n      mismatchType = mismatchKey = \"style\";\n    }\n  } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {\n    if (isBooleanAttr(key)) {\n      actual = el.hasAttribute(key);\n      expected = includeBooleanAttr(clientValue);\n    } else if (clientValue == null) {\n      actual = el.hasAttribute(key);\n      expected = false;\n    } else {\n      if (el.hasAttribute(key)) {\n        actual = el.getAttribute(key);\n      } else if (key === \"value\" && el.tagName === \"TEXTAREA\") {\n        actual = el.value;\n      } else {\n        actual = false;\n      }\n      expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;\n    }\n    if (actual !== expected) {\n      mismatchType = `attribute`;\n      mismatchKey = key;\n    }\n  }\n  if (mismatchType) {\n    const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}=\"${v}\"`;\n    const preSegment = `Hydration ${mismatchType} mismatch on`;\n    const postSegment = `\n  - rendered on server: ${format(actual)}\n  - expected on client: ${format(expected)}\n  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n  You should fix the source of the mismatch.`;\n    {\n      warn$1(preSegment, el, postSegment);\n    }\n    return true;\n  }\n  return false;\n}\nfunction toClassSet(str) {\n  return new Set(str.trim().split(/\\s+/));\n}\nfunction isSetEqual(a, b) {\n  if (a.size !== b.size) {\n    return false;\n  }\n  for (const s of a) {\n    if (!b.has(s)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction toStyleMap(str) {\n  const styleMap = /* @__PURE__ */ new Map();\n  for (const item of str.split(\";\")) {\n    let [key, value] = item.split(\":\");\n    key = key.trim();\n    value = value && value.trim();\n    if (key && value) {\n      styleMap.set(key, value);\n    }\n  }\n  return styleMap;\n}\nfunction isMapEqual(a, b) {\n  if (a.size !== b.size) {\n    return false;\n  }\n  for (const [key, value] of a) {\n    if (value !== b.get(key)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction resolveCssVars(instance, vnode, expectedMap) {\n  const root = instance.subTree;\n  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {\n    const cssVars = instance.getCssVars();\n    for (const key in cssVars) {\n      expectedMap.set(`--${key}`, String(cssVars[key]));\n    }\n  }\n  if (vnode === root && instance.parent) {\n    resolveCssVars(instance.parent, instance.vnode, expectedMap);\n  }\n}\n\nlet supported;\nlet perf;\nfunction startMeasure(instance, type) {\n  if (instance.appContext.config.performance && isSupported()) {\n    perf.mark(`vue-${type}-${instance.uid}`);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());\n  }\n}\nfunction endMeasure(instance, type) {\n  if (instance.appContext.config.performance && isSupported()) {\n    const startTag = `vue-${type}-${instance.uid}`;\n    const endTag = startTag + `:end`;\n    perf.mark(endTag);\n    perf.measure(\n      `<${formatComponentName(instance, instance.type)}> ${type}`,\n      startTag,\n      endTag\n    );\n    perf.clearMarks(startTag);\n    perf.clearMarks(endTag);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());\n  }\n}\nfunction isSupported() {\n  if (supported !== void 0) {\n    return supported;\n  }\n  if (typeof window !== \"undefined\" && window.performance) {\n    supported = true;\n    perf = window.performance;\n  } else {\n    supported = false;\n  }\n  return supported;\n}\n\nfunction initFeatureFlags() {\n  const needWarn = [];\n  if (typeof __VUE_OPTIONS_API__ !== \"boolean\") {\n    !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_OPTIONS_API__`);\n    getGlobalThis().__VUE_OPTIONS_API__ = true;\n  }\n  if (typeof __VUE_PROD_DEVTOOLS__ !== \"boolean\") {\n    !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_PROD_DEVTOOLS__`);\n    getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;\n  }\n  if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== \"boolean\") {\n    !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);\n    getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && needWarn.length) {\n    const multi = needWarn.length > 1;\n    console.warn(\n      `Feature flag${multi ? `s` : ``} ${needWarn.join(\", \")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.\n\nFor more details, see https://link.vuejs.org/feature-flags.`\n    );\n  }\n}\n\nconst queuePostRenderEffect = queueEffectWithSuspense ;\nfunction createRenderer(options) {\n  return baseCreateRenderer(options);\n}\nfunction createHydrationRenderer(options) {\n  return baseCreateRenderer(options, createHydrationFunctions);\n}\nfunction baseCreateRenderer(options, createHydrationFns) {\n  {\n    initFeatureFlags();\n  }\n  const target = getGlobalThis();\n  target.__VUE__ = true;\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);\n  }\n  const {\n    insert: hostInsert,\n    remove: hostRemove,\n    patchProp: hostPatchProp,\n    createElement: hostCreateElement,\n    createText: hostCreateText,\n    createComment: hostCreateComment,\n    setText: hostSetText,\n    setElementText: hostSetElementText,\n    parentNode: hostParentNode,\n    nextSibling: hostNextSibling,\n    setScopeId: hostSetScopeId = NOOP,\n    insertStaticContent: hostInsertStaticContent\n  } = options;\n  const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!(process.env.NODE_ENV !== \"production\") && isHmrUpdating ? false : !!n2.dynamicChildren) => {\n    if (n1 === n2) {\n      return;\n    }\n    if (n1 && !isSameVNodeType(n1, n2)) {\n      anchor = getNextHostNode(n1);\n      unmount(n1, parentComponent, parentSuspense, true);\n      n1 = null;\n    }\n    if (n2.patchFlag === -2) {\n      optimized = false;\n      n2.dynamicChildren = null;\n    }\n    const { type, ref, shapeFlag } = n2;\n    switch (type) {\n      case Text:\n        processText(n1, n2, container, anchor);\n        break;\n      case Comment:\n        processCommentNode(n1, n2, container, anchor);\n        break;\n      case Static:\n        if (n1 == null) {\n          mountStaticNode(n2, container, anchor, namespace);\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          patchStaticNode(n1, n2, container, namespace);\n        }\n        break;\n      case Fragment:\n        processFragment(\n          n1,\n          n2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        break;\n      default:\n        if (shapeFlag & 1) {\n          processElement(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (shapeFlag & 6) {\n          processComponent(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (shapeFlag & 64) {\n          type.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        } else if (shapeFlag & 128) {\n          type.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn$1(\"Invalid VNode type:\", type, `(${typeof type})`);\n        }\n    }\n    if (ref != null && parentComponent) {\n      setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\n    }\n  };\n  const processText = (n1, n2, container, anchor) => {\n    if (n1 == null) {\n      hostInsert(\n        n2.el = hostCreateText(n2.children),\n        container,\n        anchor\n      );\n    } else {\n      const el = n2.el = n1.el;\n      if (n2.children !== n1.children) {\n        hostSetText(el, n2.children);\n      }\n    }\n  };\n  const processCommentNode = (n1, n2, container, anchor) => {\n    if (n1 == null) {\n      hostInsert(\n        n2.el = hostCreateComment(n2.children || \"\"),\n        container,\n        anchor\n      );\n    } else {\n      n2.el = n1.el;\n    }\n  };\n  const mountStaticNode = (n2, container, anchor, namespace) => {\n    [n2.el, n2.anchor] = hostInsertStaticContent(\n      n2.children,\n      container,\n      anchor,\n      namespace,\n      n2.el,\n      n2.anchor\n    );\n  };\n  const patchStaticNode = (n1, n2, container, namespace) => {\n    if (n2.children !== n1.children) {\n      const anchor = hostNextSibling(n1.anchor);\n      removeStaticNode(n1);\n      [n2.el, n2.anchor] = hostInsertStaticContent(\n        n2.children,\n        container,\n        anchor,\n        namespace\n      );\n    } else {\n      n2.el = n1.el;\n      n2.anchor = n1.anchor;\n    }\n  };\n  const moveStaticNode = ({ el, anchor }, container, nextSibling) => {\n    let next;\n    while (el && el !== anchor) {\n      next = hostNextSibling(el);\n      hostInsert(el, container, nextSibling);\n      el = next;\n    }\n    hostInsert(anchor, container, nextSibling);\n  };\n  const removeStaticNode = ({ el, anchor }) => {\n    let next;\n    while (el && el !== anchor) {\n      next = hostNextSibling(el);\n      hostRemove(el);\n      el = next;\n    }\n    hostRemove(anchor);\n  };\n  const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    if (n2.type === \"svg\") {\n      namespace = \"svg\";\n    } else if (n2.type === \"math\") {\n      namespace = \"mathml\";\n    }\n    if (n1 == null) {\n      mountElement(\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    } else {\n      patchElement(\n        n1,\n        n2,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n  };\n  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    let el;\n    let vnodeHook;\n    const { props, shapeFlag, transition, dirs } = vnode;\n    el = vnode.el = hostCreateElement(\n      vnode.type,\n      namespace,\n      props && props.is,\n      props\n    );\n    if (shapeFlag & 8) {\n      hostSetElementText(el, vnode.children);\n    } else if (shapeFlag & 16) {\n      mountChildren(\n        vnode.children,\n        el,\n        null,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(vnode, namespace),\n        slotScopeIds,\n        optimized\n      );\n    }\n    if (dirs) {\n      invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n    }\n    setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\n    if (props) {\n      for (const key in props) {\n        if (key !== \"value\" && !isReservedProp(key)) {\n          hostPatchProp(el, key, null, props[key], namespace, parentComponent);\n        }\n      }\n      if (\"value\" in props) {\n        hostPatchProp(el, \"value\", null, props.value, namespace);\n      }\n      if (vnodeHook = props.onVnodeBeforeMount) {\n        invokeVNodeHook(vnodeHook, parentComponent, vnode);\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      def(el, \"__vnode\", vnode, true);\n      def(el, \"__vueParentComponent\", parentComponent, true);\n    }\n    if (dirs) {\n      invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n    }\n    const needCallTransitionHooks = needTransition(parentSuspense, transition);\n    if (needCallTransitionHooks) {\n      transition.beforeEnter(el);\n    }\n    hostInsert(el, container, anchor);\n    if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n        needCallTransitionHooks && transition.enter(el);\n        dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n      }, parentSuspense);\n    }\n  };\n  const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\n    if (scopeId) {\n      hostSetScopeId(el, scopeId);\n    }\n    if (slotScopeIds) {\n      for (let i = 0; i < slotScopeIds.length; i++) {\n        hostSetScopeId(el, slotScopeIds[i]);\n      }\n    }\n    if (parentComponent) {\n      let subTree = parentComponent.subTree;\n      if (!!(process.env.NODE_ENV !== \"production\") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) {\n        subTree = filterSingleRoot(subTree.children) || subTree;\n      }\n      if (vnode === subTree) {\n        const parentVNode = parentComponent.vnode;\n        setScopeId(\n          el,\n          parentVNode,\n          parentVNode.scopeId,\n          parentVNode.slotScopeIds,\n          parentComponent.parent\n        );\n      }\n    }\n  };\n  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {\n    for (let i = start; i < children.length; i++) {\n      const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);\n      patch(\n        null,\n        child,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n  };\n  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    const el = n2.el = n1.el;\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      el.__vnode = n2;\n    }\n    let { patchFlag, dynamicChildren, dirs } = n2;\n    patchFlag |= n1.patchFlag & 16;\n    const oldProps = n1.props || EMPTY_OBJ;\n    const newProps = n2.props || EMPTY_OBJ;\n    let vnodeHook;\n    parentComponent && toggleRecurse(parentComponent, false);\n    if (vnodeHook = newProps.onVnodeBeforeUpdate) {\n      invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n    }\n    if (dirs) {\n      invokeDirectiveHook(n2, n1, parentComponent, \"beforeUpdate\");\n    }\n    parentComponent && toggleRecurse(parentComponent, true);\n    if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n      patchFlag = 0;\n      optimized = false;\n      dynamicChildren = null;\n    }\n    if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {\n      hostSetElementText(el, \"\");\n    }\n    if (dynamicChildren) {\n      patchBlockChildren(\n        n1.dynamicChildren,\n        dynamicChildren,\n        el,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(n2, namespace),\n        slotScopeIds\n      );\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        traverseStaticChildren(n1, n2);\n      }\n    } else if (!optimized) {\n      patchChildren(\n        n1,\n        n2,\n        el,\n        null,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(n2, namespace),\n        slotScopeIds,\n        false\n      );\n    }\n    if (patchFlag > 0) {\n      if (patchFlag & 16) {\n        patchProps(el, oldProps, newProps, parentComponent, namespace);\n      } else {\n        if (patchFlag & 2) {\n          if (oldProps.class !== newProps.class) {\n            hostPatchProp(el, \"class\", null, newProps.class, namespace);\n          }\n        }\n        if (patchFlag & 4) {\n          hostPatchProp(el, \"style\", oldProps.style, newProps.style, namespace);\n        }\n        if (patchFlag & 8) {\n          const propsToUpdate = n2.dynamicProps;\n          for (let i = 0; i < propsToUpdate.length; i++) {\n            const key = propsToUpdate[i];\n            const prev = oldProps[key];\n            const next = newProps[key];\n            if (next !== prev || key === \"value\") {\n              hostPatchProp(el, key, prev, next, namespace, parentComponent);\n            }\n          }\n        }\n      }\n      if (patchFlag & 1) {\n        if (n1.children !== n2.children) {\n          hostSetElementText(el, n2.children);\n        }\n      }\n    } else if (!optimized && dynamicChildren == null) {\n      patchProps(el, oldProps, newProps, parentComponent, namespace);\n    }\n    if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n        dirs && invokeDirectiveHook(n2, n1, parentComponent, \"updated\");\n      }, parentSuspense);\n    }\n  };\n  const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {\n    for (let i = 0; i < newChildren.length; i++) {\n      const oldVNode = oldChildren[i];\n      const newVNode = newChildren[i];\n      const container = (\n        // oldVNode may be an errored async setup() component inside Suspense\n        // which will not have a mounted element\n        oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent\n        // of the Fragment itself so it can move its children.\n        (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement\n        // which also requires the correct parent container\n        !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.\n        oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (\n          // In other cases, the parent container is not actually used so we\n          // just pass the block element here to avoid a DOM parentNode call.\n          fallbackContainer\n        )\n      );\n      patch(\n        oldVNode,\n        newVNode,\n        container,\n        null,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        true\n      );\n    }\n  };\n  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {\n    if (oldProps !== newProps) {\n      if (oldProps !== EMPTY_OBJ) {\n        for (const key in oldProps) {\n          if (!isReservedProp(key) && !(key in newProps)) {\n            hostPatchProp(\n              el,\n              key,\n              oldProps[key],\n              null,\n              namespace,\n              parentComponent\n            );\n          }\n        }\n      }\n      for (const key in newProps) {\n        if (isReservedProp(key)) continue;\n        const next = newProps[key];\n        const prev = oldProps[key];\n        if (next !== prev && key !== \"value\") {\n          hostPatchProp(el, key, prev, next, namespace, parentComponent);\n        }\n      }\n      if (\"value\" in newProps) {\n        hostPatchProp(el, \"value\", oldProps.value, newProps.value, namespace);\n      }\n    }\n  };\n  const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(\"\");\n    const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(\"\");\n    let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\n    if (!!(process.env.NODE_ENV !== \"production\") && // #5523 dev root fragment may inherit directives\n    (isHmrUpdating || patchFlag & 2048)) {\n      patchFlag = 0;\n      optimized = false;\n      dynamicChildren = null;\n    }\n    if (fragmentSlotScopeIds) {\n      slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n    }\n    if (n1 == null) {\n      hostInsert(fragmentStartAnchor, container, anchor);\n      hostInsert(fragmentEndAnchor, container, anchor);\n      mountChildren(\n        // #10007\n        // such fragment like `<></>` will be compiled into\n        // a fragment which doesn't have a children.\n        // In this case fallback to an empty array\n        n2.children || [],\n        container,\n        fragmentEndAnchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    } else {\n      if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result\n      // of renderSlot() with no valid children\n      n1.dynamicChildren) {\n        patchBlockChildren(\n          n1.dynamicChildren,\n          dynamicChildren,\n          container,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds\n        );\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          traverseStaticChildren(n1, n2);\n        } else if (\n          // #2080 if the stable fragment has a key, it's a <template v-for> that may\n          //  get moved around. Make sure all root level vnodes inherit el.\n          // #2134 or if it's a component root, it may also get moved around\n          // as the component is being moved.\n          n2.key != null || parentComponent && n2 === parentComponent.subTree\n        ) {\n          traverseStaticChildren(\n            n1,\n            n2,\n            true\n            /* shallow */\n          );\n        }\n      } else {\n        patchChildren(\n          n1,\n          n2,\n          container,\n          fragmentEndAnchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      }\n    }\n  };\n  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    n2.slotScopeIds = slotScopeIds;\n    if (n1 == null) {\n      if (n2.shapeFlag & 512) {\n        parentComponent.ctx.activate(\n          n2,\n          container,\n          anchor,\n          namespace,\n          optimized\n        );\n      } else {\n        mountComponent(\n          n2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          optimized\n        );\n      }\n    } else {\n      updateComponent(n1, n2, optimized);\n    }\n  };\n  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {\n    const instance = (initialVNode.component = createComponentInstance(\n      initialVNode,\n      parentComponent,\n      parentSuspense\n    ));\n    if (!!(process.env.NODE_ENV !== \"production\") && instance.type.__hmrId) {\n      registerHMR(instance);\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      pushWarningContext(initialVNode);\n      startMeasure(instance, `mount`);\n    }\n    if (isKeepAlive(initialVNode)) {\n      instance.ctx.renderer = internals;\n    }\n    {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        startMeasure(instance, `init`);\n      }\n      setupComponent(instance, false, optimized);\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        endMeasure(instance, `init`);\n      }\n    }\n    if (instance.asyncDep) {\n      parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);\n      if (!initialVNode.el) {\n        const placeholder = instance.subTree = createVNode(Comment);\n        processCommentNode(null, placeholder, container, anchor);\n      }\n    } else {\n      setupRenderEffect(\n        instance,\n        initialVNode,\n        container,\n        anchor,\n        parentSuspense,\n        namespace,\n        optimized\n      );\n    }\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      popWarningContext();\n      endMeasure(instance, `mount`);\n    }\n  };\n  const updateComponent = (n1, n2, optimized) => {\n    const instance = n2.component = n1.component;\n    if (shouldUpdateComponent(n1, n2, optimized)) {\n      if (instance.asyncDep && !instance.asyncResolved) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          pushWarningContext(n2);\n        }\n        updateComponentPreRender(instance, n2, optimized);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          popWarningContext();\n        }\n        return;\n      } else {\n        instance.next = n2;\n        invalidateJob(instance.update);\n        instance.effect.dirty = true;\n        instance.update();\n      }\n    } else {\n      n2.el = n1.el;\n      instance.vnode = n2;\n    }\n  };\n  const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {\n    const componentUpdateFn = () => {\n      if (!instance.isMounted) {\n        let vnodeHook;\n        const { el, props } = initialVNode;\n        const { bm, m, parent } = instance;\n        const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\n        toggleRecurse(instance, false);\n        if (bm) {\n          invokeArrayFns(bm);\n        }\n        if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {\n          invokeVNodeHook(vnodeHook, parent, initialVNode);\n        }\n        toggleRecurse(instance, true);\n        if (el && hydrateNode) {\n          const hydrateSubTree = () => {\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              startMeasure(instance, `render`);\n            }\n            instance.subTree = renderComponentRoot(instance);\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              endMeasure(instance, `render`);\n            }\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              startMeasure(instance, `hydrate`);\n            }\n            hydrateNode(\n              el,\n              instance.subTree,\n              instance,\n              parentSuspense,\n              null\n            );\n            if (!!(process.env.NODE_ENV !== \"production\")) {\n              endMeasure(instance, `hydrate`);\n            }\n          };\n          if (isAsyncWrapperVNode) {\n            initialVNode.type.__asyncLoader().then(\n              // note: we are moving the render call into an async callback,\n              // which means it won't track dependencies - but it's ok because\n              // a server-rendered async wrapper is already in resolved state\n              // and it will never need to change.\n              () => !instance.isUnmounted && hydrateSubTree()\n            );\n          } else {\n            hydrateSubTree();\n          }\n        } else {\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            startMeasure(instance, `render`);\n          }\n          const subTree = instance.subTree = renderComponentRoot(instance);\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            endMeasure(instance, `render`);\n          }\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            startMeasure(instance, `patch`);\n          }\n          patch(\n            null,\n            subTree,\n            container,\n            anchor,\n            instance,\n            parentSuspense,\n            namespace\n          );\n          if (!!(process.env.NODE_ENV !== \"production\")) {\n            endMeasure(instance, `patch`);\n          }\n          initialVNode.el = subTree.el;\n        }\n        if (m) {\n          queuePostRenderEffect(m, parentSuspense);\n        }\n        if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {\n          const scopedInitialVNode = initialVNode;\n          queuePostRenderEffect(\n            () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),\n            parentSuspense\n          );\n        }\n        if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {\n          instance.a && queuePostRenderEffect(instance.a, parentSuspense);\n        }\n        instance.isMounted = true;\n        if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n          devtoolsComponentAdded(instance);\n        }\n        initialVNode = container = anchor = null;\n      } else {\n        let { next, bu, u, parent, vnode } = instance;\n        {\n          const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);\n          if (nonHydratedAsyncRoot) {\n            if (next) {\n              next.el = vnode.el;\n              updateComponentPreRender(instance, next, optimized);\n            }\n            nonHydratedAsyncRoot.asyncDep.then(() => {\n              if (!instance.isUnmounted) {\n                componentUpdateFn();\n              }\n            });\n            return;\n          }\n        }\n        let originNext = next;\n        let vnodeHook;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          pushWarningContext(next || instance.vnode);\n        }\n        toggleRecurse(instance, false);\n        if (next) {\n          next.el = vnode.el;\n          updateComponentPreRender(instance, next, optimized);\n        } else {\n          next = vnode;\n        }\n        if (bu) {\n          invokeArrayFns(bu);\n        }\n        if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {\n          invokeVNodeHook(vnodeHook, parent, next, vnode);\n        }\n        toggleRecurse(instance, true);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          startMeasure(instance, `render`);\n        }\n        const nextTree = renderComponentRoot(instance);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          endMeasure(instance, `render`);\n        }\n        const prevTree = instance.subTree;\n        instance.subTree = nextTree;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          startMeasure(instance, `patch`);\n        }\n        patch(\n          prevTree,\n          nextTree,\n          // parent may have changed if it's in a teleport\n          hostParentNode(prevTree.el),\n          // anchor may have changed if it's in a fragment\n          getNextHostNode(prevTree),\n          instance,\n          parentSuspense,\n          namespace\n        );\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          endMeasure(instance, `patch`);\n        }\n        next.el = nextTree.el;\n        if (originNext === null) {\n          updateHOCHostEl(instance, nextTree.el);\n        }\n        if (u) {\n          queuePostRenderEffect(u, parentSuspense);\n        }\n        if (vnodeHook = next.props && next.props.onVnodeUpdated) {\n          queuePostRenderEffect(\n            () => invokeVNodeHook(vnodeHook, parent, next, vnode),\n            parentSuspense\n          );\n        }\n        if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n          devtoolsComponentUpdated(instance);\n        }\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          popWarningContext();\n        }\n      }\n    };\n    const effect = instance.effect = new ReactiveEffect(\n      componentUpdateFn,\n      NOOP,\n      () => queueJob(update),\n      instance.scope\n      // track it in component's effect scope\n    );\n    const update = instance.update = () => {\n      if (effect.dirty) {\n        effect.run();\n      }\n    };\n    update.i = instance;\n    update.id = instance.uid;\n    toggleRecurse(instance, true);\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;\n      effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;\n    }\n    update();\n  };\n  const updateComponentPreRender = (instance, nextVNode, optimized) => {\n    nextVNode.component = instance;\n    const prevProps = instance.vnode.props;\n    instance.vnode = nextVNode;\n    instance.next = null;\n    updateProps(instance, nextVNode.props, prevProps, optimized);\n    updateSlots(instance, nextVNode.children, optimized);\n    pauseTracking();\n    flushPreFlushCbs(instance);\n    resetTracking();\n  };\n  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {\n    const c1 = n1 && n1.children;\n    const prevShapeFlag = n1 ? n1.shapeFlag : 0;\n    const c2 = n2.children;\n    const { patchFlag, shapeFlag } = n2;\n    if (patchFlag > 0) {\n      if (patchFlag & 128) {\n        patchKeyedChildren(\n          c1,\n          c2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        return;\n      } else if (patchFlag & 256) {\n        patchUnkeyedChildren(\n          c1,\n          c2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        return;\n      }\n    }\n    if (shapeFlag & 8) {\n      if (prevShapeFlag & 16) {\n        unmountChildren(c1, parentComponent, parentSuspense);\n      }\n      if (c2 !== c1) {\n        hostSetElementText(container, c2);\n      }\n    } else {\n      if (prevShapeFlag & 16) {\n        if (shapeFlag & 16) {\n          patchKeyedChildren(\n            c1,\n            c2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else {\n          unmountChildren(c1, parentComponent, parentSuspense, true);\n        }\n      } else {\n        if (prevShapeFlag & 8) {\n          hostSetElementText(container, \"\");\n        }\n        if (shapeFlag & 16) {\n          mountChildren(\n            c2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        }\n      }\n    }\n  };\n  const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    c1 = c1 || EMPTY_ARR;\n    c2 = c2 || EMPTY_ARR;\n    const oldLength = c1.length;\n    const newLength = c2.length;\n    const commonLength = Math.min(oldLength, newLength);\n    let i;\n    for (i = 0; i < commonLength; i++) {\n      const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n      patch(\n        c1[i],\n        nextChild,\n        container,\n        null,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n    if (oldLength > newLength) {\n      unmountChildren(\n        c1,\n        parentComponent,\n        parentSuspense,\n        true,\n        false,\n        commonLength\n      );\n    } else {\n      mountChildren(\n        c2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized,\n        commonLength\n      );\n    }\n  };\n  const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    let i = 0;\n    const l2 = c2.length;\n    let e1 = c1.length - 1;\n    let e2 = l2 - 1;\n    while (i <= e1 && i <= e2) {\n      const n1 = c1[i];\n      const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n      if (isSameVNodeType(n1, n2)) {\n        patch(\n          n1,\n          n2,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      } else {\n        break;\n      }\n      i++;\n    }\n    while (i <= e1 && i <= e2) {\n      const n1 = c1[e1];\n      const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);\n      if (isSameVNodeType(n1, n2)) {\n        patch(\n          n1,\n          n2,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      } else {\n        break;\n      }\n      e1--;\n      e2--;\n    }\n    if (i > e1) {\n      if (i <= e2) {\n        const nextPos = e2 + 1;\n        const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\n        while (i <= e2) {\n          patch(\n            null,\n            c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          i++;\n        }\n      }\n    } else if (i > e2) {\n      while (i <= e1) {\n        unmount(c1[i], parentComponent, parentSuspense, true);\n        i++;\n      }\n    } else {\n      const s1 = i;\n      const s2 = i;\n      const keyToNewIndexMap = /* @__PURE__ */ new Map();\n      for (i = s2; i <= e2; i++) {\n        const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n        if (nextChild.key != null) {\n          if (!!(process.env.NODE_ENV !== \"production\") && keyToNewIndexMap.has(nextChild.key)) {\n            warn$1(\n              `Duplicate keys found during update:`,\n              JSON.stringify(nextChild.key),\n              `Make sure keys are unique.`\n            );\n          }\n          keyToNewIndexMap.set(nextChild.key, i);\n        }\n      }\n      let j;\n      let patched = 0;\n      const toBePatched = e2 - s2 + 1;\n      let moved = false;\n      let maxNewIndexSoFar = 0;\n      const newIndexToOldIndexMap = new Array(toBePatched);\n      for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;\n      for (i = s1; i <= e1; i++) {\n        const prevChild = c1[i];\n        if (patched >= toBePatched) {\n          unmount(prevChild, parentComponent, parentSuspense, true);\n          continue;\n        }\n        let newIndex;\n        if (prevChild.key != null) {\n          newIndex = keyToNewIndexMap.get(prevChild.key);\n        } else {\n          for (j = s2; j <= e2; j++) {\n            if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {\n              newIndex = j;\n              break;\n            }\n          }\n        }\n        if (newIndex === void 0) {\n          unmount(prevChild, parentComponent, parentSuspense, true);\n        } else {\n          newIndexToOldIndexMap[newIndex - s2] = i + 1;\n          if (newIndex >= maxNewIndexSoFar) {\n            maxNewIndexSoFar = newIndex;\n          } else {\n            moved = true;\n          }\n          patch(\n            prevChild,\n            c2[newIndex],\n            container,\n            null,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          patched++;\n        }\n      }\n      const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;\n      j = increasingNewIndexSequence.length - 1;\n      for (i = toBePatched - 1; i >= 0; i--) {\n        const nextIndex = s2 + i;\n        const nextChild = c2[nextIndex];\n        const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;\n        if (newIndexToOldIndexMap[i] === 0) {\n          patch(\n            null,\n            nextChild,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (moved) {\n          if (j < 0 || i !== increasingNewIndexSequence[j]) {\n            move(nextChild, container, anchor, 2);\n          } else {\n            j--;\n          }\n        }\n      }\n    }\n  };\n  const move = (vnode, container, anchor, moveType, parentSuspense = null) => {\n    const { el, type, transition, children, shapeFlag } = vnode;\n    if (shapeFlag & 6) {\n      move(vnode.component.subTree, container, anchor, moveType);\n      return;\n    }\n    if (shapeFlag & 128) {\n      vnode.suspense.move(container, anchor, moveType);\n      return;\n    }\n    if (shapeFlag & 64) {\n      type.move(vnode, container, anchor, internals);\n      return;\n    }\n    if (type === Fragment) {\n      hostInsert(el, container, anchor);\n      for (let i = 0; i < children.length; i++) {\n        move(children[i], container, anchor, moveType);\n      }\n      hostInsert(vnode.anchor, container, anchor);\n      return;\n    }\n    if (type === Static) {\n      moveStaticNode(vnode, container, anchor);\n      return;\n    }\n    const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;\n    if (needTransition2) {\n      if (moveType === 0) {\n        transition.beforeEnter(el);\n        hostInsert(el, container, anchor);\n        queuePostRenderEffect(() => transition.enter(el), parentSuspense);\n      } else {\n        const { leave, delayLeave, afterLeave } = transition;\n        const remove2 = () => hostInsert(el, container, anchor);\n        const performLeave = () => {\n          leave(el, () => {\n            remove2();\n            afterLeave && afterLeave();\n          });\n        };\n        if (delayLeave) {\n          delayLeave(el, remove2, performLeave);\n        } else {\n          performLeave();\n        }\n      }\n    } else {\n      hostInsert(el, container, anchor);\n    }\n  };\n  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\n    const {\n      type,\n      props,\n      ref,\n      children,\n      dynamicChildren,\n      shapeFlag,\n      patchFlag,\n      dirs,\n      cacheIndex\n    } = vnode;\n    if (patchFlag === -2) {\n      optimized = false;\n    }\n    if (ref != null) {\n      setRef(ref, null, parentSuspense, vnode, true);\n    }\n    if (cacheIndex != null) {\n      parentComponent.renderCache[cacheIndex] = void 0;\n    }\n    if (shapeFlag & 256) {\n      parentComponent.ctx.deactivate(vnode);\n      return;\n    }\n    const shouldInvokeDirs = shapeFlag & 1 && dirs;\n    const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\n    let vnodeHook;\n    if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {\n      invokeVNodeHook(vnodeHook, parentComponent, vnode);\n    }\n    if (shapeFlag & 6) {\n      unmountComponent(vnode.component, parentSuspense, doRemove);\n    } else {\n      if (shapeFlag & 128) {\n        vnode.suspense.unmount(parentSuspense, doRemove);\n        return;\n      }\n      if (shouldInvokeDirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"beforeUnmount\");\n      }\n      if (shapeFlag & 64) {\n        vnode.type.remove(\n          vnode,\n          parentComponent,\n          parentSuspense,\n          internals,\n          doRemove\n        );\n      } else if (dynamicChildren && // #5154\n      // when v-once is used inside a block, setBlockTracking(-1) marks the\n      // parent block with hasOnce: true\n      // so that it doesn't take the fast path during unmount - otherwise\n      // components nested in v-once are never unmounted.\n      !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments\n      (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {\n        unmountChildren(\n          dynamicChildren,\n          parentComponent,\n          parentSuspense,\n          false,\n          true\n        );\n      } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {\n        unmountChildren(children, parentComponent, parentSuspense);\n      }\n      if (doRemove) {\n        remove(vnode);\n      }\n    }\n    if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n        shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, \"unmounted\");\n      }, parentSuspense);\n    }\n  };\n  const remove = (vnode) => {\n    const { type, el, anchor, transition } = vnode;\n    if (type === Fragment) {\n      if (!!(process.env.NODE_ENV !== \"production\") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {\n        vnode.children.forEach((child) => {\n          if (child.type === Comment) {\n            hostRemove(child.el);\n          } else {\n            remove(child);\n          }\n        });\n      } else {\n        removeFragment(el, anchor);\n      }\n      return;\n    }\n    if (type === Static) {\n      removeStaticNode(vnode);\n      return;\n    }\n    const performRemove = () => {\n      hostRemove(el);\n      if (transition && !transition.persisted && transition.afterLeave) {\n        transition.afterLeave();\n      }\n    };\n    if (vnode.shapeFlag & 1 && transition && !transition.persisted) {\n      const { leave, delayLeave } = transition;\n      const performLeave = () => leave(el, performRemove);\n      if (delayLeave) {\n        delayLeave(vnode.el, performRemove, performLeave);\n      } else {\n        performLeave();\n      }\n    } else {\n      performRemove();\n    }\n  };\n  const removeFragment = (cur, end) => {\n    let next;\n    while (cur !== end) {\n      next = hostNextSibling(cur);\n      hostRemove(cur);\n      cur = next;\n    }\n    hostRemove(end);\n  };\n  const unmountComponent = (instance, parentSuspense, doRemove) => {\n    if (!!(process.env.NODE_ENV !== \"production\") && instance.type.__hmrId) {\n      unregisterHMR(instance);\n    }\n    const { bum, scope, update, subTree, um, m, a } = instance;\n    invalidateMount(m);\n    invalidateMount(a);\n    if (bum) {\n      invokeArrayFns(bum);\n    }\n    scope.stop();\n    if (update) {\n      update.active = false;\n      unmount(subTree, instance, parentSuspense, doRemove);\n    }\n    if (um) {\n      queuePostRenderEffect(um, parentSuspense);\n    }\n    queuePostRenderEffect(() => {\n      instance.isUnmounted = true;\n    }, parentSuspense);\n    if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {\n      parentSuspense.deps--;\n      if (parentSuspense.deps === 0) {\n        parentSuspense.resolve();\n      }\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      devtoolsComponentRemoved(instance);\n    }\n  };\n  const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\n    for (let i = start; i < children.length; i++) {\n      unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\n    }\n  };\n  const getNextHostNode = (vnode) => {\n    if (vnode.shapeFlag & 6) {\n      return getNextHostNode(vnode.component.subTree);\n    }\n    if (vnode.shapeFlag & 128) {\n      return vnode.suspense.next();\n    }\n    const el = hostNextSibling(vnode.anchor || vnode.el);\n    const teleportEnd = el && el[TeleportEndKey];\n    return teleportEnd ? hostNextSibling(teleportEnd) : el;\n  };\n  let isFlushing = false;\n  const render = (vnode, container, namespace) => {\n    if (vnode == null) {\n      if (container._vnode) {\n        unmount(container._vnode, null, null, true);\n      }\n    } else {\n      patch(\n        container._vnode || null,\n        vnode,\n        container,\n        null,\n        null,\n        null,\n        namespace\n      );\n    }\n    container._vnode = vnode;\n    if (!isFlushing) {\n      isFlushing = true;\n      flushPreFlushCbs();\n      flushPostFlushCbs();\n      isFlushing = false;\n    }\n  };\n  const internals = {\n    p: patch,\n    um: unmount,\n    m: move,\n    r: remove,\n    mt: mountComponent,\n    mc: mountChildren,\n    pc: patchChildren,\n    pbc: patchBlockChildren,\n    n: getNextHostNode,\n    o: options\n  };\n  let hydrate;\n  let hydrateNode;\n  if (createHydrationFns) {\n    [hydrate, hydrateNode] = createHydrationFns(\n      internals\n    );\n  }\n  return {\n    render,\n    hydrate,\n    createApp: createAppAPI(render, hydrate)\n  };\n}\nfunction resolveChildrenNamespace({ type, props }, currentNamespace) {\n  return currentNamespace === \"svg\" && type === \"foreignObject\" || currentNamespace === \"mathml\" && type === \"annotation-xml\" && props && props.encoding && props.encoding.includes(\"html\") ? void 0 : currentNamespace;\n}\nfunction toggleRecurse({ effect, update }, allowed) {\n  effect.allowRecurse = update.allowRecurse = allowed;\n}\nfunction needTransition(parentSuspense, transition) {\n  return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;\n}\nfunction traverseStaticChildren(n1, n2, shallow = false) {\n  const ch1 = n1.children;\n  const ch2 = n2.children;\n  if (isArray(ch1) && isArray(ch2)) {\n    for (let i = 0; i < ch1.length; i++) {\n      const c1 = ch1[i];\n      let c2 = ch2[i];\n      if (c2.shapeFlag & 1 && !c2.dynamicChildren) {\n        if (c2.patchFlag <= 0 || c2.patchFlag === 32) {\n          c2 = ch2[i] = cloneIfMounted(ch2[i]);\n          c2.el = c1.el;\n        }\n        if (!shallow && c2.patchFlag !== -2)\n          traverseStaticChildren(c1, c2);\n      }\n      if (c2.type === Text) {\n        c2.el = c1.el;\n      }\n      if (!!(process.env.NODE_ENV !== \"production\") && c2.type === Comment && !c2.el) {\n        c2.el = c1.el;\n      }\n    }\n  }\n}\nfunction getSequence(arr) {\n  const p = arr.slice();\n  const result = [0];\n  let i, j, u, v, c;\n  const len = arr.length;\n  for (i = 0; i < len; i++) {\n    const arrI = arr[i];\n    if (arrI !== 0) {\n      j = result[result.length - 1];\n      if (arr[j] < arrI) {\n        p[i] = j;\n        result.push(i);\n        continue;\n      }\n      u = 0;\n      v = result.length - 1;\n      while (u < v) {\n        c = u + v >> 1;\n        if (arr[result[c]] < arrI) {\n          u = c + 1;\n        } else {\n          v = c;\n        }\n      }\n      if (arrI < arr[result[u]]) {\n        if (u > 0) {\n          p[i] = result[u - 1];\n        }\n        result[u] = i;\n      }\n    }\n  }\n  u = result.length;\n  v = result[u - 1];\n  while (u-- > 0) {\n    result[u] = v;\n    v = p[v];\n  }\n  return result;\n}\nfunction locateNonHydratedAsyncRoot(instance) {\n  const subComponent = instance.subTree.component;\n  if (subComponent) {\n    if (subComponent.asyncDep && !subComponent.asyncResolved) {\n      return subComponent;\n    } else {\n      return locateNonHydratedAsyncRoot(subComponent);\n    }\n  }\n}\nfunction invalidateMount(hooks) {\n  if (hooks) {\n    for (let i = 0; i < hooks.length; i++) hooks[i].active = false;\n  }\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n  {\n    const ctx = inject(ssrContextKey);\n    if (!ctx) {\n      !!(process.env.NODE_ENV !== \"production\") && warn$1(\n        `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n      );\n    }\n    return ctx;\n  }\n};\n\nfunction watchEffect(effect, options) {\n  return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n  return doWatch(\n    effect,\n    null,\n    !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n  );\n}\nfunction watchSyncEffect(effect, options) {\n  return doWatch(\n    effect,\n    null,\n    !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n  );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n  if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n    warn$1(\n      `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n    );\n  }\n  return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, {\n  immediate,\n  deep,\n  flush,\n  once,\n  onTrack,\n  onTrigger\n} = EMPTY_OBJ) {\n  if (cb && once) {\n    const _cb = cb;\n    cb = (...args) => {\n      _cb(...args);\n      unwatch();\n    };\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && deep !== void 0 && typeof deep === \"number\") {\n    warn$1(\n      `watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`\n    );\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n    if (immediate !== void 0) {\n      warn$1(\n        `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n      );\n    }\n    if (deep !== void 0) {\n      warn$1(\n        `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n      );\n    }\n    if (once !== void 0) {\n      warn$1(\n        `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n      );\n    }\n  }\n  const warnInvalidSource = (s) => {\n    warn$1(\n      `Invalid watch source: `,\n      s,\n      `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n    );\n  };\n  const instance = currentInstance;\n  const reactiveGetter = (source2) => deep === true ? source2 : (\n    // for deep: false, only traverse root-level properties\n    traverse(source2, deep === false ? 1 : void 0)\n  );\n  let getter;\n  let forceTrigger = false;\n  let isMultiSource = false;\n  if (isRef(source)) {\n    getter = () => source.value;\n    forceTrigger = isShallow(source);\n  } else if (isReactive(source)) {\n    getter = () => reactiveGetter(source);\n    forceTrigger = true;\n  } else if (isArray(source)) {\n    isMultiSource = true;\n    forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n    getter = () => source.map((s) => {\n      if (isRef(s)) {\n        return s.value;\n      } else if (isReactive(s)) {\n        return reactiveGetter(s);\n      } else if (isFunction(s)) {\n        return callWithErrorHandling(s, instance, 2);\n      } else {\n        !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n      }\n    });\n  } else if (isFunction(source)) {\n    if (cb) {\n      getter = () => callWithErrorHandling(source, instance, 2);\n    } else {\n      getter = () => {\n        if (cleanup) {\n          cleanup();\n        }\n        return callWithAsyncErrorHandling(\n          source,\n          instance,\n          3,\n          [onCleanup]\n        );\n      };\n    }\n  } else {\n    getter = NOOP;\n    !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n  }\n  if (cb && deep) {\n    const baseGetter = getter;\n    getter = () => traverse(baseGetter());\n  }\n  let cleanup;\n  let onCleanup = (fn) => {\n    cleanup = effect.onStop = () => {\n      callWithErrorHandling(fn, instance, 4);\n      cleanup = effect.onStop = void 0;\n    };\n  };\n  let ssrCleanup;\n  if (isInSSRComponentSetup) {\n    onCleanup = NOOP;\n    if (!cb) {\n      getter();\n    } else if (immediate) {\n      callWithAsyncErrorHandling(cb, instance, 3, [\n        getter(),\n        isMultiSource ? [] : void 0,\n        onCleanup\n      ]);\n    }\n    if (flush === \"sync\") {\n      const ctx = useSSRContext();\n      ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n    } else {\n      return NOOP;\n    }\n  }\n  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n  const job = () => {\n    if (!effect.active || !effect.dirty) {\n      return;\n    }\n    if (cb) {\n      const newValue = effect.run();\n      if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n        if (cleanup) {\n          cleanup();\n        }\n        callWithAsyncErrorHandling(cb, instance, 3, [\n          newValue,\n          // pass undefined as the old value when it's changed for the first time\n          oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n          onCleanup\n        ]);\n        oldValue = newValue;\n      }\n    } else {\n      effect.run();\n    }\n  };\n  job.allowRecurse = !!cb;\n  let scheduler;\n  if (flush === \"sync\") {\n    scheduler = job;\n  } else if (flush === \"post\") {\n    scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n  } else {\n    job.pre = true;\n    if (instance) job.id = instance.uid;\n    scheduler = () => queueJob(job);\n  }\n  const effect = new ReactiveEffect(getter, NOOP, scheduler);\n  const scope = getCurrentScope();\n  const unwatch = () => {\n    effect.stop();\n    if (scope) {\n      remove(scope.effects, effect);\n    }\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    effect.onTrack = onTrack;\n    effect.onTrigger = onTrigger;\n  }\n  if (cb) {\n    if (immediate) {\n      job();\n    } else {\n      oldValue = effect.run();\n    }\n  } else if (flush === \"post\") {\n    queuePostRenderEffect(\n      effect.run.bind(effect),\n      instance && instance.suspense\n    );\n  } else {\n    effect.run();\n  }\n  if (ssrCleanup) ssrCleanup.push(unwatch);\n  return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n  const publicThis = this.proxy;\n  const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n  let cb;\n  if (isFunction(value)) {\n    cb = value;\n  } else {\n    cb = value.handler;\n    options = value;\n  }\n  const reset = setCurrentInstance(this);\n  const res = doWatch(getter, cb.bind(publicThis), options);\n  reset();\n  return res;\n}\nfunction createPathGetter(ctx, path) {\n  const segments = path.split(\".\");\n  return () => {\n    let cur = ctx;\n    for (let i = 0; i < segments.length && cur; i++) {\n      cur = cur[segments[i]];\n    }\n    return cur;\n  };\n}\nfunction traverse(value, depth = Infinity, seen) {\n  if (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) {\n    return value;\n  }\n  seen = seen || /* @__PURE__ */ new Set();\n  if (seen.has(value)) {\n    return value;\n  }\n  seen.add(value);\n  depth--;\n  if (isRef(value)) {\n    traverse(value.value, depth, seen);\n  } else if (isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      traverse(value[i], depth, seen);\n    }\n  } else if (isSet(value) || isMap(value)) {\n    value.forEach((v) => {\n      traverse(v, depth, seen);\n    });\n  } else if (isPlainObject(value)) {\n    for (const key in value) {\n      traverse(value[key], depth, seen);\n    }\n    for (const key of Object.getOwnPropertySymbols(value)) {\n      if (Object.prototype.propertyIsEnumerable.call(value, key)) {\n        traverse(value[key], depth, seen);\n      }\n    }\n  }\n  return value;\n}\n\nfunction useModel(props, name, options = EMPTY_OBJ) {\n  const i = getCurrentInstance();\n  if (!!(process.env.NODE_ENV !== \"production\") && !i) {\n    warn$1(`useModel() called without active instance.`);\n    return ref();\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && !i.propsOptions[0][name]) {\n    warn$1(`useModel() called with prop \"${name}\" which is not declared.`);\n    return ref();\n  }\n  const camelizedName = camelize(name);\n  const hyphenatedName = hyphenate(name);\n  const modifiers = getModelModifiers(props, name);\n  const res = customRef((track, trigger) => {\n    let localValue;\n    let prevSetValue = EMPTY_OBJ;\n    let prevEmittedValue;\n    watchSyncEffect(() => {\n      const propValue = props[name];\n      if (hasChanged(localValue, propValue)) {\n        localValue = propValue;\n        trigger();\n      }\n    });\n    return {\n      get() {\n        track();\n        return options.get ? options.get(localValue) : localValue;\n      },\n      set(value) {\n        const emittedValue = options.set ? options.set(value) : value;\n        if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {\n          return;\n        }\n        const rawProps = i.vnode.props;\n        if (!(rawProps && // check if parent has passed v-model\n        (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {\n          localValue = value;\n          trigger();\n        }\n        i.emit(`update:${name}`, emittedValue);\n        if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {\n          trigger();\n        }\n        prevSetValue = value;\n        prevEmittedValue = emittedValue;\n      }\n    };\n  });\n  res[Symbol.iterator] = () => {\n    let i2 = 0;\n    return {\n      next() {\n        if (i2 < 2) {\n          return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };\n        } else {\n          return { done: true };\n        }\n      }\n    };\n  };\n  return res;\n}\nconst getModelModifiers = (props, modelName) => {\n  return modelName === \"modelValue\" || modelName === \"model-value\" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];\n};\n\nfunction emit(instance, event, ...rawArgs) {\n  if (instance.isUnmounted) return;\n  const props = instance.vnode.props || EMPTY_OBJ;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const {\n      emitsOptions,\n      propsOptions: [propsOptions]\n    } = instance;\n    if (emitsOptions) {\n      if (!(event in emitsOptions) && true) {\n        if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {\n          warn$1(\n            `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(camelize(event))}\" prop.`\n          );\n        }\n      } else {\n        const validator = emitsOptions[event];\n        if (isFunction(validator)) {\n          const isValid = validator(...rawArgs);\n          if (!isValid) {\n            warn$1(\n              `Invalid event arguments: event validation failed for event \"${event}\".`\n            );\n          }\n        }\n      }\n    }\n  }\n  let args = rawArgs;\n  const isModelListener = event.startsWith(\"update:\");\n  const modifiers = isModelListener && getModelModifiers(props, event.slice(7));\n  if (modifiers) {\n    if (modifiers.trim) {\n      args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n    }\n    if (modifiers.number) {\n      args = rawArgs.map(looseToNumber);\n    }\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n    devtoolsComponentEmit(instance, event, args);\n  }\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const lowerCaseEvent = event.toLowerCase();\n    if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n      warn$1(\n        `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n          instance,\n          instance.type\n        )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n          event\n        )}\" instead of \"${event}\".`\n      );\n    }\n  }\n  let handlerName;\n  let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n  props[handlerName = toHandlerKey(camelize(event))];\n  if (!handler && isModelListener) {\n    handler = props[handlerName = toHandlerKey(hyphenate(event))];\n  }\n  if (handler) {\n    callWithAsyncErrorHandling(\n      handler,\n      instance,\n      6,\n      args\n    );\n  }\n  const onceHandler = props[handlerName + `Once`];\n  if (onceHandler) {\n    if (!instance.emitted) {\n      instance.emitted = {};\n    } else if (instance.emitted[handlerName]) {\n      return;\n    }\n    instance.emitted[handlerName] = true;\n    callWithAsyncErrorHandling(\n      onceHandler,\n      instance,\n      6,\n      args\n    );\n  }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n  const cache = appContext.emitsCache;\n  const cached = cache.get(comp);\n  if (cached !== void 0) {\n    return cached;\n  }\n  const raw = comp.emits;\n  let normalized = {};\n  let hasExtends = false;\n  if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n    const extendEmits = (raw2) => {\n      const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n      if (normalizedFromExtend) {\n        hasExtends = true;\n        extend(normalized, normalizedFromExtend);\n      }\n    };\n    if (!asMixin && appContext.mixins.length) {\n      appContext.mixins.forEach(extendEmits);\n    }\n    if (comp.extends) {\n      extendEmits(comp.extends);\n    }\n    if (comp.mixins) {\n      comp.mixins.forEach(extendEmits);\n    }\n  }\n  if (!raw && !hasExtends) {\n    if (isObject(comp)) {\n      cache.set(comp, null);\n    }\n    return null;\n  }\n  if (isArray(raw)) {\n    raw.forEach((key) => normalized[key] = null);\n  } else {\n    extend(normalized, raw);\n  }\n  if (isObject(comp)) {\n    cache.set(comp, normalized);\n  }\n  return normalized;\n}\nfunction isEmitListener(options, key) {\n  if (!options || !isOn(key)) {\n    return false;\n  }\n  key = key.slice(2).replace(/Once$/, \"\");\n  return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n  accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n  const {\n    type: Component,\n    vnode,\n    proxy,\n    withProxy,\n    propsOptions: [propsOptions],\n    slots,\n    attrs,\n    emit,\n    render,\n    renderCache,\n    props,\n    data,\n    setupState,\n    ctx,\n    inheritAttrs\n  } = instance;\n  const prev = setCurrentRenderingInstance(instance);\n  let result;\n  let fallthroughAttrs;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    accessedAttrs = false;\n  }\n  try {\n    if (vnode.shapeFlag & 4) {\n      const proxyToUse = withProxy || proxy;\n      const thisProxy = !!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {\n        get(target, key, receiver) {\n          warn$1(\n            `Property '${String(\n              key\n            )}' was accessed via 'this'. Avoid using 'this' in templates.`\n          );\n          return Reflect.get(target, key, receiver);\n        }\n      }) : proxyToUse;\n      result = normalizeVNode(\n        render.call(\n          thisProxy,\n          proxyToUse,\n          renderCache,\n          !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n          setupState,\n          data,\n          ctx\n        )\n      );\n      fallthroughAttrs = attrs;\n    } else {\n      const render2 = Component;\n      if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n        markAttrsAccessed();\n      }\n      result = normalizeVNode(\n        render2.length > 1 ? render2(\n          !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n          !!(process.env.NODE_ENV !== \"production\") ? {\n            get attrs() {\n              markAttrsAccessed();\n              return shallowReadonly(attrs);\n            },\n            slots,\n            emit\n          } : { attrs, slots, emit }\n        ) : render2(\n          !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n          null\n        )\n      );\n      fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n    }\n  } catch (err) {\n    blockStack.length = 0;\n    handleError(err, instance, 1);\n    result = createVNode(Comment);\n  }\n  let root = result;\n  let setRoot = void 0;\n  if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n    [root, setRoot] = getChildRoot(result);\n  }\n  if (fallthroughAttrs && inheritAttrs !== false) {\n    const keys = Object.keys(fallthroughAttrs);\n    const { shapeFlag } = root;\n    if (keys.length) {\n      if (shapeFlag & (1 | 6)) {\n        if (propsOptions && keys.some(isModelListener)) {\n          fallthroughAttrs = filterModelListeners(\n            fallthroughAttrs,\n            propsOptions\n          );\n        }\n        root = cloneVNode(root, fallthroughAttrs, false, true);\n      } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n        const allAttrs = Object.keys(attrs);\n        const eventAttrs = [];\n        const extraAttrs = [];\n        for (let i = 0, l = allAttrs.length; i < l; i++) {\n          const key = allAttrs[i];\n          if (isOn(key)) {\n            if (!isModelListener(key)) {\n              eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n            }\n          } else {\n            extraAttrs.push(key);\n          }\n        }\n        if (extraAttrs.length) {\n          warn$1(\n            `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n          );\n        }\n        if (eventAttrs.length) {\n          warn$1(\n            `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n          );\n        }\n      }\n    }\n  }\n  if (vnode.dirs) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n      warn$1(\n        `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n      );\n    }\n    root = cloneVNode(root, null, false, true);\n    root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n  }\n  if (vnode.transition) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n      warn$1(\n        `Component inside <Transition> renders non-element root node that cannot be animated.`\n      );\n    }\n    root.transition = vnode.transition;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n    setRoot(root);\n  } else {\n    result = root;\n  }\n  setCurrentRenderingInstance(prev);\n  return result;\n}\nconst getChildRoot = (vnode) => {\n  const rawChildren = vnode.children;\n  const dynamicChildren = vnode.dynamicChildren;\n  const childRoot = filterSingleRoot(rawChildren, false);\n  if (!childRoot) {\n    return [vnode, void 0];\n  } else if (!!(process.env.NODE_ENV !== \"production\") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {\n    return getChildRoot(childRoot);\n  }\n  const index = rawChildren.indexOf(childRoot);\n  const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n  const setRoot = (updatedRoot) => {\n    rawChildren[index] = updatedRoot;\n    if (dynamicChildren) {\n      if (dynamicIndex > -1) {\n        dynamicChildren[dynamicIndex] = updatedRoot;\n      } else if (updatedRoot.patchFlag > 0) {\n        vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n      }\n    }\n  };\n  return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children, recurse = true) {\n  let singleRoot;\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    if (isVNode(child)) {\n      if (child.type !== Comment || child.children === \"v-if\") {\n        if (singleRoot) {\n          return;\n        } else {\n          singleRoot = child;\n          if (!!(process.env.NODE_ENV !== \"production\") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {\n            return filterSingleRoot(singleRoot.children);\n          }\n        }\n      }\n    } else {\n      return;\n    }\n  }\n  return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n  let res;\n  for (const key in attrs) {\n    if (key === \"class\" || key === \"style\" || isOn(key)) {\n      (res || (res = {}))[key] = attrs[key];\n    }\n  }\n  return res;\n};\nconst filterModelListeners = (attrs, props) => {\n  const res = {};\n  for (const key in attrs) {\n    if (!isModelListener(key) || !(key.slice(9) in props)) {\n      res[key] = attrs[key];\n    }\n  }\n  return res;\n};\nconst isElementRoot = (vnode) => {\n  return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n  const { props: prevProps, children: prevChildren, component } = prevVNode;\n  const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n  const emits = component.emitsOptions;\n  if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n    return true;\n  }\n  if (nextVNode.dirs || nextVNode.transition) {\n    return true;\n  }\n  if (optimized && patchFlag >= 0) {\n    if (patchFlag & 1024) {\n      return true;\n    }\n    if (patchFlag & 16) {\n      if (!prevProps) {\n        return !!nextProps;\n      }\n      return hasPropsChanged(prevProps, nextProps, emits);\n    } else if (patchFlag & 8) {\n      const dynamicProps = nextVNode.dynamicProps;\n      for (let i = 0; i < dynamicProps.length; i++) {\n        const key = dynamicProps[i];\n        if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n          return true;\n        }\n      }\n    }\n  } else {\n    if (prevChildren || nextChildren) {\n      if (!nextChildren || !nextChildren.$stable) {\n        return true;\n      }\n    }\n    if (prevProps === nextProps) {\n      return false;\n    }\n    if (!prevProps) {\n      return !!nextProps;\n    }\n    if (!nextProps) {\n      return true;\n    }\n    return hasPropsChanged(prevProps, nextProps, emits);\n  }\n  return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n  const nextKeys = Object.keys(nextProps);\n  if (nextKeys.length !== Object.keys(prevProps).length) {\n    return true;\n  }\n  for (let i = 0; i < nextKeys.length; i++) {\n    const key = nextKeys[i];\n    if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n  while (parent) {\n    const root = parent.subTree;\n    if (root.suspense && root.suspense.activeBranch === vnode) {\n      root.el = vnode.el;\n    }\n    if (root === vnode) {\n      (vnode = parent.vnode).el = el;\n      parent = parent.parent;\n    } else {\n      break;\n    }\n  }\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nlet suspenseId = 0;\nconst SuspenseImpl = {\n  name: \"Suspense\",\n  // In order to make Suspense tree-shakable, we need to avoid importing it\n  // directly in the renderer. The renderer checks for the __isSuspense flag\n  // on a vnode's type and calls the `process` method, passing in renderer\n  // internals.\n  __isSuspense: true,\n  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n    if (n1 == null) {\n      mountSuspense(\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized,\n        rendererInternals\n      );\n    } else {\n      if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {\n        n2.suspense = n1.suspense;\n        n2.suspense.vnode = n2;\n        n2.el = n1.el;\n        return;\n      }\n      patchSuspense(\n        n1,\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        namespace,\n        slotScopeIds,\n        optimized,\n        rendererInternals\n      );\n    }\n  },\n  hydrate: hydrateSuspense,\n  normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n  const eventListener = vnode.props && vnode.props[name];\n  if (isFunction(eventListener)) {\n    eventListener();\n  }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n  const {\n    p: patch,\n    o: { createElement }\n  } = rendererInternals;\n  const hiddenContainer = createElement(\"div\");\n  const suspense = vnode.suspense = createSuspenseBoundary(\n    vnode,\n    parentSuspense,\n    parentComponent,\n    container,\n    hiddenContainer,\n    anchor,\n    namespace,\n    slotScopeIds,\n    optimized,\n    rendererInternals\n  );\n  patch(\n    null,\n    suspense.pendingBranch = vnode.ssContent,\n    hiddenContainer,\n    null,\n    parentComponent,\n    suspense,\n    namespace,\n    slotScopeIds\n  );\n  if (suspense.deps > 0) {\n    triggerEvent(vnode, \"onPending\");\n    triggerEvent(vnode, \"onFallback\");\n    patch(\n      null,\n      vnode.ssFallback,\n      container,\n      anchor,\n      parentComponent,\n      null,\n      // fallback tree will not have suspense context\n      namespace,\n      slotScopeIds\n    );\n    setActiveBranch(suspense, vnode.ssFallback);\n  } else {\n    suspense.resolve(false, true);\n  }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n  const suspense = n2.suspense = n1.suspense;\n  suspense.vnode = n2;\n  n2.el = n1.el;\n  const newBranch = n2.ssContent;\n  const newFallback = n2.ssFallback;\n  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n  if (pendingBranch) {\n    suspense.pendingBranch = newBranch;\n    if (isSameVNodeType(newBranch, pendingBranch)) {\n      patch(\n        pendingBranch,\n        newBranch,\n        suspense.hiddenContainer,\n        null,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      if (suspense.deps <= 0) {\n        suspense.resolve();\n      } else if (isInFallback) {\n        if (!isHydrating) {\n          patch(\n            activeBranch,\n            newFallback,\n            container,\n            anchor,\n            parentComponent,\n            null,\n            // fallback tree will not have suspense context\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          setActiveBranch(suspense, newFallback);\n        }\n      }\n    } else {\n      suspense.pendingId = suspenseId++;\n      if (isHydrating) {\n        suspense.isHydrating = false;\n        suspense.activeBranch = pendingBranch;\n      } else {\n        unmount(pendingBranch, parentComponent, suspense);\n      }\n      suspense.deps = 0;\n      suspense.effects.length = 0;\n      suspense.hiddenContainer = createElement(\"div\");\n      if (isInFallback) {\n        patch(\n          null,\n          newBranch,\n          suspense.hiddenContainer,\n          null,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        if (suspense.deps <= 0) {\n          suspense.resolve();\n        } else {\n          patch(\n            activeBranch,\n            newFallback,\n            container,\n            anchor,\n            parentComponent,\n            null,\n            // fallback tree will not have suspense context\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          setActiveBranch(suspense, newFallback);\n        }\n      } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n        patch(\n          activeBranch,\n          newBranch,\n          container,\n          anchor,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        suspense.resolve(true);\n      } else {\n        patch(\n          null,\n          newBranch,\n          suspense.hiddenContainer,\n          null,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        if (suspense.deps <= 0) {\n          suspense.resolve();\n        }\n      }\n    }\n  } else {\n    if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n      patch(\n        activeBranch,\n        newBranch,\n        container,\n        anchor,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      setActiveBranch(suspense, newBranch);\n    } else {\n      triggerEvent(n2, \"onPending\");\n      suspense.pendingBranch = newBranch;\n      if (newBranch.shapeFlag & 512) {\n        suspense.pendingId = newBranch.component.suspenseId;\n      } else {\n        suspense.pendingId = suspenseId++;\n      }\n      patch(\n        null,\n        newBranch,\n        suspense.hiddenContainer,\n        null,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      if (suspense.deps <= 0) {\n        suspense.resolve();\n      } else {\n        const { timeout, pendingId } = suspense;\n        if (timeout > 0) {\n          setTimeout(() => {\n            if (suspense.pendingId === pendingId) {\n              suspense.fallback(newFallback);\n            }\n          }, timeout);\n        } else if (timeout === 0) {\n          suspense.fallback(newFallback);\n        }\n      }\n    }\n  }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n  if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n    hasWarned = true;\n    console[console.info ? \"info\" : \"log\"](\n      `<Suspense> is an experimental feature and its API will likely change.`\n    );\n  }\n  const {\n    p: patch,\n    m: move,\n    um: unmount,\n    n: next,\n    o: { parentNode, remove }\n  } = rendererInternals;\n  let parentSuspenseId;\n  const isSuspensible = isVNodeSuspensible(vnode);\n  if (isSuspensible) {\n    if (parentSuspense && parentSuspense.pendingBranch) {\n      parentSuspenseId = parentSuspense.pendingId;\n      parentSuspense.deps++;\n    }\n  }\n  const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    assertNumber(timeout, `Suspense timeout`);\n  }\n  const initialAnchor = anchor;\n  const suspense = {\n    vnode,\n    parent: parentSuspense,\n    parentComponent,\n    namespace,\n    container,\n    hiddenContainer,\n    deps: 0,\n    pendingId: suspenseId++,\n    timeout: typeof timeout === \"number\" ? timeout : -1,\n    activeBranch: null,\n    pendingBranch: null,\n    isInFallback: !isHydrating,\n    isHydrating,\n    isUnmounted: false,\n    effects: [],\n    resolve(resume = false, sync = false) {\n      if (!!(process.env.NODE_ENV !== \"production\")) {\n        if (!resume && !suspense.pendingBranch) {\n          throw new Error(\n            `suspense.resolve() is called without a pending branch.`\n          );\n        }\n        if (suspense.isUnmounted) {\n          throw new Error(\n            `suspense.resolve() is called on an already unmounted suspense boundary.`\n          );\n        }\n      }\n      const {\n        vnode: vnode2,\n        activeBranch,\n        pendingBranch,\n        pendingId,\n        effects,\n        parentComponent: parentComponent2,\n        container: container2\n      } = suspense;\n      let delayEnter = false;\n      if (suspense.isHydrating) {\n        suspense.isHydrating = false;\n      } else if (!resume) {\n        delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n        if (delayEnter) {\n          activeBranch.transition.afterLeave = () => {\n            if (pendingId === suspense.pendingId) {\n              move(\n                pendingBranch,\n                container2,\n                anchor === initialAnchor ? next(activeBranch) : anchor,\n                0\n              );\n              queuePostFlushCb(effects);\n            }\n          };\n        }\n        if (activeBranch) {\n          if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {\n            anchor = next(activeBranch);\n          }\n          unmount(activeBranch, parentComponent2, suspense, true);\n        }\n        if (!delayEnter) {\n          move(pendingBranch, container2, anchor, 0);\n        }\n      }\n      setActiveBranch(suspense, pendingBranch);\n      suspense.pendingBranch = null;\n      suspense.isInFallback = false;\n      let parent = suspense.parent;\n      let hasUnresolvedAncestor = false;\n      while (parent) {\n        if (parent.pendingBranch) {\n          parent.effects.push(...effects);\n          hasUnresolvedAncestor = true;\n          break;\n        }\n        parent = parent.parent;\n      }\n      if (!hasUnresolvedAncestor && !delayEnter) {\n        queuePostFlushCb(effects);\n      }\n      suspense.effects = [];\n      if (isSuspensible) {\n        if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n          parentSuspense.deps--;\n          if (parentSuspense.deps === 0 && !sync) {\n            parentSuspense.resolve();\n          }\n        }\n      }\n      triggerEvent(vnode2, \"onResolve\");\n    },\n    fallback(fallbackVNode) {\n      if (!suspense.pendingBranch) {\n        return;\n      }\n      const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;\n      triggerEvent(vnode2, \"onFallback\");\n      const anchor2 = next(activeBranch);\n      const mountFallback = () => {\n        if (!suspense.isInFallback) {\n          return;\n        }\n        patch(\n          null,\n          fallbackVNode,\n          container2,\n          anchor2,\n          parentComponent2,\n          null,\n          // fallback tree will not have suspense context\n          namespace2,\n          slotScopeIds,\n          optimized\n        );\n        setActiveBranch(suspense, fallbackVNode);\n      };\n      const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n      if (delayEnter) {\n        activeBranch.transition.afterLeave = mountFallback;\n      }\n      suspense.isInFallback = true;\n      unmount(\n        activeBranch,\n        parentComponent2,\n        null,\n        // no suspense so unmount hooks fire now\n        true\n        // shouldRemove\n      );\n      if (!delayEnter) {\n        mountFallback();\n      }\n    },\n    move(container2, anchor2, type) {\n      suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n      suspense.container = container2;\n    },\n    next() {\n      return suspense.activeBranch && next(suspense.activeBranch);\n    },\n    registerDep(instance, setupRenderEffect, optimized2) {\n      const isInPendingSuspense = !!suspense.pendingBranch;\n      if (isInPendingSuspense) {\n        suspense.deps++;\n      }\n      const hydratedEl = instance.vnode.el;\n      instance.asyncDep.catch((err) => {\n        handleError(err, instance, 0);\n      }).then((asyncSetupResult) => {\n        if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n          return;\n        }\n        instance.asyncResolved = true;\n        const { vnode: vnode2 } = instance;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          pushWarningContext(vnode2);\n        }\n        handleSetupResult(instance, asyncSetupResult, false);\n        if (hydratedEl) {\n          vnode2.el = hydratedEl;\n        }\n        const placeholder = !hydratedEl && instance.subTree.el;\n        setupRenderEffect(\n          instance,\n          vnode2,\n          // component may have been moved before resolve.\n          // if this is not a hydration, instance.subTree will be the comment\n          // placeholder.\n          parentNode(hydratedEl || instance.subTree.el),\n          // anchor will not be used if this is hydration, so only need to\n          // consider the comment placeholder case.\n          hydratedEl ? null : next(instance.subTree),\n          suspense,\n          namespace,\n          optimized2\n        );\n        if (placeholder) {\n          remove(placeholder);\n        }\n        updateHOCHostEl(instance, vnode2.el);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          popWarningContext();\n        }\n        if (isInPendingSuspense && --suspense.deps === 0) {\n          suspense.resolve();\n        }\n      });\n    },\n    unmount(parentSuspense2, doRemove) {\n      suspense.isUnmounted = true;\n      if (suspense.activeBranch) {\n        unmount(\n          suspense.activeBranch,\n          parentComponent,\n          parentSuspense2,\n          doRemove\n        );\n      }\n      if (suspense.pendingBranch) {\n        unmount(\n          suspense.pendingBranch,\n          parentComponent,\n          parentSuspense2,\n          doRemove\n        );\n      }\n    }\n  };\n  return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n  const suspense = vnode.suspense = createSuspenseBoundary(\n    vnode,\n    parentSuspense,\n    parentComponent,\n    node.parentNode,\n    // eslint-disable-next-line no-restricted-globals\n    document.createElement(\"div\"),\n    null,\n    namespace,\n    slotScopeIds,\n    optimized,\n    rendererInternals,\n    true\n  );\n  const result = hydrateNode(\n    node,\n    suspense.pendingBranch = vnode.ssContent,\n    parentComponent,\n    suspense,\n    slotScopeIds,\n    optimized\n  );\n  if (suspense.deps === 0) {\n    suspense.resolve(false, true);\n  }\n  return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n  const { shapeFlag, children } = vnode;\n  const isSlotChildren = shapeFlag & 32;\n  vnode.ssContent = normalizeSuspenseSlot(\n    isSlotChildren ? children.default : children\n  );\n  vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n  let block;\n  if (isFunction(s)) {\n    const trackBlock = isBlockTreeEnabled && s._c;\n    if (trackBlock) {\n      s._d = false;\n      openBlock();\n    }\n    s = s();\n    if (trackBlock) {\n      s._d = true;\n      block = currentBlock;\n      closeBlock();\n    }\n  }\n  if (isArray(s)) {\n    const singleChild = filterSingleRoot(s);\n    if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n      warn$1(`<Suspense> slots expect a single root node.`);\n    }\n    s = singleChild;\n  }\n  s = normalizeVNode(s);\n  if (block && !s.dynamicChildren) {\n    s.dynamicChildren = block.filter((c) => c !== s);\n  }\n  return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n  if (suspense && suspense.pendingBranch) {\n    if (isArray(fn)) {\n      suspense.effects.push(...fn);\n    } else {\n      suspense.effects.push(fn);\n    }\n  } else {\n    queuePostFlushCb(fn);\n  }\n}\nfunction setActiveBranch(suspense, branch) {\n  suspense.activeBranch = branch;\n  const { vnode, parentComponent } = suspense;\n  let el = branch.el;\n  while (!el && branch.component) {\n    branch = branch.component.subTree;\n    el = branch.el;\n  }\n  vnode.el = el;\n  if (parentComponent && parentComponent.subTree === vnode) {\n    parentComponent.vnode.el = el;\n    updateHOCHostEl(parentComponent, el);\n  }\n}\nfunction isVNodeSuspensible(vnode) {\n  const suspensible = vnode.props && vnode.props.suspensible;\n  return suspensible != null && suspensible !== false;\n}\n\nconst Fragment = Symbol.for(\"v-fgt\");\nconst Text = Symbol.for(\"v-txt\");\nconst Comment = Symbol.for(\"v-cmt\");\nconst Static = Symbol.for(\"v-stc\");\nconst blockStack = [];\nlet currentBlock = null;\nfunction openBlock(disableTracking = false) {\n  blockStack.push(currentBlock = disableTracking ? null : []);\n}\nfunction closeBlock() {\n  blockStack.pop();\n  currentBlock = blockStack[blockStack.length - 1] || null;\n}\nlet isBlockTreeEnabled = 1;\nfunction setBlockTracking(value) {\n  isBlockTreeEnabled += value;\n  if (value < 0 && currentBlock) {\n    currentBlock.hasOnce = true;\n  }\n}\nfunction setupBlock(vnode) {\n  vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;\n  closeBlock();\n  if (isBlockTreeEnabled > 0 && currentBlock) {\n    currentBlock.push(vnode);\n  }\n  return vnode;\n}\nfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\n  return setupBlock(\n    createBaseVNode(\n      type,\n      props,\n      children,\n      patchFlag,\n      dynamicProps,\n      shapeFlag,\n      true\n    )\n  );\n}\nfunction createBlock(type, props, children, patchFlag, dynamicProps) {\n  return setupBlock(\n    createVNode(\n      type,\n      props,\n      children,\n      patchFlag,\n      dynamicProps,\n      true\n    )\n  );\n}\nfunction isVNode(value) {\n  return value ? value.__v_isVNode === true : false;\n}\nfunction isSameVNodeType(n1, n2) {\n  if (!!(process.env.NODE_ENV !== \"production\") && n2.shapeFlag & 6 && n1.component) {\n    const dirtyInstances = hmrDirtyComponents.get(n2.type);\n    if (dirtyInstances && dirtyInstances.has(n1.component)) {\n      n1.shapeFlag &= ~256;\n      n2.shapeFlag &= ~512;\n      return false;\n    }\n  }\n  return n1.type === n2.type && n1.key === n2.key;\n}\nlet vnodeArgsTransformer;\nfunction transformVNodeArgs(transformer) {\n  vnodeArgsTransformer = transformer;\n}\nconst createVNodeWithArgsTransform = (...args) => {\n  return _createVNode(\n    ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args\n  );\n};\nconst normalizeKey = ({ key }) => key != null ? key : null;\nconst normalizeRef = ({\n  ref,\n  ref_key,\n  ref_for\n}) => {\n  if (typeof ref === \"number\") {\n    ref = \"\" + ref;\n  }\n  return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;\n};\nfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {\n  const vnode = {\n    __v_isVNode: true,\n    __v_skip: true,\n    type,\n    props,\n    key: props && normalizeKey(props),\n    ref: props && normalizeRef(props),\n    scopeId: currentScopeId,\n    slotScopeIds: null,\n    children,\n    component: null,\n    suspense: null,\n    ssContent: null,\n    ssFallback: null,\n    dirs: null,\n    transition: null,\n    el: null,\n    anchor: null,\n    target: null,\n    targetStart: null,\n    targetAnchor: null,\n    staticCount: 0,\n    shapeFlag,\n    patchFlag,\n    dynamicProps,\n    dynamicChildren: null,\n    appContext: null,\n    ctx: currentRenderingInstance\n  };\n  if (needFullChildrenNormalization) {\n    normalizeChildren(vnode, children);\n    if (shapeFlag & 128) {\n      type.normalize(vnode);\n    }\n  } else if (children) {\n    vnode.shapeFlag |= isString(children) ? 8 : 16;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && vnode.key !== vnode.key) {\n    warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);\n  }\n  if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself\n  !isBlockNode && // has current parent block\n  currentBlock && // presence of a patch flag indicates this node needs patching on updates.\n  // component nodes also should always be patched, because even if the\n  // component doesn't need to update, it needs to persist the instance on to\n  // the next vnode so that it can be properly unmounted later.\n  (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the\n  // vnode should not be considered dynamic due to handler caching.\n  vnode.patchFlag !== 32) {\n    currentBlock.push(vnode);\n  }\n  return vnode;\n}\nconst createVNode = !!(process.env.NODE_ENV !== \"production\") ? createVNodeWithArgsTransform : _createVNode;\nfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\n  if (!type || type === NULL_DYNAMIC_COMPONENT) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !type) {\n      warn$1(`Invalid vnode type when creating vnode: ${type}.`);\n    }\n    type = Comment;\n  }\n  if (isVNode(type)) {\n    const cloned = cloneVNode(\n      type,\n      props,\n      true\n      /* mergeRef: true */\n    );\n    if (children) {\n      normalizeChildren(cloned, children);\n    }\n    if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {\n      if (cloned.shapeFlag & 6) {\n        currentBlock[currentBlock.indexOf(type)] = cloned;\n      } else {\n        currentBlock.push(cloned);\n      }\n    }\n    cloned.patchFlag = -2;\n    return cloned;\n  }\n  if (isClassComponent(type)) {\n    type = type.__vccOpts;\n  }\n  if (props) {\n    props = guardReactiveProps(props);\n    let { class: klass, style } = props;\n    if (klass && !isString(klass)) {\n      props.class = normalizeClass(klass);\n    }\n    if (isObject(style)) {\n      if (isProxy(style) && !isArray(style)) {\n        style = extend({}, style);\n      }\n      props.style = normalizeStyle(style);\n    }\n  }\n  const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;\n  if (!!(process.env.NODE_ENV !== \"production\") && shapeFlag & 4 && isProxy(type)) {\n    type = toRaw(type);\n    warn$1(\n      `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \\`markRaw\\` or using \\`shallowRef\\` instead of \\`ref\\`.`,\n      `\nComponent that was made reactive: `,\n      type\n    );\n  }\n  return createBaseVNode(\n    type,\n    props,\n    children,\n    patchFlag,\n    dynamicProps,\n    shapeFlag,\n    isBlockNode,\n    true\n  );\n}\nfunction guardReactiveProps(props) {\n  if (!props) return null;\n  return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;\n}\nfunction cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {\n  const { props, ref, patchFlag, children, transition } = vnode;\n  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\n  const cloned = {\n    __v_isVNode: true,\n    __v_skip: true,\n    type: vnode.type,\n    props: mergedProps,\n    key: mergedProps && normalizeKey(mergedProps),\n    ref: extraProps && extraProps.ref ? (\n      // #2078 in the case of <component :is=\"vnode\" ref=\"extra\"/>\n      // if the vnode itself already has a ref, cloneVNode will need to merge\n      // the refs so the single vnode can be set on multiple refs\n      mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps)\n    ) : ref,\n    scopeId: vnode.scopeId,\n    slotScopeIds: vnode.slotScopeIds,\n    children: !!(process.env.NODE_ENV !== \"production\") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,\n    target: vnode.target,\n    targetStart: vnode.targetStart,\n    targetAnchor: vnode.targetAnchor,\n    staticCount: vnode.staticCount,\n    shapeFlag: vnode.shapeFlag,\n    // if the vnode is cloned with extra props, we can no longer assume its\n    // existing patch flag to be reliable and need to add the FULL_PROPS flag.\n    // note: preserve flag for fragments since they use the flag for children\n    // fast paths only.\n    patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,\n    dynamicProps: vnode.dynamicProps,\n    dynamicChildren: vnode.dynamicChildren,\n    appContext: vnode.appContext,\n    dirs: vnode.dirs,\n    transition,\n    // These should technically only be non-null on mounted VNodes. However,\n    // they *should* be copied for kept-alive vnodes. So we just always copy\n    // them since them being non-null during a mount doesn't affect the logic as\n    // they will simply be overwritten.\n    component: vnode.component,\n    suspense: vnode.suspense,\n    ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\n    ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\n    el: vnode.el,\n    anchor: vnode.anchor,\n    ctx: vnode.ctx,\n    ce: vnode.ce\n  };\n  if (transition && cloneTransition) {\n    setTransitionHooks(\n      cloned,\n      transition.clone(cloned)\n    );\n  }\n  return cloned;\n}\nfunction deepCloneVNode(vnode) {\n  const cloned = cloneVNode(vnode);\n  if (isArray(vnode.children)) {\n    cloned.children = vnode.children.map(deepCloneVNode);\n  }\n  return cloned;\n}\nfunction createTextVNode(text = \" \", flag = 0) {\n  return createVNode(Text, null, text, flag);\n}\nfunction createStaticVNode(content, numberOfNodes) {\n  const vnode = createVNode(Static, null, content);\n  vnode.staticCount = numberOfNodes;\n  return vnode;\n}\nfunction createCommentVNode(text = \"\", asBlock = false) {\n  return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);\n}\nfunction normalizeVNode(child) {\n  if (child == null || typeof child === \"boolean\") {\n    return createVNode(Comment);\n  } else if (isArray(child)) {\n    return createVNode(\n      Fragment,\n      null,\n      // #3666, avoid reference pollution when reusing vnode\n      child.slice()\n    );\n  } else if (typeof child === \"object\") {\n    return cloneIfMounted(child);\n  } else {\n    return createVNode(Text, null, String(child));\n  }\n}\nfunction cloneIfMounted(child) {\n  return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);\n}\nfunction normalizeChildren(vnode, children) {\n  let type = 0;\n  const { shapeFlag } = vnode;\n  if (children == null) {\n    children = null;\n  } else if (isArray(children)) {\n    type = 16;\n  } else if (typeof children === \"object\") {\n    if (shapeFlag & (1 | 64)) {\n      const slot = children.default;\n      if (slot) {\n        slot._c && (slot._d = false);\n        normalizeChildren(vnode, slot());\n        slot._c && (slot._d = true);\n      }\n      return;\n    } else {\n      type = 32;\n      const slotFlag = children._;\n      if (!slotFlag && !isInternalObject(children)) {\n        children._ctx = currentRenderingInstance;\n      } else if (slotFlag === 3 && currentRenderingInstance) {\n        if (currentRenderingInstance.slots._ === 1) {\n          children._ = 1;\n        } else {\n          children._ = 2;\n          vnode.patchFlag |= 1024;\n        }\n      }\n    }\n  } else if (isFunction(children)) {\n    children = { default: children, _ctx: currentRenderingInstance };\n    type = 32;\n  } else {\n    children = String(children);\n    if (shapeFlag & 64) {\n      type = 16;\n      children = [createTextVNode(children)];\n    } else {\n      type = 8;\n    }\n  }\n  vnode.children = children;\n  vnode.shapeFlag |= type;\n}\nfunction mergeProps(...args) {\n  const ret = {};\n  for (let i = 0; i < args.length; i++) {\n    const toMerge = args[i];\n    for (const key in toMerge) {\n      if (key === \"class\") {\n        if (ret.class !== toMerge.class) {\n          ret.class = normalizeClass([ret.class, toMerge.class]);\n        }\n      } else if (key === \"style\") {\n        ret.style = normalizeStyle([ret.style, toMerge.style]);\n      } else if (isOn(key)) {\n        const existing = ret[key];\n        const incoming = toMerge[key];\n        if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {\n          ret[key] = existing ? [].concat(existing, incoming) : incoming;\n        }\n      } else if (key !== \"\") {\n        ret[key] = toMerge[key];\n      }\n    }\n  }\n  return ret;\n}\nfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\n  callWithAsyncErrorHandling(hook, instance, 7, [\n    vnode,\n    prevVNode\n  ]);\n}\n\nconst emptyAppContext = createAppContext();\nlet uid = 0;\nfunction createComponentInstance(vnode, parent, suspense) {\n  const type = vnode.type;\n  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\n  const instance = {\n    uid: uid++,\n    vnode,\n    type,\n    parent,\n    appContext,\n    root: null,\n    // to be immediately set\n    next: null,\n    subTree: null,\n    // will be set synchronously right after creation\n    effect: null,\n    update: null,\n    // will be set synchronously right after creation\n    scope: new EffectScope(\n      true\n      /* detached */\n    ),\n    render: null,\n    proxy: null,\n    exposed: null,\n    exposeProxy: null,\n    withProxy: null,\n    provides: parent ? parent.provides : Object.create(appContext.provides),\n    accessCache: null,\n    renderCache: [],\n    // local resolved assets\n    components: null,\n    directives: null,\n    // resolved props and emits options\n    propsOptions: normalizePropsOptions(type, appContext),\n    emitsOptions: normalizeEmitsOptions(type, appContext),\n    // emit\n    emit: null,\n    // to be set immediately\n    emitted: null,\n    // props default value\n    propsDefaults: EMPTY_OBJ,\n    // inheritAttrs\n    inheritAttrs: type.inheritAttrs,\n    // state\n    ctx: EMPTY_OBJ,\n    data: EMPTY_OBJ,\n    props: EMPTY_OBJ,\n    attrs: EMPTY_OBJ,\n    slots: EMPTY_OBJ,\n    refs: EMPTY_OBJ,\n    setupState: EMPTY_OBJ,\n    setupContext: null,\n    // suspense related\n    suspense,\n    suspenseId: suspense ? suspense.pendingId : 0,\n    asyncDep: null,\n    asyncResolved: false,\n    // lifecycle hooks\n    // not using enums here because it results in computed properties\n    isMounted: false,\n    isUnmounted: false,\n    isDeactivated: false,\n    bc: null,\n    c: null,\n    bm: null,\n    m: null,\n    bu: null,\n    u: null,\n    um: null,\n    bum: null,\n    da: null,\n    a: null,\n    rtg: null,\n    rtc: null,\n    ec: null,\n    sp: null\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    instance.ctx = createDevRenderContext(instance);\n  } else {\n    instance.ctx = { _: instance };\n  }\n  instance.root = parent ? parent.root : instance;\n  instance.emit = emit.bind(null, instance);\n  if (vnode.ce) {\n    vnode.ce(instance);\n  }\n  return instance;\n}\nlet currentInstance = null;\nconst getCurrentInstance = () => currentInstance || currentRenderingInstance;\nlet internalSetCurrentInstance;\nlet setInSSRSetupState;\n{\n  const g = getGlobalThis();\n  const registerGlobalSetter = (key, setter) => {\n    let setters;\n    if (!(setters = g[key])) setters = g[key] = [];\n    setters.push(setter);\n    return (v) => {\n      if (setters.length > 1) setters.forEach((set) => set(v));\n      else setters[0](v);\n    };\n  };\n  internalSetCurrentInstance = registerGlobalSetter(\n    `__VUE_INSTANCE_SETTERS__`,\n    (v) => currentInstance = v\n  );\n  setInSSRSetupState = registerGlobalSetter(\n    `__VUE_SSR_SETTERS__`,\n    (v) => isInSSRComponentSetup = v\n  );\n}\nconst setCurrentInstance = (instance) => {\n  const prev = currentInstance;\n  internalSetCurrentInstance(instance);\n  instance.scope.on();\n  return () => {\n    instance.scope.off();\n    internalSetCurrentInstance(prev);\n  };\n};\nconst unsetCurrentInstance = () => {\n  currentInstance && currentInstance.scope.off();\n  internalSetCurrentInstance(null);\n};\nconst isBuiltInTag = /* @__PURE__ */ makeMap(\"slot,component\");\nfunction validateComponentName(name, { isNativeTag }) {\n  if (isBuiltInTag(name) || isNativeTag(name)) {\n    warn$1(\n      \"Do not use built-in or reserved HTML elements as component id: \" + name\n    );\n  }\n}\nfunction isStatefulComponent(instance) {\n  return instance.vnode.shapeFlag & 4;\n}\nlet isInSSRComponentSetup = false;\nfunction setupComponent(instance, isSSR = false, optimized = false) {\n  isSSR && setInSSRSetupState(isSSR);\n  const { props, children } = instance.vnode;\n  const isStateful = isStatefulComponent(instance);\n  initProps(instance, props, isStateful, isSSR);\n  initSlots(instance, children, optimized);\n  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;\n  isSSR && setInSSRSetupState(false);\n  return setupResult;\n}\nfunction setupStatefulComponent(instance, isSSR) {\n  var _a;\n  const Component = instance.type;\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    if (Component.name) {\n      validateComponentName(Component.name, instance.appContext.config);\n    }\n    if (Component.components) {\n      const names = Object.keys(Component.components);\n      for (let i = 0; i < names.length; i++) {\n        validateComponentName(names[i], instance.appContext.config);\n      }\n    }\n    if (Component.directives) {\n      const names = Object.keys(Component.directives);\n      for (let i = 0; i < names.length; i++) {\n        validateDirectiveName(names[i]);\n      }\n    }\n    if (Component.compilerOptions && isRuntimeOnly()) {\n      warn$1(\n        `\"compilerOptions\" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`\n      );\n    }\n  }\n  instance.accessCache = /* @__PURE__ */ Object.create(null);\n  instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    exposePropsOnRenderContext(instance);\n  }\n  const { setup } = Component;\n  if (setup) {\n    const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;\n    const reset = setCurrentInstance(instance);\n    pauseTracking();\n    const setupResult = callWithErrorHandling(\n      setup,\n      instance,\n      0,\n      [\n        !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(instance.props) : instance.props,\n        setupContext\n      ]\n    );\n    resetTracking();\n    reset();\n    if (isPromise(setupResult)) {\n      setupResult.then(unsetCurrentInstance, unsetCurrentInstance);\n      if (isSSR) {\n        return setupResult.then((resolvedResult) => {\n          handleSetupResult(instance, resolvedResult, isSSR);\n        }).catch((e) => {\n          handleError(e, instance, 0);\n        });\n      } else {\n        instance.asyncDep = setupResult;\n        if (!!(process.env.NODE_ENV !== \"production\") && !instance.suspense) {\n          const name = (_a = Component.name) != null ? _a : \"Anonymous\";\n          warn$1(\n            `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`\n          );\n        }\n      }\n    } else {\n      handleSetupResult(instance, setupResult, isSSR);\n    }\n  } else {\n    finishComponentSetup(instance, isSSR);\n  }\n}\nfunction handleSetupResult(instance, setupResult, isSSR) {\n  if (isFunction(setupResult)) {\n    if (instance.type.__ssrInlineRender) {\n      instance.ssrRender = setupResult;\n    } else {\n      instance.render = setupResult;\n    }\n  } else if (isObject(setupResult)) {\n    if (!!(process.env.NODE_ENV !== \"production\") && isVNode(setupResult)) {\n      warn$1(\n        `setup() should not return VNodes directly - return a render function instead.`\n      );\n    }\n    if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n      instance.devtoolsRawSetupState = setupResult;\n    }\n    instance.setupState = proxyRefs(setupResult);\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      exposeSetupStateOnRenderContext(instance);\n    }\n  } else if (!!(process.env.NODE_ENV !== \"production\") && setupResult !== void 0) {\n    warn$1(\n      `setup() should return an object. Received: ${setupResult === null ? \"null\" : typeof setupResult}`\n    );\n  }\n  finishComponentSetup(instance, isSSR);\n}\nlet compile;\nlet installWithProxy;\nfunction registerRuntimeCompiler(_compile) {\n  compile = _compile;\n  installWithProxy = (i) => {\n    if (i.render._rc) {\n      i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);\n    }\n  };\n}\nconst isRuntimeOnly = () => !compile;\nfunction finishComponentSetup(instance, isSSR, skipOptions) {\n  const Component = instance.type;\n  if (!instance.render) {\n    if (!isSSR && compile && !Component.render) {\n      const template = Component.template || resolveMergedOptions(instance).template;\n      if (template) {\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          startMeasure(instance, `compile`);\n        }\n        const { isCustomElement, compilerOptions } = instance.appContext.config;\n        const { delimiters, compilerOptions: componentCompilerOptions } = Component;\n        const finalCompilerOptions = extend(\n          extend(\n            {\n              isCustomElement,\n              delimiters\n            },\n            compilerOptions\n          ),\n          componentCompilerOptions\n        );\n        Component.render = compile(template, finalCompilerOptions);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          endMeasure(instance, `compile`);\n        }\n      }\n    }\n    instance.render = Component.render || NOOP;\n    if (installWithProxy) {\n      installWithProxy(instance);\n    }\n  }\n  if (__VUE_OPTIONS_API__ && true) {\n    const reset = setCurrentInstance(instance);\n    pauseTracking();\n    try {\n      applyOptions(instance);\n    } finally {\n      resetTracking();\n      reset();\n    }\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && !Component.render && instance.render === NOOP && !isSSR) {\n    if (!compile && Component.template) {\n      warn$1(\n        `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".` )\n      );\n    } else {\n      warn$1(`Component is missing template or render function: `, Component);\n    }\n  }\n}\nconst attrsProxyHandlers = !!(process.env.NODE_ENV !== \"production\") ? {\n  get(target, key) {\n    markAttrsAccessed();\n    track(target, \"get\", \"\");\n    return target[key];\n  },\n  set() {\n    warn$1(`setupContext.attrs is readonly.`);\n    return false;\n  },\n  deleteProperty() {\n    warn$1(`setupContext.attrs is readonly.`);\n    return false;\n  }\n} : {\n  get(target, key) {\n    track(target, \"get\", \"\");\n    return target[key];\n  }\n};\nfunction getSlotsProxy(instance) {\n  return new Proxy(instance.slots, {\n    get(target, key) {\n      track(instance, \"get\", \"$slots\");\n      return target[key];\n    }\n  });\n}\nfunction createSetupContext(instance) {\n  const expose = (exposed) => {\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      if (instance.exposed) {\n        warn$1(`expose() should be called only once per setup().`);\n      }\n      if (exposed != null) {\n        let exposedType = typeof exposed;\n        if (exposedType === \"object\") {\n          if (isArray(exposed)) {\n            exposedType = \"array\";\n          } else if (isRef(exposed)) {\n            exposedType = \"ref\";\n          }\n        }\n        if (exposedType !== \"object\") {\n          warn$1(\n            `expose() should be passed a plain object, received ${exposedType}.`\n          );\n        }\n      }\n    }\n    instance.exposed = exposed || {};\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    let attrsProxy;\n    let slotsProxy;\n    return Object.freeze({\n      get attrs() {\n        return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));\n      },\n      get slots() {\n        return slotsProxy || (slotsProxy = getSlotsProxy(instance));\n      },\n      get emit() {\n        return (event, ...args) => instance.emit(event, ...args);\n      },\n      expose\n    });\n  } else {\n    return {\n      attrs: new Proxy(instance.attrs, attrsProxyHandlers),\n      slots: instance.slots,\n      emit: instance.emit,\n      expose\n    };\n  }\n}\nfunction getComponentPublicInstance(instance) {\n  if (instance.exposed) {\n    return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {\n      get(target, key) {\n        if (key in target) {\n          return target[key];\n        } else if (key in publicPropertiesMap) {\n          return publicPropertiesMap[key](instance);\n        }\n      },\n      has(target, key) {\n        return key in target || key in publicPropertiesMap;\n      }\n    }));\n  } else {\n    return instance.proxy;\n  }\n}\nconst classifyRE = /(?:^|[-_])(\\w)/g;\nconst classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, \"\");\nfunction getComponentName(Component, includeInferred = true) {\n  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;\n}\nfunction formatComponentName(instance, Component, isRoot = false) {\n  let name = getComponentName(Component);\n  if (!name && Component.__file) {\n    const match = Component.__file.match(/([^/\\\\]+)\\.\\w+$/);\n    if (match) {\n      name = match[1];\n    }\n  }\n  if (!name && instance && instance.parent) {\n    const inferFromRegistry = (registry) => {\n      for (const key in registry) {\n        if (registry[key] === Component) {\n          return key;\n        }\n      }\n    };\n    name = inferFromRegistry(\n      instance.components || instance.parent.type.components\n    ) || inferFromRegistry(instance.appContext.components);\n  }\n  return name ? classify(name) : isRoot ? `App` : `Anonymous`;\n}\nfunction isClassComponent(value) {\n  return isFunction(value) && \"__vccOpts\" in value;\n}\n\nconst computed = (getterOrOptions, debugOptions) => {\n  const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    const i = getCurrentInstance();\n    if (i && i.appContext.config.warnRecursiveComputed) {\n      c._warnRecursive = true;\n    }\n  }\n  return c;\n};\n\nfunction h(type, propsOrChildren, children) {\n  const l = arguments.length;\n  if (l === 2) {\n    if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {\n      if (isVNode(propsOrChildren)) {\n        return createVNode(type, null, [propsOrChildren]);\n      }\n      return createVNode(type, propsOrChildren);\n    } else {\n      return createVNode(type, null, propsOrChildren);\n    }\n  } else {\n    if (l > 3) {\n      children = Array.prototype.slice.call(arguments, 2);\n    } else if (l === 3 && isVNode(children)) {\n      children = [children];\n    }\n    return createVNode(type, propsOrChildren, children);\n  }\n}\n\nfunction initCustomFormatter() {\n  if (!!!(process.env.NODE_ENV !== \"production\") || typeof window === \"undefined\") {\n    return;\n  }\n  const vueStyle = { style: \"color:#3ba776\" };\n  const numberStyle = { style: \"color:#1677ff\" };\n  const stringStyle = { style: \"color:#f5222d\" };\n  const keywordStyle = { style: \"color:#eb2f96\" };\n  const formatter = {\n    __vue_custom_formatter: true,\n    header(obj) {\n      if (!isObject(obj)) {\n        return null;\n      }\n      if (obj.__isVue) {\n        return [\"div\", vueStyle, `VueInstance`];\n      } else if (isRef(obj)) {\n        return [\n          \"div\",\n          {},\n          [\"span\", vueStyle, genRefFlag(obj)],\n          \"<\",\n          formatValue(obj.value),\n          `>`\n        ];\n      } else if (isReactive(obj)) {\n        return [\n          \"div\",\n          {},\n          [\"span\", vueStyle, isShallow(obj) ? \"ShallowReactive\" : \"Reactive\"],\n          \"<\",\n          formatValue(obj),\n          `>${isReadonly(obj) ? ` (readonly)` : ``}`\n        ];\n      } else if (isReadonly(obj)) {\n        return [\n          \"div\",\n          {},\n          [\"span\", vueStyle, isShallow(obj) ? \"ShallowReadonly\" : \"Readonly\"],\n          \"<\",\n          formatValue(obj),\n          \">\"\n        ];\n      }\n      return null;\n    },\n    hasBody(obj) {\n      return obj && obj.__isVue;\n    },\n    body(obj) {\n      if (obj && obj.__isVue) {\n        return [\n          \"div\",\n          {},\n          ...formatInstance(obj.$)\n        ];\n      }\n    }\n  };\n  function formatInstance(instance) {\n    const blocks = [];\n    if (instance.type.props && instance.props) {\n      blocks.push(createInstanceBlock(\"props\", toRaw(instance.props)));\n    }\n    if (instance.setupState !== EMPTY_OBJ) {\n      blocks.push(createInstanceBlock(\"setup\", instance.setupState));\n    }\n    if (instance.data !== EMPTY_OBJ) {\n      blocks.push(createInstanceBlock(\"data\", toRaw(instance.data)));\n    }\n    const computed = extractKeys(instance, \"computed\");\n    if (computed) {\n      blocks.push(createInstanceBlock(\"computed\", computed));\n    }\n    const injected = extractKeys(instance, \"inject\");\n    if (injected) {\n      blocks.push(createInstanceBlock(\"injected\", injected));\n    }\n    blocks.push([\n      \"div\",\n      {},\n      [\n        \"span\",\n        {\n          style: keywordStyle.style + \";opacity:0.66\"\n        },\n        \"$ (internal): \"\n      ],\n      [\"object\", { object: instance }]\n    ]);\n    return blocks;\n  }\n  function createInstanceBlock(type, target) {\n    target = extend({}, target);\n    if (!Object.keys(target).length) {\n      return [\"span\", {}];\n    }\n    return [\n      \"div\",\n      { style: \"line-height:1.25em;margin-bottom:0.6em\" },\n      [\n        \"div\",\n        {\n          style: \"color:#476582\"\n        },\n        type\n      ],\n      [\n        \"div\",\n        {\n          style: \"padding-left:1.25em\"\n        },\n        ...Object.keys(target).map((key) => {\n          return [\n            \"div\",\n            {},\n            [\"span\", keywordStyle, key + \": \"],\n            formatValue(target[key], false)\n          ];\n        })\n      ]\n    ];\n  }\n  function formatValue(v, asRaw = true) {\n    if (typeof v === \"number\") {\n      return [\"span\", numberStyle, v];\n    } else if (typeof v === \"string\") {\n      return [\"span\", stringStyle, JSON.stringify(v)];\n    } else if (typeof v === \"boolean\") {\n      return [\"span\", keywordStyle, v];\n    } else if (isObject(v)) {\n      return [\"object\", { object: asRaw ? toRaw(v) : v }];\n    } else {\n      return [\"span\", stringStyle, String(v)];\n    }\n  }\n  function extractKeys(instance, type) {\n    const Comp = instance.type;\n    if (isFunction(Comp)) {\n      return;\n    }\n    const extracted = {};\n    for (const key in instance.ctx) {\n      if (isKeyOfType(Comp, key, type)) {\n        extracted[key] = instance.ctx[key];\n      }\n    }\n    return extracted;\n  }\n  function isKeyOfType(Comp, key, type) {\n    const opts = Comp[type];\n    if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {\n      return true;\n    }\n    if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {\n      return true;\n    }\n    if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {\n      return true;\n    }\n  }\n  function genRefFlag(v) {\n    if (isShallow(v)) {\n      return `ShallowRef`;\n    }\n    if (v.effect) {\n      return `ComputedRef`;\n    }\n    return `Ref`;\n  }\n  if (window.devtoolsFormatters) {\n    window.devtoolsFormatters.push(formatter);\n  } else {\n    window.devtoolsFormatters = [formatter];\n  }\n}\n\nfunction withMemo(memo, render, cache, index) {\n  const cached = cache[index];\n  if (cached && isMemoSame(cached, memo)) {\n    return cached;\n  }\n  const ret = render();\n  ret.memo = memo.slice();\n  ret.cacheIndex = index;\n  return cache[index] = ret;\n}\nfunction isMemoSame(cached, memo) {\n  const prev = cached.memo;\n  if (prev.length != memo.length) {\n    return false;\n  }\n  for (let i = 0; i < prev.length; i++) {\n    if (hasChanged(prev[i], memo[i])) {\n      return false;\n    }\n  }\n  if (isBlockTreeEnabled > 0 && currentBlock) {\n    currentBlock.push(cached);\n  }\n  return true;\n}\n\nconst version = \"3.4.38\";\nconst warn = !!(process.env.NODE_ENV !== \"production\") ? warn$1 : NOOP;\nconst ErrorTypeStrings = ErrorTypeStrings$1 ;\nconst devtools = !!(process.env.NODE_ENV !== \"production\") || true ? devtools$1 : void 0;\nconst setDevtoolsHook = !!(process.env.NODE_ENV !== \"production\") || true ? setDevtoolsHook$1 : NOOP;\nconst _ssrUtils = {\n  createComponentInstance,\n  setupComponent,\n  renderComponentRoot,\n  setCurrentRenderingInstance,\n  isVNode: isVNode,\n  normalizeVNode,\n  getComponentPublicInstance,\n  ensureValidVNode\n};\nconst ssrUtils = _ssrUtils ;\nconst resolveFilter = null;\nconst compatUtils = null;\nconst DeprecationTypes = null;\n\nexport { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useModel, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };\n","/**\n* @vue/runtime-dom v3.4.38\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn, onBeforeMount, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';\nexport * from '@vue/runtime-core';\nimport { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, NOOP, isOn, isModelListener, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';\n\nconst svgNS = \"http://www.w3.org/2000/svg\";\nconst mathmlNS = \"http://www.w3.org/1998/Math/MathML\";\nconst doc = typeof document !== \"undefined\" ? document : null;\nconst templateContainer = doc && /* @__PURE__ */ doc.createElement(\"template\");\nconst nodeOps = {\n  insert: (child, parent, anchor) => {\n    parent.insertBefore(child, anchor || null);\n  },\n  remove: (child) => {\n    const parent = child.parentNode;\n    if (parent) {\n      parent.removeChild(child);\n    }\n  },\n  createElement: (tag, namespace, is, props) => {\n    const el = namespace === \"svg\" ? doc.createElementNS(svgNS, tag) : namespace === \"mathml\" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);\n    if (tag === \"select\" && props && props.multiple != null) {\n      el.setAttribute(\"multiple\", props.multiple);\n    }\n    return el;\n  },\n  createText: (text) => doc.createTextNode(text),\n  createComment: (text) => doc.createComment(text),\n  setText: (node, text) => {\n    node.nodeValue = text;\n  },\n  setElementText: (el, text) => {\n    el.textContent = text;\n  },\n  parentNode: (node) => node.parentNode,\n  nextSibling: (node) => node.nextSibling,\n  querySelector: (selector) => doc.querySelector(selector),\n  setScopeId(el, id) {\n    el.setAttribute(id, \"\");\n  },\n  // __UNSAFE__\n  // Reason: innerHTML.\n  // Static content here can only come from compiled templates.\n  // As long as the user only uses trusted templates, this is safe.\n  insertStaticContent(content, parent, anchor, namespace, start, end) {\n    const before = anchor ? anchor.previousSibling : parent.lastChild;\n    if (start && (start === end || start.nextSibling)) {\n      while (true) {\n        parent.insertBefore(start.cloneNode(true), anchor);\n        if (start === end || !(start = start.nextSibling)) break;\n      }\n    } else {\n      templateContainer.innerHTML = namespace === \"svg\" ? `<svg>${content}</svg>` : namespace === \"mathml\" ? `<math>${content}</math>` : content;\n      const template = templateContainer.content;\n      if (namespace === \"svg\" || namespace === \"mathml\") {\n        const wrapper = template.firstChild;\n        while (wrapper.firstChild) {\n          template.appendChild(wrapper.firstChild);\n        }\n        template.removeChild(wrapper);\n      }\n      parent.insertBefore(template, anchor);\n    }\n    return [\n      // first\n      before ? before.nextSibling : parent.firstChild,\n      // last\n      anchor ? anchor.previousSibling : parent.lastChild\n    ];\n  }\n};\n\nconst TRANSITION = \"transition\";\nconst ANIMATION = \"animation\";\nconst vtcKey = Symbol(\"_vtc\");\nconst Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);\nTransition.displayName = \"Transition\";\nconst DOMTransitionPropsValidators = {\n  name: String,\n  type: String,\n  css: {\n    type: Boolean,\n    default: true\n  },\n  duration: [String, Number, Object],\n  enterFromClass: String,\n  enterActiveClass: String,\n  enterToClass: String,\n  appearFromClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  leaveFromClass: String,\n  leaveActiveClass: String,\n  leaveToClass: String\n};\nconst TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(\n  {},\n  BaseTransitionPropsValidators,\n  DOMTransitionPropsValidators\n);\nconst callHook = (hook, args = []) => {\n  if (isArray(hook)) {\n    hook.forEach((h2) => h2(...args));\n  } else if (hook) {\n    hook(...args);\n  }\n};\nconst hasExplicitCallback = (hook) => {\n  return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;\n};\nfunction resolveTransitionProps(rawProps) {\n  const baseProps = {};\n  for (const key in rawProps) {\n    if (!(key in DOMTransitionPropsValidators)) {\n      baseProps[key] = rawProps[key];\n    }\n  }\n  if (rawProps.css === false) {\n    return baseProps;\n  }\n  const {\n    name = \"v\",\n    type,\n    duration,\n    enterFromClass = `${name}-enter-from`,\n    enterActiveClass = `${name}-enter-active`,\n    enterToClass = `${name}-enter-to`,\n    appearFromClass = enterFromClass,\n    appearActiveClass = enterActiveClass,\n    appearToClass = enterToClass,\n    leaveFromClass = `${name}-leave-from`,\n    leaveActiveClass = `${name}-leave-active`,\n    leaveToClass = `${name}-leave-to`\n  } = rawProps;\n  const durations = normalizeDuration(duration);\n  const enterDuration = durations && durations[0];\n  const leaveDuration = durations && durations[1];\n  const {\n    onBeforeEnter,\n    onEnter,\n    onEnterCancelled,\n    onLeave,\n    onLeaveCancelled,\n    onBeforeAppear = onBeforeEnter,\n    onAppear = onEnter,\n    onAppearCancelled = onEnterCancelled\n  } = baseProps;\n  const finishEnter = (el, isAppear, done) => {\n    removeTransitionClass(el, isAppear ? appearToClass : enterToClass);\n    removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);\n    done && done();\n  };\n  const finishLeave = (el, done) => {\n    el._isLeaving = false;\n    removeTransitionClass(el, leaveFromClass);\n    removeTransitionClass(el, leaveToClass);\n    removeTransitionClass(el, leaveActiveClass);\n    done && done();\n  };\n  const makeEnterHook = (isAppear) => {\n    return (el, done) => {\n      const hook = isAppear ? onAppear : onEnter;\n      const resolve = () => finishEnter(el, isAppear, done);\n      callHook(hook, [el, resolve]);\n      nextFrame(() => {\n        removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);\n        addTransitionClass(el, isAppear ? appearToClass : enterToClass);\n        if (!hasExplicitCallback(hook)) {\n          whenTransitionEnds(el, type, enterDuration, resolve);\n        }\n      });\n    };\n  };\n  return extend(baseProps, {\n    onBeforeEnter(el) {\n      callHook(onBeforeEnter, [el]);\n      addTransitionClass(el, enterFromClass);\n      addTransitionClass(el, enterActiveClass);\n    },\n    onBeforeAppear(el) {\n      callHook(onBeforeAppear, [el]);\n      addTransitionClass(el, appearFromClass);\n      addTransitionClass(el, appearActiveClass);\n    },\n    onEnter: makeEnterHook(false),\n    onAppear: makeEnterHook(true),\n    onLeave(el, done) {\n      el._isLeaving = true;\n      const resolve = () => finishLeave(el, done);\n      addTransitionClass(el, leaveFromClass);\n      addTransitionClass(el, leaveActiveClass);\n      forceReflow();\n      nextFrame(() => {\n        if (!el._isLeaving) {\n          return;\n        }\n        removeTransitionClass(el, leaveFromClass);\n        addTransitionClass(el, leaveToClass);\n        if (!hasExplicitCallback(onLeave)) {\n          whenTransitionEnds(el, type, leaveDuration, resolve);\n        }\n      });\n      callHook(onLeave, [el, resolve]);\n    },\n    onEnterCancelled(el) {\n      finishEnter(el, false);\n      callHook(onEnterCancelled, [el]);\n    },\n    onAppearCancelled(el) {\n      finishEnter(el, true);\n      callHook(onAppearCancelled, [el]);\n    },\n    onLeaveCancelled(el) {\n      finishLeave(el);\n      callHook(onLeaveCancelled, [el]);\n    }\n  });\n}\nfunction normalizeDuration(duration) {\n  if (duration == null) {\n    return null;\n  } else if (isObject(duration)) {\n    return [NumberOf(duration.enter), NumberOf(duration.leave)];\n  } else {\n    const n = NumberOf(duration);\n    return [n, n];\n  }\n}\nfunction NumberOf(val) {\n  const res = toNumber(val);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    assertNumber(res, \"<transition> explicit duration\");\n  }\n  return res;\n}\nfunction addTransitionClass(el, cls) {\n  cls.split(/\\s+/).forEach((c) => c && el.classList.add(c));\n  (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);\n}\nfunction removeTransitionClass(el, cls) {\n  cls.split(/\\s+/).forEach((c) => c && el.classList.remove(c));\n  const _vtc = el[vtcKey];\n  if (_vtc) {\n    _vtc.delete(cls);\n    if (!_vtc.size) {\n      el[vtcKey] = void 0;\n    }\n  }\n}\nfunction nextFrame(cb) {\n  requestAnimationFrame(() => {\n    requestAnimationFrame(cb);\n  });\n}\nlet endId = 0;\nfunction whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {\n  const id = el._endId = ++endId;\n  const resolveIfNotStale = () => {\n    if (id === el._endId) {\n      resolve();\n    }\n  };\n  if (explicitTimeout) {\n    return setTimeout(resolveIfNotStale, explicitTimeout);\n  }\n  const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\n  if (!type) {\n    return resolve();\n  }\n  const endEvent = type + \"end\";\n  let ended = 0;\n  const end = () => {\n    el.removeEventListener(endEvent, onEnd);\n    resolveIfNotStale();\n  };\n  const onEnd = (e) => {\n    if (e.target === el && ++ended >= propCount) {\n      end();\n    }\n  };\n  setTimeout(() => {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(endEvent, onEnd);\n}\nfunction getTransitionInfo(el, expectedType) {\n  const styles = window.getComputedStyle(el);\n  const getStyleProperties = (key) => (styles[key] || \"\").split(\", \");\n  const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);\n  const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);\n  const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  const animationDelays = getStyleProperties(`${ANIMATION}Delay`);\n  const animationDurations = getStyleProperties(`${ANIMATION}Duration`);\n  const animationTimeout = getTimeout(animationDelays, animationDurations);\n  let type = null;\n  let timeout = 0;\n  let propCount = 0;\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;\n    propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;\n  }\n  const hasTransform = type === TRANSITION && /\\b(transform|all)(,|$)/.test(\n    getStyleProperties(`${TRANSITION}Property`).toString()\n  );\n  return {\n    type,\n    timeout,\n    propCount,\n    hasTransform\n  };\n}\nfunction getTimeout(delays, durations) {\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n  return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));\n}\nfunction toMs(s) {\n  if (s === \"auto\") return 0;\n  return Number(s.slice(0, -1).replace(\",\", \".\")) * 1e3;\n}\nfunction forceReflow() {\n  return document.body.offsetHeight;\n}\n\nfunction patchClass(el, value, isSVG) {\n  const transitionClasses = el[vtcKey];\n  if (transitionClasses) {\n    value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(\" \");\n  }\n  if (value == null) {\n    el.removeAttribute(\"class\");\n  } else if (isSVG) {\n    el.setAttribute(\"class\", value);\n  } else {\n    el.className = value;\n  }\n}\n\nconst vShowOriginalDisplay = Symbol(\"_vod\");\nconst vShowHidden = Symbol(\"_vsh\");\nconst vShow = {\n  beforeMount(el, { value }, { transition }) {\n    el[vShowOriginalDisplay] = el.style.display === \"none\" ? \"\" : el.style.display;\n    if (transition && value) {\n      transition.beforeEnter(el);\n    } else {\n      setDisplay(el, value);\n    }\n  },\n  mounted(el, { value }, { transition }) {\n    if (transition && value) {\n      transition.enter(el);\n    }\n  },\n  updated(el, { value, oldValue }, { transition }) {\n    if (!value === !oldValue) return;\n    if (transition) {\n      if (value) {\n        transition.beforeEnter(el);\n        setDisplay(el, true);\n        transition.enter(el);\n      } else {\n        transition.leave(el, () => {\n          setDisplay(el, false);\n        });\n      }\n    } else {\n      setDisplay(el, value);\n    }\n  },\n  beforeUnmount(el, { value }) {\n    setDisplay(el, value);\n  }\n};\nif (!!(process.env.NODE_ENV !== \"production\")) {\n  vShow.name = \"show\";\n}\nfunction setDisplay(el, value) {\n  el.style.display = value ? el[vShowOriginalDisplay] : \"none\";\n  el[vShowHidden] = !value;\n}\nfunction initVShowForSSR() {\n  vShow.getSSRProps = ({ value }) => {\n    if (!value) {\n      return { style: { display: \"none\" } };\n    }\n  };\n}\n\nconst CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"CSS_VAR_TEXT\" : \"\");\nfunction useCssVars(getter) {\n  const instance = getCurrentInstance();\n  if (!instance) {\n    !!(process.env.NODE_ENV !== \"production\") && warn(`useCssVars is called without current active component instance.`);\n    return;\n  }\n  const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {\n    Array.from(\n      document.querySelectorAll(`[data-v-owner=\"${instance.uid}\"]`)\n    ).forEach((node) => setVarsOnNode(node, vars));\n  };\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    instance.getCssVars = () => getter(instance.proxy);\n  }\n  const setVars = () => {\n    const vars = getter(instance.proxy);\n    setVarsOnVNode(instance.subTree, vars);\n    updateTeleports(vars);\n  };\n  onBeforeMount(() => {\n    watchPostEffect(setVars);\n  });\n  onMounted(() => {\n    const ob = new MutationObserver(setVars);\n    ob.observe(instance.subTree.el.parentNode, { childList: true });\n    onUnmounted(() => ob.disconnect());\n  });\n}\nfunction setVarsOnVNode(vnode, vars) {\n  if (vnode.shapeFlag & 128) {\n    const suspense = vnode.suspense;\n    vnode = suspense.activeBranch;\n    if (suspense.pendingBranch && !suspense.isHydrating) {\n      suspense.effects.push(() => {\n        setVarsOnVNode(suspense.activeBranch, vars);\n      });\n    }\n  }\n  while (vnode.component) {\n    vnode = vnode.component.subTree;\n  }\n  if (vnode.shapeFlag & 1 && vnode.el) {\n    setVarsOnNode(vnode.el, vars);\n  } else if (vnode.type === Fragment) {\n    vnode.children.forEach((c) => setVarsOnVNode(c, vars));\n  } else if (vnode.type === Static) {\n    let { el, anchor } = vnode;\n    while (el) {\n      setVarsOnNode(el, vars);\n      if (el === anchor) break;\n      el = el.nextSibling;\n    }\n  }\n}\nfunction setVarsOnNode(el, vars) {\n  if (el.nodeType === 1) {\n    const style = el.style;\n    let cssText = \"\";\n    for (const key in vars) {\n      style.setProperty(`--${key}`, vars[key]);\n      cssText += `--${key}: ${vars[key]};`;\n    }\n    style[CSS_VAR_TEXT] = cssText;\n  }\n}\n\nconst displayRE = /(^|;)\\s*display\\s*:/;\nfunction patchStyle(el, prev, next) {\n  const style = el.style;\n  const isCssString = isString(next);\n  let hasControlledDisplay = false;\n  if (next && !isCssString) {\n    if (prev) {\n      if (!isString(prev)) {\n        for (const key in prev) {\n          if (next[key] == null) {\n            setStyle(style, key, \"\");\n          }\n        }\n      } else {\n        for (const prevStyle of prev.split(\";\")) {\n          const key = prevStyle.slice(0, prevStyle.indexOf(\":\")).trim();\n          if (next[key] == null) {\n            setStyle(style, key, \"\");\n          }\n        }\n      }\n    }\n    for (const key in next) {\n      if (key === \"display\") {\n        hasControlledDisplay = true;\n      }\n      setStyle(style, key, next[key]);\n    }\n  } else {\n    if (isCssString) {\n      if (prev !== next) {\n        const cssVarText = style[CSS_VAR_TEXT];\n        if (cssVarText) {\n          next += \";\" + cssVarText;\n        }\n        style.cssText = next;\n        hasControlledDisplay = displayRE.test(next);\n      }\n    } else if (prev) {\n      el.removeAttribute(\"style\");\n    }\n  }\n  if (vShowOriginalDisplay in el) {\n    el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : \"\";\n    if (el[vShowHidden]) {\n      style.display = \"none\";\n    }\n  }\n}\nconst semicolonRE = /[^\\\\];\\s*$/;\nconst importantRE = /\\s*!important$/;\nfunction setStyle(style, name, val) {\n  if (isArray(val)) {\n    val.forEach((v) => setStyle(style, name, v));\n  } else {\n    if (val == null) val = \"\";\n    if (!!(process.env.NODE_ENV !== \"production\")) {\n      if (semicolonRE.test(val)) {\n        warn(\n          `Unexpected semicolon at the end of '${name}' style value: '${val}'`\n        );\n      }\n    }\n    if (name.startsWith(\"--\")) {\n      style.setProperty(name, val);\n    } else {\n      const prefixed = autoPrefix(style, name);\n      if (importantRE.test(val)) {\n        style.setProperty(\n          hyphenate(prefixed),\n          val.replace(importantRE, \"\"),\n          \"important\"\n        );\n      } else {\n        style[prefixed] = val;\n      }\n    }\n  }\n}\nconst prefixes = [\"Webkit\", \"Moz\", \"ms\"];\nconst prefixCache = {};\nfunction autoPrefix(style, rawName) {\n  const cached = prefixCache[rawName];\n  if (cached) {\n    return cached;\n  }\n  let name = camelize(rawName);\n  if (name !== \"filter\" && name in style) {\n    return prefixCache[rawName] = name;\n  }\n  name = capitalize(name);\n  for (let i = 0; i < prefixes.length; i++) {\n    const prefixed = prefixes[i] + name;\n    if (prefixed in style) {\n      return prefixCache[rawName] = prefixed;\n    }\n  }\n  return rawName;\n}\n\nconst xlinkNS = \"http://www.w3.org/1999/xlink\";\nfunction patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {\n  if (isSVG && key.startsWith(\"xlink:\")) {\n    if (value == null) {\n      el.removeAttributeNS(xlinkNS, key.slice(6, key.length));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (value == null || isBoolean && !includeBooleanAttr(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(\n        key,\n        isBoolean ? \"\" : isSymbol(value) ? String(value) : value\n      );\n    }\n  }\n}\n\nfunction patchDOMProp(el, key, value, parentComponent) {\n  if (key === \"innerHTML\" || key === \"textContent\") {\n    if (value == null) return;\n    el[key] = value;\n    return;\n  }\n  const tag = el.tagName;\n  if (key === \"value\" && tag !== \"PROGRESS\" && // custom elements may use _value internally\n  !tag.includes(\"-\")) {\n    const oldValue = tag === \"OPTION\" ? el.getAttribute(\"value\") || \"\" : el.value;\n    const newValue = value == null ? \"\" : String(value);\n    if (oldValue !== newValue || !(\"_value\" in el)) {\n      el.value = newValue;\n    }\n    if (value == null) {\n      el.removeAttribute(key);\n    }\n    el._value = value;\n    return;\n  }\n  let needRemove = false;\n  if (value === \"\" || value == null) {\n    const type = typeof el[key];\n    if (type === \"boolean\") {\n      value = includeBooleanAttr(value);\n    } else if (value == null && type === \"string\") {\n      value = \"\";\n      needRemove = true;\n    } else if (type === \"number\") {\n      value = 0;\n      needRemove = true;\n    }\n  }\n  try {\n    el[key] = value;\n  } catch (e) {\n    if (!!(process.env.NODE_ENV !== \"production\") && !needRemove) {\n      warn(\n        `Failed setting prop \"${key}\" on <${tag.toLowerCase()}>: value ${value} is invalid.`,\n        e\n      );\n    }\n  }\n  needRemove && el.removeAttribute(key);\n}\n\nfunction addEventListener(el, event, handler, options) {\n  el.addEventListener(event, handler, options);\n}\nfunction removeEventListener(el, event, handler, options) {\n  el.removeEventListener(event, handler, options);\n}\nconst veiKey = Symbol(\"_vei\");\nfunction patchEvent(el, rawName, prevValue, nextValue, instance = null) {\n  const invokers = el[veiKey] || (el[veiKey] = {});\n  const existingInvoker = invokers[rawName];\n  if (nextValue && existingInvoker) {\n    existingInvoker.value = !!(process.env.NODE_ENV !== \"production\") ? sanitizeEventValue(nextValue, rawName) : nextValue;\n  } else {\n    const [name, options] = parseName(rawName);\n    if (nextValue) {\n      const invoker = invokers[rawName] = createInvoker(\n        !!(process.env.NODE_ENV !== \"production\") ? sanitizeEventValue(nextValue, rawName) : nextValue,\n        instance\n      );\n      addEventListener(el, name, invoker, options);\n    } else if (existingInvoker) {\n      removeEventListener(el, name, existingInvoker, options);\n      invokers[rawName] = void 0;\n    }\n  }\n}\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\nfunction parseName(name) {\n  let options;\n  if (optionsModifierRE.test(name)) {\n    options = {};\n    let m;\n    while (m = name.match(optionsModifierRE)) {\n      name = name.slice(0, name.length - m[0].length);\n      options[m[0].toLowerCase()] = true;\n    }\n  }\n  const event = name[2] === \":\" ? name.slice(3) : hyphenate(name.slice(2));\n  return [event, options];\n}\nlet cachedNow = 0;\nconst p = /* @__PURE__ */ Promise.resolve();\nconst getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());\nfunction createInvoker(initialValue, instance) {\n  const invoker = (e) => {\n    if (!e._vts) {\n      e._vts = Date.now();\n    } else if (e._vts <= invoker.attached) {\n      return;\n    }\n    callWithAsyncErrorHandling(\n      patchStopImmediatePropagation(e, invoker.value),\n      instance,\n      5,\n      [e]\n    );\n  };\n  invoker.value = initialValue;\n  invoker.attached = getNow();\n  return invoker;\n}\nfunction sanitizeEventValue(value, propName) {\n  if (isFunction(value) || isArray(value)) {\n    return value;\n  }\n  warn(\n    `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`\n  );\n  return NOOP;\n}\nfunction patchStopImmediatePropagation(e, value) {\n  if (isArray(value)) {\n    const originalStop = e.stopImmediatePropagation;\n    e.stopImmediatePropagation = () => {\n      originalStop.call(e);\n      e._stopped = true;\n    };\n    return value.map(\n      (fn) => (e2) => !e2._stopped && fn && fn(e2)\n    );\n  } else {\n    return value;\n  }\n}\n\nconst isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter\nkey.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;\nconst patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {\n  const isSVG = namespace === \"svg\";\n  if (key === \"class\") {\n    patchClass(el, nextValue, isSVG);\n  } else if (key === \"style\") {\n    patchStyle(el, prevValue, nextValue);\n  } else if (isOn(key)) {\n    if (!isModelListener(key)) {\n      patchEvent(el, key, prevValue, nextValue, parentComponent);\n    }\n  } else if (key[0] === \".\" ? (key = key.slice(1), true) : key[0] === \"^\" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {\n    patchDOMProp(el, key, nextValue);\n    if (!el.tagName.includes(\"-\") && (key === \"value\" || key === \"checked\" || key === \"selected\")) {\n      patchAttr(el, key, nextValue, isSVG, parentComponent, key !== \"value\");\n    }\n  } else {\n    if (key === \"true-value\") {\n      el._trueValue = nextValue;\n    } else if (key === \"false-value\") {\n      el._falseValue = nextValue;\n    }\n    patchAttr(el, key, nextValue, isSVG);\n  }\n};\nfunction shouldSetAsProp(el, key, value, isSVG) {\n  if (isSVG) {\n    if (key === \"innerHTML\" || key === \"textContent\") {\n      return true;\n    }\n    if (key in el && isNativeOn(key) && isFunction(value)) {\n      return true;\n    }\n    return false;\n  }\n  if (key === \"spellcheck\" || key === \"draggable\" || key === \"translate\") {\n    return false;\n  }\n  if (key === \"form\") {\n    return false;\n  }\n  if (key === \"list\" && el.tagName === \"INPUT\") {\n    return false;\n  }\n  if (key === \"type\" && el.tagName === \"TEXTAREA\") {\n    return false;\n  }\n  if (key === \"width\" || key === \"height\") {\n    const tag = el.tagName;\n    if (tag === \"IMG\" || tag === \"VIDEO\" || tag === \"CANVAS\" || tag === \"SOURCE\") {\n      return false;\n    }\n  }\n  if (isNativeOn(key) && isString(value)) {\n    return false;\n  }\n  return key in el;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineCustomElement(options, extraOptions, hydrate2) {\n  const Comp = defineComponent(options, extraOptions);\n  class VueCustomElement extends VueElement {\n    constructor(initialProps) {\n      super(Comp, initialProps, hydrate2);\n    }\n  }\n  VueCustomElement.def = Comp;\n  return VueCustomElement;\n}\n/*! #__NO_SIDE_EFFECTS__ */\nconst defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {\n  return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate);\n};\nconst BaseClass = typeof HTMLElement !== \"undefined\" ? HTMLElement : class {\n};\nclass VueElement extends BaseClass {\n  constructor(_def, _props = {}, hydrate2) {\n    super();\n    this._def = _def;\n    this._props = _props;\n    /**\n     * @internal\n     */\n    this._instance = null;\n    this._connected = false;\n    this._resolved = false;\n    this._numberProps = null;\n    this._ob = null;\n    if (this.shadowRoot && hydrate2) {\n      hydrate2(this._createVNode(), this.shadowRoot);\n    } else {\n      if (!!(process.env.NODE_ENV !== \"production\") && this.shadowRoot) {\n        warn(\n          `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \\`defineSSRCustomElement\\`.`\n        );\n      }\n      this.attachShadow({ mode: \"open\" });\n      if (!this._def.__asyncLoader) {\n        this._resolveProps(this._def);\n      }\n    }\n  }\n  connectedCallback() {\n    this._connected = true;\n    if (!this._instance) {\n      if (this._resolved) {\n        this._update();\n      } else {\n        this._resolveDef();\n      }\n    }\n  }\n  disconnectedCallback() {\n    this._connected = false;\n    nextTick(() => {\n      if (!this._connected) {\n        if (this._ob) {\n          this._ob.disconnect();\n          this._ob = null;\n        }\n        render(null, this.shadowRoot);\n        this._instance = null;\n      }\n    });\n  }\n  /**\n   * resolve inner component definition (handle possible async component)\n   */\n  _resolveDef() {\n    this._resolved = true;\n    for (let i = 0; i < this.attributes.length; i++) {\n      this._setAttr(this.attributes[i].name);\n    }\n    this._ob = new MutationObserver((mutations) => {\n      for (const m of mutations) {\n        this._setAttr(m.attributeName);\n      }\n    });\n    this._ob.observe(this, { attributes: true });\n    const resolve = (def, isAsync = false) => {\n      const { props, styles } = def;\n      let numberProps;\n      if (props && !isArray(props)) {\n        for (const key in props) {\n          const opt = props[key];\n          if (opt === Number || opt && opt.type === Number) {\n            if (key in this._props) {\n              this._props[key] = toNumber(this._props[key]);\n            }\n            (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true;\n          }\n        }\n      }\n      this._numberProps = numberProps;\n      if (isAsync) {\n        this._resolveProps(def);\n      }\n      this._applyStyles(styles);\n      this._update();\n    };\n    const asyncDef = this._def.__asyncLoader;\n    if (asyncDef) {\n      asyncDef().then((def) => resolve(def, true));\n    } else {\n      resolve(this._def);\n    }\n  }\n  _resolveProps(def) {\n    const { props } = def;\n    const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});\n    for (const key of Object.keys(this)) {\n      if (key[0] !== \"_\" && declaredPropKeys.includes(key)) {\n        this._setProp(key, this[key], true, false);\n      }\n    }\n    for (const key of declaredPropKeys.map(camelize$1)) {\n      Object.defineProperty(this, key, {\n        get() {\n          return this._getProp(key);\n        },\n        set(val) {\n          this._setProp(key, val);\n        }\n      });\n    }\n  }\n  _setAttr(key) {\n    let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;\n    const camelKey = camelize$1(key);\n    if (this._numberProps && this._numberProps[camelKey]) {\n      value = toNumber(value);\n    }\n    this._setProp(camelKey, value, false);\n  }\n  /**\n   * @internal\n   */\n  _getProp(key) {\n    return this._props[key];\n  }\n  /**\n   * @internal\n   */\n  _setProp(key, val, shouldReflect = true, shouldUpdate = true) {\n    if (val !== this._props[key]) {\n      this._props[key] = val;\n      if (shouldUpdate && this._instance) {\n        this._update();\n      }\n      if (shouldReflect) {\n        if (val === true) {\n          this.setAttribute(hyphenate(key), \"\");\n        } else if (typeof val === \"string\" || typeof val === \"number\") {\n          this.setAttribute(hyphenate(key), val + \"\");\n        } else if (!val) {\n          this.removeAttribute(hyphenate(key));\n        }\n      }\n    }\n  }\n  _update() {\n    render(this._createVNode(), this.shadowRoot);\n  }\n  _createVNode() {\n    const vnode = createVNode(this._def, extend({}, this._props));\n    if (!this._instance) {\n      vnode.ce = (instance) => {\n        this._instance = instance;\n        instance.isCE = true;\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          instance.ceReload = (newStyles) => {\n            if (this._styles) {\n              this._styles.forEach((s) => this.shadowRoot.removeChild(s));\n              this._styles.length = 0;\n            }\n            this._applyStyles(newStyles);\n            this._instance = null;\n            this._update();\n          };\n        }\n        const dispatch = (event, args) => {\n          this.dispatchEvent(\n            new CustomEvent(event, {\n              detail: args\n            })\n          );\n        };\n        instance.emit = (event, ...args) => {\n          dispatch(event, args);\n          if (hyphenate(event) !== event) {\n            dispatch(hyphenate(event), args);\n          }\n        };\n        let parent = this;\n        while (parent = parent && (parent.parentNode || parent.host)) {\n          if (parent instanceof VueElement) {\n            instance.parent = parent._instance;\n            instance.provides = parent._instance.provides;\n            break;\n          }\n        }\n      };\n    }\n    return vnode;\n  }\n  _applyStyles(styles) {\n    if (styles) {\n      styles.forEach((css) => {\n        const s = document.createElement(\"style\");\n        s.textContent = css;\n        this.shadowRoot.appendChild(s);\n        if (!!(process.env.NODE_ENV !== \"production\")) {\n          (this._styles || (this._styles = [])).push(s);\n        }\n      });\n    }\n  }\n}\n\nfunction useCssModule(name = \"$style\") {\n  {\n    const instance = getCurrentInstance();\n    if (!instance) {\n      !!(process.env.NODE_ENV !== \"production\") && warn(`useCssModule must be called inside setup()`);\n      return EMPTY_OBJ;\n    }\n    const modules = instance.type.__cssModules;\n    if (!modules) {\n      !!(process.env.NODE_ENV !== \"production\") && warn(`Current instance does not have CSS modules injected.`);\n      return EMPTY_OBJ;\n    }\n    const mod = modules[name];\n    if (!mod) {\n      !!(process.env.NODE_ENV !== \"production\") && warn(`Current instance does not have CSS module named \"${name}\".`);\n      return EMPTY_OBJ;\n    }\n    return mod;\n  }\n}\n\nconst positionMap = /* @__PURE__ */ new WeakMap();\nconst newPositionMap = /* @__PURE__ */ new WeakMap();\nconst moveCbKey = Symbol(\"_moveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nconst TransitionGroupImpl = {\n  name: \"TransitionGroup\",\n  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {\n    tag: String,\n    moveClass: String\n  }),\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const state = useTransitionState();\n    let prevChildren;\n    let children;\n    onUpdated(() => {\n      if (!prevChildren.length) {\n        return;\n      }\n      const moveClass = props.moveClass || `${props.name || \"v\"}-move`;\n      if (!hasCSSTransform(\n        prevChildren[0].el,\n        instance.vnode.el,\n        moveClass\n      )) {\n        return;\n      }\n      prevChildren.forEach(callPendingCbs);\n      prevChildren.forEach(recordPosition);\n      const movedChildren = prevChildren.filter(applyTranslation);\n      forceReflow();\n      movedChildren.forEach((c) => {\n        const el = c.el;\n        const style = el.style;\n        addTransitionClass(el, moveClass);\n        style.transform = style.webkitTransform = style.transitionDuration = \"\";\n        const cb = el[moveCbKey] = (e) => {\n          if (e && e.target !== el) {\n            return;\n          }\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(\"transitionend\", cb);\n            el[moveCbKey] = null;\n            removeTransitionClass(el, moveClass);\n          }\n        };\n        el.addEventListener(\"transitionend\", cb);\n      });\n    });\n    return () => {\n      const rawProps = toRaw(props);\n      const cssTransitionProps = resolveTransitionProps(rawProps);\n      let tag = rawProps.tag || Fragment;\n      prevChildren = [];\n      if (children) {\n        for (let i = 0; i < children.length; i++) {\n          const child = children[i];\n          if (child.el && child.el instanceof Element) {\n            prevChildren.push(child);\n            setTransitionHooks(\n              child,\n              resolveTransitionHooks(\n                child,\n                cssTransitionProps,\n                state,\n                instance\n              )\n            );\n            positionMap.set(\n              child,\n              child.el.getBoundingClientRect()\n            );\n          }\n        }\n      }\n      children = slots.default ? getTransitionRawChildren(slots.default()) : [];\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        if (child.key != null) {\n          setTransitionHooks(\n            child,\n            resolveTransitionHooks(child, cssTransitionProps, state, instance)\n          );\n        } else if (!!(process.env.NODE_ENV !== \"production\")) {\n          warn(`<TransitionGroup> children must be keyed.`);\n        }\n      }\n      return createVNode(tag, null, children);\n    };\n  }\n};\nconst removeMode = (props) => delete props.mode;\n/* @__PURE__ */ removeMode(TransitionGroupImpl.props);\nconst TransitionGroup = TransitionGroupImpl;\nfunction callPendingCbs(c) {\n  const el = c.el;\n  if (el[moveCbKey]) {\n    el[moveCbKey]();\n  }\n  if (el[enterCbKey]) {\n    el[enterCbKey]();\n  }\n}\nfunction recordPosition(c) {\n  newPositionMap.set(c, c.el.getBoundingClientRect());\n}\nfunction applyTranslation(c) {\n  const oldPos = positionMap.get(c);\n  const newPos = newPositionMap.get(c);\n  const dx = oldPos.left - newPos.left;\n  const dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    const s = c.el.style;\n    s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;\n    s.transitionDuration = \"0s\";\n    return c;\n  }\n}\nfunction hasCSSTransform(el, root, moveClass) {\n  const clone = el.cloneNode();\n  const _vtc = el[vtcKey];\n  if (_vtc) {\n    _vtc.forEach((cls) => {\n      cls.split(/\\s+/).forEach((c) => c && clone.classList.remove(c));\n    });\n  }\n  moveClass.split(/\\s+/).forEach((c) => c && clone.classList.add(c));\n  clone.style.display = \"none\";\n  const container = root.nodeType === 1 ? root : root.parentNode;\n  container.appendChild(clone);\n  const { hasTransform } = getTransitionInfo(clone);\n  container.removeChild(clone);\n  return hasTransform;\n}\n\nconst getModelAssigner = (vnode) => {\n  const fn = vnode.props[\"onUpdate:modelValue\"] || false;\n  return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;\n};\nfunction onCompositionStart(e) {\n  e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n  const target = e.target;\n  if (target.composing) {\n    target.composing = false;\n    target.dispatchEvent(new Event(\"input\"));\n  }\n}\nconst assignKey = Symbol(\"_assign\");\nconst vModelText = {\n  created(el, { modifiers: { lazy, trim, number } }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    const castToNumber = number || vnode.props && vnode.props.type === \"number\";\n    addEventListener(el, lazy ? \"change\" : \"input\", (e) => {\n      if (e.target.composing) return;\n      let domValue = el.value;\n      if (trim) {\n        domValue = domValue.trim();\n      }\n      if (castToNumber) {\n        domValue = looseToNumber(domValue);\n      }\n      el[assignKey](domValue);\n    });\n    if (trim) {\n      addEventListener(el, \"change\", () => {\n        el.value = el.value.trim();\n      });\n    }\n    if (!lazy) {\n      addEventListener(el, \"compositionstart\", onCompositionStart);\n      addEventListener(el, \"compositionend\", onCompositionEnd);\n      addEventListener(el, \"change\", onCompositionEnd);\n    }\n  },\n  // set value on mounted so it's after min/max for type=\"range\"\n  mounted(el, { value }) {\n    el.value = value == null ? \"\" : value;\n  },\n  beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    if (el.composing) return;\n    const elValue = (number || el.type === \"number\") && !/^0\\d/.test(el.value) ? looseToNumber(el.value) : el.value;\n    const newValue = value == null ? \"\" : value;\n    if (elValue === newValue) {\n      return;\n    }\n    if (document.activeElement === el && el.type !== \"range\") {\n      if (lazy && value === oldValue) {\n        return;\n      }\n      if (trim && el.value.trim() === newValue) {\n        return;\n      }\n    }\n    el.value = newValue;\n  }\n};\nconst vModelCheckbox = {\n  // #4096 array checkboxes need to be deep traversed\n  deep: true,\n  created(el, _, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    addEventListener(el, \"change\", () => {\n      const modelValue = el._modelValue;\n      const elementValue = getValue(el);\n      const checked = el.checked;\n      const assign = el[assignKey];\n      if (isArray(modelValue)) {\n        const index = looseIndexOf(modelValue, elementValue);\n        const found = index !== -1;\n        if (checked && !found) {\n          assign(modelValue.concat(elementValue));\n        } else if (!checked && found) {\n          const filtered = [...modelValue];\n          filtered.splice(index, 1);\n          assign(filtered);\n        }\n      } else if (isSet(modelValue)) {\n        const cloned = new Set(modelValue);\n        if (checked) {\n          cloned.add(elementValue);\n        } else {\n          cloned.delete(elementValue);\n        }\n        assign(cloned);\n      } else {\n        assign(getCheckboxValue(el, checked));\n      }\n    });\n  },\n  // set initial checked on mount to wait for true-value/false-value\n  mounted: setChecked,\n  beforeUpdate(el, binding, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    setChecked(el, binding, vnode);\n  }\n};\nfunction setChecked(el, { value, oldValue }, vnode) {\n  el._modelValue = value;\n  if (isArray(value)) {\n    el.checked = looseIndexOf(value, vnode.props.value) > -1;\n  } else if (isSet(value)) {\n    el.checked = value.has(vnode.props.value);\n  } else if (value !== oldValue) {\n    el.checked = looseEqual(value, getCheckboxValue(el, true));\n  }\n}\nconst vModelRadio = {\n  created(el, { value }, vnode) {\n    el.checked = looseEqual(value, vnode.props.value);\n    el[assignKey] = getModelAssigner(vnode);\n    addEventListener(el, \"change\", () => {\n      el[assignKey](getValue(el));\n    });\n  },\n  beforeUpdate(el, { value, oldValue }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    if (value !== oldValue) {\n      el.checked = looseEqual(value, vnode.props.value);\n    }\n  }\n};\nconst vModelSelect = {\n  // <select multiple> value need to be deep traversed\n  deep: true,\n  created(el, { value, modifiers: { number } }, vnode) {\n    const isSetModel = isSet(value);\n    addEventListener(el, \"change\", () => {\n      const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(\n        (o) => number ? looseToNumber(getValue(o)) : getValue(o)\n      );\n      el[assignKey](\n        el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]\n      );\n      el._assigning = true;\n      nextTick(() => {\n        el._assigning = false;\n      });\n    });\n    el[assignKey] = getModelAssigner(vnode);\n  },\n  // set value in mounted & updated because <select> relies on its children\n  // <option>s.\n  mounted(el, { value, modifiers: { number } }) {\n    setSelected(el, value);\n  },\n  beforeUpdate(el, _binding, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n  },\n  updated(el, { value, modifiers: { number } }) {\n    if (!el._assigning) {\n      setSelected(el, value);\n    }\n  }\n};\nfunction setSelected(el, value, number) {\n  const isMultiple = el.multiple;\n  const isArrayValue = isArray(value);\n  if (isMultiple && !isArrayValue && !isSet(value)) {\n    !!(process.env.NODE_ENV !== \"production\") && warn(\n      `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`\n    );\n    return;\n  }\n  for (let i = 0, l = el.options.length; i < l; i++) {\n    const option = el.options[i];\n    const optionValue = getValue(option);\n    if (isMultiple) {\n      if (isArrayValue) {\n        const optionType = typeof optionValue;\n        if (optionType === \"string\" || optionType === \"number\") {\n          option.selected = value.some((v) => String(v) === String(optionValue));\n        } else {\n          option.selected = looseIndexOf(value, optionValue) > -1;\n        }\n      } else {\n        option.selected = value.has(optionValue);\n      }\n    } else if (looseEqual(getValue(option), value)) {\n      if (el.selectedIndex !== i) el.selectedIndex = i;\n      return;\n    }\n  }\n  if (!isMultiple && el.selectedIndex !== -1) {\n    el.selectedIndex = -1;\n  }\n}\nfunction getValue(el) {\n  return \"_value\" in el ? el._value : el.value;\n}\nfunction getCheckboxValue(el, checked) {\n  const key = checked ? \"_trueValue\" : \"_falseValue\";\n  return key in el ? el[key] : checked;\n}\nconst vModelDynamic = {\n  created(el, binding, vnode) {\n    callModelHook(el, binding, vnode, null, \"created\");\n  },\n  mounted(el, binding, vnode) {\n    callModelHook(el, binding, vnode, null, \"mounted\");\n  },\n  beforeUpdate(el, binding, vnode, prevVNode) {\n    callModelHook(el, binding, vnode, prevVNode, \"beforeUpdate\");\n  },\n  updated(el, binding, vnode, prevVNode) {\n    callModelHook(el, binding, vnode, prevVNode, \"updated\");\n  }\n};\nfunction resolveDynamicModel(tagName, type) {\n  switch (tagName) {\n    case \"SELECT\":\n      return vModelSelect;\n    case \"TEXTAREA\":\n      return vModelText;\n    default:\n      switch (type) {\n        case \"checkbox\":\n          return vModelCheckbox;\n        case \"radio\":\n          return vModelRadio;\n        default:\n          return vModelText;\n      }\n  }\n}\nfunction callModelHook(el, binding, vnode, prevVNode, hook) {\n  const modelToUse = resolveDynamicModel(\n    el.tagName,\n    vnode.props && vnode.props.type\n  );\n  const fn = modelToUse[hook];\n  fn && fn(el, binding, vnode, prevVNode);\n}\nfunction initVModelForSSR() {\n  vModelText.getSSRProps = ({ value }) => ({ value });\n  vModelRadio.getSSRProps = ({ value }, vnode) => {\n    if (vnode.props && looseEqual(vnode.props.value, value)) {\n      return { checked: true };\n    }\n  };\n  vModelCheckbox.getSSRProps = ({ value }, vnode) => {\n    if (isArray(value)) {\n      if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {\n        return { checked: true };\n      }\n    } else if (isSet(value)) {\n      if (vnode.props && value.has(vnode.props.value)) {\n        return { checked: true };\n      }\n    } else if (value) {\n      return { checked: true };\n    }\n  };\n  vModelDynamic.getSSRProps = (binding, vnode) => {\n    if (typeof vnode.type !== \"string\") {\n      return;\n    }\n    const modelToUse = resolveDynamicModel(\n      // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase\n      vnode.type.toUpperCase(),\n      vnode.props && vnode.props.type\n    );\n    if (modelToUse.getSSRProps) {\n      return modelToUse.getSSRProps(binding, vnode);\n    }\n  };\n}\n\nconst systemModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\"];\nconst modifierGuards = {\n  stop: (e) => e.stopPropagation(),\n  prevent: (e) => e.preventDefault(),\n  self: (e) => e.target !== e.currentTarget,\n  ctrl: (e) => !e.ctrlKey,\n  shift: (e) => !e.shiftKey,\n  alt: (e) => !e.altKey,\n  meta: (e) => !e.metaKey,\n  left: (e) => \"button\" in e && e.button !== 0,\n  middle: (e) => \"button\" in e && e.button !== 1,\n  right: (e) => \"button\" in e && e.button !== 2,\n  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))\n};\nconst withModifiers = (fn, modifiers) => {\n  const cache = fn._withMods || (fn._withMods = {});\n  const cacheKey = modifiers.join(\".\");\n  return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {\n    for (let i = 0; i < modifiers.length; i++) {\n      const guard = modifierGuards[modifiers[i]];\n      if (guard && guard(event, modifiers)) return;\n    }\n    return fn(event, ...args);\n  });\n};\nconst keyNames = {\n  esc: \"escape\",\n  space: \" \",\n  up: \"arrow-up\",\n  left: \"arrow-left\",\n  right: \"arrow-right\",\n  down: \"arrow-down\",\n  delete: \"backspace\"\n};\nconst withKeys = (fn, modifiers) => {\n  const cache = fn._withKeys || (fn._withKeys = {});\n  const cacheKey = modifiers.join(\".\");\n  return cache[cacheKey] || (cache[cacheKey] = (event) => {\n    if (!(\"key\" in event)) {\n      return;\n    }\n    const eventKey = hyphenate(event.key);\n    if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {\n      return fn(event);\n    }\n  });\n};\n\nconst rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);\nlet renderer;\nlet enabledHydration = false;\nfunction ensureRenderer() {\n  return renderer || (renderer = createRenderer(rendererOptions));\n}\nfunction ensureHydrationRenderer() {\n  renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);\n  enabledHydration = true;\n  return renderer;\n}\nconst render = (...args) => {\n  ensureRenderer().render(...args);\n};\nconst hydrate = (...args) => {\n  ensureHydrationRenderer().hydrate(...args);\n};\nconst createApp = (...args) => {\n  const app = ensureRenderer().createApp(...args);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    injectNativeTagCheck(app);\n    injectCompilerOptionsCheck(app);\n  }\n  const { mount } = app;\n  app.mount = (containerOrSelector) => {\n    const container = normalizeContainer(containerOrSelector);\n    if (!container) return;\n    const component = app._component;\n    if (!isFunction(component) && !component.render && !component.template) {\n      component.template = container.innerHTML;\n    }\n    container.innerHTML = \"\";\n    const proxy = mount(container, false, resolveRootNamespace(container));\n    if (container instanceof Element) {\n      container.removeAttribute(\"v-cloak\");\n      container.setAttribute(\"data-v-app\", \"\");\n    }\n    return proxy;\n  };\n  return app;\n};\nconst createSSRApp = (...args) => {\n  const app = ensureHydrationRenderer().createApp(...args);\n  if (!!(process.env.NODE_ENV !== \"production\")) {\n    injectNativeTagCheck(app);\n    injectCompilerOptionsCheck(app);\n  }\n  const { mount } = app;\n  app.mount = (containerOrSelector) => {\n    const container = normalizeContainer(containerOrSelector);\n    if (container) {\n      return mount(container, true, resolveRootNamespace(container));\n    }\n  };\n  return app;\n};\nfunction resolveRootNamespace(container) {\n  if (container instanceof SVGElement) {\n    return \"svg\";\n  }\n  if (typeof MathMLElement === \"function\" && container instanceof MathMLElement) {\n    return \"mathml\";\n  }\n}\nfunction injectNativeTagCheck(app) {\n  Object.defineProperty(app.config, \"isNativeTag\", {\n    value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),\n    writable: false\n  });\n}\nfunction injectCompilerOptionsCheck(app) {\n  if (isRuntimeOnly()) {\n    const isCustomElement = app.config.isCustomElement;\n    Object.defineProperty(app.config, \"isCustomElement\", {\n      get() {\n        return isCustomElement;\n      },\n      set() {\n        warn(\n          `The \\`isCustomElement\\` config option is deprecated. Use \\`compilerOptions.isCustomElement\\` instead.`\n        );\n      }\n    });\n    const compilerOptions = app.config.compilerOptions;\n    const msg = `The \\`compilerOptions\\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka \"full build\"). Since you are using the runtime-only build, \\`compilerOptions\\` must be passed to \\`@vue/compiler-dom\\` in the build setup instead.\n- For vue-loader: pass it via vue-loader's \\`compilerOptions\\` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;\n    Object.defineProperty(app.config, \"compilerOptions\", {\n      get() {\n        warn(msg);\n        return compilerOptions;\n      },\n      set() {\n        warn(msg);\n      }\n    });\n  }\n}\nfunction normalizeContainer(container) {\n  if (isString(container)) {\n    const res = document.querySelector(container);\n    if (!!(process.env.NODE_ENV !== \"production\") && !res) {\n      warn(\n        `Failed to mount app: mount target selector \"${container}\" returned null.`\n      );\n    }\n    return res;\n  }\n  if (!!(process.env.NODE_ENV !== \"production\") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === \"closed\") {\n    warn(\n      `mounting on a ShadowRoot with \\`{mode: \"closed\"}\\` may lead to unpredictable bugs`\n    );\n  }\n  return container;\n}\nlet ssrDirectiveInitialized = false;\nconst initDirectivesForSSR = () => {\n  if (!ssrDirectiveInitialized) {\n    ssrDirectiveInitialized = true;\n    initVModelForSSR();\n    initVShowForSSR();\n  }\n} ;\n\nexport { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers };\n","<template>\r\n  <svg :class=\"classes\">\r\n    <title v-if=\"title\">{{ title }}</title>\r\n    <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" :xlink:href=\"href\" />\r\n  </svg>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from \"vue\";\r\n\r\nconst props = defineProps<{\r\n  type: string;\r\n  size?: string;\r\n  title?: string;\r\n}>();\r\n\r\nconst classes = computed(() => {\r\n  const classes = {\r\n    icon: true,\r\n  };\r\n\r\n  if (props.size) {\r\n    classes[`icon--${props.size}`] = true;\r\n  }\r\n\r\n  return classes;\r\n});\r\nconst href = computed(() => {\r\n  return `#sprite-${props.type}`;\r\n});\r\n</script>\r\n","export enum IconSizes {\r\n    Micro = \"micro\",\r\n    Tiny = \"tiny\",\r\n    Mini = \"mini\",\r\n    Small = \"small\",\r\n    Smaller = \"smaller\",\r\n    MiniCartEmpty = \"minicart-empty\",\r\n}\r\n\r\nexport enum IconTypes {\r\n    Search = \"search\",\r\n    Profile = \"profile\",\r\n    Close = \"close\",\r\n    Like = \"like\",\r\n    Bag = \"bag\",\r\n    BagEmpty = \"bag-empty\",\r\n    Heart = \"heart\",\r\n    Trashcan = \"trashcan\",\r\n    Bell = \"bell\",\r\n    Clock = \"clock\",\r\n    SoldoutX = \"product-soldout-x\",\r\n    AvailableCheck = \"product-available-check\",\r\n}\r\n","/*!\n  * vue-router v4.4.3\n  * (c) 2024 Eduardo San Martin Morote\n  * @license MIT\n  */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof document !== 'undefined';\n\nfunction isESModule(obj) {\n    return obj.__esModule || obj[Symbol.toStringTag] === 'Module';\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n    const newParams = {};\n    for (const key in params) {\n        const value = params[key];\n        newParams[key] = isArray(value)\n            ? value.map(fn)\n            : fn(value);\n    }\n    return newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n    // avoid using ...args as it breaks in older Edge builds\n    const args = Array.from(arguments).slice(1);\n    console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (␣ = Space)\n * - Path: ␣ \" < > # ? { }\n * - Query: ␣ \" < > # & =\n * - Hash: ␣ \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n// const EXTRA_RESERVED_RE = /[!'()*]/g\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n    return encodeURI('' + text)\n        .replace(ENC_PIPE_RE, '|')\n        .replace(ENC_BRACKET_OPEN_RE, '[')\n        .replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n    return commonEncode(text)\n        .replace(ENC_CURLY_OPEN_RE, '{')\n        .replace(ENC_CURLY_CLOSE_RE, '}')\n        .replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n    return (commonEncode(text)\n        // Encode the space as +, encode the + to differentiate it from the space\n        .replace(PLUS_RE, '%2B')\n        .replace(ENC_SPACE_RE, '+')\n        .replace(HASH_RE, '%23')\n        .replace(AMPERSAND_RE, '%26')\n        .replace(ENC_BACKTICK_RE, '`')\n        .replace(ENC_CURLY_OPEN_RE, '{')\n        .replace(ENC_CURLY_CLOSE_RE, '}')\n        .replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n    return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n    return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n    return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n    try {\n        return decodeURIComponent('' + text);\n    }\n    catch (err) {\n        (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\n    }\n    return '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n    let path, query = {}, searchString = '', hash = '';\n    // Could use URL and URLSearchParams but IE 11 doesn't support it\n    // TODO: move to new URL()\n    const hashPos = location.indexOf('#');\n    let searchPos = location.indexOf('?');\n    // the hash appears before the search, so it's not part of the search string\n    if (hashPos < searchPos && hashPos >= 0) {\n        searchPos = -1;\n    }\n    if (searchPos > -1) {\n        path = location.slice(0, searchPos);\n        searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n        query = parseQuery(searchString);\n    }\n    if (hashPos > -1) {\n        path = path || location.slice(0, hashPos);\n        // keep the # character\n        hash = location.slice(hashPos, location.length);\n    }\n    // no search and no query\n    path = resolveRelativePath(path != null ? path : location, currentLocation);\n    // empty path means a relative query or hash `?foo=f`, `#thing`\n    return {\n        fullPath: path + (searchString && '?') + searchString + hash,\n        path,\n        query,\n        hash: decode(hash),\n    };\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n    const query = location.query ? stringifyQuery(location.query) : '';\n    return location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n    // no base or base is not found at the beginning\n    if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n        return pathname;\n    return pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n    const aLastIndex = a.matched.length - 1;\n    const bLastIndex = b.matched.length - 1;\n    return (aLastIndex > -1 &&\n        aLastIndex === bLastIndex &&\n        isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n        isSameRouteLocationParams(a.params, b.params) &&\n        stringifyQuery(a.query) === stringifyQuery(b.query) &&\n        a.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n    // since the original record has an undefined value for aliasOf\n    // but all aliases point to the original record, this will always compare\n    // the original record\n    return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n    if (Object.keys(a).length !== Object.keys(b).length)\n        return false;\n    for (const key in a) {\n        if (!isSameRouteLocationParamsValue(a[key], b[key]))\n            return false;\n    }\n    return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n    return isArray(a)\n        ? isEquivalentArray(a, b)\n        : isArray(b)\n            ? isEquivalentArray(b, a)\n            : a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n    return isArray(b)\n        ? a.length === b.length && a.every((value, i) => value === b[i])\n        : a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n    if (to.startsWith('/'))\n        return to;\n    if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\n        warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n        return to;\n    }\n    if (!to)\n        return from;\n    const fromSegments = from.split('/');\n    const toSegments = to.split('/');\n    const lastToSegment = toSegments[toSegments.length - 1];\n    // make . and ./ the same (../ === .., ../../ === ../..)\n    // this is the same behavior as new URL()\n    if (lastToSegment === '..' || lastToSegment === '.') {\n        toSegments.push('');\n    }\n    let position = fromSegments.length - 1;\n    let toPosition;\n    let segment;\n    for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n        segment = toSegments[toPosition];\n        // we stay on the same position\n        if (segment === '.')\n            continue;\n        // go up in the from array\n        if (segment === '..') {\n            // we can't go below zero, but we still need to increment toPosition\n            if (position > 1)\n                position--;\n            // continue\n        }\n        // we reached a non-relative path, we stop here\n        else\n            break;\n    }\n    return (fromSegments.slice(0, position).join('/') +\n        '/' +\n        toSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n *   if (from === START_LOCATION) {\n *     // initial navigation\n *   }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n    path: '/',\n    // TODO: could we use a symbol in the future?\n    name: undefined,\n    params: {},\n    query: {},\n    hash: '',\n    fullPath: '/',\n    matched: [],\n    meta: {},\n    redirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n    NavigationType[\"pop\"] = \"pop\";\n    NavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n    NavigationDirection[\"back\"] = \"back\";\n    NavigationDirection[\"forward\"] = \"forward\";\n    NavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n    if (!base) {\n        if (isBrowser) {\n            // respect <base> tag\n            const baseEl = document.querySelector('base');\n            base = (baseEl && baseEl.getAttribute('href')) || '/';\n            // strip full URL origin\n            base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n        }\n        else {\n            base = '/';\n        }\n    }\n    // ensure leading slash when it was removed by the regex above avoid leading\n    // slash with hash because the file could be read from the disk like file://\n    // and the leading slash would cause problems\n    if (base[0] !== '/' && base[0] !== '#')\n        base = '/' + base;\n    // remove the trailing slash so all other method can just do `base + fullPath`\n    // to build an href\n    return removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n    return base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n    const docRect = document.documentElement.getBoundingClientRect();\n    const elRect = el.getBoundingClientRect();\n    return {\n        behavior: offset.behavior,\n        left: elRect.left - docRect.left - (offset.left || 0),\n        top: elRect.top - docRect.top - (offset.top || 0),\n    };\n}\nconst computeScrollPosition = () => ({\n    left: window.scrollX,\n    top: window.scrollY,\n});\nfunction scrollToPosition(position) {\n    let scrollToOptions;\n    if ('el' in position) {\n        const positionEl = position.el;\n        const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n        /**\n         * `id`s can accept pretty much any characters, including CSS combinators\n         * like `>` or `~`. It's still possible to retrieve elements using\n         * `document.getElementById('~')` but it needs to be escaped when using\n         * `document.querySelector('#\\\\~')` for it to be valid. The only\n         * requirements for `id`s are them to be unique on the page and to not be\n         * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n         * be properly escaped for it to work with `querySelector`. We could check\n         * for the id selector to be simple (no CSS combinators `+ >~`) but that\n         * would make things inconsistent since they are valid characters for an\n         * `id` but would need to be escaped when using `querySelector`, breaking\n         * their usage and ending up in no selector returned. Selectors need to be\n         * escaped:\n         *\n         * - `#1-thing` becomes `#\\31 -thing`\n         * - `#with~symbols` becomes `#with\\\\~symbols`\n         *\n         * - More information about  the topic can be found at\n         *   https://mathiasbynens.be/notes/html5-id-class.\n         * - Practical example: https://mathiasbynens.be/demo/html5-id\n         */\n        if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\n            if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n                try {\n                    const foundEl = document.querySelector(position.el);\n                    if (isIdSelector && foundEl) {\n                        warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n                        // return to avoid other warnings\n                        return;\n                    }\n                }\n                catch (err) {\n                    warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n                    // return to avoid other warnings\n                    return;\n                }\n            }\n        }\n        const el = typeof positionEl === 'string'\n            ? isIdSelector\n                ? document.getElementById(positionEl.slice(1))\n                : document.querySelector(positionEl)\n            : positionEl;\n        if (!el) {\n            (process.env.NODE_ENV !== 'production') &&\n                warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n            return;\n        }\n        scrollToOptions = getElementPosition(el, position);\n    }\n    else {\n        scrollToOptions = position;\n    }\n    if ('scrollBehavior' in document.documentElement.style)\n        window.scrollTo(scrollToOptions);\n    else {\n        window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n    }\n}\nfunction getScrollKey(path, delta) {\n    const position = history.state ? history.state.position - delta : -1;\n    return position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n    scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n    const scroll = scrollPositions.get(key);\n    // consume it so it's not used again\n    scrollPositions.delete(key);\n    return scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {\n//   // returns a scroll position that can be saved in history\n//   compute(): ScrollPositionEntry\n//   // can take an extended ScrollPositionEntry\n//   scroll(position: ScrollPosition): void\n// }\n// export const scrollHandler: ScrollHandler<ScrollPosition> = {\n//   compute: computeScroll,\n//   scroll: scrollToPosition,\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n    const { pathname, search, hash } = location;\n    // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n    const hashPos = base.indexOf('#');\n    if (hashPos > -1) {\n        let slicePos = hash.includes(base.slice(hashPos))\n            ? base.slice(hashPos).length\n            : 1;\n        let pathFromHash = hash.slice(slicePos);\n        // prepend the starting slash to hash so the url starts with /#\n        if (pathFromHash[0] !== '/')\n            pathFromHash = '/' + pathFromHash;\n        return stripBase(pathFromHash, '');\n    }\n    const path = stripBase(pathname, base);\n    return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n    let listeners = [];\n    let teardowns = [];\n    // TODO: should it be a stack? a Dict. Check if the popstate listener\n    // can trigger twice\n    let pauseState = null;\n    const popStateHandler = ({ state, }) => {\n        const to = createCurrentLocation(base, location);\n        const from = currentLocation.value;\n        const fromState = historyState.value;\n        let delta = 0;\n        if (state) {\n            currentLocation.value = to;\n            historyState.value = state;\n            // ignore the popstate and reset the pauseState\n            if (pauseState && pauseState === from) {\n                pauseState = null;\n                return;\n            }\n            delta = fromState ? state.position - fromState.position : 0;\n        }\n        else {\n            replace(to);\n        }\n        // Here we could also revert the navigation by calling history.go(-delta)\n        // this listener will have to be adapted to not trigger again and to wait for the url\n        // to be updated before triggering the listeners. Some kind of validation function would also\n        // need to be passed to the listeners so the navigation can be accepted\n        // call all listeners\n        listeners.forEach(listener => {\n            listener(currentLocation.value, from, {\n                delta,\n                type: NavigationType.pop,\n                direction: delta\n                    ? delta > 0\n                        ? NavigationDirection.forward\n                        : NavigationDirection.back\n                    : NavigationDirection.unknown,\n            });\n        });\n    };\n    function pauseListeners() {\n        pauseState = currentLocation.value;\n    }\n    function listen(callback) {\n        // set up the listener and prepare teardown callbacks\n        listeners.push(callback);\n        const teardown = () => {\n            const index = listeners.indexOf(callback);\n            if (index > -1)\n                listeners.splice(index, 1);\n        };\n        teardowns.push(teardown);\n        return teardown;\n    }\n    function beforeUnloadListener() {\n        const { history } = window;\n        if (!history.state)\n            return;\n        history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n    }\n    function destroy() {\n        for (const teardown of teardowns)\n            teardown();\n        teardowns = [];\n        window.removeEventListener('popstate', popStateHandler);\n        window.removeEventListener('beforeunload', beforeUnloadListener);\n    }\n    // set up the listeners and prepare teardown callbacks\n    window.addEventListener('popstate', popStateHandler);\n    // TODO: could we use 'pagehide' or 'visibilitychange' instead?\n    // https://developer.chrome.com/blog/page-lifecycle-api/\n    window.addEventListener('beforeunload', beforeUnloadListener, {\n        passive: true,\n    });\n    return {\n        pauseListeners,\n        listen,\n        destroy,\n    };\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n    return {\n        back,\n        current,\n        forward,\n        replaced,\n        position: window.history.length,\n        scroll: computeScroll ? computeScrollPosition() : null,\n    };\n}\nfunction useHistoryStateNavigation(base) {\n    const { history, location } = window;\n    // private variables\n    const currentLocation = {\n        value: createCurrentLocation(base, location),\n    };\n    const historyState = { value: history.state };\n    // build current history entry as this is a fresh navigation\n    if (!historyState.value) {\n        changeLocation(currentLocation.value, {\n            back: null,\n            current: currentLocation.value,\n            forward: null,\n            // the length is off by one, we need to decrease it\n            position: history.length - 1,\n            replaced: true,\n            // don't add a scroll as the user may have an anchor, and we want\n            // scrollBehavior to be triggered without a saved position\n            scroll: null,\n        }, true);\n    }\n    function changeLocation(to, state, replace) {\n        /**\n         * if a base tag is provided, and we are on a normal domain, we have to\n         * respect the provided `base` attribute because pushState() will use it and\n         * potentially erase anything before the `#` like at\n         * https://github.com/vuejs/router/issues/685 where a base of\n         * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n         * there is no host, the `<base>` tag makes no sense and if there isn't a\n         * base tag we can just use everything after the `#`.\n         */\n        const hashIndex = base.indexOf('#');\n        const url = hashIndex > -1\n            ? (location.host && document.querySelector('base')\n                ? base\n                : base.slice(hashIndex)) + to\n            : createBaseLocation() + base + to;\n        try {\n            // BROWSER QUIRK\n            // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n            history[replace ? 'replaceState' : 'pushState'](state, '', url);\n            historyState.value = state;\n        }\n        catch (err) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn('Error with push/replace State', err);\n            }\n            else {\n                console.error(err);\n            }\n            // Force the navigation, this also resets the call count\n            location[replace ? 'replace' : 'assign'](url);\n        }\n    }\n    function replace(to, data) {\n        const state = assign({}, history.state, buildState(historyState.value.back, \n        // keep back and forward entries but override current position\n        to, historyState.value.forward, true), data, { position: historyState.value.position });\n        changeLocation(to, state, true);\n        currentLocation.value = to;\n    }\n    function push(to, data) {\n        // Add to current entry the information of where we are going\n        // as well as saving the current position\n        const currentState = assign({}, \n        // use current history state to gracefully handle a wrong call to\n        // history.replaceState\n        // https://github.com/vuejs/router/issues/366\n        historyState.value, history.state, {\n            forward: to,\n            scroll: computeScrollPosition(),\n        });\n        if ((process.env.NODE_ENV !== 'production') && !history.state) {\n            warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n                `history.replaceState(history.state, '', url)\\n\\n` +\n                `You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n        }\n        changeLocation(currentState.current, currentState, true);\n        const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n        changeLocation(to, state, false);\n        currentLocation.value = to;\n    }\n    return {\n        location: currentLocation,\n        state: historyState,\n        push,\n        replace,\n    };\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n    base = normalizeBase(base);\n    const historyNavigation = useHistoryStateNavigation(base);\n    const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n    function go(delta, triggerListeners = true) {\n        if (!triggerListeners)\n            historyListeners.pauseListeners();\n        history.go(delta);\n    }\n    const routerHistory = assign({\n        // it's overridden right after\n        location: '',\n        base,\n        go,\n        createHref: createHref.bind(null, base),\n    }, historyNavigation, historyListeners);\n    Object.defineProperty(routerHistory, 'location', {\n        enumerable: true,\n        get: () => historyNavigation.location.value,\n    });\n    Object.defineProperty(routerHistory, 'state', {\n        enumerable: true,\n        get: () => historyNavigation.state.value,\n    });\n    return routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n    let listeners = [];\n    let queue = [START];\n    let position = 0;\n    base = normalizeBase(base);\n    function setLocation(location) {\n        position++;\n        if (position !== queue.length) {\n            // we are in the middle, we remove everything from here in the queue\n            queue.splice(position);\n        }\n        queue.push(location);\n    }\n    function triggerListeners(to, from, { direction, delta }) {\n        const info = {\n            direction,\n            delta,\n            type: NavigationType.pop,\n        };\n        for (const callback of listeners) {\n            callback(to, from, info);\n        }\n    }\n    const routerHistory = {\n        // rewritten by Object.defineProperty\n        location: START,\n        // TODO: should be kept in queue\n        state: {},\n        base,\n        createHref: createHref.bind(null, base),\n        replace(to) {\n            // remove current entry and decrement position\n            queue.splice(position--, 1);\n            setLocation(to);\n        },\n        push(to, data) {\n            setLocation(to);\n        },\n        listen(callback) {\n            listeners.push(callback);\n            return () => {\n                const index = listeners.indexOf(callback);\n                if (index > -1)\n                    listeners.splice(index, 1);\n            };\n        },\n        destroy() {\n            listeners = [];\n            queue = [START];\n            position = 0;\n        },\n        go(delta, shouldTrigger = true) {\n            const from = this.location;\n            const direction = \n            // we are considering delta === 0 going forward, but in abstract mode\n            // using 0 for the delta doesn't make sense like it does in html5 where\n            // it reloads the page\n            delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n            position = Math.max(0, Math.min(position + delta, queue.length - 1));\n            if (shouldTrigger) {\n                triggerListeners(this.location, from, {\n                    direction,\n                    delta,\n                });\n            }\n        },\n    };\n    Object.defineProperty(routerHistory, 'location', {\n        enumerable: true,\n        get: () => queue[position],\n    });\n    return routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n    // Make sure this implementation is fine in terms of encoding, specially for IE11\n    // for `file://`, directly use the pathname and ignore the base\n    // location.pathname contains an initial `/` even at the root: `https://example.com`\n    base = location.host ? base || location.pathname + location.search : '';\n    // allow the user to provide a `#` in the middle: `/base/#/app`\n    if (!base.includes('#'))\n        base += '#';\n    if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\n        warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n    }\n    return createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n    return typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n    return typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n    /**\n     * An aborted navigation is a navigation that failed because a navigation\n     * guard returned `false` or called `next(false)`\n     */\n    NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n    /**\n     * A cancelled navigation is a navigation that failed because a more recent\n     * navigation finished started (not necessarily finished).\n     */\n    NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n    /**\n     * A duplicated navigation is a navigation that failed because it was\n     * initiated while already being at the exact same location.\n     */\n    NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n    [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n        return `No match for\\n ${JSON.stringify(location)}${currentLocation\n            ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n            : ''}`;\n    },\n    [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n        return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n    },\n    [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n        return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n    },\n    [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n        return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n    },\n    [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n        return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n    },\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n    // keep full error messages in cjs versions\n    if ((process.env.NODE_ENV !== 'production') || !true) {\n        return assign(new Error(ErrorTypeMessages[type](params)), {\n            type,\n            [NavigationFailureSymbol]: true,\n        }, params);\n    }\n    else {\n        return assign(new Error(), {\n            type,\n            [NavigationFailureSymbol]: true,\n        }, params);\n    }\n}\nfunction isNavigationFailure(error, type) {\n    return (error instanceof Error &&\n        NavigationFailureSymbol in error &&\n        (type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n    if (typeof to === 'string')\n        return to;\n    if (to.path != null)\n        return to.path;\n    const location = {};\n    for (const key of propertiesToLog) {\n        if (key in to)\n            location[key] = to[key];\n    }\n    return JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n    sensitive: false,\n    strict: false,\n    start: true,\n    end: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n    const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n    // the amount of scores is the same as the length of segments except for the root segment \"/\"\n    const score = [];\n    // the regexp as a string\n    let pattern = options.start ? '^' : '';\n    // extracted keys\n    const keys = [];\n    for (const segment of segments) {\n        // the root segment needs special treatment\n        const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n        // allow trailing slash\n        if (options.strict && !segment.length)\n            pattern += '/';\n        for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n            const token = segment[tokenIndex];\n            // resets the score if we are inside a sub-segment /:a-other-:b\n            let subSegmentScore = 40 /* PathScore.Segment */ +\n                (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n            if (token.type === 0 /* TokenType.Static */) {\n                // prepend the slash if we are starting a new segment\n                if (!tokenIndex)\n                    pattern += '/';\n                pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n                subSegmentScore += 40 /* PathScore.Static */;\n            }\n            else if (token.type === 1 /* TokenType.Param */) {\n                const { value, repeatable, optional, regexp } = token;\n                keys.push({\n                    name: value,\n                    repeatable,\n                    optional,\n                });\n                const re = regexp ? regexp : BASE_PARAM_PATTERN;\n                // the user provided a custom regexp /:id(\\\\d+)\n                if (re !== BASE_PARAM_PATTERN) {\n                    subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n                    // make sure the regexp is valid before using it\n                    try {\n                        new RegExp(`(${re})`);\n                    }\n                    catch (err) {\n                        throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n                            err.message);\n                    }\n                }\n                // when we repeat we must take care of the repeating leading slash\n                let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n                // prepend the slash if we are starting a new segment\n                if (!tokenIndex)\n                    subPattern =\n                        // avoid an optional / if there are more segments e.g. /:p?-static\n                        // or /:p?-:p2\n                        optional && segment.length < 2\n                            ? `(?:/${subPattern})`\n                            : '/' + subPattern;\n                if (optional)\n                    subPattern += '?';\n                pattern += subPattern;\n                subSegmentScore += 20 /* PathScore.Dynamic */;\n                if (optional)\n                    subSegmentScore += -8 /* PathScore.BonusOptional */;\n                if (repeatable)\n                    subSegmentScore += -20 /* PathScore.BonusRepeatable */;\n                if (re === '.*')\n                    subSegmentScore += -50 /* PathScore.BonusWildcard */;\n            }\n            segmentScores.push(subSegmentScore);\n        }\n        // an empty array like /home/ -> [[{home}], []]\n        // if (!segment.length) pattern += '/'\n        score.push(segmentScores);\n    }\n    // only apply the strict bonus to the last score\n    if (options.strict && options.end) {\n        const i = score.length - 1;\n        score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n    }\n    // TODO: dev only warn double trailing slash\n    if (!options.strict)\n        pattern += '/?';\n    if (options.end)\n        pattern += '$';\n    // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n    else if (options.strict)\n        pattern += '(?:/|$)';\n    const re = new RegExp(pattern, options.sensitive ? '' : 'i');\n    function parse(path) {\n        const match = path.match(re);\n        const params = {};\n        if (!match)\n            return null;\n        for (let i = 1; i < match.length; i++) {\n            const value = match[i] || '';\n            const key = keys[i - 1];\n            params[key.name] = value && key.repeatable ? value.split('/') : value;\n        }\n        return params;\n    }\n    function stringify(params) {\n        let path = '';\n        // for optional parameters to allow to be empty\n        let avoidDuplicatedSlash = false;\n        for (const segment of segments) {\n            if (!avoidDuplicatedSlash || !path.endsWith('/'))\n                path += '/';\n            avoidDuplicatedSlash = false;\n            for (const token of segment) {\n                if (token.type === 0 /* TokenType.Static */) {\n                    path += token.value;\n                }\n                else if (token.type === 1 /* TokenType.Param */) {\n                    const { value, repeatable, optional } = token;\n                    const param = value in params ? params[value] : '';\n                    if (isArray(param) && !repeatable) {\n                        throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n                    }\n                    const text = isArray(param)\n                        ? param.join('/')\n                        : param;\n                    if (!text) {\n                        if (optional) {\n                            // if we have more than one optional param like /:a?-static we don't need to care about the optional param\n                            if (segment.length < 2) {\n                                // remove the last slash as we could be at the end\n                                if (path.endsWith('/'))\n                                    path = path.slice(0, -1);\n                                // do not append a slash on the next iteration\n                                else\n                                    avoidDuplicatedSlash = true;\n                            }\n                        }\n                        else\n                            throw new Error(`Missing required param \"${value}\"`);\n                    }\n                    path += text;\n                }\n            }\n        }\n        // avoid empty path when we have multiple optional params\n        return path || '/';\n    }\n    return {\n        re,\n        score,\n        keys,\n        parse,\n        stringify,\n    };\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n    let i = 0;\n    while (i < a.length && i < b.length) {\n        const diff = b[i] - a[i];\n        // only keep going if diff === 0\n        if (diff)\n            return diff;\n        i++;\n    }\n    // if the last subsegment was Static, the shorter segments should be sorted first\n    // otherwise sort the longest segment first\n    if (a.length < b.length) {\n        return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n            ? -1\n            : 1;\n    }\n    else if (a.length > b.length) {\n        return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n            ? 1\n            : -1;\n    }\n    return 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n    let i = 0;\n    const aScore = a.score;\n    const bScore = b.score;\n    while (i < aScore.length && i < bScore.length) {\n        const comp = compareScoreArray(aScore[i], bScore[i]);\n        // do not return if both are equal\n        if (comp)\n            return comp;\n        i++;\n    }\n    if (Math.abs(bScore.length - aScore.length) === 1) {\n        if (isLastScoreNegative(aScore))\n            return 1;\n        if (isLastScoreNegative(bScore))\n            return -1;\n    }\n    // if a and b share the same score entries but b has more, sort b first\n    return bScore.length - aScore.length;\n    // this is the ternary version\n    // return aScore.length < bScore.length\n    //   ? 1\n    //   : aScore.length > bScore.length\n    //   ? -1\n    //   : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n    const last = score[score.length - 1];\n    return score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n    type: 0 /* TokenType.Static */,\n    value: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map<string, Token[][]>()\nfunction tokenizePath(path) {\n    if (!path)\n        return [[]];\n    if (path === '/')\n        return [[ROOT_TOKEN]];\n    if (!path.startsWith('/')) {\n        throw new Error((process.env.NODE_ENV !== 'production')\n            ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n            : `Invalid path \"${path}\"`);\n    }\n    // if (tokenCache.has(path)) return tokenCache.get(path)!\n    function crash(message) {\n        throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n    }\n    let state = 0 /* TokenizerState.Static */;\n    let previousState = state;\n    const tokens = [];\n    // the segment will always be valid because we get into the initial state\n    // with the leading /\n    let segment;\n    function finalizeSegment() {\n        if (segment)\n            tokens.push(segment);\n        segment = [];\n    }\n    // index on the path\n    let i = 0;\n    // char at index\n    let char;\n    // buffer of the value read\n    let buffer = '';\n    // custom regexp for a param\n    let customRe = '';\n    function consumeBuffer() {\n        if (!buffer)\n            return;\n        if (state === 0 /* TokenizerState.Static */) {\n            segment.push({\n                type: 0 /* TokenType.Static */,\n                value: buffer,\n            });\n        }\n        else if (state === 1 /* TokenizerState.Param */ ||\n            state === 2 /* TokenizerState.ParamRegExp */ ||\n            state === 3 /* TokenizerState.ParamRegExpEnd */) {\n            if (segment.length > 1 && (char === '*' || char === '+'))\n                crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n            segment.push({\n                type: 1 /* TokenType.Param */,\n                value: buffer,\n                regexp: customRe,\n                repeatable: char === '*' || char === '+',\n                optional: char === '*' || char === '?',\n            });\n        }\n        else {\n            crash('Invalid state to consume buffer');\n        }\n        buffer = '';\n    }\n    function addCharToBuffer() {\n        buffer += char;\n    }\n    while (i < path.length) {\n        char = path[i++];\n        if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n            previousState = state;\n            state = 4 /* TokenizerState.EscapeNext */;\n            continue;\n        }\n        switch (state) {\n            case 0 /* TokenizerState.Static */:\n                if (char === '/') {\n                    if (buffer) {\n                        consumeBuffer();\n                    }\n                    finalizeSegment();\n                }\n                else if (char === ':') {\n                    consumeBuffer();\n                    state = 1 /* TokenizerState.Param */;\n                }\n                else {\n                    addCharToBuffer();\n                }\n                break;\n            case 4 /* TokenizerState.EscapeNext */:\n                addCharToBuffer();\n                state = previousState;\n                break;\n            case 1 /* TokenizerState.Param */:\n                if (char === '(') {\n                    state = 2 /* TokenizerState.ParamRegExp */;\n                }\n                else if (VALID_PARAM_RE.test(char)) {\n                    addCharToBuffer();\n                }\n                else {\n                    consumeBuffer();\n                    state = 0 /* TokenizerState.Static */;\n                    // go back one character if we were not modifying\n                    if (char !== '*' && char !== '?' && char !== '+')\n                        i--;\n                }\n                break;\n            case 2 /* TokenizerState.ParamRegExp */:\n                // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n                // it already works by escaping the closing )\n                // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n                // is this really something people need since you can also write\n                // /prefix_:p()_suffix\n                if (char === ')') {\n                    // handle the escaped )\n                    if (customRe[customRe.length - 1] == '\\\\')\n                        customRe = customRe.slice(0, -1) + char;\n                    else\n                        state = 3 /* TokenizerState.ParamRegExpEnd */;\n                }\n                else {\n                    customRe += char;\n                }\n                break;\n            case 3 /* TokenizerState.ParamRegExpEnd */:\n                // same as finalizing a param\n                consumeBuffer();\n                state = 0 /* TokenizerState.Static */;\n                // go back one character if we were not modifying\n                if (char !== '*' && char !== '?' && char !== '+')\n                    i--;\n                customRe = '';\n                break;\n            default:\n                crash('Unknown state');\n                break;\n        }\n    }\n    if (state === 2 /* TokenizerState.ParamRegExp */)\n        crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n    consumeBuffer();\n    finalizeSegment();\n    // tokenCache.set(path, tokens)\n    return tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n    const parser = tokensToParser(tokenizePath(record.path), options);\n    // warn against params with the same name\n    if ((process.env.NODE_ENV !== 'production')) {\n        const existingKeys = new Set();\n        for (const key of parser.keys) {\n            if (existingKeys.has(key.name))\n                warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n            existingKeys.add(key.name);\n        }\n    }\n    const matcher = assign(parser, {\n        record,\n        parent,\n        // these needs to be populated by the parent\n        children: [],\n        alias: [],\n    });\n    if (parent) {\n        // both are aliases or both are not aliases\n        // we don't want to mix them because the order is used when\n        // passing originalRecord in Matcher.addRoute\n        if (!matcher.record.aliasOf === !parent.record.aliasOf)\n            parent.children.push(matcher);\n    }\n    return matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n    // normalized ordered array of matchers\n    const matchers = [];\n    const matcherMap = new Map();\n    globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n    function getRecordMatcher(name) {\n        return matcherMap.get(name);\n    }\n    function addRoute(record, parent, originalRecord) {\n        // used later on to remove by name\n        const isRootAdd = !originalRecord;\n        const mainNormalizedRecord = normalizeRouteRecord(record);\n        if ((process.env.NODE_ENV !== 'production')) {\n            checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n        }\n        // we might be the child of an alias\n        mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n        const options = mergeOptions(globalOptions, record);\n        // generate an array of records to correctly handle aliases\n        const normalizedRecords = [\n            mainNormalizedRecord,\n        ];\n        if ('alias' in record) {\n            const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n            for (const alias of aliases) {\n                normalizedRecords.push(assign({}, mainNormalizedRecord, {\n                    // this allows us to hold a copy of the `components` option\n                    // so that async components cache is hold on the original record\n                    components: originalRecord\n                        ? originalRecord.record.components\n                        : mainNormalizedRecord.components,\n                    path: alias,\n                    // we might be the child of an alias\n                    aliasOf: originalRecord\n                        ? originalRecord.record\n                        : mainNormalizedRecord,\n                    // the aliases are always of the same kind as the original since they\n                    // are defined on the same record\n                }));\n            }\n        }\n        let matcher;\n        let originalMatcher;\n        for (const normalizedRecord of normalizedRecords) {\n            const { path } = normalizedRecord;\n            // Build up the path for nested routes if the child isn't an absolute\n            // route. Only add the / delimiter if the child path isn't empty and if the\n            // parent path doesn't have a trailing slash\n            if (parent && path[0] !== '/') {\n                const parentPath = parent.record.path;\n                const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n                normalizedRecord.path =\n                    parent.record.path + (path && connectingSlash + path);\n            }\n            if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\n                throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n                    'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n            }\n            // create the object beforehand, so it can be passed to children\n            matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n            if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\n                checkMissingParamsInAbsolutePath(matcher, parent);\n            // if we are an alias we must tell the original record that we exist,\n            // so we can be removed\n            if (originalRecord) {\n                originalRecord.alias.push(matcher);\n                if ((process.env.NODE_ENV !== 'production')) {\n                    checkSameParams(originalRecord, matcher);\n                }\n            }\n            else {\n                // otherwise, the first record is the original and others are aliases\n                originalMatcher = originalMatcher || matcher;\n                if (originalMatcher !== matcher)\n                    originalMatcher.alias.push(matcher);\n                // remove the route if named and only for the top record (avoid in nested calls)\n                // this works because the original record is the first one\n                if (isRootAdd && record.name && !isAliasRecord(matcher))\n                    removeRoute(record.name);\n            }\n            // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n            // not be reached and pass through the catch all route\n            if (isMatchable(matcher)) {\n                insertMatcher(matcher);\n            }\n            if (mainNormalizedRecord.children) {\n                const children = mainNormalizedRecord.children;\n                for (let i = 0; i < children.length; i++) {\n                    addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n                }\n            }\n            // if there was no original record, then the first one was not an alias and all\n            // other aliases (if any) need to reference this record when adding children\n            originalRecord = originalRecord || matcher;\n            // TODO: add normalized records for more flexibility\n            // if (parent && isAliasRecord(originalRecord)) {\n            //   parent.children.push(originalRecord)\n            // }\n        }\n        return originalMatcher\n            ? () => {\n                // since other matchers are aliases, they should be removed by the original matcher\n                removeRoute(originalMatcher);\n            }\n            : noop;\n    }\n    function removeRoute(matcherRef) {\n        if (isRouteName(matcherRef)) {\n            const matcher = matcherMap.get(matcherRef);\n            if (matcher) {\n                matcherMap.delete(matcherRef);\n                matchers.splice(matchers.indexOf(matcher), 1);\n                matcher.children.forEach(removeRoute);\n                matcher.alias.forEach(removeRoute);\n            }\n        }\n        else {\n            const index = matchers.indexOf(matcherRef);\n            if (index > -1) {\n                matchers.splice(index, 1);\n                if (matcherRef.record.name)\n                    matcherMap.delete(matcherRef.record.name);\n                matcherRef.children.forEach(removeRoute);\n                matcherRef.alias.forEach(removeRoute);\n            }\n        }\n    }\n    function getRoutes() {\n        return matchers;\n    }\n    function insertMatcher(matcher) {\n        const index = findInsertionIndex(matcher, matchers);\n        matchers.splice(index, 0, matcher);\n        // only add the original record to the name map\n        if (matcher.record.name && !isAliasRecord(matcher))\n            matcherMap.set(matcher.record.name, matcher);\n    }\n    function resolve(location, currentLocation) {\n        let matcher;\n        let params = {};\n        let path;\n        let name;\n        if ('name' in location && location.name) {\n            matcher = matcherMap.get(location.name);\n            if (!matcher)\n                throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n                    location,\n                });\n            // warn if the user is passing invalid params so they can debug it better when they get removed\n            if ((process.env.NODE_ENV !== 'production')) {\n                const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n                if (invalidParams.length) {\n                    warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n                }\n            }\n            name = matcher.record.name;\n            params = assign(\n            // paramsFromLocation is a new object\n            paramsFromLocation(currentLocation.params, \n            // only keep params that exist in the resolved location\n            // only keep optional params coming from a parent record\n            matcher.keys\n                .filter(k => !k.optional)\n                .concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n                .map(k => k.name)), \n            // discard any existing params in the current location that do not exist here\n            // #1497 this ensures better active/exact matching\n            location.params &&\n                paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\n            // throws if cannot be stringified\n            path = matcher.stringify(params);\n        }\n        else if (location.path != null) {\n            // no need to resolve the path with the matcher as it was provided\n            // this also allows the user to control the encoding\n            path = location.path;\n            if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\n                warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n            }\n            matcher = matchers.find(m => m.re.test(path));\n            // matcher should have a value after the loop\n            if (matcher) {\n                // we know the matcher works because we tested the regexp\n                params = matcher.parse(path);\n                name = matcher.record.name;\n            }\n            // location is a relative path\n        }\n        else {\n            // match by name or path of current route\n            matcher = currentLocation.name\n                ? matcherMap.get(currentLocation.name)\n                : matchers.find(m => m.re.test(currentLocation.path));\n            if (!matcher)\n                throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n                    location,\n                    currentLocation,\n                });\n            name = matcher.record.name;\n            // since we are navigating to the same location, we don't need to pick the\n            // params like when `name` is provided\n            params = assign({}, currentLocation.params, location.params);\n            path = matcher.stringify(params);\n        }\n        const matched = [];\n        let parentMatcher = matcher;\n        while (parentMatcher) {\n            // reversed order so parents are at the beginning\n            matched.unshift(parentMatcher.record);\n            parentMatcher = parentMatcher.parent;\n        }\n        return {\n            name,\n            path,\n            params,\n            matched,\n            meta: mergeMetaFields(matched),\n        };\n    }\n    // add initial routes\n    routes.forEach(route => addRoute(route));\n    function clearRoutes() {\n        matchers.length = 0;\n        matcherMap.clear();\n    }\n    return {\n        addRoute,\n        resolve,\n        removeRoute,\n        clearRoutes,\n        getRoutes,\n        getRecordMatcher,\n    };\n}\nfunction paramsFromLocation(params, keys) {\n    const newParams = {};\n    for (const key of keys) {\n        if (key in params)\n            newParams[key] = params[key];\n    }\n    return newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n    return {\n        path: record.path,\n        redirect: record.redirect,\n        name: record.name,\n        meta: record.meta || {},\n        aliasOf: undefined,\n        beforeEnter: record.beforeEnter,\n        props: normalizeRecordProps(record),\n        children: record.children || [],\n        instances: {},\n        leaveGuards: new Set(),\n        updateGuards: new Set(),\n        enterCallbacks: {},\n        components: 'components' in record\n            ? record.components || null\n            : record.component && { default: record.component },\n    };\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n    const propsObject = {};\n    // props does not exist on redirect records, but we can set false directly\n    const props = record.props || false;\n    if ('component' in record) {\n        propsObject.default = props;\n    }\n    else {\n        // NOTE: we could also allow a function to be applied to every component.\n        // Would need user feedback for use cases\n        for (const name in record.components)\n            propsObject[name] = typeof props === 'object' ? props[name] : props;\n    }\n    return propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n    while (record) {\n        if (record.record.aliasOf)\n            return true;\n        record = record.parent;\n    }\n    return false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n    return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n    const options = {};\n    for (const key in defaults) {\n        options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n    }\n    return options;\n}\nfunction isSameParam(a, b) {\n    return (a.name === b.name &&\n        a.optional === b.optional &&\n        a.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n    for (const key of a.keys) {\n        if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n            return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n    }\n    for (const key of b.keys) {\n        if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n            return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n    }\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n    if (parent &&\n        parent.record.name &&\n        !mainNormalizedRecord.name &&\n        !mainNormalizedRecord.path) {\n        warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n    }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n    for (const key of parent.keys) {\n        if (!record.keys.find(isSameParam.bind(null, key)))\n            return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n    }\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n    // First phase: binary search based on score\n    let lower = 0;\n    let upper = matchers.length;\n    while (lower !== upper) {\n        const mid = (lower + upper) >> 1;\n        const sortOrder = comparePathParserScore(matcher, matchers[mid]);\n        if (sortOrder < 0) {\n            upper = mid;\n        }\n        else {\n            lower = mid + 1;\n        }\n    }\n    // Second phase: check for an ancestor with the same score\n    const insertionAncestor = getInsertionAncestor(matcher);\n    if (insertionAncestor) {\n        upper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n        if ((process.env.NODE_ENV !== 'production') && upper < 0) {\n            // This should never happen\n            warn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n        }\n    }\n    return upper;\n}\nfunction getInsertionAncestor(matcher) {\n    let ancestor = matcher;\n    while ((ancestor = ancestor.parent)) {\n        if (isMatchable(ancestor) &&\n            comparePathParserScore(matcher, ancestor) === 0) {\n            return ancestor;\n        }\n    }\n    return;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n    return !!(record.name ||\n        (record.components && Object.keys(record.components).length) ||\n        record.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n    const query = {};\n    // avoid creating an object with an empty key and empty value\n    // because of split('&')\n    if (search === '' || search === '?')\n        return query;\n    const hasLeadingIM = search[0] === '?';\n    const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n    for (let i = 0; i < searchParams.length; ++i) {\n        // pre decode the + into space\n        const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n        // allow the = character\n        const eqPos = searchParam.indexOf('=');\n        const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n        const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n        if (key in query) {\n            // an extra variable for ts types\n            let currentValue = query[key];\n            if (!isArray(currentValue)) {\n                currentValue = query[key] = [currentValue];\n            }\n            currentValue.push(value);\n        }\n        else {\n            query[key] = value;\n        }\n    }\n    return query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n    let search = '';\n    for (let key in query) {\n        const value = query[key];\n        key = encodeQueryKey(key);\n        if (value == null) {\n            // only null adds the value\n            if (value !== undefined) {\n                search += (search.length ? '&' : '') + key;\n            }\n            continue;\n        }\n        // keep null values\n        const values = isArray(value)\n            ? value.map(v => v && encodeQueryValue(v))\n            : [value && encodeQueryValue(value)];\n        values.forEach(value => {\n            // skip undefined values in arrays as if they were not present\n            // smaller code than using filter\n            if (value !== undefined) {\n                // only append & with non-empty search\n                search += (search.length ? '&' : '') + key;\n                if (value != null)\n                    search += '=' + value;\n            }\n        });\n    }\n    return search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n    const normalizedQuery = {};\n    for (const key in query) {\n        const value = query[key];\n        if (value !== undefined) {\n            normalizedQuery[key] = isArray(value)\n                ? value.map(v => (v == null ? null : '' + v))\n                : value == null\n                    ? value\n                    : '' + value;\n        }\n    }\n    return normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n    let handlers = [];\n    function add(handler) {\n        handlers.push(handler);\n        return () => {\n            const i = handlers.indexOf(handler);\n            if (i > -1)\n                handlers.splice(i, 1);\n        };\n    }\n    function reset() {\n        handlers = [];\n    }\n    return {\n        add,\n        list: () => handlers.slice(),\n        reset,\n    };\n}\n\nfunction registerGuard(record, name, guard) {\n    const removeFromList = () => {\n        record[name].delete(guard);\n    };\n    onUnmounted(removeFromList);\n    onDeactivated(removeFromList);\n    onActivated(() => {\n        record[name].add(guard);\n    });\n    record[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n    if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n        warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n        return;\n    }\n    const activeRecord = inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\n        (process.env.NODE_ENV !== 'production') &&\n            warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n        return;\n    }\n    registerGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n    if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n        warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n        return;\n    }\n    const activeRecord = inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\n        (process.env.NODE_ENV !== 'production') &&\n            warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n        return;\n    }\n    registerGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n    // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n    const enterCallbackArray = record &&\n        // name is defined if record is because of the function overload\n        (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n    return () => new Promise((resolve, reject) => {\n        const next = (valid) => {\n            if (valid === false) {\n                reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n                    from,\n                    to,\n                }));\n            }\n            else if (valid instanceof Error) {\n                reject(valid);\n            }\n            else if (isRouteLocation(valid)) {\n                reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n                    from: to,\n                    to: valid,\n                }));\n            }\n            else {\n                if (enterCallbackArray &&\n                    // since enterCallbackArray is truthy, both record and name also are\n                    record.enterCallbacks[name] === enterCallbackArray &&\n                    typeof valid === 'function') {\n                    enterCallbackArray.push(valid);\n                }\n                resolve();\n            }\n        };\n        // wrapping with Promise.resolve allows it to work with both async and sync guards\n        const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next));\n        let guardCall = Promise.resolve(guardReturn);\n        if (guard.length < 3)\n            guardCall = guardCall.then(next);\n        if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\n            const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n            if (typeof guardReturn === 'object' && 'then' in guardReturn) {\n                guardCall = guardCall.then(resolvedValue => {\n                    // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n                    if (!next._called) {\n                        warn(message);\n                        return Promise.reject(new Error('Invalid navigation guard'));\n                    }\n                    return resolvedValue;\n                });\n            }\n            else if (guardReturn !== undefined) {\n                // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n                if (!next._called) {\n                    warn(message);\n                    reject(new Error('Invalid navigation guard'));\n                    return;\n                }\n            }\n        }\n        guardCall.catch(err => reject(err));\n    });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n    let called = 0;\n    return function () {\n        if (called++ === 1)\n            warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n        // @ts-expect-error: we put it in the original one because it's easier to check\n        next._called = true;\n        if (called === 1)\n            next.apply(null, arguments);\n    };\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n    const guards = [];\n    for (const record of matched) {\n        if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\n            warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n                ` or \"children\" property.`);\n        }\n        for (const name in record.components) {\n            let rawComponent = record.components[name];\n            if ((process.env.NODE_ENV !== 'production')) {\n                if (!rawComponent ||\n                    (typeof rawComponent !== 'object' &&\n                        typeof rawComponent !== 'function')) {\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n                        ` a valid component. Received \"${String(rawComponent)}\".`);\n                    // throw to ensure we stop here but warn to ensure the message isn't\n                    // missed by the user\n                    throw new Error('Invalid route component');\n                }\n                else if ('then' in rawComponent) {\n                    // warn if user wrote import('/component.vue') instead of () =>\n                    // import('./component.vue')\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n                        `Promise instead of a function that returns a Promise. Did you ` +\n                        `write \"import('./MyPage.vue')\" instead of ` +\n                        `\"() => import('./MyPage.vue')\" ? This will break in ` +\n                        `production if not fixed.`);\n                    const promise = rawComponent;\n                    rawComponent = () => promise;\n                }\n                else if (rawComponent.__asyncLoader &&\n                    // warn only once per component\n                    !rawComponent.__warnedDefineAsync) {\n                    rawComponent.__warnedDefineAsync = true;\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n                        `using \"defineAsyncComponent()\". ` +\n                        `Write \"() => import('./MyPage.vue')\" instead of ` +\n                        `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n                }\n            }\n            // skip update and leave guards if the route component is not mounted\n            if (guardType !== 'beforeRouteEnter' && !record.instances[name])\n                continue;\n            if (isRouteComponent(rawComponent)) {\n                // __vccOpts is added by vue-class-component and contain the regular options\n                const options = rawComponent.__vccOpts || rawComponent;\n                const guard = options[guardType];\n                guard &&\n                    guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n            }\n            else {\n                // start requesting the chunk already\n                let componentPromise = rawComponent();\n                if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\n                    warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n                    componentPromise = Promise.resolve(componentPromise);\n                }\n                guards.push(() => componentPromise.then(resolved => {\n                    if (!resolved)\n                        return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n                    const resolvedComponent = isESModule(resolved)\n                        ? resolved.default\n                        : resolved;\n                    // replace the function with the resolved component\n                    // cannot be null or undefined because we went into the for loop\n                    record.components[name] = resolvedComponent;\n                    // __vccOpts is added by vue-class-component and contain the regular options\n                    const options = resolvedComponent.__vccOpts || resolvedComponent;\n                    const guard = options[guardType];\n                    return (guard &&\n                        guardToPromiseFn(guard, to, from, record, name, runWithContext)());\n                }));\n            }\n        }\n    }\n    return guards;\n}\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n    return (typeof component === 'object' ||\n        'displayName' in component ||\n        'props' in component ||\n        '__vccOpts' in component);\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n    return route.matched.every(record => record.redirect)\n        ? Promise.reject(new Error('Cannot load a route that redirects.'))\n        : Promise.all(route.matched.map(record => record.components &&\n            Promise.all(Object.keys(record.components).reduce((promises, name) => {\n                const rawComponent = record.components[name];\n                if (typeof rawComponent === 'function' &&\n                    !('displayName' in rawComponent)) {\n                    promises.push(rawComponent().then(resolved => {\n                        if (!resolved)\n                            return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n                        const resolvedComponent = isESModule(resolved)\n                            ? resolved.default\n                            : resolved;\n                        // replace the function with the resolved component\n                        // cannot be null or undefined because we went into the for loop\n                        record.components[name] = resolvedComponent;\n                        return;\n                    }));\n                }\n                return promises;\n            }, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n    const router = inject(routerKey);\n    const currentRoute = inject(routeLocationKey);\n    let hasPrevious = false;\n    let previousTo = null;\n    const route = computed(() => {\n        const to = unref(props.to);\n        if ((process.env.NODE_ENV !== 'production') && (!hasPrevious || to !== previousTo)) {\n            if (!isRouteLocation(to)) {\n                if (hasPrevious) {\n                    warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n                }\n                else {\n                    warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n                }\n            }\n            previousTo = to;\n            hasPrevious = true;\n        }\n        return router.resolve(to);\n    });\n    const activeRecordIndex = computed(() => {\n        const { matched } = route.value;\n        const { length } = matched;\n        const routeMatched = matched[length - 1];\n        const currentMatched = currentRoute.matched;\n        if (!routeMatched || !currentMatched.length)\n            return -1;\n        const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n        if (index > -1)\n            return index;\n        // possible parent record\n        const parentRecordPath = getOriginalPath(matched[length - 2]);\n        return (\n        // we are dealing with nested routes\n        length > 1 &&\n            // if the parent and matched route have the same path, this link is\n            // referring to the empty child. Or we currently are on a different\n            // child of the same parent\n            getOriginalPath(routeMatched) === parentRecordPath &&\n            // avoid comparing the child with its parent\n            currentMatched[currentMatched.length - 1].path !== parentRecordPath\n            ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n            : index);\n    });\n    const isActive = computed(() => activeRecordIndex.value > -1 &&\n        includesParams(currentRoute.params, route.value.params));\n    const isExactActive = computed(() => activeRecordIndex.value > -1 &&\n        activeRecordIndex.value === currentRoute.matched.length - 1 &&\n        isSameRouteLocationParams(currentRoute.params, route.value.params));\n    function navigate(e = {}) {\n        if (guardEvent(e)) {\n            return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n            // avoid uncaught errors are they are logged anyway\n            ).catch(noop);\n        }\n        return Promise.resolve();\n    }\n    // devtools only\n    if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n        const instance = getCurrentInstance();\n        if (instance) {\n            const linkContextDevtools = {\n                route: route.value,\n                isActive: isActive.value,\n                isExactActive: isExactActive.value,\n                error: null,\n            };\n            // @ts-expect-error: this is internal\n            instance.__vrl_devtools = instance.__vrl_devtools || [];\n            // @ts-expect-error: this is internal\n            instance.__vrl_devtools.push(linkContextDevtools);\n            watchEffect(() => {\n                linkContextDevtools.route = route.value;\n                linkContextDevtools.isActive = isActive.value;\n                linkContextDevtools.isExactActive = isExactActive.value;\n                linkContextDevtools.error = isRouteLocation(unref(props.to))\n                    ? null\n                    : 'Invalid \"to\" value';\n            }, { flush: 'post' });\n        }\n    }\n    /**\n     * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n     */\n    return {\n        route,\n        href: computed(() => route.value.href),\n        isActive,\n        isExactActive,\n        navigate,\n    };\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n    name: 'RouterLink',\n    compatConfig: { MODE: 3 },\n    props: {\n        to: {\n            type: [String, Object],\n            required: true,\n        },\n        replace: Boolean,\n        activeClass: String,\n        // inactiveClass: String,\n        exactActiveClass: String,\n        custom: Boolean,\n        ariaCurrentValue: {\n            type: String,\n            default: 'page',\n        },\n    },\n    useLink,\n    setup(props, { slots }) {\n        const link = reactive(useLink(props));\n        const { options } = inject(routerKey);\n        const elClass = computed(() => ({\n            [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n            // [getLinkClass(\n            //   props.inactiveClass,\n            //   options.linkInactiveClass,\n            //   'router-link-inactive'\n            // )]: !link.isExactActive,\n            [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n        }));\n        return () => {\n            const children = slots.default && slots.default(link);\n            return props.custom\n                ? children\n                : h('a', {\n                    'aria-current': link.isExactActive\n                        ? props.ariaCurrentValue\n                        : null,\n                    href: link.href,\n                    // this would override user added attrs but Vue will still add\n                    // the listener, so we end up triggering both\n                    onClick: link.navigate,\n                    class: elClass.value,\n                }, children);\n        };\n    },\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n    // don't redirect with control keys\n    if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n        return;\n    // don't redirect when preventDefault called\n    if (e.defaultPrevented)\n        return;\n    // don't redirect on right click\n    if (e.button !== undefined && e.button !== 0)\n        return;\n    // don't redirect if `target=\"_blank\"`\n    // @ts-expect-error getAttribute does exist\n    if (e.currentTarget && e.currentTarget.getAttribute) {\n        // @ts-expect-error getAttribute exists\n        const target = e.currentTarget.getAttribute('target');\n        if (/\\b_blank\\b/i.test(target))\n            return;\n    }\n    // this may be a Weex event which doesn't have this method\n    if (e.preventDefault)\n        e.preventDefault();\n    return true;\n}\nfunction includesParams(outer, inner) {\n    for (const key in inner) {\n        const innerValue = inner[key];\n        const outerValue = outer[key];\n        if (typeof innerValue === 'string') {\n            if (innerValue !== outerValue)\n                return false;\n        }\n        else {\n            if (!isArray(outerValue) ||\n                outerValue.length !== innerValue.length ||\n                innerValue.some((value, i) => value !== outerValue[i]))\n                return false;\n        }\n    }\n    return true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n    return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n    ? propClass\n    : globalClass != null\n        ? globalClass\n        : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n    name: 'RouterView',\n    // #674 we manually inherit them\n    inheritAttrs: false,\n    props: {\n        name: {\n            type: String,\n            default: 'default',\n        },\n        route: Object,\n    },\n    // Better compat for @vue/compat users\n    // https://github.com/vuejs/router/issues/1315\n    compatConfig: { MODE: 3 },\n    setup(props, { attrs, slots }) {\n        (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\n        const injectedRoute = inject(routerViewLocationKey);\n        const routeToDisplay = computed(() => props.route || injectedRoute.value);\n        const injectedDepth = inject(viewDepthKey, 0);\n        // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n        // that are used to reuse the `path` property\n        const depth = computed(() => {\n            let initialDepth = unref(injectedDepth);\n            const { matched } = routeToDisplay.value;\n            let matchedRoute;\n            while ((matchedRoute = matched[initialDepth]) &&\n                !matchedRoute.components) {\n                initialDepth++;\n            }\n            return initialDepth;\n        });\n        const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n        provide(viewDepthKey, computed(() => depth.value + 1));\n        provide(matchedRouteKey, matchedRouteRef);\n        provide(routerViewLocationKey, routeToDisplay);\n        const viewRef = ref();\n        // watch at the same time the component instance, the route record we are\n        // rendering, and the name\n        watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n            // copy reused instances\n            if (to) {\n                // this will update the instance for new instances as well as reused\n                // instances when navigating to a new route\n                to.instances[name] = instance;\n                // the component instance is reused for a different route or name, so\n                // we copy any saved update or leave guards. With async setup, the\n                // mounting component will mount before the matchedRoute changes,\n                // making instance === oldInstance, so we check if guards have been\n                // added before. This works because we remove guards when\n                // unmounting/deactivating components\n                if (from && from !== to && instance && instance === oldInstance) {\n                    if (!to.leaveGuards.size) {\n                        to.leaveGuards = from.leaveGuards;\n                    }\n                    if (!to.updateGuards.size) {\n                        to.updateGuards = from.updateGuards;\n                    }\n                }\n            }\n            // trigger beforeRouteEnter next callbacks\n            if (instance &&\n                to &&\n                // if there is no instance but to and from are the same this might be\n                // the first visit\n                (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n                (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n            }\n        }, { flush: 'post' });\n        return () => {\n            const route = routeToDisplay.value;\n            // we need the value at the time we render because when we unmount, we\n            // navigated to a different location so the value is different\n            const currentName = props.name;\n            const matchedRoute = matchedRouteRef.value;\n            const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n            if (!ViewComponent) {\n                return normalizeSlot(slots.default, { Component: ViewComponent, route });\n            }\n            // props from route configuration\n            const routePropsOption = matchedRoute.props[currentName];\n            const routeProps = routePropsOption\n                ? routePropsOption === true\n                    ? route.params\n                    : typeof routePropsOption === 'function'\n                        ? routePropsOption(route)\n                        : routePropsOption\n                : null;\n            const onVnodeUnmounted = vnode => {\n                // remove the instance reference to prevent leak\n                if (vnode.component.isUnmounted) {\n                    matchedRoute.instances[currentName] = null;\n                }\n            };\n            const component = h(ViewComponent, assign({}, routeProps, attrs, {\n                onVnodeUnmounted,\n                ref: viewRef,\n            }));\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                isBrowser &&\n                component.ref) {\n                // TODO: can display if it's an alias, its props\n                const info = {\n                    depth: depth.value,\n                    name: matchedRoute.name,\n                    path: matchedRoute.path,\n                    meta: matchedRoute.meta,\n                };\n                const internalInstances = isArray(component.ref)\n                    ? component.ref.map(r => r.i)\n                    : [component.ref.i];\n                internalInstances.forEach(instance => {\n                    // @ts-expect-error\n                    instance.__vrv_devtools = info;\n                });\n            }\n            return (\n            // pass the vnode to the slot as a prop.\n            // h and <component :is=\"...\"> both accept vnodes\n            normalizeSlot(slots.default, { Component: component, route }) ||\n                component);\n        };\n    },\n});\nfunction normalizeSlot(slot, data) {\n    if (!slot)\n        return null;\n    const slotContent = slot(data);\n    return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with <transition> & <keep-alive>\n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n    const instance = getCurrentInstance();\n    const parentName = instance.parent && instance.parent.type.name;\n    const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n    if (parentName &&\n        (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n        typeof parentSubTreeType === 'object' &&\n        parentSubTreeType.name === 'RouterView') {\n        const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n        warn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\\n` +\n            `Use slot props instead:\\n\\n` +\n            `<router-view v-slot=\"{ Component }\">\\n` +\n            `  <${comp}>\\n` +\n            `    <component :is=\"Component\" />\\n` +\n            `  </${comp}>\\n` +\n            `</router-view>`);\n    }\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n    const copy = assign({}, routeLocation, {\n        // remove variables that can contain vue instances\n        matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n    });\n    return {\n        _custom: {\n            type: null,\n            readOnly: true,\n            display: routeLocation.fullPath,\n            tooltip,\n            value: copy,\n        },\n    };\n}\nfunction formatDisplay(display) {\n    return {\n        _custom: {\n            display,\n        },\n    };\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n    // Take over router.beforeEach and afterEach\n    // make sure we are not registering the devtool twice\n    if (router.__hasDevtools)\n        return;\n    router.__hasDevtools = true;\n    // increment to support multiple router instances\n    const id = routerId++;\n    setupDevtoolsPlugin({\n        id: 'org.vuejs.router' + (id ? '.' + id : ''),\n        label: 'Vue Router',\n        packageName: 'vue-router',\n        homepage: 'https://router.vuejs.org',\n        logo: 'https://router.vuejs.org/logo.png',\n        componentStateTypes: ['Routing'],\n        app,\n    }, api => {\n        if (typeof api.now !== 'function') {\n            console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n        }\n        // display state added by the router\n        api.on.inspectComponent((payload, ctx) => {\n            if (payload.instanceData) {\n                payload.instanceData.state.push({\n                    type: 'Routing',\n                    key: '$route',\n                    editable: false,\n                    value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n                });\n            }\n        });\n        // mark router-link as active and display tags on router views\n        api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n            if (componentInstance.__vrv_devtools) {\n                const info = componentInstance.__vrv_devtools;\n                node.tags.push({\n                    label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n                    textColor: 0,\n                    tooltip: 'This component is rendered by &lt;router-view&gt;',\n                    backgroundColor: PINK_500,\n                });\n            }\n            // if multiple useLink are used\n            if (isArray(componentInstance.__vrl_devtools)) {\n                componentInstance.__devtoolsApi = api;\n                componentInstance.__vrl_devtools.forEach(devtoolsData => {\n                    let label = devtoolsData.route.path;\n                    let backgroundColor = ORANGE_400;\n                    let tooltip = '';\n                    let textColor = 0;\n                    if (devtoolsData.error) {\n                        label = devtoolsData.error;\n                        backgroundColor = RED_100;\n                        textColor = RED_700;\n                    }\n                    else if (devtoolsData.isExactActive) {\n                        backgroundColor = LIME_500;\n                        tooltip = 'This is exactly active';\n                    }\n                    else if (devtoolsData.isActive) {\n                        backgroundColor = BLUE_600;\n                        tooltip = 'This link is active';\n                    }\n                    node.tags.push({\n                        label,\n                        textColor,\n                        tooltip,\n                        backgroundColor,\n                    });\n                });\n            }\n        });\n        watch(router.currentRoute, () => {\n            // refresh active state\n            refreshRoutesView();\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(routerInspectorId);\n            api.sendInspectorState(routerInspectorId);\n        });\n        const navigationsLayerId = 'router:navigations:' + id;\n        api.addTimelineLayer({\n            id: navigationsLayerId,\n            label: `Router${id ? ' ' + id : ''} Navigations`,\n            color: 0x40a8c4,\n        });\n        // const errorsLayerId = 'router:errors'\n        // api.addTimelineLayer({\n        //   id: errorsLayerId,\n        //   label: 'Router Errors',\n        //   color: 0xea5455,\n        // })\n        router.onError((error, to) => {\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    title: 'Error during Navigation',\n                    subtitle: to.fullPath,\n                    logType: 'error',\n                    time: api.now(),\n                    data: { error },\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        // attached to `meta` and used to group events\n        let navigationId = 0;\n        router.beforeEach((to, from) => {\n            const data = {\n                guard: formatDisplay('beforeEach'),\n                from: formatRouteLocation(from, 'Current Location during this navigation'),\n                to: formatRouteLocation(to, 'Target location'),\n            };\n            // Used to group navigations together, hide from devtools\n            Object.defineProperty(to.meta, '__navigationId', {\n                value: navigationId++,\n            });\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    time: api.now(),\n                    title: 'Start of navigation',\n                    subtitle: to.fullPath,\n                    data,\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        router.afterEach((to, from, failure) => {\n            const data = {\n                guard: formatDisplay('afterEach'),\n            };\n            if (failure) {\n                data.failure = {\n                    _custom: {\n                        type: Error,\n                        readOnly: true,\n                        display: failure ? failure.message : '',\n                        tooltip: 'Navigation Failure',\n                        value: failure,\n                    },\n                };\n                data.status = formatDisplay('❌');\n            }\n            else {\n                data.status = formatDisplay('✅');\n            }\n            // we set here to have the right order\n            data.from = formatRouteLocation(from, 'Current Location during this navigation');\n            data.to = formatRouteLocation(to, 'Target location');\n            api.addTimelineEvent({\n                layerId: navigationsLayerId,\n                event: {\n                    title: 'End of navigation',\n                    subtitle: to.fullPath,\n                    time: api.now(),\n                    data,\n                    logType: failure ? 'warning' : 'default',\n                    groupId: to.meta.__navigationId,\n                },\n            });\n        });\n        /**\n         * Inspector of Existing routes\n         */\n        const routerInspectorId = 'router-inspector:' + id;\n        api.addInspector({\n            id: routerInspectorId,\n            label: 'Routes' + (id ? ' ' + id : ''),\n            icon: 'book',\n            treeFilterPlaceholder: 'Search routes',\n        });\n        function refreshRoutesView() {\n            // the routes view isn't active\n            if (!activeRoutesPayload)\n                return;\n            const payload = activeRoutesPayload;\n            // children routes will appear as nested\n            let routes = matcher.getRoutes().filter(route => !route.parent ||\n                // these routes have a parent with no component which will not appear in the view\n                // therefore we still need to include them\n                !route.parent.record.components);\n            // reset match state to false\n            routes.forEach(resetMatchStateOnRouteRecord);\n            // apply a match state if there is a payload\n            if (payload.filter) {\n                routes = routes.filter(route => \n                // save matches state based on the payload\n                isRouteMatching(route, payload.filter.toLowerCase()));\n            }\n            // mark active routes\n            routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n            payload.rootNodes = routes.map(formatRouteRecordForInspector);\n        }\n        let activeRoutesPayload;\n        api.on.getInspectorTree(payload => {\n            activeRoutesPayload = payload;\n            if (payload.app === app && payload.inspectorId === routerInspectorId) {\n                refreshRoutesView();\n            }\n        });\n        /**\n         * Display information about the currently selected route record\n         */\n        api.on.getInspectorState(payload => {\n            if (payload.app === app && payload.inspectorId === routerInspectorId) {\n                const routes = matcher.getRoutes();\n                const route = routes.find(route => route.record.__vd_id === payload.nodeId);\n                if (route) {\n                    payload.state = {\n                        options: formatRouteRecordMatcherForStateInspector(route),\n                    };\n                }\n            }\n        });\n        api.sendInspectorTree(routerInspectorId);\n        api.sendInspectorState(routerInspectorId);\n    });\n}\nfunction modifierForKey(key) {\n    if (key.optional) {\n        return key.repeatable ? '*' : '?';\n    }\n    else {\n        return key.repeatable ? '+' : '';\n    }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n    const { record } = route;\n    const fields = [\n        { editable: false, key: 'path', value: record.path },\n    ];\n    if (record.name != null) {\n        fields.push({\n            editable: false,\n            key: 'name',\n            value: record.name,\n        });\n    }\n    fields.push({ editable: false, key: 'regexp', value: route.re });\n    if (route.keys.length) {\n        fields.push({\n            editable: false,\n            key: 'keys',\n            value: {\n                _custom: {\n                    type: null,\n                    readOnly: true,\n                    display: route.keys\n                        .map(key => `${key.name}${modifierForKey(key)}`)\n                        .join(' '),\n                    tooltip: 'Param keys',\n                    value: route.keys,\n                },\n            },\n        });\n    }\n    if (record.redirect != null) {\n        fields.push({\n            editable: false,\n            key: 'redirect',\n            value: record.redirect,\n        });\n    }\n    if (route.alias.length) {\n        fields.push({\n            editable: false,\n            key: 'aliases',\n            value: route.alias.map(alias => alias.record.path),\n        });\n    }\n    if (Object.keys(route.record.meta).length) {\n        fields.push({\n            editable: false,\n            key: 'meta',\n            value: route.record.meta,\n        });\n    }\n    fields.push({\n        key: 'score',\n        editable: false,\n        value: {\n            _custom: {\n                type: null,\n                readOnly: true,\n                display: route.score.map(score => score.join(', ')).join(' | '),\n                tooltip: 'Score used to sort routes',\n                value: route.score,\n            },\n        },\n    });\n    return fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n    const tags = [];\n    const { record } = route;\n    if (record.name != null) {\n        tags.push({\n            label: String(record.name),\n            textColor: 0,\n            backgroundColor: CYAN_400,\n        });\n    }\n    if (record.aliasOf) {\n        tags.push({\n            label: 'alias',\n            textColor: 0,\n            backgroundColor: ORANGE_400,\n        });\n    }\n    if (route.__vd_match) {\n        tags.push({\n            label: 'matches',\n            textColor: 0,\n            backgroundColor: PINK_500,\n        });\n    }\n    if (route.__vd_exactActive) {\n        tags.push({\n            label: 'exact',\n            textColor: 0,\n            backgroundColor: LIME_500,\n        });\n    }\n    if (route.__vd_active) {\n        tags.push({\n            label: 'active',\n            textColor: 0,\n            backgroundColor: BLUE_600,\n        });\n    }\n    if (record.redirect) {\n        tags.push({\n            label: typeof record.redirect === 'string'\n                ? `redirect: ${record.redirect}`\n                : 'redirects',\n            textColor: 0xffffff,\n            backgroundColor: DARK,\n        });\n    }\n    // add an id to be able to select it. Using the `path` is not possible because\n    // empty path children would collide with their parents\n    let id = record.__vd_id;\n    if (id == null) {\n        id = String(routeRecordId++);\n        record.__vd_id = id;\n    }\n    return {\n        id,\n        label: record.path,\n        tags,\n        children: route.children.map(formatRouteRecordForInspector),\n    };\n}\n//  incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n    // no route will be active if matched is empty\n    // reset the matching state\n    const isExactActive = currentRoute.matched.length &&\n        isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n    route.__vd_exactActive = route.__vd_active = isExactActive;\n    if (!isExactActive) {\n        route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n    }\n    route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n    route.__vd_match = false;\n    route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n    const found = String(route.re).match(EXTRACT_REGEXP_RE);\n    route.__vd_match = false;\n    if (!found || found.length < 3) {\n        return false;\n    }\n    // use a regexp without $ at the end to match nested routes better\n    const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n    if (nonEndingRE.test(filter)) {\n        // mark children as matches\n        route.children.forEach(child => isRouteMatching(child, filter));\n        // exception case: `/`\n        if (route.record.path !== '/' || filter === '/') {\n            route.__vd_match = route.re.test(filter);\n            return true;\n        }\n        // hide the / route\n        return false;\n    }\n    const path = route.record.path.toLowerCase();\n    const decodedPath = decode(path);\n    // also allow partial matching on the path\n    if (!filter.startsWith('/') &&\n        (decodedPath.includes(filter) || path.includes(filter)))\n        return true;\n    if (decodedPath.startsWith(filter) || path.startsWith(filter))\n        return true;\n    if (route.record.name && String(route.record.name).includes(filter))\n        return true;\n    return route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n    const ret = {};\n    for (const key in obj) {\n        if (!keys.includes(key)) {\n            // @ts-expect-error\n            ret[key] = obj[key];\n        }\n    }\n    return ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n    const matcher = createRouterMatcher(options.routes, options);\n    const parseQuery$1 = options.parseQuery || parseQuery;\n    const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n    const routerHistory = options.history;\n    if ((process.env.NODE_ENV !== 'production') && !routerHistory)\n        throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n            ' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n    const beforeGuards = useCallbacks();\n    const beforeResolveGuards = useCallbacks();\n    const afterGuards = useCallbacks();\n    const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n    let pendingLocation = START_LOCATION_NORMALIZED;\n    // leave the scrollRestoration if no scrollBehavior is provided\n    if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n        history.scrollRestoration = 'manual';\n    }\n    const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n    const encodeParams = applyToParams.bind(null, encodeParam);\n    const decodeParams = \n    // @ts-expect-error: intentionally avoid the type check\n    applyToParams.bind(null, decode);\n    function addRoute(parentOrRoute, route) {\n        let parent;\n        let record;\n        if (isRouteName(parentOrRoute)) {\n            parent = matcher.getRecordMatcher(parentOrRoute);\n            if ((process.env.NODE_ENV !== 'production') && !parent) {\n                warn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n            }\n            record = route;\n        }\n        else {\n            record = parentOrRoute;\n        }\n        return matcher.addRoute(record, parent);\n    }\n    function removeRoute(name) {\n        const recordMatcher = matcher.getRecordMatcher(name);\n        if (recordMatcher) {\n            matcher.removeRoute(recordMatcher);\n        }\n        else if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Cannot remove non-existent route \"${String(name)}\"`);\n        }\n    }\n    function getRoutes() {\n        return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n    }\n    function hasRoute(name) {\n        return !!matcher.getRecordMatcher(name);\n    }\n    function resolve(rawLocation, currentLocation) {\n        // const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n        // const objectLocation = routerLocationAsObject(rawLocation)\n        // we create a copy to modify it later\n        currentLocation = assign({}, currentLocation || currentRoute.value);\n        if (typeof rawLocation === 'string') {\n            const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n            const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n            const href = routerHistory.createHref(locationNormalized.fullPath);\n            if ((process.env.NODE_ENV !== 'production')) {\n                if (href.startsWith('//'))\n                    warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n                else if (!matchedRoute.matched.length) {\n                    warn(`No match found for location with path \"${rawLocation}\"`);\n                }\n            }\n            // locationNormalized is always a new object\n            return assign(locationNormalized, matchedRoute, {\n                params: decodeParams(matchedRoute.params),\n                hash: decode(locationNormalized.hash),\n                redirectedFrom: undefined,\n                href,\n            });\n        }\n        if ((process.env.NODE_ENV !== 'production') && !isRouteLocation(rawLocation)) {\n            warn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n            return resolve({});\n        }\n        let matcherLocation;\n        // path could be relative in object as well\n        if (rawLocation.path != null) {\n            if ((process.env.NODE_ENV !== 'production') &&\n                'params' in rawLocation &&\n                !('name' in rawLocation) &&\n                // @ts-expect-error: the type is never\n                Object.keys(rawLocation.params).length) {\n                warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n            }\n            matcherLocation = assign({}, rawLocation, {\n                path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n            });\n        }\n        else {\n            // remove any nullish param\n            const targetParams = assign({}, rawLocation.params);\n            for (const key in targetParams) {\n                if (targetParams[key] == null) {\n                    delete targetParams[key];\n                }\n            }\n            // pass encoded values to the matcher, so it can produce encoded path and fullPath\n            matcherLocation = assign({}, rawLocation, {\n                params: encodeParams(targetParams),\n            });\n            // current location params are decoded, we need to encode them in case the\n            // matcher merges the params\n            currentLocation.params = encodeParams(currentLocation.params);\n        }\n        const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n        const hash = rawLocation.hash || '';\n        if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\n            warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n        }\n        // the matcher might have merged current location params, so\n        // we need to run the decoding again\n        matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n        const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n            hash: encodeHash(hash),\n            path: matchedRoute.path,\n        }));\n        const href = routerHistory.createHref(fullPath);\n        if ((process.env.NODE_ENV !== 'production')) {\n            if (href.startsWith('//')) {\n                warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n            }\n            else if (!matchedRoute.matched.length) {\n                warn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n            }\n        }\n        return assign({\n            fullPath,\n            // keep the hash encoded so fullPath is effectively path + encodedQuery +\n            // hash\n            hash,\n            query: \n            // if the user is using a custom query lib like qs, we might have\n            // nested objects, so we keep the query as is, meaning it can contain\n            // numbers at `$route.query`, but at the point, the user will have to\n            // use their own type anyway.\n            // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n            stringifyQuery$1 === stringifyQuery\n                ? normalizeQuery(rawLocation.query)\n                : (rawLocation.query || {}),\n        }, matchedRoute, {\n            redirectedFrom: undefined,\n            href,\n        });\n    }\n    function locationAsObject(to) {\n        return typeof to === 'string'\n            ? parseURL(parseQuery$1, to, currentRoute.value.path)\n            : assign({}, to);\n    }\n    function checkCanceledNavigation(to, from) {\n        if (pendingLocation !== to) {\n            return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n                from,\n                to,\n            });\n        }\n    }\n    function push(to) {\n        return pushWithRedirect(to);\n    }\n    function replace(to) {\n        return push(assign(locationAsObject(to), { replace: true }));\n    }\n    function handleRedirectRecord(to) {\n        const lastMatched = to.matched[to.matched.length - 1];\n        if (lastMatched && lastMatched.redirect) {\n            const { redirect } = lastMatched;\n            let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n            if (typeof newTargetLocation === 'string') {\n                newTargetLocation =\n                    newTargetLocation.includes('?') || newTargetLocation.includes('#')\n                        ? (newTargetLocation = locationAsObject(newTargetLocation))\n                        : // force empty params\n                            { path: newTargetLocation };\n                // @ts-expect-error: force empty params when a string is passed to let\n                // the router parse them again\n                newTargetLocation.params = {};\n            }\n            if ((process.env.NODE_ENV !== 'production') &&\n                newTargetLocation.path == null &&\n                !('name' in newTargetLocation)) {\n                warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n                throw new Error('Invalid redirect');\n            }\n            return assign({\n                query: to.query,\n                hash: to.hash,\n                // avoid transferring params if the redirect has a path\n                params: newTargetLocation.path != null ? {} : to.params,\n            }, newTargetLocation);\n        }\n    }\n    function pushWithRedirect(to, redirectedFrom) {\n        const targetLocation = (pendingLocation = resolve(to));\n        const from = currentRoute.value;\n        const data = to.state;\n        const force = to.force;\n        // to could be a string where `replace` is a function\n        const replace = to.replace === true;\n        const shouldRedirect = handleRedirectRecord(targetLocation);\n        if (shouldRedirect)\n            return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n                state: typeof shouldRedirect === 'object'\n                    ? assign({}, data, shouldRedirect.state)\n                    : data,\n                force,\n                replace,\n            }), \n            // keep original redirectedFrom if it exists\n            redirectedFrom || targetLocation);\n        // if it was a redirect we already called `pushWithRedirect` above\n        const toLocation = targetLocation;\n        toLocation.redirectedFrom = redirectedFrom;\n        let failure;\n        if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n            failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n            // trigger scroll to allow scrolling to the same anchor\n            handleScroll(from, from, \n            // this is a push, the only way for it to be triggered from a\n            // history.listen is with a redirect, which makes it become a push\n            true, \n            // This cannot be the first navigation because the initial location\n            // cannot be manually navigated to\n            false);\n        }\n        return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n            .catch((error) => isNavigationFailure(error)\n            ? // navigation redirects still mark the router as ready\n                isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n                    ? error\n                    : markAsReady(error) // also returns the error\n            : // reject any unknown error\n                triggerError(error, toLocation, from))\n            .then((failure) => {\n            if (failure) {\n                if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n                    if ((process.env.NODE_ENV !== 'production') &&\n                        // we are redirecting to the same location we were already at\n                        isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n                        // and we have done it a couple of times\n                        redirectedFrom &&\n                        // @ts-expect-error: added only in dev\n                        (redirectedFrom._count = redirectedFrom._count\n                            ? // @ts-expect-error\n                                redirectedFrom._count + 1\n                            : 1) > 30) {\n                        warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n                        return Promise.reject(new Error('Infinite redirect in navigation guard'));\n                    }\n                    return pushWithRedirect(\n                    // keep options\n                    assign({\n                        // preserve an existing replacement but allow the redirect to override it\n                        replace,\n                    }, locationAsObject(failure.to), {\n                        state: typeof failure.to === 'object'\n                            ? assign({}, data, failure.to.state)\n                            : data,\n                        force,\n                    }), \n                    // preserve the original redirectedFrom if any\n                    redirectedFrom || toLocation);\n                }\n            }\n            else {\n                // if we fail we don't finalize the navigation\n                failure = finalizeNavigation(toLocation, from, true, replace, data);\n            }\n            triggerAfterEach(toLocation, from, failure);\n            return failure;\n        });\n    }\n    /**\n     * Helper to reject and skip all navigation guards if a new navigation happened\n     * @param to\n     * @param from\n     */\n    function checkCanceledNavigationAndReject(to, from) {\n        const error = checkCanceledNavigation(to, from);\n        return error ? Promise.reject(error) : Promise.resolve();\n    }\n    function runWithContext(fn) {\n        const app = installedApps.values().next().value;\n        // support Vue < 3.3\n        return app && typeof app.runWithContext === 'function'\n            ? app.runWithContext(fn)\n            : fn();\n    }\n    // TODO: refactor the whole before guards by internally using router.beforeEach\n    function navigate(to, from) {\n        let guards;\n        const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n        // all components here have been resolved once because we are leaving\n        guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n        // leavingRecords is already reversed\n        for (const record of leavingRecords) {\n            record.leaveGuards.forEach(guard => {\n                guards.push(guardToPromiseFn(guard, to, from));\n            });\n        }\n        const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n        guards.push(canceledNavigationCheck);\n        // run the queue of per route beforeRouteLeave guards\n        return (runGuardQueue(guards)\n            .then(() => {\n            // check global guards beforeEach\n            guards = [];\n            for (const guard of beforeGuards.list()) {\n                guards.push(guardToPromiseFn(guard, to, from));\n            }\n            guards.push(canceledNavigationCheck);\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check in components beforeRouteUpdate\n            guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n            for (const record of updatingRecords) {\n                record.updateGuards.forEach(guard => {\n                    guards.push(guardToPromiseFn(guard, to, from));\n                });\n            }\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check the route beforeEnter\n            guards = [];\n            for (const record of enteringRecords) {\n                // do not trigger beforeEnter on reused views\n                if (record.beforeEnter) {\n                    if (isArray(record.beforeEnter)) {\n                        for (const beforeEnter of record.beforeEnter)\n                            guards.push(guardToPromiseFn(beforeEnter, to, from));\n                    }\n                    else {\n                        guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n                    }\n                }\n            }\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>\n            // clear existing enterCallbacks, these are added by extractComponentsGuards\n            to.matched.forEach(record => (record.enterCallbacks = {}));\n            // check in-component beforeRouteEnter\n            guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n            guards.push(canceledNavigationCheck);\n            // run the queue of per route beforeEnter guards\n            return runGuardQueue(guards);\n        })\n            .then(() => {\n            // check global guards beforeResolve\n            guards = [];\n            for (const guard of beforeResolveGuards.list()) {\n                guards.push(guardToPromiseFn(guard, to, from));\n            }\n            guards.push(canceledNavigationCheck);\n            return runGuardQueue(guards);\n        })\n            // catch any navigation canceled\n            .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n            ? err\n            : Promise.reject(err)));\n    }\n    function triggerAfterEach(to, from, failure) {\n        // navigation is confirmed, call afterGuards\n        // TODO: wrap with error handlers\n        afterGuards\n            .list()\n            .forEach(guard => runWithContext(() => guard(to, from, failure)));\n    }\n    /**\n     * - Cleans up any navigation guards\n     * - Changes the url if necessary\n     * - Calls the scrollBehavior\n     */\n    function finalizeNavigation(toLocation, from, isPush, replace, data) {\n        // a more recent navigation took place\n        const error = checkCanceledNavigation(toLocation, from);\n        if (error)\n            return error;\n        // only consider as push if it's not the first navigation\n        const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n        const state = !isBrowser ? {} : history.state;\n        // change URL only if the user did a push/replace and if it's not the initial navigation because\n        // it's just reflecting the url\n        if (isPush) {\n            // on the initial navigation, we want to reuse the scroll position from\n            // history state if it exists\n            if (replace || isFirstNavigation)\n                routerHistory.replace(toLocation.fullPath, assign({\n                    scroll: isFirstNavigation && state && state.scroll,\n                }, data));\n            else\n                routerHistory.push(toLocation.fullPath, data);\n        }\n        // accept current navigation\n        currentRoute.value = toLocation;\n        handleScroll(toLocation, from, isPush, isFirstNavigation);\n        markAsReady();\n    }\n    let removeHistoryListener;\n    // attach listener to history to trigger navigations\n    function setupListeners() {\n        // avoid setting up listeners twice due to an invalid first navigation\n        if (removeHistoryListener)\n            return;\n        removeHistoryListener = routerHistory.listen((to, _from, info) => {\n            if (!router.listening)\n                return;\n            // cannot be a redirect route because it was in history\n            const toLocation = resolve(to);\n            // due to dynamic routing, and to hash history with manual navigation\n            // (manually changing the url or calling history.hash = '#/somewhere'),\n            // there could be a redirect record in history\n            const shouldRedirect = handleRedirectRecord(toLocation);\n            if (shouldRedirect) {\n                pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n                return;\n            }\n            pendingLocation = toLocation;\n            const from = currentRoute.value;\n            // TODO: should be moved to web history?\n            if (isBrowser) {\n                saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n            }\n            navigate(toLocation, from)\n                .catch((error) => {\n                if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n                    return error;\n                }\n                if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n                    // Here we could call if (info.delta) routerHistory.go(-info.delta,\n                    // false) but this is bug prone as we have no way to wait the\n                    // navigation to be finished before calling pushWithRedirect. Using\n                    // a setTimeout of 16ms seems to work but there is no guarantee for\n                    // it to work on every browser. So instead we do not restore the\n                    // history entry and trigger a new navigation as requested by the\n                    // navigation guard.\n                    // the error is already handled by router.push we just want to avoid\n                    // logging the error\n                    pushWithRedirect(error.to, toLocation\n                    // avoid an uncaught rejection, let push call triggerError\n                    )\n                        .then(failure => {\n                        // manual change in hash history #916 ending up in the URL not\n                        // changing, but it was changed by the manual url change, so we\n                        // need to manually change it ourselves\n                        if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n                            16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n                            !info.delta &&\n                            info.type === NavigationType.pop) {\n                            routerHistory.go(-1, false);\n                        }\n                    })\n                        .catch(noop);\n                    // avoid the then branch\n                    return Promise.reject();\n                }\n                // do not restore history on unknown direction\n                if (info.delta) {\n                    routerHistory.go(-info.delta, false);\n                }\n                // unrecognized error, transfer to the global handler\n                return triggerError(error, toLocation, from);\n            })\n                .then((failure) => {\n                failure =\n                    failure ||\n                        finalizeNavigation(\n                        // after navigation, all matched components are resolved\n                        toLocation, from, false);\n                // revert the navigation\n                if (failure) {\n                    if (info.delta &&\n                        // a new navigation has been triggered, so we do not want to revert, that will change the current history\n                        // entry while a different route is displayed\n                        !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n                        routerHistory.go(-info.delta, false);\n                    }\n                    else if (info.type === NavigationType.pop &&\n                        isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n                        // manual change in hash history #916\n                        // it's like a push but lacks the information of the direction\n                        routerHistory.go(-1, false);\n                    }\n                }\n                triggerAfterEach(toLocation, from, failure);\n            })\n                // avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n                .catch(noop);\n        });\n    }\n    // Initialization and Errors\n    let readyHandlers = useCallbacks();\n    let errorListeners = useCallbacks();\n    let ready;\n    /**\n     * Trigger errorListeners added via onError and throws the error as well\n     *\n     * @param error - error to throw\n     * @param to - location we were navigating to when the error happened\n     * @param from - location we were navigating from when the error happened\n     * @returns the error as a rejected promise\n     */\n    function triggerError(error, to, from) {\n        markAsReady(error);\n        const list = errorListeners.list();\n        if (list.length) {\n            list.forEach(handler => handler(error, to, from));\n        }\n        else {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn('uncaught error during route navigation:');\n            }\n            console.error(error);\n        }\n        // reject the error no matter there were error listeners or not\n        return Promise.reject(error);\n    }\n    function isReady() {\n        if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n            return Promise.resolve();\n        return new Promise((resolve, reject) => {\n            readyHandlers.add([resolve, reject]);\n        });\n    }\n    function markAsReady(err) {\n        if (!ready) {\n            // still not ready if an error happened\n            ready = !err;\n            setupListeners();\n            readyHandlers\n                .list()\n                .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n            readyHandlers.reset();\n        }\n        return err;\n    }\n    // Scroll behavior\n    function handleScroll(to, from, isPush, isFirstNavigation) {\n        const { scrollBehavior } = options;\n        if (!isBrowser || !scrollBehavior)\n            return Promise.resolve();\n        const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n            ((isFirstNavigation || !isPush) &&\n                history.state &&\n                history.state.scroll) ||\n            null;\n        return nextTick()\n            .then(() => scrollBehavior(to, from, scrollPosition))\n            .then(position => position && scrollToPosition(position))\n            .catch(err => triggerError(err, to, from));\n    }\n    const go = (delta) => routerHistory.go(delta);\n    let started;\n    const installedApps = new Set();\n    const router = {\n        currentRoute,\n        listening: true,\n        addRoute,\n        removeRoute,\n        clearRoutes: matcher.clearRoutes,\n        hasRoute,\n        getRoutes,\n        resolve,\n        options,\n        push,\n        replace,\n        go,\n        back: () => go(-1),\n        forward: () => go(1),\n        beforeEach: beforeGuards.add,\n        beforeResolve: beforeResolveGuards.add,\n        afterEach: afterGuards.add,\n        onError: errorListeners.add,\n        isReady,\n        install(app) {\n            const router = this;\n            app.component('RouterLink', RouterLink);\n            app.component('RouterView', RouterView);\n            app.config.globalProperties.$router = router;\n            Object.defineProperty(app.config.globalProperties, '$route', {\n                enumerable: true,\n                get: () => unref(currentRoute),\n            });\n            // this initial navigation is only necessary on client, on server it doesn't\n            // make sense because it will create an extra unnecessary navigation and could\n            // lead to problems\n            if (isBrowser &&\n                // used for the initial navigation client side to avoid pushing\n                // multiple times when the router is used in multiple apps\n                !started &&\n                currentRoute.value === START_LOCATION_NORMALIZED) {\n                // see above\n                started = true;\n                push(routerHistory.location).catch(err => {\n                    if ((process.env.NODE_ENV !== 'production'))\n                        warn('Unexpected error when starting the router:', err);\n                });\n            }\n            const reactiveRoute = {};\n            for (const key in START_LOCATION_NORMALIZED) {\n                Object.defineProperty(reactiveRoute, key, {\n                    get: () => currentRoute.value[key],\n                    enumerable: true,\n                });\n            }\n            app.provide(routerKey, router);\n            app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n            app.provide(routerViewLocationKey, currentRoute);\n            const unmountApp = app.unmount;\n            installedApps.add(app);\n            app.unmount = function () {\n                installedApps.delete(app);\n                // the router is not attached to an app anymore\n                if (installedApps.size < 1) {\n                    // invalidate the current navigation\n                    pendingLocation = START_LOCATION_NORMALIZED;\n                    removeHistoryListener && removeHistoryListener();\n                    removeHistoryListener = null;\n                    currentRoute.value = START_LOCATION_NORMALIZED;\n                    started = false;\n                    ready = false;\n                }\n                unmountApp();\n            };\n            // TODO: this probably needs to be updated so it can be used by vue-termui\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n                addDevtools(app, router, matcher);\n            }\n        },\n    };\n    // TODO: type this as NavigationGuardReturn or similar instead of any\n    function runGuardQueue(guards) {\n        return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n    }\n    return router;\n}\nfunction extractChangingRecords(to, from) {\n    const leavingRecords = [];\n    const updatingRecords = [];\n    const enteringRecords = [];\n    const len = Math.max(from.matched.length, to.matched.length);\n    for (let i = 0; i < len; i++) {\n        const recordFrom = from.matched[i];\n        if (recordFrom) {\n            if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n                updatingRecords.push(recordFrom);\n            else\n                leavingRecords.push(recordFrom);\n        }\n        const recordTo = to.matched[i];\n        if (recordTo) {\n            // the type doesn't matter because we are comparing per reference\n            if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n                enteringRecords.push(recordTo);\n            }\n        }\n    }\n    return [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n    return inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n    return inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","export interface ProductPrice {\r\n    min: number;\r\n    max: number;\r\n}\r\n\r\nexport interface ProductBadge {\r\n    theme: string;\r\n    label: string;\r\n}\r\n\r\nexport interface ProductVariant {\r\n    inStock: boolean;\r\n    key: string;\r\n    size?: string;\r\n    link: string;\r\n    listPrice: number;\r\n    sellingPrice: number;\r\n    stockNumber: number;\r\n    ticket: string;\r\n    custom: { EpiCode: Array<CustomField> };\r\n}\r\n\r\n\r\nexport interface CustomField {\r\n    id: string;\r\n    label: string;\r\n}\r\n\r\nexport interface ProductImageSource {\r\n    width: number;\r\n    height: number;\r\n    url: string;\r\n}\r\n\r\nexport interface ProductImage {\r\n    alt: string;\r\n    sources: Array<ProductImageSource>;\r\n}\r\n\r\nexport interface Product {\r\n    key: string;\r\n    brand: string;\r\n    link: string;\r\n    title: string;\r\n    ticket: string;\r\n    inStock: boolean;\r\n    isInStockOnWeb?: boolean;\r\n    isNews?: boolean;\r\n    badges: {\r\n        primary?: ProductBadge;\r\n        secondary?: ProductBadge;\r\n    };\r\n    sellingPrice: ProductPrice;\r\n    listPrice: ProductPrice;\r\n    imageInfo: {\r\n        effects: string;\r\n        images: Array<ProductImage>;\r\n        thumbnail: string;\r\n    };\r\n    variants: Array<ProductVariant>;\r\n    custom: {\r\n        EpiPoductCode: Array<CustomField>;\r\n        Dept: Array<CustomField>;\r\n        Category: Array<CustomField>;\r\n        ColorCode: Array<CustomField>;\r\n        ColorName: Array<CustomField>;\r\n        RGBColorCode: Array<CustomField>;\r\n        MetaColor: Array<CustomField>;\r\n        IsMatrixSize: Array<CustomField>;\r\n        IsSuitSize: Array<CustomField>;\r\n        GtmStockStatus: Array<CustomField>;\r\n        HighlightText: Array<CustomField>;\r\n        Promotion: Array<CustomField>;\r\n        MemberPromotion: Array<CustomField>;\r\n        MemberPromotionTag: Array<CustomField>;\r\n    };\r\n}\r\n\r\nexport interface ProductSuggestion {\r\n    key: string;\r\n    products: Array<Product>;\r\n}\r\n\r\nexport interface PhraseSuggestion {\r\n    highlighted: string;\r\n    q: string;\r\n}\r\n\r\nexport interface ContentImageSource {\r\n    width: number;\r\n    height: number;\r\n    url: string;\r\n}\r\n\r\nexport interface ContentImage {\r\n    alt: string;\r\n    sources: Array<ContentImageSource>;\r\n}\r\n\r\nexport interface ContentItem {\r\n    key: string;\r\n    link: string;\r\n    title: string;\r\n    ticket: string;\r\n    type: string;\r\n    image: ContentImage;\r\n    custom: {\r\n        Address: Array<{ id; label }>;\r\n        Phone: Array<{ id; label }>;\r\n        OpeningHours?: Array<{ id; label }>;\r\n        MainIntro?: Array<{ id; label }>;\r\n        Lat: Array<{ id; label }>;\r\n        Lon: Array<{ id; label }>;\r\n    };\r\n}\r\n\r\nexport const CONTENT_LIST_ARTICLES = \"Artikler\";\r\nexport const CONTENT_LIST_STORES = \"Butikker\";\r\n\r\nexport interface ContentList {\r\n    id: \"Artikler\" | \"Butikker\";\r\n    items: Array<ContentItem>;\r\n    totalHits: number;\r\n}\r\n\r\nexport interface AutocompleteResult {\r\n    contentLists: Array<ContentList>;\r\n    productSuggestions: Array<ProductSuggestion>;\r\n    phraseSuggestions: Array<PhraseSuggestion>;\r\n    totalHits: number;\r\n}\r\n\r\nexport enum FacetTypes {\r\n    Color = \"COLOR\",\r\n    Text = \"TEXT\",\r\n    Range = \"RANGE\",\r\n    Size = \"SIZE\",\r\n}\r\n\r\nexport interface FacetValue {\r\n    id: string;\r\n    label: string;\r\n    selected: boolean;\r\n    color?: string;\r\n    count: number;\r\n}\r\n\r\nexport interface Format {\r\n    format: string;\r\n    values: Array<FacetValue>;\r\n    id?: string;\r\n}\r\n\r\nexport interface SizeType {\r\n    label: string;\r\n    formats: Array<Format>;\r\n    id?: string;\r\n}\r\n\r\nexport interface Facet {\r\n    id: string;\r\n    label: string;\r\n    values?: Array<FacetValue>;\r\n    type: FacetTypes | \"COLOR\" | \"TEXT\" | \"RANGE\" | \"SIZE\";\r\n    sizeTypes?: Array<SizeType>;\r\n    selectedCount?: number;\r\n    min?: number;\r\n    max?: number;\r\n    minSelected?: number;\r\n    maxSelected?: number;\r\n}\r\n\r\nexport interface Pill {\r\n    facetId: string;\r\n    facetValueId: string;\r\n    label: string;\r\n}\r\n\r\nexport interface ProductGroup {\r\n    key: string;\r\n    products: Array<Product>;\r\n}\r\n\r\nexport interface SortOption {\r\n    id: string;\r\n    label: string;\r\n}\r\n\r\nexport interface Sort {\r\n    options: Array<SortOption>;\r\n    selected: string;\r\n}\r\n\r\nexport interface SearchResult {\r\n    q: string;\r\n    autoCorrect: null | {\r\n        q: string;\r\n        originalTotalHits: number;\r\n    };\r\n    contentLists: Array<ContentList>;\r\n    primaryList: null | PrimaryList\r\n    message?: string | null;\r\n}\r\n\r\nexport interface SearchResultRecommendList extends SearchResult {\r\n    shopId: string;\r\n    recommendationLists: Array<PrimaryList>;\r\n    primaryList: null | PrimaryList;\r\n}\r\n\r\nexport interface CategoryResult {\r\n    primaryList: null | PrimaryList;\r\n    message?: string;\r\n}\r\n\r\nexport interface ProductsResult {\r\n    primaryList: null | PrimaryList;\r\n}\r\n\r\nexport interface PrimaryList {\r\n    productGroups: Array<ProductGroup>;\r\n    facets: Array<Facet>;\r\n    totalHits: number;\r\n    sort: Sort;\r\n    label: string;\r\n    algorithm: string;\r\n}\r\n\r\nexport interface CartStatusResult {\r\n    primaryList: null | PrimaryList;\r\n}\r\n","import axios, { AxiosResponse, CancelTokenSource } from \"axios\";\r\n\r\nimport {\r\n    AutocompleteResult,\r\n    SearchResult,\r\n    CategoryResult,\r\n    ProductsResult,\r\n    CartStatusResult,\r\n    SearchResultRecommendList,\r\n} from \"./models/search.models\";\r\n\r\nexport * from \"./models/search.models\";\r\n\r\nconst TOUCHPOINT_DESKTOP = \"DESKTOP\";\r\nconst TOUCHPOINT_MOBILE = \"MOBILE\";\r\n\r\nexport default {\r\n    /**\r\n     * Notify click\r\n     *\r\n     * If browser does not support beacon: do an axios request and return promise.\r\n     * Otherwise: sendBeacon.\r\n     */\r\n    notifyClick(ticket: string): undefined | Promise<AxiosResponse<any>> {\r\n        const url = `/publicapi/esales/notify/click?ticket=${ticket}`;\r\n\r\n        if (hasBeacon()) {\r\n            navigator.sendBeacon(url);\r\n        } else {\r\n            return axios.post(url);\r\n        }\r\n    },\r\n    /**\r\n     * Autocomplete\r\n     */\r\n    autocomplete(\r\n        cancelTokenSource: CancelTokenSource,\r\n        searchQuery: string,\r\n    ): Promise<AxiosResponse<AutocompleteResult>> {\r\n        return axios.get(\"/publicapi/esales/autocomplete\", {\r\n            cancelToken: cancelTokenSource.token,\r\n            params: {\r\n                q: searchQuery,\r\n                touchpoint: this.getTouchpoint(),\r\n            },\r\n        });\r\n    },\r\n    /**\r\n     * Search\r\n     */\r\n    search(\r\n        cancelTokenSource: CancelTokenSource,\r\n        searchQuery: string,\r\n        searchFacets: Object,\r\n        sort: string | null,\r\n        pageSize: number,\r\n        page = 0,\r\n        preview: string | undefined,\r\n    ): Promise<AxiosResponse<SearchResult>> {\r\n        const [query, skip, limit] = getSearchQuery(\r\n            searchFacets,\r\n            page,\r\n            pageSize,\r\n        );\r\n\r\n        return axios.get(\"/publicapi/esales/search\", {\r\n            cancelToken: cancelTokenSource.token,\r\n            params: Object.assign({}, query, {\r\n                q: searchQuery,\r\n                touchpoint: this.getTouchpoint(),\r\n                sort: sort || undefined,\r\n                skip,\r\n                limit,\r\n                PREVIEW: preview,\r\n            }),\r\n        });\r\n    },\r\n    /**\r\n     * Category\r\n     */\r\n    category(\r\n        cancelTokenSource: CancelTokenSource,\r\n        pageId: string,\r\n        searchFacets: Object,\r\n        sort: string | null,\r\n        pageSize: number,\r\n        page = 0,\r\n        preview: string | undefined,\r\n        contentLinkId: number | undefined,\r\n    ): Promise<AxiosResponse<CategoryResult>> {\r\n        const [query, skip, limit] = getSearchQuery(\r\n            searchFacets,\r\n            page,\r\n            pageSize,\r\n        );\r\n\r\n        return axios.get(\"/publicapi/esales/landing-page\", {\r\n            cancelToken: cancelTokenSource.token,\r\n            params: Object.assign({}, query, {\r\n                pageId,\r\n                touchpoint: this.getTouchpoint(),\r\n                sort: sort || undefined,\r\n                skip,\r\n                limit,\r\n                PREVIEW: preview,\r\n                contentLinkId: contentLinkId,\r\n            }),\r\n        });\r\n    },\r\n    /**\r\n     * Products\r\n     */\r\n    products(\r\n        apiUrl: string,\r\n        listPath: string | undefined,\r\n        baseUrlPath: string,\r\n        limit: string | number,\r\n    ): Promise<AxiosResponse<SearchResultRecommendList>> {\r\n        return axios.get(apiUrl, {\r\n            params: {\r\n                path: baseUrlPath,\r\n                listPath,\r\n                touchpoint: this.getTouchpoint(),\r\n                limit,\r\n            },\r\n        });\r\n    },\r\n    /**\r\n     * Cart status\r\n     */\r\n    cartStatus(\r\n        productId: string, // TODO\r\n    ): Promise<AxiosResponse<CartStatusResult>> {\r\n        const q = \"jakke\"; // TODO: Remove\r\n        const sort = undefined; // TODO: Remove\r\n        const skip = 0; // TODO: Remove\r\n        const limit = 4; // TODO: Remove\r\n\r\n        return axios.get(\"/publicapi/esales/search\", {\r\n            // TODO: Change to cart status API url\r\n            params: Object.assign(\r\n                {},\r\n                {\r\n                    // TODO: Double check this body when proper URL is provided\r\n                    q,\r\n                    touchpoint: this.getTouchpoint(),\r\n                    sort: sort || undefined,\r\n                    skip,\r\n                    limit,\r\n                },\r\n            ),\r\n        });\r\n    },\r\n\r\n    getTouchpoint() {\r\n        if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {\r\n            return TOUCHPOINT_MOBILE;\r\n        }\r\n\r\n        return TOUCHPOINT_DESKTOP;\r\n    },\r\n};\r\n\r\nfunction getSearchQuery(searchFacets: Object, page: number, pageSize: number) {\r\n    const query = {};\r\n\r\n    Object.keys(searchFacets).forEach((facetId) => {\r\n        const facetValues = searchFacets[facetId].join(\"|\");\r\n\r\n        if (facetValues) {\r\n            query[`f.${facetId}`] = facetValues;\r\n        }\r\n    });\r\n\r\n    const skip = 0;\r\n    const limit = (page + 1) * pageSize;\r\n\r\n    return [query, skip, limit];\r\n}\r\n\r\nfunction hasBeacon() {\r\n    return !!navigator.sendBeacon;\r\n}","import { defineComponent } from \"vue\";\r\nimport SearchService, {\r\n    Product,\r\n    ContentItem,\r\n} from \"../services/search.service\";\r\n\r\nexport default defineComponent({\r\n    methods: {\r\n        notifyClick(e: Event, item: Product | ContentItem) {\r\n            SearchService.notifyClick(item.ticket);\r\n        },\r\n    },\r\n});\r\n\r\n/**\r\n * Notify click\r\n */\r\nexport function notifyClick(e: Event, item: Product | ContentItem) {\r\n    SearchService.notifyClick(item.ticket);\r\n}\r\n","/**\r\n * Get suggestion url\r\n */\r\nexport function getSuggestionUrl(\r\n    preview: string | (string | null)[] | undefined,\r\n    searchPageUrl: string,\r\n    q: string,\r\n): string {\r\n    return `${searchPageUrl}produkter?q=${encodeURIComponent(q)}${preview ? `&PREVIEW=${preview}` : \"\"}`;\r\n}\r\n\r\n/**\r\n * Get total hits URL\r\n */\r\nexport function getTotalHitsUrl(\r\n    preview: string | (string | null)[] | undefined,\r\n    searchPageUrl: string,\r\n    q: string,\r\n): string {\r\n    return `${searchPageUrl}produkter?q=${encodeURIComponent(q)}${preview ? `&PREVIEW=${preview}` : \"\"}`;\r\n}\r\n","<template>\r\n  <span>\r\n    <router-link\r\n      v-if=\"hasRouter\"\r\n      :to=\"suggestionUrl\"\r\n      @click.native=\"click\"\r\n      v-html=\"formattedSuggestion\"\r\n    />\r\n    <a\r\n      v-else\r\n      :href=\"suggestionUrl\"\r\n      @click=\"click\"\r\n      v-html=\"formattedSuggestion\"\r\n      class=\"quicksearch-panel__product-suggestion\"\r\n    />\r\n  </span>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from \"vue\";\r\nimport { useRoute, useRouter } from \"vue-router\";\r\nimport { getSuggestionUrl } from \"./quickSearch.utils\";\r\n\r\nconst props = defineProps<{\r\n  searchPageUrl: string;\r\n  suggestion?: {\r\n    highlighted: string;\r\n    q: string;\r\n  };\r\n}>();\r\n\r\nconst emit = defineEmits([\"click\"]);\r\n\r\nlet route;\r\nlet router;\r\ntry {\r\n  route = useRoute();\r\n  router = useRouter();\r\n} catch (error) {\r\n  route = null;\r\n  router = null;\r\n}\r\n\r\nconst hasRouter = computed((): boolean => {\r\n  return !!router;\r\n});\r\nconst suggestionUrl = computed((): string => {\r\n  return getSuggestionUrl(\r\n    route ? route.query.PREVIEW : undefined,\r\n    route ? \"/\" : props.searchPageUrl,\r\n    props.suggestion?.q as string,\r\n  );\r\n});\r\nconst formattedSuggestion = computed((): string => {\r\n  const hq = props.suggestion?.highlighted\r\n    .replaceAll(\"{\", \"</mark>\")\r\n    .replaceAll(\"}\", \"<mark>\");\r\n\r\n  return `<mark>${hq}</mark>`;\r\n});\r\n\r\n/**\r\n * Click\r\n */\r\nfunction click() {\r\n  emit(\"click\");\r\n}\r\n</script>\r\n","import { Product } from \"../services/models/search.models\";\r\nimport {\r\n    FacetTypes,\r\n    Facet,\r\n    FacetValue,\r\n    SizeType,\r\n    Format,\r\n} from \"../services/search.service\";\r\n\r\n/**\r\n * Get selected values from facet\r\n */\r\nexport function getSelectedValuesFromFacet(facet: Facet): Array<FacetValue> {\r\n    if (facet.type === FacetTypes.Color || facet.type === FacetTypes.Text) {\r\n        return (facet.values || [])\r\n            .filter((value: FacetValue) => {\r\n                return value.selected;\r\n            })\r\n            .map((value: FacetValue) => {\r\n                return value;\r\n            });\r\n    }\r\n\r\n    if (facet.type === FacetTypes.Size) {\r\n        const values: Array<FacetValue> = [];\r\n\r\n        (facet.sizeTypes || []).forEach((sizeType: SizeType) => {\r\n            sizeType.formats.forEach((format: Format) => {\r\n                format.values.forEach((value: FacetValue) => {\r\n                    if (value.selected) {\r\n                        values.push(value);\r\n                    }\r\n                });\r\n            });\r\n        });\r\n\r\n        return values;\r\n    }\r\n\r\n    return [] as Array<FacetValue>;\r\n}\r\n\r\n/**\r\n * Get selected value ids from facet\r\n */\r\nexport function getSelectedValueIdsFromFacet(facet: Facet): Array<string> {\r\n    return getSelectedValuesFromFacet(facet).map((facetValue) => facetValue.id);\r\n}\r\n\r\nexport const getCustomApptusValue = (\r\n    customObject: Product,\r\n    property: string,\r\n    array = 0,\r\n): string => {\r\n    if (!customObject?.custom?.[property]?.[array]?.label) {\r\n        return \"\";\r\n    }\r\n\r\n    return customObject.custom[property][0].label;\r\n};\r\n","import { Product } from \"../services/search.service\";\r\nimport { getCustomApptusValue } from \"../utils/search.utils\";\r\n\r\nexport const computePromotion = (\r\n    product: Product,\r\n    smallLabel?: boolean,\r\n) => {\r\n    const labelText = getCustomApptusValue(product, \"Promotion\");\r\n\r\n    if (labelText) {\r\n        return {\r\n            className: `label--amountdiscount ${smallLabel ? \"label--small\" : \"\"}`,\r\n            text: labelText,\r\n        };\r\n    }\r\n\r\n    return undefined;\r\n};\r\n\r\nexport const computeMemberPromotion = (\r\n    product: Product,\r\n    smallLabel?: boolean,\r\n) => {\r\n    const labelText = getCustomApptusValue(product, \"MemberPromotionTag\");\r\n\r\n    if (labelText) {\r\n        return {\r\n            className: `label--member ${smallLabel ? \"label--small\" : \"\"}`,\r\n            text: labelText,\r\n        };\r\n    }\r\n\r\n    return undefined;\r\n};\r\n\r\nexport const computeBadge = (product: Product) => {\r\n    const primaryBadges = product.badges?.primary;\r\n    const secondaryBadges = product.badges?.secondary;\r\n\r\n    const primaryBadge = primaryBadges;\r\n    const secondaryBadge = secondaryBadges;\r\n\r\n    const badge = primaryBadge || secondaryBadge;\r\n\r\n    if (badge) {\r\n        return {\r\n            className: \"label--amountdiscount\", // TODO\r\n            text: badge.label,\r\n        };\r\n    }\r\n};\r\n","<template>\r\n  <a\r\n    :href=\"product.link\"\r\n    tabindex=\"0\"\r\n    @click=\"notifyClick($event, product)\"\r\n    @click.middle=\"notifyClick($event, product)\"\r\n    @click.right=\"notifyClick($event, product)\"\r\n    class=\"quicksearch-panel__product\"\r\n  >\r\n    <!-- Item -->\r\n    <article class=\"quicksearch-product-item\">\r\n      <!-- Image -->\r\n      <div class=\"quicksearch-product-item__image\">\r\n        <img :src=\"product.imageInfo.thumbnail\" :alt=\"product.title\" />\r\n      </div>\r\n      <!-- Info -->\r\n      <div class=\"quicksearch-product-item__text\">\r\n        <!-- Heading -->\r\n        <h4 class=\"quicksearch-product-item__heading\">\r\n          <span>{{ product.title }}</span>\r\n        </h4>\r\n        <!-- Badge -->\r\n        <template v-if=\"promotion\">\r\n          <span :class=\"`label ${promotion.className} label--inline`\">{{\r\n            promotion.text\r\n          }}</span>\r\n        </template>\r\n        <!-- Price -->\r\n        <div class=\"quicksearch-product-item__price\">\r\n          <div v-if=\"price\" class=\"price price\">{{ price }}</div>\r\n          <div v-if=\"newPrice\" class=\"price price--new\">{{ newPrice }}</div>\r\n          <div v-if=\"oldPrice\" class=\"price price--old\">\r\n            {{ oldPrice }}\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </article>\r\n  </a>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { notifyClick } from \"../../mixins/notifyClick\";\r\nimport { computePromotion } from \"../../mixins/productBadge.mixin\";\r\nimport {\r\n  computePrice,\r\n  computeNewPrice,\r\n  computeOldPrice,\r\n} from \"../../mixins/productPrice.mixin\";\r\nimport { Product } from \"../../services/search.service\";\r\nimport { computed } from \"vue\";\r\n\r\n/*  mixins: [\r\n        NotifyClick,\r\n        ProductBadge,\r\n        ProductPrice,\r\n    ], */\r\nconst props = defineProps<{\r\n  product: Product;\r\n}>();\r\n\r\nconst promotion = computed(() => computePromotion(props.product));\r\n\r\nconst newPrice = computed(() => computeNewPrice(props.product));\r\n\r\nconst oldPrice = computed(() => computeOldPrice(props.product));\r\n\r\nconst price = computed(() => computePrice(props.product));\r\n</script>\r\n","<template>\r\n  <div class=\"quicksearch-wrapper\" @keydown.esc=\"$emit('keydownEsc', $event)\">\r\n    <!-- Search form -->\r\n    <form role=\"search\" @submit=\"clickSearch($event)\">\r\n      <div class=\"l__content\">\r\n        <div :class=\"`quicksearch ${className}`\">\r\n          <label\r\n            id=\"sok\"\r\n            for=\"quickSearchInput\"\r\n            class=\"sr-only quicksearch__label\"\r\n          >\r\n            {{ $t(\"searchLabel\") }}\r\n          </label>\r\n          <!-- Input: Search -->\r\n          <input\r\n            id=\"quickSearchInput\"\r\n            ref=\"input\"\r\n            type=\"search\"\r\n            class=\"quicksearch__input\"\r\n            autocomplete=\"off\"\r\n            :value=\"inputQuery\"\r\n            :placeholder=\"placeholder\"\r\n            :disabled=\"disabled\"\r\n            @input=\"change($event)\"\r\n            @focus=\"$emit('inputFocus', $event)\"\r\n          />\r\n          <!-- Button: Submit -->\r\n          <button\r\n            type=\"submit\"\r\n            :aria-label=\"$tc('searchButton')\"\r\n            :title=\"$tc('searchButton')\"\r\n            class=\"btn btn--icon quicksearch__label\"\r\n            :disabled=\"disabled\"\r\n            @click=\"clickSearch($event)\"\r\n          >\r\n            <Icon :type=\"IconTypes.Search\" :size=\"IconSizes.Small\" />\r\n          </button>\r\n        </div>\r\n      </div>\r\n    </form>\r\n    <!-- Result panel -->\r\n    <div\r\n      v-if=\"autocompleteResult && hasAnyHits\"\r\n      class=\"quicksearch-panel-wrapper\"\r\n      :class=\"{\r\n        'quicksearch-panel-wrapper--absolute': absolutePanel,\r\n        'quicksearch-panel-wrapper--hidden': isResultsHidden,\r\n      }\"\r\n    >\r\n      <div class=\"quicksearch-panel\">\r\n        <!-- Suggestions -->\r\n        <div\r\n          v-if=\"autocompleteResult.phraseSuggestions.length > 0\"\r\n          class=\"quicksearch-panel__section\"\r\n        >\r\n          <h3 class=\"sr-only\">\r\n            {{ $t(\"suggestions\") }}\r\n          </h3>\r\n          <ul>\r\n            <li\r\n              v-for=\"(\r\n                suggestion, index\r\n              ) in autocompleteResult.phraseSuggestions\"\r\n              :key=\"`${index}-${suggestion.q}`\"\r\n            >\r\n              <Suggestion\r\n                :search-page-url=\"searchPageUrl\"\r\n                :suggestion=\"suggestion\"\r\n                @click=\"clickSuggestion\"\r\n              />\r\n            </li>\r\n          </ul>\r\n        </div>\r\n        <!-- Products -->\r\n        <div\r\n          v-if=\"autocompleteResult.productSuggestions.length > 0\"\r\n          class=\"quicksearch-panel__section quicksearch-panel__section--products\"\r\n        >\r\n          <h3 class=\"quicksearch-panel__heading u-trailer-half\">\r\n            {{ $t(\"recommendedProducts\") }}\r\n          </h3>\r\n          <ul>\r\n            <template\r\n              v-for=\"productSuggestion in autocompleteResult.productSuggestions\"\r\n            >\r\n              <template\r\n                v-if=\"\r\n                  productSuggestion.products && productSuggestion.products[0]\r\n                \"\r\n              >\r\n                <li\r\n                  :key=\"`${productSuggestion.key}-${productSuggestion.products[0].key}`\"\r\n                >\r\n                  <Product :product=\"productSuggestion.products[0]\" />\r\n                </li>\r\n              </template>\r\n            </template>\r\n          </ul>\r\n        </div>\r\n        <!-- Articles -->\r\n        <div\r\n          v-if=\"articles && articles.length > 0\"\r\n          class=\"quicksearch-panel__section quicksearch-panel__section--links\"\r\n        >\r\n          <h3 class=\"quicksearch-panel__heading\">\r\n            {{ $t(\"articles\") }}\r\n          </h3>\r\n          <ul>\r\n            <li v-for=\"article in articles\" :key=\"article.key\">\r\n              <a\r\n                :href=\"article.link\"\r\n                @click=\"notifyClick($event, article)\"\r\n                @click.middle=\"notifyClick($event, article)\"\r\n                @click.right=\"notifyClick($event, article)\"\r\n                class=\"quicksearch-panel__article\"\r\n              >\r\n                {{ article.title }}\r\n              </a>\r\n            </li>\r\n          </ul>\r\n        </div>\r\n        <!-- Stores -->\r\n        <div\r\n          v-if=\"stores && stores.length > 0\"\r\n          class=\"quicksearch-panel__section quicksearch-panel__section--links\"\r\n        >\r\n          <h3 class=\"quicksearch-panel__heading\">\r\n            {{ $t(\"stores\") }}\r\n          </h3>\r\n          <ul>\r\n            <li v-for=\"store in stores\" :key=\"store.key\">\r\n              <a\r\n                :href=\"store.link\"\r\n                @click=\"notifyClick($event, store)\"\r\n                @click.middle=\"notifyClick($event, store)\"\r\n                @click.right=\"notifyClick($event, store)\"\r\n              >\r\n                {{ store.title }}\r\n              </a>\r\n            </li>\r\n          </ul>\r\n        </div>\r\n      </div>\r\n      <!-- Total hits -->\r\n      <div\r\n        v-if=\"autocompleteResult && autocompleteResult.totalHits > 0\"\r\n        class=\"quicksearch-panel-button\"\r\n      >\r\n        <router-link\r\n          v-if=\"hasRouter\"\r\n          :to=\"totalHitsUrl\"\r\n          type=\"button\"\r\n          class=\"btn btn--profile btn--small\"\r\n          @click.native=\"clickTotalHits()\"\r\n        >\r\n          {{ $t(\"showAll\") }} ({{ autocompleteResult.totalHits }})\r\n        </router-link>\r\n        <a\r\n          v-else\r\n          :href=\"totalHitsUrl\"\r\n          type=\"button\"\r\n          class=\"btn btn--profile btn--small\"\r\n          @click=\"clickTotalHits()\"\r\n        >\r\n          {{ $t(\"showAll\") }} ({{ autocompleteResult.totalHits }})\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref, watch, computed, onMounted } from \"vue\";\r\nimport { useRoute, useRouter } from \"vue-router\";\r\nimport axios, { CancelTokenSource } from \"axios\";\r\nimport { notifyClick } from \"../../mixins/notifyClick\";\r\nimport { getTotalHitsUrl } from \"./quickSearch.utils\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport Suggestion from \"./suggestion.vue\";\r\nimport Product from \"./product.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport SearchService, {\r\n  AutocompleteResult,\r\n  CONTENT_LIST_ARTICLES,\r\n  CONTENT_LIST_STORES,\r\n  ContentList,\r\n  ContentItem,\r\n} from \"../../services/search.service\";\r\n\r\nconst CANCEL_AUTOCOMPLETE_REQUEST = \"CancelAutoCompleteRequest\";\r\n\r\nconst props = defineProps<{\r\n  className?: string;\r\n  absolutePanel?: boolean;\r\n  searchPageUrl: string;\r\n  placeholder?: string;\r\n  resetOnSearch?: boolean;\r\n  disabled?: boolean;\r\n  isResultsHidden?: boolean;\r\n}>();\r\n\r\nconst inputQuery = ref(\"\");\r\nconst input = ref(null as HTMLInputElement | null);\r\nconst autocompleteResult = ref(null as AutocompleteResult | null);\r\nconst cancelTokenSource = ref(null as CancelTokenSource | null);\r\n\r\nconst emit = defineEmits<{\r\n  (e: \"input\", inputQuery: string): void;\r\n  (e: \"clickSearch\", inputQuery: string): void;\r\n  (e: \"clickSuggestion\"): void;\r\n}>();\r\n\r\ndefineExpose({\r\n  input,\r\n});\r\n\r\nwatch(inputQuery, (input) => {\r\n  emit(\"input\", input);\r\n});\r\nlet route;\r\nlet router;\r\ntry {\r\n  route = useRoute();\r\n  router = useRouter();\r\n} catch (error) {\r\n  route = null;\r\n  router = null;\r\n}\r\n\r\nconst hasRouter = computed((): boolean => {\r\n  return !!router;\r\n});\r\nconst totalHitsUrl = computed((): string => {\r\n  return getTotalHitsUrl(\r\n    route ? route.query.PREVIEW : undefined,\r\n    route ? \"/\" : props.searchPageUrl,\r\n    inputQuery.value,\r\n  );\r\n});\r\nconst articles = computed((): Array<ContentItem> | undefined => {\r\n  return getContentItems(autocompleteResult.value, CONTENT_LIST_ARTICLES);\r\n});\r\nconst stores = computed((): Array<ContentItem> | undefined => {\r\n  return getContentItems(autocompleteResult.value, CONTENT_LIST_STORES);\r\n});\r\nconst hasAnyHits = computed((): boolean => {\r\n  return (\r\n    !!autocompleteResult.value &&\r\n    (autocompleteResult.value.phraseSuggestions.length > 0 ||\r\n      autocompleteResult.value.productSuggestions.length > 0 ||\r\n      (!!articles.value && articles.value.length > 0) ||\r\n      (!!stores.value && stores.value.length > 0))\r\n  );\r\n});\r\n\r\nonMounted(() => {\r\n  autocomplete();\r\n});\r\n\r\n/**\r\n * Click search\r\n */\r\nfunction clickSearch(e: Event) {\r\n  e.preventDefault();\r\n\r\n  if (router) {\r\n    router.push(addLeadingSlashIfNeeded(totalHitsUrl.value));\r\n  } else {\r\n    window.location.href = addLeadingSlashIfNeeded(totalHitsUrl.value);\r\n  }\r\n\r\n  emit(\"clickSearch\", inputQuery.value);\r\n\r\n  if (props.resetOnSearch === true) {\r\n    inputQuery.value = \"\";\r\n    autocompleteResult.value = null;\r\n\r\n    cancelRequest();\r\n  }\r\n  (input.value as HTMLInputElement).blur();\r\n}\r\n/**\r\n * Click total hits\r\n */\r\nfunction clickTotalHits() {\r\n  emit(\"clickSearch\", inputQuery.value);\r\n\r\n  if (props.resetOnSearch === true) {\r\n    inputQuery.value = \"\";\r\n    autocompleteResult.value = null;\r\n\r\n    cancelRequest();\r\n  }\r\n\r\n  (input.value as HTMLInputElement).blur();\r\n}\r\n/**\r\n * Change\r\n */\r\nfunction change(event: Event) {\r\n  inputQuery.value = (event.target as HTMLInputElement).value;\r\n\r\n  autocomplete();\r\n}\r\n/**\r\n * Cancel request\r\n */\r\nfunction cancelRequest() {\r\n  if (cancelTokenSource.value) {\r\n    cancelTokenSource.value.cancel(CANCEL_AUTOCOMPLETE_REQUEST); // Cancel previous request\r\n\r\n    cancelTokenSource.value = null;\r\n  }\r\n}\r\n/**\r\n * Autocomplete\r\n */\r\nfunction autocomplete() {\r\n  cancelRequest();\r\n\r\n  if (!inputQuery.value) {\r\n    return (autocompleteResult.value = null);\r\n  }\r\n\r\n  const localCancelTokenSource = (cancelTokenSource.value =\r\n    axios.CancelToken.source());\r\n\r\n  const searchPromise = SearchService.autocomplete(\r\n    localCancelTokenSource,\r\n    inputQuery.value,\r\n  );\r\n\r\n  searchPromise\r\n    .then((result) => {\r\n      autocompleteResult.value = result.data;\r\n    })\r\n    .catch((error) => {\r\n      autocompleteResult.value = null;\r\n\r\n      if (error.message !== CANCEL_AUTOCOMPLETE_REQUEST) {\r\n        console.error(error);\r\n      }\r\n    });\r\n}\r\n/**\r\n * Click suggestion\r\n */\r\nfunction clickSuggestion() {\r\n  if (props.resetOnSearch === true) {\r\n    inputQuery.value = \"\";\r\n    autocompleteResult.value = null;\r\n\r\n    cancelRequest();\r\n  }\r\n\r\n  emit(\"clickSuggestion\");\r\n}\r\n\r\nfunction getContentItems(\r\n  searchResult: AutocompleteResult | null,\r\n  contentListId: string,\r\n): Array<ContentItem> | undefined {\r\n  if (!searchResult) {\r\n    return;\r\n  }\r\n\r\n  const contentList = searchResult.contentLists.find(\r\n    (contentList: ContentList) => {\r\n      return contentList.id === contentListId;\r\n    },\r\n  );\r\n\r\n  if (!contentList || !contentList.items) {\r\n    return;\r\n  }\r\n\r\n  return contentList.items;\r\n}\r\n\r\nfunction addLeadingSlashIfNeeded(url: string): string {\r\n  if (url[0] && url[0] !== \"/\") {\r\n    return \"/\" + url;\r\n  }\r\n\r\n  return url;\r\n}\r\n</script>\r\n","<template>\r\n  <div>\r\n    <!-- Button: SR-toggle -->\r\n    <div id=\"app-quicksearch-sr\">\r\n      <button\r\n        role=\"button\"\r\n        class=\"sr-only sr-only--selectable\"\r\n        aria-controls=\"app-quicksearch-container\"\r\n        :aria-expanded=\"isExpanded\"\r\n        @click=\"clickOpen($event)\"\r\n      >\r\n        {{ $t(\"goToSearchSr\") }}\r\n      </button>\r\n    </div>\r\n    <!-- Button: Toggle -->\r\n    <div class=\"page-actions__search\">\r\n      <button\r\n        role=\"button\"\r\n        class=\"page-actions__search btn--search\"\r\n        :aria-label=\"$tc('searchButton')\"\r\n        :title=\"$tc('searchButton')\"\r\n        @click=\"clickOpen($event)\"\r\n      >\r\n        <Icon :type=\"IconTypes.Search\" :size=\"IconSizes.Small\" />\r\n        <span class=\"page-actions__action-label u-hide-for-medium-down\"\r\n          >Søk</span\r\n        >\r\n      </button>\r\n    </div>\r\n    <!-- Modal: Quick search -->\r\n    <div\r\n      id=\"app-quicksearch-container\"\r\n      ref=\"searchContainer\"\r\n      class=\"quicksearch-container\"\r\n      @keydown.esc=\"clickClose($event)\"\r\n    >\r\n      <Transition name=\"quicksearch-slide\">\r\n        <div v-show=\"isExpanded\" class=\"u-bg-neutral quicksearch__content\">\r\n          <!-- Button: Close -->\r\n          <button\r\n            type=\"button\"\r\n            class=\"btn btn--small quicksearch__close\"\r\n            :aria-label=\"$tc('close')\"\r\n            @click=\"clickClose\"\r\n          >\r\n            <Icon :type=\"IconTypes.Close\" :size=\"IconSizes.Small\" />\r\n          </button>\r\n          <!-- Quick search -->\r\n          <QuickSearch\r\n            ref=\"quickSearch\"\r\n            class-name=\"search-form u-text-center\"\r\n            :search-page-url=\"searchPageUrl\"\r\n            @clickSearch=\"setIsExpanded(false)\"\r\n            @clickSuggestion=\"setIsExpanded(false)\"\r\n          />\r\n        </div>\r\n      </Transition>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport Vue, { nextTick, onMounted, ref } from \"vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport QuickSearch from \"../../components/quickSearch/quickSearch.vue\";\r\n\r\ndefineProps<{\r\n  searchPageUrl: string;\r\n}>();\r\n\r\nconst isExpanded = ref<boolean>();\r\n\r\nconst quickSearch = ref(null);\r\nconst searchContainer = ref(null);\r\n\r\nonMounted(() => {\r\n  document.addEventListener(\"click\", (e: Event) => {\r\n    if (\r\n      searchContainer.value &&\r\n      (searchContainer.value as HTMLElement).contains(e.target as Node) ===\r\n        false\r\n    ) {\r\n      setIsExpanded(false);\r\n    }\r\n  });\r\n});\r\n\r\n/**\r\n * Click open\r\n */\r\nconst clickOpen = (e: Event) => {\r\n  e.preventDefault();\r\n  e.stopPropagation();\r\n\r\n  isExpanded.value = true;\r\n\r\n  nextTick(() => {\r\n    if (quickSearch.value && (quickSearch.value as Vue).$refs.input) {\r\n      ((quickSearch.value as Vue).$refs.input as HTMLInputElement).focus();\r\n    }\r\n  });\r\n};\r\n/**\r\n * Click close\r\n */\r\nfunction clickClose(e: Event) {\r\n  e.preventDefault();\r\n\r\n  isExpanded.value = false;\r\n\r\n  if (quickSearch.value && (quickSearch.value as Vue).$refs.input) {\r\n    ((quickSearch.value as Vue).$refs.input as HTMLInputElement).blur();\r\n  }\r\n}\r\n\r\n/**\r\n * Set is expanded\r\n */\r\nfunction setIsExpanded(expandedState: boolean) {\r\n  isExpanded.value = expandedState;\r\n}\r\n</script>\r\n","<template>\r\n  <div v-if=\"format.values\">\r\n    <label\r\n      v-for=\"value in format.values\"\r\n      :key=\"value.id\"\r\n      class=\"checkbox product-filter__checkbox checkbox product-filter__checkbox--sizes\"\r\n    >\r\n      <input\r\n        type=\"checkbox\"\r\n        :name=\"`facet${facet.id}`\"\r\n        :value=\"value.id\"\r\n        :checked=\"isSelected(value, selectedValues)\"\r\n        @change=\"change(value, $event)\"\r\n        @keyup.enter=\"$emit('enter', $event)\"\r\n      />\r\n      <span>{{ formatLabel(value.label) }} ({{ value.count }})</span>\r\n    </label>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport { FacetValue } from \"../../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  props: {\r\n    selectedValues: Array,\r\n    facet: Object,\r\n    format: Function,\r\n  },\r\n  methods: {\r\n    /**\r\n     * Is selected?\r\n     */\r\n    isSelected(value) {\r\n      return this?.selectedValues?.indexOf(value.id) !== -1;\r\n    },\r\n    /**\r\n     * Change\r\n     */\r\n    change(facetValue: FacetValue, event: Event) {\r\n      this.$emit(\"selectValue\", {\r\n        facetValue,\r\n        state: (event.target as HTMLInputElement).checked,\r\n      });\r\n    },\r\n    /**\r\n     * Format label\r\n     */\r\n    formatLabel(label: string) {\r\n      return formatMatrixSizeLabel(\r\n        label,\r\n        this.$t(\"matrixWidth\"),\r\n        this.$t(\"matrixLength\"),\r\n      );\r\n    },\r\n  },\r\n});\r\n\r\n/**\r\n * Format matrix size label\r\n */\r\nexport function formatMatrixSizeLabel(label: string, wText, lText): string {\r\n  let w, l;\r\n\r\n  if (label.length === 3) {\r\n    w = label.substring(0, 1);\r\n    l = label.substring(1);\r\n  } else {\r\n    w = label.substring(0, 2);\r\n    l = label.substring(2);\r\n  }\r\n\r\n  return `${wText}: ${w} / ${lText}: ${l}`;\r\n}\r\n</script>\r\n","<template>\r\n  <div v-if=\"format.values\">\r\n    <label\r\n      v-for=\"value in format.values\"\r\n      :key=\"value.id\"\r\n      class=\"checkbox product-filter__checkbox checkbox product-filter__checkbox--sizes\"\r\n    >\r\n      <input\r\n        type=\"checkbox\"\r\n        :name=\"`facet${facet.id}`\"\r\n        :value=\"value.id\"\r\n        :checked=\"isSelected(value, selectedValues)\"\r\n        @change=\"change(value, $event)\"\r\n        @keyup.enter=\"$emit('enter', $event)\"\r\n      />\r\n      <span>{{ formatLabel(value.label) }} ({{ value.count }})</span>\r\n    </label>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport { FacetValue } from \"../../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  props: {\r\n    selectedValues: Array,\r\n    facet: Object,\r\n    format: Function,\r\n  },\r\n  methods: {\r\n    /**\r\n     * Is selected?\r\n     */\r\n    isSelected(value) {\r\n      return this?.selectedValues?.indexOf(value.id) !== -1;\r\n    },\r\n    /**\r\n     * Change\r\n     */\r\n    change(facetValue: FacetValue, event: Event) {\r\n      this.$emit(\"selectValue\", {\r\n        facetValue,\r\n        state: (event.target as HTMLInputElement).checked,\r\n      });\r\n    },\r\n    /**\r\n     * Format label\r\n     */\r\n    formatLabel(label: string) {\r\n      return formatMatrixSizeLabel(\r\n        label,\r\n        this.$t(\"matrixWidth\"),\r\n        this.$t(\"matrixLength\"),\r\n      );\r\n    },\r\n  },\r\n});\r\n\r\n/**\r\n * Format matrix size label\r\n */\r\nexport function formatMatrixSizeLabel(label: string, wText, lText): string {\r\n  let w, l;\r\n\r\n  if (label.length === 3) {\r\n    w = label.substring(0, 1);\r\n    l = label.substring(1);\r\n  } else {\r\n    w = label.substring(0, 2);\r\n    l = label.substring(2);\r\n  }\r\n\r\n  return `${wText}: ${w} / ${lText}: ${l}`;\r\n}\r\n</script>\r\n","<template>\r\n  <div class=\"product-filter__group-wrapper\">\r\n    <fieldset\r\n      v-for=\"group in groups\"\r\n      v-if=\"group.values.length > 0\"\r\n      :key=\"group.heading\"\r\n      class=\"product-filter__group\"\r\n    >\r\n      <legend class=\"product-filter__group-heading\">{{ group.heading }}</legend>\r\n      <label\r\n        v-for=\"value in group.values\"\r\n        :key=\"value.id\"\r\n        class=\"checkbox product-filter__checkbox checkbox product-filter__checkbox--sizes\"\r\n      >\r\n        <input\r\n          type=\"checkbox\"\r\n          :name=\"`facet${facet.id}`\"\r\n          :value=\"value.id\"\r\n          :checked=\"isSelected(value, selectedValues)\"\r\n          @change=\"change(value, $event)\"\r\n          @keyup.enter=\"$emit('enter', $event)\"\r\n        />\r\n        <span>{{ formatLabel(value.label) }} ({{ value.count }})</span>\r\n      </label>\r\n    </fieldset>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport { Format, FacetValue } from \"../../../services/search.service\";\r\n\r\ninterface Group {\r\n  heading: string;\r\n  values: Array<FacetValue>;\r\n}\r\n\r\ninterface Groups {\r\n  b1?: Group;\r\n  b2?: Group;\r\n  b3?: Group;\r\n  c1?: Group;\r\n  other?: Group;\r\n}\r\n\r\nexport default defineComponent({\r\n  props: {\r\n    selectedValues: Array,\r\n    facet: Object,\r\n    format: Function,\r\n  },\r\n  computed: {\r\n    groups(): Groups {\r\n      return {\r\n        b1: {\r\n          heading: this.$t(\"suitB1\").toString(),\r\n          values: getValuesForGroups(this.format, [\"b1\"]),\r\n        },\r\n        b2: {\r\n          heading: this.$t(\"suitB2\").toString(),\r\n          values: getValuesForGroups(this.format, [\"b2\"]),\r\n        },\r\n        b3: {\r\n          heading: this.$t(\"suitB3\").toString(),\r\n          values: getValuesForGroups(this.format, [\"b3\"]),\r\n        },\r\n        c1: {\r\n          heading: this.$t(\"suitC1\").toString(),\r\n          values: getValuesForGroups(this.format, [\"c1\"]),\r\n        },\r\n        other: {\r\n          // There shouldn't really be any other suit sizes, but just in case.\r\n          heading: \"\",\r\n          values: getValuesNotInGroup(this.format, [\"b1\", \"b2\", \"b3\", \"c1\"]),\r\n        },\r\n      };\r\n    },\r\n  },\r\n  methods: {\r\n    /**\r\n     * Is selected?\r\n     */\r\n    isSelected(value) {\r\n      return this.selectedValues.indexOf(value.id) !== -1;\r\n    },\r\n    /**\r\n     * Change\r\n     */\r\n    change(facetValue: FacetValue, event: Event) {\r\n      this.$emit(\"selectValue\", {\r\n        facetValue,\r\n        state: (<HTMLInputElement>event.target).checked,\r\n      });\r\n    },\r\n    /**\r\n     * Format label\r\n     */\r\n    formatLabel(label: string) {\r\n      return `${label.substring(0, 2)}/${label.substring(2)}`;\r\n    },\r\n  },\r\n});\r\n\r\n/**\r\n * Get values for groups\r\n *\r\n * Search facet values for labels beginning with <groupKey>. Such as:\r\n *\r\n * Get values for group B1:\r\n *\r\n * B156 -> true\r\n * B154 -> true\r\n * B152 -> true\r\n * B256 -> false\r\n * C156 -> false\r\n */\r\nfunction getValuesForGroups(\r\n  format: Format,\r\n  groupKeys: Array<string>,\r\n): Array<FacetValue> {\r\n  const values: Array<FacetValue> = [];\r\n\r\n  groupKeys.forEach((groupKey) => {\r\n    format.values.forEach((value: FacetValue) => {\r\n      if (value.label.toLowerCase().indexOf(groupKey.toLowerCase()) !== -1) {\r\n        values.push(value);\r\n      }\r\n    });\r\n  });\r\n\r\n  return values;\r\n}\r\n\r\n/**\r\n * Get values not in group\r\n */\r\nfunction getValuesNotInGroup(\r\n  format: Format,\r\n  groupKeys: Array<string>,\r\n): Array<FacetValue> {\r\n  return format.values.filter((value: FacetValue) => {\r\n    let notInGroup = true;\r\n\r\n    groupKeys.forEach((groupKey) => {\r\n      if (value.label.toLowerCase().indexOf(groupKey.toLowerCase()) !== -1) {\r\n        notInGroup = false;\r\n      }\r\n    });\r\n\r\n    return notInGroup;\r\n  });\r\n}\r\n</script>\r\nfunction defineComponent(arg0: { props: { selectedValues: ArrayConstructor;\r\nfacet: ObjectConstructor; format: FunctionConstructor; }; computed: { groups():\r\nGroups; }; methods: { ...; }; }) { throw new Error(\"Function not implemented.\");\r\n}\r\n","<template>\r\n  <div class=\"product-filter__group-wrapper\">\r\n    <fieldset\r\n      v-for=\"group in groups\"\r\n      v-if=\"group.values.length > 0\"\r\n      :key=\"group.heading\"\r\n      class=\"product-filter__group\"\r\n    >\r\n      <legend class=\"product-filter__group-heading\">{{ group.heading }}</legend>\r\n      <label\r\n        v-for=\"value in group.values\"\r\n        :key=\"value.id\"\r\n        class=\"checkbox product-filter__checkbox checkbox product-filter__checkbox--sizes\"\r\n      >\r\n        <input\r\n          type=\"checkbox\"\r\n          :name=\"`facet${facet.id}`\"\r\n          :value=\"value.id\"\r\n          :checked=\"isSelected(value, selectedValues)\"\r\n          @change=\"change(value, $event)\"\r\n          @keyup.enter=\"$emit('enter', $event)\"\r\n        />\r\n        <span>{{ formatLabel(value.label) }} ({{ value.count }})</span>\r\n      </label>\r\n    </fieldset>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport { Format, FacetValue } from \"../../../services/search.service\";\r\n\r\ninterface Group {\r\n  heading: string;\r\n  values: Array<FacetValue>;\r\n}\r\n\r\ninterface Groups {\r\n  b1?: Group;\r\n  b2?: Group;\r\n  b3?: Group;\r\n  c1?: Group;\r\n  other?: Group;\r\n}\r\n\r\nexport default defineComponent({\r\n  props: {\r\n    selectedValues: Array,\r\n    facet: Object,\r\n    format: Function,\r\n  },\r\n  computed: {\r\n    groups(): Groups {\r\n      return {\r\n        b1: {\r\n          heading: this.$t(\"suitB1\").toString(),\r\n          values: getValuesForGroups(this.format, [\"b1\"]),\r\n        },\r\n        b2: {\r\n          heading: this.$t(\"suitB2\").toString(),\r\n          values: getValuesForGroups(this.format, [\"b2\"]),\r\n        },\r\n        b3: {\r\n          heading: this.$t(\"suitB3\").toString(),\r\n          values: getValuesForGroups(this.format, [\"b3\"]),\r\n        },\r\n        c1: {\r\n          heading: this.$t(\"suitC1\").toString(),\r\n          values: getValuesForGroups(this.format, [\"c1\"]),\r\n        },\r\n        other: {\r\n          // There shouldn't really be any other suit sizes, but just in case.\r\n          heading: \"\",\r\n          values: getValuesNotInGroup(this.format, [\"b1\", \"b2\", \"b3\", \"c1\"]),\r\n        },\r\n      };\r\n    },\r\n  },\r\n  methods: {\r\n    /**\r\n     * Is selected?\r\n     */\r\n    isSelected(value) {\r\n      return this.selectedValues.indexOf(value.id) !== -1;\r\n    },\r\n    /**\r\n     * Change\r\n     */\r\n    change(facetValue: FacetValue, event: Event) {\r\n      this.$emit(\"selectValue\", {\r\n        facetValue,\r\n        state: (<HTMLInputElement>event.target).checked,\r\n      });\r\n    },\r\n    /**\r\n     * Format label\r\n     */\r\n    formatLabel(label: string) {\r\n      return `${label.substring(0, 2)}/${label.substring(2)}`;\r\n    },\r\n  },\r\n});\r\n\r\n/**\r\n * Get values for groups\r\n *\r\n * Search facet values for labels beginning with <groupKey>. Such as:\r\n *\r\n * Get values for group B1:\r\n *\r\n * B156 -> true\r\n * B154 -> true\r\n * B152 -> true\r\n * B256 -> false\r\n * C156 -> false\r\n */\r\nfunction getValuesForGroups(\r\n  format: Format,\r\n  groupKeys: Array<string>,\r\n): Array<FacetValue> {\r\n  const values: Array<FacetValue> = [];\r\n\r\n  groupKeys.forEach((groupKey) => {\r\n    format.values.forEach((value: FacetValue) => {\r\n      if (value.label.toLowerCase().indexOf(groupKey.toLowerCase()) !== -1) {\r\n        values.push(value);\r\n      }\r\n    });\r\n  });\r\n\r\n  return values;\r\n}\r\n\r\n/**\r\n * Get values not in group\r\n */\r\nfunction getValuesNotInGroup(\r\n  format: Format,\r\n  groupKeys: Array<string>,\r\n): Array<FacetValue> {\r\n  return format.values.filter((value: FacetValue) => {\r\n    let notInGroup = true;\r\n\r\n    groupKeys.forEach((groupKey) => {\r\n      if (value.label.toLowerCase().indexOf(groupKey.toLowerCase()) !== -1) {\r\n        notInGroup = false;\r\n      }\r\n    });\r\n\r\n    return notInGroup;\r\n  });\r\n}\r\n</script>\r\nfunction defineComponent(arg0: { props: { selectedValues: ArrayConstructor;\r\nfacet: ObjectConstructor; format: FunctionConstructor; }; computed: { groups():\r\nGroups; }; methods: { ...; }; }) { throw new Error(\"Function not implemented.\");\r\n}\r\n","<template>\r\n  <fieldset\r\n    v-if=\"isVisible\"\r\n    :aria-labelledby=\"labelId\"\r\n    :class=\"{\r\n      'is-expanded': isExpanded,\r\n    }\"\r\n    class=\"product-filter\"\r\n    role=\"group\"\r\n  >\r\n    <!-- Trigger -->\r\n    <button\r\n      :id=\"labelId\"\r\n      :aria-controls=\"filterId\"\r\n      :aria-expanded=\"isExpanded\"\r\n      class=\"product-filter__heading u-hide-for-small\"\r\n      @click=\"clickToggle\"\r\n    >\r\n      {{ facet.label }}\r\n    </button>\r\n    <legend class=\"u-hide-for-small sr-only\">\r\n      {{ facet.label }}\r\n    </legend>\r\n    <legend class=\"product-filter__heading u-hide-for-medium\">\r\n      {{ facet.label }}\r\n    </legend>\r\n    <!-- Dropdown -->\r\n    <div\r\n      :id=\"filterId\"\r\n      class=\"product-filter__content\"\r\n      :class=\"{\r\n        'product-filter__content--grid':\r\n          facet.type === FacetTypes.Color || facet.type === FacetTypes.Text,\r\n      }\"\r\n    >\r\n      <!-- Facet type: Color/text -->\r\n      <template\r\n        v-if=\"facet.type === FacetTypes.Color || facet.type === FacetTypes.Text\"\r\n      >\r\n        <label\r\n          v-for=\"value in facet.values\"\r\n          :key=\"value.id\"\r\n          class=\"checkbox product-filter__checkbox\"\r\n        >\r\n          <input\r\n            v-model=\"selectedValues\"\r\n            type=\"checkbox\"\r\n            :name=\"`facet${facet.id}`\"\r\n            :value=\"value.id\"\r\n            @change=\"change()\"\r\n            @keyup.enter=\"clickUseFilter($event)\"\r\n          />\r\n          <span>{{ value.label }} ({{ value.count }})</span>\r\n        </label>\r\n      </template>\r\n      <!-- Facet type: Size -->\r\n      <template v-if=\"facet.type === FacetTypes.Size\">\r\n        <fieldset v-for=\"sizeType in facet.sizeTypes\" :key=\"sizeType.id\">\r\n          <div v-for=\"format in sizeType.formats\" :key=\"format.id\">\r\n            <!-- Suit sizes -->\r\n            <template v-if=\"isSuitFormat(sizeType)\">\r\n              <SuitSizes\r\n                :selected-values=\"selectedValues\"\r\n                :facet=\"facet\"\r\n                :format=\"format\"\r\n                @selectValue=\"selectValue($event)\"\r\n                @enter=\"clickUseFilter($event)\"\r\n              />\r\n            </template>\r\n            <!-- Matrix sizes -->\r\n            <template v-else-if=\"isMatrixFormat(sizeType)\">\r\n              <MatrixSizes\r\n                :selected-values=\"selectedValues\"\r\n                :facet=\"facet\"\r\n                :format=\"format\"\r\n                @selectValue=\"selectValue($event)\"\r\n                @enter=\"clickUseFilter($event)\"\r\n              />\r\n            </template>\r\n            <!-- Default -->\r\n            <template v-else>\r\n              <label\r\n                v-for=\"value in format.values\"\r\n                :key=\"value.id\"\r\n                class=\"checkbox product-filter__checkbox checkbox product-filter__checkbox--sizes\"\r\n              >\r\n                <input\r\n                  v-model=\"selectedValues\"\r\n                  type=\"checkbox\"\r\n                  :name=\"`facet${facet.id}`\"\r\n                  :value=\"value.id\"\r\n                  @change=\"change()\"\r\n                  @keyup.enter=\"clickUseFilter($event)\"\r\n                />\r\n                <span>{{ value.label }} ({{ value.count }})</span>\r\n              </label>\r\n            </template>\r\n          </div>\r\n        </fieldset>\r\n      </template>\r\n      <!-- Use button -->\r\n      <div class=\"product-filter__facetsubmit\">\r\n        <button\r\n          class=\"btn btn--profile btn--small\"\r\n          @click=\"clickUseFilter($event)\"\r\n        >\r\n          {{ $t(\"useFilter\") }}\r\n        </button>\r\n      </div>\r\n    </div>\r\n  </fieldset>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref, computed, watch } from \"vue\";\r\nimport {\r\n  FacetTypes,\r\n  FacetValue,\r\n  SizeType,\r\n} from \"../../services/search.service\";\r\nimport { getSelectedValueIdsFromFacet } from \"../../utils/search.utils\";\r\nimport MatrixSizes from \"./facetFormats/matrixSizes.vue\";\r\nimport SuitSizes from \"./facetFormats/suitSizes.vue\";\r\nimport { Facet } from \"../../services/search.service\";\r\n\r\nconst props = defineProps<{\r\n  isExpanded: boolean;\r\n  facet: Facet;\r\n}>();\r\n\r\nconst selectedValues = ref([] as Array<string>);\r\nconst initialSelectedValues = ref([] as Array<string>);\r\n\r\nconst emit = defineEmits<{\r\n  (e: \"expand\", id: string): void;\r\n  (\r\n    e: \"upsertFacet\",\r\n    facet: { facet: Facet; selectedValues: Array<string> },\r\n  ): void;\r\n  (e: \"useFilter\"): void;\r\n}>();\r\n\r\nconst labelId = computed((): string => {\r\n  return `facetLabel-${props.facet.id}`;\r\n});\r\nconst filterId = computed((): string => {\r\n  return `facetFilter-${props.facet.id}`;\r\n});\r\nconst isVisible = computed((): boolean => {\r\n  switch (props.facet.type) {\r\n    case FacetTypes.Color:\r\n      return (props.facet.values && props.facet.values.length > 0) as boolean;\r\n    case FacetTypes.Text:\r\n      return (props.facet.values && props.facet.values.length > 0) as boolean;\r\n    case FacetTypes.Size:\r\n      return (props.facet.sizeTypes &&\r\n        props.facet.sizeTypes.length > 0) as boolean;\r\n  }\r\n\r\n  return false;\r\n});\r\nwatch(\r\n  () => props.facet,\r\n  () => {\r\n    selectedValues.value = getSelectedValueIdsFromFacet(props.facet);\r\n    initialSelectedValues.value = ([] as Array<string>).concat(\r\n      selectedValues.value,\r\n    );\r\n  },\r\n  { immediate: true },\r\n);\r\n\r\n/**\r\n * Click toggle\r\n */\r\nfunction clickToggle() {\r\n  emit(\"expand\", props.facet.id);\r\n}\r\n/**\r\n * Change\r\n */\r\nfunction change() {\r\n  emit(\"upsertFacet\", {\r\n    facet: props.facet,\r\n    selectedValues: selectedValues.value,\r\n  });\r\n}\r\n/**\r\n * Click use filter\r\n */\r\nfunction clickUseFilter(e: Event) {\r\n  e.stopPropagation();\r\n\r\n  emit(\"useFilter\");\r\n}\r\n/**\r\n * Select value\r\n */\r\nfunction selectValue({\r\n  facetValue,\r\n  state,\r\n}: {\r\n  facetValue: FacetValue;\r\n  state: boolean;\r\n}) {\r\n  const isCurrentlySelected =\r\n    selectedValues.value.indexOf(facetValue.id) !== -1;\r\n\r\n  if (state === true && !isCurrentlySelected) {\r\n    selectedValues.value.push(facetValue.id);\r\n\r\n    change();\r\n  }\r\n  if (state === false && isCurrentlySelected) {\r\n    selectedValues.value = selectedValues.value.filter(\r\n      (selectedValue) => selectedValue !== facetValue.id,\r\n    );\r\n\r\n    change();\r\n  }\r\n}\r\n/**\r\n * Is suit format?\r\n */\r\nfunction isSuitFormat(sizeType: SizeType) {\r\n  return sizeType.label === \"suitSize\";\r\n}\r\n/**\r\n * Is matrix format?\r\n */\r\nfunction isMatrixFormat(sizeType: SizeType) {\r\n  return sizeType.label === \"matrixSize\";\r\n}\r\n</script>\r\n","<template>\r\n  <div>\r\n    <!-- Dropdown -->\r\n    <div class=\"layout-category__display-options\">\r\n      <div class=\"u-hide-for-small\">\r\n        <div class=\"product-filter__sorting\">\r\n          <label class=\"sr-only\" for=\"sortselect\">{{ $t(\"sort\") }}</label>\r\n          <select\r\n            id=\"sortselect\"\r\n            class=\"select-list\"\r\n            @change=\"desktopChange($event)\"\r\n          >\r\n            <option value=\"\" :selected=\"!routerQueryParam\">\r\n              {{ $t(\"sortBy\") }}:\r\n            </option>\r\n            <option\r\n              v-for=\"option in sort.options\"\r\n              :key=\"option.id\"\r\n              :value=\"option.id\"\r\n              :selected=\"option.id === routerQueryParam\"\r\n            >\r\n              {{ option.label }}\r\n            </option>\r\n          </select>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <div class=\"test u-hide-for-medium\">\r\n      <fieldset>\r\n        <fieldset class=\"product-filter__heading u-hide-for-medium\">\r\n          {{ $t(\"sortBy\") }}\r\n        </fieldset>\r\n        <label\r\n          v-for=\"option in sort.options\"\r\n          :key=\"option.id\"\r\n          class=\"radio product-filter__checkbox\"\r\n        >\r\n          <input\r\n            v-model=\"selectedValue\"\r\n            type=\"radio\"\r\n            :value=\"option.id\"\r\n            @change=\"mobileChange($event)\"\r\n          />\r\n          <span>{{ option.label }}</span>\r\n        </label>\r\n      </fieldset>\r\n      <div class=\"product-filter__facetsubmit\">\r\n        <button\r\n          class=\"btn btn--profile btn--small\"\r\n          @click=\"clickUseSort($event)\"\r\n        >\r\n          {{ $t(\"useSort\") }}\r\n        </button>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref, computed, watch } from \"vue\";\r\nimport { useRoute } from \"vue-router\";\r\nimport { Sort } from \"../../services/search.service\";\r\n\r\nconst props = defineProps<{\r\n  sort: Sort;\r\n}>();\r\n\r\nconst selectedValue = ref((props.sort as Sort).selected);\r\nconst initialSelectedValue = ref((props.sort as Sort).selected);\r\n\r\nconst route = useRoute();\r\n\r\nconst emit = defineEmits<{\r\n  (e: \"expand\");\r\n  (e: \"updateSort\", selectedValue: string | null);\r\n  (e: \"useFilter\");\r\n}>();\r\n\r\nconst routerQueryParam = computed(() => {\r\n  return route.query.sort;\r\n});\r\n\r\nwatch(\r\n  () => props.sort,\r\n  () => {\r\n    selectedValue.value = (props.sort as Sort).selected;\r\n    initialSelectedValue.value = (props.sort as Sort).selected;\r\n  },\r\n  { immediate: true },\r\n);\r\n\r\n/**\r\n * Change\r\n */\r\nfunction desktopChange(e: Event) {\r\n  selectedValue.value = (e.target as HTMLInputElement).value;\r\n  emit(\"updateSort\", selectedValue.value || null);\r\n  setTimeout(() => emit(\"useFilter\"));\r\n}\r\n\r\n/**\r\n * Change\r\n */\r\nfunction mobileChange(e: Event) {\r\n  selectedValue.value = (e.target as HTMLInputElement).value;\r\n  emit(\"updateSort\", selectedValue.value || null);\r\n}\r\n\r\n/**\r\n * Click use filter\r\n */\r\nfunction clickUseSort(e: Event) {\r\n  e.stopPropagation();\r\n\r\n  emit(\"useFilter\");\r\n}\r\n</script>\r\n","<template>\r\n  <div class=\"product-filter__container\" @keyup.esc=\"esc()\">\r\n    <Facet\r\n      v-for=\"facet in facets\"\r\n      :key=\"facet.id\"\r\n      :facet=\"facet\"\r\n      :is-expanded=\"expanded === facet.id\"\r\n      @expand=\"expand($event)\"\r\n      @upsertFacet=\"upsertFacet($event)\"\r\n      @useFilter=\"useFilter()\"\r\n      @keyup.enter=\"expand(facet.id)\"\r\n    />\r\n    <Sort\r\n      :sort=\"sort\"\r\n      :is-expanded=\"expanded === SORT\"\r\n      @expand=\"expand(SORT)\"\r\n      @updateSort=\"updateSort($event)\"\r\n      @useFilter=\"useFilter()\"\r\n    />\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref } from \"vue\";\r\nimport Facet from \"./facet.vue\";\r\nimport Sort from \"./sort.vue\";\r\nimport {\r\n  Facet as SearchFacet,\r\n  Sort as SortType,\r\n} from \"../../services/search.service\";\r\n\r\nconst CLOSED = \"-1\";\r\nconst SORT = \"sort\";\r\n\r\nconst props = defineProps<{\r\n  sort: SortType;\r\n  facets: Array<SearchFacet>;\r\n}>();\r\n\r\nconst expanded = ref(\"-1\");\r\nconst sort = ref(props.sort);\r\n\r\nconst emit = defineEmits<{\r\n  (\r\n    e: \"upsertFacet\",\r\n    facets: { facet: SearchFacet; selectedValues: Array<string> },\r\n  ): void;\r\n  (e: \"updateSort\", sort: string): void;\r\n  (e: \"useFilter\"): void;\r\n}>();\r\n\r\n/**\r\n * Expand\r\n */\r\nfunction expand(facetId: string) {\r\n  if (expanded.value === facetId) {\r\n    return (expanded.value = CLOSED);\r\n  }\r\n\r\n  expanded.value = facetId;\r\n}\r\n/**\r\n * Upsert facet\r\n */\r\nfunction upsertFacet({\r\n  facet,\r\n  selectedValues,\r\n}: {\r\n  facet: SearchFacet;\r\n  selectedValues: Array<string>;\r\n}) {\r\n  emit(\"upsertFacet\", { facet, selectedValues });\r\n}\r\n/**\r\n * Update sort\r\n */\r\nfunction updateSort(sort: string | null) {\r\n  if (sort) emit(\"updateSort\", sort);\r\n}\r\n/**\r\n * Use filter\r\n */\r\nfunction useFilter() {\r\n  expanded.value = CLOSED;\r\n\r\n  emit(\"useFilter\");\r\n}\r\n/**\r\n * Esc\r\n */\r\nfunction esc() {\r\n  expanded.value = CLOSED;\r\n}\r\n</script>\r\n","<template>\r\n  <div class=\"product-filter product-filter__selected-facets\">\r\n    <h3 class=\"sr-only\">\r\n      {{ $t(\"currentFilter\") }}\r\n    </h3>\r\n    <div\r\n      v-for=\"pill in pills\"\r\n      :key=\"pill.facetValueId\"\r\n      class=\"tag tag--small\"\r\n      role=\"button\"\r\n      tabindex=\"0\"\r\n      @click=\"click(pill)\"\r\n      @keyup.enter=\"click(pill)\"\r\n    >\r\n      <span class=\"tag__text\">{{ pill.label }}</span>\r\n      <Icon :type=\"IconTypes.Close\" :size=\"IconSizes.Small\" />\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed } from \"vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport { Facet, FacetValue, Pill } from \"../../services/search.service\";\r\nimport { getSelectedValuesFromFacet } from \"../../utils/search.utils\";\r\n\r\nconst props = defineProps<{\r\n  facets: Array<Facet>;\r\n}>();\r\n\r\nconst emit = defineEmits<{\r\n  (\r\n    e: \"upsertFacet\",\r\n    facet: { facet: Facet; selectedValues: Array<string>; useFilter: boolean },\r\n  );\r\n}>();\r\n\r\nconst pills = computed((): Pill[] => {\r\n  const pills = props.facets.map((facet) => {\r\n    return getSelectedValuesFromFacet(facet).map((facetValue: FacetValue) => {\r\n      return {\r\n        facetId: facet.id,\r\n        facetValueId: facetValue.id,\r\n        label: getLabel(facetValue),\r\n      };\r\n    });\r\n  });\r\n\r\n  return ([] as Pill[]).concat.apply([], pills);\r\n});\r\n\r\n/**\r\n * Click\r\n */\r\nfunction click({ facetId, facetValueId }) {\r\n  const facet = props.facets.find((facet) => facet.id === facetId);\r\n\r\n  const selectedValues = getSelectedValuesFromFacet(facet as Facet)\r\n    .filter((facetValue: FacetValue) => {\r\n      return facetValue.id !== facetValueId;\r\n    })\r\n    .map((facetValue) => facetValue.id);\r\n\r\n  emit(\"upsertFacet\", {\r\n    facet: props.facets.find((facet) => facet.id === facetId) as Facet,\r\n    selectedValues,\r\n    useFilter: true,\r\n  });\r\n}\r\n\r\nfunction getLabel(facetValue: FacetValue) {\r\n  if (facetValue.id.indexOf(\"custom.matrixSize\") !== -1) {\r\n    return formatMatrixSizeLabel(facetValue.label);\r\n  }\r\n  if (facetValue.id.indexOf(\"custom.suitSize\") !== -1) {\r\n    return formatSuitSizeLabel(facetValue.label);\r\n  }\r\n\r\n  return facetValue.label;\r\n}\r\n\r\nfunction formatMatrixSizeLabel(label: string): string {\r\n  let w, l;\r\n\r\n  if (label.length === 3) {\r\n    w = label.substring(0, 1);\r\n    l = label.substring(1);\r\n  } else {\r\n    w = label.substring(0, 2);\r\n    l = label.substring(2);\r\n  }\r\n\r\n  return `${w}/${l}`;\r\n}\r\n\r\nfunction formatSuitSizeLabel(label: string): string {\r\n  return `${label.substring(0, 2)}/${label.substring(2)}`;\r\n}\r\n</script>\r\n","import { defineComponent } from \"vue\";\r\nimport { ProductGroup, Product } from \"../services/models/search.models\";\r\nimport { pushDataToGtm as pushData } from \"../../modules/gtmdata_wp\";\r\n\r\nexport default defineComponent({\r\n    methods: {\r\n        /**\r\n         * Push data to GTM\r\n         */\r\n        pushDataToGtm(event: any) {\r\n            pushData(event);\r\n        },\r\n        /**\r\n         * Get product click event\r\n         */\r\n        getProductClickEvent({\r\n            userId,\r\n            department,\r\n            category,\r\n            brand,\r\n            rebate,\r\n            price,\r\n            metaColor,\r\n            key,\r\n            title,\r\n            stock,\r\n        }: {\r\n            userId: string;\r\n            department: string;\r\n            category: string;\r\n            brand: string;\r\n            rebate: string;\r\n            price: number;\r\n            metaColor: string;\r\n            key: string;\r\n            title: string;\r\n            stock: string;\r\n        }) {\r\n            const event: any = {\r\n                ecommerce: {\r\n                    click: {\r\n                        actionField: {\r\n                            list: `Cat: ${department}`,\r\n                        },\r\n                        products: [\r\n                            {\r\n                                brand,\r\n                                category,\r\n                                dimension2: rebate,\r\n                                dimension4: stock,\r\n                                price: price,\r\n                                variant: metaColor,\r\n                                list: `Cat: ${department}`,\r\n                                id: key,\r\n                                name: title,\r\n                            },\r\n                        ],\r\n                    },\r\n                },\r\n                event: \"productClick\",\r\n            };\r\n\r\n            if (userId) {\r\n                event.userId = userId;\r\n            }\r\n\r\n            return event;\r\n        },\r\n    },\r\n});\r\n\r\n/**\r\n * Push data to GTM\r\n */\r\nexport function pushDataToGtm(event: any) {\r\n    pushData(event);\r\n}\r\n/**\r\n * Get product click event\r\n */\r\nexport function getProductClickEvent({\r\n    userId,\r\n    department,\r\n    category,\r\n    brand,\r\n    rebate,\r\n    price,\r\n    metaColor,\r\n    key,\r\n    title,\r\n    stock,\r\n}: {\r\n    userId: string;\r\n    department: string;\r\n    category: string;\r\n    brand: string;\r\n    rebate: string;\r\n    price: number;\r\n    metaColor: string;\r\n    key: string;\r\n    title: string;\r\n    stock: string;\r\n}) {\r\n    const event: any = {\r\n        ecommerce: {\r\n            click: {\r\n                actionField: {\r\n                    list: `Cat: ${department}`,\r\n                },\r\n                products: [\r\n                    {\r\n                        brand,\r\n                        category,\r\n                        dimension2: rebate,\r\n                        dimension4: stock,\r\n                        price: price,\r\n                        variant: metaColor,\r\n                        list: `Cat: ${department}`,\r\n                        id: key,\r\n                        name: title,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n        event: \"productClick\",\r\n    };\r\n\r\n    if (userId) {\r\n        event.userId = userId;\r\n    }\r\n\r\n    return event;\r\n}\r\n/**\r\n * Get category impressions event\r\n */\r\nexport function getCategoryImpressionsEvent({\r\n    userId,\r\n    store,\r\n    productGroups,\r\n}: {\r\n    userId: string;\r\n    store: string;\r\n    productGroups: Array<ProductGroup>;\r\n}): any {\r\n    const event: any = {\r\n        ecommerce: {\r\n            impressions: productGroups.map(\r\n                (productGroup: ProductGroup, i: number) => {\r\n                    const product = productGroup.products[0] as Product;\r\n\r\n                    const department =\r\n                        product.custom &&\r\n                        product.custom.Dept &&\r\n                        product.custom.Dept[0] &&\r\n                        product.custom.Dept[0].label;\r\n\r\n                    const category =\r\n                        product.custom &&\r\n                        product.custom.Category &&\r\n                        product.custom.Category[0] &&\r\n                        product.custom.Category[0].label;\r\n\r\n                    const price = product.sellingPrice.max;\r\n\r\n                    return {\r\n                        brand: product.brand,\r\n                        category: `${store}/${department}/${category}`,\r\n                        list: `Cat: ${department}`,\r\n                        position: i + 1 + \"\",\r\n                        price: price + \"\",\r\n                        id: product.key,\r\n                        name: product.title,\r\n                    };\r\n                },\r\n            ),\r\n        },\r\n        ecommPageType: \"category\",\r\n        event: \"impression\",\r\n    };\r\n\r\n    if (userId) {\r\n        event.userId = userId;\r\n    }\r\n\r\n    return event;\r\n}\r\n\r\n/**\r\n * Get filter impressions event\r\n */\r\nexport function getFilterImpressionsEvent({\r\n    store,\r\n    listName,\r\n    productGroups,\r\n}: {\r\n    store: string;\r\n    listName: string;\r\n    productGroups: Array<ProductGroup>;\r\n}): any {\r\n    const event: any = {\r\n        ecommerce: {\r\n            impressions: productGroups.map(\r\n                (productGroup: ProductGroup, i: number) => {\r\n                    const product = productGroup.products[0] as Product;\r\n\r\n                    const department =\r\n                        product.custom &&\r\n                        product.custom.Dept &&\r\n                        product.custom.Dept[0] &&\r\n                        product.custom.Dept[0].label;\r\n\r\n                    const category =\r\n                        product.custom &&\r\n                        product.custom.Category &&\r\n                        product.custom.Category[0] &&\r\n                        product.custom.Category[0].label;\r\n\r\n                    const price = product.sellingPrice.max;\r\n\r\n                    return {\r\n                        brand: product.brand,\r\n                        category: `${store}/${department}/${category}`,\r\n                        listName,\r\n                        position: i + 1 + \"\",\r\n                        price: price + \"\",\r\n                        id: product.key,\r\n                        name: product.title,\r\n                    };\r\n                },\r\n            ),\r\n        },\r\n        event: \"impression\",\r\n    };\r\n    return event;\r\n}\r\n","<template>\r\n  <div class=\"responsiveImage\">\r\n    <picture v-if=\"sources\">\r\n      <source\r\n        v-for=\"(source, index) in sources\"\r\n        :key=\"index\"\r\n        :media=\"source.media\"\r\n        :srcset=\"source.srcset\"\r\n        :type=\"source.type\"\r\n      />\r\n      <img\r\n        :width=\"width\"\r\n        :height=\"height\"\r\n        :loading=\"loading\"\r\n        :src=\"lazyLoadFallback(width, height)\"\r\n        :data-src=\"src\"\r\n        :class=\"className\"\r\n        :alt=\"altText\"\r\n      />\r\n    </picture>\r\n    <img\r\n      v-else\r\n      :width=\"width\"\r\n      :height=\"height\"\r\n      :loading=\"loading\"\r\n      :src=\"lazyLoadFallback(width, height)\"\r\n      :data-src=\"src\"\r\n      :class=\"className\"\r\n      :alt=\"altText\"\r\n    />\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\n\r\n\r\nexport default defineComponent({\r\n  props: {\r\n    src: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    sources: {\r\n      type: Array,\r\n      default: null,\r\n    },\r\n    width: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    height: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    altText: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    imgClass: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    lazy: {\r\n      type: Boolean,\r\n      default: true,\r\n    },\r\n  },\r\n  computed: {\r\n    loading(): string | undefined {\r\n      if (this.lazy) {\r\n        return \"lazy\";\r\n      }\r\n      return \"eager\";\r\n    },\r\n    className(): string {\r\n      return `${this.imgClass} ${this.lazy ? \"lazyload\" : \"\"}`;\r\n    },\r\n  },\r\n  methods: {\r\n    lazyLoadFallback(width, height) {\r\n      if (!this.lazy) {\r\n        return this.src;\r\n      }\r\n\r\n      return `data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20${width}%20${height}%20'%2F%3E`;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <div class=\"responsiveImage\">\r\n    <picture v-if=\"sources\">\r\n      <source\r\n        v-for=\"(source, index) in sources\"\r\n        :key=\"index\"\r\n        :media=\"source.media\"\r\n        :srcset=\"source.srcset\"\r\n        :type=\"source.type\"\r\n      />\r\n      <img\r\n        :width=\"width\"\r\n        :height=\"height\"\r\n        :loading=\"loading\"\r\n        :src=\"lazyLoadFallback(width, height)\"\r\n        :data-src=\"src\"\r\n        :class=\"className\"\r\n        :alt=\"altText\"\r\n      />\r\n    </picture>\r\n    <img\r\n      v-else\r\n      :width=\"width\"\r\n      :height=\"height\"\r\n      :loading=\"loading\"\r\n      :src=\"lazyLoadFallback(width, height)\"\r\n      :data-src=\"src\"\r\n      :class=\"className\"\r\n      :alt=\"altText\"\r\n    />\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\n\r\n\r\nexport default defineComponent({\r\n  props: {\r\n    src: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    sources: {\r\n      type: Array,\r\n      default: null,\r\n    },\r\n    width: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    height: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    altText: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    imgClass: {\r\n      type: String,\r\n      default: \"\",\r\n    },\r\n    lazy: {\r\n      type: Boolean,\r\n      default: true,\r\n    },\r\n  },\r\n  computed: {\r\n    loading(): string | undefined {\r\n      if (this.lazy) {\r\n        return \"lazy\";\r\n      }\r\n      return \"eager\";\r\n    },\r\n    className(): string {\r\n      return `${this.imgClass} ${this.lazy ? \"lazyload\" : \"\"}`;\r\n    },\r\n  },\r\n  methods: {\r\n    lazyLoadFallback(width, height) {\r\n      if (!this.lazy) {\r\n        return this.src;\r\n      }\r\n\r\n      return `data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20${width}%20${height}%20'%2F%3E`;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","/**\r\n * Validate product size seleciont and format product size\r\n */\r\n\r\nimport { useProductPageStore } from \"../stores/productPageStore\";\r\n\r\nexport const validateRegularSizeSelection = (productPageStore: ReturnType<typeof useProductPageStore>) => {\r\n  if (!productPageStore.sizeSelected) {\r\n    productPageStore.displaySizeNotSelectedError = true;\r\n    return false;\r\n  }\r\n  productPageStore.displaySizeNotSelectedError = false;\r\n  return true;\r\n};\r\n\r\nexport const validatePantsSizeSelection = (productPageStore: ReturnType<typeof useProductPageStore>) => {\r\n  if (productPageStore.widthSelected && productPageStore.lengthSelected) {\r\n    productPageStore.displayWidthNotSelectedError = false;\r\n    productPageStore.displayLengthNotSelectedError = false;\r\n    return true;\r\n  }\r\n\r\n  if (!productPageStore.widthSelected) {\r\n    productPageStore.displayWidthNotSelectedError = true;\r\n  }\r\n  if (!productPageStore.lengthSelected) {\r\n    productPageStore.displayLengthNotSelectedError = true;\r\n  }\r\n  return false;\r\n};\r\n\r\nexport const validateSuitSizeSelection = (productPageStore: ReturnType<typeof useProductPageStore>) => {\r\n  const { sizeSelected, widthSelected, lengthSelected } = productPageStore;\r\n\r\n  productPageStore.displaySizeNotSelectedError = !sizeSelected;\r\n  productPageStore.displayWidthNotSelectedError = !widthSelected;\r\n  productPageStore.displayLengthNotSelectedError = !lengthSelected;\r\n\r\n  return sizeSelected && widthSelected && lengthSelected;\r\n};\r\n\r\nexport const validateSizeSelection = (sizePickerType: string, productPageStore: ReturnType<typeof useProductPageStore>) => {\r\n  switch (sizePickerType) {\r\n    case \"suit\":\r\n      return validateSuitSizeSelection(productPageStore);\r\n    case \"pants\":\r\n      return validatePantsSizeSelection(productPageStore);\r\n    case \"regular\":\r\n      return validateRegularSizeSelection(productPageStore);\r\n    default:\r\n      return false;\r\n  }\r\n};\r\n\r\nfunction formatZeroSize(size: string) {\r\n    // If 0 return onesize\r\n    if (size === \"0\") {\r\n        return \"ONESIZE\";\r\n    }\r\n    return null;\r\n}\r\n\r\nfunction formatSockSize(size: string) {\r\n    const sockSizes = [\r\n        \"3639\",\r\n        \"3641\",\r\n        \"3842\",\r\n        \"3941\",\r\n        \"4045\",\r\n        \"4046\",\r\n        \"4145\",\r\n        \"4247\",\r\n    ];\r\n\r\n    if (sockSizes.includes(size)) {\r\n        return size.slice(0, 2) + \"-\" + size.slice(2); // Format as range\r\n    }\r\n\r\n    return null; // Return null if it's not a sock size\r\n}\r\n\r\n// Function to format regular sizes\r\nfunction formatRegularSize(size: string): string | null {\r\n    const regularSizes = [\r\n        \"XXS\",\r\n        \"XS\",\r\n        \"S\",\r\n        \"M\",\r\n        \"L\",\r\n        \"XL\",\r\n        \"XXL\",\r\n        \"XXXL\",\r\n        \"XXXXL\",\r\n    ];\r\n\r\n    if (regularSizes.includes(size)) {\r\n        const regex = /^(X{2,})(L|S)$/;\r\n        const match = size.match(regex);\r\n\r\n        if (match) {\r\n            // Count the number of 'X's and append the last character (L or S)\r\n            const count = match[1].length;\r\n            return `${count}X${match[2]}`;\r\n        }\r\n        return size; // Return regular sizes as they are\r\n    }\r\n    return null; // Return null if it's not a regular size\r\n}\r\n\r\n// Function to format pants sizes\r\nfunction formatPantsSize(size: string): string | null {\r\n    // Case 1: Standard numeric pants sizes (e.g., \"3032\" → \"30/32\")\r\n    if (/^\\d{4}$/.test(size)) {\r\n        return size.slice(0, 2) + \"/\" + size.slice(2);\r\n    }\r\n\r\n    // Case 2: Letter-based width pants sizes (e.g., \"L30\" → \"L/30\", \"XS30\" → \"XS/30\")\r\n    const match = size.match(/^(XXS|XS|S|M|L|XL|XXL|XXXL|XXXXL)(\\d{2})$/);\r\n    if (match) {\r\n        return `${match[1]}/${match[2]}`;\r\n    }\r\n\r\n    return null; // Return null if it's not a pants size\r\n}\r\n\r\n// Function to format suit sizes\r\nfunction formatSuitSize(\r\n    size: string,\r\n    isRegularSizePicker?: boolean,\r\n): string | null {\r\n    const suitPattern = /^([BC])([123])(\\d{2})$/;\r\n    const match = suitPattern.exec(size);\r\n\r\n    if (match) {\r\n        const width = match[1] === \"B\" ? \"Normal vidde\" : \"Ekstra vidde\";\r\n        const length =\r\n            match[2] === \"1\"\r\n                ? \"kort lengde\"\r\n                : match[2] === \"2\"\r\n                  ? \"normal lengde\"\r\n                  : \"lang lengde\";\r\n        const sizeNumber = match[3];\r\n        //if by chance a suit size has been translated to a regularSize from backend return only the size\r\n        if (isRegularSizePicker) {\r\n            return sizeNumber;\r\n        }\r\n        return `${width}, ${length}, ${sizeNumber}, (${size})`;\r\n    }\r\n    return null; // Return null if it's not a suit size\r\n}\r\n\r\n// Main size formatting function\r\nexport function formatSize(\r\n    size: string,\r\n    isRegularSizePicker?: boolean,\r\n): string {\r\n    // If 0 return ONESIZE\r\n    const zeroSize = formatZeroSize(size);\r\n    if (zeroSize) {\r\n        return zeroSize;\r\n    }\r\n\r\n    // Check for sock size\r\n    const sockSize = formatSockSize(size);\r\n    if (sockSize) {\r\n        return sockSize;\r\n    }\r\n\r\n    // Check for regular size\r\n    const regularSize = formatRegularSize(size);\r\n    if (regularSize) {\r\n        return regularSize;\r\n    }\r\n\r\n    // Check for pants size\r\n    const pantsSize = formatPantsSize(size);\r\n    if (pantsSize) {\r\n        return pantsSize;\r\n    }\r\n\r\n    // Check for suit size\r\n    const suitSize = formatSuitSize(size, isRegularSizePicker);\r\n    if (suitSize) {\r\n        return suitSize;\r\n    }\r\n\r\n    // Return the original string if it doesn't match any of the patterns\r\n    return size;\r\n}\r\n\r\nexport const isSuitSize = (size: string) => {\r\n    return formatSuitSize(size) !== null;\r\n};\r\n\r\nexport const isRegularSize = (size: string) => {\r\n    return formatRegularSize(size) !== null;\r\n};","import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n  if (Array.isArray(target)) {\n    target.length = Math.max(target.length, key)\n    target.splice(key, 1, val)\n    return val\n  }\n  target[key] = val\n  return val\n}\n\nexport function del(target, key) {\n  if (Array.isArray(target)) {\n    target.splice(key, 1)\n    return\n  }\n  delete target[key]\n}\n\nexport * from 'vue'\nexport {\n  Vue,\n  Vue2,\n  isVue2,\n  isVue3,\n  install,\n}\n","/*!\n * pinia v2.2.2\n * (c) 2024 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, del, nextTick, computed, toRefs } from 'vue-demi';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n    return (o &&\n        typeof o === 'object' &&\n        Object.prototype.toString.call(o) === '[object Object]' &&\n        typeof o.toJSON !== 'function');\n}\n// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n    /**\n     * Direct mutation of the state:\n     *\n     * - `store.name = 'new name'`\n     * - `store.$state.name = 'new name'`\n     * - `store.list.push('new item')`\n     */\n    MutationType[\"direct\"] = \"direct\";\n    /**\n     * Mutated the state with `$patch` and an object\n     *\n     * - `store.$patch({ name: 'newName' })`\n     */\n    MutationType[\"patchObject\"] = \"patch object\";\n    /**\n     * Mutated the state with `$patch` and a function\n     *\n     * - `store.$patch(state => state.name = 'newName')`\n     */\n    MutationType[\"patchFunction\"] = \"patch function\";\n    // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\nconst IS_CLIENT = typeof window !== 'undefined';\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n    ? window\n    : typeof self === 'object' && self.self === self\n        ? self\n        : typeof global === 'object' && global.global === global\n            ? global\n            : typeof globalThis === 'object'\n                ? globalThis\n                : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n    // prepend BOM for UTF-8 XML and text/* types (including HTML)\n    // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n    if (autoBom &&\n        /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n        return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n    }\n    return blob;\n}\nfunction download(url, name, opts) {\n    const xhr = new XMLHttpRequest();\n    xhr.open('GET', url);\n    xhr.responseType = 'blob';\n    xhr.onload = function () {\n        saveAs(xhr.response, name, opts);\n    };\n    xhr.onerror = function () {\n        console.error('could not download file');\n    };\n    xhr.send();\n}\nfunction corsEnabled(url) {\n    const xhr = new XMLHttpRequest();\n    // use sync to avoid popup blocker\n    xhr.open('HEAD', url, false);\n    try {\n        xhr.send();\n    }\n    catch (e) { }\n    return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n    try {\n        node.dispatchEvent(new MouseEvent('click'));\n    }\n    catch (e) {\n        const evt = document.createEvent('MouseEvents');\n        evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n        node.dispatchEvent(evt);\n    }\n}\nconst _navigator = typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n    /AppleWebKit/.test(_navigator.userAgent) &&\n    !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n    ? () => { } // noop\n    : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n        typeof HTMLAnchorElement !== 'undefined' &&\n            'download' in HTMLAnchorElement.prototype &&\n            !isMacOSWebView\n            ? downloadSaveAs\n            : // Use msSaveOrOpenBlob as a second approach\n                'msSaveOrOpenBlob' in _navigator\n                    ? msSaveAs\n                    : // Fallback to using FileReader and a popup\n                        fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n    const a = document.createElement('a');\n    a.download = name;\n    a.rel = 'noopener'; // tabnabbing\n    // TODO: detect chrome extensions & packaged apps\n    // a.target = '_blank'\n    if (typeof blob === 'string') {\n        // Support regular links\n        a.href = blob;\n        if (a.origin !== location.origin) {\n            if (corsEnabled(a.href)) {\n                download(blob, name, opts);\n            }\n            else {\n                a.target = '_blank';\n                click(a);\n            }\n        }\n        else {\n            click(a);\n        }\n    }\n    else {\n        // Support blobs\n        a.href = URL.createObjectURL(blob);\n        setTimeout(function () {\n            URL.revokeObjectURL(a.href);\n        }, 4e4); // 40s\n        setTimeout(function () {\n            click(a);\n        }, 0);\n    }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n    if (typeof blob === 'string') {\n        if (corsEnabled(blob)) {\n            download(blob, name, opts);\n        }\n        else {\n            const a = document.createElement('a');\n            a.href = blob;\n            a.target = '_blank';\n            setTimeout(function () {\n                click(a);\n            });\n        }\n    }\n    else {\n        // @ts-ignore: works on windows\n        navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n    }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n    // Open a popup immediately do go around popup blocker\n    // Mostly only available on user interaction and the fileReader is async so...\n    popup = popup || open('', '_blank');\n    if (popup) {\n        popup.document.title = popup.document.body.innerText = 'downloading...';\n    }\n    if (typeof blob === 'string')\n        return download(blob, name, opts);\n    const force = blob.type === 'application/octet-stream';\n    const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n    const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n    if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n        typeof FileReader !== 'undefined') {\n        // Safari doesn't allow downloading of blob URLs\n        const reader = new FileReader();\n        reader.onloadend = function () {\n            let url = reader.result;\n            if (typeof url !== 'string') {\n                popup = null;\n                throw new Error('Wrong reader.result type');\n            }\n            url = isChromeIOS\n                ? url\n                : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n            if (popup) {\n                popup.location.href = url;\n            }\n            else {\n                location.assign(url);\n            }\n            popup = null; // reverse-tabnabbing #460\n        };\n        reader.readAsDataURL(blob);\n    }\n    else {\n        const url = URL.createObjectURL(blob);\n        if (popup)\n            popup.location.assign(url);\n        else\n            location.href = url;\n        popup = null; // reverse-tabnabbing #460\n        setTimeout(function () {\n            URL.revokeObjectURL(url);\n        }, 4e4); // 40s\n    }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n    const piniaMessage = '🍍 ' + message;\n    if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n        // No longer available :(\n        __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n    }\n    else if (type === 'error') {\n        console.error(piniaMessage);\n    }\n    else if (type === 'warn') {\n        console.warn(piniaMessage);\n    }\n    else {\n        console.log(piniaMessage);\n    }\n}\nfunction isPinia(o) {\n    return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n    if (!('clipboard' in navigator)) {\n        toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n        return true;\n    }\n}\nfunction checkNotFocusedError(error) {\n    if (error instanceof Error &&\n        error.message.toLowerCase().includes('document is not focused')) {\n        toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n        return true;\n    }\n    return false;\n}\nasync function actionGlobalCopyState(pinia) {\n    if (checkClipboardAccess())\n        return;\n    try {\n        await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n        toastMessage('Global state copied to clipboard.');\n    }\n    catch (error) {\n        if (checkNotFocusedError(error))\n            return;\n        toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nasync function actionGlobalPasteState(pinia) {\n    if (checkClipboardAccess())\n        return;\n    try {\n        loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n        toastMessage('Global state pasted from clipboard.');\n    }\n    catch (error) {\n        if (checkNotFocusedError(error))\n            return;\n        toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nasync function actionGlobalSaveState(pinia) {\n    try {\n        saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n            type: 'text/plain;charset=utf-8',\n        }), 'pinia-state.json');\n    }\n    catch (error) {\n        toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nlet fileInput;\nfunction getFileOpener() {\n    if (!fileInput) {\n        fileInput = document.createElement('input');\n        fileInput.type = 'file';\n        fileInput.accept = '.json';\n    }\n    function openFile() {\n        return new Promise((resolve, reject) => {\n            fileInput.onchange = async () => {\n                const files = fileInput.files;\n                if (!files)\n                    return resolve(null);\n                const file = files.item(0);\n                if (!file)\n                    return resolve(null);\n                return resolve({ text: await file.text(), file });\n            };\n            // @ts-ignore: TODO: changed from 4.3 to 4.4\n            fileInput.oncancel = () => resolve(null);\n            fileInput.onerror = reject;\n            fileInput.click();\n        });\n    }\n    return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n    try {\n        const open = getFileOpener();\n        const result = await open();\n        if (!result)\n            return;\n        const { text, file } = result;\n        loadStoresState(pinia, JSON.parse(text));\n        toastMessage(`Global state imported from \"${file.name}\".`);\n    }\n    catch (error) {\n        toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n        console.error(error);\n    }\n}\nfunction loadStoresState(pinia, state) {\n    for (const key in state) {\n        const storeState = pinia.state.value[key];\n        // store is already instantiated, patch it\n        if (storeState) {\n            Object.assign(storeState, state[key]);\n        }\n        else {\n            // store is not instantiated, set the initial state\n            pinia.state.value[key] = state[key];\n        }\n    }\n}\n\nfunction formatDisplay(display) {\n    return {\n        _custom: {\n            display,\n        },\n    };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n    return isPinia(store)\n        ? {\n            id: PINIA_ROOT_ID,\n            label: PINIA_ROOT_LABEL,\n        }\n        : {\n            id: store.$id,\n            label: store.$id,\n        };\n}\nfunction formatStoreForInspectorState(store) {\n    if (isPinia(store)) {\n        const storeNames = Array.from(store._s.keys());\n        const storeMap = store._s;\n        const state = {\n            state: storeNames.map((storeId) => ({\n                editable: true,\n                key: storeId,\n                value: store.state.value[storeId],\n            })),\n            getters: storeNames\n                .filter((id) => storeMap.get(id)._getters)\n                .map((id) => {\n                const store = storeMap.get(id);\n                return {\n                    editable: false,\n                    key: id,\n                    value: store._getters.reduce((getters, key) => {\n                        getters[key] = store[key];\n                        return getters;\n                    }, {}),\n                };\n            }),\n        };\n        return state;\n    }\n    const state = {\n        state: Object.keys(store.$state).map((key) => ({\n            editable: true,\n            key,\n            value: store.$state[key],\n        })),\n    };\n    // avoid adding empty getters\n    if (store._getters && store._getters.length) {\n        state.getters = store._getters.map((getterName) => ({\n            editable: false,\n            key: getterName,\n            value: store[getterName],\n        }));\n    }\n    if (store._customProperties.size) {\n        state.customProperties = Array.from(store._customProperties).map((key) => ({\n            editable: true,\n            key,\n            value: store[key],\n        }));\n    }\n    return state;\n}\nfunction formatEventData(events) {\n    if (!events)\n        return {};\n    if (Array.isArray(events)) {\n        // TODO: handle add and delete for arrays and objects\n        return events.reduce((data, event) => {\n            data.keys.push(event.key);\n            data.operations.push(event.type);\n            data.oldValue[event.key] = event.oldValue;\n            data.newValue[event.key] = event.newValue;\n            return data;\n        }, {\n            oldValue: {},\n            keys: [],\n            operations: [],\n            newValue: {},\n        });\n    }\n    else {\n        return {\n            operation: formatDisplay(events.type),\n            key: formatDisplay(events.key),\n            oldValue: events.oldValue,\n            newValue: events.newValue,\n        };\n    }\n}\nfunction formatMutationType(type) {\n    switch (type) {\n        case MutationType.direct:\n            return 'mutation';\n        case MutationType.patchFunction:\n            return '$patch';\n        case MutationType.patchObject:\n            return '$patch';\n        default:\n            return 'unknown';\n    }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n    setupDevtoolsPlugin({\n        id: 'dev.esm.pinia',\n        label: 'Pinia 🍍',\n        logo: 'https://pinia.vuejs.org/logo.svg',\n        packageName: 'pinia',\n        homepage: 'https://pinia.vuejs.org',\n        componentStateTypes,\n        app,\n    }, (api) => {\n        if (typeof api.now !== 'function') {\n            toastMessage('You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n        }\n        api.addTimelineLayer({\n            id: MUTATIONS_LAYER_ID,\n            label: `Pinia 🍍`,\n            color: 0xe5df88,\n        });\n        api.addInspector({\n            id: INSPECTOR_ID,\n            label: 'Pinia 🍍',\n            icon: 'storage',\n            treeFilterPlaceholder: 'Search stores',\n            actions: [\n                {\n                    icon: 'content_copy',\n                    action: () => {\n                        actionGlobalCopyState(pinia);\n                    },\n                    tooltip: 'Serialize and copy the state',\n                },\n                {\n                    icon: 'content_paste',\n                    action: async () => {\n                        await actionGlobalPasteState(pinia);\n                        api.sendInspectorTree(INSPECTOR_ID);\n                        api.sendInspectorState(INSPECTOR_ID);\n                    },\n                    tooltip: 'Replace the state with the content of your clipboard',\n                },\n                {\n                    icon: 'save',\n                    action: () => {\n                        actionGlobalSaveState(pinia);\n                    },\n                    tooltip: 'Save the state as a JSON file',\n                },\n                {\n                    icon: 'folder_open',\n                    action: async () => {\n                        await actionGlobalOpenStateFile(pinia);\n                        api.sendInspectorTree(INSPECTOR_ID);\n                        api.sendInspectorState(INSPECTOR_ID);\n                    },\n                    tooltip: 'Import the state from a JSON file',\n                },\n            ],\n            nodeActions: [\n                {\n                    icon: 'restore',\n                    tooltip: 'Reset the state (with \"$reset\")',\n                    action: (nodeId) => {\n                        const store = pinia._s.get(nodeId);\n                        if (!store) {\n                            toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n                        }\n                        else if (typeof store.$reset !== 'function') {\n                            toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n                        }\n                        else {\n                            store.$reset();\n                            toastMessage(`Store \"${nodeId}\" reset.`);\n                        }\n                    },\n                },\n            ],\n        });\n        api.on.inspectComponent((payload, ctx) => {\n            const proxy = (payload.componentInstance &&\n                payload.componentInstance.proxy);\n            if (proxy && proxy._pStores) {\n                const piniaStores = payload.componentInstance.proxy._pStores;\n                Object.values(piniaStores).forEach((store) => {\n                    payload.instanceData.state.push({\n                        type: getStoreType(store.$id),\n                        key: 'state',\n                        editable: true,\n                        value: store._isOptionsAPI\n                            ? {\n                                _custom: {\n                                    value: toRaw(store.$state),\n                                    actions: [\n                                        {\n                                            icon: 'restore',\n                                            tooltip: 'Reset the state of this store',\n                                            action: () => store.$reset(),\n                                        },\n                                    ],\n                                },\n                            }\n                            : // NOTE: workaround to unwrap transferred refs\n                                Object.keys(store.$state).reduce((state, key) => {\n                                    state[key] = store.$state[key];\n                                    return state;\n                                }, {}),\n                    });\n                    if (store._getters && store._getters.length) {\n                        payload.instanceData.state.push({\n                            type: getStoreType(store.$id),\n                            key: 'getters',\n                            editable: false,\n                            value: store._getters.reduce((getters, key) => {\n                                try {\n                                    getters[key] = store[key];\n                                }\n                                catch (error) {\n                                    // @ts-expect-error: we just want to show it in devtools\n                                    getters[key] = error;\n                                }\n                                return getters;\n                            }, {}),\n                        });\n                    }\n                });\n            }\n        });\n        api.on.getInspectorTree((payload) => {\n            if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n                let stores = [pinia];\n                stores = stores.concat(Array.from(pinia._s.values()));\n                payload.rootNodes = (payload.filter\n                    ? stores.filter((store) => '$id' in store\n                        ? store.$id\n                            .toLowerCase()\n                            .includes(payload.filter.toLowerCase())\n                        : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n                    : stores).map(formatStoreForInspectorTree);\n            }\n        });\n        // Expose pinia instance as $pinia to window\n        globalThis.$pinia = pinia;\n        api.on.getInspectorState((payload) => {\n            if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n                const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n                    ? pinia\n                    : pinia._s.get(payload.nodeId);\n                if (!inspectedStore) {\n                    // this could be the selected store restored for a different project\n                    // so it's better not to say anything here\n                    return;\n                }\n                if (inspectedStore) {\n                    // Expose selected store as $store to window\n                    if (payload.nodeId !== PINIA_ROOT_ID)\n                        globalThis.$store = toRaw(inspectedStore);\n                    payload.state = formatStoreForInspectorState(inspectedStore);\n                }\n            }\n        });\n        api.on.editInspectorState((payload, ctx) => {\n            if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n                const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n                    ? pinia\n                    : pinia._s.get(payload.nodeId);\n                if (!inspectedStore) {\n                    return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n                }\n                const { path } = payload;\n                if (!isPinia(inspectedStore)) {\n                    // access only the state\n                    if (path.length !== 1 ||\n                        !inspectedStore._customProperties.has(path[0]) ||\n                        path[0] in inspectedStore.$state) {\n                        path.unshift('$state');\n                    }\n                }\n                else {\n                    // Root access, we can omit the `.value` because the devtools API does it for us\n                    path.unshift('state');\n                }\n                isTimelineActive = false;\n                payload.set(inspectedStore, path, payload.state.value);\n                isTimelineActive = true;\n            }\n        });\n        api.on.editComponentState((payload) => {\n            if (payload.type.startsWith('🍍')) {\n                const storeId = payload.type.replace(/^🍍\\s*/, '');\n                const store = pinia._s.get(storeId);\n                if (!store) {\n                    return toastMessage(`store \"${storeId}\" not found`, 'error');\n                }\n                const { path } = payload;\n                if (path[0] !== 'state') {\n                    return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n                }\n                // rewrite the first entry to be able to directly set the state as\n                // well as any other path\n                path[0] = '$state';\n                isTimelineActive = false;\n                payload.set(store, path, payload.state.value);\n                isTimelineActive = true;\n            }\n        });\n    });\n}\nfunction addStoreToDevtools(app, store) {\n    if (!componentStateTypes.includes(getStoreType(store.$id))) {\n        componentStateTypes.push(getStoreType(store.$id));\n    }\n    setupDevtoolsPlugin({\n        id: 'dev.esm.pinia',\n        label: 'Pinia 🍍',\n        logo: 'https://pinia.vuejs.org/logo.svg',\n        packageName: 'pinia',\n        homepage: 'https://pinia.vuejs.org',\n        componentStateTypes,\n        app,\n        settings: {\n            logStoreChanges: {\n                label: 'Notify about new/deleted stores',\n                type: 'boolean',\n                defaultValue: true,\n            },\n            // useEmojis: {\n            //   label: 'Use emojis in messages ⚡️',\n            //   type: 'boolean',\n            //   defaultValue: true,\n            // },\n        },\n    }, (api) => {\n        // gracefully handle errors\n        const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n        store.$onAction(({ after, onError, name, args }) => {\n            const groupId = runningActionId++;\n            api.addTimelineEvent({\n                layerId: MUTATIONS_LAYER_ID,\n                event: {\n                    time: now(),\n                    title: '🛫 ' + name,\n                    subtitle: 'start',\n                    data: {\n                        store: formatDisplay(store.$id),\n                        action: formatDisplay(name),\n                        args,\n                    },\n                    groupId,\n                },\n            });\n            after((result) => {\n                activeAction = undefined;\n                api.addTimelineEvent({\n                    layerId: MUTATIONS_LAYER_ID,\n                    event: {\n                        time: now(),\n                        title: '🛬 ' + name,\n                        subtitle: 'end',\n                        data: {\n                            store: formatDisplay(store.$id),\n                            action: formatDisplay(name),\n                            args,\n                            result,\n                        },\n                        groupId,\n                    },\n                });\n            });\n            onError((error) => {\n                activeAction = undefined;\n                api.addTimelineEvent({\n                    layerId: MUTATIONS_LAYER_ID,\n                    event: {\n                        time: now(),\n                        logType: 'error',\n                        title: '💥 ' + name,\n                        subtitle: 'end',\n                        data: {\n                            store: formatDisplay(store.$id),\n                            action: formatDisplay(name),\n                            args,\n                            error,\n                        },\n                        groupId,\n                    },\n                });\n            });\n        }, true);\n        store._customProperties.forEach((name) => {\n            watch(() => unref(store[name]), (newValue, oldValue) => {\n                api.notifyComponentUpdate();\n                api.sendInspectorState(INSPECTOR_ID);\n                if (isTimelineActive) {\n                    api.addTimelineEvent({\n                        layerId: MUTATIONS_LAYER_ID,\n                        event: {\n                            time: now(),\n                            title: 'Change',\n                            subtitle: name,\n                            data: {\n                                newValue,\n                                oldValue,\n                            },\n                            groupId: activeAction,\n                        },\n                    });\n                }\n            }, { deep: true });\n        });\n        store.$subscribe(({ events, type }, state) => {\n            api.notifyComponentUpdate();\n            api.sendInspectorState(INSPECTOR_ID);\n            if (!isTimelineActive)\n                return;\n            // rootStore.state[store.id] = state\n            const eventData = {\n                time: now(),\n                title: formatMutationType(type),\n                data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n                groupId: activeAction,\n            };\n            if (type === MutationType.patchFunction) {\n                eventData.subtitle = '⤵️';\n            }\n            else if (type === MutationType.patchObject) {\n                eventData.subtitle = '🧩';\n            }\n            else if (events && !Array.isArray(events)) {\n                eventData.subtitle = events.type;\n            }\n            if (events) {\n                eventData.data['rawEvent(s)'] = {\n                    _custom: {\n                        display: 'DebuggerEvent',\n                        type: 'object',\n                        tooltip: 'raw DebuggerEvent[]',\n                        value: events,\n                    },\n                };\n            }\n            api.addTimelineEvent({\n                layerId: MUTATIONS_LAYER_ID,\n                event: eventData,\n            });\n        }, { detached: true, flush: 'sync' });\n        const hotUpdate = store._hotUpdate;\n        store._hotUpdate = markRaw((newStore) => {\n            hotUpdate(newStore);\n            api.addTimelineEvent({\n                layerId: MUTATIONS_LAYER_ID,\n                event: {\n                    time: now(),\n                    title: '🔥 ' + store.$id,\n                    subtitle: 'HMR update',\n                    data: {\n                        store: formatDisplay(store.$id),\n                        info: formatDisplay(`HMR update`),\n                    },\n                },\n            });\n            // update the devtools too\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(INSPECTOR_ID);\n            api.sendInspectorState(INSPECTOR_ID);\n        });\n        const { $dispose } = store;\n        store.$dispose = () => {\n            $dispose();\n            api.notifyComponentUpdate();\n            api.sendInspectorTree(INSPECTOR_ID);\n            api.sendInspectorState(INSPECTOR_ID);\n            api.getSettings().logStoreChanges &&\n                toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n        };\n        // trigger an update so it can display new registered stores\n        api.notifyComponentUpdate();\n        api.sendInspectorTree(INSPECTOR_ID);\n        api.sendInspectorState(INSPECTOR_ID);\n        api.getSettings().logStoreChanges &&\n            toastMessage(`\"${store.$id}\" store installed 🆕`);\n    });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n    // original actions of the store as they are given by pinia. We are going to override them\n    const actions = actionNames.reduce((storeActions, actionName) => {\n        // use toRaw to avoid tracking #541\n        storeActions[actionName] = toRaw(store)[actionName];\n        return storeActions;\n    }, {});\n    for (const actionName in actions) {\n        store[actionName] = function () {\n            // the running action id is incremented in a before action hook\n            const _actionId = runningActionId;\n            const trackedStore = wrapWithProxy\n                ? new Proxy(store, {\n                    get(...args) {\n                        activeAction = _actionId;\n                        return Reflect.get(...args);\n                    },\n                    set(...args) {\n                        activeAction = _actionId;\n                        return Reflect.set(...args);\n                    },\n                })\n                : store;\n            // For Setup Stores we need https://github.com/tc39/proposal-async-context\n            activeAction = _actionId;\n            const retValue = actions[actionName].apply(trackedStore, arguments);\n            // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n            activeAction = undefined;\n            return retValue;\n        };\n    }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n    // HMR module\n    if (store.$id.startsWith('__hot:')) {\n        return;\n    }\n    // detect option api vs setup api\n    store._isOptionsAPI = !!options.state;\n    // Do not overwrite actions mocked by @pinia/testing (#2298)\n    if (!store._p._testing) {\n        patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n        // Upgrade the HMR to also update the new actions\n        const originalHotUpdate = store._hotUpdate;\n        toRaw(store)._hotUpdate = function (newStore) {\n            originalHotUpdate.apply(this, arguments);\n            patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n        };\n    }\n    addStoreToDevtools(app, \n    // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?\n    store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n    const scope = effectScope(true);\n    // NOTE: here we could check the window object for a state and directly set it\n    // if there is anything like it with Vue 3 SSR\n    const state = scope.run(() => ref({}));\n    let _p = [];\n    // plugins added before calling app.use(pinia)\n    let toBeInstalled = [];\n    const pinia = markRaw({\n        install(app) {\n            // this allows calling useStore() outside of a component setup after\n            // installing pinia's plugin\n            setActivePinia(pinia);\n            if (!isVue2) {\n                pinia._a = app;\n                app.provide(piniaSymbol, pinia);\n                app.config.globalProperties.$pinia = pinia;\n                /* istanbul ignore else */\n                if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n                    registerPiniaDevtools(app, pinia);\n                }\n                toBeInstalled.forEach((plugin) => _p.push(plugin));\n                toBeInstalled = [];\n            }\n        },\n        use(plugin) {\n            if (!this._a && !isVue2) {\n                toBeInstalled.push(plugin);\n            }\n            else {\n                _p.push(plugin);\n            }\n            return this;\n        },\n        _p,\n        // it's actually undefined here\n        // @ts-expect-error\n        _a: null,\n        _e: scope,\n        _s: new Map(),\n        state,\n    });\n    // pinia devtools rely on dev only features so they cannot be forced unless\n    // the dev build of Vue is used. Avoid old browsers like IE11.\n    if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && typeof Proxy !== 'undefined') {\n        pinia.use(devtoolsPlugin);\n    }\n    return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n    pinia._e.stop();\n    pinia._s.clear();\n    pinia._p.splice(0);\n    pinia.state.value = {};\n    // @ts-expect-error: non valid\n    pinia._a = null;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n    return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n    // no need to go through symbols because they cannot be serialized anyway\n    for (const key in oldState) {\n        const subPatch = oldState[key];\n        // skip the whole sub tree\n        if (!(key in newState)) {\n            continue;\n        }\n        const targetValue = newState[key];\n        if (isPlainObject(targetValue) &&\n            isPlainObject(subPatch) &&\n            !isRef(subPatch) &&\n            !isReactive(subPatch)) {\n            newState[key] = patchObject(targetValue, subPatch);\n        }\n        else {\n            // objects are either a bit more complex (e.g. refs) or primitives, so we\n            // just set the whole thing\n            if (isVue2) {\n                set(newState, key, subPatch);\n            }\n            else {\n                newState[key] = subPatch;\n            }\n        }\n    }\n    return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n *   import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n    // strip as much as possible from iife.prod\n    if (!(process.env.NODE_ENV !== 'production')) {\n        return () => { };\n    }\n    return (newModule) => {\n        const pinia = hot.data.pinia || initialUseStore._pinia;\n        if (!pinia) {\n            // this store is still not used\n            return;\n        }\n        // preserve the pinia instance across loads\n        hot.data.pinia = pinia;\n        // console.log('got data', newStore)\n        for (const exportName in newModule) {\n            const useStore = newModule[exportName];\n            // console.log('checking for', exportName)\n            if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n                // console.log('Accepting update for', useStore.$id)\n                const id = useStore.$id;\n                if (id !== initialUseStore.$id) {\n                    console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n                    // return import.meta.hot.invalidate()\n                    return hot.invalidate();\n                }\n                const existingStore = pinia._s.get(id);\n                if (!existingStore) {\n                    console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n                    return;\n                }\n                useStore(pinia, existingStore);\n            }\n        }\n    };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n    subscriptions.push(callback);\n    const removeSubscription = () => {\n        const idx = subscriptions.indexOf(callback);\n        if (idx > -1) {\n            subscriptions.splice(idx, 1);\n            onCleanup();\n        }\n    };\n    if (!detached && getCurrentScope()) {\n        onScopeDispose(removeSubscription);\n    }\n    return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n    subscriptions.slice().forEach((callback) => {\n        callback(...args);\n    });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\nfunction mergeReactiveObjects(target, patchToApply) {\n    // Handle Map instances\n    if (target instanceof Map && patchToApply instanceof Map) {\n        patchToApply.forEach((value, key) => target.set(key, value));\n    }\n    else if (target instanceof Set && patchToApply instanceof Set) {\n        // Handle Set instances\n        patchToApply.forEach(target.add, target);\n    }\n    // no need to go through symbols because they cannot be serialized anyway\n    for (const key in patchToApply) {\n        if (!patchToApply.hasOwnProperty(key))\n            continue;\n        const subPatch = patchToApply[key];\n        const targetValue = target[key];\n        if (isPlainObject(targetValue) &&\n            isPlainObject(subPatch) &&\n            target.hasOwnProperty(key) &&\n            !isRef(subPatch) &&\n            !isReactive(subPatch)) {\n            // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n            // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n            // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n            target[key] = mergeReactiveObjects(targetValue, subPatch);\n        }\n        else {\n            // @ts-expect-error: subPatch is a valid value\n            target[key] = subPatch;\n        }\n    }\n    return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n    ? Symbol('pinia:skipHydration')\n    : /* istanbul ignore next */ Symbol();\nconst skipHydrateMap = /*#__PURE__*/ new WeakMap();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n    return isVue2\n        ? // in @vue/composition-api, the refs are sealed so defineProperty doesn't work...\n            /* istanbul ignore next */ skipHydrateMap.set(obj, 1) && obj\n        : Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n    return isVue2\n        ? /* istanbul ignore next */ !skipHydrateMap.has(obj)\n        : !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n    return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n    const { state, actions, getters } = options;\n    const initialState = pinia.state.value[id];\n    let store;\n    function setup() {\n        if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n            /* istanbul ignore if */\n            if (isVue2) {\n                set(pinia.state.value, id, state ? state() : {});\n            }\n            else {\n                pinia.state.value[id] = state ? state() : {};\n            }\n        }\n        // avoid creating a state in pinia.state.value\n        const localState = (process.env.NODE_ENV !== 'production') && hot\n            ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n                toRefs(ref(state ? state() : {}).value)\n            : toRefs(pinia.state.value[id]);\n        return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n            if ((process.env.NODE_ENV !== 'production') && name in localState) {\n                console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n            }\n            computedGetters[name] = markRaw(computed(() => {\n                setActivePinia(pinia);\n                // it was created just before\n                const store = pinia._s.get(id);\n                // allow cross using stores\n                /* istanbul ignore if */\n                if (isVue2 && !store._r)\n                    return;\n                // @ts-expect-error\n                // return getters![name].call(context, context)\n                // TODO: avoid reading the getter while assigning with a global variable\n                return getters[name].call(store, store);\n            }));\n            return computedGetters;\n        }, {}));\n    }\n    store = createSetupStore(id, setup, options, pinia, hot, true);\n    return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n    let scope;\n    const optionsForPlugin = assign({ actions: {} }, options);\n    /* istanbul ignore if */\n    if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n        throw new Error('Pinia destroyed');\n    }\n    // watcher options for $subscribe\n    const $subscribeOptions = { deep: true };\n    /* istanbul ignore else */\n    if ((process.env.NODE_ENV !== 'production') && !isVue2) {\n        $subscribeOptions.onTrigger = (event) => {\n            /* istanbul ignore else */\n            if (isListening) {\n                debuggerEvents = event;\n                // avoid triggering this while the store is being built and the state is being set in pinia\n            }\n            else if (isListening == false && !store._hotUpdating) {\n                // let patch send all the events together later\n                /* istanbul ignore else */\n                if (Array.isArray(debuggerEvents)) {\n                    debuggerEvents.push(event);\n                }\n                else {\n                    console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n                }\n            }\n        };\n    }\n    // internal state\n    let isListening; // set to true at the end\n    let isSyncListening; // set to true at the end\n    let subscriptions = [];\n    let actionSubscriptions = [];\n    let debuggerEvents;\n    const initialState = pinia.state.value[$id];\n    // avoid setting the state for option stores if it is set\n    // by the setup\n    if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n        /* istanbul ignore if */\n        if (isVue2) {\n            set(pinia.state.value, $id, {});\n        }\n        else {\n            pinia.state.value[$id] = {};\n        }\n    }\n    const hotState = ref({});\n    // avoid triggering too many listeners\n    // https://github.com/vuejs/pinia/issues/1129\n    let activeListener;\n    function $patch(partialStateOrMutator) {\n        let subscriptionMutation;\n        isListening = isSyncListening = false;\n        // reset the debugger events since patches are sync\n        /* istanbul ignore else */\n        if ((process.env.NODE_ENV !== 'production')) {\n            debuggerEvents = [];\n        }\n        if (typeof partialStateOrMutator === 'function') {\n            partialStateOrMutator(pinia.state.value[$id]);\n            subscriptionMutation = {\n                type: MutationType.patchFunction,\n                storeId: $id,\n                events: debuggerEvents,\n            };\n        }\n        else {\n            mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n            subscriptionMutation = {\n                type: MutationType.patchObject,\n                payload: partialStateOrMutator,\n                storeId: $id,\n                events: debuggerEvents,\n            };\n        }\n        const myListenerId = (activeListener = Symbol());\n        nextTick().then(() => {\n            if (activeListener === myListenerId) {\n                isListening = true;\n            }\n        });\n        isSyncListening = true;\n        // because we paused the watcher, we need to manually call the subscriptions\n        triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n    }\n    const $reset = isOptionsStore\n        ? function $reset() {\n            const { state } = options;\n            const newState = state ? state() : {};\n            // we use a patch to group all changes into one single subscription\n            this.$patch(($state) => {\n                // @ts-expect-error: FIXME: shouldn't error?\n                assign($state, newState);\n            });\n        }\n        : /* istanbul ignore next */\n            (process.env.NODE_ENV !== 'production')\n                ? () => {\n                    throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n                }\n                : noop;\n    function $dispose() {\n        scope.stop();\n        subscriptions = [];\n        actionSubscriptions = [];\n        pinia._s.delete($id);\n    }\n    /**\n     * Helper that wraps function so it can be tracked with $onAction\n     * @param fn - action to wrap\n     * @param name - name of the action\n     */\n    const action = (fn, name = '') => {\n        if (ACTION_MARKER in fn) {\n            fn[ACTION_NAME] = name;\n            return fn;\n        }\n        const wrappedAction = function () {\n            setActivePinia(pinia);\n            const args = Array.from(arguments);\n            const afterCallbackList = [];\n            const onErrorCallbackList = [];\n            function after(callback) {\n                afterCallbackList.push(callback);\n            }\n            function onError(callback) {\n                onErrorCallbackList.push(callback);\n            }\n            // @ts-expect-error\n            triggerSubscriptions(actionSubscriptions, {\n                args,\n                name: wrappedAction[ACTION_NAME],\n                store,\n                after,\n                onError,\n            });\n            let ret;\n            try {\n                ret = fn.apply(this && this.$id === $id ? this : store, args);\n                // handle sync errors\n            }\n            catch (error) {\n                triggerSubscriptions(onErrorCallbackList, error);\n                throw error;\n            }\n            if (ret instanceof Promise) {\n                return ret\n                    .then((value) => {\n                    triggerSubscriptions(afterCallbackList, value);\n                    return value;\n                })\n                    .catch((error) => {\n                    triggerSubscriptions(onErrorCallbackList, error);\n                    return Promise.reject(error);\n                });\n            }\n            // trigger after callbacks\n            triggerSubscriptions(afterCallbackList, ret);\n            return ret;\n        };\n        wrappedAction[ACTION_MARKER] = true;\n        wrappedAction[ACTION_NAME] = name; // will be set later\n        // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n        // because all the added properties are internals that are exposed through `$onAction()` only\n        return wrappedAction;\n    };\n    const _hmrPayload = /*#__PURE__*/ markRaw({\n        actions: {},\n        getters: {},\n        state: [],\n        hotState,\n    });\n    const partialStore = {\n        _p: pinia,\n        // _s: scope,\n        $id,\n        $onAction: addSubscription.bind(null, actionSubscriptions),\n        $patch,\n        $reset,\n        $subscribe(callback, options = {}) {\n            const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n            const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n                if (options.flush === 'sync' ? isSyncListening : isListening) {\n                    callback({\n                        storeId: $id,\n                        type: MutationType.direct,\n                        events: debuggerEvents,\n                    }, state);\n                }\n            }, assign({}, $subscribeOptions, options)));\n            return removeSubscription;\n        },\n        $dispose,\n    };\n    /* istanbul ignore if */\n    if (isVue2) {\n        // start as non ready\n        partialStore._r = false;\n    }\n    const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\n        ? assign({\n            _hmrPayload,\n            _customProperties: markRaw(new Set()), // devtools custom properties\n        }, partialStore\n        // must be added later\n        // setupStore\n        )\n        : partialStore);\n    // store the partial store now so the setup of stores can instantiate each other before they are finished without\n    // creating infinite loops.\n    pinia._s.set($id, store);\n    const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n    // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n    const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));\n    // overwrite existing actions to support $onAction\n    for (const key in setupStore) {\n        const prop = setupStore[key];\n        if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n            // mark it as a piece of state to be serialized\n            if ((process.env.NODE_ENV !== 'production') && hot) {\n                set(hotState.value, key, toRef(setupStore, key));\n                // createOptionStore directly sets the state in pinia.state.value so we\n                // can just skip that\n            }\n            else if (!isOptionsStore) {\n                // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n                if (initialState && shouldHydrate(prop)) {\n                    if (isRef(prop)) {\n                        prop.value = initialState[key];\n                    }\n                    else {\n                        // probably a reactive object, lets recursively assign\n                        // @ts-expect-error: prop is unknown\n                        mergeReactiveObjects(prop, initialState[key]);\n                    }\n                }\n                // transfer the ref to the pinia state to keep everything in sync\n                /* istanbul ignore if */\n                if (isVue2) {\n                    set(pinia.state.value[$id], key, prop);\n                }\n                else {\n                    pinia.state.value[$id][key] = prop;\n                }\n            }\n            /* istanbul ignore else */\n            if ((process.env.NODE_ENV !== 'production')) {\n                _hmrPayload.state.push(key);\n            }\n            // action\n        }\n        else if (typeof prop === 'function') {\n            const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n            // this a hot module replacement store because the hotUpdate method needs\n            // to do it with the right context\n            /* istanbul ignore if */\n            if (isVue2) {\n                set(setupStore, key, actionValue);\n            }\n            else {\n                // @ts-expect-error\n                setupStore[key] = actionValue;\n            }\n            /* istanbul ignore else */\n            if ((process.env.NODE_ENV !== 'production')) {\n                _hmrPayload.actions[key] = prop;\n            }\n            // list actions so they can be used in plugins\n            // @ts-expect-error\n            optionsForPlugin.actions[key] = prop;\n        }\n        else if ((process.env.NODE_ENV !== 'production')) {\n            // add getters for devtools\n            if (isComputed(prop)) {\n                _hmrPayload.getters[key] = isOptionsStore\n                    ? // @ts-expect-error\n                        options.getters[key]\n                    : prop;\n                if (IS_CLIENT) {\n                    const getters = setupStore._getters ||\n                        // @ts-expect-error: same\n                        (setupStore._getters = markRaw([]));\n                    getters.push(key);\n                }\n            }\n        }\n    }\n    // add the state, getters, and action properties\n    /* istanbul ignore if */\n    if (isVue2) {\n        Object.keys(setupStore).forEach((key) => {\n            set(store, key, setupStore[key]);\n        });\n    }\n    else {\n        assign(store, setupStore);\n        // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n        // Make `storeToRefs()` work with `reactive()` #799\n        assign(toRaw(store), setupStore);\n    }\n    // use this instead of a computed with setter to be able to create it anywhere\n    // without linking the computed lifespan to wherever the store is first\n    // created.\n    Object.defineProperty(store, '$state', {\n        get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n        set: (state) => {\n            /* istanbul ignore if */\n            if ((process.env.NODE_ENV !== 'production') && hot) {\n                throw new Error('cannot set hotState');\n            }\n            $patch(($state) => {\n                // @ts-expect-error: FIXME: shouldn't error?\n                assign($state, state);\n            });\n        },\n    });\n    // add the hotUpdate before plugins to allow them to override it\n    /* istanbul ignore else */\n    if ((process.env.NODE_ENV !== 'production')) {\n        store._hotUpdate = markRaw((newStore) => {\n            store._hotUpdating = true;\n            newStore._hmrPayload.state.forEach((stateKey) => {\n                if (stateKey in store.$state) {\n                    const newStateTarget = newStore.$state[stateKey];\n                    const oldStateSource = store.$state[stateKey];\n                    if (typeof newStateTarget === 'object' &&\n                        isPlainObject(newStateTarget) &&\n                        isPlainObject(oldStateSource)) {\n                        patchObject(newStateTarget, oldStateSource);\n                    }\n                    else {\n                        // transfer the ref\n                        newStore.$state[stateKey] = oldStateSource;\n                    }\n                }\n                // patch direct access properties to allow store.stateProperty to work as\n                // store.$state.stateProperty\n                set(store, stateKey, toRef(newStore.$state, stateKey));\n            });\n            // remove deleted state properties\n            Object.keys(store.$state).forEach((stateKey) => {\n                if (!(stateKey in newStore.$state)) {\n                    del(store, stateKey);\n                }\n            });\n            // avoid devtools logging this as a mutation\n            isListening = false;\n            isSyncListening = false;\n            pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n            isSyncListening = true;\n            nextTick().then(() => {\n                isListening = true;\n            });\n            for (const actionName in newStore._hmrPayload.actions) {\n                const actionFn = newStore[actionName];\n                set(store, actionName, action(actionFn, actionName));\n            }\n            // TODO: does this work in both setup and option store?\n            for (const getterName in newStore._hmrPayload.getters) {\n                const getter = newStore._hmrPayload.getters[getterName];\n                const getterValue = isOptionsStore\n                    ? // special handling of options api\n                        computed(() => {\n                            setActivePinia(pinia);\n                            return getter.call(store, store);\n                        })\n                    : getter;\n                set(store, getterName, getterValue);\n            }\n            // remove deleted getters\n            Object.keys(store._hmrPayload.getters).forEach((key) => {\n                if (!(key in newStore._hmrPayload.getters)) {\n                    del(store, key);\n                }\n            });\n            // remove old actions\n            Object.keys(store._hmrPayload.actions).forEach((key) => {\n                if (!(key in newStore._hmrPayload.actions)) {\n                    del(store, key);\n                }\n            });\n            // update the values used in devtools and to allow deleting new properties later on\n            store._hmrPayload = newStore._hmrPayload;\n            store._getters = newStore._getters;\n            store._hotUpdating = false;\n        });\n    }\n    if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n        const nonEnumerable = {\n            writable: true,\n            configurable: true,\n            // avoid warning on devtools trying to display this property\n            enumerable: false,\n        };\n        ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n            Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n        });\n    }\n    /* istanbul ignore if */\n    if (isVue2) {\n        // mark the store as ready before plugins\n        store._r = true;\n    }\n    // apply all plugins\n    pinia._p.forEach((extender) => {\n        /* istanbul ignore else */\n        if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n            const extensions = scope.run(() => extender({\n                store: store,\n                app: pinia._a,\n                pinia,\n                options: optionsForPlugin,\n            }));\n            Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n            assign(store, extensions);\n        }\n        else {\n            assign(store, scope.run(() => extender({\n                store: store,\n                app: pinia._a,\n                pinia,\n                options: optionsForPlugin,\n            })));\n        }\n    });\n    if ((process.env.NODE_ENV !== 'production') &&\n        store.$state &&\n        typeof store.$state === 'object' &&\n        typeof store.$state.constructor === 'function' &&\n        !store.$state.constructor.toString().includes('[native code]')) {\n        console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n            `\\tstate: () => new MyClass()\\n` +\n            `Found in store \"${store.$id}\".`);\n    }\n    // only apply hydrate to option stores with an initial state in pinia\n    if (initialState &&\n        isOptionsStore &&\n        options.hydrate) {\n        options.hydrate(store.$state, initialState);\n    }\n    isListening = true;\n    isSyncListening = true;\n    return store;\n}\n// improves tree shaking\n/*#__NO_SIDE_EFFECTS__*/\nfunction defineStore(\n// TODO: add proper types from above\nidOrOptions, setup, setupOptions) {\n    let id;\n    let options;\n    const isSetupStore = typeof setup === 'function';\n    if (typeof idOrOptions === 'string') {\n        id = idOrOptions;\n        // the option store setup will contain the actual options in this case\n        options = isSetupStore ? setupOptions : setup;\n    }\n    else {\n        options = idOrOptions;\n        id = idOrOptions.id;\n        if ((process.env.NODE_ENV !== 'production') && typeof id !== 'string') {\n            throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n        }\n    }\n    function useStore(pinia, hot) {\n        const hasContext = hasInjectionContext();\n        pinia =\n            // in test mode, ignore the argument provided as we can always retrieve a\n            // pinia instance with getActivePinia()\n            ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n                (hasContext ? inject(piniaSymbol, null) : null);\n        if (pinia)\n            setActivePinia(pinia);\n        if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n            throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n                `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n                `This will fail in production.`);\n        }\n        pinia = activePinia;\n        if (!pinia._s.has(id)) {\n            // creating the store registers it in `pinia._s`\n            if (isSetupStore) {\n                createSetupStore(id, setup, options, pinia);\n            }\n            else {\n                createOptionsStore(id, options, pinia);\n            }\n            /* istanbul ignore else */\n            if ((process.env.NODE_ENV !== 'production')) {\n                // @ts-expect-error: not the right inferred type\n                useStore._pinia = pinia;\n            }\n        }\n        const store = pinia._s.get(id);\n        if ((process.env.NODE_ENV !== 'production') && hot) {\n            const hotId = '__hot:' + id;\n            const newStore = isSetupStore\n                ? createSetupStore(hotId, setup, options, pinia, true)\n                : createOptionsStore(hotId, assign({}, options), pinia, true);\n            hot._hotUpdate(newStore);\n            // cleanup the state properties and the store from the cache\n            delete pinia.state.value[hotId];\n            pinia._s.delete(hotId);\n        }\n        if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n            const currentInstance = getCurrentInstance();\n            // save stores in instances to access them devtools\n            if (currentInstance &&\n                currentInstance.proxy &&\n                // avoid adding stores that are just built for hot module replacement\n                !hot) {\n                const vm = currentInstance.proxy;\n                const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n                cache[id] = store;\n            }\n        }\n        // StoreGeneric cannot be casted towards Store\n        return store;\n    }\n    useStore.$id = id;\n    return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n    mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n *   computed: {\n *     // other computed properties\n *     ...mapStores(useUserStore, useCartStore)\n *   },\n *\n *   created() {\n *     this.userStore // store with id \"user\"\n *     this.cartStore // store with id \"cart\"\n *   }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n    if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n        console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n            `Replace\\n` +\n            `\\tmapStores([useAuthStore, useCartStore])\\n` +\n            `with\\n` +\n            `\\tmapStores(useAuthStore, useCartStore)\\n` +\n            `This will fail in production if not fixed.`);\n        stores = stores[0];\n    }\n    return stores.reduce((reduced, useStore) => {\n        // @ts-expect-error: $id is added by defineStore\n        reduced[useStore.$id + mapStoreSuffix] = function () {\n            return useStore(this.$pinia);\n        };\n        return reduced;\n    }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n    return Array.isArray(keysOrMapper)\n        ? keysOrMapper.reduce((reduced, key) => {\n            reduced[key] = function () {\n                return useStore(this.$pinia)[key];\n            };\n            return reduced;\n        }, {})\n        : Object.keys(keysOrMapper).reduce((reduced, key) => {\n            // @ts-expect-error\n            reduced[key] = function () {\n                const store = useStore(this.$pinia);\n                const storeKey = keysOrMapper[key];\n                // for some reason TS is unable to infer the type of storeKey to be a\n                // function\n                return typeof storeKey === 'function'\n                    ? storeKey.call(this, store)\n                    : store[storeKey];\n            };\n            return reduced;\n        }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n    return Array.isArray(keysOrMapper)\n        ? keysOrMapper.reduce((reduced, key) => {\n            // @ts-expect-error\n            reduced[key] = function (...args) {\n                // @ts-expect-error: FIXME: should work?\n                return useStore(this.$pinia)[key](...args);\n            };\n            return reduced;\n        }, {})\n        : Object.keys(keysOrMapper).reduce((reduced, key) => {\n            // @ts-expect-error\n            reduced[key] = function (...args) {\n                // @ts-expect-error: FIXME: should work?\n                return useStore(this.$pinia)[keysOrMapper[key]](...args);\n            };\n            return reduced;\n        }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n    return Array.isArray(keysOrMapper)\n        ? keysOrMapper.reduce((reduced, key) => {\n            // @ts-ignore\n            reduced[key] = {\n                get() {\n                    // @ts-expect-error: FIXME: should work?\n                    return useStore(this.$pinia)[key];\n                },\n                set(value) {\n                    // @ts-expect-error: FIXME: should work?\n                    return (useStore(this.$pinia)[key] = value);\n                },\n            };\n            return reduced;\n        }, {})\n        : Object.keys(keysOrMapper).reduce((reduced, key) => {\n            // @ts-ignore\n            reduced[key] = {\n                get() {\n                    // @ts-expect-error: FIXME: should work?\n                    return useStore(this.$pinia)[keysOrMapper[key]];\n                },\n                set(value) {\n                    // @ts-expect-error: FIXME: should work?\n                    return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n                },\n            };\n            return reduced;\n        }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n    // See https://github.com/vuejs/pinia/issues/852\n    // It's easier to just use toRefs() even if it includes more stuff\n    if (isVue2) {\n        // @ts-expect-error: toRefs include methods and others\n        return toRefs(store);\n    }\n    else {\n        store = toRaw(store);\n        const refs = {};\n        for (const key in store) {\n            const value = store[key];\n            if (isRef(value) || isReactive(value)) {\n                // @ts-expect-error: the key is state or getter\n                refs[key] =\n                    // ---\n                    toRef(store, key);\n            }\n        }\n        return refs;\n    }\n}\n\n/**\n * Vue 2 Plugin that must be installed for pinia to work. Note **you don't need\n * this plugin if you are using Nuxt.js**. Use the `buildModule` instead:\n * https://pinia.vuejs.org/ssr/nuxt.html.\n *\n * @example\n * ```js\n * import Vue from 'vue'\n * import { PiniaVuePlugin, createPinia } from 'pinia'\n *\n * Vue.use(PiniaVuePlugin)\n * const pinia = createPinia()\n *\n * new Vue({\n *   el: '#app',\n *   // ...\n *   pinia,\n * })\n * ```\n *\n * @param _Vue - `Vue` imported from 'vue'.\n */\nconst PiniaVuePlugin = function (_Vue) {\n    // Equivalent of\n    // app.config.globalProperties.$pinia = pinia\n    _Vue.mixin({\n        beforeCreate() {\n            const options = this.$options;\n            if (options.pinia) {\n                const pinia = options.pinia;\n                // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/main/src/apis/inject.ts#L31\n                /* istanbul ignore else */\n                if (!this._provided) {\n                    const provideCache = {};\n                    Object.defineProperty(this, '_provided', {\n                        get: () => provideCache,\n                        set: (v) => Object.assign(provideCache, v),\n                    });\n                }\n                this._provided[piniaSymbol] = pinia;\n                // propagate the pinia instance in an SSR friendly way\n                // avoid adding it to nuxt twice\n                /* istanbul ignore else */\n                if (!this.$pinia) {\n                    this.$pinia = pinia;\n                }\n                pinia._a = this;\n                if (IS_CLIENT) {\n                    // this allows calling useStore() outside of a component setup after\n                    // installing pinia's plugin\n                    setActivePinia(pinia);\n                }\n                if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n                    registerPiniaDevtools(pinia._a, pinia);\n                }\n            }\n            else if (!this.$pinia && options.parent && options.parent.$pinia) {\n                this.$pinia = options.parent.$pinia;\n            }\n        },\n        destroyed() {\n            delete this._pStores;\n        },\n    });\n};\n\nexport { MutationType, PiniaVuePlugin, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, skipHydrate, storeToRefs };\n","import axios, { AxiosResponse } from \"axios\";\r\n\r\nexport default {\r\n    /**\r\n     * Get favorites\r\n     */\r\n    getFavorites(): Promise<AxiosResponse<Array<number | string>>> {\r\n        return axios.get(\"/cart/GetFavorites?field=productCode\");\r\n    },\r\n    /**\r\n     * Toggle favorite\r\n     */\r\n    toggleFavorite(productCode: string): Promise<AxiosResponse<any>> {\r\n        return axios.post(\r\n            \"/cart/ToggleFavorite\",\r\n            {\r\n                productCode,\r\n            },\r\n            {\r\n                headers: {\r\n                    \"X-Requested-With\": \"XMLHttpRequest\",\r\n                },\r\n            },\r\n        );\r\n    },\r\n};\r\n","import { defineStore } from \"pinia\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport FavoriteService from \"../services/favorites.service\";\r\nimport { updateFavorites } from \"../../modules/favorite_wp\";\r\n\r\nexport const useFavoritesStore = defineStore(\"favorites\", {\r\n    state: () => ({\r\n        favorites: null as Array<string> | null,\r\n        isLoadingFavorites: false,\r\n    }),\r\n    actions: {\r\n        /**\r\n         * Get favorites\r\n         */\r\n        async getFavorites(): Promise<void> {\r\n            this.isLoadingFavorites = true;\r\n\r\n            try {\r\n                const response: AxiosResponse<Array<number | string>> =\r\n                    await FavoriteService.getFavorites();\r\n                this.favorites = response.data.map((i) => String(i));\r\n                updateFavorites();\r\n            } catch (error) {\r\n                // Fail silently...\r\n                this.favorites = null;\r\n            }\r\n\r\n            this.isLoadingFavorites = false;\r\n        },\r\n        /**\r\n         * Toggle favorite\r\n         */\r\n        async toggleFavorite(productKey: string): Promise<void> {\r\n            this.isLoadingFavorites = true;\r\n\r\n            try {\r\n                await FavoriteService.toggleFavorite(productKey);\r\n                await this.getFavorites();\r\n            } catch (error) {\r\n                await this.getFavorites();\r\n            }\r\n\r\n            this.isLoadingFavorites = false;\r\n        },\r\n    },\r\n    getters: {\r\n        isFavorite: (state) => (epiProductCode: string) => {\r\n            return state.favorites && state.favorites?.indexOf(epiProductCode) !== -1;\r\n        },\r\n    },\r\n});\r\n\r\n/**\r\n * Get favorites for non-Vue usage\r\n */\r\nexport async function getFavorites() {\r\n    try {\r\n        const response: AxiosResponse<Array<number | string>> =\r\n            await FavoriteService.getFavorites();\r\n        const favoriteCartAmount = document.querySelector(\r\n            \"._js-minicart-amount\",\r\n        );\r\n        if (favoriteCartAmount) {\r\n            favoriteCartAmount.innerHTML = response.data.length\r\n                ? response.data.length.toString()\r\n                : \"\";\r\n        }\r\n        return response;\r\n    } catch (error) {\r\n        // Fail silently...\r\n        return null;\r\n    }\r\n}\r\n","var util;\n(function (util) {\n    util.assertEqual = (val) => val;\n    function assertIs(_arg) { }\n    util.assertIs = assertIs;\n    function assertNever(_x) {\n        throw new Error();\n    }\n    util.assertNever = assertNever;\n    util.arrayToEnum = (items) => {\n        const obj = {};\n        for (const item of items) {\n            obj[item] = item;\n        }\n        return obj;\n    };\n    util.getValidEnumValues = (obj) => {\n        const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n        const filtered = {};\n        for (const k of validKeys) {\n            filtered[k] = obj[k];\n        }\n        return util.objectValues(filtered);\n    };\n    util.objectValues = (obj) => {\n        return util.objectKeys(obj).map(function (e) {\n            return obj[e];\n        });\n    };\n    util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n        ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n        : (object) => {\n            const keys = [];\n            for (const key in object) {\n                if (Object.prototype.hasOwnProperty.call(object, key)) {\n                    keys.push(key);\n                }\n            }\n            return keys;\n        };\n    util.find = (arr, checker) => {\n        for (const item of arr) {\n            if (checker(item))\n                return item;\n        }\n        return undefined;\n    };\n    util.isInteger = typeof Number.isInteger === \"function\"\n        ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n        : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n    function joinValues(array, separator = \" | \") {\n        return array\n            .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n            .join(separator);\n    }\n    util.joinValues = joinValues;\n    util.jsonStringifyReplacer = (_, value) => {\n        if (typeof value === \"bigint\") {\n            return value.toString();\n        }\n        return value;\n    };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n    objectUtil.mergeShapes = (first, second) => {\n        return {\n            ...first,\n            ...second, // second overwrites first\n        };\n    };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n    \"string\",\n    \"nan\",\n    \"number\",\n    \"integer\",\n    \"float\",\n    \"boolean\",\n    \"date\",\n    \"bigint\",\n    \"symbol\",\n    \"function\",\n    \"undefined\",\n    \"null\",\n    \"array\",\n    \"object\",\n    \"unknown\",\n    \"promise\",\n    \"void\",\n    \"never\",\n    \"map\",\n    \"set\",\n]);\nconst getParsedType = (data) => {\n    const t = typeof data;\n    switch (t) {\n        case \"undefined\":\n            return ZodParsedType.undefined;\n        case \"string\":\n            return ZodParsedType.string;\n        case \"number\":\n            return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n        case \"boolean\":\n            return ZodParsedType.boolean;\n        case \"function\":\n            return ZodParsedType.function;\n        case \"bigint\":\n            return ZodParsedType.bigint;\n        case \"symbol\":\n            return ZodParsedType.symbol;\n        case \"object\":\n            if (Array.isArray(data)) {\n                return ZodParsedType.array;\n            }\n            if (data === null) {\n                return ZodParsedType.null;\n            }\n            if (data.then &&\n                typeof data.then === \"function\" &&\n                data.catch &&\n                typeof data.catch === \"function\") {\n                return ZodParsedType.promise;\n            }\n            if (typeof Map !== \"undefined\" && data instanceof Map) {\n                return ZodParsedType.map;\n            }\n            if (typeof Set !== \"undefined\" && data instanceof Set) {\n                return ZodParsedType.set;\n            }\n            if (typeof Date !== \"undefined\" && data instanceof Date) {\n                return ZodParsedType.date;\n            }\n            return ZodParsedType.object;\n        default:\n            return ZodParsedType.unknown;\n    }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n    \"invalid_type\",\n    \"invalid_literal\",\n    \"custom\",\n    \"invalid_union\",\n    \"invalid_union_discriminator\",\n    \"invalid_enum_value\",\n    \"unrecognized_keys\",\n    \"invalid_arguments\",\n    \"invalid_return_type\",\n    \"invalid_date\",\n    \"invalid_string\",\n    \"too_small\",\n    \"too_big\",\n    \"invalid_intersection_types\",\n    \"not_multiple_of\",\n    \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n    const json = JSON.stringify(obj, null, 2);\n    return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n    constructor(issues) {\n        super();\n        this.issues = [];\n        this.addIssue = (sub) => {\n            this.issues = [...this.issues, sub];\n        };\n        this.addIssues = (subs = []) => {\n            this.issues = [...this.issues, ...subs];\n        };\n        const actualProto = new.target.prototype;\n        if (Object.setPrototypeOf) {\n            // eslint-disable-next-line ban/ban\n            Object.setPrototypeOf(this, actualProto);\n        }\n        else {\n            this.__proto__ = actualProto;\n        }\n        this.name = \"ZodError\";\n        this.issues = issues;\n    }\n    get errors() {\n        return this.issues;\n    }\n    format(_mapper) {\n        const mapper = _mapper ||\n            function (issue) {\n                return issue.message;\n            };\n        const fieldErrors = { _errors: [] };\n        const processError = (error) => {\n            for (const issue of error.issues) {\n                if (issue.code === \"invalid_union\") {\n                    issue.unionErrors.map(processError);\n                }\n                else if (issue.code === \"invalid_return_type\") {\n                    processError(issue.returnTypeError);\n                }\n                else if (issue.code === \"invalid_arguments\") {\n                    processError(issue.argumentsError);\n                }\n                else if (issue.path.length === 0) {\n                    fieldErrors._errors.push(mapper(issue));\n                }\n                else {\n                    let curr = fieldErrors;\n                    let i = 0;\n                    while (i < issue.path.length) {\n                        const el = issue.path[i];\n                        const terminal = i === issue.path.length - 1;\n                        if (!terminal) {\n                            curr[el] = curr[el] || { _errors: [] };\n                            // if (typeof el === \"string\") {\n                            //   curr[el] = curr[el] || { _errors: [] };\n                            // } else if (typeof el === \"number\") {\n                            //   const errorArray: any = [];\n                            //   errorArray._errors = [];\n                            //   curr[el] = curr[el] || errorArray;\n                            // }\n                        }\n                        else {\n                            curr[el] = curr[el] || { _errors: [] };\n                            curr[el]._errors.push(mapper(issue));\n                        }\n                        curr = curr[el];\n                        i++;\n                    }\n                }\n            }\n        };\n        processError(this);\n        return fieldErrors;\n    }\n    toString() {\n        return this.message;\n    }\n    get message() {\n        return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n    }\n    get isEmpty() {\n        return this.issues.length === 0;\n    }\n    flatten(mapper = (issue) => issue.message) {\n        const fieldErrors = {};\n        const formErrors = [];\n        for (const sub of this.issues) {\n            if (sub.path.length > 0) {\n                fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n                fieldErrors[sub.path[0]].push(mapper(sub));\n            }\n            else {\n                formErrors.push(mapper(sub));\n            }\n        }\n        return { formErrors, fieldErrors };\n    }\n    get formErrors() {\n        return this.flatten();\n    }\n}\nZodError.create = (issues) => {\n    const error = new ZodError(issues);\n    return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n    let message;\n    switch (issue.code) {\n        case ZodIssueCode.invalid_type:\n            if (issue.received === ZodParsedType.undefined) {\n                message = \"Required\";\n            }\n            else {\n                message = `Expected ${issue.expected}, received ${issue.received}`;\n            }\n            break;\n        case ZodIssueCode.invalid_literal:\n            message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n            break;\n        case ZodIssueCode.unrecognized_keys:\n            message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n            break;\n        case ZodIssueCode.invalid_union:\n            message = `Invalid input`;\n            break;\n        case ZodIssueCode.invalid_union_discriminator:\n            message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n            break;\n        case ZodIssueCode.invalid_enum_value:\n            message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n            break;\n        case ZodIssueCode.invalid_arguments:\n            message = `Invalid function arguments`;\n            break;\n        case ZodIssueCode.invalid_return_type:\n            message = `Invalid function return type`;\n            break;\n        case ZodIssueCode.invalid_date:\n            message = `Invalid date`;\n            break;\n        case ZodIssueCode.invalid_string:\n            if (typeof issue.validation === \"object\") {\n                if (\"includes\" in issue.validation) {\n                    message = `Invalid input: must include \"${issue.validation.includes}\"`;\n                    if (typeof issue.validation.position === \"number\") {\n                        message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n                    }\n                }\n                else if (\"startsWith\" in issue.validation) {\n                    message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n                }\n                else if (\"endsWith\" in issue.validation) {\n                    message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n                }\n                else {\n                    util.assertNever(issue.validation);\n                }\n            }\n            else if (issue.validation !== \"regex\") {\n                message = `Invalid ${issue.validation}`;\n            }\n            else {\n                message = \"Invalid\";\n            }\n            break;\n        case ZodIssueCode.too_small:\n            if (issue.type === \"array\")\n                message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n            else if (issue.type === \"string\")\n                message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n            else if (issue.type === \"number\")\n                message = `Number must be ${issue.exact\n                    ? `exactly equal to `\n                    : issue.inclusive\n                        ? `greater than or equal to `\n                        : `greater than `}${issue.minimum}`;\n            else if (issue.type === \"date\")\n                message = `Date must be ${issue.exact\n                    ? `exactly equal to `\n                    : issue.inclusive\n                        ? `greater than or equal to `\n                        : `greater than `}${new Date(Number(issue.minimum))}`;\n            else\n                message = \"Invalid input\";\n            break;\n        case ZodIssueCode.too_big:\n            if (issue.type === \"array\")\n                message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n            else if (issue.type === \"string\")\n                message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n            else if (issue.type === \"number\")\n                message = `Number must be ${issue.exact\n                    ? `exactly`\n                    : issue.inclusive\n                        ? `less than or equal to`\n                        : `less than`} ${issue.maximum}`;\n            else if (issue.type === \"bigint\")\n                message = `BigInt must be ${issue.exact\n                    ? `exactly`\n                    : issue.inclusive\n                        ? `less than or equal to`\n                        : `less than`} ${issue.maximum}`;\n            else if (issue.type === \"date\")\n                message = `Date must be ${issue.exact\n                    ? `exactly`\n                    : issue.inclusive\n                        ? `smaller than or equal to`\n                        : `smaller than`} ${new Date(Number(issue.maximum))}`;\n            else\n                message = \"Invalid input\";\n            break;\n        case ZodIssueCode.custom:\n            message = `Invalid input`;\n            break;\n        case ZodIssueCode.invalid_intersection_types:\n            message = `Intersection results could not be merged`;\n            break;\n        case ZodIssueCode.not_multiple_of:\n            message = `Number must be a multiple of ${issue.multipleOf}`;\n            break;\n        case ZodIssueCode.not_finite:\n            message = \"Number must be finite\";\n            break;\n        default:\n            message = _ctx.defaultError;\n            util.assertNever(issue);\n    }\n    return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n    overrideErrorMap = map;\n}\nfunction getErrorMap() {\n    return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n    const { data, path, errorMaps, issueData } = params;\n    const fullPath = [...path, ...(issueData.path || [])];\n    const fullIssue = {\n        ...issueData,\n        path: fullPath,\n    };\n    let errorMessage = \"\";\n    const maps = errorMaps\n        .filter((m) => !!m)\n        .slice()\n        .reverse();\n    for (const map of maps) {\n        errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n    }\n    return {\n        ...issueData,\n        path: fullPath,\n        message: issueData.message || errorMessage,\n    };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n    const issue = makeIssue({\n        issueData: issueData,\n        data: ctx.data,\n        path: ctx.path,\n        errorMaps: [\n            ctx.common.contextualErrorMap,\n            ctx.schemaErrorMap,\n            getErrorMap(),\n            errorMap, // then global default map\n        ].filter((x) => !!x),\n    });\n    ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n    constructor() {\n        this.value = \"valid\";\n    }\n    dirty() {\n        if (this.value === \"valid\")\n            this.value = \"dirty\";\n    }\n    abort() {\n        if (this.value !== \"aborted\")\n            this.value = \"aborted\";\n    }\n    static mergeArray(status, results) {\n        const arrayValue = [];\n        for (const s of results) {\n            if (s.status === \"aborted\")\n                return INVALID;\n            if (s.status === \"dirty\")\n                status.dirty();\n            arrayValue.push(s.value);\n        }\n        return { status: status.value, value: arrayValue };\n    }\n    static async mergeObjectAsync(status, pairs) {\n        const syncPairs = [];\n        for (const pair of pairs) {\n            syncPairs.push({\n                key: await pair.key,\n                value: await pair.value,\n            });\n        }\n        return ParseStatus.mergeObjectSync(status, syncPairs);\n    }\n    static mergeObjectSync(status, pairs) {\n        const finalObject = {};\n        for (const pair of pairs) {\n            const { key, value } = pair;\n            if (key.status === \"aborted\")\n                return INVALID;\n            if (value.status === \"aborted\")\n                return INVALID;\n            if (key.status === \"dirty\")\n                status.dirty();\n            if (value.status === \"dirty\")\n                status.dirty();\n            if (key.value !== \"__proto__\" &&\n                (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n                finalObject[key.value] = value.value;\n            }\n        }\n        return { status: status.value, value: finalObject };\n    }\n}\nconst INVALID = Object.freeze({\n    status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n    errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n    errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n    constructor(parent, value, path, key) {\n        this._cachedPath = [];\n        this.parent = parent;\n        this.data = value;\n        this._path = path;\n        this._key = key;\n    }\n    get path() {\n        if (!this._cachedPath.length) {\n            if (this._key instanceof Array) {\n                this._cachedPath.push(...this._path, ...this._key);\n            }\n            else {\n                this._cachedPath.push(...this._path, this._key);\n            }\n        }\n        return this._cachedPath;\n    }\n}\nconst handleResult = (ctx, result) => {\n    if (isValid(result)) {\n        return { success: true, data: result.value };\n    }\n    else {\n        if (!ctx.common.issues.length) {\n            throw new Error(\"Validation failed but no issues detected.\");\n        }\n        return {\n            success: false,\n            get error() {\n                if (this._error)\n                    return this._error;\n                const error = new ZodError(ctx.common.issues);\n                this._error = error;\n                return this._error;\n            },\n        };\n    }\n};\nfunction processCreateParams(params) {\n    if (!params)\n        return {};\n    const { errorMap, invalid_type_error, required_error, description } = params;\n    if (errorMap && (invalid_type_error || required_error)) {\n        throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n    }\n    if (errorMap)\n        return { errorMap: errorMap, description };\n    const customMap = (iss, ctx) => {\n        if (iss.code !== \"invalid_type\")\n            return { message: ctx.defaultError };\n        if (typeof ctx.data === \"undefined\") {\n            return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n        }\n        return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n    };\n    return { errorMap: customMap, description };\n}\nclass ZodType {\n    constructor(def) {\n        /** Alias of safeParseAsync */\n        this.spa = this.safeParseAsync;\n        this._def = def;\n        this.parse = this.parse.bind(this);\n        this.safeParse = this.safeParse.bind(this);\n        this.parseAsync = this.parseAsync.bind(this);\n        this.safeParseAsync = this.safeParseAsync.bind(this);\n        this.spa = this.spa.bind(this);\n        this.refine = this.refine.bind(this);\n        this.refinement = this.refinement.bind(this);\n        this.superRefine = this.superRefine.bind(this);\n        this.optional = this.optional.bind(this);\n        this.nullable = this.nullable.bind(this);\n        this.nullish = this.nullish.bind(this);\n        this.array = this.array.bind(this);\n        this.promise = this.promise.bind(this);\n        this.or = this.or.bind(this);\n        this.and = this.and.bind(this);\n        this.transform = this.transform.bind(this);\n        this.brand = this.brand.bind(this);\n        this.default = this.default.bind(this);\n        this.catch = this.catch.bind(this);\n        this.describe = this.describe.bind(this);\n        this.pipe = this.pipe.bind(this);\n        this.readonly = this.readonly.bind(this);\n        this.isNullable = this.isNullable.bind(this);\n        this.isOptional = this.isOptional.bind(this);\n    }\n    get description() {\n        return this._def.description;\n    }\n    _getType(input) {\n        return getParsedType(input.data);\n    }\n    _getOrReturnCtx(input, ctx) {\n        return (ctx || {\n            common: input.parent.common,\n            data: input.data,\n            parsedType: getParsedType(input.data),\n            schemaErrorMap: this._def.errorMap,\n            path: input.path,\n            parent: input.parent,\n        });\n    }\n    _processInputParams(input) {\n        return {\n            status: new ParseStatus(),\n            ctx: {\n                common: input.parent.common,\n                data: input.data,\n                parsedType: getParsedType(input.data),\n                schemaErrorMap: this._def.errorMap,\n                path: input.path,\n                parent: input.parent,\n            },\n        };\n    }\n    _parseSync(input) {\n        const result = this._parse(input);\n        if (isAsync(result)) {\n            throw new Error(\"Synchronous parse encountered promise.\");\n        }\n        return result;\n    }\n    _parseAsync(input) {\n        const result = this._parse(input);\n        return Promise.resolve(result);\n    }\n    parse(data, params) {\n        const result = this.safeParse(data, params);\n        if (result.success)\n            return result.data;\n        throw result.error;\n    }\n    safeParse(data, params) {\n        var _a;\n        const ctx = {\n            common: {\n                issues: [],\n                async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n                contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n            },\n            path: (params === null || params === void 0 ? void 0 : params.path) || [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n        return handleResult(ctx, result);\n    }\n    async parseAsync(data, params) {\n        const result = await this.safeParseAsync(data, params);\n        if (result.success)\n            return result.data;\n        throw result.error;\n    }\n    async safeParseAsync(data, params) {\n        const ctx = {\n            common: {\n                issues: [],\n                contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n                async: true,\n            },\n            path: (params === null || params === void 0 ? void 0 : params.path) || [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n        const result = await (isAsync(maybeAsyncResult)\n            ? maybeAsyncResult\n            : Promise.resolve(maybeAsyncResult));\n        return handleResult(ctx, result);\n    }\n    refine(check, message) {\n        const getIssueProperties = (val) => {\n            if (typeof message === \"string\" || typeof message === \"undefined\") {\n                return { message };\n            }\n            else if (typeof message === \"function\") {\n                return message(val);\n            }\n            else {\n                return message;\n            }\n        };\n        return this._refinement((val, ctx) => {\n            const result = check(val);\n            const setError = () => ctx.addIssue({\n                code: ZodIssueCode.custom,\n                ...getIssueProperties(val),\n            });\n            if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n                return result.then((data) => {\n                    if (!data) {\n                        setError();\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n            }\n            if (!result) {\n                setError();\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n    }\n    refinement(check, refinementData) {\n        return this._refinement((val, ctx) => {\n            if (!check(val)) {\n                ctx.addIssue(typeof refinementData === \"function\"\n                    ? refinementData(val, ctx)\n                    : refinementData);\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n    }\n    _refinement(refinement) {\n        return new ZodEffects({\n            schema: this,\n            typeName: ZodFirstPartyTypeKind.ZodEffects,\n            effect: { type: \"refinement\", refinement },\n        });\n    }\n    superRefine(refinement) {\n        return this._refinement(refinement);\n    }\n    optional() {\n        return ZodOptional.create(this, this._def);\n    }\n    nullable() {\n        return ZodNullable.create(this, this._def);\n    }\n    nullish() {\n        return this.nullable().optional();\n    }\n    array() {\n        return ZodArray.create(this, this._def);\n    }\n    promise() {\n        return ZodPromise.create(this, this._def);\n    }\n    or(option) {\n        return ZodUnion.create([this, option], this._def);\n    }\n    and(incoming) {\n        return ZodIntersection.create(this, incoming, this._def);\n    }\n    transform(transform) {\n        return new ZodEffects({\n            ...processCreateParams(this._def),\n            schema: this,\n            typeName: ZodFirstPartyTypeKind.ZodEffects,\n            effect: { type: \"transform\", transform },\n        });\n    }\n    default(def) {\n        const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n        return new ZodDefault({\n            ...processCreateParams(this._def),\n            innerType: this,\n            defaultValue: defaultValueFunc,\n            typeName: ZodFirstPartyTypeKind.ZodDefault,\n        });\n    }\n    brand() {\n        return new ZodBranded({\n            typeName: ZodFirstPartyTypeKind.ZodBranded,\n            type: this,\n            ...processCreateParams(this._def),\n        });\n    }\n    catch(def) {\n        const catchValueFunc = typeof def === \"function\" ? def : () => def;\n        return new ZodCatch({\n            ...processCreateParams(this._def),\n            innerType: this,\n            catchValue: catchValueFunc,\n            typeName: ZodFirstPartyTypeKind.ZodCatch,\n        });\n    }\n    describe(description) {\n        const This = this.constructor;\n        return new This({\n            ...this._def,\n            description,\n        });\n    }\n    pipe(target) {\n        return ZodPipeline.create(this, target);\n    }\n    readonly() {\n        return ZodReadonly.create(this);\n    }\n    isOptional() {\n        return this.safeParse(undefined).success;\n    }\n    isNullable() {\n        return this.safeParse(null).success;\n    }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n//   /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n//   /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n//   /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n//   /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_+-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n//   /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n    if (args.precision) {\n        if (args.offset) {\n            return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n        }\n        else {\n            return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n        }\n    }\n    else if (args.precision === 0) {\n        if (args.offset) {\n            return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n        }\n        else {\n            return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n        }\n    }\n    else {\n        if (args.offset) {\n            return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n        }\n        else {\n            return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n        }\n    }\n};\nfunction isValidIP(ip, version) {\n    if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n        return true;\n    }\n    if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n        return true;\n    }\n    return false;\n}\nclass ZodString extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = String(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.string) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.string,\n                received: ctx.parsedType,\n            }\n            //\n            );\n            return INVALID;\n        }\n        const status = new ParseStatus();\n        let ctx = undefined;\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                if (input.data.length < check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        minimum: check.value,\n                        type: \"string\",\n                        inclusive: true,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                if (input.data.length > check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        maximum: check.value,\n                        type: \"string\",\n                        inclusive: true,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"length\") {\n                const tooBig = input.data.length > check.value;\n                const tooSmall = input.data.length < check.value;\n                if (tooBig || tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    if (tooBig) {\n                        addIssueToContext(ctx, {\n                            code: ZodIssueCode.too_big,\n                            maximum: check.value,\n                            type: \"string\",\n                            inclusive: true,\n                            exact: true,\n                            message: check.message,\n                        });\n                    }\n                    else if (tooSmall) {\n                        addIssueToContext(ctx, {\n                            code: ZodIssueCode.too_small,\n                            minimum: check.value,\n                            type: \"string\",\n                            inclusive: true,\n                            exact: true,\n                            message: check.message,\n                        });\n                    }\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"email\") {\n                if (!emailRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"email\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"emoji\") {\n                if (!emojiRegex) {\n                    emojiRegex = new RegExp(_emojiRegex, \"u\");\n                }\n                if (!emojiRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"emoji\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"uuid\") {\n                if (!uuidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"uuid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cuid\") {\n                if (!cuidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cuid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cuid2\") {\n                if (!cuid2Regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cuid2\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"ulid\") {\n                if (!ulidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"ulid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"url\") {\n                try {\n                    new URL(input.data);\n                }\n                catch (_a) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"url\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"regex\") {\n                check.regex.lastIndex = 0;\n                const testResult = check.regex.test(input.data);\n                if (!testResult) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"regex\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"trim\") {\n                input.data = input.data.trim();\n            }\n            else if (check.kind === \"includes\") {\n                if (!input.data.includes(check.value, check.position)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { includes: check.value, position: check.position },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"toLowerCase\") {\n                input.data = input.data.toLowerCase();\n            }\n            else if (check.kind === \"toUpperCase\") {\n                input.data = input.data.toUpperCase();\n            }\n            else if (check.kind === \"startsWith\") {\n                if (!input.data.startsWith(check.value)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { startsWith: check.value },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"endsWith\") {\n                if (!input.data.endsWith(check.value)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { endsWith: check.value },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"datetime\") {\n                const regex = datetimeRegex(check);\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"datetime\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"ip\") {\n                if (!isValidIP(input.data, check.version)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"ip\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    _regex(regex, validation, message) {\n        return this.refinement((data) => regex.test(data), {\n            validation,\n            code: ZodIssueCode.invalid_string,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    _addCheck(check) {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    email(message) {\n        return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n    }\n    url(message) {\n        return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n    }\n    emoji(message) {\n        return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n    }\n    uuid(message) {\n        return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n    }\n    cuid(message) {\n        return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n    }\n    cuid2(message) {\n        return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n    }\n    ulid(message) {\n        return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n    }\n    ip(options) {\n        return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n    }\n    datetime(options) {\n        var _a;\n        if (typeof options === \"string\") {\n            return this._addCheck({\n                kind: \"datetime\",\n                precision: null,\n                offset: false,\n                message: options,\n            });\n        }\n        return this._addCheck({\n            kind: \"datetime\",\n            precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n            offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n            ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n        });\n    }\n    regex(regex, message) {\n        return this._addCheck({\n            kind: \"regex\",\n            regex: regex,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    includes(value, options) {\n        return this._addCheck({\n            kind: \"includes\",\n            value: value,\n            position: options === null || options === void 0 ? void 0 : options.position,\n            ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n        });\n    }\n    startsWith(value, message) {\n        return this._addCheck({\n            kind: \"startsWith\",\n            value: value,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    endsWith(value, message) {\n        return this._addCheck({\n            kind: \"endsWith\",\n            value: value,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    min(minLength, message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: minLength,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    max(maxLength, message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: maxLength,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    length(len, message) {\n        return this._addCheck({\n            kind: \"length\",\n            value: len,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    /**\n     * @deprecated Use z.string().min(1) instead.\n     * @see {@link ZodString.min}\n     */\n    nonempty(message) {\n        return this.min(1, errorUtil.errToObj(message));\n    }\n    trim() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"trim\" }],\n        });\n    }\n    toLowerCase() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n        });\n    }\n    toUpperCase() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n        });\n    }\n    get isDatetime() {\n        return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n    }\n    get isEmail() {\n        return !!this._def.checks.find((ch) => ch.kind === \"email\");\n    }\n    get isURL() {\n        return !!this._def.checks.find((ch) => ch.kind === \"url\");\n    }\n    get isEmoji() {\n        return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n    }\n    get isUUID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n    }\n    get isCUID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n    }\n    get isCUID2() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n    }\n    get isULID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n    }\n    get isIP() {\n        return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n    }\n    get minLength() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxLength() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n}\nZodString.create = (params) => {\n    var _a;\n    return new ZodString({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodString,\n        coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n        ...processCreateParams(params),\n    });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n    const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n    const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n    const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n    const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n    const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n    return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.min = this.gte;\n        this.max = this.lte;\n        this.step = this.multipleOf;\n    }\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = Number(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.number) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.number,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        let ctx = undefined;\n        const status = new ParseStatus();\n        for (const check of this._def.checks) {\n            if (check.kind === \"int\") {\n                if (!util.isInteger(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_type,\n                        expected: \"integer\",\n                        received: \"float\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"min\") {\n                const tooSmall = check.inclusive\n                    ? input.data < check.value\n                    : input.data <= check.value;\n                if (tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        minimum: check.value,\n                        type: \"number\",\n                        inclusive: check.inclusive,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                const tooBig = check.inclusive\n                    ? input.data > check.value\n                    : input.data >= check.value;\n                if (tooBig) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        maximum: check.value,\n                        type: \"number\",\n                        inclusive: check.inclusive,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"multipleOf\") {\n                if (floatSafeRemainder(input.data, check.value) !== 0) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_multiple_of,\n                        multipleOf: check.value,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"finite\") {\n                if (!Number.isFinite(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_finite,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    gte(value, message) {\n        return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n    }\n    gt(value, message) {\n        return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n    }\n    lte(value, message) {\n        return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n    }\n    lt(value, message) {\n        return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n    }\n    setLimit(kind, value, inclusive, message) {\n        return new ZodNumber({\n            ...this._def,\n            checks: [\n                ...this._def.checks,\n                {\n                    kind,\n                    value,\n                    inclusive,\n                    message: errorUtil.toString(message),\n                },\n            ],\n        });\n    }\n    _addCheck(check) {\n        return new ZodNumber({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    int(message) {\n        return this._addCheck({\n            kind: \"int\",\n            message: errorUtil.toString(message),\n        });\n    }\n    positive(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: 0,\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    negative(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: 0,\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonpositive(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: 0,\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonnegative(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: 0,\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    multipleOf(value, message) {\n        return this._addCheck({\n            kind: \"multipleOf\",\n            value: value,\n            message: errorUtil.toString(message),\n        });\n    }\n    finite(message) {\n        return this._addCheck({\n            kind: \"finite\",\n            message: errorUtil.toString(message),\n        });\n    }\n    safe(message) {\n        return this._addCheck({\n            kind: \"min\",\n            inclusive: true,\n            value: Number.MIN_SAFE_INTEGER,\n            message: errorUtil.toString(message),\n        })._addCheck({\n            kind: \"max\",\n            inclusive: true,\n            value: Number.MAX_SAFE_INTEGER,\n            message: errorUtil.toString(message),\n        });\n    }\n    get minValue() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxValue() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n    get isInt() {\n        return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n            (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n    }\n    get isFinite() {\n        let max = null, min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"finite\" ||\n                ch.kind === \"int\" ||\n                ch.kind === \"multipleOf\") {\n                return true;\n            }\n            else if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n            else if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return Number.isFinite(min) && Number.isFinite(max);\n    }\n}\nZodNumber.create = (params) => {\n    return new ZodNumber({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodNumber,\n        coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n        ...processCreateParams(params),\n    });\n};\nclass ZodBigInt extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.min = this.gte;\n        this.max = this.lte;\n    }\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = BigInt(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.bigint) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.bigint,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        let ctx = undefined;\n        const status = new ParseStatus();\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                const tooSmall = check.inclusive\n                    ? input.data < check.value\n                    : input.data <= check.value;\n                if (tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        type: \"bigint\",\n                        minimum: check.value,\n                        inclusive: check.inclusive,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                const tooBig = check.inclusive\n                    ? input.data > check.value\n                    : input.data >= check.value;\n                if (tooBig) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        type: \"bigint\",\n                        maximum: check.value,\n                        inclusive: check.inclusive,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"multipleOf\") {\n                if (input.data % check.value !== BigInt(0)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_multiple_of,\n                        multipleOf: check.value,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    gte(value, message) {\n        return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n    }\n    gt(value, message) {\n        return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n    }\n    lte(value, message) {\n        return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n    }\n    lt(value, message) {\n        return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n    }\n    setLimit(kind, value, inclusive, message) {\n        return new ZodBigInt({\n            ...this._def,\n            checks: [\n                ...this._def.checks,\n                {\n                    kind,\n                    value,\n                    inclusive,\n                    message: errorUtil.toString(message),\n                },\n            ],\n        });\n    }\n    _addCheck(check) {\n        return new ZodBigInt({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    positive(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: BigInt(0),\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    negative(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: BigInt(0),\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonpositive(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: BigInt(0),\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonnegative(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: BigInt(0),\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    multipleOf(value, message) {\n        return this._addCheck({\n            kind: \"multipleOf\",\n            value,\n            message: errorUtil.toString(message),\n        });\n    }\n    get minValue() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxValue() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n}\nZodBigInt.create = (params) => {\n    var _a;\n    return new ZodBigInt({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodBigInt,\n        coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n        ...processCreateParams(params),\n    });\n};\nclass ZodBoolean extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = Boolean(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.boolean) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.boolean,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodBoolean.create = (params) => {\n    return new ZodBoolean({\n        typeName: ZodFirstPartyTypeKind.ZodBoolean,\n        coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n        ...processCreateParams(params),\n    });\n};\nclass ZodDate extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = new Date(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.date) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.date,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (isNaN(input.data.getTime())) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_date,\n            });\n            return INVALID;\n        }\n        const status = new ParseStatus();\n        let ctx = undefined;\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                if (input.data.getTime() < check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        message: check.message,\n                        inclusive: true,\n                        exact: false,\n                        minimum: check.value,\n                        type: \"date\",\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                if (input.data.getTime() > check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        message: check.message,\n                        inclusive: true,\n                        exact: false,\n                        maximum: check.value,\n                        type: \"date\",\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return {\n            status: status.value,\n            value: new Date(input.data.getTime()),\n        };\n    }\n    _addCheck(check) {\n        return new ZodDate({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    min(minDate, message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: minDate.getTime(),\n            message: errorUtil.toString(message),\n        });\n    }\n    max(maxDate, message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: maxDate.getTime(),\n            message: errorUtil.toString(message),\n        });\n    }\n    get minDate() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min != null ? new Date(min) : null;\n    }\n    get maxDate() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max != null ? new Date(max) : null;\n    }\n}\nZodDate.create = (params) => {\n    return new ZodDate({\n        checks: [],\n        coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n        typeName: ZodFirstPartyTypeKind.ZodDate,\n        ...processCreateParams(params),\n    });\n};\nclass ZodSymbol extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.symbol) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.symbol,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodSymbol.create = (params) => {\n    return new ZodSymbol({\n        typeName: ZodFirstPartyTypeKind.ZodSymbol,\n        ...processCreateParams(params),\n    });\n};\nclass ZodUndefined extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.undefined) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.undefined,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodUndefined.create = (params) => {\n    return new ZodUndefined({\n        typeName: ZodFirstPartyTypeKind.ZodUndefined,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNull extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.null) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.null,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodNull.create = (params) => {\n    return new ZodNull({\n        typeName: ZodFirstPartyTypeKind.ZodNull,\n        ...processCreateParams(params),\n    });\n};\nclass ZodAny extends ZodType {\n    constructor() {\n        super(...arguments);\n        // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n        this._any = true;\n    }\n    _parse(input) {\n        return OK(input.data);\n    }\n}\nZodAny.create = (params) => {\n    return new ZodAny({\n        typeName: ZodFirstPartyTypeKind.ZodAny,\n        ...processCreateParams(params),\n    });\n};\nclass ZodUnknown extends ZodType {\n    constructor() {\n        super(...arguments);\n        // required\n        this._unknown = true;\n    }\n    _parse(input) {\n        return OK(input.data);\n    }\n}\nZodUnknown.create = (params) => {\n    return new ZodUnknown({\n        typeName: ZodFirstPartyTypeKind.ZodUnknown,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNever extends ZodType {\n    _parse(input) {\n        const ctx = this._getOrReturnCtx(input);\n        addIssueToContext(ctx, {\n            code: ZodIssueCode.invalid_type,\n            expected: ZodParsedType.never,\n            received: ctx.parsedType,\n        });\n        return INVALID;\n    }\n}\nZodNever.create = (params) => {\n    return new ZodNever({\n        typeName: ZodFirstPartyTypeKind.ZodNever,\n        ...processCreateParams(params),\n    });\n};\nclass ZodVoid extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.undefined) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.void,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodVoid.create = (params) => {\n    return new ZodVoid({\n        typeName: ZodFirstPartyTypeKind.ZodVoid,\n        ...processCreateParams(params),\n    });\n};\nclass ZodArray extends ZodType {\n    _parse(input) {\n        const { ctx, status } = this._processInputParams(input);\n        const def = this._def;\n        if (ctx.parsedType !== ZodParsedType.array) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.array,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (def.exactLength !== null) {\n            const tooBig = ctx.data.length > def.exactLength.value;\n            const tooSmall = ctx.data.length < def.exactLength.value;\n            if (tooBig || tooSmall) {\n                addIssueToContext(ctx, {\n                    code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n                    minimum: (tooSmall ? def.exactLength.value : undefined),\n                    maximum: (tooBig ? def.exactLength.value : undefined),\n                    type: \"array\",\n                    inclusive: true,\n                    exact: true,\n                    message: def.exactLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.minLength !== null) {\n            if (ctx.data.length < def.minLength.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_small,\n                    minimum: def.minLength.value,\n                    type: \"array\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.minLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.maxLength !== null) {\n            if (ctx.data.length > def.maxLength.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_big,\n                    maximum: def.maxLength.value,\n                    type: \"array\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.maxLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (ctx.common.async) {\n            return Promise.all([...ctx.data].map((item, i) => {\n                return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n            })).then((result) => {\n                return ParseStatus.mergeArray(status, result);\n            });\n        }\n        const result = [...ctx.data].map((item, i) => {\n            return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n        });\n        return ParseStatus.mergeArray(status, result);\n    }\n    get element() {\n        return this._def.type;\n    }\n    min(minLength, message) {\n        return new ZodArray({\n            ...this._def,\n            minLength: { value: minLength, message: errorUtil.toString(message) },\n        });\n    }\n    max(maxLength, message) {\n        return new ZodArray({\n            ...this._def,\n            maxLength: { value: maxLength, message: errorUtil.toString(message) },\n        });\n    }\n    length(len, message) {\n        return new ZodArray({\n            ...this._def,\n            exactLength: { value: len, message: errorUtil.toString(message) },\n        });\n    }\n    nonempty(message) {\n        return this.min(1, message);\n    }\n}\nZodArray.create = (schema, params) => {\n    return new ZodArray({\n        type: schema,\n        minLength: null,\n        maxLength: null,\n        exactLength: null,\n        typeName: ZodFirstPartyTypeKind.ZodArray,\n        ...processCreateParams(params),\n    });\n};\nfunction deepPartialify(schema) {\n    if (schema instanceof ZodObject) {\n        const newShape = {};\n        for (const key in schema.shape) {\n            const fieldSchema = schema.shape[key];\n            newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n        }\n        return new ZodObject({\n            ...schema._def,\n            shape: () => newShape,\n        });\n    }\n    else if (schema instanceof ZodArray) {\n        return new ZodArray({\n            ...schema._def,\n            type: deepPartialify(schema.element),\n        });\n    }\n    else if (schema instanceof ZodOptional) {\n        return ZodOptional.create(deepPartialify(schema.unwrap()));\n    }\n    else if (schema instanceof ZodNullable) {\n        return ZodNullable.create(deepPartialify(schema.unwrap()));\n    }\n    else if (schema instanceof ZodTuple) {\n        return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n    }\n    else {\n        return schema;\n    }\n}\nclass ZodObject extends ZodType {\n    constructor() {\n        super(...arguments);\n        this._cached = null;\n        /**\n         * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n         * If you want to pass through unknown properties, use `.passthrough()` instead.\n         */\n        this.nonstrict = this.passthrough;\n        // extend<\n        //   Augmentation extends ZodRawShape,\n        //   NewOutput extends util.flatten<{\n        //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n        //       ? Augmentation[k][\"_output\"]\n        //       : k extends keyof Output\n        //       ? Output[k]\n        //       : never;\n        //   }>,\n        //   NewInput extends util.flatten<{\n        //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n        //       ? Augmentation[k][\"_input\"]\n        //       : k extends keyof Input\n        //       ? Input[k]\n        //       : never;\n        //   }>\n        // >(\n        //   augmentation: Augmentation\n        // ): ZodObject<\n        //   extendShape<T, Augmentation>,\n        //   UnknownKeys,\n        //   Catchall,\n        //   NewOutput,\n        //   NewInput\n        // > {\n        //   return new ZodObject({\n        //     ...this._def,\n        //     shape: () => ({\n        //       ...this._def.shape(),\n        //       ...augmentation,\n        //     }),\n        //   }) as any;\n        // }\n        /**\n         * @deprecated Use `.extend` instead\n         *  */\n        this.augment = this.extend;\n    }\n    _getCached() {\n        if (this._cached !== null)\n            return this._cached;\n        const shape = this._def.shape();\n        const keys = util.objectKeys(shape);\n        return (this._cached = { shape, keys });\n    }\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.object) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const { status, ctx } = this._processInputParams(input);\n        const { shape, keys: shapeKeys } = this._getCached();\n        const extraKeys = [];\n        if (!(this._def.catchall instanceof ZodNever &&\n            this._def.unknownKeys === \"strip\")) {\n            for (const key in ctx.data) {\n                if (!shapeKeys.includes(key)) {\n                    extraKeys.push(key);\n                }\n            }\n        }\n        const pairs = [];\n        for (const key of shapeKeys) {\n            const keyValidator = shape[key];\n            const value = ctx.data[key];\n            pairs.push({\n                key: { status: \"valid\", value: key },\n                value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n                alwaysSet: key in ctx.data,\n            });\n        }\n        if (this._def.catchall instanceof ZodNever) {\n            const unknownKeys = this._def.unknownKeys;\n            if (unknownKeys === \"passthrough\") {\n                for (const key of extraKeys) {\n                    pairs.push({\n                        key: { status: \"valid\", value: key },\n                        value: { status: \"valid\", value: ctx.data[key] },\n                    });\n                }\n            }\n            else if (unknownKeys === \"strict\") {\n                if (extraKeys.length > 0) {\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.unrecognized_keys,\n                        keys: extraKeys,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (unknownKeys === \"strip\") ;\n            else {\n                throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n            }\n        }\n        else {\n            // run catchall validation\n            const catchall = this._def.catchall;\n            for (const key of extraKeys) {\n                const value = ctx.data[key];\n                pairs.push({\n                    key: { status: \"valid\", value: key },\n                    value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n                    ),\n                    alwaysSet: key in ctx.data,\n                });\n            }\n        }\n        if (ctx.common.async) {\n            return Promise.resolve()\n                .then(async () => {\n                const syncPairs = [];\n                for (const pair of pairs) {\n                    const key = await pair.key;\n                    syncPairs.push({\n                        key,\n                        value: await pair.value,\n                        alwaysSet: pair.alwaysSet,\n                    });\n                }\n                return syncPairs;\n            })\n                .then((syncPairs) => {\n                return ParseStatus.mergeObjectSync(status, syncPairs);\n            });\n        }\n        else {\n            return ParseStatus.mergeObjectSync(status, pairs);\n        }\n    }\n    get shape() {\n        return this._def.shape();\n    }\n    strict(message) {\n        errorUtil.errToObj;\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"strict\",\n            ...(message !== undefined\n                ? {\n                    errorMap: (issue, ctx) => {\n                        var _a, _b, _c, _d;\n                        const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n                        if (issue.code === \"unrecognized_keys\")\n                            return {\n                                message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n                            };\n                        return {\n                            message: defaultError,\n                        };\n                    },\n                }\n                : {}),\n        });\n    }\n    strip() {\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"strip\",\n        });\n    }\n    passthrough() {\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"passthrough\",\n        });\n    }\n    // const AugmentFactory =\n    //   <Def extends ZodObjectDef>(def: Def) =>\n    //   <Augmentation extends ZodRawShape>(\n    //     augmentation: Augmentation\n    //   ): ZodObject<\n    //     extendShape<ReturnType<Def[\"shape\"]>, Augmentation>,\n    //     Def[\"unknownKeys\"],\n    //     Def[\"catchall\"]\n    //   > => {\n    //     return new ZodObject({\n    //       ...def,\n    //       shape: () => ({\n    //         ...def.shape(),\n    //         ...augmentation,\n    //       }),\n    //     }) as any;\n    //   };\n    extend(augmentation) {\n        return new ZodObject({\n            ...this._def,\n            shape: () => ({\n                ...this._def.shape(),\n                ...augmentation,\n            }),\n        });\n    }\n    /**\n     * Prior to zod@1.0.12 there was a bug in the\n     * inferred type of merged objects. Please\n     * upgrade if you are experiencing issues.\n     */\n    merge(merging) {\n        const merged = new ZodObject({\n            unknownKeys: merging._def.unknownKeys,\n            catchall: merging._def.catchall,\n            shape: () => ({\n                ...this._def.shape(),\n                ...merging._def.shape(),\n            }),\n            typeName: ZodFirstPartyTypeKind.ZodObject,\n        });\n        return merged;\n    }\n    // merge<\n    //   Incoming extends AnyZodObject,\n    //   Augmentation extends Incoming[\"shape\"],\n    //   NewOutput extends {\n    //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n    //       ? Augmentation[k][\"_output\"]\n    //       : k extends keyof Output\n    //       ? Output[k]\n    //       : never;\n    //   },\n    //   NewInput extends {\n    //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n    //       ? Augmentation[k][\"_input\"]\n    //       : k extends keyof Input\n    //       ? Input[k]\n    //       : never;\n    //   }\n    // >(\n    //   merging: Incoming\n    // ): ZodObject<\n    //   extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n    //   Incoming[\"_def\"][\"unknownKeys\"],\n    //   Incoming[\"_def\"][\"catchall\"],\n    //   NewOutput,\n    //   NewInput\n    // > {\n    //   const merged: any = new ZodObject({\n    //     unknownKeys: merging._def.unknownKeys,\n    //     catchall: merging._def.catchall,\n    //     shape: () =>\n    //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n    //     typeName: ZodFirstPartyTypeKind.ZodObject,\n    //   }) as any;\n    //   return merged;\n    // }\n    setKey(key, schema) {\n        return this.augment({ [key]: schema });\n    }\n    // merge<Incoming extends AnyZodObject>(\n    //   merging: Incoming\n    // ): //ZodObject<T & Incoming[\"_shape\"], UnknownKeys, Catchall> = (merging) => {\n    // ZodObject<\n    //   extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n    //   Incoming[\"_def\"][\"unknownKeys\"],\n    //   Incoming[\"_def\"][\"catchall\"]\n    // > {\n    //   // const mergedShape = objectUtil.mergeShapes(\n    //   //   this._def.shape(),\n    //   //   merging._def.shape()\n    //   // );\n    //   const merged: any = new ZodObject({\n    //     unknownKeys: merging._def.unknownKeys,\n    //     catchall: merging._def.catchall,\n    //     shape: () =>\n    //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n    //     typeName: ZodFirstPartyTypeKind.ZodObject,\n    //   }) as any;\n    //   return merged;\n    // }\n    catchall(index) {\n        return new ZodObject({\n            ...this._def,\n            catchall: index,\n        });\n    }\n    pick(mask) {\n        const shape = {};\n        util.objectKeys(mask).forEach((key) => {\n            if (mask[key] && this.shape[key]) {\n                shape[key] = this.shape[key];\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => shape,\n        });\n    }\n    omit(mask) {\n        const shape = {};\n        util.objectKeys(this.shape).forEach((key) => {\n            if (!mask[key]) {\n                shape[key] = this.shape[key];\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => shape,\n        });\n    }\n    /**\n     * @deprecated\n     */\n    deepPartial() {\n        return deepPartialify(this);\n    }\n    partial(mask) {\n        const newShape = {};\n        util.objectKeys(this.shape).forEach((key) => {\n            const fieldSchema = this.shape[key];\n            if (mask && !mask[key]) {\n                newShape[key] = fieldSchema;\n            }\n            else {\n                newShape[key] = fieldSchema.optional();\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => newShape,\n        });\n    }\n    required(mask) {\n        const newShape = {};\n        util.objectKeys(this.shape).forEach((key) => {\n            if (mask && !mask[key]) {\n                newShape[key] = this.shape[key];\n            }\n            else {\n                const fieldSchema = this.shape[key];\n                let newField = fieldSchema;\n                while (newField instanceof ZodOptional) {\n                    newField = newField._def.innerType;\n                }\n                newShape[key] = newField;\n            }\n        });\n        return new ZodObject({\n            ...this._def,\n            shape: () => newShape,\n        });\n    }\n    keyof() {\n        return createZodEnum(util.objectKeys(this.shape));\n    }\n}\nZodObject.create = (shape, params) => {\n    return new ZodObject({\n        shape: () => shape,\n        unknownKeys: \"strip\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nZodObject.strictCreate = (shape, params) => {\n    return new ZodObject({\n        shape: () => shape,\n        unknownKeys: \"strict\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nZodObject.lazycreate = (shape, params) => {\n    return new ZodObject({\n        shape,\n        unknownKeys: \"strip\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nclass ZodUnion extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const options = this._def.options;\n        function handleResults(results) {\n            // return first issue-free validation if it exists\n            for (const result of results) {\n                if (result.result.status === \"valid\") {\n                    return result.result;\n                }\n            }\n            for (const result of results) {\n                if (result.result.status === \"dirty\") {\n                    // add issues from dirty option\n                    ctx.common.issues.push(...result.ctx.common.issues);\n                    return result.result;\n                }\n            }\n            // return invalid\n            const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union,\n                unionErrors,\n            });\n            return INVALID;\n        }\n        if (ctx.common.async) {\n            return Promise.all(options.map(async (option) => {\n                const childCtx = {\n                    ...ctx,\n                    common: {\n                        ...ctx.common,\n                        issues: [],\n                    },\n                    parent: null,\n                };\n                return {\n                    result: await option._parseAsync({\n                        data: ctx.data,\n                        path: ctx.path,\n                        parent: childCtx,\n                    }),\n                    ctx: childCtx,\n                };\n            })).then(handleResults);\n        }\n        else {\n            let dirty = undefined;\n            const issues = [];\n            for (const option of options) {\n                const childCtx = {\n                    ...ctx,\n                    common: {\n                        ...ctx.common,\n                        issues: [],\n                    },\n                    parent: null,\n                };\n                const result = option._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: childCtx,\n                });\n                if (result.status === \"valid\") {\n                    return result;\n                }\n                else if (result.status === \"dirty\" && !dirty) {\n                    dirty = { result, ctx: childCtx };\n                }\n                if (childCtx.common.issues.length) {\n                    issues.push(childCtx.common.issues);\n                }\n            }\n            if (dirty) {\n                ctx.common.issues.push(...dirty.ctx.common.issues);\n                return dirty.result;\n            }\n            const unionErrors = issues.map((issues) => new ZodError(issues));\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union,\n                unionErrors,\n            });\n            return INVALID;\n        }\n    }\n    get options() {\n        return this._def.options;\n    }\n}\nZodUnion.create = (types, params) => {\n    return new ZodUnion({\n        options: types,\n        typeName: ZodFirstPartyTypeKind.ZodUnion,\n        ...processCreateParams(params),\n    });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n//////////                                 //////////\n//////////      ZodDiscriminatedUnion      //////////\n//////////                                 //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n    if (type instanceof ZodLazy) {\n        return getDiscriminator(type.schema);\n    }\n    else if (type instanceof ZodEffects) {\n        return getDiscriminator(type.innerType());\n    }\n    else if (type instanceof ZodLiteral) {\n        return [type.value];\n    }\n    else if (type instanceof ZodEnum) {\n        return type.options;\n    }\n    else if (type instanceof ZodNativeEnum) {\n        // eslint-disable-next-line ban/ban\n        return Object.keys(type.enum);\n    }\n    else if (type instanceof ZodDefault) {\n        return getDiscriminator(type._def.innerType);\n    }\n    else if (type instanceof ZodUndefined) {\n        return [undefined];\n    }\n    else if (type instanceof ZodNull) {\n        return [null];\n    }\n    else {\n        return null;\n    }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.object) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const discriminator = this.discriminator;\n        const discriminatorValue = ctx.data[discriminator];\n        const option = this.optionsMap.get(discriminatorValue);\n        if (!option) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union_discriminator,\n                options: Array.from(this.optionsMap.keys()),\n                path: [discriminator],\n            });\n            return INVALID;\n        }\n        if (ctx.common.async) {\n            return option._parseAsync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n        }\n        else {\n            return option._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n        }\n    }\n    get discriminator() {\n        return this._def.discriminator;\n    }\n    get options() {\n        return this._def.options;\n    }\n    get optionsMap() {\n        return this._def.optionsMap;\n    }\n    /**\n     * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n     * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n     * have a different value for each object in the union.\n     * @param discriminator the name of the discriminator property\n     * @param types an array of object schemas\n     * @param params\n     */\n    static create(discriminator, options, params) {\n        // Get all the valid discriminator values\n        const optionsMap = new Map();\n        // try {\n        for (const type of options) {\n            const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n            if (!discriminatorValues) {\n                throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n            }\n            for (const value of discriminatorValues) {\n                if (optionsMap.has(value)) {\n                    throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n                }\n                optionsMap.set(value, type);\n            }\n        }\n        return new ZodDiscriminatedUnion({\n            typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n            discriminator,\n            options,\n            optionsMap,\n            ...processCreateParams(params),\n        });\n    }\n}\nfunction mergeValues(a, b) {\n    const aType = getParsedType(a);\n    const bType = getParsedType(b);\n    if (a === b) {\n        return { valid: true, data: a };\n    }\n    else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n        const bKeys = util.objectKeys(b);\n        const sharedKeys = util\n            .objectKeys(a)\n            .filter((key) => bKeys.indexOf(key) !== -1);\n        const newObj = { ...a, ...b };\n        for (const key of sharedKeys) {\n            const sharedValue = mergeValues(a[key], b[key]);\n            if (!sharedValue.valid) {\n                return { valid: false };\n            }\n            newObj[key] = sharedValue.data;\n        }\n        return { valid: true, data: newObj };\n    }\n    else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n        if (a.length !== b.length) {\n            return { valid: false };\n        }\n        const newArray = [];\n        for (let index = 0; index < a.length; index++) {\n            const itemA = a[index];\n            const itemB = b[index];\n            const sharedValue = mergeValues(itemA, itemB);\n            if (!sharedValue.valid) {\n                return { valid: false };\n            }\n            newArray.push(sharedValue.data);\n        }\n        return { valid: true, data: newArray };\n    }\n    else if (aType === ZodParsedType.date &&\n        bType === ZodParsedType.date &&\n        +a === +b) {\n        return { valid: true, data: a };\n    }\n    else {\n        return { valid: false };\n    }\n}\nclass ZodIntersection extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        const handleParsed = (parsedLeft, parsedRight) => {\n            if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n                return INVALID;\n            }\n            const merged = mergeValues(parsedLeft.value, parsedRight.value);\n            if (!merged.valid) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.invalid_intersection_types,\n                });\n                return INVALID;\n            }\n            if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n                status.dirty();\n            }\n            return { status: status.value, value: merged.data };\n        };\n        if (ctx.common.async) {\n            return Promise.all([\n                this._def.left._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                }),\n                this._def.right._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                }),\n            ]).then(([left, right]) => handleParsed(left, right));\n        }\n        else {\n            return handleParsed(this._def.left._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            }), this._def.right._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            }));\n        }\n    }\n}\nZodIntersection.create = (left, right, params) => {\n    return new ZodIntersection({\n        left: left,\n        right: right,\n        typeName: ZodFirstPartyTypeKind.ZodIntersection,\n        ...processCreateParams(params),\n    });\n};\nclass ZodTuple extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.array) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.array,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (ctx.data.length < this._def.items.length) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.too_small,\n                minimum: this._def.items.length,\n                inclusive: true,\n                exact: false,\n                type: \"array\",\n            });\n            return INVALID;\n        }\n        const rest = this._def.rest;\n        if (!rest && ctx.data.length > this._def.items.length) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.too_big,\n                maximum: this._def.items.length,\n                inclusive: true,\n                exact: false,\n                type: \"array\",\n            });\n            status.dirty();\n        }\n        const items = [...ctx.data]\n            .map((item, itemIndex) => {\n            const schema = this._def.items[itemIndex] || this._def.rest;\n            if (!schema)\n                return null;\n            return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n        })\n            .filter((x) => !!x); // filter nulls\n        if (ctx.common.async) {\n            return Promise.all(items).then((results) => {\n                return ParseStatus.mergeArray(status, results);\n            });\n        }\n        else {\n            return ParseStatus.mergeArray(status, items);\n        }\n    }\n    get items() {\n        return this._def.items;\n    }\n    rest(rest) {\n        return new ZodTuple({\n            ...this._def,\n            rest,\n        });\n    }\n}\nZodTuple.create = (schemas, params) => {\n    if (!Array.isArray(schemas)) {\n        throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n    }\n    return new ZodTuple({\n        items: schemas,\n        typeName: ZodFirstPartyTypeKind.ZodTuple,\n        rest: null,\n        ...processCreateParams(params),\n    });\n};\nclass ZodRecord extends ZodType {\n    get keySchema() {\n        return this._def.keyType;\n    }\n    get valueSchema() {\n        return this._def.valueType;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.object) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const pairs = [];\n        const keyType = this._def.keyType;\n        const valueType = this._def.valueType;\n        for (const key in ctx.data) {\n            pairs.push({\n                key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n                value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n            });\n        }\n        if (ctx.common.async) {\n            return ParseStatus.mergeObjectAsync(status, pairs);\n        }\n        else {\n            return ParseStatus.mergeObjectSync(status, pairs);\n        }\n    }\n    get element() {\n        return this._def.valueType;\n    }\n    static create(first, second, third) {\n        if (second instanceof ZodType) {\n            return new ZodRecord({\n                keyType: first,\n                valueType: second,\n                typeName: ZodFirstPartyTypeKind.ZodRecord,\n                ...processCreateParams(third),\n            });\n        }\n        return new ZodRecord({\n            keyType: ZodString.create(),\n            valueType: first,\n            typeName: ZodFirstPartyTypeKind.ZodRecord,\n            ...processCreateParams(second),\n        });\n    }\n}\nclass ZodMap extends ZodType {\n    get keySchema() {\n        return this._def.keyType;\n    }\n    get valueSchema() {\n        return this._def.valueType;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.map) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.map,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const keyType = this._def.keyType;\n        const valueType = this._def.valueType;\n        const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n            return {\n                key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n                value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n            };\n        });\n        if (ctx.common.async) {\n            const finalMap = new Map();\n            return Promise.resolve().then(async () => {\n                for (const pair of pairs) {\n                    const key = await pair.key;\n                    const value = await pair.value;\n                    if (key.status === \"aborted\" || value.status === \"aborted\") {\n                        return INVALID;\n                    }\n                    if (key.status === \"dirty\" || value.status === \"dirty\") {\n                        status.dirty();\n                    }\n                    finalMap.set(key.value, value.value);\n                }\n                return { status: status.value, value: finalMap };\n            });\n        }\n        else {\n            const finalMap = new Map();\n            for (const pair of pairs) {\n                const key = pair.key;\n                const value = pair.value;\n                if (key.status === \"aborted\" || value.status === \"aborted\") {\n                    return INVALID;\n                }\n                if (key.status === \"dirty\" || value.status === \"dirty\") {\n                    status.dirty();\n                }\n                finalMap.set(key.value, value.value);\n            }\n            return { status: status.value, value: finalMap };\n        }\n    }\n}\nZodMap.create = (keyType, valueType, params) => {\n    return new ZodMap({\n        valueType,\n        keyType,\n        typeName: ZodFirstPartyTypeKind.ZodMap,\n        ...processCreateParams(params),\n    });\n};\nclass ZodSet extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.set) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.set,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const def = this._def;\n        if (def.minSize !== null) {\n            if (ctx.data.size < def.minSize.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_small,\n                    minimum: def.minSize.value,\n                    type: \"set\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.minSize.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.maxSize !== null) {\n            if (ctx.data.size > def.maxSize.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_big,\n                    maximum: def.maxSize.value,\n                    type: \"set\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.maxSize.message,\n                });\n                status.dirty();\n            }\n        }\n        const valueType = this._def.valueType;\n        function finalizeSet(elements) {\n            const parsedSet = new Set();\n            for (const element of elements) {\n                if (element.status === \"aborted\")\n                    return INVALID;\n                if (element.status === \"dirty\")\n                    status.dirty();\n                parsedSet.add(element.value);\n            }\n            return { status: status.value, value: parsedSet };\n        }\n        const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n        if (ctx.common.async) {\n            return Promise.all(elements).then((elements) => finalizeSet(elements));\n        }\n        else {\n            return finalizeSet(elements);\n        }\n    }\n    min(minSize, message) {\n        return new ZodSet({\n            ...this._def,\n            minSize: { value: minSize, message: errorUtil.toString(message) },\n        });\n    }\n    max(maxSize, message) {\n        return new ZodSet({\n            ...this._def,\n            maxSize: { value: maxSize, message: errorUtil.toString(message) },\n        });\n    }\n    size(size, message) {\n        return this.min(size, message).max(size, message);\n    }\n    nonempty(message) {\n        return this.min(1, message);\n    }\n}\nZodSet.create = (valueType, params) => {\n    return new ZodSet({\n        valueType,\n        minSize: null,\n        maxSize: null,\n        typeName: ZodFirstPartyTypeKind.ZodSet,\n        ...processCreateParams(params),\n    });\n};\nclass ZodFunction extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.validate = this.implement;\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.function) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.function,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        function makeArgsIssue(args, error) {\n            return makeIssue({\n                data: args,\n                path: ctx.path,\n                errorMaps: [\n                    ctx.common.contextualErrorMap,\n                    ctx.schemaErrorMap,\n                    getErrorMap(),\n                    errorMap,\n                ].filter((x) => !!x),\n                issueData: {\n                    code: ZodIssueCode.invalid_arguments,\n                    argumentsError: error,\n                },\n            });\n        }\n        function makeReturnsIssue(returns, error) {\n            return makeIssue({\n                data: returns,\n                path: ctx.path,\n                errorMaps: [\n                    ctx.common.contextualErrorMap,\n                    ctx.schemaErrorMap,\n                    getErrorMap(),\n                    errorMap,\n                ].filter((x) => !!x),\n                issueData: {\n                    code: ZodIssueCode.invalid_return_type,\n                    returnTypeError: error,\n                },\n            });\n        }\n        const params = { errorMap: ctx.common.contextualErrorMap };\n        const fn = ctx.data;\n        if (this._def.returns instanceof ZodPromise) {\n            // Would love a way to avoid disabling this rule, but we need\n            // an alias (using an arrow function was what caused 2651).\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const me = this;\n            return OK(async function (...args) {\n                const error = new ZodError([]);\n                const parsedArgs = await me._def.args\n                    .parseAsync(args, params)\n                    .catch((e) => {\n                    error.addIssue(makeArgsIssue(args, e));\n                    throw error;\n                });\n                const result = await Reflect.apply(fn, this, parsedArgs);\n                const parsedReturns = await me._def.returns._def.type\n                    .parseAsync(result, params)\n                    .catch((e) => {\n                    error.addIssue(makeReturnsIssue(result, e));\n                    throw error;\n                });\n                return parsedReturns;\n            });\n        }\n        else {\n            // Would love a way to avoid disabling this rule, but we need\n            // an alias (using an arrow function was what caused 2651).\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const me = this;\n            return OK(function (...args) {\n                const parsedArgs = me._def.args.safeParse(args, params);\n                if (!parsedArgs.success) {\n                    throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n                }\n                const result = Reflect.apply(fn, this, parsedArgs.data);\n                const parsedReturns = me._def.returns.safeParse(result, params);\n                if (!parsedReturns.success) {\n                    throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n                }\n                return parsedReturns.data;\n            });\n        }\n    }\n    parameters() {\n        return this._def.args;\n    }\n    returnType() {\n        return this._def.returns;\n    }\n    args(...items) {\n        return new ZodFunction({\n            ...this._def,\n            args: ZodTuple.create(items).rest(ZodUnknown.create()),\n        });\n    }\n    returns(returnType) {\n        return new ZodFunction({\n            ...this._def,\n            returns: returnType,\n        });\n    }\n    implement(func) {\n        const validatedFunc = this.parse(func);\n        return validatedFunc;\n    }\n    strictImplement(func) {\n        const validatedFunc = this.parse(func);\n        return validatedFunc;\n    }\n    static create(args, returns, params) {\n        return new ZodFunction({\n            args: (args\n                ? args\n                : ZodTuple.create([]).rest(ZodUnknown.create())),\n            returns: returns || ZodUnknown.create(),\n            typeName: ZodFirstPartyTypeKind.ZodFunction,\n            ...processCreateParams(params),\n        });\n    }\n}\nclass ZodLazy extends ZodType {\n    get schema() {\n        return this._def.getter();\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const lazySchema = this._def.getter();\n        return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n    }\n}\nZodLazy.create = (getter, params) => {\n    return new ZodLazy({\n        getter: getter,\n        typeName: ZodFirstPartyTypeKind.ZodLazy,\n        ...processCreateParams(params),\n    });\n};\nclass ZodLiteral extends ZodType {\n    _parse(input) {\n        if (input.data !== this._def.value) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_literal,\n                expected: this._def.value,\n            });\n            return INVALID;\n        }\n        return { status: \"valid\", value: input.data };\n    }\n    get value() {\n        return this._def.value;\n    }\n}\nZodLiteral.create = (value, params) => {\n    return new ZodLiteral({\n        value: value,\n        typeName: ZodFirstPartyTypeKind.ZodLiteral,\n        ...processCreateParams(params),\n    });\n};\nfunction createZodEnum(values, params) {\n    return new ZodEnum({\n        values,\n        typeName: ZodFirstPartyTypeKind.ZodEnum,\n        ...processCreateParams(params),\n    });\n}\nclass ZodEnum extends ZodType {\n    _parse(input) {\n        if (typeof input.data !== \"string\") {\n            const ctx = this._getOrReturnCtx(input);\n            const expectedValues = this._def.values;\n            addIssueToContext(ctx, {\n                expected: util.joinValues(expectedValues),\n                received: ctx.parsedType,\n                code: ZodIssueCode.invalid_type,\n            });\n            return INVALID;\n        }\n        if (this._def.values.indexOf(input.data) === -1) {\n            const ctx = this._getOrReturnCtx(input);\n            const expectedValues = this._def.values;\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_enum_value,\n                options: expectedValues,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n    get options() {\n        return this._def.values;\n    }\n    get enum() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    get Values() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    get Enum() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    extract(values) {\n        return ZodEnum.create(values);\n    }\n    exclude(values) {\n        return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n    }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n    _parse(input) {\n        const nativeEnumValues = util.getValidEnumValues(this._def.values);\n        const ctx = this._getOrReturnCtx(input);\n        if (ctx.parsedType !== ZodParsedType.string &&\n            ctx.parsedType !== ZodParsedType.number) {\n            const expectedValues = util.objectValues(nativeEnumValues);\n            addIssueToContext(ctx, {\n                expected: util.joinValues(expectedValues),\n                received: ctx.parsedType,\n                code: ZodIssueCode.invalid_type,\n            });\n            return INVALID;\n        }\n        if (nativeEnumValues.indexOf(input.data) === -1) {\n            const expectedValues = util.objectValues(nativeEnumValues);\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_enum_value,\n                options: expectedValues,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n    get enum() {\n        return this._def.values;\n    }\n}\nZodNativeEnum.create = (values, params) => {\n    return new ZodNativeEnum({\n        values: values,\n        typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n        ...processCreateParams(params),\n    });\n};\nclass ZodPromise extends ZodType {\n    unwrap() {\n        return this._def.type;\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.promise &&\n            ctx.common.async === false) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.promise,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const promisified = ctx.parsedType === ZodParsedType.promise\n            ? ctx.data\n            : Promise.resolve(ctx.data);\n        return OK(promisified.then((data) => {\n            return this._def.type.parseAsync(data, {\n                path: ctx.path,\n                errorMap: ctx.common.contextualErrorMap,\n            });\n        }));\n    }\n}\nZodPromise.create = (schema, params) => {\n    return new ZodPromise({\n        type: schema,\n        typeName: ZodFirstPartyTypeKind.ZodPromise,\n        ...processCreateParams(params),\n    });\n};\nclass ZodEffects extends ZodType {\n    innerType() {\n        return this._def.schema;\n    }\n    sourceType() {\n        return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n            ? this._def.schema.sourceType()\n            : this._def.schema;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        const effect = this._def.effect || null;\n        const checkCtx = {\n            addIssue: (arg) => {\n                addIssueToContext(ctx, arg);\n                if (arg.fatal) {\n                    status.abort();\n                }\n                else {\n                    status.dirty();\n                }\n            },\n            get path() {\n                return ctx.path;\n            },\n        };\n        checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n        if (effect.type === \"preprocess\") {\n            const processed = effect.transform(ctx.data, checkCtx);\n            if (ctx.common.issues.length) {\n                return {\n                    status: \"dirty\",\n                    value: ctx.data,\n                };\n            }\n            if (ctx.common.async) {\n                return Promise.resolve(processed).then((processed) => {\n                    return this._def.schema._parseAsync({\n                        data: processed,\n                        path: ctx.path,\n                        parent: ctx,\n                    });\n                });\n            }\n            else {\n                return this._def.schema._parseSync({\n                    data: processed,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n            }\n        }\n        if (effect.type === \"refinement\") {\n            const executeRefinement = (acc\n            // effect: RefinementEffect<any>\n            ) => {\n                const result = effect.refinement(acc, checkCtx);\n                if (ctx.common.async) {\n                    return Promise.resolve(result);\n                }\n                if (result instanceof Promise) {\n                    throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n                }\n                return acc;\n            };\n            if (ctx.common.async === false) {\n                const inner = this._def.schema._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (inner.status === \"aborted\")\n                    return INVALID;\n                if (inner.status === \"dirty\")\n                    status.dirty();\n                // return value is ignored\n                executeRefinement(inner.value);\n                return { status: status.value, value: inner.value };\n            }\n            else {\n                return this._def.schema\n                    ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n                    .then((inner) => {\n                    if (inner.status === \"aborted\")\n                        return INVALID;\n                    if (inner.status === \"dirty\")\n                        status.dirty();\n                    return executeRefinement(inner.value).then(() => {\n                        return { status: status.value, value: inner.value };\n                    });\n                });\n            }\n        }\n        if (effect.type === \"transform\") {\n            if (ctx.common.async === false) {\n                const base = this._def.schema._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (!isValid(base))\n                    return base;\n                const result = effect.transform(base.value, checkCtx);\n                if (result instanceof Promise) {\n                    throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n                }\n                return { status: status.value, value: result };\n            }\n            else {\n                return this._def.schema\n                    ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n                    .then((base) => {\n                    if (!isValid(base))\n                        return base;\n                    return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n                });\n            }\n        }\n        util.assertNever(effect);\n    }\n}\nZodEffects.create = (schema, effect, params) => {\n    return new ZodEffects({\n        schema,\n        typeName: ZodFirstPartyTypeKind.ZodEffects,\n        effect,\n        ...processCreateParams(params),\n    });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n    return new ZodEffects({\n        schema,\n        effect: { type: \"preprocess\", transform: preprocess },\n        typeName: ZodFirstPartyTypeKind.ZodEffects,\n        ...processCreateParams(params),\n    });\n};\nclass ZodOptional extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType === ZodParsedType.undefined) {\n            return OK(undefined);\n        }\n        return this._def.innerType._parse(input);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodOptional.create = (type, params) => {\n    return new ZodOptional({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodOptional,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNullable extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType === ZodParsedType.null) {\n            return OK(null);\n        }\n        return this._def.innerType._parse(input);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodNullable.create = (type, params) => {\n    return new ZodNullable({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodNullable,\n        ...processCreateParams(params),\n    });\n};\nclass ZodDefault extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        let data = ctx.data;\n        if (ctx.parsedType === ZodParsedType.undefined) {\n            data = this._def.defaultValue();\n        }\n        return this._def.innerType._parse({\n            data,\n            path: ctx.path,\n            parent: ctx,\n        });\n    }\n    removeDefault() {\n        return this._def.innerType;\n    }\n}\nZodDefault.create = (type, params) => {\n    return new ZodDefault({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodDefault,\n        defaultValue: typeof params.default === \"function\"\n            ? params.default\n            : () => params.default,\n        ...processCreateParams(params),\n    });\n};\nclass ZodCatch extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        // newCtx is used to not collect issues from inner types in ctx\n        const newCtx = {\n            ...ctx,\n            common: {\n                ...ctx.common,\n                issues: [],\n            },\n        };\n        const result = this._def.innerType._parse({\n            data: newCtx.data,\n            path: newCtx.path,\n            parent: {\n                ...newCtx,\n            },\n        });\n        if (isAsync(result)) {\n            return result.then((result) => {\n                return {\n                    status: \"valid\",\n                    value: result.status === \"valid\"\n                        ? result.value\n                        : this._def.catchValue({\n                            get error() {\n                                return new ZodError(newCtx.common.issues);\n                            },\n                            input: newCtx.data,\n                        }),\n                };\n            });\n        }\n        else {\n            return {\n                status: \"valid\",\n                value: result.status === \"valid\"\n                    ? result.value\n                    : this._def.catchValue({\n                        get error() {\n                            return new ZodError(newCtx.common.issues);\n                        },\n                        input: newCtx.data,\n                    }),\n            };\n        }\n    }\n    removeCatch() {\n        return this._def.innerType;\n    }\n}\nZodCatch.create = (type, params) => {\n    return new ZodCatch({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodCatch,\n        catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n        ...processCreateParams(params),\n    });\n};\nclass ZodNaN extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.nan) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.nan,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return { status: \"valid\", value: input.data };\n    }\n}\nZodNaN.create = (params) => {\n    return new ZodNaN({\n        typeName: ZodFirstPartyTypeKind.ZodNaN,\n        ...processCreateParams(params),\n    });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const data = ctx.data;\n        return this._def.type._parse({\n            data,\n            path: ctx.path,\n            parent: ctx,\n        });\n    }\n    unwrap() {\n        return this._def.type;\n    }\n}\nclass ZodPipeline extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.common.async) {\n            const handleAsync = async () => {\n                const inResult = await this._def.in._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (inResult.status === \"aborted\")\n                    return INVALID;\n                if (inResult.status === \"dirty\") {\n                    status.dirty();\n                    return DIRTY(inResult.value);\n                }\n                else {\n                    return this._def.out._parseAsync({\n                        data: inResult.value,\n                        path: ctx.path,\n                        parent: ctx,\n                    });\n                }\n            };\n            return handleAsync();\n        }\n        else {\n            const inResult = this._def.in._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n            if (inResult.status === \"aborted\")\n                return INVALID;\n            if (inResult.status === \"dirty\") {\n                status.dirty();\n                return {\n                    status: \"dirty\",\n                    value: inResult.value,\n                };\n            }\n            else {\n                return this._def.out._parseSync({\n                    data: inResult.value,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n            }\n        }\n    }\n    static create(a, b) {\n        return new ZodPipeline({\n            in: a,\n            out: b,\n            typeName: ZodFirstPartyTypeKind.ZodPipeline,\n        });\n    }\n}\nclass ZodReadonly extends ZodType {\n    _parse(input) {\n        const result = this._def.innerType._parse(input);\n        if (isValid(result)) {\n            result.value = Object.freeze(result.value);\n        }\n        return result;\n    }\n}\nZodReadonly.create = (type, params) => {\n    return new ZodReadonly({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodReadonly,\n        ...processCreateParams(params),\n    });\n};\nconst custom = (check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n    if (check)\n        return ZodAny.create().superRefine((data, ctx) => {\n            var _a, _b;\n            if (!check(data)) {\n                const p = typeof params === \"function\"\n                    ? params(data)\n                    : typeof params === \"string\"\n                        ? { message: params }\n                        : params;\n                const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n                const p2 = typeof p === \"string\" ? { message: p } : p;\n                ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n            }\n        });\n    return ZodAny.create();\n};\nconst late = {\n    object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n    ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n    ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n    ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n    ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n    ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n    ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n    ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n    ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n    ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n    ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n    ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n    ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n    ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n    ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n    ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n    ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n    ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n    ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n    ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n    ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n    ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n    ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n    ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n    ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n    ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n    ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n    ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n    ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n    ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n    ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n    ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n    ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n    ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n    ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n    ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n    ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = <T extends new (...args: any[]) => any>(\ncls, params = {\n    message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n    string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n    number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n    boolean: ((arg) => ZodBoolean.create({\n        ...arg,\n        coerce: true,\n    })),\n    bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n    date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    defaultErrorMap: errorMap,\n    setErrorMap: setErrorMap,\n    getErrorMap: getErrorMap,\n    makeIssue: makeIssue,\n    EMPTY_PATH: EMPTY_PATH,\n    addIssueToContext: addIssueToContext,\n    ParseStatus: ParseStatus,\n    INVALID: INVALID,\n    DIRTY: DIRTY,\n    OK: OK,\n    isAborted: isAborted,\n    isDirty: isDirty,\n    isValid: isValid,\n    isAsync: isAsync,\n    get util () { return util; },\n    get objectUtil () { return objectUtil; },\n    ZodParsedType: ZodParsedType,\n    getParsedType: getParsedType,\n    ZodType: ZodType,\n    ZodString: ZodString,\n    ZodNumber: ZodNumber,\n    ZodBigInt: ZodBigInt,\n    ZodBoolean: ZodBoolean,\n    ZodDate: ZodDate,\n    ZodSymbol: ZodSymbol,\n    ZodUndefined: ZodUndefined,\n    ZodNull: ZodNull,\n    ZodAny: ZodAny,\n    ZodUnknown: ZodUnknown,\n    ZodNever: ZodNever,\n    ZodVoid: ZodVoid,\n    ZodArray: ZodArray,\n    ZodObject: ZodObject,\n    ZodUnion: ZodUnion,\n    ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n    ZodIntersection: ZodIntersection,\n    ZodTuple: ZodTuple,\n    ZodRecord: ZodRecord,\n    ZodMap: ZodMap,\n    ZodSet: ZodSet,\n    ZodFunction: ZodFunction,\n    ZodLazy: ZodLazy,\n    ZodLiteral: ZodLiteral,\n    ZodEnum: ZodEnum,\n    ZodNativeEnum: ZodNativeEnum,\n    ZodPromise: ZodPromise,\n    ZodEffects: ZodEffects,\n    ZodTransformer: ZodEffects,\n    ZodOptional: ZodOptional,\n    ZodNullable: ZodNullable,\n    ZodDefault: ZodDefault,\n    ZodCatch: ZodCatch,\n    ZodNaN: ZodNaN,\n    BRAND: BRAND,\n    ZodBranded: ZodBranded,\n    ZodPipeline: ZodPipeline,\n    ZodReadonly: ZodReadonly,\n    custom: custom,\n    Schema: ZodType,\n    ZodSchema: ZodType,\n    late: late,\n    get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n    coerce: coerce,\n    any: anyType,\n    array: arrayType,\n    bigint: bigIntType,\n    boolean: booleanType,\n    date: dateType,\n    discriminatedUnion: discriminatedUnionType,\n    effect: effectsType,\n    'enum': enumType,\n    'function': functionType,\n    'instanceof': instanceOfType,\n    intersection: intersectionType,\n    lazy: lazyType,\n    literal: literalType,\n    map: mapType,\n    nan: nanType,\n    nativeEnum: nativeEnumType,\n    never: neverType,\n    'null': nullType,\n    nullable: nullableType,\n    number: numberType,\n    object: objectType,\n    oboolean: oboolean,\n    onumber: onumber,\n    optional: optionalType,\n    ostring: ostring,\n    pipeline: pipelineType,\n    preprocess: preprocessType,\n    promise: promiseType,\n    record: recordType,\n    set: setType,\n    strictObject: strictObjectType,\n    string: stringType,\n    symbol: symbolType,\n    transformer: effectsType,\n    tuple: tupleType,\n    'undefined': undefinedType,\n    union: unionType,\n    unknown: unknownType,\n    'void': voidType,\n    NEVER: NEVER,\n    ZodIssueCode: ZodIssueCode,\n    quotelessJson: quotelessJson,\n    ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","import { z } from \"zod\";\r\n\r\nexport type Item = z.infer<typeof ItemSchema>;\r\nexport const ItemSchema = z.object({\r\n        item_id: z.string(),\r\n        item_name: z.string(),\r\n        affiliation: z.string().nullable().optional(), // Unused\r\n        coupon: z.string().nullable().optional(),\r\n        discount: z.number().nullable().optional(),\r\n        index: z.number().nullable().optional(),\r\n        item_brand: z.string(),\r\n        item_category: z.string(), // Item categories in order, from least to most specific. E.g, \"item_category: 'Apprarel', item_category2: 'Shoes', item_category3: 'Sneakers'\r\n        item_category2: z.string().optional().nullable(),\r\n        item_category3: z.string().optional().nullable(),\r\n        item_category4: z.string().optional().nullable(),\r\n        item_category5: z.string().optional().nullable(),\r\n        item_list_id: z.string().nullable().optional(), // Position if the item exist in a list, e.g. a product list or a search result list\r\n        item_list_name: z.string().nullable().optional(),\r\n        item_variant: z.string().nullable().optional(),\r\n        location_id: z.string().nullable().optional(), // Unused\r\n        price: z.number(),\r\n        quantity: z.number().min(1).optional().nullable(),\r\n\r\n        item_size: z.string().optional().nullable(), // Custom property\r\n        item_discount_percentage: z.number().nullable().optional(), // Custom property\r\n        department: z.string().optional().nullable(), // Custom property\r\n        in_stock: z.boolean().optional().nullable(), // Custom property\r\n    });\r\n\r\nexport type EcommerceEventModel = z.infer<typeof EcommerceEventModelSchema>;\r\nexport const EcommerceEventModelSchema = z.object({\r\n  currency: z.string().optional().nullable(),\r\n  value: z.number().optional().nullable(),\r\n  coupon: z.string().optional().nullable(),\r\n  discount: z.number().optional().nullable(), // Custom property. Total discount in a given currency for the shopping cart\r\n  items: z.array(ItemSchema),\r\n  transaction_id: z.string().optional().nullable(),\r\n  tax: z.number().optional().nullable(), // Unused\r\n  shipping: z.number().optional().nullable(),\r\n  shipping_tier: z.string().optional().nullable(),\r\n  payment_type: z.string().optional().nullable(),\r\n  creative_name: z.string().optional().nullable(),\r\n  creative_slot: z.string().optional().nullable(),\r\n  promotion_id: z.string().optional().nullable(),\r\n  promotion_name: z.string().optional().nullable(),\r\n  item_list_id: z.string().optional().nullable(),\r\n  item_list_name: z.string().optional().nullable(),\r\n  promotion_destination: z.string().optional().nullable(), // custom property\r\n  upsell_algorithm: z.string().optional().nullable(), // Custom property\r\n});\r\n\r\nexport type GoogleAnalytics4EventModel = z.infer<typeof GoogleAnalytics4EventModelSchema>;\r\nexport const GoogleAnalytics4EventModelSchema = z.object({\r\n    event: z.string(),\r\n    logged_in_status: z.boolean(),\r\n    ecommerce: EcommerceEventModelSchema,\r\n});","import { pushDataToGtm } from \"../../../../global/apps/mixins/tracking\";\r\nimport {\r\n    GoogleAnalytics4EventModel,\r\n} from \"./GoogleAnalytics/GoogleAnalyticsSchema\";\r\n\r\nconst USE_PIWIK_TRACKING = true;\r\n\r\n/**\r\n * Handles GTM tracking by pushing data to the data layer object.\r\n *\r\n * @param dataLayerObject - The data layer object containing ecommerce data in new types provided by Piwik.\r\n */\r\nexport const handleGtmTracking = (\r\n    dataLayerObject: GoogleAnalytics4EventModel\r\n) => {\r\n    if (!USE_PIWIK_TRACKING || !dataLayerObject) return;\r\n\r\n    pushDataToGtm({ ecommerce: null });\r\n    pushDataToGtm(dataLayerObject);\r\n};","import { LogMessage } from \"./LoggingAPISchema\";\r\n\r\nconst API_URL = \"/publicapi/commerce\";\r\n\r\n/**\r\n * Sends a log message to application insights\r\n *\r\n * @param logmessage The log message to be sent.\r\n * @throws Error if the HTTP request fails.\r\n */\r\nexport const Log = async (logmessage: LogMessage) => {\r\n    const url = `${API_URL}/log`;\r\n    const response = await fetch(url, {\r\n        method: \"POST\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: JSON.stringify({\r\n            logmessage: logmessage,\r\n        }),\r\n    });\r\n\r\n    if (!response.ok) {\r\n        throw new Error(`HTTP error! status: ${response.status}`);\r\n    }\r\n};\r\n\r\n/**\r\n * Logs the response from an API endpoint.\r\n *\r\n * @param endpointUrl - The URL of the API endpoint.\r\n * @param response - The response object from the API call.\r\n * @param body - The request body (optional).\r\n */\r\nexport const LogErrorResponse = async (\r\n    endpointUrl: string,\r\n    response: Response,\r\n    body?: string,\r\n) => {\r\n    const responseText = await response.text();\r\n    await Log({\r\n        LogLevel: \"Error\",\r\n        Message: `Endpoint: ${endpointUrl} - Status: ${response.status} - Response text: ${responseText} - Body: ${body ?? \"\"}`,\r\n    });\r\n};\r\n","export type Ga4Event =\r\n    (typeof Ga4Events)[keyof typeof Ga4Events];\r\nexport const Ga4Events = {\r\n    BeginCheckout: \"begin_checkout\",\r\n    AddShippingInfoAddress: \"add_shipping_info_address\",\r\n    AddShippingInfo: \"add_shipping_info\",\r\n    AddPaymentInfo: \"add_payment_info\",\r\n    Purchase: \"purchase\",\r\n    AddToCart: \"add_to_cart\",\r\n    AddToCartFromList: \"add_to_cart_from_list\",\r\n    RemoveFromCart: \"remove_from_cart\",\r\n    ViewItemList: \"view_item_list\",\r\n    SelectItem: \"select_item\",\r\n    ViewPromotion: \"view_promotion\",\r\n    SelectPromotion: \"select_promotion\",\r\n    NoEvent: \"\",\r\n} as const;","import { LineItemModel } from \"../utils/API/Cart/cartAPISchema\";\r\nimport {\r\n    GoogleAnalytics4EventModel,\r\n    GoogleAnalytics4EventModelSchema,\r\n    Item,\r\n} from \"../utils/API/GoogleAnalytics/GoogleAnalyticsSchema\";\r\nimport { handleGtmTracking } from \"../utils/API/GTM\";\r\nimport { LogErrorResponse } from \"../utils/API/Logging/LoggingAPI\";\r\nimport { Ga4Event, Ga4Events } from \"./models/gtm.models\";\r\nimport {\r\n    CustomField,\r\n    Product,\r\n    ProductGroup,\r\n    SearchResultRecommendList,\r\n} from \"./search.service\";\r\n\r\nexport default class GtmService {\r\n    /**\r\n     * Pushes a checkout event to Google Tag Manager (GTM).\r\n     *\r\n     * @param eventName - The name of the GA4 event to be pushed.\r\n     * @param lineItem - Optional. Use when adding or removing a line item from the cart. If omitted, all line items from the shopping cart will be used.\r\n     * @returns A promise that resolves when the event has been pushed to GTM.\r\n     */\r\n    static pushCheckoutEvent = async (\r\n        eventName: Ga4Event,\r\n        lineItem?: LineItemModel,\r\n        extraEcommerceObjectProperties?: Record<any, string>,\r\n    ) => {\r\n        const object = await this.getCheckoutEventModel(\r\n            eventName,\r\n            lineItem?.code,\r\n            extraEcommerceObjectProperties,\r\n        );\r\n        handleGtmTracking(object);\r\n    };\r\n\r\n    static pushViewItemListEvent = async (\r\n        itemListId: string,\r\n        itemListName: string,\r\n        isUserAuthenticated: boolean,\r\n        searchResultRecommendList: SearchResultRecommendList,\r\n        upsellAlgorithm?: string,\r\n    ) => {\r\n        const object = await this.getViewItemListEventModel(\r\n            itemListId,\r\n            itemListName,\r\n            isUserAuthenticated,\r\n            searchResultRecommendList,\r\n            upsellAlgorithm,\r\n        );\r\n\r\n        if (!object) return;\r\n        handleGtmTracking(object);\r\n    };\r\n\r\n    static pushSelectItemEvent = async (\r\n        itemListId: string,\r\n        itemListName: string,\r\n        isUserAuthenticated: boolean,\r\n        product: Product,\r\n        productIndex?: number,\r\n        upsellAlgorithm?: string,\r\n    ) => {\r\n        const object = await this.getSelectItemEventModel(\r\n            itemListId,\r\n            itemListName,\r\n            isUserAuthenticated,\r\n            product,\r\n            productIndex,\r\n            upsellAlgorithm,\r\n        );\r\n\r\n        if (!object) return;\r\n        handleGtmTracking(object);\r\n    };\r\n\r\n    static pushViewPromotionEvent = (\r\n        itemId: string,\r\n        itemName: string,\r\n        isUserAuthenticated: boolean,\r\n        creativeName?: string,\r\n        creativeSlot?: string,\r\n    ) => {\r\n        const object = this.getViewPromotionEvent(\r\n            itemId,\r\n            itemName,\r\n            isUserAuthenticated,\r\n            creativeName,\r\n            creativeSlot,\r\n        );\r\n\r\n        if (!object) return;\r\n        handleGtmTracking(object);\r\n    };\r\n\r\n    static pushSelectPromotionEvent = (\r\n        itemId: string,\r\n        itemName: string,\r\n        isUserAuthenticated: boolean,\r\n        linkHref?: string,\r\n        creativeName?: string,\r\n        creativeSlot?: string,\r\n    ) => {\r\n        const object = this.getSelectPromotionEvent(\r\n            itemId,\r\n            itemName,\r\n            isUserAuthenticated,\r\n            linkHref,\r\n            creativeName,\r\n            creativeSlot,\r\n        );\r\n\r\n        if (!object) return;\r\n        handleGtmTracking(object);\r\n    };\r\n\r\n    static getCheckoutEventModel = async (\r\n        eventName: string,\r\n        lineItemCode?: string,\r\n        extraEcommerceObjectProperties?: Record<any, string>,\r\n    ): Promise<GoogleAnalytics4EventModel> => {\r\n        const url = `/api/tracking/checkoutevent${lineItemCode ? `?itemCode=${lineItemCode}` : \"\"}`;\r\n\r\n        const response = await fetch(url.toString(), {\r\n            method: \"GET\",\r\n            headers: {\r\n                \"Content-Type\": \"application/json\",\r\n            },\r\n        });\r\n\r\n        if (!response.ok) {\r\n            await LogErrorResponse(url, response);\r\n            throw new Error(`HTTP error! status: ${response.status}`);\r\n        }\r\n\r\n        const data = await response.json();\r\n        const validatedData = GoogleAnalytics4EventModelSchema.parse(data);\r\n        validatedData.event = eventName;\r\n\r\n        if (extraEcommerceObjectProperties) {\r\n            for (const [key, value] of Object.entries(\r\n                extraEcommerceObjectProperties,\r\n            )) {\r\n                validatedData.ecommerce[key] = value;\r\n            }\r\n        }\r\n\r\n        return validatedData;\r\n    };\r\n\r\n    static getSelectItemEventModel = async (\r\n        itemListId: string,\r\n        itemListName: string,\r\n        isUserAuthenticated: boolean,\r\n        product: Product,\r\n        productIndex?: number,\r\n        algorithm?: string,\r\n    ) => {\r\n        const item = this.getItem(\r\n            product,\r\n            itemListId,\r\n            itemListName,\r\n            productIndex,\r\n        );\r\n        if (!item) return null;\r\n\r\n        const googleAnalytics4EventModel: GoogleAnalytics4EventModel = {\r\n            event: Ga4Events.SelectItem,\r\n            logged_in_status: isUserAuthenticated,\r\n            ecommerce: {\r\n                item_list_id: itemListId,\r\n                item_list_name: itemListName,\r\n                upsell_algorithm: algorithm,\r\n                items: [item],\r\n            },\r\n        };\r\n\r\n        return googleAnalytics4EventModel;\r\n    };\r\n\r\n    static getViewItemListEventModel = async (\r\n        itemListId: string,\r\n        itemListName: string,\r\n        isUserAuthenticated: boolean,\r\n        searchResultRecommendList: SearchResultRecommendList,\r\n        algorithm?: string,\r\n    ) => {\r\n        const items = this.getItems(\r\n            itemListId,\r\n            itemListName,\r\n            searchResultRecommendList,\r\n        );\r\n        if (!items.length) return null;\r\n\r\n        const googleAnalytics4EventModel: GoogleAnalytics4EventModel = {\r\n            event: Ga4Events.ViewItemList,\r\n            logged_in_status: isUserAuthenticated,\r\n            ecommerce: {\r\n                item_list_id: itemListId,\r\n                item_list_name: itemListName,\r\n                upsell_algorithm: algorithm,\r\n                items: items,\r\n            },\r\n        };\r\n\r\n        return googleAnalytics4EventModel;\r\n    };\r\n\r\n    static getViewPromotionEvent = (\r\n        creativeName: string,\r\n        creativeSlot: string,\r\n        isUserAuthenticated: boolean,\r\n        promotionId?: string,\r\n        promotionName?: string,\r\n    ) => {\r\n        if (!creativeName || !creativeSlot) return null;\r\n\r\n        const googleAnalytics4EventModel: GoogleAnalytics4EventModel = {\r\n            event: Ga4Events.ViewPromotion,\r\n            logged_in_status: isUserAuthenticated,\r\n            ecommerce: {\r\n                promotion_id: promotionId,\r\n                promotion_name: promotionName,\r\n                creative_name: creativeName,\r\n                creative_slot: creativeSlot,\r\n                items: [],\r\n            },\r\n        };\r\n\r\n        return googleAnalytics4EventModel;\r\n    };\r\n\r\n    static getSelectPromotionEvent = (\r\n        creativeName: string,\r\n        creativeSlot: string,\r\n        isUserAuthenticated: boolean,\r\n        promotionDestination?: string,\r\n        promotionId?: string,\r\n        promotionName?: string,\r\n    ) => {\r\n        if (!creativeName || !creativeSlot) return null;\r\n\r\n        const googleAnalytics4EventModel: GoogleAnalytics4EventModel = {\r\n            event: Ga4Events.SelectPromotion,\r\n            logged_in_status: isUserAuthenticated,\r\n            ecommerce: {\r\n                promotion_id: promotionId,\r\n                promotion_name: promotionName,\r\n                promotion_destination: promotionDestination,\r\n                creative_name: creativeName,\r\n                creative_slot: creativeSlot,\r\n                items: [],\r\n            },\r\n        };\r\n\r\n        return googleAnalytics4EventModel;\r\n    };\r\n\r\n    private static getItems = (\r\n        itemListId: string,\r\n        itemListName: string,\r\n        searchResultRecommendList?: SearchResultRecommendList,\r\n    ): Item[] => {\r\n        if (searchResultRecommendList?.primaryList?.productGroups?.length === 0)\r\n            return [];\r\n\r\n        return (\r\n            searchResultRecommendList?.primaryList?.productGroups?.map(\r\n                (productGroup, productGroupIndex) => {\r\n                    const product = productGroup.products[0];\r\n\r\n                    if (!searchResultRecommendList.shopId) {\r\n                        return this.getItem(\r\n                            product,\r\n                            itemListId,\r\n                            itemListName,\r\n                            productGroupIndex,\r\n                        );\r\n                    }\r\n\r\n                    return this.getItem(\r\n                        product,\r\n                        searchResultRecommendList.shopId,\r\n                        itemListName,\r\n                        productGroupIndex,\r\n                        [\r\n                            searchResultRecommendList.shopId,\r\n                            product.custom.Dept[0]?.label || \"\",\r\n                            product.custom.Category[0]?.label || \"\",\r\n                        ],\r\n                    );\r\n                },\r\n            ) || []\r\n        );\r\n    };\r\n\r\n    private static getItem = (\r\n        product: Product,\r\n        itemListId: string,\r\n        itemListName: string,\r\n        productGroupIndex?: number,\r\n        categories: Array<string> = [],\r\n    ): Item => {\r\n        let item = {\r\n            item_id: product.key,\r\n            item_name: product.title,\r\n            item_brand: product.brand,\r\n            item_variant: product.custom.ColorName[0]?.label || \"\",\r\n            price: product.sellingPrice.max,\r\n            discount: product.listPrice.max - product.sellingPrice.max,\r\n            item_list_id: itemListId,\r\n            item_list_name: itemListName,\r\n            department: product.custom.Dept[0]?.label || \"\",\r\n            in_stock: product.inStock,\r\n            index: productGroupIndex,\r\n        } as Item;\r\n\r\n        if (categories?.length > 0) {\r\n            item.item_category = categories[0];\r\n            if (categories.length > 1) item.item_category2 = categories[1];\r\n            if (categories.length > 2) item.item_category3 = categories[2];\r\n        }\r\n\r\n        if (!categories) this.assignCategories(item, product.custom);\r\n\r\n        return item;\r\n    };\r\n\r\n    private static assignCategories = (\r\n        item: Item,\r\n        custom: { [key: string]: Array<CustomField> },\r\n    ) => {\r\n        if (!custom?.Category) return;\r\n\r\n        if (custom.Category.length > 0)\r\n            item.item_category = custom.Category[0].label;\r\n        if (custom.Category.length > 1)\r\n            item.item_category2 = custom.Category[1].label;\r\n        if (custom.Category.length > 2)\r\n            item.item_category3 = custom.Category[2].label;\r\n        if (custom.Category.length > 3)\r\n            item.item_category4 = custom.Category[3].label;\r\n        if (custom.Category.length > 4)\r\n            item.item_category5 = custom.Category[4].label;\r\n\r\n        return item;\r\n    };\r\n}\r\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n  var _a;\n  const result = shallowRef();\n  watchEffect(() => {\n    result.value = fn();\n  }, {\n    ...options,\n    flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n  });\n  return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n  let v = void 0;\n  let track;\n  let trigger;\n  const dirty = ref(true);\n  const update = () => {\n    dirty.value = true;\n    trigger();\n  };\n  watch(source, update, { flush: \"sync\" });\n  const get = typeof fn === \"function\" ? fn : fn.get;\n  const set = typeof fn === \"function\" ? void 0 : fn.set;\n  const result = customRef((_track, _trigger) => {\n    track = _track;\n    trigger = _trigger;\n    return {\n      get() {\n        if (dirty.value) {\n          v = get(v);\n          dirty.value = false;\n        }\n        track();\n        return v;\n      },\n      set(v2) {\n        set == null ? void 0 : set(v2);\n      }\n    };\n  });\n  if (Object.isExtensible(result))\n    result.trigger = update;\n  return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n  if (getCurrentScope()) {\n    onScopeDispose(fn);\n    return true;\n  }\n  return false;\n}\n\nfunction createEventHook() {\n  const fns = /* @__PURE__ */ new Set();\n  const off = (fn) => {\n    fns.delete(fn);\n  };\n  const on = (fn) => {\n    fns.add(fn);\n    const offFn = () => off(fn);\n    tryOnScopeDispose(offFn);\n    return {\n      off: offFn\n    };\n  };\n  const trigger = (...args) => {\n    return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n  };\n  return {\n    on,\n    off,\n    trigger\n  };\n}\n\nfunction createGlobalState(stateFactory) {\n  let initialized = false;\n  let state;\n  const scope = effectScope(true);\n  return (...args) => {\n    if (!initialized) {\n      state = scope.run(() => stateFactory(...args));\n      initialized = true;\n    }\n    return state;\n  };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n  var _a;\n  const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n  if (instance == null)\n    throw new Error(\"provideLocal must be called in setup\");\n  if (!localProvidedStateMap.has(instance))\n    localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n  const localProvidedState = localProvidedStateMap.get(instance);\n  localProvidedState[key] = value;\n  provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n  var _a;\n  const key = args[0];\n  const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n  if (instance == null)\n    throw new Error(\"injectLocal must be called in setup\");\n  if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n    return localProvidedStateMap.get(instance)[key];\n  return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n  const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n  const defaultValue = options == null ? void 0 : options.defaultValue;\n  const useProvidingState = (...args) => {\n    const state = composable(...args);\n    provideLocal(key, state);\n    return state;\n  };\n  const useInjectedState = () => injectLocal(key, defaultValue);\n  return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n  let subscribers = 0;\n  let state;\n  let scope;\n  const dispose = () => {\n    subscribers -= 1;\n    if (scope && subscribers <= 0) {\n      scope.stop();\n      state = void 0;\n      scope = void 0;\n    }\n  };\n  return (...args) => {\n    subscribers += 1;\n    if (!scope) {\n      scope = effectScope(true);\n      state = scope.run(() => composable(...args));\n    }\n    tryOnScopeDispose(dispose);\n    return state;\n  };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n  if (!isVue3 && !version.startsWith(\"2.7.\")) {\n    if (process.env.NODE_ENV !== \"production\")\n      throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n    return;\n  }\n  for (const [key, value] of Object.entries(extend)) {\n    if (key === \"value\")\n      continue;\n    if (isRef(value) && unwrap) {\n      Object.defineProperty(ref, key, {\n        get() {\n          return value.value;\n        },\n        set(v) {\n          value.value = v;\n        },\n        enumerable\n      });\n    } else {\n      Object.defineProperty(ref, key, { value, enumerable });\n    }\n  }\n  return ref;\n}\n\nfunction get(obj, key) {\n  if (key == null)\n    return unref(obj);\n  return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n  return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n  if (typeof Symbol !== \"undefined\") {\n    const clone = { ...obj };\n    Object.defineProperty(clone, Symbol.iterator, {\n      enumerable: false,\n      value() {\n        let index = 0;\n        return {\n          next: () => ({\n            value: arr[index++],\n            done: index > arr.length\n          })\n        };\n      }\n    });\n    return clone;\n  } else {\n    return Object.assign([...arr], obj);\n  }\n}\n\nfunction toValue(r) {\n  return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n  const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n  return function(...args) {\n    return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n  };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n  let keys = [];\n  let options;\n  if (Array.isArray(optionsOrKeys)) {\n    keys = optionsOrKeys;\n  } else {\n    options = optionsOrKeys;\n    const { includeOwnProperties = true } = optionsOrKeys;\n    keys.push(...Object.keys(obj));\n    if (includeOwnProperties)\n      keys.push(...Object.getOwnPropertyNames(obj));\n  }\n  return Object.fromEntries(\n    keys.map((key) => {\n      const value = obj[key];\n      return [\n        key,\n        typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n      ];\n    })\n  );\n}\n\nfunction toReactive(objectRef) {\n  if (!isRef(objectRef))\n    return reactive(objectRef);\n  const proxy = new Proxy({}, {\n    get(_, p, receiver) {\n      return unref(Reflect.get(objectRef.value, p, receiver));\n    },\n    set(_, p, value) {\n      if (isRef(objectRef.value[p]) && !isRef(value))\n        objectRef.value[p].value = value;\n      else\n        objectRef.value[p] = value;\n      return true;\n    },\n    deleteProperty(_, p) {\n      return Reflect.deleteProperty(objectRef.value, p);\n    },\n    has(_, p) {\n      return Reflect.has(objectRef.value, p);\n    },\n    ownKeys() {\n      return Object.keys(objectRef.value);\n    },\n    getOwnPropertyDescriptor() {\n      return {\n        enumerable: true,\n        configurable: true\n      };\n    }\n  });\n  return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n  return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n  const flatKeys = keys.flat();\n  const predicate = flatKeys[0];\n  return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n  if (!condition)\n    console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n  min = Math.ceil(min);\n  max = Math.floor(max);\n  return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n  var _a, _b;\n  return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n  function wrapper(...args) {\n    return new Promise((resolve, reject) => {\n      Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n    });\n  }\n  return wrapper;\n}\nconst bypassFilter = (invoke) => {\n  return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n  let timer;\n  let maxTimer;\n  let lastRejector = noop;\n  const _clearTimeout = (timer2) => {\n    clearTimeout(timer2);\n    lastRejector();\n    lastRejector = noop;\n  };\n  const filter = (invoke) => {\n    const duration = toValue(ms);\n    const maxDuration = toValue(options.maxWait);\n    if (timer)\n      _clearTimeout(timer);\n    if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n      if (maxTimer) {\n        _clearTimeout(maxTimer);\n        maxTimer = null;\n      }\n      return Promise.resolve(invoke());\n    }\n    return new Promise((resolve, reject) => {\n      lastRejector = options.rejectOnCancel ? reject : resolve;\n      if (maxDuration && !maxTimer) {\n        maxTimer = setTimeout(() => {\n          if (timer)\n            _clearTimeout(timer);\n          maxTimer = null;\n          resolve(invoke());\n        }, maxDuration);\n      }\n      timer = setTimeout(() => {\n        if (maxTimer)\n          _clearTimeout(maxTimer);\n        maxTimer = null;\n        resolve(invoke());\n      }, duration);\n    });\n  };\n  return filter;\n}\nfunction throttleFilter(...args) {\n  let lastExec = 0;\n  let timer;\n  let isLeading = true;\n  let lastRejector = noop;\n  let lastValue;\n  let ms;\n  let trailing;\n  let leading;\n  let rejectOnCancel;\n  if (!isRef(args[0]) && typeof args[0] === \"object\")\n    ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n  else\n    [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n  const clear = () => {\n    if (timer) {\n      clearTimeout(timer);\n      timer = void 0;\n      lastRejector();\n      lastRejector = noop;\n    }\n  };\n  const filter = (_invoke) => {\n    const duration = toValue(ms);\n    const elapsed = Date.now() - lastExec;\n    const invoke = () => {\n      return lastValue = _invoke();\n    };\n    clear();\n    if (duration <= 0) {\n      lastExec = Date.now();\n      return invoke();\n    }\n    if (elapsed > duration && (leading || !isLeading)) {\n      lastExec = Date.now();\n      invoke();\n    } else if (trailing) {\n      lastValue = new Promise((resolve, reject) => {\n        lastRejector = rejectOnCancel ? reject : resolve;\n        timer = setTimeout(() => {\n          lastExec = Date.now();\n          isLeading = true;\n          resolve(invoke());\n          clear();\n        }, Math.max(0, duration - elapsed));\n      });\n    }\n    if (!leading && !timer)\n      timer = setTimeout(() => isLeading = true, duration);\n    isLeading = false;\n    return lastValue;\n  };\n  return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n  const isActive = ref(true);\n  function pause() {\n    isActive.value = false;\n  }\n  function resume() {\n    isActive.value = true;\n  }\n  const eventFilter = (...args) => {\n    if (isActive.value)\n      extendFilter(...args);\n  };\n  return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n  mounted: isVue3 ? \"mounted\" : \"inserted\",\n  updated: isVue3 ? \"updated\" : \"componentUpdated\",\n  unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (str) => {\n    const hit = cache[str];\n    return hit || (cache[str] = fn(str));\n  };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n  return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n  return new Promise((resolve, reject) => {\n    if (throwOnTimeout)\n      setTimeout(() => reject(reason), ms);\n    else\n      setTimeout(resolve, ms);\n  });\n}\nfunction identity(arg) {\n  return arg;\n}\nfunction createSingletonPromise(fn) {\n  let _promise;\n  function wrapper() {\n    if (!_promise)\n      _promise = fn();\n    return _promise;\n  }\n  wrapper.reset = async () => {\n    const _prev = _promise;\n    _promise = void 0;\n    if (_prev)\n      await _prev;\n  };\n  return wrapper;\n}\nfunction invoke(fn) {\n  return fn();\n}\nfunction containsProp(obj, ...props) {\n  return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n  var _a;\n  if (typeof target === \"number\")\n    return target + delta;\n  const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n  const unit = target.slice(value.length);\n  const result = Number.parseFloat(value) + delta;\n  if (Number.isNaN(result))\n    return target;\n  return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n  return keys.reduce((n, k) => {\n    if (k in obj) {\n      if (!omitUndefined || obj[k] !== void 0)\n        n[k] = obj[k];\n    }\n    return n;\n  }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n  return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n    return (!omitUndefined || value !== void 0) && !keys.includes(key);\n  }));\n}\nfunction objectEntries(obj) {\n  return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n  return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n  if (args.length !== 1)\n    return toRef$1(...args);\n  const r = args[0];\n  return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n  const flatKeys = keys.flat();\n  const predicate = flatKeys[0];\n  return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n  return customRef((track, trigger) => {\n    let value = toValue(defaultValue);\n    let timer;\n    const resetAfter = () => setTimeout(() => {\n      value = toValue(defaultValue);\n      trigger();\n    }, toValue(afterMs));\n    tryOnScopeDispose(() => {\n      clearTimeout(timer);\n    });\n    return {\n      get() {\n        track();\n        return value;\n      },\n      set(newValue) {\n        value = newValue;\n        trigger();\n        clearTimeout(timer);\n        timer = resetAfter();\n      }\n    };\n  });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n  return createFilterWrapper(\n    debounceFilter(ms, options),\n    fn\n  );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n  const debounced = ref(value.value);\n  const updater = useDebounceFn(() => {\n    debounced.value = value.value;\n  }, ms, options);\n  watch(value, () => updater());\n  return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n  return computed({\n    get() {\n      var _a;\n      return (_a = source.value) != null ? _a : defaultValue;\n    },\n    set(value) {\n      source.value = value;\n    }\n  });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n  return createFilterWrapper(\n    throttleFilter(ms, trailing, leading, rejectOnCancel),\n    fn\n  );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n  if (delay <= 0)\n    return value;\n  const throttled = ref(value.value);\n  const updater = useThrottleFn(() => {\n    throttled.value = value.value;\n  }, delay, trailing, leading);\n  watch(value, () => updater());\n  return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n  let source = initial;\n  let track;\n  let trigger;\n  const ref = customRef((_track, _trigger) => {\n    track = _track;\n    trigger = _trigger;\n    return {\n      get() {\n        return get();\n      },\n      set(v) {\n        set(v);\n      }\n    };\n  });\n  function get(tracking = true) {\n    if (tracking)\n      track();\n    return source;\n  }\n  function set(value, triggering = true) {\n    var _a, _b;\n    if (value === source)\n      return;\n    const old = source;\n    if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n      return;\n    source = value;\n    (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n    if (triggering)\n      trigger();\n  }\n  const untrackedGet = () => get(false);\n  const silentSet = (v) => set(v, false);\n  const peek = () => get(false);\n  const lay = (v) => set(v, false);\n  return extendRef(\n    ref,\n    {\n      get,\n      set,\n      untrackedGet,\n      silentSet,\n      peek,\n      lay\n    },\n    { enumerable: true }\n  );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n  if (args.length === 2) {\n    const [ref, value] = args;\n    ref.value = value;\n  }\n  if (args.length === 3) {\n    if (isVue2) {\n      set$1(...args);\n    } else {\n      const [target, key, value] = args;\n      target[key] = value;\n    }\n  }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n  const {\n    eventFilter = bypassFilter,\n    ...watchOptions\n  } = options;\n  return watch(\n    source,\n    createFilterWrapper(\n      eventFilter,\n      cb\n    ),\n    watchOptions\n  );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n  const {\n    eventFilter: filter,\n    ...watchOptions\n  } = options;\n  const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n  const stop = watchWithFilter(\n    source,\n    cb,\n    {\n      ...watchOptions,\n      eventFilter\n    }\n  );\n  return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n  const {\n    flush = \"sync\",\n    deep = false,\n    immediate = true,\n    direction = \"both\",\n    transform = {}\n  } = options || {};\n  const watchers = [];\n  const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n  const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n  if (direction === \"both\" || direction === \"ltr\") {\n    watchers.push(watchPausable(\n      left,\n      (newValue) => {\n        watchers.forEach((w) => w.pause());\n        right.value = transformLTR(newValue);\n        watchers.forEach((w) => w.resume());\n      },\n      { flush, deep, immediate }\n    ));\n  }\n  if (direction === \"both\" || direction === \"rtl\") {\n    watchers.push(watchPausable(\n      right,\n      (newValue) => {\n        watchers.forEach((w) => w.pause());\n        left.value = transformRTL(newValue);\n        watchers.forEach((w) => w.resume());\n      },\n      { flush, deep, immediate }\n    ));\n  }\n  const stop = () => {\n    watchers.forEach((w) => w.stop());\n  };\n  return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n  const {\n    flush = \"sync\",\n    deep = false,\n    immediate = true\n  } = options;\n  if (!Array.isArray(targets))\n    targets = [targets];\n  return watch(\n    source,\n    (newValue) => targets.forEach((target) => target.value = newValue),\n    { flush, deep, immediate }\n  );\n}\n\nfunction toRefs(objectRef, options = {}) {\n  if (!isRef(objectRef))\n    return toRefs$1(objectRef);\n  const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n  for (const key in objectRef.value) {\n    result[key] = customRef(() => ({\n      get() {\n        return objectRef.value[key];\n      },\n      set(v) {\n        var _a;\n        const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n        if (replaceRef) {\n          if (Array.isArray(objectRef.value)) {\n            const copy = [...objectRef.value];\n            copy[key] = v;\n            objectRef.value = copy;\n          } else {\n            const newObject = { ...objectRef.value, [key]: v };\n            Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n            objectRef.value = newObject;\n          }\n        } else {\n          objectRef.value[key] = v;\n        }\n      }\n    }));\n  }\n  return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n  const instance = getLifeCycleTarget(target);\n  if (instance)\n    onBeforeMount(fn, target);\n  else if (sync)\n    fn();\n  else\n    nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n  const instance = getLifeCycleTarget(target);\n  if (instance)\n    onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n  const instance = getLifeCycleTarget();\n  if (instance)\n    onMounted(fn, target);\n  else if (sync)\n    fn();\n  else\n    nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n  const instance = getLifeCycleTarget(target);\n  if (instance)\n    onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n  function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n    let stop = null;\n    const watcher = new Promise((resolve) => {\n      stop = watch(\n        r,\n        (v) => {\n          if (condition(v) !== isNot) {\n            if (stop)\n              stop();\n            else\n              nextTick(() => stop == null ? void 0 : stop());\n            resolve(v);\n          }\n        },\n        {\n          flush,\n          deep,\n          immediate: true\n        }\n      );\n    });\n    const promises = [watcher];\n    if (timeout != null) {\n      promises.push(\n        promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n      );\n    }\n    return Promise.race(promises);\n  }\n  function toBe(value, options) {\n    if (!isRef(value))\n      return toMatch((v) => v === value, options);\n    const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n    let stop = null;\n    const watcher = new Promise((resolve) => {\n      stop = watch(\n        [r, value],\n        ([v1, v2]) => {\n          if (isNot !== (v1 === v2)) {\n            if (stop)\n              stop();\n            else\n              nextTick(() => stop == null ? void 0 : stop());\n            resolve(v1);\n          }\n        },\n        {\n          flush,\n          deep,\n          immediate: true\n        }\n      );\n    });\n    const promises = [watcher];\n    if (timeout != null) {\n      promises.push(\n        promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n          stop == null ? void 0 : stop();\n          return toValue(r);\n        })\n      );\n    }\n    return Promise.race(promises);\n  }\n  function toBeTruthy(options) {\n    return toMatch((v) => Boolean(v), options);\n  }\n  function toBeNull(options) {\n    return toBe(null, options);\n  }\n  function toBeUndefined(options) {\n    return toBe(void 0, options);\n  }\n  function toBeNaN(options) {\n    return toMatch(Number.isNaN, options);\n  }\n  function toContains(value, options) {\n    return toMatch((v) => {\n      const array = Array.from(v);\n      return array.includes(value) || array.includes(toValue(value));\n    }, options);\n  }\n  function changed(options) {\n    return changedTimes(1, options);\n  }\n  function changedTimes(n = 1, options) {\n    let count = -1;\n    return toMatch(() => {\n      count += 1;\n      return count >= n;\n    }, options);\n  }\n  if (Array.isArray(toValue(r))) {\n    const instance = {\n      toMatch,\n      toContains,\n      changed,\n      changedTimes,\n      get not() {\n        return createUntil(r, !isNot);\n      }\n    };\n    return instance;\n  } else {\n    const instance = {\n      toMatch,\n      toBe,\n      toBeTruthy,\n      toBeNull,\n      toBeNaN,\n      toBeUndefined,\n      changed,\n      changedTimes,\n      get not() {\n        return createUntil(r, !isNot);\n      }\n    };\n    return instance;\n  }\n}\nfunction until(r) {\n  return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n  return value === othVal;\n}\nfunction useArrayDifference(...args) {\n  var _a;\n  const list = args[0];\n  const values = args[1];\n  let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n  if (typeof compareFn === \"string\") {\n    const key = compareFn;\n    compareFn = (value, othVal) => value[key] === othVal[key];\n  }\n  return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n  return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n  return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n  return computed(() => toValue(\n    toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n  ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n  return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n  let index = arr.length;\n  while (index-- > 0) {\n    if (cb(arr[index], index, arr))\n      return arr[index];\n  }\n  return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n  return computed(() => toValue(\n    !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n  ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n  return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n  var _a;\n  const list = args[0];\n  const value = args[1];\n  let comparator = args[2];\n  let formIndex = 0;\n  if (isArrayIncludesOptions(comparator)) {\n    formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n    comparator = comparator.comparator;\n  }\n  if (typeof comparator === \"string\") {\n    const key = comparator;\n    comparator = (element, value2) => element[key] === toValue(value2);\n  }\n  comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n  return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n    toValue(element),\n    toValue(value),\n    index,\n    toValue(array)\n  )));\n}\n\nfunction useArrayJoin(list, separator) {\n  return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n  return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n  const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n  return computed(() => {\n    const resolved = toValue(list);\n    return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n  });\n}\n\nfunction useArraySome(list, fn) {\n  return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n  return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n  return array.reduce((acc, v) => {\n    if (!acc.some((x) => fn(v, x, array)))\n      acc.push(v);\n    return acc;\n  }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n  return computed(() => {\n    const resolvedList = toValue(list).map((element) => toValue(element));\n    return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n  });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n  let _initialValue = unref(initialValue);\n  const count = ref(initialValue);\n  const {\n    max = Number.POSITIVE_INFINITY,\n    min = Number.NEGATIVE_INFINITY\n  } = options;\n  const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n  const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n  const get = () => count.value;\n  const set = (val) => count.value = Math.max(min, Math.min(max, val));\n  const reset = (val = _initialValue) => {\n    _initialValue = val;\n    return set(val);\n  };\n  return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n  let m = hours < 12 ? \"AM\" : \"PM\";\n  if (hasPeriod)\n    m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n  return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n  const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n  const v = num % 100;\n  return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n  var _a;\n  const years = date.getFullYear();\n  const month = date.getMonth();\n  const days = date.getDate();\n  const hours = date.getHours();\n  const minutes = date.getMinutes();\n  const seconds = date.getSeconds();\n  const milliseconds = date.getMilliseconds();\n  const day = date.getDay();\n  const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n  const matches = {\n    Yo: () => formatOrdinal(years),\n    YY: () => String(years).slice(-2),\n    YYYY: () => years,\n    M: () => month + 1,\n    Mo: () => formatOrdinal(month + 1),\n    MM: () => `${month + 1}`.padStart(2, \"0\"),\n    MMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n    MMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n    D: () => String(days),\n    Do: () => formatOrdinal(days),\n    DD: () => `${days}`.padStart(2, \"0\"),\n    H: () => String(hours),\n    Ho: () => formatOrdinal(hours),\n    HH: () => `${hours}`.padStart(2, \"0\"),\n    h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n    ho: () => formatOrdinal(hours % 12 || 12),\n    hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n    m: () => String(minutes),\n    mo: () => formatOrdinal(minutes),\n    mm: () => `${minutes}`.padStart(2, \"0\"),\n    s: () => String(seconds),\n    so: () => formatOrdinal(seconds),\n    ss: () => `${seconds}`.padStart(2, \"0\"),\n    SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n    d: () => day,\n    dd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n    ddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n    dddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n    A: () => meridiem(hours, minutes),\n    AA: () => meridiem(hours, minutes, false, true),\n    a: () => meridiem(hours, minutes, true),\n    aa: () => meridiem(hours, minutes, true, true)\n  };\n  return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n    var _a2, _b;\n    return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n  });\n}\nfunction normalizeDate(date) {\n  if (date === null)\n    return new Date(Number.NaN);\n  if (date === void 0)\n    return /* @__PURE__ */ new Date();\n  if (date instanceof Date)\n    return new Date(date);\n  if (typeof date === \"string\" && !/Z$/i.test(date)) {\n    const d = date.match(REGEX_PARSE);\n    if (d) {\n      const m = d[2] - 1 || 0;\n      const ms = (d[7] || \"0\").substring(0, 3);\n      return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n    }\n  }\n  return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n  return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n  const {\n    immediate = true,\n    immediateCallback = false\n  } = options;\n  let timer = null;\n  const isActive = ref(false);\n  function clean() {\n    if (timer) {\n      clearInterval(timer);\n      timer = null;\n    }\n  }\n  function pause() {\n    isActive.value = false;\n    clean();\n  }\n  function resume() {\n    const intervalValue = toValue(interval);\n    if (intervalValue <= 0)\n      return;\n    isActive.value = true;\n    if (immediateCallback)\n      cb();\n    clean();\n    timer = setInterval(cb, intervalValue);\n  }\n  if (immediate && isClient)\n    resume();\n  if (isRef(interval) || typeof interval === \"function\") {\n    const stopWatch = watch(interval, () => {\n      if (isActive.value && isClient)\n        resume();\n    });\n    tryOnScopeDispose(stopWatch);\n  }\n  tryOnScopeDispose(pause);\n  return {\n    isActive,\n    pause,\n    resume\n  };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n  const {\n    controls: exposeControls = false,\n    immediate = true,\n    callback\n  } = options;\n  const counter = ref(0);\n  const update = () => counter.value += 1;\n  const reset = () => {\n    counter.value = 0;\n  };\n  const controls = useIntervalFn(\n    callback ? () => {\n      update();\n      callback(counter.value);\n    } : update,\n    interval,\n    { immediate }\n  );\n  if (exposeControls) {\n    return {\n      counter,\n      reset,\n      ...controls\n    };\n  } else {\n    return counter;\n  }\n}\n\nfunction useLastChanged(source, options = {}) {\n  var _a;\n  const ms = ref((_a = options.initialValue) != null ? _a : null);\n  watch(\n    source,\n    () => ms.value = timestamp(),\n    options\n  );\n  return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n  const {\n    immediate = true\n  } = options;\n  const isPending = ref(false);\n  let timer = null;\n  function clear() {\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n  }\n  function stop() {\n    isPending.value = false;\n    clear();\n  }\n  function start(...args) {\n    clear();\n    isPending.value = true;\n    timer = setTimeout(() => {\n      isPending.value = false;\n      timer = null;\n      cb(...args);\n    }, toValue(interval));\n  }\n  if (immediate) {\n    isPending.value = true;\n    if (isClient)\n      start();\n  }\n  tryOnScopeDispose(stop);\n  return {\n    isPending: readonly(isPending),\n    start,\n    stop\n  };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n  const {\n    controls: exposeControls = false,\n    callback\n  } = options;\n  const controls = useTimeoutFn(\n    callback != null ? callback : noop,\n    interval,\n    options\n  );\n  const ready = computed(() => !controls.isPending.value);\n  if (exposeControls) {\n    return {\n      ready,\n      ...controls\n    };\n  } else {\n    return ready;\n  }\n}\n\nfunction useToNumber(value, options = {}) {\n  const {\n    method = \"parseFloat\",\n    radix,\n    nanToZero\n  } = options;\n  return computed(() => {\n    let resolved = toValue(value);\n    if (typeof resolved === \"string\")\n      resolved = Number[method](resolved, radix);\n    if (nanToZero && Number.isNaN(resolved))\n      resolved = 0;\n    return resolved;\n  });\n}\n\nfunction useToString(value) {\n  return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n  const {\n    truthyValue = true,\n    falsyValue = false\n  } = options;\n  const valueIsRef = isRef(initialValue);\n  const _value = ref(initialValue);\n  function toggle(value) {\n    if (arguments.length) {\n      _value.value = value;\n      return _value.value;\n    } else {\n      const truthy = toValue(truthyValue);\n      _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n      return _value.value;\n    }\n  }\n  if (valueIsRef)\n    return toggle;\n  else\n    return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n  let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n  return watch(source, (newList, _, onCleanup) => {\n    const oldListRemains = Array.from({ length: oldList.length });\n    const added = [];\n    for (const obj of newList) {\n      let found = false;\n      for (let i = 0; i < oldList.length; i++) {\n        if (!oldListRemains[i] && obj === oldList[i]) {\n          oldListRemains[i] = true;\n          found = true;\n          break;\n        }\n      }\n      if (!found)\n        added.push(obj);\n    }\n    const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n    cb(newList, oldList, added, removed, onCleanup);\n    oldList = [...newList];\n  }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n  const {\n    count,\n    ...watchOptions\n  } = options;\n  const current = ref(0);\n  const stop = watchWithFilter(\n    source,\n    (...args) => {\n      current.value += 1;\n      if (current.value >= toValue(count))\n        nextTick(() => stop());\n      cb(...args);\n    },\n    watchOptions\n  );\n  return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n  const {\n    debounce = 0,\n    maxWait = void 0,\n    ...watchOptions\n  } = options;\n  return watchWithFilter(\n    source,\n    cb,\n    {\n      ...watchOptions,\n      eventFilter: debounceFilter(debounce, { maxWait })\n    }\n  );\n}\n\nfunction watchDeep(source, cb, options) {\n  return watch(\n    source,\n    cb,\n    {\n      ...options,\n      deep: true\n    }\n  );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n  const {\n    eventFilter = bypassFilter,\n    ...watchOptions\n  } = options;\n  const filteredCb = createFilterWrapper(\n    eventFilter,\n    cb\n  );\n  let ignoreUpdates;\n  let ignorePrevAsyncUpdates;\n  let stop;\n  if (watchOptions.flush === \"sync\") {\n    const ignore = ref(false);\n    ignorePrevAsyncUpdates = () => {\n    };\n    ignoreUpdates = (updater) => {\n      ignore.value = true;\n      updater();\n      ignore.value = false;\n    };\n    stop = watch(\n      source,\n      (...args) => {\n        if (!ignore.value)\n          filteredCb(...args);\n      },\n      watchOptions\n    );\n  } else {\n    const disposables = [];\n    const ignoreCounter = ref(0);\n    const syncCounter = ref(0);\n    ignorePrevAsyncUpdates = () => {\n      ignoreCounter.value = syncCounter.value;\n    };\n    disposables.push(\n      watch(\n        source,\n        () => {\n          syncCounter.value++;\n        },\n        { ...watchOptions, flush: \"sync\" }\n      )\n    );\n    ignoreUpdates = (updater) => {\n      const syncCounterPrev = syncCounter.value;\n      updater();\n      ignoreCounter.value += syncCounter.value - syncCounterPrev;\n    };\n    disposables.push(\n      watch(\n        source,\n        (...args) => {\n          const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n          ignoreCounter.value = 0;\n          syncCounter.value = 0;\n          if (ignore)\n            return;\n          filteredCb(...args);\n        },\n        watchOptions\n      )\n    );\n    stop = () => {\n      disposables.forEach((fn) => fn());\n    };\n  }\n  return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n  return watch(\n    source,\n    cb,\n    {\n      ...options,\n      immediate: true\n    }\n  );\n}\n\nfunction watchOnce(source, cb, options) {\n  const stop = watch(source, (...args) => {\n    nextTick(() => stop());\n    return cb(...args);\n  }, options);\n  return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n  const {\n    throttle = 0,\n    trailing = true,\n    leading = true,\n    ...watchOptions\n  } = options;\n  return watchWithFilter(\n    source,\n    cb,\n    {\n      ...watchOptions,\n      eventFilter: throttleFilter(throttle, trailing, leading)\n    }\n  );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n  let cleanupFn;\n  function onEffect() {\n    if (!cleanupFn)\n      return;\n    const fn = cleanupFn;\n    cleanupFn = void 0;\n    fn();\n  }\n  function onCleanup(callback) {\n    cleanupFn = callback;\n  }\n  const _cb = (value, oldValue) => {\n    onEffect();\n    return cb(value, oldValue, onCleanup);\n  };\n  const res = watchIgnorable(source, _cb, options);\n  const { ignoreUpdates } = res;\n  const trigger = () => {\n    let res2;\n    ignoreUpdates(() => {\n      res2 = _cb(getWatchSources(source), getOldValue(source));\n    });\n    return res2;\n  };\n  return {\n    ...res,\n    trigger\n  };\n}\nfunction getWatchSources(sources) {\n  if (isReactive(sources))\n    return sources;\n  if (Array.isArray(sources))\n    return sources.map((item) => toValue(item));\n  return toValue(sources);\n}\nfunction getOldValue(source) {\n  return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n  const stop = watch(\n    source,\n    (v, ov, onInvalidate) => {\n      if (v) {\n        if (options == null ? void 0 : options.once)\n          nextTick(() => stop());\n        cb(v, ov, onInvalidate);\n      }\n    },\n    {\n      ...options,\n      once: false\n    }\n  );\n  return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, notNullish, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, whenever, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, isVue2, readonly, reactive, toRaw, nextTick, markRaw, unref, getCurrentScope, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n  let options;\n  if (isRef(optionsOrRef)) {\n    options = {\n      evaluating: optionsOrRef\n    };\n  } else {\n    options = optionsOrRef || {};\n  }\n  const {\n    lazy = false,\n    evaluating = void 0,\n    shallow = true,\n    onError = noop\n  } = options;\n  const started = ref(!lazy);\n  const current = shallow ? shallowRef(initialState) : ref(initialState);\n  let counter = 0;\n  watchEffect(async (onInvalidate) => {\n    if (!started.value)\n      return;\n    counter++;\n    const counterAtBeginning = counter;\n    let hasFinished = false;\n    if (evaluating) {\n      Promise.resolve().then(() => {\n        evaluating.value = true;\n      });\n    }\n    try {\n      const result = await evaluationCallback((cancelCallback) => {\n        onInvalidate(() => {\n          if (evaluating)\n            evaluating.value = false;\n          if (!hasFinished)\n            cancelCallback();\n        });\n      });\n      if (counterAtBeginning === counter)\n        current.value = result;\n    } catch (e) {\n      onError(e);\n    } finally {\n      if (evaluating && counterAtBeginning === counter)\n        evaluating.value = false;\n      hasFinished = true;\n    }\n  });\n  if (lazy) {\n    return computed(() => {\n      started.value = true;\n      return current.value;\n    });\n  } else {\n    return current;\n  }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n  let source = inject(key);\n  if (defaultSource)\n    source = inject(key, defaultSource);\n  if (treatDefaultAsFactory)\n    source = inject(key, defaultSource, treatDefaultAsFactory);\n  if (typeof options === \"function\") {\n    return computed((ctx) => options(source, ctx));\n  } else {\n    return computed({\n      get: (ctx) => options.get(source, ctx),\n      set: options.set\n    });\n  }\n}\n\nfunction createReusableTemplate(options = {}) {\n  if (!isVue3 && !version.startsWith(\"2.7.\")) {\n    if (process.env.NODE_ENV !== \"production\")\n      throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n    return;\n  }\n  const {\n    inheritAttrs = true\n  } = options;\n  const render = shallowRef();\n  const define = /* #__PURE__ */ defineComponent({\n    setup(_, { slots }) {\n      return () => {\n        render.value = slots.default;\n      };\n    }\n  });\n  const reuse = /* #__PURE__ */ defineComponent({\n    inheritAttrs,\n    setup(_, { attrs, slots }) {\n      return () => {\n        var _a;\n        if (!render.value && process.env.NODE_ENV !== \"production\")\n          throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n        const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n        return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n      };\n    }\n  });\n  return makeDestructurable(\n    { define, reuse },\n    [define, reuse]\n  );\n}\nfunction keysToCamelKebabCase(obj) {\n  const newObj = {};\n  for (const key in obj)\n    newObj[camelize(key)] = obj[key];\n  return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n  if (!isVue3) {\n    if (process.env.NODE_ENV !== \"production\")\n      throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n    return;\n  }\n  let index = 0;\n  const instances = ref([]);\n  function create(...args) {\n    const props = shallowReactive({\n      key: index++,\n      args,\n      promise: void 0,\n      resolve: () => {\n      },\n      reject: () => {\n      },\n      isResolving: false,\n      options\n    });\n    instances.value.push(props);\n    props.promise = new Promise((_resolve, _reject) => {\n      props.resolve = (v) => {\n        props.isResolving = true;\n        return _resolve(v);\n      };\n      props.reject = _reject;\n    }).finally(() => {\n      props.promise = void 0;\n      const index2 = instances.value.indexOf(props);\n      if (index2 !== -1)\n        instances.value.splice(index2, 1);\n    });\n    return props.promise;\n  }\n  function start(...args) {\n    if (options.singleton && instances.value.length > 0)\n      return instances.value[0].promise;\n    return create(...args);\n  }\n  const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n    const renderList = () => instances.value.map((props) => {\n      var _a;\n      return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n    });\n    if (options.transition)\n      return () => h(TransitionGroup, options.transition, renderList);\n    return renderList;\n  });\n  component.start = start;\n  return component;\n}\n\nfunction createUnrefFn(fn) {\n  return function(...args) {\n    return fn.apply(this, args.map((i) => toValue(i)));\n  };\n}\n\nfunction unrefElement(elRef) {\n  var _a;\n  const plain = toValue(elRef);\n  return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n  let target;\n  let events;\n  let listeners;\n  let options;\n  if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n    [events, listeners, options] = args;\n    target = defaultWindow;\n  } else {\n    [target, events, listeners, options] = args;\n  }\n  if (!target)\n    return noop;\n  if (!Array.isArray(events))\n    events = [events];\n  if (!Array.isArray(listeners))\n    listeners = [listeners];\n  const cleanups = [];\n  const cleanup = () => {\n    cleanups.forEach((fn) => fn());\n    cleanups.length = 0;\n  };\n  const register = (el, event, listener, options2) => {\n    el.addEventListener(event, listener, options2);\n    return () => el.removeEventListener(event, listener, options2);\n  };\n  const stopWatch = watch(\n    () => [unrefElement(target), toValue(options)],\n    ([el, options2]) => {\n      cleanup();\n      if (!el)\n        return;\n      const optionsClone = isObject(options2) ? { ...options2 } : options2;\n      cleanups.push(\n        ...events.flatMap((event) => {\n          return listeners.map((listener) => register(el, event, listener, optionsClone));\n        })\n      );\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  const stop = () => {\n    stopWatch();\n    cleanup();\n  };\n  tryOnScopeDispose(stop);\n  return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n  const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n  if (!window)\n    return noop;\n  if (isIOS && !_iOSWorkaround) {\n    _iOSWorkaround = true;\n    Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n    window.document.documentElement.addEventListener(\"click\", noop);\n  }\n  let shouldListen = true;\n  const shouldIgnore = (event) => {\n    return ignore.some((target2) => {\n      if (typeof target2 === \"string\") {\n        return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n      } else {\n        const el = unrefElement(target2);\n        return el && (event.target === el || event.composedPath().includes(el));\n      }\n    });\n  };\n  const listener = (event) => {\n    const el = unrefElement(target);\n    if (!el || el === event.target || event.composedPath().includes(el))\n      return;\n    if (event.detail === 0)\n      shouldListen = !shouldIgnore(event);\n    if (!shouldListen) {\n      shouldListen = true;\n      return;\n    }\n    handler(event);\n  };\n  const cleanup = [\n    useEventListener(window, \"click\", listener, { passive: true, capture }),\n    useEventListener(window, \"pointerdown\", (e) => {\n      const el = unrefElement(target);\n      shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n    }, { passive: true }),\n    detectIframe && useEventListener(window, \"blur\", (event) => {\n      setTimeout(() => {\n        var _a;\n        const el = unrefElement(target);\n        if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n          handler(event);\n        }\n      }, 0);\n    })\n  ].filter(Boolean);\n  const stop = () => cleanup.forEach((fn) => fn());\n  return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n  if (typeof keyFilter === \"function\")\n    return keyFilter;\n  else if (typeof keyFilter === \"string\")\n    return (event) => event.key === keyFilter;\n  else if (Array.isArray(keyFilter))\n    return (event) => keyFilter.includes(event.key);\n  return () => true;\n}\nfunction onKeyStroke(...args) {\n  let key;\n  let handler;\n  let options = {};\n  if (args.length === 3) {\n    key = args[0];\n    handler = args[1];\n    options = args[2];\n  } else if (args.length === 2) {\n    if (typeof args[1] === \"object\") {\n      key = true;\n      handler = args[0];\n      options = args[1];\n    } else {\n      key = args[0];\n      handler = args[1];\n    }\n  } else {\n    key = true;\n    handler = args[0];\n  }\n  const {\n    target = defaultWindow,\n    eventName = \"keydown\",\n    passive = false,\n    dedupe = false\n  } = options;\n  const predicate = createKeyPredicate(key);\n  const listener = (e) => {\n    if (e.repeat && toValue(dedupe))\n      return;\n    if (predicate(e))\n      handler(e);\n  };\n  return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n  return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n  return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n  return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n  var _a, _b;\n  const elementRef = computed(() => unrefElement(target));\n  let timeout;\n  let posStart;\n  let startTimestamp;\n  let hasLongPressed = false;\n  function clear() {\n    if (timeout) {\n      clearTimeout(timeout);\n      timeout = void 0;\n    }\n    posStart = void 0;\n    startTimestamp = void 0;\n    hasLongPressed = false;\n  }\n  function onRelease(ev) {\n    var _a2, _b2, _c;\n    const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n    clear();\n    if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n      return;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    const dx = ev.x - _posStart.x;\n    const dy = ev.y - _posStart.y;\n    const distance = Math.sqrt(dx * dx + dy * dy);\n    options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n  }\n  function onDown(ev) {\n    var _a2, _b2, _c, _d;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    clear();\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    posStart = {\n      x: ev.x,\n      y: ev.y\n    };\n    startTimestamp = ev.timeStamp;\n    timeout = setTimeout(\n      () => {\n        hasLongPressed = true;\n        handler(ev);\n      },\n      (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n    );\n  }\n  function onMove(ev) {\n    var _a2, _b2, _c, _d;\n    if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n      return;\n    if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n      return;\n    if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n      ev.preventDefault();\n    if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n      ev.stopPropagation();\n    const dx = ev.x - posStart.x;\n    const dy = ev.y - posStart.y;\n    const distance = Math.sqrt(dx * dx + dy * dy);\n    if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n      clear();\n  }\n  const listenerOptions = {\n    capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n    once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n  };\n  const cleanup = [\n    useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n    useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n    useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n  ];\n  const stop = () => cleanup.forEach((fn) => fn());\n  return stop;\n}\n\nfunction isFocusedElementEditable() {\n  const { activeElement, body } = document;\n  if (!activeElement)\n    return false;\n  if (activeElement === body)\n    return false;\n  switch (activeElement.tagName) {\n    case \"INPUT\":\n    case \"TEXTAREA\":\n      return true;\n  }\n  return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n  keyCode,\n  metaKey,\n  ctrlKey,\n  altKey\n}) {\n  if (metaKey || ctrlKey || altKey)\n    return false;\n  if (keyCode >= 48 && keyCode <= 57)\n    return true;\n  if (keyCode >= 65 && keyCode <= 90)\n    return true;\n  if (keyCode >= 97 && keyCode <= 122)\n    return true;\n  return false;\n}\nfunction onStartTyping(callback, options = {}) {\n  const { document: document2 = defaultDocument } = options;\n  const keydown = (event) => {\n    if (!isFocusedElementEditable() && isTypedCharValid(event)) {\n      callback(event);\n    }\n  };\n  if (document2)\n    useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n  const instance = getCurrentInstance();\n  let _trigger = () => {\n  };\n  const element = customRef((track, trigger) => {\n    _trigger = trigger;\n    return {\n      get() {\n        var _a, _b;\n        track();\n        return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n      },\n      set() {\n      }\n    };\n  });\n  tryOnMounted(_trigger);\n  onUpdated(_trigger);\n  return element;\n}\n\nfunction useMounted() {\n  const isMounted = ref(false);\n  const instance = getCurrentInstance();\n  if (instance) {\n    onMounted(() => {\n      isMounted.value = true;\n    }, isVue2 ? void 0 : instance);\n  }\n  return isMounted;\n}\n\nfunction useSupported(callback) {\n  const isMounted = useMounted();\n  return computed(() => {\n    isMounted.value;\n    return Boolean(callback());\n  });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n  const { window = defaultWindow, ...mutationOptions } = options;\n  let observer;\n  const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n  const cleanup = () => {\n    if (observer) {\n      observer.disconnect();\n      observer = void 0;\n    }\n  };\n  const targets = computed(() => {\n    const value = toValue(target);\n    const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);\n    return new Set(items);\n  });\n  const stopWatch = watch(\n    () => targets.value,\n    (targets2) => {\n      cleanup();\n      if (isSupported.value && targets2.size) {\n        observer = new MutationObserver(callback);\n        targets2.forEach((el) => observer.observe(el, mutationOptions));\n      }\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  const takeRecords = () => {\n    return observer == null ? void 0 : observer.takeRecords();\n  };\n  const stop = () => {\n    stopWatch();\n    cleanup();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop,\n    takeRecords\n  };\n}\n\nfunction useActiveElement(options = {}) {\n  var _a;\n  const {\n    window = defaultWindow,\n    deep = true,\n    triggerOnRemoval = false\n  } = options;\n  const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n  const getDeepActiveElement = () => {\n    var _a2;\n    let element = document == null ? void 0 : document.activeElement;\n    if (deep) {\n      while (element == null ? void 0 : element.shadowRoot)\n        element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n    }\n    return element;\n  };\n  const activeElement = ref();\n  const trigger = () => {\n    activeElement.value = getDeepActiveElement();\n  };\n  if (window) {\n    useEventListener(window, \"blur\", (event) => {\n      if (event.relatedTarget !== null)\n        return;\n      trigger();\n    }, true);\n    useEventListener(window, \"focus\", trigger, true);\n  }\n  if (triggerOnRemoval) {\n    useMutationObserver(document, (mutations) => {\n      mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {\n        if (node === activeElement.value)\n          trigger();\n      });\n    }, {\n      childList: true,\n      subtree: true\n    });\n  }\n  trigger();\n  return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n  const {\n    immediate = true,\n    fpsLimit = void 0,\n    window = defaultWindow\n  } = options;\n  const isActive = ref(false);\n  const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n  let previousFrameTimestamp = 0;\n  let rafId = null;\n  function loop(timestamp) {\n    if (!isActive.value || !window)\n      return;\n    if (!previousFrameTimestamp)\n      previousFrameTimestamp = timestamp;\n    const delta = timestamp - previousFrameTimestamp;\n    if (intervalLimit && delta < intervalLimit) {\n      rafId = window.requestAnimationFrame(loop);\n      return;\n    }\n    previousFrameTimestamp = timestamp;\n    fn({ delta, timestamp });\n    rafId = window.requestAnimationFrame(loop);\n  }\n  function resume() {\n    if (!isActive.value && window) {\n      isActive.value = true;\n      previousFrameTimestamp = 0;\n      rafId = window.requestAnimationFrame(loop);\n    }\n  }\n  function pause() {\n    isActive.value = false;\n    if (rafId != null && window) {\n      window.cancelAnimationFrame(rafId);\n      rafId = null;\n    }\n  }\n  if (immediate)\n    resume();\n  tryOnScopeDispose(pause);\n  return {\n    isActive: readonly(isActive),\n    pause,\n    resume\n  };\n}\n\nfunction useAnimate(target, keyframes, options) {\n  let config;\n  let animateOptions;\n  if (isObject(options)) {\n    config = options;\n    animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n  } else {\n    config = { duration: options };\n    animateOptions = options;\n  }\n  const {\n    window = defaultWindow,\n    immediate = true,\n    commitStyles,\n    persist,\n    playbackRate: _playbackRate = 1,\n    onReady,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = config;\n  const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n  const animate = shallowRef(void 0);\n  const store = shallowReactive({\n    startTime: null,\n    currentTime: null,\n    timeline: null,\n    playbackRate: _playbackRate,\n    pending: false,\n    playState: immediate ? \"idle\" : \"paused\",\n    replaceState: \"active\"\n  });\n  const pending = computed(() => store.pending);\n  const playState = computed(() => store.playState);\n  const replaceState = computed(() => store.replaceState);\n  const startTime = computed({\n    get() {\n      return store.startTime;\n    },\n    set(value) {\n      store.startTime = value;\n      if (animate.value)\n        animate.value.startTime = value;\n    }\n  });\n  const currentTime = computed({\n    get() {\n      return store.currentTime;\n    },\n    set(value) {\n      store.currentTime = value;\n      if (animate.value) {\n        animate.value.currentTime = value;\n        syncResume();\n      }\n    }\n  });\n  const timeline = computed({\n    get() {\n      return store.timeline;\n    },\n    set(value) {\n      store.timeline = value;\n      if (animate.value)\n        animate.value.timeline = value;\n    }\n  });\n  const playbackRate = computed({\n    get() {\n      return store.playbackRate;\n    },\n    set(value) {\n      store.playbackRate = value;\n      if (animate.value)\n        animate.value.playbackRate = value;\n    }\n  });\n  const play = () => {\n    if (animate.value) {\n      try {\n        animate.value.play();\n        syncResume();\n      } catch (e) {\n        syncPause();\n        onError(e);\n      }\n    } else {\n      update();\n    }\n  };\n  const pause = () => {\n    var _a;\n    try {\n      (_a = animate.value) == null ? void 0 : _a.pause();\n      syncPause();\n    } catch (e) {\n      onError(e);\n    }\n  };\n  const reverse = () => {\n    var _a;\n    if (!animate.value)\n      update();\n    try {\n      (_a = animate.value) == null ? void 0 : _a.reverse();\n      syncResume();\n    } catch (e) {\n      syncPause();\n      onError(e);\n    }\n  };\n  const finish = () => {\n    var _a;\n    try {\n      (_a = animate.value) == null ? void 0 : _a.finish();\n      syncPause();\n    } catch (e) {\n      onError(e);\n    }\n  };\n  const cancel = () => {\n    var _a;\n    try {\n      (_a = animate.value) == null ? void 0 : _a.cancel();\n      syncPause();\n    } catch (e) {\n      onError(e);\n    }\n  };\n  watch(() => unrefElement(target), (el) => {\n    if (el)\n      update();\n  });\n  watch(() => keyframes, (value) => {\n    if (animate.value)\n      update();\n    if (!unrefElement(target) && animate.value) {\n      animate.value.effect = new KeyframeEffect(\n        unrefElement(target),\n        toValue(value),\n        animateOptions\n      );\n    }\n  }, { deep: true });\n  tryOnMounted(() => update(true), false);\n  tryOnScopeDispose(cancel);\n  function update(init) {\n    const el = unrefElement(target);\n    if (!isSupported.value || !el)\n      return;\n    if (!animate.value)\n      animate.value = el.animate(toValue(keyframes), animateOptions);\n    if (persist)\n      animate.value.persist();\n    if (_playbackRate !== 1)\n      animate.value.playbackRate = _playbackRate;\n    if (init && !immediate)\n      animate.value.pause();\n    else\n      syncResume();\n    onReady == null ? void 0 : onReady(animate.value);\n  }\n  useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n  useEventListener(animate, \"finish\", () => {\n    var _a;\n    if (commitStyles)\n      (_a = animate.value) == null ? void 0 : _a.commitStyles();\n  });\n  const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n    if (!animate.value)\n      return;\n    store.pending = animate.value.pending;\n    store.playState = animate.value.playState;\n    store.replaceState = animate.value.replaceState;\n    store.startTime = animate.value.startTime;\n    store.currentTime = animate.value.currentTime;\n    store.timeline = animate.value.timeline;\n    store.playbackRate = animate.value.playbackRate;\n  }, { immediate: false });\n  function syncResume() {\n    if (isSupported.value)\n      resumeRef();\n  }\n  function syncPause() {\n    if (isSupported.value && window)\n      window.requestAnimationFrame(pauseRef);\n  }\n  return {\n    isSupported,\n    animate,\n    // actions\n    play,\n    pause,\n    reverse,\n    finish,\n    cancel,\n    // state\n    pending,\n    playState,\n    replaceState,\n    startTime,\n    currentTime,\n    timeline,\n    playbackRate\n  };\n}\n\nfunction useAsyncQueue(tasks, options) {\n  const {\n    interrupt = true,\n    onError = noop,\n    onFinished = noop,\n    signal\n  } = options || {};\n  const promiseState = {\n    aborted: \"aborted\",\n    fulfilled: \"fulfilled\",\n    pending: \"pending\",\n    rejected: \"rejected\"\n  };\n  const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n  const result = reactive(initialResult);\n  const activeIndex = ref(-1);\n  if (!tasks || tasks.length === 0) {\n    onFinished();\n    return {\n      activeIndex,\n      result\n    };\n  }\n  function updateResult(state, res) {\n    activeIndex.value++;\n    result[activeIndex.value].data = res;\n    result[activeIndex.value].state = state;\n  }\n  tasks.reduce((prev, curr) => {\n    return prev.then((prevRes) => {\n      var _a;\n      if (signal == null ? void 0 : signal.aborted) {\n        updateResult(promiseState.aborted, new Error(\"aborted\"));\n        return;\n      }\n      if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n        onFinished();\n        return;\n      }\n      const done = curr(prevRes).then((currentRes) => {\n        updateResult(promiseState.fulfilled, currentRes);\n        if (activeIndex.value === tasks.length - 1)\n          onFinished();\n        return currentRes;\n      });\n      if (!signal)\n        return done;\n      return Promise.race([done, whenAborted(signal)]);\n    }).catch((e) => {\n      if (signal == null ? void 0 : signal.aborted) {\n        updateResult(promiseState.aborted, e);\n        return e;\n      }\n      updateResult(promiseState.rejected, e);\n      onError();\n      return e;\n    });\n  }, Promise.resolve());\n  return {\n    activeIndex,\n    result\n  };\n}\nfunction whenAborted(signal) {\n  return new Promise((resolve, reject) => {\n    const error = new Error(\"aborted\");\n    if (signal.aborted)\n      reject(error);\n    else\n      signal.addEventListener(\"abort\", () => reject(error), { once: true });\n  });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n  const {\n    immediate = true,\n    delay = 0,\n    onError = noop,\n    onSuccess = noop,\n    resetOnExecute = true,\n    shallow = true,\n    throwError\n  } = options != null ? options : {};\n  const state = shallow ? shallowRef(initialState) : ref(initialState);\n  const isReady = ref(false);\n  const isLoading = ref(false);\n  const error = shallowRef(void 0);\n  async function execute(delay2 = 0, ...args) {\n    if (resetOnExecute)\n      state.value = initialState;\n    error.value = void 0;\n    isReady.value = false;\n    isLoading.value = true;\n    if (delay2 > 0)\n      await promiseTimeout(delay2);\n    const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n    try {\n      const data = await _promise;\n      state.value = data;\n      isReady.value = true;\n      onSuccess(data);\n    } catch (e) {\n      error.value = e;\n      onError(e);\n      if (throwError)\n        throw e;\n    } finally {\n      isLoading.value = false;\n    }\n    return state.value;\n  }\n  if (immediate)\n    execute(delay);\n  const shell = {\n    state,\n    isReady,\n    isLoading,\n    error,\n    execute\n  };\n  function waitUntilIsLoaded() {\n    return new Promise((resolve, reject) => {\n      until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n    });\n  }\n  return {\n    ...shell,\n    then(onFulfilled, onRejected) {\n      return waitUntilIsLoaded().then(onFulfilled, onRejected);\n    }\n  };\n}\n\nconst defaults = {\n  array: (v) => JSON.stringify(v),\n  object: (v) => JSON.stringify(v),\n  set: (v) => JSON.stringify(Array.from(v)),\n  map: (v) => JSON.stringify(Object.fromEntries(v)),\n  null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n  if (!target)\n    return defaults.null;\n  if (target instanceof Map)\n    return defaults.map;\n  else if (target instanceof Set)\n    return defaults.set;\n  else if (Array.isArray(target))\n    return defaults.array;\n  else\n    return defaults.object;\n}\n\nfunction useBase64(target, options) {\n  const base64 = ref(\"\");\n  const promise = ref();\n  function execute() {\n    if (!isClient)\n      return;\n    promise.value = new Promise((resolve, reject) => {\n      try {\n        const _target = toValue(target);\n        if (_target == null) {\n          resolve(\"\");\n        } else if (typeof _target === \"string\") {\n          resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n        } else if (_target instanceof Blob) {\n          resolve(blobToBase64(_target));\n        } else if (_target instanceof ArrayBuffer) {\n          resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n        } else if (_target instanceof HTMLCanvasElement) {\n          resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n        } else if (_target instanceof HTMLImageElement) {\n          const img = _target.cloneNode(false);\n          img.crossOrigin = \"Anonymous\";\n          imgLoaded(img).then(() => {\n            const canvas = document.createElement(\"canvas\");\n            const ctx = canvas.getContext(\"2d\");\n            canvas.width = img.width;\n            canvas.height = img.height;\n            ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n            resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n          }).catch(reject);\n        } else if (typeof _target === \"object\") {\n          const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n          const serialized = _serializeFn(_target);\n          return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n        } else {\n          reject(new Error(\"target is unsupported types\"));\n        }\n      } catch (error) {\n        reject(error);\n      }\n    });\n    promise.value.then((res) => base64.value = res);\n    return promise.value;\n  }\n  if (isRef(target) || typeof target === \"function\")\n    watch(target, execute, { immediate: true });\n  else\n    execute();\n  return {\n    base64,\n    promise,\n    execute\n  };\n}\nfunction imgLoaded(img) {\n  return new Promise((resolve, reject) => {\n    if (!img.complete) {\n      img.onload = () => {\n        resolve();\n      };\n      img.onerror = reject;\n    } else {\n      resolve();\n    }\n  });\n}\nfunction blobToBase64(blob) {\n  return new Promise((resolve, reject) => {\n    const fr = new FileReader();\n    fr.onload = (e) => {\n      resolve(e.target.result);\n    };\n    fr.onerror = reject;\n    fr.readAsDataURL(blob);\n  });\n}\n\nfunction useBattery(options = {}) {\n  const { navigator = defaultNavigator } = options;\n  const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n  const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n  const charging = ref(false);\n  const chargingTime = ref(0);\n  const dischargingTime = ref(0);\n  const level = ref(1);\n  let battery;\n  function updateBatteryInfo() {\n    charging.value = this.charging;\n    chargingTime.value = this.chargingTime || 0;\n    dischargingTime.value = this.dischargingTime || 0;\n    level.value = this.level;\n  }\n  if (isSupported.value) {\n    navigator.getBattery().then((_battery) => {\n      battery = _battery;\n      updateBatteryInfo.call(battery);\n      useEventListener(battery, events, updateBatteryInfo, { passive: true });\n    });\n  }\n  return {\n    isSupported,\n    charging,\n    chargingTime,\n    dischargingTime,\n    level\n  };\n}\n\nfunction useBluetooth(options) {\n  let {\n    acceptAllDevices = false\n  } = options || {};\n  const {\n    filters = void 0,\n    optionalServices = void 0,\n    navigator = defaultNavigator\n  } = options || {};\n  const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n  const device = shallowRef(void 0);\n  const error = shallowRef(null);\n  watch(device, () => {\n    connectToBluetoothGATTServer();\n  });\n  async function requestDevice() {\n    if (!isSupported.value)\n      return;\n    error.value = null;\n    if (filters && filters.length > 0)\n      acceptAllDevices = false;\n    try {\n      device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n        acceptAllDevices,\n        filters,\n        optionalServices\n      }));\n    } catch (err) {\n      error.value = err;\n    }\n  }\n  const server = ref();\n  const isConnected = computed(() => {\n    var _a;\n    return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n  });\n  async function connectToBluetoothGATTServer() {\n    error.value = null;\n    if (device.value && device.value.gatt) {\n      device.value.addEventListener(\"gattserverdisconnected\", () => {\n      });\n      try {\n        server.value = await device.value.gatt.connect();\n      } catch (err) {\n        error.value = err;\n      }\n    }\n  }\n  tryOnMounted(() => {\n    var _a;\n    if (device.value)\n      (_a = device.value.gatt) == null ? void 0 : _a.connect();\n  });\n  tryOnScopeDispose(() => {\n    var _a;\n    if (device.value)\n      (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n  });\n  return {\n    isSupported,\n    isConnected,\n    // Device:\n    device,\n    requestDevice,\n    // Server:\n    server,\n    // Errors:\n    error\n  };\n}\n\nfunction useMediaQuery(query, options = {}) {\n  const { window = defaultWindow } = options;\n  const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n  let mediaQuery;\n  const matches = ref(false);\n  const handler = (event) => {\n    matches.value = event.matches;\n  };\n  const cleanup = () => {\n    if (!mediaQuery)\n      return;\n    if (\"removeEventListener\" in mediaQuery)\n      mediaQuery.removeEventListener(\"change\", handler);\n    else\n      mediaQuery.removeListener(handler);\n  };\n  const stopWatch = watchEffect(() => {\n    if (!isSupported.value)\n      return;\n    cleanup();\n    mediaQuery = window.matchMedia(toValue(query));\n    if (\"addEventListener\" in mediaQuery)\n      mediaQuery.addEventListener(\"change\", handler);\n    else\n      mediaQuery.addListener(handler);\n    matches.value = mediaQuery.matches;\n  });\n  tryOnScopeDispose(() => {\n    stopWatch();\n    cleanup();\n    mediaQuery = void 0;\n  });\n  return matches;\n}\n\nconst breakpointsTailwind = {\n  \"sm\": 640,\n  \"md\": 768,\n  \"lg\": 1024,\n  \"xl\": 1280,\n  \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n  xs: 0,\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200,\n  xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n  xs: 0,\n  sm: 600,\n  md: 960,\n  lg: 1264,\n  xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n  xs: 0,\n  sm: 600,\n  md: 960,\n  lg: 1280,\n  xl: 1920,\n  xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n  xs: 480,\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200,\n  xxl: 1600\n};\nconst breakpointsQuasar = {\n  xs: 0,\n  sm: 600,\n  md: 1024,\n  lg: 1440,\n  xl: 1920\n};\nconst breakpointsSematic = {\n  mobileS: 320,\n  mobileM: 375,\n  mobileL: 425,\n  tablet: 768,\n  laptop: 1024,\n  laptopL: 1440,\n  desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n  \"3xs\": 360,\n  \"2xs\": 480,\n  \"xs\": 600,\n  \"sm\": 768,\n  \"md\": 1024,\n  \"lg\": 1280,\n  \"xl\": 1440,\n  \"2xl\": 1600,\n  \"3xl\": 1920,\n  \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n  sm: 576,\n  md: 768,\n  lg: 992,\n  xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n  function getValue(k, delta) {\n    let v = toValue(breakpoints[toValue(k)]);\n    if (delta != null)\n      v = increaseWithUnit(v, delta);\n    if (typeof v === \"number\")\n      v = `${v}px`;\n    return v;\n  }\n  const { window = defaultWindow, strategy = \"min-width\" } = options;\n  function match(query) {\n    if (!window)\n      return false;\n    return window.matchMedia(query).matches;\n  }\n  const greaterOrEqual = (k) => {\n    return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n  };\n  const smallerOrEqual = (k) => {\n    return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n  };\n  const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n    Object.defineProperty(shortcuts, k, {\n      get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n      enumerable: true,\n      configurable: true\n    });\n    return shortcuts;\n  }, {});\n  function current() {\n    const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n    return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n  }\n  return Object.assign(shortcutMethods, {\n    greaterOrEqual,\n    smallerOrEqual,\n    greater(k) {\n      return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n    },\n    smaller(k) {\n      return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n    },\n    between(a, b) {\n      return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n    },\n    isGreater(k) {\n      return match(`(min-width: ${getValue(k, 0.1)})`);\n    },\n    isGreaterOrEqual(k) {\n      return match(`(min-width: ${getValue(k)})`);\n    },\n    isSmaller(k) {\n      return match(`(max-width: ${getValue(k, -0.1)})`);\n    },\n    isSmallerOrEqual(k) {\n      return match(`(max-width: ${getValue(k)})`);\n    },\n    isInBetween(a, b) {\n      return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n    },\n    current,\n    active() {\n      const bps = current();\n      return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(-1));\n    }\n  });\n}\n\nfunction useBroadcastChannel(options) {\n  const {\n    name,\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n  const isClosed = ref(false);\n  const channel = ref();\n  const data = ref();\n  const error = shallowRef(null);\n  const post = (data2) => {\n    if (channel.value)\n      channel.value.postMessage(data2);\n  };\n  const close = () => {\n    if (channel.value)\n      channel.value.close();\n    isClosed.value = true;\n  };\n  if (isSupported.value) {\n    tryOnMounted(() => {\n      error.value = null;\n      channel.value = new BroadcastChannel(name);\n      channel.value.addEventListener(\"message\", (e) => {\n        data.value = e.data;\n      }, { passive: true });\n      channel.value.addEventListener(\"messageerror\", (e) => {\n        error.value = e;\n      }, { passive: true });\n      channel.value.addEventListener(\"close\", () => {\n        isClosed.value = true;\n      });\n    });\n  }\n  tryOnScopeDispose(() => {\n    close();\n  });\n  return {\n    isSupported,\n    channel,\n    data,\n    post,\n    close,\n    error,\n    isClosed\n  };\n}\n\nconst WRITABLE_PROPERTIES = [\n  \"hash\",\n  \"host\",\n  \"hostname\",\n  \"href\",\n  \"pathname\",\n  \"port\",\n  \"protocol\",\n  \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n  const { window = defaultWindow } = options;\n  const refs = Object.fromEntries(\n    WRITABLE_PROPERTIES.map((key) => [key, ref()])\n  );\n  for (const [key, ref2] of objectEntries(refs)) {\n    watch(ref2, (value) => {\n      if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n        return;\n      window.location[key] = value;\n    });\n  }\n  const buildState = (trigger) => {\n    var _a;\n    const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n    const { origin } = (window == null ? void 0 : window.location) || {};\n    for (const key of WRITABLE_PROPERTIES)\n      refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n    return reactive({\n      trigger,\n      state: state2,\n      length,\n      origin,\n      ...refs\n    });\n  };\n  const state = ref(buildState(\"load\"));\n  if (window) {\n    useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n    useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n  }\n  return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n  const cachedValue = ref(refValue.value);\n  watch(() => refValue.value, (value) => {\n    if (!comparator(value, cachedValue.value))\n      cachedValue.value = value;\n  }, watchOptions);\n  return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n  const {\n    controls = false,\n    navigator = defaultNavigator\n  } = options;\n  const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n  const permissionStatus = shallowRef();\n  const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n  const state = shallowRef();\n  const update = () => {\n    var _a, _b;\n    state.value = (_b = (_a = permissionStatus.value) == null ? void 0 : _a.state) != null ? _b : \"prompt\";\n  };\n  useEventListener(permissionStatus, \"change\", update);\n  const query = createSingletonPromise(async () => {\n    if (!isSupported.value)\n      return;\n    if (!permissionStatus.value) {\n      try {\n        permissionStatus.value = await navigator.permissions.query(desc);\n      } catch (e) {\n        permissionStatus.value = void 0;\n      } finally {\n        update();\n      }\n    }\n    if (controls)\n      return toRaw(permissionStatus.value);\n  });\n  query();\n  if (controls) {\n    return {\n      state,\n      isSupported,\n      query\n    };\n  } else {\n    return state;\n  }\n}\n\nfunction useClipboard(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    read = false,\n    source,\n    copiedDuring = 1500,\n    legacy = false\n  } = options;\n  const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n  const permissionRead = usePermission(\"clipboard-read\");\n  const permissionWrite = usePermission(\"clipboard-write\");\n  const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n  const text = ref(\"\");\n  const copied = ref(false);\n  const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n  function updateText() {\n    if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {\n      navigator.clipboard.readText().then((value) => {\n        text.value = value;\n      });\n    } else {\n      text.value = legacyRead();\n    }\n  }\n  if (isSupported.value && read)\n    useEventListener([\"copy\", \"cut\"], updateText);\n  async function copy(value = toValue(source)) {\n    if (isSupported.value && value != null) {\n      if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))\n        await navigator.clipboard.writeText(value);\n      else\n        legacyCopy(value);\n      text.value = value;\n      copied.value = true;\n      timeout.start();\n    }\n  }\n  function legacyCopy(value) {\n    const ta = document.createElement(\"textarea\");\n    ta.value = value != null ? value : \"\";\n    ta.style.position = \"absolute\";\n    ta.style.opacity = \"0\";\n    document.body.appendChild(ta);\n    ta.select();\n    document.execCommand(\"copy\");\n    ta.remove();\n  }\n  function legacyRead() {\n    var _a, _b, _c;\n    return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n  }\n  function isAllowed(status) {\n    return status === \"granted\" || status === \"prompt\";\n  }\n  return {\n    isSupported,\n    text,\n    copied,\n    copy\n  };\n}\n\nfunction useClipboardItems(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    read = false,\n    source,\n    copiedDuring = 1500\n  } = options;\n  const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n  const content = ref([]);\n  const copied = ref(false);\n  const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n  function updateContent() {\n    if (isSupported.value) {\n      navigator.clipboard.read().then((items) => {\n        content.value = items;\n      });\n    }\n  }\n  if (isSupported.value && read)\n    useEventListener([\"copy\", \"cut\"], updateContent);\n  async function copy(value = toValue(source)) {\n    if (isSupported.value && value != null) {\n      await navigator.clipboard.write(value);\n      content.value = value;\n      copied.value = true;\n      timeout.start();\n    }\n  }\n  return {\n    isSupported,\n    content,\n    copied,\n    copy\n  };\n}\n\nfunction cloneFnJSON(source) {\n  return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n  const cloned = ref({});\n  const {\n    manual,\n    clone = cloneFnJSON,\n    // watch options\n    deep = true,\n    immediate = true\n  } = options;\n  function sync() {\n    cloned.value = clone(toValue(source));\n  }\n  if (!manual && (isRef(source) || typeof source === \"function\")) {\n    watch(source, sync, {\n      ...options,\n      deep,\n      immediate\n    });\n  } else {\n    sync();\n  }\n  return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n  if (!(globalKey in _global))\n    _global[globalKey] = _global[globalKey] || {};\n  return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n  return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n  handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n  return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n  boolean: {\n    read: (v) => v === \"true\",\n    write: (v) => String(v)\n  },\n  object: {\n    read: (v) => JSON.parse(v),\n    write: (v) => JSON.stringify(v)\n  },\n  number: {\n    read: (v) => Number.parseFloat(v),\n    write: (v) => String(v)\n  },\n  any: {\n    read: (v) => v,\n    write: (v) => String(v)\n  },\n  string: {\n    read: (v) => v,\n    write: (v) => String(v)\n  },\n  map: {\n    read: (v) => new Map(JSON.parse(v)),\n    write: (v) => JSON.stringify(Array.from(v.entries()))\n  },\n  set: {\n    read: (v) => new Set(JSON.parse(v)),\n    write: (v) => JSON.stringify(Array.from(v))\n  },\n  date: {\n    read: (v) => new Date(v),\n    write: (v) => v.toISOString()\n  }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n  var _a;\n  const {\n    flush = \"pre\",\n    deep = true,\n    listenToStorageChanges = true,\n    writeDefaults = true,\n    mergeDefaults = false,\n    shallow,\n    window = defaultWindow,\n    eventFilter,\n    onError = (e) => {\n      console.error(e);\n    },\n    initOnMounted\n  } = options;\n  const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n  if (!storage) {\n    try {\n      storage = getSSRHandler(\"getDefaultStorage\", () => {\n        var _a2;\n        return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n      })();\n    } catch (e) {\n      onError(e);\n    }\n  }\n  if (!storage)\n    return data;\n  const rawInit = toValue(defaults);\n  const type = guessSerializerType(rawInit);\n  const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n  const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n    data,\n    () => write(data.value),\n    { flush, deep, eventFilter }\n  );\n  if (window && listenToStorageChanges) {\n    tryOnMounted(() => {\n      if (storage instanceof Storage)\n        useEventListener(window, \"storage\", update);\n      else\n        useEventListener(window, customStorageEventName, updateFromCustomEvent);\n      if (initOnMounted)\n        update();\n    });\n  }\n  if (!initOnMounted)\n    update();\n  function dispatchWriteEvent(oldValue, newValue) {\n    if (window) {\n      const payload = {\n        key,\n        oldValue,\n        newValue,\n        storageArea: storage\n      };\n      window.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, {\n        detail: payload\n      }));\n    }\n  }\n  function write(v) {\n    try {\n      const oldValue = storage.getItem(key);\n      if (v == null) {\n        dispatchWriteEvent(oldValue, null);\n        storage.removeItem(key);\n      } else {\n        const serialized = serializer.write(v);\n        if (oldValue !== serialized) {\n          storage.setItem(key, serialized);\n          dispatchWriteEvent(oldValue, serialized);\n        }\n      }\n    } catch (e) {\n      onError(e);\n    }\n  }\n  function read(event) {\n    const rawValue = event ? event.newValue : storage.getItem(key);\n    if (rawValue == null) {\n      if (writeDefaults && rawInit != null)\n        storage.setItem(key, serializer.write(rawInit));\n      return rawInit;\n    } else if (!event && mergeDefaults) {\n      const value = serializer.read(rawValue);\n      if (typeof mergeDefaults === \"function\")\n        return mergeDefaults(value, rawInit);\n      else if (type === \"object\" && !Array.isArray(value))\n        return { ...rawInit, ...value };\n      return value;\n    } else if (typeof rawValue !== \"string\") {\n      return rawValue;\n    } else {\n      return serializer.read(rawValue);\n    }\n  }\n  function update(event) {\n    if (event && event.storageArea !== storage)\n      return;\n    if (event && event.key == null) {\n      data.value = rawInit;\n      return;\n    }\n    if (event && event.key !== key)\n      return;\n    pauseWatch();\n    try {\n      if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n        data.value = read(event);\n    } catch (e) {\n      onError(e);\n    } finally {\n      if (event)\n        nextTick(resumeWatch);\n      else\n        resumeWatch();\n    }\n  }\n  function updateFromCustomEvent(event) {\n    update(event.detail);\n  }\n  return data;\n}\n\nfunction usePreferredDark(options) {\n  return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\nfunction useColorMode(options = {}) {\n  const {\n    selector = \"html\",\n    attribute = \"class\",\n    initialValue = \"auto\",\n    window = defaultWindow,\n    storage,\n    storageKey = \"vueuse-color-scheme\",\n    listenToStorageChanges = true,\n    storageRef,\n    emitAuto,\n    disableTransition = true\n  } = options;\n  const modes = {\n    auto: \"\",\n    light: \"light\",\n    dark: \"dark\",\n    ...options.modes || {}\n  };\n  const preferredDark = usePreferredDark({ window });\n  const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n  const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n  const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n  const updateHTMLAttrs = getSSRHandler(\n    \"updateHTMLAttrs\",\n    (selector2, attribute2, value) => {\n      const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n      if (!el)\n        return;\n      const classesToAdd = /* @__PURE__ */ new Set();\n      const classesToRemove = /* @__PURE__ */ new Set();\n      let attributeToChange = null;\n      if (attribute2 === \"class\") {\n        const current = value.split(/\\s/g);\n        Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n          if (current.includes(v))\n            classesToAdd.add(v);\n          else\n            classesToRemove.add(v);\n        });\n      } else {\n        attributeToChange = { key: attribute2, value };\n      }\n      if (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null)\n        return;\n      let style;\n      if (disableTransition) {\n        style = window.document.createElement(\"style\");\n        style.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n        window.document.head.appendChild(style);\n      }\n      for (const c of classesToAdd) {\n        el.classList.add(c);\n      }\n      for (const c of classesToRemove) {\n        el.classList.remove(c);\n      }\n      if (attributeToChange) {\n        el.setAttribute(attributeToChange.key, attributeToChange.value);\n      }\n      if (disableTransition) {\n        window.getComputedStyle(style).opacity;\n        document.head.removeChild(style);\n      }\n    }\n  );\n  function defaultOnChanged(mode) {\n    var _a;\n    updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n  }\n  function onChanged(mode) {\n    if (options.onChanged)\n      options.onChanged(mode, defaultOnChanged);\n    else\n      defaultOnChanged(mode);\n  }\n  watch(state, onChanged, { flush: \"post\", immediate: true });\n  tryOnMounted(() => onChanged(state.value));\n  const auto = computed({\n    get() {\n      return emitAuto ? store.value : state.value;\n    },\n    set(v) {\n      store.value = v;\n    }\n  });\n  try {\n    return Object.assign(auto, { store, system, state });\n  } catch (e) {\n    return auto;\n  }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n  const confirmHook = createEventHook();\n  const cancelHook = createEventHook();\n  const revealHook = createEventHook();\n  let _resolve = noop;\n  const reveal = (data) => {\n    revealHook.trigger(data);\n    revealed.value = true;\n    return new Promise((resolve) => {\n      _resolve = resolve;\n    });\n  };\n  const confirm = (data) => {\n    revealed.value = false;\n    confirmHook.trigger(data);\n    _resolve({ data, isCanceled: false });\n  };\n  const cancel = (data) => {\n    revealed.value = false;\n    cancelHook.trigger(data);\n    _resolve({ data, isCanceled: true });\n  };\n  return {\n    isRevealed: computed(() => revealed.value),\n    reveal,\n    confirm,\n    cancel,\n    onReveal: revealHook.on,\n    onConfirm: confirmHook.on,\n    onCancel: cancelHook.on\n  };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n  const { window = defaultWindow, initialValue, observe = false } = options;\n  const variable = ref(initialValue);\n  const elRef = computed(() => {\n    var _a;\n    return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n  });\n  function updateCssVar() {\n    var _a;\n    const key = toValue(prop);\n    const el = toValue(elRef);\n    if (el && window && key) {\n      const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n      variable.value = value || initialValue;\n    }\n  }\n  if (observe) {\n    useMutationObserver(elRef, updateCssVar, {\n      attributeFilter: [\"style\", \"class\"],\n      window\n    });\n  }\n  watch(\n    [elRef, () => toValue(prop)],\n    (_, old) => {\n      if (old[0] && old[1])\n        old[0].style.removeProperty(old[1]);\n      updateCssVar();\n    },\n    { immediate: true }\n  );\n  watch(\n    variable,\n    (val) => {\n      var _a;\n      const raw_prop = toValue(prop);\n      if (((_a = elRef.value) == null ? void 0 : _a.style) && raw_prop) {\n        if (val == null)\n          elRef.value.style.removeProperty(raw_prop);\n        else\n          elRef.value.style.setProperty(raw_prop, val);\n      }\n    }\n  );\n  return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n  const vm = getCurrentInstance();\n  const currentElement = computedWithControl(\n    () => null,\n    () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n  );\n  onUpdated(currentElement.trigger);\n  onMounted(currentElement.trigger);\n  return currentElement;\n}\n\nfunction useCycleList(list, options) {\n  const state = shallowRef(getInitialValue());\n  const listRef = toRef(list);\n  const index = computed({\n    get() {\n      var _a;\n      const targetList = listRef.value;\n      let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n      if (index2 < 0)\n        index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n      return index2;\n    },\n    set(v) {\n      set(v);\n    }\n  });\n  function set(i) {\n    const targetList = listRef.value;\n    const length = targetList.length;\n    const index2 = (i % length + length) % length;\n    const value = targetList[index2];\n    state.value = value;\n    return value;\n  }\n  function shift(delta = 1) {\n    return set(index.value + delta);\n  }\n  function next(n = 1) {\n    return shift(n);\n  }\n  function prev(n = 1) {\n    return shift(-n);\n  }\n  function getInitialValue() {\n    var _a, _b;\n    return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n  }\n  watch(listRef, () => set(index.value));\n  return {\n    state,\n    index,\n    next,\n    prev,\n    go: set\n  };\n}\n\nfunction useDark(options = {}) {\n  const {\n    valueDark = \"dark\",\n    valueLight = \"\",\n    window = defaultWindow\n  } = options;\n  const mode = useColorMode({\n    ...options,\n    onChanged: (mode2, defaultHandler) => {\n      var _a;\n      if (options.onChanged)\n        (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n      else\n        defaultHandler(mode2);\n    },\n    modes: {\n      dark: valueDark,\n      light: valueLight\n    }\n  });\n  const system = computed(() => {\n    if (mode.system) {\n      return mode.system.value;\n    } else {\n      const preferredDark = usePreferredDark({ window });\n      return preferredDark.value ? \"dark\" : \"light\";\n    }\n  });\n  const isDark = computed({\n    get() {\n      return mode.value === \"dark\";\n    },\n    set(v) {\n      const modeVal = v ? \"dark\" : \"light\";\n      if (system.value === modeVal)\n        mode.value = \"auto\";\n      else\n        mode.value = modeVal;\n    }\n  });\n  return isDark;\n}\n\nfunction fnBypass(v) {\n  return v;\n}\nfunction fnSetSource(source, value) {\n  return source.value = value;\n}\nfunction defaultDump(clone) {\n  return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n  return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n  const {\n    clone = false,\n    dump = defaultDump(clone),\n    parse = defaultParse(clone),\n    setSource = fnSetSource\n  } = options;\n  function _createHistoryRecord() {\n    return markRaw({\n      snapshot: dump(source.value),\n      timestamp: timestamp()\n    });\n  }\n  const last = ref(_createHistoryRecord());\n  const undoStack = ref([]);\n  const redoStack = ref([]);\n  const _setSource = (record) => {\n    setSource(source, parse(record.snapshot));\n    last.value = record;\n  };\n  const commit = () => {\n    undoStack.value.unshift(last.value);\n    last.value = _createHistoryRecord();\n    if (options.capacity && undoStack.value.length > options.capacity)\n      undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n    if (redoStack.value.length)\n      redoStack.value.splice(0, redoStack.value.length);\n  };\n  const clear = () => {\n    undoStack.value.splice(0, undoStack.value.length);\n    redoStack.value.splice(0, redoStack.value.length);\n  };\n  const undo = () => {\n    const state = undoStack.value.shift();\n    if (state) {\n      redoStack.value.unshift(last.value);\n      _setSource(state);\n    }\n  };\n  const redo = () => {\n    const state = redoStack.value.shift();\n    if (state) {\n      undoStack.value.unshift(last.value);\n      _setSource(state);\n    }\n  };\n  const reset = () => {\n    _setSource(last.value);\n  };\n  const history = computed(() => [last.value, ...undoStack.value]);\n  const canUndo = computed(() => undoStack.value.length > 0);\n  const canRedo = computed(() => redoStack.value.length > 0);\n  return {\n    source,\n    undoStack,\n    redoStack,\n    last,\n    history,\n    canUndo,\n    canRedo,\n    clear,\n    commit,\n    reset,\n    undo,\n    redo\n  };\n}\n\nfunction useRefHistory(source, options = {}) {\n  const {\n    deep = false,\n    flush = \"pre\",\n    eventFilter\n  } = options;\n  const {\n    eventFilter: composedFilter,\n    pause,\n    resume: resumeTracking,\n    isActive: isTracking\n  } = pausableFilter(eventFilter);\n  const {\n    ignoreUpdates,\n    ignorePrevAsyncUpdates,\n    stop\n  } = watchIgnorable(\n    source,\n    commit,\n    { deep, flush, eventFilter: composedFilter }\n  );\n  function setSource(source2, value) {\n    ignorePrevAsyncUpdates();\n    ignoreUpdates(() => {\n      source2.value = value;\n    });\n  }\n  const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n  const { clear, commit: manualCommit } = manualHistory;\n  function commit() {\n    ignorePrevAsyncUpdates();\n    manualCommit();\n  }\n  function resume(commitNow) {\n    resumeTracking();\n    if (commitNow)\n      commit();\n  }\n  function batch(fn) {\n    let canceled = false;\n    const cancel = () => canceled = true;\n    ignoreUpdates(() => {\n      fn(cancel);\n    });\n    if (!canceled)\n      commit();\n  }\n  function dispose() {\n    stop();\n    clear();\n  }\n  return {\n    ...manualHistory,\n    isTracking,\n    pause,\n    resume,\n    commit,\n    batch,\n    dispose\n  };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n  const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n  const history = useRefHistory(source, { ...options, eventFilter: filter });\n  return {\n    ...history\n  };\n}\n\nfunction useDeviceMotion(options = {}) {\n  const {\n    window = defaultWindow,\n    eventFilter = bypassFilter\n  } = options;\n  const acceleration = ref({ x: null, y: null, z: null });\n  const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n  const interval = ref(0);\n  const accelerationIncludingGravity = ref({\n    x: null,\n    y: null,\n    z: null\n  });\n  if (window) {\n    const onDeviceMotion = createFilterWrapper(\n      eventFilter,\n      (event) => {\n        acceleration.value = event.acceleration;\n        accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n        rotationRate.value = event.rotationRate;\n        interval.value = event.interval;\n      }\n    );\n    useEventListener(window, \"devicemotion\", onDeviceMotion);\n  }\n  return {\n    acceleration,\n    accelerationIncludingGravity,\n    rotationRate,\n    interval\n  };\n}\n\nfunction useDeviceOrientation(options = {}) {\n  const { window = defaultWindow } = options;\n  const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n  const isAbsolute = ref(false);\n  const alpha = ref(null);\n  const beta = ref(null);\n  const gamma = ref(null);\n  if (window && isSupported.value) {\n    useEventListener(window, \"deviceorientation\", (event) => {\n      isAbsolute.value = event.absolute;\n      alpha.value = event.alpha;\n      beta.value = event.beta;\n      gamma.value = event.gamma;\n    });\n  }\n  return {\n    isSupported,\n    isAbsolute,\n    alpha,\n    beta,\n    gamma\n  };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const pixelRatio = ref(1);\n  if (window) {\n    let observe2 = function() {\n      pixelRatio.value = window.devicePixelRatio;\n      cleanup2();\n      media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n      media.addEventListener(\"change\", observe2, { once: true });\n    }, cleanup2 = function() {\n      media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n    };\n    let media;\n    observe2();\n    tryOnScopeDispose(cleanup2);\n  }\n  return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    requestPermissions = false,\n    constraints = { audio: true, video: true },\n    onUpdated\n  } = options;\n  const devices = ref([]);\n  const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n  const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n  const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n  const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n  const permissionGranted = ref(false);\n  let stream;\n  async function update() {\n    if (!isSupported.value)\n      return;\n    devices.value = await navigator.mediaDevices.enumerateDevices();\n    onUpdated == null ? void 0 : onUpdated(devices.value);\n    if (stream) {\n      stream.getTracks().forEach((t) => t.stop());\n      stream = null;\n    }\n  }\n  async function ensurePermissions() {\n    if (!isSupported.value)\n      return false;\n    if (permissionGranted.value)\n      return true;\n    const { state, query } = usePermission(\"camera\", { controls: true });\n    await query();\n    if (state.value !== \"granted\") {\n      stream = await navigator.mediaDevices.getUserMedia(constraints);\n      update();\n      permissionGranted.value = true;\n    } else {\n      permissionGranted.value = true;\n    }\n    return permissionGranted.value;\n  }\n  if (isSupported.value) {\n    if (requestPermissions)\n      ensurePermissions();\n    useEventListener(navigator.mediaDevices, \"devicechange\", update);\n    update();\n  }\n  return {\n    devices,\n    ensurePermissions,\n    permissionGranted,\n    videoInputs,\n    audioInputs,\n    audioOutputs,\n    isSupported\n  };\n}\n\nfunction useDisplayMedia(options = {}) {\n  var _a;\n  const enabled = ref((_a = options.enabled) != null ? _a : false);\n  const video = options.video;\n  const audio = options.audio;\n  const { navigator = defaultNavigator } = options;\n  const isSupported = useSupported(() => {\n    var _a2;\n    return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n  });\n  const constraint = { audio, video };\n  const stream = shallowRef();\n  async function _start() {\n    var _a2;\n    if (!isSupported.value || stream.value)\n      return;\n    stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener(\"ended\", stop));\n    return stream.value;\n  }\n  async function _stop() {\n    var _a2;\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n    stream.value = void 0;\n  }\n  function stop() {\n    _stop();\n    enabled.value = false;\n  }\n  async function start() {\n    await _start();\n    if (stream.value)\n      enabled.value = true;\n    return stream.value;\n  }\n  watch(\n    enabled,\n    (v) => {\n      if (v)\n        _start();\n      else\n        _stop();\n    },\n    { immediate: true }\n  );\n  return {\n    isSupported,\n    stream,\n    start,\n    stop,\n    enabled\n  };\n}\n\nfunction useDocumentVisibility(options = {}) {\n  const { document = defaultDocument } = options;\n  if (!document)\n    return ref(\"visible\");\n  const visibility = ref(document.visibilityState);\n  useEventListener(document, \"visibilitychange\", () => {\n    visibility.value = document.visibilityState;\n  });\n  return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n  var _a, _b;\n  const {\n    pointerTypes,\n    preventDefault,\n    stopPropagation,\n    exact,\n    onMove,\n    onEnd,\n    onStart,\n    initialValue,\n    axis = \"both\",\n    draggingElement = defaultWindow,\n    containerElement,\n    handle: draggingHandle = target,\n    buttons = [0]\n  } = options;\n  const position = ref(\n    (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n  );\n  const pressedDelta = ref();\n  const filterEvent = (e) => {\n    if (pointerTypes)\n      return pointerTypes.includes(e.pointerType);\n    return true;\n  };\n  const handleEvent = (e) => {\n    if (toValue(preventDefault))\n      e.preventDefault();\n    if (toValue(stopPropagation))\n      e.stopPropagation();\n  };\n  const start = (e) => {\n    var _a2;\n    if (!toValue(buttons).includes(e.button))\n      return;\n    if (toValue(options.disabled) || !filterEvent(e))\n      return;\n    if (toValue(exact) && e.target !== toValue(target))\n      return;\n    const container = toValue(containerElement);\n    const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n    const targetRect = toValue(target).getBoundingClientRect();\n    const pos = {\n      x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n      y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n    };\n    if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n      return;\n    pressedDelta.value = pos;\n    handleEvent(e);\n  };\n  const move = (e) => {\n    if (toValue(options.disabled) || !filterEvent(e))\n      return;\n    if (!pressedDelta.value)\n      return;\n    const container = toValue(containerElement);\n    const targetRect = toValue(target).getBoundingClientRect();\n    let { x, y } = position.value;\n    if (axis === \"x\" || axis === \"both\") {\n      x = e.clientX - pressedDelta.value.x;\n      if (container)\n        x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n    }\n    if (axis === \"y\" || axis === \"both\") {\n      y = e.clientY - pressedDelta.value.y;\n      if (container)\n        y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n    }\n    position.value = {\n      x,\n      y\n    };\n    onMove == null ? void 0 : onMove(position.value, e);\n    handleEvent(e);\n  };\n  const end = (e) => {\n    if (toValue(options.disabled) || !filterEvent(e))\n      return;\n    if (!pressedDelta.value)\n      return;\n    pressedDelta.value = void 0;\n    onEnd == null ? void 0 : onEnd(position.value, e);\n    handleEvent(e);\n  };\n  if (isClient) {\n    const config = { capture: (_b = options.capture) != null ? _b : true };\n    useEventListener(draggingHandle, \"pointerdown\", start, config);\n    useEventListener(draggingElement, \"pointermove\", move, config);\n    useEventListener(draggingElement, \"pointerup\", end, config);\n  }\n  return {\n    ...toRefs(position),\n    position,\n    isDragging: computed(() => !!pressedDelta.value),\n    style: computed(\n      () => `left:${position.value.x}px;top:${position.value.y}px;`\n    )\n  };\n}\n\nfunction useDropZone(target, options = {}) {\n  const isOverDropZone = ref(false);\n  const files = shallowRef(null);\n  let counter = 0;\n  let isDataTypeIncluded = true;\n  if (isClient) {\n    const _options = typeof options === \"function\" ? { onDrop: options } : options;\n    const getFiles = (event) => {\n      var _a, _b;\n      const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n      return files.value = list.length === 0 ? null : list;\n    };\n    useEventListener(target, \"dragenter\", (event) => {\n      var _a, _b;\n      const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n      if (_options.dataTypes && event.dataTransfer) {\n        const dataTypes = unref(_options.dataTypes);\n        isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n        if (!isDataTypeIncluded)\n          return;\n      }\n      event.preventDefault();\n      counter += 1;\n      isOverDropZone.value = true;\n      const files2 = getFiles(event);\n      (_b = _options.onEnter) == null ? void 0 : _b.call(_options, files2, event);\n    });\n    useEventListener(target, \"dragover\", (event) => {\n      var _a;\n      if (!isDataTypeIncluded)\n        return;\n      event.preventDefault();\n      const files2 = getFiles(event);\n      (_a = _options.onOver) == null ? void 0 : _a.call(_options, files2, event);\n    });\n    useEventListener(target, \"dragleave\", (event) => {\n      var _a;\n      if (!isDataTypeIncluded)\n        return;\n      event.preventDefault();\n      counter -= 1;\n      if (counter === 0)\n        isOverDropZone.value = false;\n      const files2 = getFiles(event);\n      (_a = _options.onLeave) == null ? void 0 : _a.call(_options, files2, event);\n    });\n    useEventListener(target, \"drop\", (event) => {\n      var _a;\n      event.preventDefault();\n      counter = 0;\n      isOverDropZone.value = false;\n      const files2 = getFiles(event);\n      (_a = _options.onDrop) == null ? void 0 : _a.call(_options, files2, event);\n    });\n  }\n  return {\n    files,\n    isOverDropZone\n  };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n  const { window = defaultWindow, ...observerOptions } = options;\n  let observer;\n  const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n  const cleanup = () => {\n    if (observer) {\n      observer.disconnect();\n      observer = void 0;\n    }\n  };\n  const targets = computed(() => {\n    const _targets = toValue(target);\n    return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n  });\n  const stopWatch = watch(\n    targets,\n    (els) => {\n      cleanup();\n      if (isSupported.value && window) {\n        observer = new ResizeObserver(callback);\n        for (const _el of els) {\n          if (_el)\n            observer.observe(_el, observerOptions);\n        }\n      }\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  const stop = () => {\n    cleanup();\n    stopWatch();\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    stop\n  };\n}\n\nfunction useElementBounding(target, options = {}) {\n  const {\n    reset = true,\n    windowResize = true,\n    windowScroll = true,\n    immediate = true,\n    updateTiming = \"sync\"\n  } = options;\n  const height = ref(0);\n  const bottom = ref(0);\n  const left = ref(0);\n  const right = ref(0);\n  const top = ref(0);\n  const width = ref(0);\n  const x = ref(0);\n  const y = ref(0);\n  function recalculate() {\n    const el = unrefElement(target);\n    if (!el) {\n      if (reset) {\n        height.value = 0;\n        bottom.value = 0;\n        left.value = 0;\n        right.value = 0;\n        top.value = 0;\n        width.value = 0;\n        x.value = 0;\n        y.value = 0;\n      }\n      return;\n    }\n    const rect = el.getBoundingClientRect();\n    height.value = rect.height;\n    bottom.value = rect.bottom;\n    left.value = rect.left;\n    right.value = rect.right;\n    top.value = rect.top;\n    width.value = rect.width;\n    x.value = rect.x;\n    y.value = rect.y;\n  }\n  function update() {\n    if (updateTiming === \"sync\")\n      recalculate();\n    else if (updateTiming === \"next-frame\")\n      requestAnimationFrame(() => recalculate());\n  }\n  useResizeObserver(target, update);\n  watch(() => unrefElement(target), (ele) => !ele && update());\n  useMutationObserver(target, update, {\n    attributeFilter: [\"style\", \"class\"]\n  });\n  if (windowScroll)\n    useEventListener(\"scroll\", update, { capture: true, passive: true });\n  if (windowResize)\n    useEventListener(\"resize\", update, { passive: true });\n  tryOnMounted(() => {\n    if (immediate)\n      update();\n  });\n  return {\n    height,\n    bottom,\n    left,\n    right,\n    top,\n    width,\n    x,\n    y,\n    update\n  };\n}\n\nfunction useElementByPoint(options) {\n  const {\n    x,\n    y,\n    document = defaultDocument,\n    multiple,\n    interval = \"requestAnimationFrame\",\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => {\n    if (toValue(multiple))\n      return document && \"elementsFromPoint\" in document;\n    return document && \"elementFromPoint\" in document;\n  });\n  const element = ref(null);\n  const cb = () => {\n    var _a, _b;\n    element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n  };\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n  return {\n    isSupported,\n    element,\n    ...controls\n  };\n}\n\nfunction useElementHover(el, options = {}) {\n  const {\n    delayEnter = 0,\n    delayLeave = 0,\n    window = defaultWindow\n  } = options;\n  const isHovered = ref(false);\n  let timer;\n  const toggle = (entering) => {\n    const delay = entering ? delayEnter : delayLeave;\n    if (timer) {\n      clearTimeout(timer);\n      timer = void 0;\n    }\n    if (delay)\n      timer = setTimeout(() => isHovered.value = entering, delay);\n    else\n      isHovered.value = entering;\n  };\n  if (!window)\n    return isHovered;\n  useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n  useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n  return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n  const { window = defaultWindow, box = \"content-box\" } = options;\n  const isSVG = computed(() => {\n    var _a, _b;\n    return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n  });\n  const width = ref(initialSize.width);\n  const height = ref(initialSize.height);\n  const { stop: stop1 } = useResizeObserver(\n    target,\n    ([entry]) => {\n      const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n      if (window && isSVG.value) {\n        const $elem = unrefElement(target);\n        if ($elem) {\n          const rect = $elem.getBoundingClientRect();\n          width.value = rect.width;\n          height.value = rect.height;\n        }\n      } else {\n        if (boxSize) {\n          const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n          width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n          height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n        } else {\n          width.value = entry.contentRect.width;\n          height.value = entry.contentRect.height;\n        }\n      }\n    },\n    options\n  );\n  tryOnMounted(() => {\n    const ele = unrefElement(target);\n    if (ele) {\n      width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n      height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n    }\n  });\n  const stop2 = watch(\n    () => unrefElement(target),\n    (ele) => {\n      width.value = ele ? initialSize.width : 0;\n      height.value = ele ? initialSize.height : 0;\n    }\n  );\n  function stop() {\n    stop1();\n    stop2();\n  }\n  return {\n    width,\n    height,\n    stop\n  };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n  const {\n    root,\n    rootMargin = \"0px\",\n    threshold = 0,\n    window = defaultWindow,\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n  const targets = computed(() => {\n    const _target = toValue(target);\n    return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n  });\n  let cleanup = noop;\n  const isActive = ref(immediate);\n  const stopWatch = isSupported.value ? watch(\n    () => [targets.value, unrefElement(root), isActive.value],\n    ([targets2, root2]) => {\n      cleanup();\n      if (!isActive.value)\n        return;\n      if (!targets2.length)\n        return;\n      const observer = new IntersectionObserver(\n        callback,\n        {\n          root: unrefElement(root2),\n          rootMargin,\n          threshold\n        }\n      );\n      targets2.forEach((el) => el && observer.observe(el));\n      cleanup = () => {\n        observer.disconnect();\n        cleanup = noop;\n      };\n    },\n    { immediate, flush: \"post\" }\n  ) : noop;\n  const stop = () => {\n    cleanup();\n    stopWatch();\n    isActive.value = false;\n  };\n  tryOnScopeDispose(stop);\n  return {\n    isSupported,\n    isActive,\n    pause() {\n      cleanup();\n      isActive.value = false;\n    },\n    resume() {\n      isActive.value = true;\n    },\n    stop\n  };\n}\n\nfunction useElementVisibility(element, options = {}) {\n  const { window = defaultWindow, scrollTarget, threshold = 0 } = options;\n  const elementIsVisible = ref(false);\n  useIntersectionObserver(\n    element,\n    (intersectionObserverEntries) => {\n      let isIntersecting = elementIsVisible.value;\n      let latestTime = 0;\n      for (const entry of intersectionObserverEntries) {\n        if (entry.time >= latestTime) {\n          latestTime = entry.time;\n          isIntersecting = entry.isIntersecting;\n        }\n      }\n      elementIsVisible.value = isIntersecting;\n    },\n    {\n      root: scrollTarget,\n      window,\n      threshold\n    }\n  );\n  return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n  const scope = getCurrentScope();\n  function on(listener) {\n    var _a;\n    const listeners = events.get(key) || /* @__PURE__ */ new Set();\n    listeners.add(listener);\n    events.set(key, listeners);\n    const _off = () => off(listener);\n    (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n    return _off;\n  }\n  function once(listener) {\n    function _listener(...args) {\n      off(_listener);\n      listener(...args);\n    }\n    return on(_listener);\n  }\n  function off(listener) {\n    const listeners = events.get(key);\n    if (!listeners)\n      return;\n    listeners.delete(listener);\n    if (!listeners.size)\n      reset();\n  }\n  function reset() {\n    events.delete(key);\n  }\n  function emit(event, payload) {\n    var _a;\n    (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n  }\n  return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n  if (options === true)\n    return {};\n  return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n  const event = ref(null);\n  const data = ref(null);\n  const status = ref(\"CONNECTING\");\n  const eventSource = ref(null);\n  const error = shallowRef(null);\n  const urlRef = toRef(url);\n  const lastEventId = shallowRef(null);\n  let explicitlyClosed = false;\n  let retried = 0;\n  const {\n    withCredentials = false,\n    immediate = true\n  } = options;\n  const close = () => {\n    if (isClient && eventSource.value) {\n      eventSource.value.close();\n      eventSource.value = null;\n      status.value = \"CLOSED\";\n      explicitlyClosed = true;\n    }\n  };\n  const _init = () => {\n    if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n      return;\n    const es = new EventSource(urlRef.value, { withCredentials });\n    status.value = \"CONNECTING\";\n    eventSource.value = es;\n    es.onopen = () => {\n      status.value = \"OPEN\";\n      error.value = null;\n    };\n    es.onerror = (e) => {\n      status.value = \"CLOSED\";\n      error.value = e;\n      if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {\n        es.close();\n        const {\n          retries = -1,\n          delay = 1e3,\n          onFailed\n        } = resolveNestedOptions$1(options.autoReconnect);\n        retried += 1;\n        if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n          setTimeout(_init, delay);\n        else if (typeof retries === \"function\" && retries())\n          setTimeout(_init, delay);\n        else\n          onFailed == null ? void 0 : onFailed();\n      }\n    };\n    es.onmessage = (e) => {\n      event.value = null;\n      data.value = e.data;\n      lastEventId.value = e.lastEventId;\n    };\n    for (const event_name of events) {\n      useEventListener(es, event_name, (e) => {\n        event.value = event_name;\n        data.value = e.data || null;\n      });\n    }\n  };\n  const open = () => {\n    if (!isClient)\n      return;\n    close();\n    explicitlyClosed = false;\n    retried = 0;\n    _init();\n  };\n  if (immediate)\n    watch(urlRef, open, { immediate: true });\n  tryOnScopeDispose(close);\n  return {\n    eventSource,\n    event,\n    data,\n    status,\n    error,\n    open,\n    close,\n    lastEventId\n  };\n}\n\nfunction useEyeDropper(options = {}) {\n  const { initialValue = \"\" } = options;\n  const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n  const sRGBHex = ref(initialValue);\n  async function open(openOptions) {\n    if (!isSupported.value)\n      return;\n    const eyeDropper = new window.EyeDropper();\n    const result = await eyeDropper.open(openOptions);\n    sRGBHex.value = result.sRGBHex;\n    return result;\n  }\n  return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n  const {\n    baseUrl = \"\",\n    rel = \"icon\",\n    document = defaultDocument\n  } = options;\n  const favicon = toRef(newIcon);\n  const applyIcon = (icon) => {\n    const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n    if (!elements || elements.length === 0) {\n      const link = document == null ? void 0 : document.createElement(\"link\");\n      if (link) {\n        link.rel = rel;\n        link.href = `${baseUrl}${icon}`;\n        link.type = `image/${icon.split(\".\").pop()}`;\n        document == null ? void 0 : document.head.append(link);\n      }\n      return;\n    }\n    elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n  };\n  watch(\n    favicon,\n    (i, o) => {\n      if (typeof i === \"string\" && i !== o)\n        applyIcon(i);\n    },\n    { immediate: true }\n  );\n  return favicon;\n}\n\nconst payloadMapping = {\n  json: \"application/json\",\n  text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n  return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n  return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n  if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n    return Object.fromEntries(headers.entries());\n  return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n  if (combination === \"overwrite\") {\n    return async (ctx) => {\n      const callback = callbacks[callbacks.length - 1];\n      if (callback)\n        return { ...ctx, ...await callback(ctx) };\n      return ctx;\n    };\n  } else {\n    return async (ctx) => {\n      for (const callback of callbacks) {\n        if (callback)\n          ctx = { ...ctx, ...await callback(ctx) };\n      }\n      return ctx;\n    };\n  }\n}\nfunction createFetch(config = {}) {\n  const _combination = config.combination || \"chain\";\n  const _options = config.options || {};\n  const _fetchOptions = config.fetchOptions || {};\n  function useFactoryFetch(url, ...args) {\n    const computedUrl = computed(() => {\n      const baseUrl = toValue(config.baseUrl);\n      const targetUrl = toValue(url);\n      return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n    });\n    let options = _options;\n    let fetchOptions = _fetchOptions;\n    if (args.length > 0) {\n      if (isFetchOptions(args[0])) {\n        options = {\n          ...options,\n          ...args[0],\n          beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n          afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n          onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n        };\n      } else {\n        fetchOptions = {\n          ...fetchOptions,\n          ...args[0],\n          headers: {\n            ...headersToObject(fetchOptions.headers) || {},\n            ...headersToObject(args[0].headers) || {}\n          }\n        };\n      }\n    }\n    if (args.length > 1 && isFetchOptions(args[1])) {\n      options = {\n        ...options,\n        ...args[1],\n        beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n        afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n        onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n      };\n    }\n    return useFetch(computedUrl, fetchOptions, options);\n  }\n  return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n  var _a;\n  const supportsAbort = typeof AbortController === \"function\";\n  let fetchOptions = {};\n  let options = {\n    immediate: true,\n    refetch: false,\n    timeout: 0,\n    updateDataOnError: false\n  };\n  const config = {\n    method: \"GET\",\n    type: \"text\",\n    payload: void 0\n  };\n  if (args.length > 0) {\n    if (isFetchOptions(args[0]))\n      options = { ...options, ...args[0] };\n    else\n      fetchOptions = args[0];\n  }\n  if (args.length > 1) {\n    if (isFetchOptions(args[1]))\n      options = { ...options, ...args[1] };\n  }\n  const {\n    fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n    initialData,\n    timeout\n  } = options;\n  const responseEvent = createEventHook();\n  const errorEvent = createEventHook();\n  const finallyEvent = createEventHook();\n  const isFinished = ref(false);\n  const isFetching = ref(false);\n  const aborted = ref(false);\n  const statusCode = ref(null);\n  const response = shallowRef(null);\n  const error = shallowRef(null);\n  const data = shallowRef(initialData || null);\n  const canAbort = computed(() => supportsAbort && isFetching.value);\n  let controller;\n  let timer;\n  const abort = () => {\n    if (supportsAbort) {\n      controller == null ? void 0 : controller.abort();\n      controller = new AbortController();\n      controller.signal.onabort = () => aborted.value = true;\n      fetchOptions = {\n        ...fetchOptions,\n        signal: controller.signal\n      };\n    }\n  };\n  const loading = (isLoading) => {\n    isFetching.value = isLoading;\n    isFinished.value = !isLoading;\n  };\n  if (timeout)\n    timer = useTimeoutFn(abort, timeout, { immediate: false });\n  let executeCounter = 0;\n  const execute = async (throwOnFailed = false) => {\n    var _a2, _b;\n    abort();\n    loading(true);\n    error.value = null;\n    statusCode.value = null;\n    aborted.value = false;\n    executeCounter += 1;\n    const currentExecuteCounter = executeCounter;\n    const defaultFetchOptions = {\n      method: config.method,\n      headers: {}\n    };\n    if (config.payload) {\n      const headers = headersToObject(defaultFetchOptions.headers);\n      const payload = toValue(config.payload);\n      if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n        config.payloadType = \"json\";\n      if (config.payloadType)\n        headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n      defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n    }\n    let isCanceled = false;\n    const context = {\n      url: toValue(url),\n      options: {\n        ...defaultFetchOptions,\n        ...fetchOptions\n      },\n      cancel: () => {\n        isCanceled = true;\n      }\n    };\n    if (options.beforeFetch)\n      Object.assign(context, await options.beforeFetch(context));\n    if (isCanceled || !fetch) {\n      loading(false);\n      return Promise.resolve(null);\n    }\n    let responseData = null;\n    if (timer)\n      timer.start();\n    return fetch(\n      context.url,\n      {\n        ...defaultFetchOptions,\n        ...context.options,\n        headers: {\n          ...headersToObject(defaultFetchOptions.headers),\n          ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n        }\n      }\n    ).then(async (fetchResponse) => {\n      response.value = fetchResponse;\n      statusCode.value = fetchResponse.status;\n      responseData = await fetchResponse.clone()[config.type]();\n      if (!fetchResponse.ok) {\n        data.value = initialData || null;\n        throw new Error(fetchResponse.statusText);\n      }\n      if (options.afterFetch) {\n        ({ data: responseData } = await options.afterFetch({\n          data: responseData,\n          response: fetchResponse\n        }));\n      }\n      data.value = responseData;\n      responseEvent.trigger(fetchResponse);\n      return fetchResponse;\n    }).catch(async (fetchError) => {\n      let errorData = fetchError.message || fetchError.name;\n      if (options.onFetchError) {\n        ({ error: errorData, data: responseData } = await options.onFetchError({\n          data: responseData,\n          error: fetchError,\n          response: response.value\n        }));\n      }\n      error.value = errorData;\n      if (options.updateDataOnError)\n        data.value = responseData;\n      errorEvent.trigger(fetchError);\n      if (throwOnFailed)\n        throw fetchError;\n      return null;\n    }).finally(() => {\n      if (currentExecuteCounter === executeCounter)\n        loading(false);\n      if (timer)\n        timer.stop();\n      finallyEvent.trigger(null);\n    });\n  };\n  const refetch = toRef(options.refetch);\n  watch(\n    [\n      refetch,\n      toRef(url)\n    ],\n    ([refetch2]) => refetch2 && execute(),\n    { deep: true }\n  );\n  const shell = {\n    isFinished: readonly(isFinished),\n    isFetching: readonly(isFetching),\n    statusCode,\n    response,\n    error,\n    data,\n    canAbort,\n    aborted,\n    abort,\n    execute,\n    onFetchResponse: responseEvent.on,\n    onFetchError: errorEvent.on,\n    onFetchFinally: finallyEvent.on,\n    // method\n    get: setMethod(\"GET\"),\n    put: setMethod(\"PUT\"),\n    post: setMethod(\"POST\"),\n    delete: setMethod(\"DELETE\"),\n    patch: setMethod(\"PATCH\"),\n    head: setMethod(\"HEAD\"),\n    options: setMethod(\"OPTIONS\"),\n    // type\n    json: setType(\"json\"),\n    text: setType(\"text\"),\n    blob: setType(\"blob\"),\n    arrayBuffer: setType(\"arrayBuffer\"),\n    formData: setType(\"formData\")\n  };\n  function setMethod(method) {\n    return (payload, payloadType) => {\n      if (!isFetching.value) {\n        config.method = method;\n        config.payload = payload;\n        config.payloadType = payloadType;\n        if (isRef(config.payload)) {\n          watch(\n            [\n              refetch,\n              toRef(config.payload)\n            ],\n            ([refetch2]) => refetch2 && execute(),\n            { deep: true }\n          );\n        }\n        return {\n          ...shell,\n          then(onFulfilled, onRejected) {\n            return waitUntilFinished().then(onFulfilled, onRejected);\n          }\n        };\n      }\n      return void 0;\n    };\n  }\n  function waitUntilFinished() {\n    return new Promise((resolve, reject) => {\n      until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n    });\n  }\n  function setType(type) {\n    return () => {\n      if (!isFetching.value) {\n        config.type = type;\n        return {\n          ...shell,\n          then(onFulfilled, onRejected) {\n            return waitUntilFinished().then(onFulfilled, onRejected);\n          }\n        };\n      }\n      return void 0;\n    };\n  }\n  if (options.immediate)\n    Promise.resolve().then(() => execute());\n  return {\n    ...shell,\n    then(onFulfilled, onRejected) {\n      return waitUntilFinished().then(onFulfilled, onRejected);\n    }\n  };\n}\nfunction joinPaths(start, end) {\n  if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n    return `${start}/${end}`;\n  return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n  multiple: true,\n  accept: \"*\",\n  reset: false,\n  directory: false\n};\nfunction useFileDialog(options = {}) {\n  const {\n    document = defaultDocument\n  } = options;\n  const files = ref(null);\n  const { on: onChange, trigger } = createEventHook();\n  let input;\n  if (document) {\n    input = document.createElement(\"input\");\n    input.type = \"file\";\n    input.onchange = (event) => {\n      const result = event.target;\n      files.value = result.files;\n      trigger(files.value);\n    };\n  }\n  const reset = () => {\n    files.value = null;\n    if (input && input.value) {\n      input.value = \"\";\n      trigger(null);\n    }\n  };\n  const open = (localOptions) => {\n    if (!input)\n      return;\n    const _options = {\n      ...DEFAULT_OPTIONS,\n      ...options,\n      ...localOptions\n    };\n    input.multiple = _options.multiple;\n    input.accept = _options.accept;\n    input.webkitdirectory = _options.directory;\n    if (hasOwn(_options, \"capture\"))\n      input.capture = _options.capture;\n    if (_options.reset)\n      reset();\n    input.click();\n  };\n  return {\n    files: readonly(files),\n    open,\n    reset,\n    onChange\n  };\n}\n\nfunction useFileSystemAccess(options = {}) {\n  const {\n    window: _window = defaultWindow,\n    dataType = \"Text\"\n  } = options;\n  const window = _window;\n  const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n  const fileHandle = ref();\n  const data = ref();\n  const file = ref();\n  const fileName = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n  });\n  const fileMIME = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n  });\n  const fileSize = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n  });\n  const fileLastModified = computed(() => {\n    var _a, _b;\n    return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n  });\n  async function open(_options = {}) {\n    if (!isSupported.value)\n      return;\n    const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n    fileHandle.value = handle;\n    await updateData();\n  }\n  async function create(_options = {}) {\n    if (!isSupported.value)\n      return;\n    fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n    data.value = void 0;\n    await updateData();\n  }\n  async function save(_options = {}) {\n    if (!isSupported.value)\n      return;\n    if (!fileHandle.value)\n      return saveAs(_options);\n    if (data.value) {\n      const writableStream = await fileHandle.value.createWritable();\n      await writableStream.write(data.value);\n      await writableStream.close();\n    }\n    await updateFile();\n  }\n  async function saveAs(_options = {}) {\n    if (!isSupported.value)\n      return;\n    fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n    if (data.value) {\n      const writableStream = await fileHandle.value.createWritable();\n      await writableStream.write(data.value);\n      await writableStream.close();\n    }\n    await updateFile();\n  }\n  async function updateFile() {\n    var _a;\n    file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n  }\n  async function updateData() {\n    var _a, _b;\n    await updateFile();\n    const type = toValue(dataType);\n    if (type === \"Text\")\n      data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n    else if (type === \"ArrayBuffer\")\n      data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n    else if (type === \"Blob\")\n      data.value = file.value;\n  }\n  watch(() => toValue(dataType), updateData);\n  return {\n    isSupported,\n    data,\n    file,\n    fileName,\n    fileMIME,\n    fileSize,\n    fileLastModified,\n    open,\n    create,\n    save,\n    saveAs,\n    updateData\n  };\n}\n\nfunction useFocus(target, options = {}) {\n  const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n  const innerFocused = ref(false);\n  const targetElement = computed(() => unrefElement(target));\n  useEventListener(targetElement, \"focus\", (event) => {\n    var _a, _b;\n    if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n      innerFocused.value = true;\n  });\n  useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n  const focused = computed({\n    get: () => innerFocused.value,\n    set(value) {\n      var _a, _b;\n      if (!value && innerFocused.value)\n        (_a = targetElement.value) == null ? void 0 : _a.blur();\n      else if (value && !innerFocused.value)\n        (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n    }\n  });\n  watch(\n    targetElement,\n    () => {\n      focused.value = initialValue;\n    },\n    { immediate: true, flush: \"post\" }\n  );\n  return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n  const activeElement = useActiveElement(options);\n  const targetElement = computed(() => unrefElement(target));\n  const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n  return { focused };\n}\n\nfunction useFps(options) {\n  var _a;\n  const fps = ref(0);\n  if (typeof performance === \"undefined\")\n    return fps;\n  const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n  let last = performance.now();\n  let ticks = 0;\n  useRafFn(() => {\n    ticks += 1;\n    if (ticks >= every) {\n      const now = performance.now();\n      const diff = now - last;\n      fps.value = Math.round(1e3 / (diff / ticks));\n      last = now;\n      ticks = 0;\n    }\n  });\n  return fps;\n}\n\nconst eventHandlers = [\n  \"fullscreenchange\",\n  \"webkitfullscreenchange\",\n  \"webkitendfullscreen\",\n  \"mozfullscreenchange\",\n  \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n  const {\n    document = defaultDocument,\n    autoExit = false\n  } = options;\n  const targetRef = computed(() => {\n    var _a;\n    return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n  });\n  const isFullscreen = ref(false);\n  const requestMethod = computed(() => {\n    return [\n      \"requestFullscreen\",\n      \"webkitRequestFullscreen\",\n      \"webkitEnterFullscreen\",\n      \"webkitEnterFullScreen\",\n      \"webkitRequestFullScreen\",\n      \"mozRequestFullScreen\",\n      \"msRequestFullscreen\"\n    ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n  });\n  const exitMethod = computed(() => {\n    return [\n      \"exitFullscreen\",\n      \"webkitExitFullscreen\",\n      \"webkitExitFullScreen\",\n      \"webkitCancelFullScreen\",\n      \"mozCancelFullScreen\",\n      \"msExitFullscreen\"\n    ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n  });\n  const fullscreenEnabled = computed(() => {\n    return [\n      \"fullScreen\",\n      \"webkitIsFullScreen\",\n      \"webkitDisplayingFullscreen\",\n      \"mozFullScreen\",\n      \"msFullscreenElement\"\n    ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n  });\n  const fullscreenElementMethod = [\n    \"fullscreenElement\",\n    \"webkitFullscreenElement\",\n    \"mozFullScreenElement\",\n    \"msFullscreenElement\"\n  ].find((m) => document && m in document);\n  const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n  const isCurrentElementFullScreen = () => {\n    if (fullscreenElementMethod)\n      return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n    return false;\n  };\n  const isElementFullScreen = () => {\n    if (fullscreenEnabled.value) {\n      if (document && document[fullscreenEnabled.value] != null) {\n        return document[fullscreenEnabled.value];\n      } else {\n        const target2 = targetRef.value;\n        if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n          return Boolean(target2[fullscreenEnabled.value]);\n        }\n      }\n    }\n    return false;\n  };\n  async function exit() {\n    if (!isSupported.value || !isFullscreen.value)\n      return;\n    if (exitMethod.value) {\n      if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n        await document[exitMethod.value]();\n      } else {\n        const target2 = targetRef.value;\n        if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n          await target2[exitMethod.value]();\n      }\n    }\n    isFullscreen.value = false;\n  }\n  async function enter() {\n    if (!isSupported.value || isFullscreen.value)\n      return;\n    if (isElementFullScreen())\n      await exit();\n    const target2 = targetRef.value;\n    if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n      await target2[requestMethod.value]();\n      isFullscreen.value = true;\n    }\n  }\n  async function toggle() {\n    await (isFullscreen.value ? exit() : enter());\n  }\n  const handlerCallback = () => {\n    const isElementFullScreenValue = isElementFullScreen();\n    if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n      isFullscreen.value = isElementFullScreenValue;\n  };\n  useEventListener(document, eventHandlers, handlerCallback, false);\n  useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n  if (autoExit)\n    tryOnScopeDispose(exit);\n  return {\n    isSupported,\n    isFullscreen,\n    enter,\n    exit,\n    toggle\n  };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n  return computed(() => {\n    if (gamepad.value) {\n      return {\n        buttons: {\n          a: gamepad.value.buttons[0],\n          b: gamepad.value.buttons[1],\n          x: gamepad.value.buttons[2],\n          y: gamepad.value.buttons[3]\n        },\n        bumper: {\n          left: gamepad.value.buttons[4],\n          right: gamepad.value.buttons[5]\n        },\n        triggers: {\n          left: gamepad.value.buttons[6],\n          right: gamepad.value.buttons[7]\n        },\n        stick: {\n          left: {\n            horizontal: gamepad.value.axes[0],\n            vertical: gamepad.value.axes[1],\n            button: gamepad.value.buttons[10]\n          },\n          right: {\n            horizontal: gamepad.value.axes[2],\n            vertical: gamepad.value.axes[3],\n            button: gamepad.value.buttons[11]\n          }\n        },\n        dpad: {\n          up: gamepad.value.buttons[12],\n          down: gamepad.value.buttons[13],\n          left: gamepad.value.buttons[14],\n          right: gamepad.value.buttons[15]\n        },\n        back: gamepad.value.buttons[8],\n        start: gamepad.value.buttons[9]\n      };\n    }\n    return null;\n  });\n}\nfunction useGamepad(options = {}) {\n  const {\n    navigator = defaultNavigator\n  } = options;\n  const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n  const gamepads = ref([]);\n  const onConnectedHook = createEventHook();\n  const onDisconnectedHook = createEventHook();\n  const stateFromGamepad = (gamepad) => {\n    const hapticActuators = [];\n    const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n    if (vibrationActuator)\n      hapticActuators.push(vibrationActuator);\n    if (gamepad.hapticActuators)\n      hapticActuators.push(...gamepad.hapticActuators);\n    return {\n      id: gamepad.id,\n      index: gamepad.index,\n      connected: gamepad.connected,\n      mapping: gamepad.mapping,\n      timestamp: gamepad.timestamp,\n      vibrationActuator: gamepad.vibrationActuator,\n      hapticActuators,\n      axes: gamepad.axes.map((axes) => axes),\n      buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n    };\n  };\n  const updateGamepadState = () => {\n    const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n    for (const gamepad of _gamepads) {\n      if (gamepad && gamepads.value[gamepad.index])\n        gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n    }\n  };\n  const { isActive, pause, resume } = useRafFn(updateGamepadState);\n  const onGamepadConnected = (gamepad) => {\n    if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n      gamepads.value.push(stateFromGamepad(gamepad));\n      onConnectedHook.trigger(gamepad.index);\n    }\n    resume();\n  };\n  const onGamepadDisconnected = (gamepad) => {\n    gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n    onDisconnectedHook.trigger(gamepad.index);\n  };\n  useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n  useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n  tryOnMounted(() => {\n    const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n    for (const gamepad of _gamepads) {\n      if (gamepad && gamepads.value[gamepad.index])\n        onGamepadConnected(gamepad);\n    }\n  });\n  pause();\n  return {\n    isSupported,\n    onConnected: onConnectedHook.on,\n    onDisconnected: onDisconnectedHook.on,\n    gamepads,\n    pause,\n    resume,\n    isActive\n  };\n}\n\nfunction useGeolocation(options = {}) {\n  const {\n    enableHighAccuracy = true,\n    maximumAge = 3e4,\n    timeout = 27e3,\n    navigator = defaultNavigator,\n    immediate = true\n  } = options;\n  const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n  const locatedAt = ref(null);\n  const error = shallowRef(null);\n  const coords = ref({\n    accuracy: 0,\n    latitude: Number.POSITIVE_INFINITY,\n    longitude: Number.POSITIVE_INFINITY,\n    altitude: null,\n    altitudeAccuracy: null,\n    heading: null,\n    speed: null\n  });\n  function updatePosition(position) {\n    locatedAt.value = position.timestamp;\n    coords.value = position.coords;\n    error.value = null;\n  }\n  let watcher;\n  function resume() {\n    if (isSupported.value) {\n      watcher = navigator.geolocation.watchPosition(\n        updatePosition,\n        (err) => error.value = err,\n        {\n          enableHighAccuracy,\n          maximumAge,\n          timeout\n        }\n      );\n    }\n  }\n  if (immediate)\n    resume();\n  function pause() {\n    if (watcher && navigator)\n      navigator.geolocation.clearWatch(watcher);\n  }\n  tryOnScopeDispose(() => {\n    pause();\n  });\n  return {\n    isSupported,\n    coords,\n    locatedAt,\n    error,\n    resume,\n    pause\n  };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n  const {\n    initialState = false,\n    listenForVisibilityChange = true,\n    events = defaultEvents$1,\n    window = defaultWindow,\n    eventFilter = throttleFilter(50)\n  } = options;\n  const idle = ref(initialState);\n  const lastActive = ref(timestamp());\n  let timer;\n  const reset = () => {\n    idle.value = false;\n    clearTimeout(timer);\n    timer = setTimeout(() => idle.value = true, timeout);\n  };\n  const onEvent = createFilterWrapper(\n    eventFilter,\n    () => {\n      lastActive.value = timestamp();\n      reset();\n    }\n  );\n  if (window) {\n    const document = window.document;\n    for (const event of events)\n      useEventListener(window, event, onEvent, { passive: true });\n    if (listenForVisibilityChange) {\n      useEventListener(document, \"visibilitychange\", () => {\n        if (!document.hidden)\n          onEvent();\n      });\n    }\n    reset();\n  }\n  return {\n    idle,\n    lastActive,\n    reset\n  };\n}\n\nasync function loadImage(options) {\n  return new Promise((resolve, reject) => {\n    const img = new Image();\n    const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n    img.src = src;\n    if (srcset)\n      img.srcset = srcset;\n    if (sizes)\n      img.sizes = sizes;\n    if (clazz)\n      img.className = clazz;\n    if (loading)\n      img.loading = loading;\n    if (crossorigin)\n      img.crossOrigin = crossorigin;\n    if (referrerPolicy)\n      img.referrerPolicy = referrerPolicy;\n    img.onload = () => resolve(img);\n    img.onerror = reject;\n  });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n  const state = useAsyncState(\n    () => loadImage(toValue(options)),\n    void 0,\n    {\n      resetOnExecute: true,\n      ...asyncStateOptions\n    }\n  );\n  watch(\n    () => toValue(options),\n    () => state.execute(asyncStateOptions.delay),\n    { deep: true }\n  );\n  return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n  const {\n    throttle = 0,\n    idle = 200,\n    onStop = noop,\n    onScroll = noop,\n    offset = {\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    },\n    eventListenerOptions = {\n      capture: false,\n      passive: true\n    },\n    behavior = \"auto\",\n    window = defaultWindow,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = options;\n  const internalX = ref(0);\n  const internalY = ref(0);\n  const x = computed({\n    get() {\n      return internalX.value;\n    },\n    set(x2) {\n      scrollTo(x2, void 0);\n    }\n  });\n  const y = computed({\n    get() {\n      return internalY.value;\n    },\n    set(y2) {\n      scrollTo(void 0, y2);\n    }\n  });\n  function scrollTo(_x, _y) {\n    var _a, _b, _c, _d;\n    if (!window)\n      return;\n    const _element = toValue(element);\n    if (!_element)\n      return;\n    (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n      top: (_a = toValue(_y)) != null ? _a : y.value,\n      left: (_b = toValue(_x)) != null ? _b : x.value,\n      behavior: toValue(behavior)\n    });\n    const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n    if (x != null)\n      internalX.value = scrollContainer.scrollLeft;\n    if (y != null)\n      internalY.value = scrollContainer.scrollTop;\n  }\n  const isScrolling = ref(false);\n  const arrivedState = reactive({\n    left: true,\n    right: false,\n    top: true,\n    bottom: false\n  });\n  const directions = reactive({\n    left: false,\n    right: false,\n    top: false,\n    bottom: false\n  });\n  const onScrollEnd = (e) => {\n    if (!isScrolling.value)\n      return;\n    isScrolling.value = false;\n    directions.left = false;\n    directions.right = false;\n    directions.top = false;\n    directions.bottom = false;\n    onStop(e);\n  };\n  const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n  const setArrivedState = (target) => {\n    var _a;\n    if (!window)\n      return;\n    const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n    const { display, flexDirection } = getComputedStyle(el);\n    const scrollLeft = el.scrollLeft;\n    directions.left = scrollLeft < internalX.value;\n    directions.right = scrollLeft > internalX.value;\n    const left = Math.abs(scrollLeft) <= (offset.left || 0);\n    const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n    if (display === \"flex\" && flexDirection === \"row-reverse\") {\n      arrivedState.left = right;\n      arrivedState.right = left;\n    } else {\n      arrivedState.left = left;\n      arrivedState.right = right;\n    }\n    internalX.value = scrollLeft;\n    let scrollTop = el.scrollTop;\n    if (target === window.document && !scrollTop)\n      scrollTop = window.document.body.scrollTop;\n    directions.top = scrollTop < internalY.value;\n    directions.bottom = scrollTop > internalY.value;\n    const top = Math.abs(scrollTop) <= (offset.top || 0);\n    const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n    if (display === \"flex\" && flexDirection === \"column-reverse\") {\n      arrivedState.top = bottom;\n      arrivedState.bottom = top;\n    } else {\n      arrivedState.top = top;\n      arrivedState.bottom = bottom;\n    }\n    internalY.value = scrollTop;\n  };\n  const onScrollHandler = (e) => {\n    var _a;\n    if (!window)\n      return;\n    const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n    setArrivedState(eventTarget);\n    isScrolling.value = true;\n    onScrollEndDebounced(e);\n    onScroll(e);\n  };\n  useEventListener(\n    element,\n    \"scroll\",\n    throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n    eventListenerOptions\n  );\n  tryOnMounted(() => {\n    try {\n      const _element = toValue(element);\n      if (!_element)\n        return;\n      setArrivedState(_element);\n    } catch (e) {\n      onError(e);\n    }\n  });\n  useEventListener(\n    element,\n    \"scrollend\",\n    onScrollEnd,\n    eventListenerOptions\n  );\n  return {\n    x,\n    y,\n    isScrolling,\n    arrivedState,\n    directions,\n    measure() {\n      const _element = toValue(element);\n      if (window && _element)\n        setArrivedState(_element);\n    }\n  };\n}\n\nfunction resolveElement(el) {\n  if (typeof Window !== \"undefined\" && el instanceof Window)\n    return el.document.documentElement;\n  if (typeof Document !== \"undefined\" && el instanceof Document)\n    return el.documentElement;\n  return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n  var _a;\n  const {\n    direction = \"bottom\",\n    interval = 100,\n    canLoadMore = () => true\n  } = options;\n  const state = reactive(useScroll(\n    element,\n    {\n      ...options,\n      offset: {\n        [direction]: (_a = options.distance) != null ? _a : 0,\n        ...options.offset\n      }\n    }\n  ));\n  const promise = ref();\n  const isLoading = computed(() => !!promise.value);\n  const observedElement = computed(() => {\n    return resolveElement(toValue(element));\n  });\n  const isElementVisible = useElementVisibility(observedElement);\n  function checkAndLoad() {\n    state.measure();\n    if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n      return;\n    const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n    const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n    if (state.arrivedState[direction] || isNarrower) {\n      if (!promise.value) {\n        promise.value = Promise.all([\n          onLoadMore(state),\n          new Promise((resolve) => setTimeout(resolve, interval))\n        ]).finally(() => {\n          promise.value = null;\n          nextTick(() => checkAndLoad());\n        });\n      }\n    }\n  }\n  watch(\n    () => [state.arrivedState[direction], isElementVisible.value],\n    checkAndLoad,\n    { immediate: true }\n  );\n  return {\n    isLoading,\n    reset() {\n      nextTick(() => checkAndLoad());\n    }\n  };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n  const {\n    events = defaultEvents,\n    document = defaultDocument,\n    initial = null\n  } = options;\n  const state = ref(initial);\n  if (document) {\n    events.forEach((listenerEvent) => {\n      useEventListener(document, listenerEvent, (evt) => {\n        if (typeof evt.getModifierState === \"function\")\n          state.value = evt.getModifierState(modifier);\n      });\n    });\n  }\n  return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n  const { window = defaultWindow } = options;\n  return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n  ctrl: \"control\",\n  command: \"meta\",\n  cmd: \"meta\",\n  option: \"alt\",\n  up: \"arrowup\",\n  down: \"arrowdown\",\n  left: \"arrowleft\",\n  right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n  const {\n    reactive: useReactive = false,\n    target = defaultWindow,\n    aliasMap = DefaultMagicKeysAliasMap,\n    passive = true,\n    onEventFired = noop\n  } = options;\n  const current = reactive(/* @__PURE__ */ new Set());\n  const obj = {\n    toJSON() {\n      return {};\n    },\n    current\n  };\n  const refs = useReactive ? reactive(obj) : obj;\n  const metaDeps = /* @__PURE__ */ new Set();\n  const usedKeys = /* @__PURE__ */ new Set();\n  function setRefs(key, value) {\n    if (key in refs) {\n      if (useReactive)\n        refs[key] = value;\n      else\n        refs[key].value = value;\n    }\n  }\n  function reset() {\n    current.clear();\n    for (const key of usedKeys)\n      setRefs(key, false);\n  }\n  function updateRefs(e, value) {\n    var _a, _b;\n    const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n    const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n    const values = [code, key].filter(Boolean);\n    if (key) {\n      if (value)\n        current.add(key);\n      else\n        current.delete(key);\n    }\n    for (const key2 of values) {\n      usedKeys.add(key2);\n      setRefs(key2, value);\n    }\n    if (key === \"meta\" && !value) {\n      metaDeps.forEach((key2) => {\n        current.delete(key2);\n        setRefs(key2, false);\n      });\n      metaDeps.clear();\n    } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n      [...current, ...values].forEach((key2) => metaDeps.add(key2));\n    }\n  }\n  useEventListener(target, \"keydown\", (e) => {\n    updateRefs(e, true);\n    return onEventFired(e);\n  }, { passive });\n  useEventListener(target, \"keyup\", (e) => {\n    updateRefs(e, false);\n    return onEventFired(e);\n  }, { passive });\n  useEventListener(\"blur\", reset, { passive: true });\n  useEventListener(\"focus\", reset, { passive: true });\n  const proxy = new Proxy(\n    refs,\n    {\n      get(target2, prop, rec) {\n        if (typeof prop !== \"string\")\n          return Reflect.get(target2, prop, rec);\n        prop = prop.toLowerCase();\n        if (prop in aliasMap)\n          prop = aliasMap[prop];\n        if (!(prop in refs)) {\n          if (/[+_-]/.test(prop)) {\n            const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n            refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n          } else {\n            refs[prop] = ref(false);\n          }\n        }\n        const r = Reflect.get(target2, prop, rec);\n        return useReactive ? toValue(r) : r;\n      }\n    }\n  );\n  return proxy;\n}\n\nfunction usingElRef(source, cb) {\n  if (toValue(source))\n    cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n  let ranges = [];\n  for (let i = 0; i < timeRanges.length; ++i)\n    ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n  return ranges;\n}\nfunction tracksToArray(tracks) {\n  return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n  src: \"\",\n  tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n  target = toRef(target);\n  options = {\n    ...defaultOptions,\n    ...options\n  };\n  const {\n    document = defaultDocument\n  } = options;\n  const currentTime = ref(0);\n  const duration = ref(0);\n  const seeking = ref(false);\n  const volume = ref(1);\n  const waiting = ref(false);\n  const ended = ref(false);\n  const playing = ref(false);\n  const rate = ref(1);\n  const stalled = ref(false);\n  const buffered = ref([]);\n  const tracks = ref([]);\n  const selectedTrack = ref(-1);\n  const isPictureInPicture = ref(false);\n  const muted = ref(false);\n  const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n  const sourceErrorEvent = createEventHook();\n  const disableTrack = (track) => {\n    usingElRef(target, (el) => {\n      if (track) {\n        const id = typeof track === \"number\" ? track : track.id;\n        el.textTracks[id].mode = \"disabled\";\n      } else {\n        for (let i = 0; i < el.textTracks.length; ++i)\n          el.textTracks[i].mode = \"disabled\";\n      }\n      selectedTrack.value = -1;\n    });\n  };\n  const enableTrack = (track, disableTracks = true) => {\n    usingElRef(target, (el) => {\n      const id = typeof track === \"number\" ? track : track.id;\n      if (disableTracks)\n        disableTrack();\n      el.textTracks[id].mode = \"showing\";\n      selectedTrack.value = id;\n    });\n  };\n  const togglePictureInPicture = () => {\n    return new Promise((resolve, reject) => {\n      usingElRef(target, async (el) => {\n        if (supportsPictureInPicture) {\n          if (!isPictureInPicture.value) {\n            el.requestPictureInPicture().then(resolve).catch(reject);\n          } else {\n            document.exitPictureInPicture().then(resolve).catch(reject);\n          }\n        }\n      });\n    });\n  };\n  watchEffect(() => {\n    if (!document)\n      return;\n    const el = toValue(target);\n    if (!el)\n      return;\n    const src = toValue(options.src);\n    let sources = [];\n    if (!src)\n      return;\n    if (typeof src === \"string\")\n      sources = [{ src }];\n    else if (Array.isArray(src))\n      sources = src;\n    else if (isObject(src))\n      sources = [src];\n    el.querySelectorAll(\"source\").forEach((e) => {\n      e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n      e.remove();\n    });\n    sources.forEach(({ src: src2, type }) => {\n      const source = document.createElement(\"source\");\n      source.setAttribute(\"src\", src2);\n      source.setAttribute(\"type\", type || \"\");\n      source.addEventListener(\"error\", sourceErrorEvent.trigger);\n      el.appendChild(source);\n    });\n    el.load();\n  });\n  tryOnScopeDispose(() => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n  });\n  watch([target, volume], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.volume = volume.value;\n  });\n  watch([target, muted], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.muted = muted.value;\n  });\n  watch([target, rate], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.playbackRate = rate.value;\n  });\n  watchEffect(() => {\n    if (!document)\n      return;\n    const textTracks = toValue(options.tracks);\n    const el = toValue(target);\n    if (!textTracks || !textTracks.length || !el)\n      return;\n    el.querySelectorAll(\"track\").forEach((e) => e.remove());\n    textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n      const track = document.createElement(\"track\");\n      track.default = isDefault || false;\n      track.kind = kind;\n      track.label = label;\n      track.src = src;\n      track.srclang = srcLang;\n      if (track.default)\n        selectedTrack.value = i;\n      el.appendChild(track);\n    });\n  });\n  const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    el.currentTime = time;\n  });\n  const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    if (isPlaying)\n      el.play();\n    else\n      el.pause();\n  });\n  useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n  useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n  useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n  useEventListener(target, \"seeking\", () => seeking.value = true);\n  useEventListener(target, \"seeked\", () => seeking.value = false);\n  useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n    waiting.value = true;\n    ignorePlayingUpdates(() => playing.value = false);\n  });\n  useEventListener(target, \"loadeddata\", () => waiting.value = false);\n  useEventListener(target, \"playing\", () => {\n    waiting.value = false;\n    ended.value = false;\n    ignorePlayingUpdates(() => playing.value = true);\n  });\n  useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n  useEventListener(target, \"stalled\", () => stalled.value = true);\n  useEventListener(target, \"ended\", () => ended.value = true);\n  useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n  useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n  useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n  useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n  useEventListener(target, \"volumechange\", () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    volume.value = el.volume;\n    muted.value = el.muted;\n  });\n  const listeners = [];\n  const stop = watch([target], () => {\n    const el = toValue(target);\n    if (!el)\n      return;\n    stop();\n    listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n    listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n    listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n  });\n  tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n  return {\n    currentTime,\n    duration,\n    waiting,\n    seeking,\n    ended,\n    stalled,\n    buffered,\n    playing,\n    rate,\n    // Volume\n    volume,\n    muted,\n    // Tracks\n    tracks,\n    selectedTrack,\n    enableTrack,\n    disableTrack,\n    // Picture in Picture\n    supportsPictureInPicture,\n    togglePictureInPicture,\n    isPictureInPicture,\n    // Events\n    onSourceError: sourceErrorEvent.on\n  };\n}\n\nfunction getMapVue2Compat() {\n  const data = shallowReactive({});\n  return {\n    get: (key) => data[key],\n    set: (key, value) => set(data, key, value),\n    has: (key) => hasOwn(data, key),\n    delete: (key) => del(data, key),\n    clear: () => {\n      Object.keys(data).forEach((key) => {\n        del(data, key);\n      });\n    }\n  };\n}\nfunction useMemoize(resolver, options) {\n  const initCache = () => {\n    if (options == null ? void 0 : options.cache)\n      return shallowReactive(options.cache);\n    if (isVue2)\n      return getMapVue2Compat();\n    return shallowReactive(/* @__PURE__ */ new Map());\n  };\n  const cache = initCache();\n  const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n  const _loadData = (key, ...args) => {\n    cache.set(key, resolver(...args));\n    return cache.get(key);\n  };\n  const loadData = (...args) => _loadData(generateKey(...args), ...args);\n  const deleteData = (...args) => {\n    cache.delete(generateKey(...args));\n  };\n  const clearData = () => {\n    cache.clear();\n  };\n  const memoized = (...args) => {\n    const key = generateKey(...args);\n    if (cache.has(key))\n      return cache.get(key);\n    return _loadData(key, ...args);\n  };\n  memoized.load = loadData;\n  memoized.delete = deleteData;\n  memoized.clear = clearData;\n  memoized.generateKey = generateKey;\n  memoized.cache = cache;\n  return memoized;\n}\n\nfunction useMemory(options = {}) {\n  const memory = ref();\n  const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n  if (isSupported.value) {\n    const { interval = 1e3 } = options;\n    useIntervalFn(() => {\n      memory.value = performance.memory;\n    }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n  }\n  return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n  page: (event) => [event.pageX, event.pageY],\n  client: (event) => [event.clientX, event.clientY],\n  screen: (event) => [event.screenX, event.screenY],\n  movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n  const {\n    type = \"page\",\n    touch = true,\n    resetOnTouchEnds = false,\n    initialValue = { x: 0, y: 0 },\n    window = defaultWindow,\n    target = window,\n    scroll = true,\n    eventFilter\n  } = options;\n  let _prevMouseEvent = null;\n  const x = ref(initialValue.x);\n  const y = ref(initialValue.y);\n  const sourceType = ref(null);\n  const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n  const mouseHandler = (event) => {\n    const result = extractor(event);\n    _prevMouseEvent = event;\n    if (result) {\n      [x.value, y.value] = result;\n      sourceType.value = \"mouse\";\n    }\n  };\n  const touchHandler = (event) => {\n    if (event.touches.length > 0) {\n      const result = extractor(event.touches[0]);\n      if (result) {\n        [x.value, y.value] = result;\n        sourceType.value = \"touch\";\n      }\n    }\n  };\n  const scrollHandler = () => {\n    if (!_prevMouseEvent || !window)\n      return;\n    const pos = extractor(_prevMouseEvent);\n    if (_prevMouseEvent instanceof MouseEvent && pos) {\n      x.value = pos[0] + window.scrollX;\n      y.value = pos[1] + window.scrollY;\n    }\n  };\n  const reset = () => {\n    x.value = initialValue.x;\n    y.value = initialValue.y;\n  };\n  const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n  const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n  const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n  if (target) {\n    const listenerOptions = { passive: true };\n    useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n    if (touch && type !== \"movement\") {\n      useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n      if (resetOnTouchEnds)\n        useEventListener(target, \"touchend\", reset, listenerOptions);\n    }\n    if (scroll && type === \"page\")\n      useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n  }\n  return {\n    x,\n    y,\n    sourceType\n  };\n}\n\nfunction useMouseInElement(target, options = {}) {\n  const {\n    handleOutside = true,\n    window = defaultWindow\n  } = options;\n  const type = options.type || \"page\";\n  const { x, y, sourceType } = useMouse(options);\n  const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n  const elementX = ref(0);\n  const elementY = ref(0);\n  const elementPositionX = ref(0);\n  const elementPositionY = ref(0);\n  const elementHeight = ref(0);\n  const elementWidth = ref(0);\n  const isOutside = ref(true);\n  let stop = () => {\n  };\n  if (window) {\n    stop = watch(\n      [targetRef, x, y],\n      () => {\n        const el = unrefElement(targetRef);\n        if (!el || !(el instanceof HTMLElement))\n          return;\n        const {\n          left,\n          top,\n          width,\n          height\n        } = el.getBoundingClientRect();\n        elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n        elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n        elementHeight.value = height;\n        elementWidth.value = width;\n        const elX = x.value - elementPositionX.value;\n        const elY = y.value - elementPositionY.value;\n        isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n        if (handleOutside || !isOutside.value) {\n          elementX.value = elX;\n          elementY.value = elY;\n        }\n      },\n      { immediate: true }\n    );\n    useEventListener(document, \"mouseleave\", () => {\n      isOutside.value = true;\n    });\n  }\n  return {\n    x,\n    y,\n    sourceType,\n    elementX,\n    elementY,\n    elementPositionX,\n    elementPositionY,\n    elementHeight,\n    elementWidth,\n    isOutside,\n    stop\n  };\n}\n\nfunction useMousePressed(options = {}) {\n  const {\n    touch = true,\n    drag = true,\n    capture = false,\n    initialValue = false,\n    window = defaultWindow\n  } = options;\n  const pressed = ref(initialValue);\n  const sourceType = ref(null);\n  if (!window) {\n    return {\n      pressed,\n      sourceType\n    };\n  }\n  const onPressed = (srcType) => () => {\n    pressed.value = true;\n    sourceType.value = srcType;\n  };\n  const onReleased = () => {\n    pressed.value = false;\n    sourceType.value = null;\n  };\n  const target = computed(() => unrefElement(options.target) || window);\n  useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n  useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n  useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n  if (drag) {\n    useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n    useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n    useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n  }\n  if (touch) {\n    useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n    useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n    useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n  }\n  return {\n    pressed,\n    sourceType\n  };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n  const { window = defaultWindow } = options;\n  const navigator = window == null ? void 0 : window.navigator;\n  const isSupported = useSupported(() => navigator && \"language\" in navigator);\n  const language = ref(navigator == null ? void 0 : navigator.language);\n  useEventListener(window, \"languagechange\", () => {\n    if (navigator)\n      language.value = navigator.language;\n  });\n  return {\n    isSupported,\n    language\n  };\n}\n\nfunction useNetwork(options = {}) {\n  const { window = defaultWindow } = options;\n  const navigator = window == null ? void 0 : window.navigator;\n  const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n  const isOnline = ref(true);\n  const saveData = ref(false);\n  const offlineAt = ref(void 0);\n  const onlineAt = ref(void 0);\n  const downlink = ref(void 0);\n  const downlinkMax = ref(void 0);\n  const rtt = ref(void 0);\n  const effectiveType = ref(void 0);\n  const type = ref(\"unknown\");\n  const connection = isSupported.value && navigator.connection;\n  function updateNetworkInformation() {\n    if (!navigator)\n      return;\n    isOnline.value = navigator.onLine;\n    offlineAt.value = isOnline.value ? void 0 : Date.now();\n    onlineAt.value = isOnline.value ? Date.now() : void 0;\n    if (connection) {\n      downlink.value = connection.downlink;\n      downlinkMax.value = connection.downlinkMax;\n      effectiveType.value = connection.effectiveType;\n      rtt.value = connection.rtt;\n      saveData.value = connection.saveData;\n      type.value = connection.type;\n    }\n  }\n  if (window) {\n    useEventListener(window, \"offline\", () => {\n      isOnline.value = false;\n      offlineAt.value = Date.now();\n    });\n    useEventListener(window, \"online\", () => {\n      isOnline.value = true;\n      onlineAt.value = Date.now();\n    });\n  }\n  if (connection)\n    useEventListener(connection, \"change\", updateNetworkInformation, false);\n  updateNetworkInformation();\n  return {\n    isSupported,\n    isOnline,\n    saveData,\n    offlineAt,\n    onlineAt,\n    downlink,\n    downlinkMax,\n    effectiveType,\n    rtt,\n    type\n  };\n}\n\nfunction useNow(options = {}) {\n  const {\n    controls: exposeControls = false,\n    interval = \"requestAnimationFrame\"\n  } = options;\n  const now = ref(/* @__PURE__ */ new Date());\n  const update = () => now.value = /* @__PURE__ */ new Date();\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n  if (exposeControls) {\n    return {\n      now,\n      ...controls\n    };\n  } else {\n    return now;\n  }\n}\n\nfunction useObjectUrl(object) {\n  const url = ref();\n  const release = () => {\n    if (url.value)\n      URL.revokeObjectURL(url.value);\n    url.value = void 0;\n  };\n  watch(\n    () => toValue(object),\n    (newObject) => {\n      release();\n      if (newObject)\n        url.value = URL.createObjectURL(newObject);\n    },\n    { immediate: true }\n  );\n  tryOnScopeDispose(release);\n  return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n  if (typeof value === \"function\" || isReadonly(value))\n    return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n  const _value = ref(value);\n  return computed({\n    get() {\n      return _value.value = clamp(_value.value, toValue(min), toValue(max));\n    },\n    set(value2) {\n      _value.value = clamp(value2, toValue(min), toValue(max));\n    }\n  });\n}\n\nfunction useOffsetPagination(options) {\n  const {\n    total = Number.POSITIVE_INFINITY,\n    pageSize = 10,\n    page = 1,\n    onPageChange = noop,\n    onPageSizeChange = noop,\n    onPageCountChange = noop\n  } = options;\n  const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n  const pageCount = computed(() => Math.max(\n    1,\n    Math.ceil(toValue(total) / toValue(currentPageSize))\n  ));\n  const currentPage = useClamp(page, 1, pageCount);\n  const isFirstPage = computed(() => currentPage.value === 1);\n  const isLastPage = computed(() => currentPage.value === pageCount.value);\n  if (isRef(page)) {\n    syncRef(page, currentPage, {\n      direction: isReadonly(page) ? \"ltr\" : \"both\"\n    });\n  }\n  if (isRef(pageSize)) {\n    syncRef(pageSize, currentPageSize, {\n      direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n    });\n  }\n  function prev() {\n    currentPage.value--;\n  }\n  function next() {\n    currentPage.value++;\n  }\n  const returnValue = {\n    currentPage,\n    currentPageSize,\n    pageCount,\n    isFirstPage,\n    isLastPage,\n    prev,\n    next\n  };\n  watch(currentPage, () => {\n    onPageChange(reactive(returnValue));\n  });\n  watch(currentPageSize, () => {\n    onPageSizeChange(reactive(returnValue));\n  });\n  watch(pageCount, () => {\n    onPageCountChange(reactive(returnValue));\n  });\n  return returnValue;\n}\n\nfunction useOnline(options = {}) {\n  const { isOnline } = useNetwork(options);\n  return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n  const { window = defaultWindow } = options;\n  const isLeft = ref(false);\n  const handler = (event) => {\n    if (!window)\n      return;\n    event = event || window.event;\n    const from = event.relatedTarget || event.toElement;\n    isLeft.value = !from;\n  };\n  if (window) {\n    useEventListener(window, \"mouseout\", handler, { passive: true });\n    useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n    useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n  }\n  return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n  const screenOrientation = isSupported.value ? window.screen.orientation : {};\n  const orientation = ref(screenOrientation.type);\n  const angle = ref(screenOrientation.angle || 0);\n  if (isSupported.value) {\n    useEventListener(window, \"orientationchange\", () => {\n      orientation.value = screenOrientation.type;\n      angle.value = screenOrientation.angle;\n    });\n  }\n  const lockOrientation = (type) => {\n    if (isSupported.value && typeof screenOrientation.lock === \"function\")\n      return screenOrientation.lock(type);\n    return Promise.reject(new Error(\"Not supported\"));\n  };\n  const unlockOrientation = () => {\n    if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n      screenOrientation.unlock();\n  };\n  return {\n    isSupported,\n    orientation,\n    angle,\n    lockOrientation,\n    unlockOrientation\n  };\n}\n\nfunction useParallax(target, options = {}) {\n  const {\n    deviceOrientationTiltAdjust = (i) => i,\n    deviceOrientationRollAdjust = (i) => i,\n    mouseTiltAdjust = (i) => i,\n    mouseRollAdjust = (i) => i,\n    window = defaultWindow\n  } = options;\n  const orientation = reactive(useDeviceOrientation({ window }));\n  const screenOrientation = reactive(useScreenOrientation({ window }));\n  const {\n    elementX: x,\n    elementY: y,\n    elementWidth: width,\n    elementHeight: height\n  } = useMouseInElement(target, { handleOutside: false, window });\n  const source = computed(() => {\n    if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n      return \"deviceOrientation\";\n    }\n    return \"mouse\";\n  });\n  const roll = computed(() => {\n    if (source.value === \"deviceOrientation\") {\n      let value;\n      switch (screenOrientation.orientation) {\n        case \"landscape-primary\":\n          value = orientation.gamma / 90;\n          break;\n        case \"landscape-secondary\":\n          value = -orientation.gamma / 90;\n          break;\n        case \"portrait-primary\":\n          value = -orientation.beta / 90;\n          break;\n        case \"portrait-secondary\":\n          value = orientation.beta / 90;\n          break;\n        default:\n          value = -orientation.beta / 90;\n      }\n      return deviceOrientationRollAdjust(value);\n    } else {\n      const value = -(y.value - height.value / 2) / height.value;\n      return mouseRollAdjust(value);\n    }\n  });\n  const tilt = computed(() => {\n    if (source.value === \"deviceOrientation\") {\n      let value;\n      switch (screenOrientation.orientation) {\n        case \"landscape-primary\":\n          value = orientation.beta / 90;\n          break;\n        case \"landscape-secondary\":\n          value = -orientation.beta / 90;\n          break;\n        case \"portrait-primary\":\n          value = orientation.gamma / 90;\n          break;\n        case \"portrait-secondary\":\n          value = -orientation.gamma / 90;\n          break;\n        default:\n          value = orientation.gamma / 90;\n      }\n      return deviceOrientationTiltAdjust(value);\n    } else {\n      const value = (x.value - width.value / 2) / width.value;\n      return mouseTiltAdjust(value);\n    }\n  });\n  return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n  const parentElement = shallowRef();\n  const update = () => {\n    const el = unrefElement(element);\n    if (el)\n      parentElement.value = el.parentElement;\n  };\n  tryOnMounted(update);\n  watch(() => toValue(element), update);\n  return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n  const {\n    window = defaultWindow,\n    immediate = true,\n    ...performanceOptions\n  } = options;\n  const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n  let observer;\n  const stop = () => {\n    observer == null ? void 0 : observer.disconnect();\n  };\n  const start = () => {\n    if (isSupported.value) {\n      stop();\n      observer = new PerformanceObserver(callback);\n      observer.observe(performanceOptions);\n    }\n  };\n  tryOnScopeDispose(stop);\n  if (immediate)\n    start();\n  return {\n    isSupported,\n    start,\n    stop\n  };\n}\n\nconst defaultState = {\n  x: 0,\n  y: 0,\n  pointerId: 0,\n  pressure: 0,\n  tiltX: 0,\n  tiltY: 0,\n  width: 0,\n  height: 0,\n  twist: 0,\n  pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n  const {\n    target = defaultWindow\n  } = options;\n  const isInside = ref(false);\n  const state = ref(options.initialValue || {});\n  Object.assign(state.value, defaultState, state.value);\n  const handler = (event) => {\n    isInside.value = true;\n    if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n      return;\n    state.value = objectPick(event, keys, false);\n  };\n  if (target) {\n    const listenerOptions = { passive: true };\n    useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n    useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n  }\n  return {\n    ...toRefs(state),\n    isInside\n  };\n}\n\nfunction usePointerLock(target, options = {}) {\n  const { document = defaultDocument } = options;\n  const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n  const element = ref();\n  const triggerElement = ref();\n  let targetElement;\n  if (isSupported.value) {\n    useEventListener(document, \"pointerlockchange\", () => {\n      var _a;\n      const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n      if (targetElement && currentElement === targetElement) {\n        element.value = document.pointerLockElement;\n        if (!element.value)\n          targetElement = triggerElement.value = null;\n      }\n    });\n    useEventListener(document, \"pointerlockerror\", () => {\n      var _a;\n      const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n      if (targetElement && currentElement === targetElement) {\n        const action = document.pointerLockElement ? \"release\" : \"acquire\";\n        throw new Error(`Failed to ${action} pointer lock.`);\n      }\n    });\n  }\n  async function lock(e) {\n    var _a;\n    if (!isSupported.value)\n      throw new Error(\"Pointer Lock API is not supported by your browser.\");\n    triggerElement.value = e instanceof Event ? e.currentTarget : null;\n    targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n    if (!targetElement)\n      throw new Error(\"Target element undefined.\");\n    targetElement.requestPointerLock();\n    return await until(element).toBe(targetElement);\n  }\n  async function unlock() {\n    if (!element.value)\n      return false;\n    document.exitPointerLock();\n    await until(element).toBeNull();\n    return true;\n  }\n  return {\n    isSupported,\n    element,\n    triggerElement,\n    lock,\n    unlock\n  };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n  const targetRef = toRef(target);\n  const {\n    threshold = 50,\n    onSwipe,\n    onSwipeEnd,\n    onSwipeStart,\n    disableTextSelect = false\n  } = options;\n  const posStart = reactive({ x: 0, y: 0 });\n  const updatePosStart = (x, y) => {\n    posStart.x = x;\n    posStart.y = y;\n  };\n  const posEnd = reactive({ x: 0, y: 0 });\n  const updatePosEnd = (x, y) => {\n    posEnd.x = x;\n    posEnd.y = y;\n  };\n  const distanceX = computed(() => posStart.x - posEnd.x);\n  const distanceY = computed(() => posStart.y - posEnd.y);\n  const { max, abs } = Math;\n  const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n  const isSwiping = ref(false);\n  const isPointerDown = ref(false);\n  const direction = computed(() => {\n    if (!isThresholdExceeded.value)\n      return \"none\";\n    if (abs(distanceX.value) > abs(distanceY.value)) {\n      return distanceX.value > 0 ? \"left\" : \"right\";\n    } else {\n      return distanceY.value > 0 ? \"up\" : \"down\";\n    }\n  });\n  const eventIsAllowed = (e) => {\n    var _a, _b, _c;\n    const isReleasingButton = e.buttons === 0;\n    const isPrimaryButton = e.buttons === 1;\n    return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n  };\n  const stops = [\n    useEventListener(target, \"pointerdown\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      isPointerDown.value = true;\n      const eventTarget = e.target;\n      eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n      const { clientX: x, clientY: y } = e;\n      updatePosStart(x, y);\n      updatePosEnd(x, y);\n      onSwipeStart == null ? void 0 : onSwipeStart(e);\n    }),\n    useEventListener(target, \"pointermove\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      if (!isPointerDown.value)\n        return;\n      const { clientX: x, clientY: y } = e;\n      updatePosEnd(x, y);\n      if (!isSwiping.value && isThresholdExceeded.value)\n        isSwiping.value = true;\n      if (isSwiping.value)\n        onSwipe == null ? void 0 : onSwipe(e);\n    }),\n    useEventListener(target, \"pointerup\", (e) => {\n      if (!eventIsAllowed(e))\n        return;\n      if (isSwiping.value)\n        onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n      isPointerDown.value = false;\n      isSwiping.value = false;\n    })\n  ];\n  tryOnMounted(() => {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n    if (disableTextSelect) {\n      (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n      (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n      (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n    }\n  });\n  const stop = () => stops.forEach((s) => s());\n  return {\n    isSwiping: readonly(isSwiping),\n    direction: readonly(direction),\n    posStart: readonly(posStart),\n    posEnd: readonly(posEnd),\n    distanceX,\n    distanceY,\n    stop\n  };\n}\n\nfunction usePreferredColorScheme(options) {\n  const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n  const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n  return computed(() => {\n    if (isDark.value)\n      return \"dark\";\n    if (isLight.value)\n      return \"light\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePreferredContrast(options) {\n  const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n  const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n  const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n  return computed(() => {\n    if (isMore.value)\n      return \"more\";\n    if (isLess.value)\n      return \"less\";\n    if (isCustom.value)\n      return \"custom\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePreferredLanguages(options = {}) {\n  const { window = defaultWindow } = options;\n  if (!window)\n    return ref([\"en\"]);\n  const navigator = window.navigator;\n  const value = ref(navigator.languages);\n  useEventListener(window, \"languagechange\", () => {\n    value.value = navigator.languages;\n  });\n  return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n  const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n  return computed(() => {\n    if (isReduced.value)\n      return \"reduce\";\n    return \"no-preference\";\n  });\n}\n\nfunction usePrevious(value, initialValue) {\n  const previous = shallowRef(initialValue);\n  watch(\n    toRef(value),\n    (_, oldValue) => {\n      previous.value = oldValue;\n    },\n    { flush: \"sync\" }\n  );\n  return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n  const top = ref(\"\");\n  const right = ref(\"\");\n  const bottom = ref(\"\");\n  const left = ref(\"\");\n  if (isClient) {\n    const topCssVar = useCssVar(topVarName);\n    const rightCssVar = useCssVar(rightVarName);\n    const bottomCssVar = useCssVar(bottomVarName);\n    const leftCssVar = useCssVar(leftVarName);\n    topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n    rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n    bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n    leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n    update();\n    useEventListener(\"resize\", useDebounceFn(update));\n  }\n  function update() {\n    top.value = getValue(topVarName);\n    right.value = getValue(rightVarName);\n    bottom.value = getValue(bottomVarName);\n    left.value = getValue(leftVarName);\n  }\n  return {\n    top,\n    right,\n    bottom,\n    left,\n    update\n  };\n}\nfunction getValue(position) {\n  return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n  const {\n    immediate = true,\n    manual = false,\n    type = \"text/javascript\",\n    async = true,\n    crossOrigin,\n    referrerPolicy,\n    noModule,\n    defer,\n    document = defaultDocument,\n    attrs = {}\n  } = options;\n  const scriptTag = ref(null);\n  let _promise = null;\n  const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n    const resolveWithElement = (el2) => {\n      scriptTag.value = el2;\n      resolve(el2);\n      return el2;\n    };\n    if (!document) {\n      resolve(false);\n      return;\n    }\n    let shouldAppend = false;\n    let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n    if (!el) {\n      el = document.createElement(\"script\");\n      el.type = type;\n      el.async = async;\n      el.src = toValue(src);\n      if (defer)\n        el.defer = defer;\n      if (crossOrigin)\n        el.crossOrigin = crossOrigin;\n      if (noModule)\n        el.noModule = noModule;\n      if (referrerPolicy)\n        el.referrerPolicy = referrerPolicy;\n      Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n      shouldAppend = true;\n    } else if (el.hasAttribute(\"data-loaded\")) {\n      resolveWithElement(el);\n    }\n    el.addEventListener(\"error\", (event) => reject(event));\n    el.addEventListener(\"abort\", (event) => reject(event));\n    el.addEventListener(\"load\", () => {\n      el.setAttribute(\"data-loaded\", \"true\");\n      onLoaded(el);\n      resolveWithElement(el);\n    });\n    if (shouldAppend)\n      el = document.head.appendChild(el);\n    if (!waitForScriptLoad)\n      resolveWithElement(el);\n  });\n  const load = (waitForScriptLoad = true) => {\n    if (!_promise)\n      _promise = loadScript(waitForScriptLoad);\n    return _promise;\n  };\n  const unload = () => {\n    if (!document)\n      return;\n    _promise = null;\n    if (scriptTag.value)\n      scriptTag.value = null;\n    const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n    if (el)\n      document.head.removeChild(el);\n  };\n  if (immediate && !manual)\n    tryOnMounted(load);\n  if (!manual)\n    tryOnUnmounted(unload);\n  return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n  const style = window.getComputedStyle(ele);\n  if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n    return true;\n  } else {\n    const parent = ele.parentNode;\n    if (!parent || parent.tagName === \"BODY\")\n      return false;\n    return checkOverflowScroll(parent);\n  }\n}\nfunction preventDefault(rawEvent) {\n  const e = rawEvent || window.event;\n  const _target = e.target;\n  if (checkOverflowScroll(_target))\n    return false;\n  if (e.touches.length > 1)\n    return true;\n  if (e.preventDefault)\n    e.preventDefault();\n  return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n  const isLocked = ref(initialState);\n  let stopTouchMoveListener = null;\n  let initialOverflow = \"\";\n  watch(toRef(element), (el) => {\n    const target = resolveElement(toValue(el));\n    if (target) {\n      const ele = target;\n      if (!elInitialOverflow.get(ele))\n        elInitialOverflow.set(ele, ele.style.overflow);\n      if (ele.style.overflow !== \"hidden\")\n        initialOverflow = ele.style.overflow;\n      if (ele.style.overflow === \"hidden\")\n        return isLocked.value = true;\n      if (isLocked.value)\n        return ele.style.overflow = \"hidden\";\n    }\n  }, {\n    immediate: true\n  });\n  const lock = () => {\n    const el = resolveElement(toValue(element));\n    if (!el || isLocked.value)\n      return;\n    if (isIOS) {\n      stopTouchMoveListener = useEventListener(\n        el,\n        \"touchmove\",\n        (e) => {\n          preventDefault(e);\n        },\n        { passive: false }\n      );\n    }\n    el.style.overflow = \"hidden\";\n    isLocked.value = true;\n  };\n  const unlock = () => {\n    const el = resolveElement(toValue(element));\n    if (!el || !isLocked.value)\n      return;\n    if (isIOS)\n      stopTouchMoveListener == null ? void 0 : stopTouchMoveListener();\n    el.style.overflow = initialOverflow;\n    elInitialOverflow.delete(el);\n    isLocked.value = false;\n  };\n  tryOnScopeDispose(unlock);\n  return computed({\n    get() {\n      return isLocked.value;\n    },\n    set(v) {\n      if (v)\n        lock();\n      else unlock();\n    }\n  });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n  const { window = defaultWindow } = options;\n  return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n  const { navigator = defaultNavigator } = options;\n  const _navigator = navigator;\n  const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n  const share = async (overrideOptions = {}) => {\n    if (isSupported.value) {\n      const data = {\n        ...toValue(shareOptions),\n        ...toValue(overrideOptions)\n      };\n      let granted = true;\n      if (data.files && _navigator.canShare)\n        granted = _navigator.canShare({ files: data.files });\n      if (granted)\n        return _navigator.share(data);\n    }\n  };\n  return {\n    isSupported,\n    share\n  };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n  var _a, _b, _c, _d;\n  const [source] = args;\n  let compareFn = defaultCompare;\n  let options = {};\n  if (args.length === 2) {\n    if (typeof args[1] === \"object\") {\n      options = args[1];\n      compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n    } else {\n      compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n    }\n  } else if (args.length > 2) {\n    compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n    options = (_d = args[2]) != null ? _d : {};\n  }\n  const {\n    dirty = false,\n    sortFn = defaultSortFn\n  } = options;\n  if (!dirty)\n    return computed(() => sortFn([...toValue(source)], compareFn));\n  watchEffect(() => {\n    const result = sortFn(toValue(source), compareFn);\n    if (isRef(source))\n      source.value = result;\n    else\n      source.splice(0, source.length, ...result);\n  });\n  return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n  const {\n    interimResults = true,\n    continuous = true,\n    maxAlternatives = 1,\n    window = defaultWindow\n  } = options;\n  const lang = toRef(options.lang || \"en-US\");\n  const isListening = ref(false);\n  const isFinal = ref(false);\n  const result = ref(\"\");\n  const error = shallowRef(void 0);\n  const toggle = (value = !isListening.value) => {\n    isListening.value = value;\n  };\n  const start = () => {\n    isListening.value = true;\n  };\n  const stop = () => {\n    isListening.value = false;\n  };\n  const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n  const isSupported = useSupported(() => SpeechRecognition);\n  let recognition;\n  if (isSupported.value) {\n    recognition = new SpeechRecognition();\n    recognition.continuous = continuous;\n    recognition.interimResults = interimResults;\n    recognition.lang = toValue(lang);\n    recognition.maxAlternatives = maxAlternatives;\n    recognition.onstart = () => {\n      isFinal.value = false;\n    };\n    watch(lang, (lang2) => {\n      if (recognition && !isListening.value)\n        recognition.lang = lang2;\n    });\n    recognition.onresult = (event) => {\n      const currentResult = event.results[event.resultIndex];\n      const { transcript } = currentResult[0];\n      isFinal.value = currentResult.isFinal;\n      result.value = transcript;\n      error.value = void 0;\n    };\n    recognition.onerror = (event) => {\n      error.value = event;\n    };\n    recognition.onend = () => {\n      isListening.value = false;\n      recognition.lang = toValue(lang);\n    };\n    watch(isListening, () => {\n      if (isListening.value)\n        recognition.start();\n      else\n        recognition.stop();\n    });\n  }\n  tryOnScopeDispose(() => {\n    isListening.value = false;\n  });\n  return {\n    isSupported,\n    isListening,\n    isFinal,\n    recognition,\n    result,\n    error,\n    toggle,\n    start,\n    stop\n  };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n  const {\n    pitch = 1,\n    rate = 1,\n    volume = 1,\n    window = defaultWindow\n  } = options;\n  const synth = window && window.speechSynthesis;\n  const isSupported = useSupported(() => synth);\n  const isPlaying = ref(false);\n  const status = ref(\"init\");\n  const spokenText = toRef(text || \"\");\n  const lang = toRef(options.lang || \"en-US\");\n  const error = shallowRef(void 0);\n  const toggle = (value = !isPlaying.value) => {\n    isPlaying.value = value;\n  };\n  const bindEventsForUtterance = (utterance2) => {\n    utterance2.lang = toValue(lang);\n    utterance2.voice = toValue(options.voice) || null;\n    utterance2.pitch = toValue(pitch);\n    utterance2.rate = toValue(rate);\n    utterance2.volume = volume;\n    utterance2.onstart = () => {\n      isPlaying.value = true;\n      status.value = \"play\";\n    };\n    utterance2.onpause = () => {\n      isPlaying.value = false;\n      status.value = \"pause\";\n    };\n    utterance2.onresume = () => {\n      isPlaying.value = true;\n      status.value = \"play\";\n    };\n    utterance2.onend = () => {\n      isPlaying.value = false;\n      status.value = \"end\";\n    };\n    utterance2.onerror = (event) => {\n      error.value = event;\n    };\n  };\n  const utterance = computed(() => {\n    isPlaying.value = false;\n    status.value = \"init\";\n    const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n    bindEventsForUtterance(newUtterance);\n    return newUtterance;\n  });\n  const speak = () => {\n    synth.cancel();\n    if (utterance)\n      synth.speak(utterance.value);\n  };\n  const stop = () => {\n    synth.cancel();\n    isPlaying.value = false;\n  };\n  if (isSupported.value) {\n    bindEventsForUtterance(utterance.value);\n    watch(lang, (lang2) => {\n      if (utterance.value && !isPlaying.value)\n        utterance.value.lang = lang2;\n    });\n    if (options.voice) {\n      watch(options.voice, () => {\n        synth.cancel();\n      });\n    }\n    watch(isPlaying, () => {\n      if (isPlaying.value)\n        synth.resume();\n      else\n        synth.pause();\n    });\n  }\n  tryOnScopeDispose(() => {\n    isPlaying.value = false;\n  });\n  return {\n    isSupported,\n    isPlaying,\n    status,\n    utterance,\n    error,\n    stop,\n    toggle,\n    speak\n  };\n}\n\nfunction useStepper(steps, initialStep) {\n  const stepsRef = ref(steps);\n  const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n  const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n  const current = computed(() => at(index.value));\n  const isFirst = computed(() => index.value === 0);\n  const isLast = computed(() => index.value === stepNames.value.length - 1);\n  const next = computed(() => stepNames.value[index.value + 1]);\n  const previous = computed(() => stepNames.value[index.value - 1]);\n  function at(index2) {\n    if (Array.isArray(stepsRef.value))\n      return stepsRef.value[index2];\n    return stepsRef.value[stepNames.value[index2]];\n  }\n  function get(step) {\n    if (!stepNames.value.includes(step))\n      return;\n    return at(stepNames.value.indexOf(step));\n  }\n  function goTo(step) {\n    if (stepNames.value.includes(step))\n      index.value = stepNames.value.indexOf(step);\n  }\n  function goToNext() {\n    if (isLast.value)\n      return;\n    index.value++;\n  }\n  function goToPrevious() {\n    if (isFirst.value)\n      return;\n    index.value--;\n  }\n  function goBackTo(step) {\n    if (isAfter(step))\n      goTo(step);\n  }\n  function isNext(step) {\n    return stepNames.value.indexOf(step) === index.value + 1;\n  }\n  function isPrevious(step) {\n    return stepNames.value.indexOf(step) === index.value - 1;\n  }\n  function isCurrent(step) {\n    return stepNames.value.indexOf(step) === index.value;\n  }\n  function isBefore(step) {\n    return index.value < stepNames.value.indexOf(step);\n  }\n  function isAfter(step) {\n    return index.value > stepNames.value.indexOf(step);\n  }\n  return {\n    steps: stepsRef,\n    stepNames,\n    index,\n    current,\n    next,\n    previous,\n    isFirst,\n    isLast,\n    at,\n    get,\n    goTo,\n    goToNext,\n    goToPrevious,\n    goBackTo,\n    isNext,\n    isPrevious,\n    isCurrent,\n    isBefore,\n    isAfter\n  };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n  var _a;\n  const {\n    flush = \"pre\",\n    deep = true,\n    listenToStorageChanges = true,\n    writeDefaults = true,\n    mergeDefaults = false,\n    shallow,\n    window = defaultWindow,\n    eventFilter,\n    onError = (e) => {\n      console.error(e);\n    }\n  } = options;\n  const rawInit = toValue(initialValue);\n  const type = guessSerializerType(rawInit);\n  const data = (shallow ? shallowRef : ref)(initialValue);\n  const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n  if (!storage) {\n    try {\n      storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n        var _a2;\n        return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n      })();\n    } catch (e) {\n      onError(e);\n    }\n  }\n  async function read(event) {\n    if (!storage || event && event.key !== key)\n      return;\n    try {\n      const rawValue = event ? event.newValue : await storage.getItem(key);\n      if (rawValue == null) {\n        data.value = rawInit;\n        if (writeDefaults && rawInit !== null)\n          await storage.setItem(key, await serializer.write(rawInit));\n      } else if (mergeDefaults) {\n        const value = await serializer.read(rawValue);\n        if (typeof mergeDefaults === \"function\")\n          data.value = mergeDefaults(value, rawInit);\n        else if (type === \"object\" && !Array.isArray(value))\n          data.value = { ...rawInit, ...value };\n        else data.value = value;\n      } else {\n        data.value = await serializer.read(rawValue);\n      }\n    } catch (e) {\n      onError(e);\n    }\n  }\n  read();\n  if (window && listenToStorageChanges)\n    useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n  if (storage) {\n    watchWithFilter(\n      data,\n      async () => {\n        try {\n          if (data.value == null)\n            await storage.removeItem(key);\n          else\n            await storage.setItem(key, await serializer.write(data.value));\n        } catch (e) {\n          onError(e);\n        }\n      },\n      {\n        flush,\n        deep,\n        eventFilter\n      }\n    );\n  }\n  return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n  const isLoaded = ref(false);\n  const {\n    document = defaultDocument,\n    immediate = true,\n    manual = false,\n    id = `vueuse_styletag_${++_id}`\n  } = options;\n  const cssRef = ref(css);\n  let stop = () => {\n  };\n  const load = () => {\n    if (!document)\n      return;\n    const el = document.getElementById(id) || document.createElement(\"style\");\n    if (!el.isConnected) {\n      el.id = id;\n      if (options.media)\n        el.media = options.media;\n      document.head.appendChild(el);\n    }\n    if (isLoaded.value)\n      return;\n    stop = watch(\n      cssRef,\n      (value) => {\n        el.textContent = value;\n      },\n      { immediate: true }\n    );\n    isLoaded.value = true;\n  };\n  const unload = () => {\n    if (!document || !isLoaded.value)\n      return;\n    stop();\n    document.head.removeChild(document.getElementById(id));\n    isLoaded.value = false;\n  };\n  if (immediate && !manual)\n    tryOnMounted(load);\n  if (!manual)\n    tryOnScopeDispose(unload);\n  return {\n    id,\n    css: cssRef,\n    unload,\n    load,\n    isLoaded: readonly(isLoaded)\n  };\n}\n\nfunction useSwipe(target, options = {}) {\n  const {\n    threshold = 50,\n    onSwipe,\n    onSwipeEnd,\n    onSwipeStart,\n    passive = true,\n    window = defaultWindow\n  } = options;\n  const coordsStart = reactive({ x: 0, y: 0 });\n  const coordsEnd = reactive({ x: 0, y: 0 });\n  const diffX = computed(() => coordsStart.x - coordsEnd.x);\n  const diffY = computed(() => coordsStart.y - coordsEnd.y);\n  const { max, abs } = Math;\n  const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n  const isSwiping = ref(false);\n  const direction = computed(() => {\n    if (!isThresholdExceeded.value)\n      return \"none\";\n    if (abs(diffX.value) > abs(diffY.value)) {\n      return diffX.value > 0 ? \"left\" : \"right\";\n    } else {\n      return diffY.value > 0 ? \"up\" : \"down\";\n    }\n  });\n  const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n  const updateCoordsStart = (x, y) => {\n    coordsStart.x = x;\n    coordsStart.y = y;\n  };\n  const updateCoordsEnd = (x, y) => {\n    coordsEnd.x = x;\n    coordsEnd.y = y;\n  };\n  let listenerOptions;\n  const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n  if (!passive)\n    listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n  else\n    listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n  const onTouchEnd = (e) => {\n    if (isSwiping.value)\n      onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n    isSwiping.value = false;\n  };\n  const stops = [\n    useEventListener(target, \"touchstart\", (e) => {\n      if (e.touches.length !== 1)\n        return;\n      if (listenerOptions.capture && !listenerOptions.passive)\n        e.preventDefault();\n      const [x, y] = getTouchEventCoords(e);\n      updateCoordsStart(x, y);\n      updateCoordsEnd(x, y);\n      onSwipeStart == null ? void 0 : onSwipeStart(e);\n    }, listenerOptions),\n    useEventListener(target, \"touchmove\", (e) => {\n      if (e.touches.length !== 1)\n        return;\n      const [x, y] = getTouchEventCoords(e);\n      updateCoordsEnd(x, y);\n      if (!isSwiping.value && isThresholdExceeded.value)\n        isSwiping.value = true;\n      if (isSwiping.value)\n        onSwipe == null ? void 0 : onSwipe(e);\n    }, listenerOptions),\n    useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n  ];\n  const stop = () => stops.forEach((s) => s());\n  return {\n    isPassiveEventSupported,\n    isSwiping,\n    direction,\n    coordsStart,\n    coordsEnd,\n    lengthX: diffX,\n    lengthY: diffY,\n    stop\n  };\n}\nfunction checkPassiveEventSupport(document) {\n  if (!document)\n    return false;\n  let supportsPassive = false;\n  const optionsBlock = {\n    get passive() {\n      supportsPassive = true;\n      return false;\n    }\n  };\n  document.addEventListener(\"x\", noop, optionsBlock);\n  document.removeEventListener(\"x\", noop);\n  return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n  const refs = ref([]);\n  refs.value.set = (el) => {\n    if (el)\n      refs.value.push(el);\n  };\n  onBeforeUpdate(() => {\n    refs.value.length = 0;\n  });\n  return refs;\n}\n\nfunction useTextDirection(options = {}) {\n  const {\n    document = defaultDocument,\n    selector = \"html\",\n    observe = false,\n    initialValue = \"ltr\"\n  } = options;\n  function getValue() {\n    var _a, _b;\n    return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n  }\n  const dir = ref(getValue());\n  tryOnMounted(() => dir.value = getValue());\n  if (observe && document) {\n    useMutationObserver(\n      document.querySelector(selector),\n      () => dir.value = getValue(),\n      { attributes: true }\n    );\n  }\n  return computed({\n    get() {\n      return dir.value;\n    },\n    set(v) {\n      var _a, _b;\n      dir.value = v;\n      if (!document)\n        return;\n      if (dir.value)\n        (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n      else\n        (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n    }\n  });\n}\n\nfunction getRangesFromSelection(selection) {\n  var _a;\n  const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n  return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n  const {\n    window = defaultWindow\n  } = options;\n  const selection = ref(null);\n  const text = computed(() => {\n    var _a, _b;\n    return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n  });\n  const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n  const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n  function onSelectionChange() {\n    selection.value = null;\n    if (window)\n      selection.value = window.getSelection();\n  }\n  if (window)\n    useEventListener(window.document, \"selectionchange\", onSelectionChange);\n  return {\n    text,\n    rects,\n    ranges,\n    selection\n  };\n}\n\nfunction useTextareaAutosize(options) {\n  var _a;\n  const textarea = ref(options == null ? void 0 : options.element);\n  const input = ref(options == null ? void 0 : options.input);\n  const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : \"height\";\n  const textareaScrollHeight = ref(1);\n  const textareaOldWidth = ref(0);\n  function triggerResize() {\n    var _a2;\n    if (!textarea.value)\n      return;\n    let height = \"\";\n    textarea.value.style[styleProp] = \"1px\";\n    textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n    const _styleTarget = toValue(options == null ? void 0 : options.styleTarget);\n    if (_styleTarget)\n      _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n    else\n      height = `${textareaScrollHeight.value}px`;\n    textarea.value.style[styleProp] = height;\n  }\n  watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n  watch(textareaScrollHeight, () => {\n    var _a2;\n    return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n  });\n  useResizeObserver(textarea, ([{ contentRect }]) => {\n    if (textareaOldWidth.value === contentRect.width)\n      return;\n    textareaOldWidth.value = contentRect.width;\n    triggerResize();\n  });\n  if (options == null ? void 0 : options.watch)\n    watch(options.watch, triggerResize, { immediate: true, deep: true });\n  return {\n    textarea,\n    input,\n    triggerResize\n  };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n  const { throttle = 200, trailing = true } = options;\n  const filter = throttleFilter(throttle, trailing);\n  const history = useRefHistory(source, { ...options, eventFilter: filter });\n  return {\n    ...history\n  };\n}\n\nconst DEFAULT_UNITS = [\n  { max: 6e4, value: 1e3, name: \"second\" },\n  { max: 276e4, value: 6e4, name: \"minute\" },\n  { max: 72e6, value: 36e5, name: \"hour\" },\n  { max: 5184e5, value: 864e5, name: \"day\" },\n  { max: 24192e5, value: 6048e5, name: \"week\" },\n  { max: 28512e6, value: 2592e6, name: \"month\" },\n  { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n  justNow: \"just now\",\n  past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n  future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n  month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n  year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n  day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n  week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n  hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n  minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n  second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n  invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n  return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n  const {\n    controls: exposeControls = false,\n    updateInterval = 3e4\n  } = options;\n  const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n  const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n  if (exposeControls) {\n    return {\n      timeAgo,\n      ...controls\n    };\n  } else {\n    return timeAgo;\n  }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n  var _a;\n  const {\n    max,\n    messages = DEFAULT_MESSAGES,\n    fullDateFormatter = DEFAULT_FORMATTER,\n    units = DEFAULT_UNITS,\n    showSecond = false,\n    rounding = \"round\"\n  } = options;\n  const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n  const diff = +now - +from;\n  const absDiff = Math.abs(diff);\n  function getValue(diff2, unit) {\n    return roundFn(Math.abs(diff2) / unit.value);\n  }\n  function format(diff2, unit) {\n    const val = getValue(diff2, unit);\n    const past = diff2 > 0;\n    const str = applyFormat(unit.name, val, past);\n    return applyFormat(past ? \"past\" : \"future\", str, past);\n  }\n  function applyFormat(name, val, isPast) {\n    const formatter = messages[name];\n    if (typeof formatter === \"function\")\n      return formatter(val, isPast);\n    return formatter.replace(\"{0}\", val.toString());\n  }\n  if (absDiff < 6e4 && !showSecond)\n    return messages.justNow;\n  if (typeof max === \"number\" && absDiff > max)\n    return fullDateFormatter(new Date(from));\n  if (typeof max === \"string\") {\n    const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n    if (unitMax && absDiff > unitMax)\n      return fullDateFormatter(new Date(from));\n  }\n  for (const [idx, unit] of units.entries()) {\n    const val = getValue(diff, unit);\n    if (val <= 0 && units[idx - 1])\n      return format(diff, units[idx - 1]);\n    if (absDiff < unit.max)\n      return format(diff, unit);\n  }\n  return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n  const { start } = useTimeoutFn(loop, interval, { immediate: false });\n  const isActive = ref(false);\n  async function loop() {\n    if (!isActive.value)\n      return;\n    await fn();\n    start();\n  }\n  function resume() {\n    if (!isActive.value) {\n      isActive.value = true;\n      loop();\n    }\n  }\n  function pause() {\n    isActive.value = false;\n  }\n  if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n    resume();\n  tryOnScopeDispose(pause);\n  return {\n    isActive,\n    pause,\n    resume\n  };\n}\n\nfunction useTimestamp(options = {}) {\n  const {\n    controls: exposeControls = false,\n    offset = 0,\n    immediate = true,\n    interval = \"requestAnimationFrame\",\n    callback\n  } = options;\n  const ts = ref(timestamp() + offset);\n  const update = () => ts.value = timestamp() + offset;\n  const cb = callback ? () => {\n    update();\n    callback(ts.value);\n  } : update;\n  const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n  if (exposeControls) {\n    return {\n      timestamp: ts,\n      ...controls\n    };\n  } else {\n    return ts;\n  }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n  var _a, _b, _c;\n  const {\n    document = defaultDocument,\n    restoreOnUnmount = (t) => t\n  } = options;\n  const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n  const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n  const isReadonly = newTitle && typeof newTitle === \"function\";\n  function format(t) {\n    if (!(\"titleTemplate\" in options))\n      return t;\n    const template = options.titleTemplate || \"%s\";\n    return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n  }\n  watch(\n    title,\n    (t, o) => {\n      if (t !== o && document)\n        document.title = format(typeof t === \"string\" ? t : \"\");\n    },\n    { immediate: true }\n  );\n  if (options.observe && !options.titleTemplate && document && !isReadonly) {\n    useMutationObserver(\n      (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n      () => {\n        if (document && document.title !== title.value)\n          title.value = format(document.title);\n      },\n      { childList: true }\n    );\n  }\n  tryOnBeforeUnmount(() => {\n    if (restoreOnUnmount) {\n      const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n      if (restoredTitle != null && document)\n        document.title = restoredTitle;\n    }\n  });\n  return title;\n}\n\nconst _TransitionPresets = {\n  easeInSine: [0.12, 0, 0.39, 0],\n  easeOutSine: [0.61, 1, 0.88, 1],\n  easeInOutSine: [0.37, 0, 0.63, 1],\n  easeInQuad: [0.11, 0, 0.5, 0],\n  easeOutQuad: [0.5, 1, 0.89, 1],\n  easeInOutQuad: [0.45, 0, 0.55, 1],\n  easeInCubic: [0.32, 0, 0.67, 0],\n  easeOutCubic: [0.33, 1, 0.68, 1],\n  easeInOutCubic: [0.65, 0, 0.35, 1],\n  easeInQuart: [0.5, 0, 0.75, 0],\n  easeOutQuart: [0.25, 1, 0.5, 1],\n  easeInOutQuart: [0.76, 0, 0.24, 1],\n  easeInQuint: [0.64, 0, 0.78, 0],\n  easeOutQuint: [0.22, 1, 0.36, 1],\n  easeInOutQuint: [0.83, 0, 0.17, 1],\n  easeInExpo: [0.7, 0, 0.84, 0],\n  easeOutExpo: [0.16, 1, 0.3, 1],\n  easeInOutExpo: [0.87, 0, 0.13, 1],\n  easeInCirc: [0.55, 0, 1, 0.45],\n  easeOutCirc: [0, 0.55, 0.45, 1],\n  easeInOutCirc: [0.85, 0, 0.15, 1],\n  easeInBack: [0.36, 0, 0.66, -0.56],\n  easeOutBack: [0.34, 1.56, 0.64, 1],\n  easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n  const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n  const b = (a1, a2) => 3 * a2 - 6 * a1;\n  const c = (a1) => 3 * a1;\n  const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n  const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n  const getTforX = (x) => {\n    let aGuessT = x;\n    for (let i = 0; i < 4; ++i) {\n      const currentSlope = getSlope(aGuessT, p0, p2);\n      if (currentSlope === 0)\n        return aGuessT;\n      const currentX = calcBezier(aGuessT, p0, p2) - x;\n      aGuessT -= currentX / currentSlope;\n    }\n    return aGuessT;\n  };\n  return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n  return a + alpha * (b - a);\n}\nfunction toVec(t) {\n  return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n  var _a, _b;\n  const fromVal = toValue(from);\n  const toVal = toValue(to);\n  const v1 = toVec(fromVal);\n  const v2 = toVec(toVal);\n  const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n  const startedAt = Date.now();\n  const endAt = Date.now() + duration;\n  const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n  const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n  return new Promise((resolve) => {\n    source.value = fromVal;\n    const tick = () => {\n      var _a2;\n      if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n        resolve();\n        return;\n      }\n      const now = Date.now();\n      const alpha = ease((now - startedAt) / duration);\n      const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n      if (Array.isArray(source.value))\n        source.value = arr.map((n, i) => {\n          var _a3, _b2;\n          return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n        });\n      else if (typeof source.value === \"number\")\n        source.value = arr[0];\n      if (now < endAt) {\n        requestAnimationFrame(tick);\n      } else {\n        source.value = toVal;\n        resolve();\n      }\n    };\n    tick();\n  });\n}\nfunction useTransition(source, options = {}) {\n  let currentId = 0;\n  const sourceVal = () => {\n    const v = toValue(source);\n    return typeof v === \"number\" ? v : v.map(toValue);\n  };\n  const outputRef = ref(sourceVal());\n  watch(sourceVal, async (to) => {\n    var _a, _b;\n    if (toValue(options.disabled))\n      return;\n    const id = ++currentId;\n    if (options.delay)\n      await promiseTimeout(toValue(options.delay));\n    if (id !== currentId)\n      return;\n    const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n    (_a = options.onStarted) == null ? void 0 : _a.call(options);\n    await executeTransition(outputRef, outputRef.value, toVal, {\n      ...options,\n      abort: () => {\n        var _a2;\n        return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n      }\n    });\n    (_b = options.onFinished) == null ? void 0 : _b.call(options);\n  }, { deep: true });\n  watch(() => toValue(options.disabled), (disabled) => {\n    if (disabled) {\n      currentId++;\n      outputRef.value = sourceVal();\n    }\n  });\n  tryOnScopeDispose(() => {\n    currentId++;\n  });\n  return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n  const {\n    initialValue = {},\n    removeNullishValues = true,\n    removeFalsyValues = false,\n    write: enableWrite = true,\n    window = defaultWindow\n  } = options;\n  if (!window)\n    return reactive(initialValue);\n  const state = reactive({});\n  function getRawParams() {\n    if (mode === \"history\") {\n      return window.location.search || \"\";\n    } else if (mode === \"hash\") {\n      const hash = window.location.hash || \"\";\n      const index = hash.indexOf(\"?\");\n      return index > 0 ? hash.slice(index) : \"\";\n    } else {\n      return (window.location.hash || \"\").replace(/^#/, \"\");\n    }\n  }\n  function constructQuery(params) {\n    const stringified = params.toString();\n    if (mode === \"history\")\n      return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n    if (mode === \"hash-params\")\n      return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n    const hash = window.location.hash || \"#\";\n    const index = hash.indexOf(\"?\");\n    if (index > 0)\n      return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n    return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n  }\n  function read() {\n    return new URLSearchParams(getRawParams());\n  }\n  function updateState(params) {\n    const unusedKeys = new Set(Object.keys(state));\n    for (const key of params.keys()) {\n      const paramsForKey = params.getAll(key);\n      state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n      unusedKeys.delete(key);\n    }\n    Array.from(unusedKeys).forEach((key) => delete state[key]);\n  }\n  const { pause, resume } = pausableWatch(\n    state,\n    () => {\n      const params = new URLSearchParams(\"\");\n      Object.keys(state).forEach((key) => {\n        const mapEntry = state[key];\n        if (Array.isArray(mapEntry))\n          mapEntry.forEach((value) => params.append(key, value));\n        else if (removeNullishValues && mapEntry == null)\n          params.delete(key);\n        else if (removeFalsyValues && !mapEntry)\n          params.delete(key);\n        else\n          params.set(key, mapEntry);\n      });\n      write(params);\n    },\n    { deep: true }\n  );\n  function write(params, shouldUpdate) {\n    pause();\n    if (shouldUpdate)\n      updateState(params);\n    window.history.replaceState(\n      window.history.state,\n      window.document.title,\n      window.location.pathname + constructQuery(params)\n    );\n    resume();\n  }\n  function onChanged() {\n    if (!enableWrite)\n      return;\n    write(read(), true);\n  }\n  useEventListener(window, \"popstate\", onChanged, false);\n  if (mode !== \"history\")\n    useEventListener(window, \"hashchange\", onChanged, false);\n  const initial = read();\n  if (initial.keys().next().value)\n    updateState(initial);\n  else\n    Object.assign(state, initialValue);\n  return state;\n}\n\nfunction useUserMedia(options = {}) {\n  var _a, _b;\n  const enabled = ref((_a = options.enabled) != null ? _a : false);\n  const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n  const constraints = ref(options.constraints);\n  const { navigator = defaultNavigator } = options;\n  const isSupported = useSupported(() => {\n    var _a2;\n    return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n  });\n  const stream = shallowRef();\n  function getDeviceOptions(type) {\n    switch (type) {\n      case \"video\": {\n        if (constraints.value)\n          return constraints.value.video || false;\n        break;\n      }\n      case \"audio\": {\n        if (constraints.value)\n          return constraints.value.audio || false;\n        break;\n      }\n    }\n  }\n  async function _start() {\n    if (!isSupported.value || stream.value)\n      return;\n    stream.value = await navigator.mediaDevices.getUserMedia({\n      video: getDeviceOptions(\"video\"),\n      audio: getDeviceOptions(\"audio\")\n    });\n    return stream.value;\n  }\n  function _stop() {\n    var _a2;\n    (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n    stream.value = void 0;\n  }\n  function stop() {\n    _stop();\n    enabled.value = false;\n  }\n  async function start() {\n    await _start();\n    if (stream.value)\n      enabled.value = true;\n    return stream.value;\n  }\n  async function restart() {\n    _stop();\n    return await start();\n  }\n  watch(\n    enabled,\n    (v) => {\n      if (v)\n        _start();\n      else _stop();\n    },\n    { immediate: true }\n  );\n  watch(\n    constraints,\n    () => {\n      if (autoSwitch.value && stream.value)\n        restart();\n    },\n    { immediate: true }\n  );\n  tryOnScopeDispose(() => {\n    stop();\n  });\n  return {\n    isSupported,\n    stream,\n    start,\n    stop,\n    restart,\n    constraints,\n    enabled,\n    autoSwitch\n  };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n  var _a, _b, _c, _d, _e;\n  const {\n    clone = false,\n    passive = false,\n    eventName,\n    deep = false,\n    defaultValue,\n    shouldEmit\n  } = options;\n  const vm = getCurrentInstance();\n  const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n  let event = eventName;\n  if (!key) {\n    if (isVue2) {\n      const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n      key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n      if (!eventName)\n        event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n    } else {\n      key = \"modelValue\";\n    }\n  }\n  event = event || `update:${key.toString()}`;\n  const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n  const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n  const triggerEmit = (value) => {\n    if (shouldEmit) {\n      if (shouldEmit(value))\n        _emit(event, value);\n    } else {\n      _emit(event, value);\n    }\n  };\n  if (passive) {\n    const initialValue = getValue();\n    const proxy = ref(initialValue);\n    let isUpdating = false;\n    watch(\n      () => props[key],\n      (v) => {\n        if (!isUpdating) {\n          isUpdating = true;\n          proxy.value = cloneFn(v);\n          nextTick(() => isUpdating = false);\n        }\n      }\n    );\n    watch(\n      proxy,\n      (v) => {\n        if (!isUpdating && (v !== props[key] || deep))\n          triggerEmit(v);\n      },\n      { deep }\n    );\n    return proxy;\n  } else {\n    return computed({\n      get() {\n        return getValue();\n      },\n      set(value) {\n        triggerEmit(value);\n      }\n    });\n  }\n}\n\nfunction useVModels(props, emit, options = {}) {\n  const ret = {};\n  for (const key in props) {\n    ret[key] = useVModel(\n      props,\n      key,\n      emit,\n      options\n    );\n  }\n  return ret;\n}\n\nfunction useVibrate(options) {\n  const {\n    pattern = [],\n    interval = 0,\n    navigator = defaultNavigator\n  } = options || {};\n  const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n  const patternRef = toRef(pattern);\n  let intervalControls;\n  const vibrate = (pattern2 = patternRef.value) => {\n    if (isSupported.value)\n      navigator.vibrate(pattern2);\n  };\n  const stop = () => {\n    if (isSupported.value)\n      navigator.vibrate(0);\n    intervalControls == null ? void 0 : intervalControls.pause();\n  };\n  if (interval > 0) {\n    intervalControls = useIntervalFn(\n      vibrate,\n      interval,\n      {\n        immediate: false,\n        immediateCallback: false\n      }\n    );\n  }\n  return {\n    isSupported,\n    pattern,\n    intervalControls,\n    vibrate,\n    stop\n  };\n}\n\nfunction useVirtualList(list, options) {\n  const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n  return {\n    list: currentList,\n    scrollTo,\n    containerProps: {\n      ref: containerRef,\n      onScroll: () => {\n        calculateRange();\n      },\n      style: containerStyle\n    },\n    wrapperProps\n  };\n}\nfunction useVirtualListResources(list) {\n  const containerRef = ref(null);\n  const size = useElementSize(containerRef);\n  const currentList = ref([]);\n  const source = shallowRef(list);\n  const state = ref({ start: 0, end: 10 });\n  return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n  return (containerSize) => {\n    if (typeof itemSize === \"number\")\n      return Math.ceil(containerSize / itemSize);\n    const { start = 0 } = state.value;\n    let sum = 0;\n    let capacity = 0;\n    for (let i = start; i < source.value.length; i++) {\n      const size = itemSize(i);\n      sum += size;\n      capacity = i;\n      if (sum > containerSize)\n        break;\n    }\n    return capacity - start;\n  };\n}\nfunction createGetOffset(source, itemSize) {\n  return (scrollDirection) => {\n    if (typeof itemSize === \"number\")\n      return Math.floor(scrollDirection / itemSize) + 1;\n    let sum = 0;\n    let offset = 0;\n    for (let i = 0; i < source.value.length; i++) {\n      const size = itemSize(i);\n      sum += size;\n      if (sum >= scrollDirection) {\n        offset = i;\n        break;\n      }\n    }\n    return offset + 1;\n  };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n  return () => {\n    const element = containerRef.value;\n    if (element) {\n      const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n      const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n      const from = offset - overscan;\n      const to = offset + viewCapacity + overscan;\n      state.value = {\n        start: from < 0 ? 0 : from,\n        end: to > source.value.length ? source.value.length : to\n      };\n      currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n        data: ele,\n        index: index + state.value.start\n      }));\n    }\n  };\n}\nfunction createGetDistance(itemSize, source) {\n  return (index) => {\n    if (typeof itemSize === \"number\") {\n      const size2 = index * itemSize;\n      return size2;\n    }\n    const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n    return size;\n  };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n  watch([size.width, size.height, list, containerRef], () => {\n    calculateRange();\n  });\n}\nfunction createComputedTotalSize(itemSize, source) {\n  return computed(() => {\n    if (typeof itemSize === \"number\")\n      return source.value.length * itemSize;\n    return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n  });\n}\nconst scrollToDictionaryForElementScrollKey = {\n  horizontal: \"scrollLeft\",\n  vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n  return (index) => {\n    if (containerRef.value) {\n      containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n      calculateRange();\n    }\n  };\n}\nfunction useHorizontalVirtualList(options, list) {\n  const resources = useVirtualListResources(list);\n  const { state, source, currentList, size, containerRef } = resources;\n  const containerStyle = { overflowX: \"auto\" };\n  const { itemWidth, overscan = 5 } = options;\n  const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n  const getOffset = createGetOffset(source, itemWidth);\n  const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n  const getDistanceLeft = createGetDistance(itemWidth, source);\n  const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n  const totalWidth = createComputedTotalSize(itemWidth, source);\n  useWatchForSizes(size, list, containerRef, calculateRange);\n  const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n  const wrapperProps = computed(() => {\n    return {\n      style: {\n        height: \"100%\",\n        width: `${totalWidth.value - offsetLeft.value}px`,\n        marginLeft: `${offsetLeft.value}px`,\n        display: \"flex\"\n      }\n    };\n  });\n  return {\n    scrollTo,\n    calculateRange,\n    wrapperProps,\n    containerStyle,\n    currentList,\n    containerRef\n  };\n}\nfunction useVerticalVirtualList(options, list) {\n  const resources = useVirtualListResources(list);\n  const { state, source, currentList, size, containerRef } = resources;\n  const containerStyle = { overflowY: \"auto\" };\n  const { itemHeight, overscan = 5 } = options;\n  const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n  const getOffset = createGetOffset(source, itemHeight);\n  const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n  const getDistanceTop = createGetDistance(itemHeight, source);\n  const offsetTop = computed(() => getDistanceTop(state.value.start));\n  const totalHeight = createComputedTotalSize(itemHeight, source);\n  useWatchForSizes(size, list, containerRef, calculateRange);\n  const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n  const wrapperProps = computed(() => {\n    return {\n      style: {\n        width: \"100%\",\n        height: `${totalHeight.value - offsetTop.value}px`,\n        marginTop: `${offsetTop.value}px`\n      }\n    };\n  });\n  return {\n    calculateRange,\n    scrollTo,\n    containerStyle,\n    wrapperProps,\n    currentList,\n    containerRef\n  };\n}\n\nfunction useWakeLock(options = {}) {\n  const {\n    navigator = defaultNavigator,\n    document = defaultDocument\n  } = options;\n  const requestedType = ref(false);\n  const sentinel = shallowRef(null);\n  const documentVisibility = useDocumentVisibility({ document });\n  const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n  const isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n  if (isSupported.value) {\n    useEventListener(sentinel, \"release\", () => {\n      var _a, _b;\n      requestedType.value = (_b = (_a = sentinel.value) == null ? void 0 : _a.type) != null ? _b : false;\n    });\n    whenever(\n      () => documentVisibility.value === \"visible\" && (document == null ? void 0 : document.visibilityState) === \"visible\" && requestedType.value,\n      (type) => {\n        requestedType.value = false;\n        forceRequest(type);\n      }\n    );\n  }\n  async function forceRequest(type) {\n    var _a;\n    await ((_a = sentinel.value) == null ? void 0 : _a.release());\n    sentinel.value = isSupported.value ? await navigator.wakeLock.request(type) : null;\n  }\n  async function request(type) {\n    if (documentVisibility.value === \"visible\")\n      await forceRequest(type);\n    else\n      requestedType.value = type;\n  }\n  async function release() {\n    requestedType.value = false;\n    const s = sentinel.value;\n    sentinel.value = null;\n    await (s == null ? void 0 : s.release());\n  }\n  return {\n    sentinel,\n    isSupported,\n    isActive,\n    request,\n    forceRequest,\n    release\n  };\n}\n\nfunction useWebNotification(options = {}) {\n  const {\n    window = defaultWindow,\n    requestPermissions: _requestForPermissions = true\n  } = options;\n  const defaultWebNotificationOptions = options;\n  const isSupported = useSupported(() => {\n    if (!window || !(\"Notification\" in window))\n      return false;\n    try {\n      new Notification(\"\");\n    } catch (e) {\n      return false;\n    }\n    return true;\n  });\n  const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n  const notification = ref(null);\n  const ensurePermissions = async () => {\n    if (!isSupported.value)\n      return;\n    if (!permissionGranted.value && Notification.permission !== \"denied\") {\n      const result = await Notification.requestPermission();\n      if (result === \"granted\")\n        permissionGranted.value = true;\n    }\n    return permissionGranted.value;\n  };\n  const { on: onClick, trigger: clickTrigger } = createEventHook();\n  const { on: onShow, trigger: showTrigger } = createEventHook();\n  const { on: onError, trigger: errorTrigger } = createEventHook();\n  const { on: onClose, trigger: closeTrigger } = createEventHook();\n  const show = async (overrides) => {\n    if (!isSupported.value || !permissionGranted.value)\n      return;\n    const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n    notification.value = new Notification(options2.title || \"\", options2);\n    notification.value.onclick = clickTrigger;\n    notification.value.onshow = showTrigger;\n    notification.value.onerror = errorTrigger;\n    notification.value.onclose = closeTrigger;\n    return notification.value;\n  };\n  const close = () => {\n    if (notification.value)\n      notification.value.close();\n    notification.value = null;\n  };\n  if (_requestForPermissions)\n    tryOnMounted(ensurePermissions);\n  tryOnScopeDispose(close);\n  if (isSupported.value && window) {\n    const document = window.document;\n    useEventListener(document, \"visibilitychange\", (e) => {\n      e.preventDefault();\n      if (document.visibilityState === \"visible\") {\n        close();\n      }\n    });\n  }\n  return {\n    isSupported,\n    notification,\n    ensurePermissions,\n    permissionGranted,\n    show,\n    close,\n    onClick,\n    onShow,\n    onError,\n    onClose\n  };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n  if (options === true)\n    return {};\n  return options;\n}\nfunction useWebSocket(url, options = {}) {\n  const {\n    onConnected,\n    onDisconnected,\n    onError,\n    onMessage,\n    immediate = true,\n    autoClose = true,\n    protocols = []\n  } = options;\n  const data = ref(null);\n  const status = ref(\"CLOSED\");\n  const wsRef = ref();\n  const urlRef = toRef(url);\n  let heartbeatPause;\n  let heartbeatResume;\n  let explicitlyClosed = false;\n  let retried = 0;\n  let bufferedData = [];\n  let pongTimeoutWait;\n  const _sendBuffer = () => {\n    if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n      for (const buffer of bufferedData)\n        wsRef.value.send(buffer);\n      bufferedData = [];\n    }\n  };\n  const resetHeartbeat = () => {\n    clearTimeout(pongTimeoutWait);\n    pongTimeoutWait = void 0;\n  };\n  const close = (code = 1e3, reason) => {\n    if (!isClient || !wsRef.value)\n      return;\n    explicitlyClosed = true;\n    resetHeartbeat();\n    heartbeatPause == null ? void 0 : heartbeatPause();\n    wsRef.value.close(code, reason);\n    wsRef.value = void 0;\n  };\n  const send = (data2, useBuffer = true) => {\n    if (!wsRef.value || status.value !== \"OPEN\") {\n      if (useBuffer)\n        bufferedData.push(data2);\n      return false;\n    }\n    _sendBuffer();\n    wsRef.value.send(data2);\n    return true;\n  };\n  const _init = () => {\n    if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n      return;\n    const ws = new WebSocket(urlRef.value, protocols);\n    wsRef.value = ws;\n    status.value = \"CONNECTING\";\n    ws.onopen = () => {\n      status.value = \"OPEN\";\n      retried = 0;\n      onConnected == null ? void 0 : onConnected(ws);\n      heartbeatResume == null ? void 0 : heartbeatResume();\n      _sendBuffer();\n    };\n    ws.onclose = (ev) => {\n      status.value = \"CLOSED\";\n      onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n      if (!explicitlyClosed && options.autoReconnect && ws === wsRef.value) {\n        const {\n          retries = -1,\n          delay = 1e3,\n          onFailed\n        } = resolveNestedOptions(options.autoReconnect);\n        if (typeof retries === \"number\" && (retries < 0 || retried < retries)) {\n          retried += 1;\n          setTimeout(_init, delay);\n        } else if (typeof retries === \"function\" && retries()) {\n          setTimeout(_init, delay);\n        } else {\n          onFailed == null ? void 0 : onFailed();\n        }\n      }\n    };\n    ws.onerror = (e) => {\n      onError == null ? void 0 : onError(ws, e);\n    };\n    ws.onmessage = (e) => {\n      if (options.heartbeat) {\n        resetHeartbeat();\n        const {\n          message = DEFAULT_PING_MESSAGE,\n          responseMessage = message\n        } = resolveNestedOptions(options.heartbeat);\n        if (e.data === responseMessage)\n          return;\n      }\n      data.value = e.data;\n      onMessage == null ? void 0 : onMessage(ws, e);\n    };\n  };\n  if (options.heartbeat) {\n    const {\n      message = DEFAULT_PING_MESSAGE,\n      interval = 1e3,\n      pongTimeout = 1e3\n    } = resolveNestedOptions(options.heartbeat);\n    const { pause, resume } = useIntervalFn(\n      () => {\n        send(message, false);\n        if (pongTimeoutWait != null)\n          return;\n        pongTimeoutWait = setTimeout(() => {\n          close();\n          explicitlyClosed = false;\n        }, pongTimeout);\n      },\n      interval,\n      { immediate: false }\n    );\n    heartbeatPause = pause;\n    heartbeatResume = resume;\n  }\n  if (autoClose) {\n    if (isClient)\n      useEventListener(\"beforeunload\", () => close());\n    tryOnScopeDispose(close);\n  }\n  const open = () => {\n    if (!isClient && !isWorker)\n      return;\n    close();\n    explicitlyClosed = false;\n    retried = 0;\n    _init();\n  };\n  if (immediate)\n    open();\n  watch(urlRef, open);\n  return {\n    data,\n    status,\n    close,\n    send,\n    open,\n    ws: wsRef\n  };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n  const {\n    window = defaultWindow\n  } = options != null ? options : {};\n  const data = ref(null);\n  const worker = shallowRef();\n  const post = (...args) => {\n    if (!worker.value)\n      return;\n    worker.value.postMessage(...args);\n  };\n  const terminate = function terminate2() {\n    if (!worker.value)\n      return;\n    worker.value.terminate();\n  };\n  if (window) {\n    if (typeof arg0 === \"string\")\n      worker.value = new Worker(arg0, workerOptions);\n    else if (typeof arg0 === \"function\")\n      worker.value = arg0();\n    else\n      worker.value = arg0;\n    worker.value.onmessage = (e) => {\n      data.value = e.data;\n    };\n    tryOnScopeDispose(() => {\n      if (worker.value)\n        worker.value.terminate();\n    });\n  }\n  return {\n    data,\n    post,\n    terminate,\n    worker\n  };\n}\n\nfunction jobRunner(userFunc) {\n  return (e) => {\n    const userFuncArgs = e.data[0];\n    return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n      postMessage([\"SUCCESS\", result]);\n    }).catch((error) => {\n      postMessage([\"ERROR\", error]);\n    });\n  };\n}\n\nfunction depsParser(deps, localDeps) {\n  if (deps.length === 0 && localDeps.length === 0)\n    return \"\";\n  const depsString = deps.map((dep) => `'${dep}'`).toString();\n  const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n    const str = fn.toString();\n    if (str.trim().startsWith(\"function\")) {\n      return str;\n    } else {\n      const name = fn.name;\n      return `const ${name} = ${str}`;\n    }\n  }).join(\";\");\n  const importString = `importScripts(${depsString});`;\n  return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n  const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n  const blob = new Blob([blobCode], { type: \"text/javascript\" });\n  const url = URL.createObjectURL(blob);\n  return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n  const {\n    dependencies = [],\n    localDependencies = [],\n    timeout,\n    window = defaultWindow\n  } = options;\n  const worker = ref();\n  const workerStatus = ref(\"PENDING\");\n  const promise = ref({});\n  const timeoutId = ref();\n  const workerTerminate = (status = \"PENDING\") => {\n    if (worker.value && worker.value._url && window) {\n      worker.value.terminate();\n      URL.revokeObjectURL(worker.value._url);\n      promise.value = {};\n      worker.value = void 0;\n      window.clearTimeout(timeoutId.value);\n      workerStatus.value = status;\n    }\n  };\n  workerTerminate();\n  tryOnScopeDispose(workerTerminate);\n  const generateWorker = () => {\n    const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n    const newWorker = new Worker(blobUrl);\n    newWorker._url = blobUrl;\n    newWorker.onmessage = (e) => {\n      const { resolve = () => {\n      }, reject = () => {\n      } } = promise.value;\n      const [status, result] = e.data;\n      switch (status) {\n        case \"SUCCESS\":\n          resolve(result);\n          workerTerminate(status);\n          break;\n        default:\n          reject(result);\n          workerTerminate(\"ERROR\");\n          break;\n      }\n    };\n    newWorker.onerror = (e) => {\n      const { reject = () => {\n      } } = promise.value;\n      e.preventDefault();\n      reject(e);\n      workerTerminate(\"ERROR\");\n    };\n    if (timeout) {\n      timeoutId.value = setTimeout(\n        () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n        timeout\n      );\n    }\n    return newWorker;\n  };\n  const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n    var _a;\n    promise.value = {\n      resolve,\n      reject\n    };\n    (_a = worker.value) == null ? void 0 : _a.postMessage([[...fnArgs]]);\n    workerStatus.value = \"RUNNING\";\n  });\n  const workerFn = (...fnArgs) => {\n    if (workerStatus.value === \"RUNNING\") {\n      console.error(\n        \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n      );\n      return Promise.reject();\n    }\n    worker.value = generateWorker();\n    return callWorker(...fnArgs);\n  };\n  return {\n    workerFn,\n    workerStatus,\n    workerTerminate\n  };\n}\n\nfunction useWindowFocus(options = {}) {\n  const { window = defaultWindow } = options;\n  if (!window)\n    return ref(false);\n  const focused = ref(window.document.hasFocus());\n  useEventListener(window, \"blur\", () => {\n    focused.value = false;\n  });\n  useEventListener(window, \"focus\", () => {\n    focused.value = true;\n  });\n  return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n  const { window = defaultWindow, behavior = \"auto\" } = options;\n  if (!window) {\n    return {\n      x: ref(0),\n      y: ref(0)\n    };\n  }\n  const internalX = ref(window.scrollX);\n  const internalY = ref(window.scrollY);\n  const x = computed({\n    get() {\n      return internalX.value;\n    },\n    set(x2) {\n      scrollTo({ left: x2, behavior });\n    }\n  });\n  const y = computed({\n    get() {\n      return internalY.value;\n    },\n    set(y2) {\n      scrollTo({ top: y2, behavior });\n    }\n  });\n  useEventListener(\n    window,\n    \"scroll\",\n    () => {\n      internalX.value = window.scrollX;\n      internalY.value = window.scrollY;\n    },\n    {\n      capture: false,\n      passive: true\n    }\n  );\n  return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n  const {\n    window = defaultWindow,\n    initialWidth = Number.POSITIVE_INFINITY,\n    initialHeight = Number.POSITIVE_INFINITY,\n    listenOrientation = true,\n    includeScrollbar = true,\n    type = \"inner\"\n  } = options;\n  const width = ref(initialWidth);\n  const height = ref(initialHeight);\n  const update = () => {\n    if (window) {\n      if (type === \"outer\") {\n        width.value = window.outerWidth;\n        height.value = window.outerHeight;\n      } else if (includeScrollbar) {\n        width.value = window.innerWidth;\n        height.value = window.innerHeight;\n      } else {\n        width.value = window.document.documentElement.clientWidth;\n        height.value = window.document.documentElement.clientHeight;\n      }\n    }\n  };\n  update();\n  tryOnMounted(update);\n  useEventListener(\"resize\", update, { passive: true });\n  if (listenOrientation) {\n    const matches = useMediaQuery(\"(orientation: portrait)\");\n    watch(matches, () => update());\n  }\n  return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import { defineStore } from \"pinia\";\r\nimport { useLocalStorage } from \"@vueuse/core\";\r\nimport { formatSize } from \"../mixins/productSize.mixin\";\r\n\r\nexport const useProductPageStore = defineStore(\"productPage\", {\r\n    state: () => ({\r\n        totalProductCount: useLocalStorage(\"totalProductCount\", 0), // Persisted in localStorage\r\n        sizeSelected: false,\r\n        widthSelected: false,\r\n        lengthSelected: false,\r\n        size: \"\",\r\n        skuCode: \"\",\r\n        displaySizeNotSelectedError: false,\r\n        displayWidthNotSelectedError: false,\r\n        displayLengthNotSelectedError: false,\r\n        checkInventoryStatus: false,\r\n        inventoryCount: \"\",\r\n        inventoryIsLow: false,\r\n        inventoryLowMessage: \"Få igjen!\",\r\n        itemColor: \"\",\r\n        itemMetaColor: \"\",\r\n        displayName: \"\",\r\n        cartStatusIsOpen: false,\r\n    }),\r\n    actions: {\r\n        resetState() {\r\n            this.$patch({\r\n                sizeSelected: false,\r\n                widthSelected: false,\r\n                lengthSelected: false,\r\n                size: \"\",\r\n                skuCode: \"\",\r\n                displaySizeNotSelectedError: false,\r\n                displayWidthNotSelectedError: false,\r\n                displayLengthNotSelectedError: false,\r\n                checkInventoryStatus: false,\r\n                inventoryCount: \"\",\r\n                inventoryIsLow: false,\r\n                itemColor: \"\",\r\n                itemMetaColor: \"\",\r\n                displayName: \"\",\r\n                cartStatusIsOpen: false,\r\n            });\r\n        },\r\n        setCartItemCount(count: number) {\r\n            this.totalProductCount = count;\r\n        },\r\n        incrementCartItemCount() {\r\n            if (this.totalProductCount === null) {\r\n                this.totalProductCount = 1;\r\n            } else {\r\n                this.totalProductCount = Number(this.totalProductCount) + 1;\r\n            }\r\n        },\r\n        decrementCartItemCount() {\r\n            if (\r\n                this.totalProductCount === null ||\r\n                this.totalProductCount === 0\r\n            ) {\r\n                this.totalProductCount = 0;\r\n            } else {\r\n                this.totalProductCount = Number(this.totalProductCount) - 1;\r\n            }\r\n        },\r\n        setSkuCode(value: string) {\r\n            this.skuCode = value;\r\n        },\r\n        setSizeSelected(selected: boolean) {\r\n            this.sizeSelected = selected;\r\n            if (selected) {\r\n                this.displaySizeNotSelectedError = false;\r\n            }\r\n        },\r\n        setWidthSelected(selected: boolean) {\r\n            this.widthSelected = selected;\r\n            if (selected) {\r\n                this.displayWidthNotSelectedError = false;\r\n            }\r\n        },\r\n        setLengthSelected(selected: boolean) {\r\n            this.lengthSelected = selected;\r\n            if (selected) {\r\n                this.displayLengthNotSelectedError = false;\r\n            }\r\n        },\r\n        setCheckInventoryStatus(status: boolean) {\r\n            this.checkInventoryStatus = status;\r\n        },\r\n        setInventoryCount(count: string) {\r\n            this.inventoryCount = count;\r\n        },\r\n        setInventoryIsLow(status: boolean) {\r\n            this.inventoryIsLow = status;\r\n        },\r\n        triggerSizeError() {\r\n            this.displaySizeNotSelectedError = true;\r\n        },\r\n        setSize(size: string) {\r\n            this.size = size;\r\n        },\r\n        setItemColor(color: string) {\r\n            this.itemColor = color;\r\n        },\r\n        setItemMetaColor(color: string) {\r\n            this.itemMetaColor = color;\r\n        },\r\n        setDisplayName(name: string) {\r\n            this.displayName = name;\r\n        },\r\n        setCartStatusIsOpen(status: boolean) {\r\n            this.cartStatusIsOpen = status;\r\n        },\r\n    },\r\n    getters: {\r\n        cartEmpty: (state) => {\r\n            return state.totalProductCount === 0;\r\n        },\r\n        cartItemCount: (state) => {\r\n            return state.totalProductCount;\r\n        },\r\n        sizeText: (state) => {\r\n            return formatSize(state.size);\r\n        },\r\n    },\r\n});\r\n","<script lang=\"ts\" setup>\r\nimport { computed, defineProps, watch, ref, onMounted } from \"vue\";\r\nimport { SkuDetails } from \"./sizePicker.models\";\r\nimport { useProductPageStore } from \"../../stores/productPageStore\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport { formatSize } from \"../../mixins/productSize.mixin\";\r\n\r\nconst props = defineProps<{\r\n  matrixSizes: Record<string, any>;\r\n  isSizeGuide?: boolean;\r\n  showInventoryNotification?: boolean;\r\n}>();\r\n\r\nconst suitLengths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let lengths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      lengths.add(skuDetails.suitLength);\r\n    });\r\n  });\r\n\r\n  return Array.from(lengths);\r\n});\r\n\r\nconst suitWidths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let widths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      widths.add(skuDetails.suitWidth);\r\n    });\r\n  });\r\n\r\n  return Array.from(widths);\r\n});\r\n\r\nconst suitSizes = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let sizes = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      sizes.add(skuDetails.suitSize);\r\n    });\r\n  });\r\n\r\n  // Convert the Set to an array and sort numerically\r\n  return Array.from(sizes).sort((a, b) => Number(a) - Number(b));\r\n});\r\n\r\nconst productPageStore = useProductPageStore();\r\n\r\nconst displayWidthNotSelectedError = computed(\r\n  () => productPageStore.displayWidthNotSelectedError,\r\n);\r\n\r\nconst displayLengthNotSelectedError = computed(\r\n  () => productPageStore.displayLengthNotSelectedError,\r\n);\r\n\r\nconst displaySizeNotSelectedError = computed(\r\n  () => productPageStore.displaySizeNotSelectedError,\r\n);\r\n\r\n// Get in-stock suit lengths (different from available lengths)\r\nconst inStockSuitLengths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let inStockSuitLengthsSet = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.inventoryCount > 0) {\r\n        inStockSuitLengthsSet.add(skuDetails.suitLength);\r\n      }\r\n    });\r\n  });\r\n\r\n  // Convert the Set to an array and sort numerically\r\n  return Array.from(inStockSuitLengthsSet).sort(\r\n    (a, b) => Number(a) - Number(b),\r\n  );\r\n});\r\n\r\n// Get in-stock suit widths (different from available widths)\r\nconst inStockSuitWidths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let inStockSuitWidthsSet = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.inventoryCount > 0) {\r\n        inStockSuitWidthsSet.add(skuDetails.suitWidth);\r\n      }\r\n    });\r\n  });\r\n\r\n  // Convert the Set to an array and sort numerically\r\n  return Array.from(inStockSuitWidthsSet).sort((a, b) => Number(a) - Number(b));\r\n});\r\n\r\n// Get in-stock suit sizes (different from available sizes)\r\nconst inStockSuitSizes = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let inStockSuitSizesSet = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.inventoryCount > 0) {\r\n        inStockSuitSizesSet.add(skuDetails.suitSize);\r\n      }\r\n    });\r\n  });\r\n\r\n  // Convert the Set to an array and sort numerically\r\n  return Array.from(inStockSuitSizesSet).sort((a, b) => Number(a) - Number(b));\r\n});\r\n\r\nconst soldOutSizes = computed<SkuDetails[]>(() => {\r\n  return props.matrixSizes\r\n    ?.flat()\r\n    .filter((skuDetails) => skuDetails.inventoryCount === 0);\r\n});\r\n\r\n// Function to get SkuCode for a given width, length, and size\r\nfunction getSkuCode(width: string, length: string, size: string) {\r\n  let skuCode: string | undefined = undefined;\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitWidth === width &&\r\n        skuDetails.suitLength === length &&\r\n        skuDetails.suitSize === size\r\n      ) {\r\n        skuCode = skuDetails.skuCode;\r\n      }\r\n    });\r\n  });\r\n\r\n  return skuCode || \"\";\r\n}\r\n\r\nfunction getInventoryCount(width: string, length: string, size: string) {\r\n  let inventoryCount = \"0\";\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitWidth === width &&\r\n        skuDetails.suitLength === length &&\r\n        skuDetails.suitSize === size\r\n      ) {\r\n        inventoryCount = skuDetails.inventoryCount.toString();\r\n      }\r\n    });\r\n  });\r\n\r\n  return inventoryCount;\r\n}\r\n\r\n// Function to get available sizes for a given width and length\r\nfunction getAvailableSizes(suitWidth: string, suitLength: string) {\r\n  const availableSizes = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitWidth === suitWidth &&\r\n        skuDetails.suitLength === suitLength &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableSizes.add(skuDetails.suitSize);\r\n      }\r\n    });\r\n  });\r\n\r\n  return Array.from(availableSizes);\r\n}\r\n\r\n// Function to get available lengths for a given width and size\r\nfunction getAvailableLengths(suitWidth: string, suitSize: string) {\r\n  const availableLengths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitWidth === suitWidth &&\r\n        skuDetails.suitSize === suitSize &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableLengths.add(skuDetails.suitLength);\r\n      }\r\n    });\r\n  });\r\n\r\n  return Array.from(availableLengths);\r\n}\r\n\r\n// Function to get available widths for a given length and size\r\nfunction getAvailableWidths(suitLength: string, suitSize: string) {\r\n  const availableWidths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitLength === suitLength &&\r\n        skuDetails.suitSize === suitSize &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableWidths.add(skuDetails.suitWidth);\r\n      }\r\n    });\r\n  });\r\n\r\n  return Array.from(availableWidths);\r\n}\r\n\r\n// Function to get available lengths and widths for a given suit size\r\nfunction getAvailableLengthsAndWidths(suitSize: string) {\r\n  const availableLengths = new Set<string>();\r\n  const availableWidths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitSize === suitSize &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableLengths.add(skuDetails.suitLength);\r\n        availableWidths.add(skuDetails.suitWidth);\r\n      }\r\n    });\r\n  });\r\n\r\n  return {\r\n    availableLengths: Array.from(availableLengths),\r\n    availableWidths: Array.from(availableWidths),\r\n  };\r\n}\r\n\r\n// Function to get available lengths and sizes for a given suit width\r\nfunction getAvailableLengthsAndSizes(suitWidth: string) {\r\n  const availableLengths = new Set<string>();\r\n  const availableSizes = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitWidth === suitWidth &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableLengths.add(skuDetails.suitLength);\r\n        availableSizes.add(skuDetails.suitSize);\r\n      }\r\n    });\r\n  });\r\n\r\n  return {\r\n    availableLengths: Array.from(availableLengths),\r\n    availableSizes: Array.from(availableSizes),\r\n  };\r\n}\r\n\r\n// Function to get available widths and sizes for a given suit length\r\nfunction getAvailableWidthsAndSizes(suitLength: string) {\r\n  const availableWidths = new Set<string>();\r\n  const availableSizes = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.suitLength === suitLength &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableWidths.add(skuDetails.suitWidth);\r\n        availableSizes.add(skuDetails.suitSize);\r\n      }\r\n    });\r\n  });\r\n\r\n  return {\r\n    availableWidths: Array.from(availableWidths),\r\n    availableSizes: Array.from(availableSizes),\r\n  };\r\n}\r\n\r\nfunction translateWidth(width: string) {\r\n  switch (width) {\r\n    case \"B\":\r\n      return \"Normal\";\r\n    case \"C\":\r\n      return \"Ekstra\";\r\n    default:\r\n      return width;\r\n  }\r\n}\r\n\r\nfunction translateLength(length: string) {\r\n  switch (length) {\r\n    case \"1\":\r\n      return \"Kort\";\r\n    case \"2\":\r\n      return \"Normal\";\r\n    case \"3\":\r\n      return \"Lang\";\r\n    default:\r\n      return length;\r\n  }\r\n}\r\n\r\n// Reactive state for selected values\r\nconst selectedSuitSize = ref<string>(\"\");\r\nconst selectedSuitWidth = ref<string>(\"\");\r\nconst selectedSuitLength = ref<string>(\"\");\r\n\r\n// Reactive available options based on selected values\r\nconst availableSizes = ref<string[]>(suitSizes.value);\r\nconst availableWidths = ref<string[]>(suitWidths.value);\r\nconst availableLengths = ref<string[]>(suitLengths.value);\r\n\r\n// Function to automatically select a single in-stock option if only one exists\r\nconst autoSelectSingleOption = () => {\r\n  if (inStockSuitSizes.value.length === 1) {\r\n    selectedSuitSize.value = inStockSuitSizes.value[0];\r\n    productPageStore.setSizeSelected(true);\r\n  }\r\n  if (inStockSuitWidths.value.length === 1) {\r\n    selectedSuitWidth.value = inStockSuitWidths.value[0];\r\n    productPageStore.setWidthSelected(true);\r\n  }\r\n  if (inStockSuitLengths.value.length === 1) {\r\n    selectedSuitLength.value = inStockSuitLengths.value[0];\r\n    productPageStore.setLengthSelected(true);\r\n  }\r\n\r\n  if (\r\n    selectedSuitSize.value &&\r\n    selectedSuitWidth.value &&\r\n    selectedSuitLength.value\r\n  ) {\r\n    productPageStore.setSkuCode(\r\n      getSkuCode(\r\n        selectedSuitWidth.value,\r\n        selectedSuitLength.value,\r\n        selectedSuitSize.value,\r\n      ),\r\n    );\r\n    productPageStore.setSize(\r\n        selectedSuitWidth.value +\r\n          selectedSuitLength.value +\r\n          selectedSuitSize.value\r\n    );\r\n    productPageStore.setInventoryCount(\r\n      getInventoryCount(\r\n        selectedSuitWidth.value,\r\n        selectedSuitLength.value,\r\n        selectedSuitSize.value,\r\n      ),\r\n    );\r\n    productPageStore.setCheckInventoryStatus(true);\r\n  }\r\n};\r\n\r\n// Call the function when the component is mounted\r\nonMounted(() => {\r\n  autoSelectSingleOption();\r\n});\r\n\r\nwatch(\r\n  [selectedSuitSize, selectedSuitWidth, selectedSuitLength],\r\n  ([newSize, newWidth, newLength]) => {\r\n    if (newSize && newWidth && newLength) {\r\n      productPageStore.setSkuCode(getSkuCode(newWidth, newLength, newSize));\r\n      productPageStore.setSize(newWidth + newLength + newSize);\r\n      productPageStore.setInventoryCount(\r\n        getInventoryCount(newWidth, newLength, newSize),\r\n      );\r\n      productPageStore.setCheckInventoryStatus(true);\r\n    }\r\n  },\r\n);\r\n\r\n// Watchers to update available options based on selections\r\nwatch(\r\n  [selectedSuitSize, selectedSuitWidth, selectedSuitLength],\r\n  () => {\r\n    let tempAvailableWidths = suitWidths.value;\r\n    let tempAvailableLengths = suitLengths.value;\r\n    let tempAvailableSizes = suitSizes.value;\r\n\r\n    if (selectedSuitSize.value) {\r\n      const { availableWidths, availableLengths } =\r\n        getAvailableLengthsAndWidths(selectedSuitSize.value);\r\n      tempAvailableWidths = availableWidths;\r\n      tempAvailableLengths = availableLengths;\r\n    }\r\n\r\n    if (selectedSuitWidth.value) {\r\n      const { availableLengths, availableSizes } = getAvailableLengthsAndSizes(\r\n        selectedSuitWidth.value,\r\n      );\r\n      tempAvailableLengths = tempAvailableLengths.filter((length) =>\r\n        availableLengths.includes(length),\r\n      );\r\n      tempAvailableSizes = availableSizes;\r\n    }\r\n\r\n    if (selectedSuitLength.value) {\r\n      const { availableWidths, availableSizes } = getAvailableWidthsAndSizes(\r\n        selectedSuitLength.value,\r\n      );\r\n      tempAvailableWidths = tempAvailableWidths.filter((width) =>\r\n        availableWidths.includes(width),\r\n      );\r\n      tempAvailableSizes = tempAvailableSizes.filter((size) =>\r\n        availableSizes.includes(size),\r\n      );\r\n    }\r\n\r\n    // When two properties are selected, filter the third\r\n    if (selectedSuitSize.value && selectedSuitWidth.value) {\r\n      tempAvailableLengths = getAvailableLengths(\r\n        selectedSuitWidth.value,\r\n        selectedSuitSize.value,\r\n      );\r\n    }\r\n\r\n    if (selectedSuitSize.value && selectedSuitLength.value) {\r\n      tempAvailableWidths = getAvailableWidths(\r\n        selectedSuitLength.value,\r\n        selectedSuitSize.value,\r\n      );\r\n    }\r\n\r\n    if (selectedSuitWidth.value && selectedSuitLength.value) {\r\n      tempAvailableSizes = getAvailableSizes(\r\n        selectedSuitWidth.value,\r\n        selectedSuitLength.value,\r\n      );\r\n    }\r\n\r\n    availableWidths.value = tempAvailableWidths;\r\n    availableLengths.value = tempAvailableLengths;\r\n    availableSizes.value = tempAvailableSizes;\r\n  },\r\n  { immediate: true },\r\n);\r\n\r\n// Watchers to update the skuCode when all three properties are selected\r\nwatch(\r\n  [selectedSuitWidth, selectedSuitLength, selectedSuitSize],\r\n  ([width, length, size]) => {\r\n    if (width && length && size) {\r\n      productPageStore.setSkuCode(getSkuCode(width, length, size));\r\n      productPageStore.setSize(width + length + size);\r\n    }\r\n  },\r\n  { immediate: true },\r\n);\r\n</script>\r\n\r\n<template>\r\n  <div class=\"sizepicker sizepicker--suit\">\r\n    <!-- Widths Section -->\r\n    <div class=\"size-tile-group\">\r\n      <!-- Width Information -->\r\n      <div class=\"product__size-information\">\r\n        <span id=\"selectedsize\" class=\"size-tile-group__group--title\">\r\n          <span v-if=\"!selectedSuitWidth\">{{ $t(\"chooseWidth\") }}:</span>\r\n          <!-- Conditionally render the selected width when selected -->\r\n          <span v-if=\"selectedSuitWidth\">\r\n            {{ $t(\"chooseWidth\") }}:\r\n            <strong>{{ translateWidth(selectedSuitWidth) }}</strong>\r\n          </span>\r\n        </span>\r\n        <!-- Size Guide Button (Conditional) -->\r\n        <span v-if=\"isSizeGuide\" class=\"product__size-guide\">\r\n          <button\r\n            type=\"button\"\r\n            class=\"product__size-guide btn btn--small btn--link js-btn _js-vue-component-toggler\"\r\n            data-togglewhat=\"sizeguide\"\r\n          >\r\n            {{ $t(\"sizeGuide\") }}\r\n          </button>\r\n        </span>\r\n      </div>\r\n\r\n      <!-- Widths -->\r\n      <!-- If width, size, and length are all selected,\r\n        the input value gets populated with the skuCode -->\r\n      <div class=\"size-tile-group__items size-tile-group__items--width\">\r\n        <label\r\n          v-for=\"width in suitWidths\"\r\n          :key=\"width\"\r\n          :class=\"[\r\n            'size-tile-group__item',\r\n            { 'size-tile-group__item--soldout': !availableWidths.includes(width) || !inStockSuitWidths.includes(width) }\r\n          ]\"\r\n        >\r\n          <input\r\n            :id=\"'width_' + width\"\r\n            v-model=\"selectedSuitWidth\"\r\n            :name='$t(\"skuParameterCode\")'\r\n            :value=\"width\"\r\n            type=\"radio\"\r\n            :data-sku=\"\r\n              selectedSuitWidth && selectedSuitLength && selectedSuitSize\r\n                ? getSkuCode(selectedSuitWidth, selectedSuitLength, selectedSuitSize)\r\n                : ''\r\n            \"\r\n            class=\"size-tile-group__input _js-check-stock\"\r\n            :disabled=\"!availableWidths.includes(width) || !inStockSuitWidths.includes(width)\"\r\n            @change=\"productPageStore.setWidthSelected(true)\"\r\n          />\r\n          <span class=\"size-tile-group__text\">{{ translateWidth(width) }}</span>\r\n        </label>\r\n      </div>\r\n      <!-- Error Message if width not selected -->\r\n      <span v-if=\"displayWidthNotSelectedError\" class=\"size-tile-group__error\">\r\n        {{ $t(\"selectWidthMessage\") }}\r\n      </span>\r\n    </div>\r\n\r\n    <!-- Lengths Section -->\r\n    <div class=\"size-tile-group\">\r\n      <!-- Length Information -->\r\n      <div class=\"product__size-information\">\r\n        <span id=\"selectedsize\" class=\"size-tile-group__group--title\">\r\n          <span v-if=\"!selectedSuitLength\">{{ $t(\"chooseLength\") }}:</span>\r\n          <!-- Conditionally render the selected length when selected -->\r\n          <span v-if=\"selectedSuitLength\">\r\n            {{ $t(\"chooseLength\") }}:\r\n            <strong>{{ translateLength(selectedSuitLength) }}</strong>\r\n          </span>\r\n        </span>\r\n      </div>\r\n\r\n        <!-- Lengths -->\r\n        <div class=\"size-tile-group__items size-tile-group__items--length\">\r\n          <label\r\n            v-for=\"length in suitLengths\"\r\n            :key=\"length\"\r\n            :class=\"[\r\n              'size-tile-group__item',\r\n              { 'size-tile-group__item--soldout': !availableLengths.includes(length) || !inStockSuitLengths.includes(length) }\r\n            ]\"\r\n          >\r\n            <input\r\n              :id=\"'length_' + length\"\r\n              v-model=\"selectedSuitLength\"\r\n              type=\"radio\"\r\n              :value=\"length\"\r\n              class=\"size-tile-group__input _js-check-stock\"\r\n              :disabled=\"!availableLengths.includes(length) || !inStockSuitLengths.includes(length)\"\r\n              @change=\"productPageStore.setLengthSelected(true)\"\r\n            />\r\n            <span class=\"size-tile-group__text\">{{ translateLength(length) }}</span>\r\n          </label>\r\n        </div>\r\n\r\n        <!-- Error Message if length not selected -->\r\n        <span v-if=\"displayLengthNotSelectedError\" class=\"size-tile-group__error\">\r\n          {{ $t(\"selectLengthMessage\") }}\r\n        </span>\r\n      </div>\r\n\r\n    <!-- Sizes Section -->\r\n    <div class=\"size-tile-group\">\r\n      <!-- Size Information -->\r\n      <div class=\"product__size-information\">\r\n        <span id=\"selectedsize\" class=\"size-tile-group__group--title\">\r\n          <span v-if=\"!selectedSuitSize\">{{ $t(\"chooseSize\") }}:</span>\r\n          <!-- Conditionally render the selected size when selected -->\r\n          <span v-if=\"selectedSuitSize\">\r\n            {{ $t(\"chooseSize\") }}:\r\n            <strong>{{ selectedSuitSize }}</strong>\r\n          </span>\r\n        </span>\r\n      </div>\r\n\r\n      <!-- Sizes -->\r\n      <div class=\"size-tile-group__items\">\r\n        <label\r\n          v-for=\"size in suitSizes\"\r\n          :key=\"size\"\r\n          :class=\"[\r\n            'size-tile-group__item size-tile-group__item--normal',\r\n            { 'size-tile-group__item--soldout': !availableSizes.includes(size) || !inStockSuitSizes.includes(size) }\r\n          ]\"\r\n        >\r\n          <input\r\n            :id=\"'size_' + size\"\r\n            v-model=\"selectedSuitSize\"\r\n            type=\"radio\"\r\n            :value=\"size\"\r\n            class=\"size-tile-group__input _js-check-stock\"\r\n            :disabled=\"!availableSizes.includes(size) || !inStockSuitSizes.includes(size)\"\r\n            @change=\"productPageStore.setSizeSelected(true)\"\r\n          />\r\n          <span class=\"size-tile-group__text\">{{ size }}</span>\r\n        </label>\r\n      </div>\r\n\r\n      <!-- Error Message if size not selected -->\r\n      <span v-if=\"displaySizeNotSelectedError\" class=\"size-tile-group__error\">\r\n        {{ $t(\"selectSizeMessage\") }}\r\n      </span>\r\n    </div>\r\n\r\n    <!-- Inventory Low Notification -->\r\n    <span v-if=\"productPageStore.inventoryIsLow\" class=\"size-tile-group__warning\">\r\n      {{ productPageStore.inventoryLowMessage }}\r\n    </span>\r\n\r\n    <!-- Inventory Notification Button -->\r\n    <div\r\n      v-if=\"soldOutSizes.length > 0 && props.showInventoryNotification\"\r\n      class=\"product__inventory-notification _js-vue-inventory-nofitication-btn-container\"\r\n    >\r\n      <button\r\n        class=\"product__inventory-notification btn--link _js-vue-component-toggler _js-vue-inventory-notification-btn\"\r\n        data-togglewhat=\"inventoryNotification\"\r\n      >\r\n        <Icon :type=\"IconTypes.Bell\" :size=\"IconSizes.Tiny\" />\r\n        <p>\r\n          {{ $t(\"inventoryNotificationTrigger\") }}\r\n        </p>\r\n      </button>\r\n    </div>\r\n  </div>\r\n</template>","<script lang=\"ts\" setup>\r\nimport { computed, defineProps, watch, ref, onMounted} from \"vue\";\r\nimport { SkuDetails } from \"./sizePicker.models\";\r\nimport { useProductPageStore } from \"../../stores/productPageStore\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport { formatSize } from \"../../mixins/productSize.mixin\";\r\n\r\nconst props = defineProps<{\r\n  matrixSizes: Record<string, any>;\r\n  isSizeGuide?: boolean;\r\n  showInventoryNotification?: boolean;\r\n}>();\r\n\r\nconst productPageStore = useProductPageStore();\r\n\r\nconst displayWidthNotSelectedError = computed(\r\n  () => productPageStore.displayWidthNotSelectedError,\r\n);\r\n\r\nconst displayLengthNotSelectedError = computed(\r\n  () => productPageStore.displayLengthNotSelectedError,\r\n);\r\n\r\nconst pantsLengths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let lengths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      lengths.add(skuDetails.matrixSizeL);\r\n    });\r\n  });\r\n\r\n  return Array.from(lengths).sort((a, b) => Number(a) - Number(b));\r\n});\r\n\r\nconst pantsWidths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let widths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      widths.add(skuDetails.matrixSizeW);\r\n    });\r\n  });\r\n\r\n  const widthsArray = Array.from(widths);\r\n\r\n  // Check if all widths are numeric\r\n  const areWidthsNumeric = widthsArray.every((width) => !isNaN(Number(width)));\r\n\r\n  if (areWidthsNumeric) {\r\n    // Sort numerically\r\n    return widthsArray.sort((a, b) => Number(a) - Number(b));\r\n  } else {\r\n    // Sort by size labels\r\n    const sizeOrder = [\r\n      \"XXS\",\r\n      \"XS\",\r\n      \"S\",\r\n      \"M\",\r\n      \"L\",\r\n      \"XL\",\r\n      \"XXL\",\r\n      \"XXXL\",\r\n      \"XXXXL\",\r\n    ];\r\n    return widthsArray.sort(\r\n      (a, b) => sizeOrder.indexOf(a) - sizeOrder.indexOf(b),\r\n    );\r\n  }\r\n});\r\n\r\n// Get in-stock pants lengths (different from available lengths)\r\nconst inStockPantsLengths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let inStockpantsLengthsSet = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.inventoryCount > 0) {\r\n        inStockpantsLengthsSet.add(skuDetails.matrixSizeL);\r\n      }\r\n    });\r\n  });\r\n\r\n  // Convert the Set to an array and sort numerically\r\n  return Array.from(inStockpantsLengthsSet).sort(\r\n    (a, b) => Number(a) - Number(b),\r\n  );\r\n});\r\n\r\n// Get in-stock pant widths (different from available widths)\r\nconst inStockPantsWidths = computed(() => {\r\n  if (!props.matrixSizes) return [];\r\n  let inStockpantsWidthsSet = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.inventoryCount > 0) {\r\n        inStockpantsWidthsSet.add(skuDetails.matrixSizeW);\r\n      }\r\n    });\r\n  });\r\n\r\n  // Convert the Set to an array and sort numerically\r\n  return Array.from(inStockpantsWidthsSet).sort(\r\n    (a, b) => Number(a) - Number(b),\r\n  );\r\n});\r\n\r\nconst soldOutSizes = computed<SkuDetails[]>(() => {\r\n  return props.matrixSizes\r\n    .flat()\r\n    .filter((skuDetails) => skuDetails.inventoryCount === 0);\r\n});\r\n\r\n// Function to get SkuCode for a given width, length, and size\r\nfunction getSkuCode(width: string, length: string) {\r\n  let skuCode: string | undefined = undefined;\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.matrixSizeW === width &&\r\n        skuDetails.matrixSizeL === length\r\n      ) {\r\n        skuCode = skuDetails.skuCode;\r\n      }\r\n    });\r\n  });\r\n\r\n  return skuCode || \"\";\r\n}\r\n\r\n// Function to get inventory count for a given width and length\r\nfunction getInventoryCount(width: string, length: string) {\r\n  let inventoryCount = \"0\";\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.matrixSizeW === width &&\r\n        skuDetails.matrixSizeL === length\r\n      ) {\r\n        inventoryCount = skuDetails.inventoryCount.toString();\r\n      }\r\n    });\r\n  });\r\n\r\n  return inventoryCount;\r\n}\r\n\r\n// Function to get available lengths for a given width and size\r\nfunction getAvailableLengths(pantsWidth: string) {\r\n  const availableLengths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.matrixSizeW === pantsWidth &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableLengths.add(skuDetails.matrixSizeL);\r\n      }\r\n    });\r\n  });\r\n\r\n  return Array.from(availableLengths);\r\n}\r\n\r\n// Function to get available widths for a given length and size\r\nfunction getAvailableWidths(pantsLength: string) {\r\n  const availableWidths = new Set<string>();\r\n\r\n  props.matrixSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (\r\n        skuDetails.matrixSizeL === pantsLength &&\r\n        skuDetails.inventoryCount > 0 // Check inventory count\r\n      ) {\r\n        availableWidths.add(skuDetails.matrixSizeW);\r\n      }\r\n    });\r\n  });\r\n\r\n  return Array.from(availableWidths);\r\n}\r\n\r\n// Reactive state for selected values\r\nconst selectedPantsWidth = ref<string>(\"\");\r\nconst selectedPantsLength = ref<string>(\"\");\r\n\r\n// Reactive available options based on selected values\r\nconst availableWidths = ref<string[]>(pantsWidths.value);\r\nconst availableLengths = ref<string[]>(pantsLengths.value);\r\n\r\n// Function to automatically select a single in-stock option if only one exists\r\nconst autoSelectSingleOption = () => {\r\n  if (inStockPantsWidths.value.length === 1) {\r\n    selectedPantsWidth.value = inStockPantsWidths.value[0];\r\n    productPageStore.setWidthSelected(true);\r\n  }\r\n  if (inStockPantsLengths.value.length === 1) {\r\n    selectedPantsLength.value = inStockPantsLengths.value[0];\r\n    productPageStore.setLengthSelected(true);\r\n  }\r\n\r\n  if (selectedPantsWidth.value && selectedPantsLength.value) {\r\n    productPageStore.setSkuCode(\r\n      getSkuCode(selectedPantsWidth.value, selectedPantsLength.value),\r\n    );\r\n    productPageStore.setSize(\r\n      selectedPantsWidth.value + selectedPantsLength.value\r\n    );\r\n    productPageStore.setInventoryCount(\r\n      getInventoryCount(selectedPantsWidth.value, selectedPantsLength.value),\r\n    );\r\n    productPageStore.setCheckInventoryStatus(true);\r\n  }\r\n};\r\n\r\n// Call the function when the component is mounted\r\nonMounted(() => {\r\n  autoSelectSingleOption();\r\n});\r\n\r\n// Watch for changes in both `selectedPantsWidth` and `selectedPantsLength`\r\nwatch([selectedPantsWidth, selectedPantsLength], ([newWidth, newLength]) => {\r\n  if (newWidth && newLength) {\r\n    // Update the SKU code and inventory count when both sizes are selected\r\n    productPageStore.setSkuCode(getSkuCode(newWidth, newLength));\r\n    productPageStore.setSize(newWidth + newLength);\r\n    productPageStore.setInventoryCount(getInventoryCount(newWidth, newLength));\r\n\r\n    // Trigger inventory status check\r\n    productPageStore.setCheckInventoryStatus(true);\r\n  }\r\n});\r\n\r\n// Watchers to update available options based on selections\r\nwatch(\r\n  [selectedPantsWidth, selectedPantsLength],\r\n  () => {\r\n    let tempAvailableWidths = pantsWidths.value;\r\n    let tempAvailableLengths = pantsLengths.value;\r\n\r\n    if (selectedPantsWidth.value) {\r\n      // Update available lengths based on the selected width\r\n      tempAvailableLengths = getAvailableLengths(selectedPantsWidth.value);\r\n    }\r\n\r\n    if (selectedPantsLength.value) {\r\n      // Update available widths based on the selected length\r\n      tempAvailableWidths = getAvailableWidths(selectedPantsLength.value);\r\n    }\r\n\r\n    // Set the reactive variables with the updated options\r\n    availableWidths.value = tempAvailableWidths;\r\n    availableLengths.value = tempAvailableLengths;\r\n  },\r\n  { immediate: true },\r\n);\r\n\r\n// Watchers to update the skuCode when width or length are selected/changes\r\nwatch(\r\n  [selectedPantsWidth, selectedPantsLength],\r\n  ([newWidth, newLength]) => {\r\n    if (newWidth && newLength) {\r\n      productPageStore.setSkuCode(getSkuCode(newWidth, newLength));\r\n      productPageStore.setSize(newWidth + newLength);\r\n    }\r\n  },\r\n  { immediate: true },\r\n);\r\n</script>\r\n\r\n<template>\r\n  <div class=\"sizepicker sizepicker--pants\">\r\n    <!-- Widths Section -->\r\n    <div class=\"size-tile-group\">\r\n      <!-- Width Information -->\r\n      <div class=\"product__size-information\">\r\n        <span id=\"selectedsize\" class=\"size-tile-group__group--title\">\r\n          <span v-if=\"!selectedPantsWidth\">{{ $t(\"chooseWidth\") }}:</span>\r\n          <!-- Conditionally render the selected width when selected -->\r\n          <span v-if=\"selectedPantsWidth\">\r\n            {{ $t(\"chooseWidth\") }}:\r\n            <strong>{{ selectedPantsWidth }}</strong>\r\n          </span>\r\n        </span>\r\n        <!-- Size Guide Button (Conditional) -->\r\n        <span v-if=\"isSizeGuide\" class=\"product__size-guide\">\r\n          <button\r\n            type=\"button\"\r\n            class=\"product__size-guide btn btn--small btn--link js-btn _js-vue-component-toggler\"\r\n            data-togglewhat=\"sizeguide\"\r\n          >\r\n            {{ $t(\"sizeGuide\") }}\r\n          </button>\r\n        </span>\r\n      </div>\r\n\r\n      <!-- Widths -->\r\n      <!-- If width, size, and length are all selected,\r\n        the input value gets populated with the skuCode -->\r\n      <div class=\"size-tile-group__items size-tile-group__items--width\">\r\n        <label\r\n          v-for=\"width in pantsWidths\"\r\n          :key=\"width\"\r\n          :class=\"[\r\n            'size-tile-group__item',\r\n            { 'size-tile-group__item--soldout': !availableWidths.includes(width) || !inStockPantsWidths.includes(width) }\r\n          ]\"\r\n        >\r\n          <input\r\n            :id=\"'width_' + width\"\r\n            v-model=\"selectedPantsWidth\"\r\n            :name='$t(\"skuParameterCode\")'\r\n            :value=\"width\"\r\n            type=\"radio\"\r\n            :data-sku=\"\r\n              selectedPantsWidth && selectedPantsLength\r\n                ? getSkuCode(selectedPantsWidth, selectedPantsLength)\r\n                : ''\r\n            \"\r\n            class=\"size-tile-group__input _js-check-stock\"\r\n            :disabled=\"!availableWidths.includes(width) || !inStockPantsWidths.includes(width)\"\r\n            @change=\"productPageStore.setWidthSelected(true)\"\r\n          />\r\n          <span class=\"size-tile-group__text\">{{ width }}</span>\r\n        </label>\r\n      </div>\r\n      <!-- Error Message if width not selected -->\r\n      <span v-if=\"displayWidthNotSelectedError\" class=\"size-tile-group__error\">\r\n        {{ $t(\"selectWidthMessage\") }}\r\n      </span>\r\n    </div>\r\n\r\n    <!-- Lengths Section -->\r\n    <div class=\"size-tile-group\">\r\n      <!-- Length Information -->\r\n      <div class=\"product__size-information\">\r\n        <span id=\"selectedsize\" class=\"size-tile-group__group--title\">\r\n          <span v-if=\"!selectedPantsLength\">{{ $t(\"chooseLength\") }}:</span>\r\n          <!-- Conditionally render the selected length when selected -->\r\n          <span v-if=\"selectedPantsLength\">\r\n            {{ $t(\"chooseLength\") }}:\r\n            <strong>{{ selectedPantsLength }}</strong>\r\n          </span>\r\n        </span>\r\n      </div>\r\n\r\n      <!-- Lengths -->\r\n      <div class=\"size-tile-group__items size-tile-group__items--length\">\r\n        <label\r\n          v-for=\"length in pantsLengths\"\r\n          :key=\"length\"\r\n          :class=\"[\r\n            'size-tile-group__item',\r\n            { 'size-tile-group__item--soldout': !availableLengths.includes(length) || !inStockPantsLengths.includes(length) }\r\n          ]\"\r\n        >\r\n          <input\r\n            :id=\"'length_' + length\"\r\n            v-model=\"selectedPantsLength\"\r\n            type=\"radio\"\r\n            :value=\"length\"\r\n            class=\"size-tile-group__input _js-check-stock\"\r\n            :disabled=\"!availableLengths.includes(length) || !inStockPantsLengths.includes(length)\"\r\n            @change=\"productPageStore.setLengthSelected(true)\"\r\n          />\r\n          <span class=\"size-tile-group__text\">{{ length }}</span>\r\n        </label>\r\n      </div>\r\n\r\n      <!-- Error Message if length not selected -->\r\n      <span v-if=\"displayLengthNotSelectedError\" class=\"size-tile-group__error\">\r\n        {{ $t(\"selectLengthMessage\") }}\r\n      </span>\r\n    </div>\r\n\r\n    <!-- Inventory Low Notification -->\r\n    <span v-if=\"productPageStore.inventoryIsLow\" class=\"size-tile-group__warning\">\r\n      {{ productPageStore.inventoryLowMessage }}\r\n    </span>\r\n\r\n    <!-- Inventory Notification Button -->\r\n    <div\r\n      v-if=\"soldOutSizes.length > 0 && props.showInventoryNotification\"\r\n      class=\"product__inventory-notification _js-vue-inventory-nofitication-btn-container\"\r\n    >\r\n      <button\r\n        class=\"product__inventory-notification btn--link _js-vue-component-toggler _js-vue-inventory-notification-btn\"\r\n        data-togglewhat=\"inventoryNotification\"\r\n      >\r\n        <Icon :type=\"IconTypes.Bell\" :size=\"IconSizes.Tiny\" />\r\n        <p>\r\n          {{ $t(\"inventoryNotificationTrigger\") }}\r\n        </p>\r\n      </button>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { computed, defineProps, watch, ref, onMounted } from \"vue\";\r\nimport { SkuDetails } from \"./sizePicker.models\";\r\nimport { useProductPageStore } from \"../../stores/productPageStore\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport { formatSize } from \"../../mixins/productSize.mixin\";\r\n\r\nconst props = defineProps<{\r\n  regularSizes: Record<string, any>;\r\n  isSizeGuide?: boolean;\r\n  showInventoryNotification?: boolean;\r\n}>();\r\n\r\nconst productPageStore = useProductPageStore();\r\nlet isRegularSizePicker = true;\r\n\r\n// Reactive state for selected values\r\nconst selectedRegularSize = ref<string>(\"\");\r\n\r\n// Computed properties for store states\r\nconst displaySizeNotSelectedError = computed(\r\n  () => productPageStore.displaySizeNotSelectedError,\r\n);\r\n\r\n// Function to handle size change\r\nfunction handleSizeChange(size: string) {\r\n  productPageStore.setSizeSelected(true);\r\n  productPageStore.setSize(size);\r\n  const skuCode = getSkuCode(size);\r\n  productPageStore.setSkuCode(skuCode);\r\n}\r\n\r\nconst isOneSize = computed(() => {\r\n  return props.regularSizes?.length === 1 && props.regularSizes[0].length === 1;\r\n});\r\n\r\nconst regularSizes = computed(() => {\r\n  if (!props.regularSizes) return [];\r\n  let sizes = new Set<string>();\r\n\r\n  props.regularSizes?.forEach((skuDetailsArray: SkuDetails[]) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      sizes.add(skuDetails.regularSize);\r\n    });\r\n  });\r\n\r\n  const sizesArray = Array.from(sizes);\r\n\r\n  // Check if all sizes are numeric\r\n  const areSizesNumeric = sizesArray.every((size) => !isNaN(Number(size)));\r\n\r\n  if (areSizesNumeric) {\r\n    // Sort sizes numerically\r\n    return sizesArray.sort((a, b) => Number(a) - Number(b));\r\n  }\r\n\r\n  // Return sizes as is if they are not numeric\r\n  return sizesArray;\r\n});\r\n\r\n// Get in-stock regular sizes (different from available sizes)\r\nconst inStockRegularSizes = computed(() => {\r\n  if (!props.regularSizes) return [];\r\n  let inStockRegularSizesSet = new Set<string>();\r\n\r\n  props.regularSizes?.forEach((skuDetailsArray: SkuDetails[]) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.inventoryCount > 0) {\r\n        inStockRegularSizesSet.add(skuDetails.regularSize);\r\n      }\r\n    });\r\n  });\r\n\r\n  return Array.from(inStockRegularSizesSet);\r\n});\r\n\r\nconst soldOutSizes = computed<SkuDetails[]>(() => {\r\n  return props.regularSizes\r\n    .flat()\r\n    .filter((skuDetails) => skuDetails.inventoryCount === 0);\r\n});\r\n\r\nfunction isWideSize(size: string): boolean {\r\n  return size.length >= 4;\r\n}\r\n\r\nfunction getSkuCode(regularSize: string): string {\r\n  if (!props.regularSizes) return \"\";\r\n  let skuCode: string | undefined = undefined;\r\n\r\n  props.regularSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.regularSize === regularSize) {\r\n        skuCode = skuDetails.skuCode;\r\n      }\r\n    });\r\n  });\r\n\r\n  return skuCode || \"\";\r\n}\r\n\r\nfunction getInventoryCount(regularSize: string): string {\r\n  if (!props.regularSizes) return \"0\";\r\n  let inventoryCount = \"0\";\r\n\r\n  props.regularSizes?.forEach((skuDetailsArray) => {\r\n    skuDetailsArray.forEach((skuDetails) => {\r\n      if (skuDetails.regularSize === regularSize) {\r\n        inventoryCount = skuDetails.inventoryCount.toString();\r\n      }\r\n    });\r\n  });\r\n\r\n  return inventoryCount;\r\n}\r\n\r\n// Function to automatically select a single in-stock option if only one exists\r\nconst autoSelectSingleOption = () => {\r\n  if (inStockRegularSizes.value.length === 1) {\r\n    selectedRegularSize.value = inStockRegularSizes.value[0];\r\n    productPageStore.setSizeSelected(true);\r\n    productPageStore.setSkuCode(getSkuCode(inStockRegularSizes.value[0]));\r\n    productPageStore.setSize(inStockRegularSizes.value[0]);\r\n    productPageStore.setInventoryCount(\r\n      getInventoryCount(inStockRegularSizes.value[0]),\r\n    );\r\n    productPageStore.setCheckInventoryStatus(true);\r\n  }\r\n};\r\n\r\n// Call the function when the component is mounted\r\nonMounted(() => {\r\n  autoSelectSingleOption();\r\n});\r\n\r\n// Watch for changes in `selectedRegularSize` and perform operations\r\nwatch(selectedRegularSize, (newSize) => {\r\n  if (!newSize) return;\r\n  // Update the SKU code and inventory count when size is selected\r\n  productPageStore.setSkuCode(getSkuCode(newSize));\r\n  productPageStore.setSize(newSize);\r\n  productPageStore.setInventoryCount(getInventoryCount(newSize));\r\n\r\n  // Trigger inventory status check\r\n  productPageStore.setCheckInventoryStatus(true);\r\n});\r\n</script>\r\n<template>\r\n  <div class=\"sizepicker\">\r\n    <div class=\"size-tile-group\">\r\n      <!-- Size Information -->\r\n      <div class=\"product__size-information\">\r\n        <span id=\"selectedsize\" class=\"size-tile-group__group--title\">\r\n          <span v-if=\"!selectedRegularSize\">{{ $t(\"chooseSize\") }}:</span>\r\n          <!-- Render the selected size when selected -->\r\n          <span v-if=\"selectedRegularSize\">\r\n            {{ $t(\"chooseSize\") }}:\r\n            <strong>{{ formatSize(selectedRegularSize, isRegularSizePicker) }}</strong>\r\n          </span>\r\n        </span>\r\n        <!-- Size Guide Button (Conditional) -->\r\n        <span v-if=\"isSizeGuide\" class=\"product__size-guide\">\r\n          <button\r\n            type=\"button\"\r\n            class=\"product__size-guide btn btn--small btn--link js-btn _js-vue-component-toggler\"\r\n            data-togglewhat=\"sizeguide\"\r\n          >\r\n            {{ $t(\"sizeGuide\") }}\r\n          </button>\r\n        </span>\r\n      </div>\r\n\r\n      <fieldset aria-labelledby=\"selectsizelabel\" class=\"product__size__normal\">\r\n        <!-- Sizes -->\r\n        <div\r\n          class=\"size-tile-group__items\"\r\n          :class=\"isOneSize ? 'size-tile-group__items--onesize' : ''\"\r\n        >\r\n        <label\r\n          v-for=\"size in regularSizes\"\r\n          :key=\"size\"\r\n          :class=\"[\r\n            'size-tile-group__item',\r\n            isWideSize(formatSize(size, isRegularSizePicker))\r\n              ? 'size-tile-group__item--wide'\r\n              : 'size-tile-group__item--normal',\r\n            { 'size-tile-group__item--soldout': !inStockRegularSizes.includes(size) },\r\n          ]\"\r\n        >\r\n          <input\r\n            :id=\"'size_' + size\"\r\n            v-model=\"selectedRegularSize\"\r\n            :name='$t(\"skuParameterCode\")'\r\n            type=\"radio\"\r\n            :data-sku=\"selectedRegularSize ? getSkuCode(selectedRegularSize) : ''\"\r\n            :value=\"size\"\r\n            class=\"size-tile-group__input _js-check-stock\"\r\n            :disabled=\"!inStockRegularSizes.includes(size)\"\r\n            @change=\"handleSizeChange(size)\"\r\n          />\r\n          <span class=\"size-tile-group__text\">{{ formatSize(size, isRegularSizePicker) }}</span>\r\n        </label>\r\n        </div>\r\n      </fieldset>\r\n      <!-- Error Message if size not selected -->\r\n      <span v-if=\"displaySizeNotSelectedError\" class=\"size-tile-group__error\">\r\n        {{ $t(\"selectSizeMessage\") }}\r\n      </span>\r\n    </div>\r\n    <!-- Inventory Low Notification -->\r\n    <span v-if=\"productPageStore.inventoryIsLow\" class=\"size-tile-group__warning\">\r\n      {{ productPageStore.inventoryLowMessage }}\r\n    </span>\r\n    <div\r\n      v-if=\"soldOutSizes.length > 0 && props.showInventoryNotification\"\r\n      class=\"product__inventory-notification _js-vue-inventory-nofitication-btn-container\"\r\n    >\r\n      <button\r\n        class=\"product__inventory-notification btn--link _js-vue-component-toggler _js-vue-inventory-notification-btn\"\r\n        data-togglewhat=\"inventoryNotification\"\r\n      >\r\n        <Icon :type=\"IconTypes.Bell\" :size=\"IconSizes.Tiny\" />\r\n        <p>\r\n          {{ $t(\"inventoryNotificationTrigger\") }}\r\n        </p>\r\n      </button>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nconst props = defineProps<{\r\n  showAsColumnOnMobile?: boolean;\r\n  productCount?: number;\r\n}>();\r\n</script>\r\n\r\n<template>\r\n  <div class=\"product-list__heading skeleton__text skeleton__text--longest\"></div>\r\n  <div class=\"product-list\">\r\n    <div class=\"product-list__heading\">\r\n      <span class=\"skeleton__text--long\"></span>\r\n    </div>\r\n    <div\r\n      class=\"product-list__items product-list__items--auto-width\"\r\n      :class=\"{\r\n        'product-list__items--column': props.showAsColumnOnMobile,\r\n      }\"\r\n    >\r\n      <div v-for=\"(_, index) in props.productCount\" :key=\"index\">\r\n        <div class=\"teaser-product teaser-product--variation\">\r\n          <div class=\"teaser-product__link-image\">\r\n            <div class=\"teaser-product__photos\">\r\n              <div class=\"teaser-product__photo\">\r\n                <div class=\"skeleton__img skeleton__img--productsmodule\"></div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n          <div class=\"teaser-product__content\">\r\n            <div class=\"teaser-product__name skeleton__text skeleton__text--long\"></div>\r\n            <div class=\"teaser-product__price skeleton__text skeleton__text--short\"></div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","import { onMounted, onBeforeUnmount, ref } from \"vue\";\r\n\r\n/**\r\n * A composable function that sets up a lazy loading mechanism using the IntersectionObserver API.\r\n * It triggers the provided callback function when the target element comes into view.\r\n *\r\n * @param callBack - The function to be called when the target element intersects with the viewport.\r\n * @param target - The target element to observe. It can be a CSS selector string or an Element. Defaults to \".product-list\".\r\n * @param onlyOnce - If true, the callback will only be executed once.\r\n */\r\nexport function useLazy(\r\n    callBack: () => void,\r\n    target: string | Element = \".product-list\",\r\n    onlyOnce = false,\r\n) {\r\n    const lazyObserver = ref<IntersectionObserver | null>(null);\r\n    let hasIntersected = false;\r\n\r\n    onMounted(() => {\r\n        if (!(\"IntersectionObserver\" in window)) {\r\n            callBack();\r\n            return;\r\n        }\r\n\r\n        const elements =\r\n            typeof target === \"string\"\r\n                ? document.querySelectorAll(target) // Select all matching elements\r\n                : [target];\r\n\r\n        if (!elements || elements.length === 0) {\r\n            return;\r\n        }\r\n\r\n        lazyObserver.value = new IntersectionObserver(\r\n            (entries) => {\r\n                // Iterate through all entries to find the correct one\r\n                entries.forEach((entry, index) => {\r\n                    if (entry.isIntersecting && shouldCallCallback()) {\r\n                        hasIntersected = true;\r\n                        callBack();\r\n\r\n                        if (onlyOnce) {\r\n                            lazyObserver.value?.disconnect();\r\n                        }\r\n                    }\r\n                });\r\n            },\r\n            { threshold: [0] },\r\n        );\r\n\r\n        // Observe all elements\r\n        elements.forEach((element) => {\r\n            lazyObserver.value?.observe(element);\r\n        });\r\n    });\r\n\r\n    const shouldCallCallback = () => {\r\n        return !onlyOnce || !hasIntersected;\r\n    };\r\n\r\n    onBeforeUnmount(() => {\r\n        if (lazyObserver.value) {\r\n            lazyObserver.value.disconnect();\r\n        }\r\n    });\r\n}\r\n","<script setup lang=\"ts\">\r\nimport { computed, nextTick, onBeforeMount, onMounted, onUnmounted, ref, watch } from \"vue\";\r\nimport { ProductGroup, SearchResultRecommendList } from \"../../services/search.service\";\r\nimport ProductTeaser from \"../../components/productTeaser/productTeaser.vue\";\r\nimport ProductsModuleContentSkeleton from \"./productsModuleContentSkeleton.vue\";\r\nimport { useFavoritesStore } from \"../../stores/favoritesStore\";\r\nimport GtmService from \"../../services/gtm.service\";\r\nimport { useLazy } from \"../../composables/useLazy\";\r\nimport $ from \"jquery\";\r\n\r\nconst props = defineProps<{\r\n  heading: string;\r\n  userAuthenticated: boolean;\r\n  searchResultRecommendList?: SearchResultRecommendList;\r\n  isLoading?: boolean;\r\n  isLoadingFavorites?: boolean;\r\n  showAsColumnOnMobile?: boolean;\r\n  useSliderForDesktop?: boolean;\r\n  containerClass?: string;\r\n  smallLabel?: boolean;\r\n  hideSizes?: boolean;\r\n  hideColors?: boolean;\r\n  hidePromotion?: boolean;\r\n  productCount?: number;\r\n  useSkeletonLoaders?: boolean;\r\n  hideFavorites?: boolean;\r\n  itemListName?: string;\r\n  itemListId?: string;\r\n  upsellAlgorithm?: string;\r\n  trackViewItemList?: boolean;\r\n  trackSelectItem?: boolean;\r\n  isQuickAdd?: boolean;\r\n}>();\r\n\r\nconst favoritesStore = useFavoritesStore();\r\nconst id = `${props.itemListId}-content`;\r\nconst sliderRef = ref<HTMLElement | null>(null);\r\nconst parentRef = ref<HTMLElement | null>(null);\r\nlet resizeTimeout: ReturnType<typeof setTimeout> | null = null;\r\n\r\n// Function to initialize the slider\r\nconst initializeSlider = () => {\r\n  if (!sliderRef.value) return;\r\n\r\n  const hasItems = $(sliderRef.value).find(\"li\").length > 0;\r\n  if (!hasItems) return; // Prevent initializing Slick on an empty list\r\n\r\n  if (props.useSliderForDesktop && window.matchMedia(\"(min-width: 47.9375em)\").matches) {\r\n    $(sliderRef.value).not(\".slick-initialized\").slick({\r\n      slidesToShow: 4,\r\n      slidesToScroll: 1,\r\n      arrows: true,\r\n      infinite: false,\r\n    });\r\n    if (parentRef.value) {\r\n        parentRef.value.classList.add('has-slick-initialized');\r\n    }\r\n  }\r\n};\r\n\r\n// Function to destroy the slider\r\nconst destroySlider = () => {\r\n  if ($(sliderRef.value).hasClass(\"slick-initialized\")) {\r\n    $(sliderRef.value).slick(\"unslick\");\r\n    if (parentRef.value) {\r\n      parentRef.value.classList.remove('has-slick-initialized');\r\n    }\r\n  }\r\n};\r\n\r\nconst handleIntersection = () => {\r\n  if (props.trackViewItemList && props.searchResultRecommendList?.primaryList?.productGroups) {\r\n    GtmService.pushViewItemListEvent(\r\n      props.itemListId?.toLowerCase() ?? \"\",\r\n      props.itemListName?.toLowerCase() ?? \"\",\r\n      props.userAuthenticated,\r\n      props.searchResultRecommendList,\r\n      props.upsellAlgorithm?.toLowerCase(),\r\n    );\r\n  }\r\n};\r\n\r\nonBeforeMount(() => {\r\n  useLazy(handleIntersection, `#${id}`, true);\r\n});\r\n\r\nonMounted(() => {\r\n\r\n  initializeSlider();\r\n  // Listen for resize events\r\n  window.addEventListener(\"resize\", () => {\r\n    if (resizeTimeout) clearTimeout(resizeTimeout);\r\n    resizeTimeout = setTimeout(() => {\r\n      destroySlider();\r\n      initializeSlider();\r\n    }, 250);\r\n  });\r\n\r\n  if (props.userAuthenticated) {\r\n    favoritesStore.getFavorites();\r\n  }\r\n});\r\n\r\nonUnmounted(() => {\r\n  destroySlider();\r\n  if (resizeTimeout) clearTimeout(resizeTimeout);\r\n});\r\n\r\n// Watch for when products are loaded\r\nwatch(() => props.searchResultRecommendList, async (newList) => {\r\n  if (newList?.primaryList && newList.primaryList.productGroups && newList.primaryList.productGroups.length > 0) {\r\n    await nextTick(); // Wait for Vue to render the <li> elements\r\n    destroySlider();\r\n    initializeSlider();\r\n  }\r\n}, { deep: true, immediate: true });\r\n</script>\r\n\r\n<template>\r\n  <div ref=\"parentRef\" :id=\"id\" v-show=\"!props.isLoading && searchResultRecommendList?.primaryList?.productGroups?.length\" :class=\"props.containerClass\">\r\n    <div class=\"product-list product-list__upsell\">\r\n      <!-- Heading -->\r\n      <h2 v-if=\"props.heading\" class=\"product-list__heading\">\r\n        {{ props.heading }}\r\n      </h2>\r\n      \r\n      <!-- Result -->\r\n      <ul\r\n        id=\"category-list\"\r\n        ref=\"sliderRef\"\r\n        class=\"product-list__items product-list__items--auto-width\"\r\n        :class=\"{ 'product-list__items--column': props.showAsColumnOnMobile }\"\r\n      >\r\n        <template v-for=\"(productGroup, index) in searchResultRecommendList?.primaryList?.productGroups\" :key=\"index\">\r\n          <template v-if=\"productGroup.products?.length\">\r\n            <li :key=\"`${productGroup.key}-${productGroup.products[0]?.key}`\">\r\n              <ProductTeaser\r\n                :product-group=\"productGroup\"\r\n                :product=\"productGroup.products[0]\"\r\n                :is-user-authenticated=\"props.userAuthenticated\"\r\n                :is-quick-add=\"props.isQuickAdd\"\r\n                :favorites=\"favoritesStore.favorites\"\r\n                :is-loading-products=\"props.isLoading\"\r\n                :is-loading-favorites=\"favoritesStore.isLoadingFavorites\"\r\n                :use-gtm-tracking=\"true\"\r\n                :user-id=\"''\"\r\n                :hide-sizes=\"props.hideSizes\"\r\n                :hide-colors=\"props.hideColors\"\r\n                :hide-promotion=\"props.hidePromotion\"\r\n                :hide-favorites=\"props.hideFavorites\"\r\n                :track-select-item=\"props.trackSelectItem\"\r\n                :item-list-id=\"props.itemListId\"\r\n                :item-list-name=\"props.itemListName\"\r\n                :item-list-index=\"index\"\r\n                @toggleFavorite=\"favoritesStore.toggleFavorite($event)\"\r\n              />\r\n            </li>\r\n          </template>\r\n        </template>\r\n      </ul>\r\n    </div>\r\n  </div>\r\n\r\n  <!-- Skeleton Loader -->\r\n  <div\r\n    v-if=\"props.isLoading && props.useSkeletonLoaders\"\r\n    :class=\"props.containerClass\"\r\n    class=\"product-list product-list__upsell\"\r\n  >\r\n    <ProductsModuleContentSkeleton\r\n      :product-count=\"props.productCount\"\r\n      :show-as-column-on-mobile=\"props.showAsColumnOnMobile\"\r\n    />\r\n  </div>\r\n</template>\r\n","import { SearchResultRecommendList } from \"Scripts/global/apps/services/models/search.models\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\nimport {\r\n    AddToCartPopupUpsellRequestDto,\r\n    CartPageUpsellRequestDto,\r\n    ProductPageRequestDto,\r\n    UpsellBlockRequestDto,\r\n} from \"./esalesAPISchema\";\r\n\r\nexport type UpsellSuccess = [true, SearchResultRecommendList[]];\r\ntype UpsellFailure = [false, string];\r\nexport type UpsellResult = UpsellSuccess | UpsellFailure;\r\n\r\nexport class UpsellService {\r\n    private static readonly baseUrl = \"/publicapi/esales\";\r\n\r\n    private static async getUpsell<T>(\r\n        endpoint: string,\r\n        body?: T,\r\n        queryParams?: T,\r\n        method: \"GET\" | \"POST\" = \"POST\",\r\n    ): Promise<UpsellResult> {\r\n        let url = `${this.baseUrl}/${endpoint}`;\r\n\r\n        if (queryParams && Object.keys(queryParams).length > 0) {\r\n            const queryString = new URLSearchParams(queryParams).toString();\r\n            url += `?${queryString}`;\r\n        }\r\n\r\n        const response = await fetch(url, {\r\n            method,\r\n            headers: {\r\n                \"Content-Type\": \"application/json\",\r\n            },\r\n            body: body ? JSON.stringify(body) : undefined,\r\n        });\r\n\r\n        if (!response.ok) {\r\n            await LogErrorResponse(url.toString(), response);\r\n            return [\r\n                false,\r\n                `Failed to fetch upsell for ${endpoint}: ${response.statusText}`,\r\n            ];\r\n        }\r\n\r\n        return [true, await response.json()];\r\n    }\r\n\r\n    static async getProductPageUpsell(\r\n        payload: ProductPageRequestDto,\r\n    ): Promise<UpsellResult> {\r\n        return this.getUpsell<ProductPageRequestDto>(\r\n            \"product-page-upsell\",\r\n            payload,\r\n        );\r\n    }\r\n\r\n    static async getAddToCartPopupUpsell(\r\n        payload: AddToCartPopupUpsellRequestDto,\r\n    ): Promise<UpsellResult> {\r\n        return this.getUpsell<AddToCartPopupUpsellRequestDto>(\r\n            \"add-to-cart-popup-upsell\",\r\n            payload,\r\n        );\r\n    }\r\n\r\n    static async getCartPageUpsell(\r\n        payload: CartPageUpsellRequestDto,\r\n    ): Promise<UpsellResult> {\r\n        return this.getUpsell<CartPageUpsellRequestDto>(\r\n            \"cart-page-upsell\",\r\n            payload,\r\n        );\r\n    }\r\n\r\n    static async getUpsellBlock(\r\n        payload: UpsellBlockRequestDto,\r\n    ): Promise<UpsellResult> {\r\n        return this.getUpsell<UpsellBlockRequestDto>(\r\n            \"upsell-block\",\r\n            undefined,\r\n            payload,\r\n            \"GET\",\r\n        );\r\n    }\r\n}\r\n","// lazy.ts\r\nexport function lazy(\r\n    callBack: () => void,\r\n    target: string | Element = \".product-list\",\r\n    onlyOnce = false,\r\n): { disconnect: () => void } {\r\n    let lazyObserver: IntersectionObserver | null = null;\r\n    let hasIntersected = false;\r\n\r\n    const init = () => {\r\n        if (!(\"IntersectionObserver\" in window)) {\r\n            callBack();\r\n            return;\r\n        }\r\n\r\n        const element = typeof target === \"string\"\r\n            ? document.querySelector(target)\r\n            : target;\r\n\r\n        if (!element) {\r\n            callBack();\r\n            return;\r\n        }\r\n\r\n        lazyObserver = new IntersectionObserver(\r\n            (entries) => {\r\n                entries.forEach(entry => {\r\n                    if (entry.isIntersecting && shouldCallCallback()) {\r\n                        hasIntersected = true;\r\n                        callBack();\r\n                    }\r\n                });\r\n            },\r\n            { threshold: [0] },\r\n        );\r\n\r\n        lazyObserver.observe(element as Element);\r\n    };\r\n\r\n    const disconnect = () => {\r\n        if (lazyObserver) {\r\n            lazyObserver.disconnect();\r\n        }\r\n    };\r\n\r\n    const shouldCallCallback = () => {\r\n        return !onlyOnce || !hasIntersected;\r\n    }\r\n\r\n    init();\r\n\r\n    return {\r\n        disconnect,\r\n    };\r\n}","// useUpsell.ts\r\nimport { onMounted, Ref, ref, watch } from \"vue\";\r\nimport { SearchResultRecommendList } from \"../services/search.service\";\r\nimport { UpsellResult, UpsellService } from \"../utils/API/Esales/esalesAPI\";\r\nimport { lazy } from \"../mixins/lazy\";\r\n\r\ninterface BaseUpsellProps {\r\n    lazyLoad?: boolean;\r\n    rootElement?: Ref<Element | null>;\r\n}\r\n\r\ninterface UseUpsellProps extends BaseUpsellProps {\r\n    listPath?: string;\r\n    productKey?: string;\r\n    limit?: number;\r\n    trigger?: Ref<string | string[] | undefined>;\r\n    fetcher: () => Promise<UpsellResult>;\r\n}\r\n\r\nconst isArray = (value: any): value is string[] => Array.isArray(value);\r\n\r\nfunction useUpsell({\r\n    fetcher,\r\n    lazyLoad = false,\r\n    rootElement,\r\n    trigger,\r\n}: UseUpsellProps) {\r\n    const upsellModel = ref<undefined | SearchResultRecommendList[]>(undefined);\r\n    const isLoading = ref(false);\r\n\r\n    const fetch = async () => {\r\n        isLoading.value = true;\r\n\r\n        const [ok, result] = await fetcher();\r\n\r\n        if (ok) {\r\n            upsellModel.value = result;\r\n        }\r\n\r\n        isLoading.value = false;\r\n    };\r\n\r\n    const handleTriggerChange = async (\r\n        newValue: string | string[] | undefined,\r\n        oldValue: string | string[] | undefined,\r\n    ) => {\r\n        if (!newValue || (isArray(newValue) && newValue.length === 0)) return;\r\n\r\n        if (isArray(newValue) && isArray(oldValue)) {\r\n            if (newValue.length === oldValue.length) return;\r\n            return await fetch();\r\n        }\r\n\r\n        if (!isArray(newValue) && !isArray(oldValue)) {\r\n            if (newValue === oldValue) return;\r\n            return await fetch();\r\n        }\r\n    };\r\n\r\n    if (trigger) {\r\n        watch(() => trigger.value, handleTriggerChange);\r\n    } else {\r\n        onMounted(() =>\r\n            lazyLoad && rootElement?.value && !upsellModel.value\r\n                ? lazy(fetch, rootElement.value, true)\r\n                : fetch(),\r\n        );\r\n    }\r\n\r\n    return {\r\n        upsellModel,\r\n        isLoading,\r\n    };\r\n}\r\n\r\ninterface useProductPageUpsellProps extends BaseUpsellProps {\r\n    productKey: string;\r\n    categoryName: string;\r\n}\r\n\r\nexport function useProductPageUpsell({\r\n    productKey,\r\n    categoryName,\r\n    lazyLoad,\r\n    rootElement,\r\n}: useProductPageUpsellProps) {\r\n    return useUpsell({\r\n        productKey,\r\n        lazyLoad,\r\n        rootElement,\r\n        fetcher: () =>\r\n            UpsellService.getProductPageUpsell({\r\n                ProductKey: productKey,\r\n                categoryName,\r\n                TouchPoint: \"Desktop\",\r\n                Preview: false,\r\n            }),\r\n    });\r\n}\r\n\r\ninterface useListPathUpsellProps extends BaseUpsellProps {\r\n    listPath: string;\r\n    limit?: number;\r\n}\r\n\r\nexport function useListPathUpsell({\r\n    listPath,\r\n    limit,\r\n    lazyLoad,\r\n    rootElement,\r\n}: useListPathUpsellProps) {\r\n    return useUpsell({\r\n        lazyLoad,\r\n        rootElement,\r\n        fetcher: () =>\r\n            UpsellService.getUpsellBlock({\r\n                listPath,\r\n                TouchPoint: \"Desktop\",\r\n                Preview: false,\r\n                limit,\r\n            }),\r\n    });\r\n}\r\n\r\ninterface useCartStatusUpsellProps extends BaseUpsellProps {\r\n    variantKey: Ref<string>;\r\n    categoryName: string;\r\n    trigger?: Ref<string | undefined>;\r\n}\r\n\r\nexport function useCartStatusUpsell({\r\n    variantKey,\r\n    categoryName,\r\n    lazyLoad,\r\n    rootElement,\r\n    trigger,\r\n}: useCartStatusUpsellProps) {\r\n    return useUpsell({\r\n        lazyLoad,\r\n        rootElement,\r\n        trigger,\r\n        fetcher: () =>\r\n            UpsellService.getAddToCartPopupUpsell({\r\n                VariantKey: variantKey.value,\r\n                categoryName,\r\n                TouchPoint: \"Desktop\",\r\n                Preview: false,\r\n            }),\r\n    });\r\n}\r\n\r\ninterface useCartPageUpsellProps extends BaseUpsellProps {\r\n    variantKeys: Ref<string[]>;\r\n    trigger?: Ref<string | string[]>;\r\n}\r\n\r\nexport function useCartPageUpsell({\r\n    variantKeys,\r\n    lazyLoad,\r\n    rootElement,\r\n    trigger,\r\n}: useCartPageUpsellProps) {\r\n    return useUpsell({\r\n        lazyLoad,\r\n        rootElement,\r\n        trigger,\r\n        fetcher: () =>\r\n            UpsellService.getCartPageUpsell({\r\n                VariantKeys: variantKeys.value,\r\n                TouchPoint: \"Desktop\",\r\n                Preview: false,\r\n            }),\r\n    });\r\n}\r\n","<script lang=\"ts\" setup>\r\nimport { computed, ref, watch } from \"vue\";\r\nimport ProductsModuleContent from \"../productsModule/productsModuleContent.vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { useProductPageStore } from \"../../stores/productPageStore\";\r\nimport { useCartStatusUpsell } from \"../../composables/useUpsell\";\r\n\r\nconst props = defineProps<{\r\n  checkoutLink: string;\r\n  displayName: string;\r\n  cartStatusImage: string;\r\n  userAuthenticated?: string;\r\n  recommendationsHeading?: string;\r\n  esalesKey: string;\r\n  categoryName: string;\r\n}>();\r\n\r\nconst productPageStore = useProductPageStore();\r\nconst dialogElement = ref();\r\nconst isUserAuthenticated = computed(() => props.userAuthenticated === \"True\");\r\n\r\nwatch(\r\n  () => productPageStore.cartStatusIsOpen,\r\n  (newValue, oldValue) => {\r\n    if (!dialogElement.value || newValue === oldValue) return;\r\n\r\n    newValue ? dialogElement.value.showModal() : dialogElement.value.close();\r\n  },\r\n);\r\n\r\nconst handleClickClose = () => {\r\n  productPageStore.setCartStatusIsOpen(false);\r\n};\r\n\r\nconst handleClickOutsideDialog = (event) => {\r\n  // Close the dialog if the user clicks outside of the content area\r\n  if (event.target === dialogElement.value) {\r\n    handleClickClose();\r\n  }\r\n};\r\n\r\nconst variantKey = computed(() => {\r\n  return props.esalesKey && props.esalesKey + productPageStore.sizeText;\r\n});\r\n\r\nconst { upsellModel, isLoading } = useCartStatusUpsell({\r\n  variantKey, \r\n  categoryName: props.categoryName, \r\n  trigger: variantKey\r\n});\r\n\r\n</script>\r\n\r\n<template>\r\n  <dialog\r\n    class=\"cart-status\"\r\n    aria-live=\"polite\"\r\n    :aria-hidden=\"!productPageStore.cartStatusIsOpen\"\r\n    role=\"dialog\"\r\n    ref=\"dialogElement\"\r\n    aria-labelledby=\"cart-status-heading\"\r\n    @click=\"(e) => handleClickOutsideDialog(e)\"\r\n  >\r\n    <article class=\"cart-status__content\">\r\n      <span class=\"cart-status__message\">{{ $t(\"addedToCart\") }}</span>\r\n      <div class=\"cart-status__product\">\r\n        <div class=\"cart-status__image\">\r\n          <picture>\r\n            <source type=\"image/webp\" :srcset=\"props.cartStatusImage\" />\r\n            <img\r\n              alt=\"\"\r\n              width=\"auto\"\r\n              height=\"auto\"\r\n              loading=\"lazy\"\r\n              :src=\"props.cartStatusImage\"\r\n            />\r\n          </picture>\r\n        </div>\r\n        <header class=\"cart-status__text\">\r\n          <div>\r\n            <button\r\n              class=\"btn btn--small btn--link btn--close cart-status__close\"\r\n              type=\"button\"\r\n              @click.prevent=\"handleClickClose\"\r\n              :title=\"$t('close')\"\r\n            >\r\n              <Icon type=\"close\" />\r\n            </button>\r\n            <h3 class=\"cart-status__heading\">\r\n              {{ productPageStore.displayName }}\r\n            </h3>\r\n            <p class=\"cart-status__desc\">\r\n              {{ $t(\"color\") }}: {{ productPageStore.itemColor }} ({{\r\n                productPageStore.itemMetaColor\r\n              }})\r\n              <br />\r\n              <span> {{ $t(\"size\") }}: {{ productPageStore.sizeText }} </span>\r\n            </p>\r\n          </div>\r\n          <div class=\"cart-status__buttons\">\r\n            <div>\r\n              <button\r\n                class=\"btn btn--white cart-status__btn\"\r\n                @click.prevent=\"handleClickClose\"\r\n              >\r\n                {{ $t(\"continueShopping\") }}\r\n              </button>\r\n            </div>\r\n            <div>\r\n              <a\r\n                :href=\"props.checkoutLink\"\r\n                :autofocus=\"true\"\r\n                @click=\"handleClickClose\"\r\n                class=\"btn btn--profile cart-status__btn u-trailer-half\"\r\n                >{{ $t(\"goToCheckout\") }}</a\r\n              >\r\n            </div>\r\n          </div>\r\n        </header>\r\n      </div>\r\n      <div class=\"layout-product__related\" v-for=\"(upsellItem, index) in upsellModel\" :key=\"index\">\r\n          <ProductsModuleContent\r\n            v-if=\"upsellItem.primaryList\"\r\n            :key=\"index\"\r\n            :heading=\"upsellItem.primaryList.label ?? props.recommendationsHeading ?? $t('maybeYouAlsoLike')\"\r\n            :search-result-recommend-list=\"upsellItem\"\r\n            :hide-colors=\"true\"\r\n            :hide-favorites=\"true\"\r\n            :hide-promotion=\"false\"\r\n            :hide-sizes=\"true\"\r\n            :track-view-item-list=\"true\"\r\n            :track-select-item=\"true\"\r\n            :is-loading-favorites=\"false\"\r\n            :user-authenticated=\"isUserAuthenticated\"\r\n            :item-list-id=\"`cartstatus-${upsellItem.primaryList.algorithm}`\"\r\n            :item-list-name=\"`cartstatus-${upsellItem.primaryList.algorithm}`\"\r\n            :upsell-algorithm=\"upsellItem.primaryList.algorithm\"\r\n            :is-loading=\"isLoading\"\r\n          />\r\n      </div>\r\n    </article>\r\n  </dialog>\r\n</template>\r\n","export const formatCurrency = (currency: string) => {\r\n    switch (currency.toLowerCase()) {\r\n        case \"nok\":\r\n        case \"sek\":\r\n            return \"kr\";\r\n        case \"eur\":\r\n            return \"€\";\r\n        case \"gbp\":\r\n            return \"£\";\r\n        case \"usd\":\r\n            return \"$\";\r\n        default:\r\n            return currency;\r\n    }\r\n};\r\n","export type CheckoutStage =\r\n    (typeof CheckoutStages)[keyof typeof CheckoutStages];\r\nexport const CheckoutStages = {\r\n    ShoppingCart: \"Handlekurv\",\r\n    Verification: \"Verifisering\",\r\n    Checkout: \"Kasse\",\r\n} as const;\r\n\r\nexport type CheckoutStep = (typeof CheckoutSteps)[keyof typeof CheckoutSteps];\r\nexport const CheckoutSteps = {\r\n    CustomerInformation: \"Kundeinformasjon\",\r\n    Delivery: \"Levering\",\r\n    Payment: \"Betaling\",\r\n    FinalizeOrder: \"Fullfør bestilling\",\r\n    Confirmation: \"Kjøpsbekreftelse\",\r\n} as const;\r\n\r\nexport type VerificationStep =\r\n    (typeof VerificationSteps)[keyof typeof VerificationSteps];\r\nexport const VerificationSteps = {\r\n    DecideVerificationType: \"Hvordan ønsker du å fortsette?\",\r\n    Login: \"Logg inn\",\r\n} as const;\r\n\r\nexport type ShippingMethod =\r\n    (typeof ShippingMethods)[keyof typeof ShippingMethods];\r\nexport const ShippingMethods = {\r\n    Porterbuddy: \"Porterbuddy\",\r\n    HomeDelivery: \"HomeDelivery\",\r\n    PickUpInStore: \"PickUpInStore\",\r\n    MyPack: \"MyPack\",\r\n    Retail: \"RETAIL\",\r\n} as const;\r\n","import { defineStore } from \"pinia\";\r\nimport {\r\n    CheckoutStage,\r\n    CheckoutStages,\r\n    CheckoutStep,\r\n    CheckoutSteps,\r\n} from \"../../../services/models/checkout.models\";\r\nimport { LineItemModel } from \"Scripts/global/apps/utils/API/Cart/cartAPISchema\";\r\n\r\nexport const useCheckoutStateStore = defineStore(\"checkoutState\", {\r\n    state: () => ({\r\n        currentCheckoutStep: CheckoutSteps.CustomerInformation as CheckoutStep,\r\n        currentCheckoutStage: CheckoutStages.ShoppingCart as CheckoutStage,\r\n        isLoading: false,\r\n        baseUrlPath: \"\",\r\n        newItemsAfterVerification: null as null | Array<LineItemModel>\r\n    }),\r\n    actions: {\r\n        setIsLoading(isLoading: boolean) {\r\n            this.isLoading = isLoading; \r\n        },\r\n        setCheckoutStage(stage: CheckoutStage) {\r\n            this.currentCheckoutStage = stage;\r\n        },\r\n        setToCheckoutStep(step: CheckoutStep) {\r\n            this.currentCheckoutStep = step;\r\n        },\r\n        setBaseUrlPath(baseUrlPath: string) {\r\n            this.baseUrlPath = baseUrlPath;\r\n        },\r\n        setNewItemsAfterVerification(items) {\r\n            this.newItemsAfterVerification = items;\r\n        }\r\n    },\r\n});\r\n","import { defineStore } from \"pinia\";\r\nimport {\r\n    Cart,\r\n    KeySellingPoint,\r\n    LineItemModel,\r\n} from \"../../../utils/API/Cart/cartAPISchema\";\r\nimport { formatCurrency } from \"../../../utils/currencyHelpers\";\r\nimport { formatWithoutRounding } from \"../../../mixins/productPrice.mixin\";\r\nimport { useCheckoutStateStore } from \"../../checkout/stores/checkoutStateStore\";\r\nimport { CheckoutSteps } from \"../../../services/models/checkout.models\";\r\n\r\nexport const useShoppingCartStore = defineStore(\"shoppingCart\", {\r\n    state: () => ({\r\n        cart: null as Cart | null | undefined,\r\n        ksps: null as KeySellingPoint[] | null | undefined,\r\n        discounts: [] as string[] | null | undefined,\r\n        lineItemsOutOfStock: [] as LineItemModel[],\r\n        lineItemErrors: {} as Record<string, string> | null | undefined,\r\n        summaryError: \"\" as string | null | undefined,\r\n        discountError: \"\" as string | null | undefined,\r\n    }),\r\n    actions: {\r\n        setCart(cart: Cart | null | undefined) {\r\n            this.cart = cart;\r\n        },\r\n        setKsps(ksps: KeySellingPoint[] | null | undefined) {\r\n            this.ksps = ksps;\r\n        },\r\n        addDiscountCode(discount: string) {\r\n            if (!this.discounts) return;\r\n            this.discounts.push(discount);\r\n            this.discounts = [...this.discounts];\r\n        },\r\n        removeDiscountCode(discount: string) {\r\n            if (!this.discounts) return;\r\n            this.discounts = this.discounts.filter((d) => d !== discount);\r\n        },\r\n        setLineItemsOutOfStock(lineItems: LineItemModel[]) {\r\n            this.lineItemsOutOfStock = lineItems;\r\n        },\r\n        setLineItemError(lineItemEan: string, error: string) {\r\n            this.lineItemErrors = {\r\n                ...this.lineItemErrors,\r\n                [lineItemEan]: error,\r\n            };\r\n        },\r\n        setLineItemErrors(errors: Record<string, string> | null | undefined) {\r\n            this.lineItemErrors = errors;\r\n        },\r\n        setSummaryError(error: string | null | undefined) {\r\n            this.summaryError = error;\r\n        },\r\n        setDiscountError(error: string | null | undefined) {\r\n            this.discountError = error;\r\n        },\r\n    },\r\n    getters: {\r\n        shippingCostFormatted: (state): string => {\r\n            const checkoutState = useCheckoutStateStore();\r\n            if (!state.cart) return \"Beregnes senere\";\r\n\r\n            if (\r\n                (state.cart?.freeShippingActive &&\r\n                    state.cart?.freeShippingLimit.amount <=\r\n                        state.cart?.subTotal.amount) ||\r\n                !state.cart?.selectedShippingMethodPrice.amount\r\n            )\r\n                return \"Fri frakt\";\r\n            if (\r\n                state.cart?.selectedShippingMethodPrice.amount &&\r\n                (checkoutState.currentCheckoutStep === CheckoutSteps.Delivery ||\r\n                    checkoutState.currentCheckoutStep === CheckoutSteps.Payment)\r\n            ) {\r\n                return `${formatCurrency(state.cart?.selectedShippingMethodPrice.currency)} ${formatWithoutRounding(state.cart?.selectedShippingMethodPrice.amount)}`;\r\n            }\r\n            return \"Beregnes senere\";\r\n        },\r\n        totalAmount: (state): number => {\r\n            const checkoutState = useCheckoutStateStore();\r\n            if (\r\n                checkoutState.currentCheckoutStep === CheckoutSteps.Delivery ||\r\n                checkoutState.currentCheckoutStep === CheckoutSteps.Payment\r\n            ) {\r\n                return state.cart?.total.amount || 0;\r\n            }\r\n            return state.cart?.subTotal.amount || 0;\r\n        },\r\n        esalesKeys: (state) => {\r\n            return state.cart?.lineItems.map((li) => li.esalesKey) ?? [];\r\n        },\r\n    },\r\n});\r\n","/**\r\n * User feedback messages for checkout API errors.\r\n */\r\nexport const USER_FEEDBACK = {\r\n    CART_FULL: \"Handlekurven er full.\",\r\n    GENERIC: \"Noe gikk galt, kunne ikke utføre handlingen.\",\r\n    COULD_NOT_ADD_DISCOUNT_CODE:\r\n        \"Handlekurven din møter ikke kriteriene for å få rabatt, eller rabattkoden er ikke skrevet på korrekt måte.\",\r\n    INSUFFICIENT_STOCK: \"Du har nådd det maksimale antallet vi har på lager\",\r\n    LOGIN_FAILED: \"Feil brukernavn eller passord\",\r\n    RESET_PASSWORD_FAILED:\r\n        \"Kunne ikke tilbakestille passord, prøv igjen senere\",\r\n    RESET_PASSWORD_SUCCESS:\r\n        \"Vi har sendt deg en e-post med lenke for å tilbakestille ditt passord\",\r\n    UNKNOWN_POSTALCODE: \"Ukjent postnummer\",\r\n} as const;\r\n\r\n/**\r\n * Error messages for the checkout API.\r\n */\r\nexport const API_ERROR_MESSAGES = {\r\n    GENERIC: \"Noe gikk galt, kunne ikke utføre handlingen.\",\r\n    CART_FULL: \"Handlekurven er full\",\r\n    OUT_OF_STOCK: \"Beklager! Varen er ikke lenger tilgjengelig\",\r\n    COULD_NOT_GET_CITY: \"Kunne ikke hente poststed\",\r\n} as const;\r\n\r\n/**\r\n * Error names for the checkout API.\r\n */\r\nexport const API_ERROR_NAMES = {\r\n    ABORT_ERROR: \"AbortError\",\r\n} as const;\r\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = assertString;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction assertString(input) {\n  var isString = typeof input === 'string' || input instanceof String;\n  if (!isString) {\n    var invalidType = _typeof(input);\n    if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;\n    throw new TypeError(\"Expected a string but received a \".concat(invalidType));\n  }\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = toDate;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toDate(date) {\n  (0, _assertString.default)(date);\n  date = Date.parse(date);\n  return !isNaN(date) ? new Date(date) : null;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.farsiLocales = exports.englishLocales = exports.dotDecimal = exports.decimal = exports.commaDecimal = exports.bengaliLocales = exports.arabicLocales = exports.alphanumeric = exports.alpha = void 0;\nvar alpha = exports.alpha = {\n  'en-US': /^[A-Z]+$/i,\n  'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,\n  'bg-BG': /^[А-Я]+$/i,\n  'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\n  'da-DK': /^[A-ZÆØÅ]+$/i,\n  'de-DE': /^[A-ZÄÖÜß]+$/i,\n  'el-GR': /^[Α-ώ]+$/i,\n  'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i,\n  'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,\n  'fi-FI': /^[A-ZÅÄÖ]+$/i,\n  'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\n  'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,\n  'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,\n  'nb-NO': /^[A-ZÆØÅ]+$/i,\n  'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i,\n  'nn-NO': /^[A-ZÆØÅ]+$/i,\n  'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\n  'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\n  'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,\n  'ru-RU': /^[А-ЯЁ]+$/i,\n  'kk-KZ': /^[А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/i,\n  'sl-SI': /^[A-ZČĆĐŠŽ]+$/i,\n  'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\n  'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i,\n  'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i,\n  'sv-SE': /^[A-ZÅÄÖ]+$/i,\n  'th-TH': /^[ก-๐\\s]+$/i,\n  'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,\n  'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,\n  'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,\n  'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\n  'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\n  ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,\n  he: /^[א-ת]+$/,\n  fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,\n  bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,\n  eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\n  'hi-IN': /^[\\u0900-\\u0961]+[\\u0972-\\u097F]*$/i,\n  'si-LK': /^[\\u0D80-\\u0DFF]+$/\n};\nvar alphanumeric = exports.alphanumeric = {\n  'en-US': /^[0-9A-Z]+$/i,\n  'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,\n  'bg-BG': /^[0-9А-Я]+$/i,\n  'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\n  'da-DK': /^[0-9A-ZÆØÅ]+$/i,\n  'de-DE': /^[0-9A-ZÄÖÜß]+$/i,\n  'el-GR': /^[0-9Α-ω]+$/i,\n  'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,\n  'fi-FI': /^[0-9A-ZÅÄÖ]+$/i,\n  'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\n  'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,\n  'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,\n  'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\n  'nb-NO': /^[0-9A-ZÆØÅ]+$/i,\n  'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,\n  'nn-NO': /^[0-9A-ZÆØÅ]+$/i,\n  'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\n  'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,\n  'ru-RU': /^[0-9А-ЯЁ]+$/i,\n  'kk-KZ': /^[0-9А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/i,\n  'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,\n  'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\n  'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,\n  'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,\n  'sv-SE': /^[0-9A-ZÅÄÖ]+$/i,\n  'th-TH': /^[ก-๙\\s]+$/i,\n  'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,\n  'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,\n  'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\n  'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\n  'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,\n  ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,\n  he: /^[0-9א-ת]+$/,\n  fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,\n  bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,\n  eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\n  'hi-IN': /^[\\u0900-\\u0963]+[\\u0966-\\u097F]*$/i,\n  'si-LK': /^[0-9\\u0D80-\\u0DFF]+$/\n};\nvar decimal = exports.decimal = {\n  'en-US': '.',\n  ar: '٫'\n};\nvar englishLocales = exports.englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM'];\nfor (var locale, i = 0; i < englishLocales.length; i++) {\n  locale = \"en-\".concat(englishLocales[i]);\n  alpha[locale] = alpha['en-US'];\n  alphanumeric[locale] = alphanumeric['en-US'];\n  decimal[locale] = decimal['en-US'];\n}\n\n// Source: http://www.localeplanet.com/java/\nvar arabicLocales = exports.arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE'];\nfor (var _locale, _i = 0; _i < arabicLocales.length; _i++) {\n  _locale = \"ar-\".concat(arabicLocales[_i]);\n  alpha[_locale] = alpha.ar;\n  alphanumeric[_locale] = alphanumeric.ar;\n  decimal[_locale] = decimal.ar;\n}\nvar farsiLocales = exports.farsiLocales = ['IR', 'AF'];\nfor (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {\n  _locale2 = \"fa-\".concat(farsiLocales[_i2]);\n  alphanumeric[_locale2] = alphanumeric.fa;\n  decimal[_locale2] = decimal.ar;\n}\nvar bengaliLocales = exports.bengaliLocales = ['BD', 'IN'];\nfor (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) {\n  _locale3 = \"bn-\".concat(bengaliLocales[_i3]);\n  alpha[_locale3] = alpha.bn;\n  alphanumeric[_locale3] = alphanumeric.bn;\n  decimal[_locale3] = decimal['en-US'];\n}\n\n// Source: https://en.wikipedia.org/wiki/Decimal_mark\nvar dotDecimal = exports.dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY'];\nvar commaDecimal = exports.commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'eo', 'es-ES', 'fr-CA', 'fr-FR', 'id-ID', 'it-IT', 'ku-IQ', 'hi-IN', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'kk-KZ', 'si-LK', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN'];\nfor (var _i4 = 0; _i4 < dotDecimal.length; _i4++) {\n  decimal[dotDecimal[_i4]] = decimal['en-US'];\n}\nfor (var _i5 = 0; _i5 < commaDecimal.length; _i5++) {\n  decimal[commaDecimal[_i5]] = ',';\n}\nalpha['fr-CA'] = alpha['fr-FR'];\nalphanumeric['fr-CA'] = alphanumeric['fr-FR'];\nalpha['pt-BR'] = alpha['pt-PT'];\nalphanumeric['pt-BR'] = alphanumeric['pt-PT'];\ndecimal['pt-BR'] = decimal['pt-PT'];\n\n// see #862\nalpha['pl-Pl'] = alpha['pl-PL'];\nalphanumeric['pl-Pl'] = alphanumeric['pl-PL'];\ndecimal['pl-Pl'] = decimal['pl-PL'];\n\n// see #1455\nalpha['fa-AF'] = alpha.fa;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isFloat;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isFloat(str, options) {\n  (0, _assertString.default)(str);\n  options = options || {};\n  var float = new RegExp(\"^(?:[-+])?(?:[0-9]+)?(?:\\\\\".concat(options.locale ? _alpha.decimal[options.locale] : '.', \"[0-9]*)?(?:[eE][\\\\+\\\\-]?(?:[0-9]+))?$\"));\n  if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') {\n    return false;\n  }\n  var value = parseFloat(str.replace(',', '.'));\n  return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt);\n}\nvar locales = exports.locales = Object.keys(_alpha.decimal);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = toFloat;\nvar _isFloat = _interopRequireDefault(require(\"./isFloat\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toFloat(str) {\n  if (!(0, _isFloat.default)(str)) return NaN;\n  return parseFloat(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = toInt;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toInt(str, radix) {\n  (0, _assertString.default)(str);\n  return parseInt(str, radix || 10);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = toBoolean;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toBoolean(str, strict) {\n  (0, _assertString.default)(str);\n  if (strict) {\n    return str === '1' || /^true$/i.test(str);\n  }\n  return str !== '0' && !/^false$/i.test(str) && str !== '';\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = equals;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction equals(str, comparison) {\n  (0, _assertString.default)(str);\n  return str === comparison;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = toString;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction toString(input) {\n  if (_typeof(input) === 'object' && input !== null) {\n    if (typeof input.toString === 'function') {\n      input = input.toString();\n    } else {\n      input = '[object Object]';\n    }\n  } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) {\n    input = '';\n  }\n  return String(input);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = merge;\nfunction merge() {\n  var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var defaults = arguments.length > 1 ? arguments[1] : undefined;\n  for (var key in defaults) {\n    if (typeof obj[key] === 'undefined') {\n      obj[key] = defaults[key];\n    }\n  }\n  return obj;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = contains;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toString = _interopRequireDefault(require(\"./util/toString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar defaulContainsOptions = {\n  ignoreCase: false,\n  minOccurrences: 1\n};\nfunction contains(str, elem, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, defaulContainsOptions);\n  if (options.ignoreCase) {\n    return str.toLowerCase().split((0, _toString.default)(elem).toLowerCase()).length > options.minOccurrences;\n  }\n  return str.split((0, _toString.default)(elem)).length > options.minOccurrences;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = matches;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction matches(str, pattern, modifiers) {\n  (0, _assertString.default)(str);\n  if (Object.prototype.toString.call(pattern) !== '[object RegExp]') {\n    pattern = new RegExp(pattern, modifiers);\n  }\n  return !!str.match(pattern);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isByteLength;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/* eslint-disable prefer-rest-params */\nfunction isByteLength(str, options) {\n  (0, _assertString.default)(str);\n  var min;\n  var max;\n  if (_typeof(options) === 'object') {\n    min = options.min || 0;\n    max = options.max;\n  } else {\n    // backwards compatibility: isByteLength(str, min [, max])\n    min = arguments[1];\n    max = arguments[2];\n  }\n  var len = encodeURI(str).split(/%..|./).length - 1;\n  return len >= min && (typeof max === 'undefined' || len <= max);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isFQDN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_fqdn_options = {\n  require_tld: true,\n  allow_underscores: false,\n  allow_trailing_dot: false,\n  allow_numeric_tld: false,\n  allow_wildcard: false,\n  ignore_max_length: false\n};\nfunction isFQDN(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, default_fqdn_options);\n\n  /* Remove the optional trailing dot before checking validity */\n  if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n    str = str.substring(0, str.length - 1);\n  }\n\n  /* Remove the optional wildcard before checking validity */\n  if (options.allow_wildcard === true && str.indexOf('*.') === 0) {\n    str = str.substring(2);\n  }\n  var parts = str.split('.');\n  var tld = parts[parts.length - 1];\n  if (options.require_tld) {\n    // disallow fqdns without tld\n    if (parts.length < 2) {\n      return false;\n    }\n    if (!options.allow_numeric_tld && !/^([a-z\\u00A1-\\u00A8\\u00AA-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n      return false;\n    }\n\n    // disallow spaces\n    if (/\\s/.test(tld)) {\n      return false;\n    }\n  }\n\n  // reject numeric TLDs\n  if (!options.allow_numeric_tld && /^\\d+$/.test(tld)) {\n    return false;\n  }\n  return parts.every(function (part) {\n    if (part.length > 63 && !options.ignore_max_length) {\n      return false;\n    }\n    if (!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n      return false;\n    }\n\n    // disallow full-width chars\n    if (/[\\uff01-\\uff5e]/.test(part)) {\n      return false;\n    }\n\n    // disallow parts starting or ending with hyphen\n    if (/^-|-$/.test(part)) {\n      return false;\n    }\n    if (!options.allow_underscores && /_/.test(part)) {\n      return false;\n    }\n    return true;\n  });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isIP;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n11.3.  Examples\n\n   The following addresses\n\n             fe80::1234 (on the 1st link of the node)\n             ff02::5678 (on the 5th link of the node)\n             ff08::9abc (on the 10th organization of the node)\n\n   would be represented as follows:\n\n             fe80::1234%1\n             ff02::5678%5\n             ff08::9abc%10\n\n   (Here we assume a natural translation from a zone index to the\n   <zone_id> part, where the Nth zone of any scope is translated into\n   \"N\".)\n\n   If we use interface names as <zone_id>, those addresses could also be\n   represented as follows:\n\n            fe80::1234%ne0\n            ff02::5678%pvc1.3\n            ff08::9abc%interface10\n\n   where the interface \"ne0\" belongs to the 1st link, \"pvc1.3\" belongs\n   to the 5th link, and \"interface10\" belongs to the 10th organization.\n * * */\nvar IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';\nvar IPv4AddressFormat = \"(\".concat(IPv4SegmentFormat, \"[.]){3}\").concat(IPv4SegmentFormat);\nvar IPv4AddressRegExp = new RegExp(\"^\".concat(IPv4AddressFormat, \"$\"));\nvar IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';\nvar IPv6AddressRegExp = new RegExp('^(' + \"(?:\".concat(IPv6SegmentFormat, \":){7}(?:\").concat(IPv6SegmentFormat, \"|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){6}(?:\").concat(IPv4AddressFormat, \"|:\").concat(IPv6SegmentFormat, \"|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){5}(?::\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,2}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){4}(?:(:\").concat(IPv6SegmentFormat, \"){0,1}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,3}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){3}(?:(:\").concat(IPv6SegmentFormat, \"){0,2}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,4}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){2}(?:(:\").concat(IPv6SegmentFormat, \"){0,3}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,5}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){1}(?:(:\").concat(IPv6SegmentFormat, \"){0,4}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,6}|:)|\") + \"(?::((?::\".concat(IPv6SegmentFormat, \"){0,5}:\").concat(IPv4AddressFormat, \"|(?::\").concat(IPv6SegmentFormat, \"){1,7}|:))\") + ')(%[0-9a-zA-Z-.:]{1,})?$');\nfunction isIP(str) {\n  var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  (0, _assertString.default)(str);\n  version = String(version);\n  if (!version) {\n    return isIP(str, 4) || isIP(str, 6);\n  }\n  if (version === '4') {\n    return IPv4AddressRegExp.test(str);\n  }\n  if (version === '6') {\n    return IPv6AddressRegExp.test(str);\n  }\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isEmail;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isByteLength = _interopRequireDefault(require(\"./isByteLength\"));\nvar _isFQDN = _interopRequireDefault(require(\"./isFQDN\"));\nvar _isIP = _interopRequireDefault(require(\"./isIP\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_email_options = {\n  allow_display_name: false,\n  allow_underscores: false,\n  require_display_name: false,\n  allow_utf8_local_part: true,\n  require_tld: true,\n  blacklisted_chars: '',\n  ignore_max_length: false,\n  host_blacklist: [],\n  host_whitelist: []\n};\n\n/* eslint-disable max-len */\n/* eslint-disable no-control-regex */\nvar splitNameAddress = /^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)</i;\nvar emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\nvar gmailUserPart = /^[a-z\\d]+$/;\nvar quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\nvar emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A1-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\nvar quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\nvar defaultMaxEmailLength = 254;\n/* eslint-enable max-len */\n/* eslint-enable no-control-regex */\n\n/**\n * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2\n * @param {String} display_name\n */\nfunction validateDisplayName(display_name) {\n  var display_name_without_quotes = display_name.replace(/^\"(.+)\"$/, '$1');\n  // display name with only spaces is not valid\n  if (!display_name_without_quotes.trim()) {\n    return false;\n  }\n\n  // check whether display name contains illegal character\n  var contains_illegal = /[\\.\";<>]/.test(display_name_without_quotes);\n  if (contains_illegal) {\n    // if contains illegal characters,\n    // must to be enclosed in double-quotes, otherwise it's not a valid display name\n    if (display_name_without_quotes === display_name) {\n      return false;\n    }\n\n    // the quotes in display name must start with character symbol \\\n    var all_start_with_back_slash = display_name_without_quotes.split('\"').length === display_name_without_quotes.split('\\\\\"').length;\n    if (!all_start_with_back_slash) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction isEmail(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, default_email_options);\n  if (options.require_display_name || options.allow_display_name) {\n    var display_email = str.match(splitNameAddress);\n    if (display_email) {\n      var display_name = display_email[1];\n\n      // Remove display name and angle brackets to get email address\n      // Can be done in the regex but will introduce a ReDOS (See  #1597 for more info)\n      str = str.replace(display_name, '').replace(/(^<|>$)/g, '');\n\n      // sometimes need to trim the last space to get the display name\n      // because there may be a space between display name and email address\n      // eg. myname <address@gmail.com>\n      // the display name is `myname` instead of `myname `, so need to trim the last space\n      if (display_name.endsWith(' ')) {\n        display_name = display_name.slice(0, -1);\n      }\n      if (!validateDisplayName(display_name)) {\n        return false;\n      }\n    } else if (options.require_display_name) {\n      return false;\n    }\n  }\n  if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {\n    return false;\n  }\n  var parts = str.split('@');\n  var domain = parts.pop();\n  var lower_domain = domain.toLowerCase();\n  if (options.host_blacklist.includes(lower_domain)) {\n    return false;\n  }\n  if (options.host_whitelist.length > 0 && !options.host_whitelist.includes(lower_domain)) {\n    return false;\n  }\n  var user = parts.join('@');\n  if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n    /*\n      Previously we removed dots for gmail addresses before validating.\n      This was removed because it allows `multiple..dots@gmail.com`\n      to be reported as valid, but it is not.\n      Gmail only normalizes single dots, removing them from here is pointless,\n      should be done in normalizeEmail\n    */\n    user = user.toLowerCase();\n\n    // Removing sub-address from username before gmail validation\n    var username = user.split('+')[0];\n\n    // Dots are not included in gmail length restriction\n    if (!(0, _isByteLength.default)(username.replace(/\\./g, ''), {\n      min: 6,\n      max: 30\n    })) {\n      return false;\n    }\n    var _user_parts = username.split('.');\n    for (var i = 0; i < _user_parts.length; i++) {\n      if (!gmailUserPart.test(_user_parts[i])) {\n        return false;\n      }\n    }\n  }\n  if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, {\n    max: 64\n  }) || !(0, _isByteLength.default)(domain, {\n    max: 254\n  }))) {\n    return false;\n  }\n  if (!(0, _isFQDN.default)(domain, {\n    require_tld: options.require_tld,\n    ignore_max_length: options.ignore_max_length,\n    allow_underscores: options.allow_underscores\n  })) {\n    if (!options.allow_ip_domain) {\n      return false;\n    }\n    if (!(0, _isIP.default)(domain)) {\n      if (!domain.startsWith('[') || !domain.endsWith(']')) {\n        return false;\n      }\n      var noBracketdomain = domain.slice(1, -1);\n      if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) {\n        return false;\n      }\n    }\n  }\n  if (user[0] === '\"') {\n    user = user.slice(1, user.length - 1);\n    return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n  }\n  var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n  var user_parts = user.split('.');\n  for (var _i = 0; _i < user_parts.length; _i++) {\n    if (!pattern.test(user_parts[_i])) {\n      return false;\n    }\n  }\n  if (options.blacklisted_chars) {\n    if (user.search(new RegExp(\"[\".concat(options.blacklisted_chars, \"]+\"), 'g')) !== -1) return false;\n  }\n  return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isURL;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isFQDN = _interopRequireDefault(require(\"./isFQDN\"));\nvar _isIP = _interopRequireDefault(require(\"./isIP\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/*\noptions for isURL method\n\nrequire_protocol - if set as true isURL will return false if protocol is not present in the URL\nrequire_valid_protocol - isURL will check if the URL's protocol is present in the protocols option\nprotocols - valid protocols can be modified with this option\nrequire_host - if set as false isURL will not check if host is present in the URL\nrequire_port - if set as true isURL will check if port is present in the URL\nallow_protocol_relative_urls - if set as true protocol relative URLs will be allowed\nvalidate_length - if set as false isURL will skip string length validation (IE maximum is 2083)\n\n*/\n\nvar default_url_options = {\n  protocols: ['http', 'https', 'ftp'],\n  require_tld: true,\n  require_protocol: false,\n  require_host: true,\n  require_port: false,\n  require_valid_protocol: true,\n  allow_underscores: false,\n  allow_trailing_dot: false,\n  allow_protocol_relative_urls: false,\n  allow_fragments: true,\n  allow_query_components: true,\n  validate_length: true\n};\nvar wrapped_ipv6 = /^\\[([^\\]]+)\\](?::([0-9]+))?$/;\nfunction isRegExp(obj) {\n  return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\nfunction checkHost(host, matches) {\n  for (var i = 0; i < matches.length; i++) {\n    var match = matches[i];\n    if (host === match || isRegExp(match) && match.test(host)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction isURL(url, options) {\n  (0, _assertString.default)(url);\n  if (!url || /[\\s<>]/.test(url)) {\n    return false;\n  }\n  if (url.indexOf('mailto:') === 0) {\n    return false;\n  }\n  options = (0, _merge.default)(options, default_url_options);\n  if (options.validate_length && url.length >= 2083) {\n    return false;\n  }\n  if (!options.allow_fragments && url.includes('#')) {\n    return false;\n  }\n  if (!options.allow_query_components && (url.includes('?') || url.includes('&'))) {\n    return false;\n  }\n  var protocol, auth, host, hostname, port, port_str, split, ipv6;\n  split = url.split('#');\n  url = split.shift();\n  split = url.split('?');\n  url = split.shift();\n  split = url.split('://');\n  if (split.length > 1) {\n    protocol = split.shift().toLowerCase();\n    if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {\n      return false;\n    }\n  } else if (options.require_protocol) {\n    return false;\n  } else if (url.slice(0, 2) === '//') {\n    if (!options.allow_protocol_relative_urls) {\n      return false;\n    }\n    split[0] = url.slice(2);\n  }\n  url = split.join('://');\n  if (url === '') {\n    return false;\n  }\n  split = url.split('/');\n  url = split.shift();\n  if (url === '' && !options.require_host) {\n    return true;\n  }\n  split = url.split('@');\n  if (split.length > 1) {\n    if (options.disallow_auth) {\n      return false;\n    }\n    if (split[0] === '') {\n      return false;\n    }\n    auth = split.shift();\n    if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {\n      return false;\n    }\n    var _auth$split = auth.split(':'),\n      _auth$split2 = _slicedToArray(_auth$split, 2),\n      user = _auth$split2[0],\n      password = _auth$split2[1];\n    if (user === '' && password === '') {\n      return false;\n    }\n  }\n  hostname = split.join('@');\n  port_str = null;\n  ipv6 = null;\n  var ipv6_match = hostname.match(wrapped_ipv6);\n  if (ipv6_match) {\n    host = '';\n    ipv6 = ipv6_match[1];\n    port_str = ipv6_match[2] || null;\n  } else {\n    split = hostname.split(':');\n    host = split.shift();\n    if (split.length) {\n      port_str = split.join(':');\n    }\n  }\n  if (port_str !== null && port_str.length > 0) {\n    port = parseInt(port_str, 10);\n    if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {\n      return false;\n    }\n  } else if (options.require_port) {\n    return false;\n  }\n  if (options.host_whitelist) {\n    return checkHost(host, options.host_whitelist);\n  }\n  if (host === '' && !options.require_host) {\n    return true;\n  }\n  if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {\n    return false;\n  }\n  host = host || ipv6;\n  if (options.host_blacklist && checkHost(host, options.host_blacklist)) {\n    return false;\n  }\n  return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMACAddress;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){4}([0-9a-fA-F]{2})$/;\nvar macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/;\nvar macAddress48WithDots = /^([0-9a-fA-F]{4}\\.){2}([0-9a-fA-F]{4})$/;\nvar macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){6}([0-9a-fA-F]{2})$/;\nvar macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/;\nvar macAddress64WithDots = /^([0-9a-fA-F]{4}\\.){3}([0-9a-fA-F]{4})$/;\nfunction isMACAddress(str, options) {\n  (0, _assertString.default)(str);\n  if (options !== null && options !== void 0 && options.eui) {\n    options.eui = String(options.eui);\n  }\n  /**\n   * @deprecated `no_colons` TODO: remove it in the next major\n  */\n  if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) {\n    if (options.eui === '48') {\n      return macAddress48NoSeparators.test(str);\n    }\n    if (options.eui === '64') {\n      return macAddress64NoSeparators.test(str);\n    }\n    return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str);\n  }\n  if ((options === null || options === void 0 ? void 0 : options.eui) === '48') {\n    return macAddress48.test(str) || macAddress48WithDots.test(str);\n  }\n  if ((options === null || options === void 0 ? void 0 : options.eui) === '64') {\n    return macAddress64.test(str) || macAddress64WithDots.test(str);\n  }\n  return isMACAddress(str, {\n    eui: '48'\n  }) || isMACAddress(str, {\n    eui: '64'\n  });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isIPRange;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isIP = _interopRequireDefault(require(\"./isIP\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar subnetMaybe = /^\\d{1,3}$/;\nvar v4Subnet = 32;\nvar v6Subnet = 128;\nfunction isIPRange(str) {\n  var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  (0, _assertString.default)(str);\n  var parts = str.split('/');\n\n  // parts[0] -> ip, parts[1] -> subnet\n  if (parts.length !== 2) {\n    return false;\n  }\n  if (!subnetMaybe.test(parts[1])) {\n    return false;\n  }\n\n  // Disallow preceding 0 i.e. 01, 02, ...\n  if (parts[1].length > 1 && parts[1].startsWith('0')) {\n    return false;\n  }\n  var isValidIP = (0, _isIP.default)(parts[0], version);\n  if (!isValidIP) {\n    return false;\n  }\n\n  // Define valid subnet according to IP's version\n  var expectedSubnet = null;\n  switch (String(version)) {\n    case '4':\n      expectedSubnet = v4Subnet;\n      break;\n    case '6':\n      expectedSubnet = v6Subnet;\n      break;\n    default:\n      expectedSubnet = (0, _isIP.default)(parts[0], '6') ? v6Subnet : v4Subnet;\n  }\n  return parts[1] <= expectedSubnet && parts[1] >= 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isDate;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nvar default_date_options = {\n  format: 'YYYY/MM/DD',\n  delimiters: ['/', '-'],\n  strictMode: false\n};\nfunction isValidFormat(format) {\n  return /(^(y{4}|y{2})[.\\/-](m{1,2})[.\\/-](d{1,2})$)|(^(m{1,2})[.\\/-](d{1,2})[.\\/-]((y{4}|y{2})$))|(^(d{1,2})[.\\/-](m{1,2})[.\\/-]((y{4}|y{2})$))/gi.test(format);\n}\nfunction zip(date, format) {\n  var zippedArr = [],\n    len = Math.min(date.length, format.length);\n  for (var i = 0; i < len; i++) {\n    zippedArr.push([date[i], format[i]]);\n  }\n  return zippedArr;\n}\nfunction isDate(input, options) {\n  if (typeof options === 'string') {\n    // Allow backward compatibility for old format isDate(input [, format])\n    options = (0, _merge.default)({\n      format: options\n    }, default_date_options);\n  } else {\n    options = (0, _merge.default)(options, default_date_options);\n  }\n  if (typeof input === 'string' && isValidFormat(options.format)) {\n    var formatDelimiter = options.delimiters.find(function (delimiter) {\n      return options.format.indexOf(delimiter) !== -1;\n    });\n    var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function (delimiter) {\n      return input.indexOf(delimiter) !== -1;\n    });\n    var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter));\n    var dateObj = {};\n    var _iterator = _createForOfIteratorHelper(dateAndFormat),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var _step$value = _slicedToArray(_step.value, 2),\n          dateWord = _step$value[0],\n          formatWord = _step$value[1];\n        if (dateWord.length !== formatWord.length) {\n          return false;\n        }\n        dateObj[formatWord.charAt(0)] = dateWord;\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    var fullYear = dateObj.y;\n\n    // Check if the year starts with a hyphen\n    if (fullYear.startsWith('-')) {\n      return false; // Hyphen before year is not allowed\n    }\n    if (dateObj.y.length === 2) {\n      var parsedYear = parseInt(dateObj.y, 10);\n      if (isNaN(parsedYear)) {\n        return false;\n      }\n      var currentYearLastTwoDigits = new Date().getFullYear() % 100;\n      if (parsedYear < currentYearLastTwoDigits) {\n        fullYear = \"20\".concat(dateObj.y);\n      } else {\n        fullYear = \"19\".concat(dateObj.y);\n      }\n    }\n    var month = dateObj.m;\n    if (dateObj.m.length === 1) {\n      month = \"0\".concat(dateObj.m);\n    }\n    var day = dateObj.d;\n    if (dateObj.d.length === 1) {\n      day = \"0\".concat(dateObj.d);\n    }\n    return new Date(\"\".concat(fullYear, \"-\").concat(month, \"-\").concat(day, \"T00:00:00.000Z\")).getUTCDate() === +dateObj.d;\n  }\n  if (!options.strictMode) {\n    return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input);\n  }\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isTime;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_time_options = {\n  hourFormat: 'hour24',\n  mode: 'default'\n};\nvar formats = {\n  hour24: {\n    default: /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,\n    withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/\n  },\n  hour12: {\n    default: /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,\n    withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/\n  }\n};\nfunction isTime(input, options) {\n  options = (0, _merge.default)(options, default_time_options);\n  if (typeof input !== 'string') return false;\n  return formats[options.hourFormat][options.mode].test(input);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBoolean;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar defaultOptions = {\n  loose: false\n};\nvar strictBooleans = ['true', 'false', '1', '0'];\nvar looseBooleans = [].concat(strictBooleans, ['yes', 'no']);\nfunction isBoolean(str) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;\n  (0, _assertString.default)(str);\n  if (options.loose) {\n    return looseBooleans.includes(str.toLowerCase());\n  }\n  return strictBooleans.includes(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isLocale;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/*\n  = 3ALPHA              ; selected ISO 639 codes\n    *2(\"-\" 3ALPHA)      ; permanently reserved\n */\nvar extlang = '([A-Za-z]{3}(-[A-Za-z]{3}){0,2})';\n\n/*\n  = 2*3ALPHA            ; shortest ISO 639 code\n    [\"-\" extlang]       ; sometimes followed by\n                        ; extended language subtags\n  / 4ALPHA              ; or reserved for future use\n  / 5*8ALPHA            ; or registered language subtag\n */\nvar language = \"(([a-zA-Z]{2,3}(-\".concat(extlang, \")?)|([a-zA-Z]{5,8}))\");\n\n/*\n  = 4ALPHA              ; ISO 15924 code\n */\nvar script = '([A-Za-z]{4})';\n\n/*\n  = 2ALPHA              ; ISO 3166-1 code\n  / 3DIGIT              ; UN M.49 code\n */\nvar region = '([A-Za-z]{2}|\\\\d{3})';\n\n/*\n  = 5*8alphanum         ; registered variants\n  / (DIGIT 3alphanum)\n */\nvar variant = '([A-Za-z0-9]{5,8}|(\\\\d[A-Z-a-z0-9]{3}))';\n\n/*\n  = DIGIT               ; 0 - 9\n  / %x41-57             ; A - W\n  / %x59-5A             ; Y - Z\n  / %x61-77             ; a - w\n  / %x79-7A             ; y - z\n */\nvar singleton = '(\\\\d|[A-W]|[Y-Z]|[a-w]|[y-z])';\n\n/*\n  = singleton 1*(\"-\" (2*8alphanum))\n                        ; Single alphanumerics\n                        ; \"x\" reserved for private use\n */\nvar extension = \"(\".concat(singleton, \"(-[A-Za-z0-9]{2,8})+)\");\n\n/*\n  = \"x\" 1*(\"-\" (1*8alphanum))\n */\nvar privateuse = '(x(-[A-Za-z0-9]{1,8})+)';\n\n// irregular tags do not match the 'langtag' production and would not\n// otherwise be considered 'well-formed'. These tags are all valid, but\n// most are deprecated in favor of more modern subtags or subtag combination\n\nvar irregular = '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' + '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' + '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))';\n\n// regular tags match the 'langtag' production, but their subtags are not\n// extended language or variant subtags: their meaning is defined by\n// their registration and all of these are deprecated in favor of a more\n// modern subtag or sequence of subtags\n\nvar regular = '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' + '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))';\n\n/*\n  = irregular           ; non-redundant tags registered\n  / regular             ; during the RFC 3066 era\n\n */\nvar grandfathered = \"(\".concat(irregular, \"|\").concat(regular, \")\");\n\n/*\n  RFC 5646 defines delimitation of subtags via a hyphen:\n\n      \"Subtag\" refers to a specific section of a tag, delimited by a\n      hyphen, such as the subtags 'zh', 'Hant', and 'CN' in the tag \"zh-\n      Hant-CN\".  Examples of subtags in this document are enclosed in\n      single quotes ('Hant')\n\n  However, we need to add \"_\" to maintain the existing behaviour.\n */\nvar delimiter = '(-|_)';\n\n/*\n  = language\n    [\"-\" script]\n    [\"-\" region]\n    *(\"-\" variant)\n    *(\"-\" extension)\n    [\"-\" privateuse]\n */\nvar langtag = \"\".concat(language, \"(\").concat(delimiter).concat(script, \")?(\").concat(delimiter).concat(region, \")?(\").concat(delimiter).concat(variant, \")*(\").concat(delimiter).concat(extension, \")*(\").concat(delimiter).concat(privateuse, \")?\");\n\n/*\n  Regex implementation based on BCP RFC 5646\n  Tags for Identifying Languages\n  https://www.rfc-editor.org/rfc/rfc5646.html\n */\nvar languageTagRegex = new RegExp(\"(^\".concat(privateuse, \"$)|(^\").concat(grandfathered, \"$)|(^\").concat(langtag, \"$)\"));\nfunction isLocale(str) {\n  (0, _assertString.default)(str);\n  return languageTagRegex.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isAbaRouting;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// http://www.brainjar.com/js/validation/\n// https://www.aba.com/news-research/research-analysis/routing-number-policy-procedures\n// series reserved for future use are excluded\nvar isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;\nfunction isAbaRouting(str) {\n  (0, _assertString.default)(str);\n  if (!isRoutingReg.test(str)) return false;\n  var checkSumVal = 0;\n  for (var i = 0; i < str.length; i++) {\n    if (i % 3 === 0) checkSumVal += str[i] * 3;else if (i % 3 === 1) checkSumVal += str[i] * 7;else checkSumVal += str[i] * 1;\n  }\n  return checkSumVal % 10 === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isAlpha;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isAlpha(_str) {\n  var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  (0, _assertString.default)(_str);\n  var str = _str;\n  var ignore = options.ignore;\n  if (ignore) {\n    if (ignore instanceof RegExp) {\n      str = str.replace(ignore, '');\n    } else if (typeof ignore === 'string') {\n      str = str.replace(new RegExp(\"[\".concat(ignore.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g, '\\\\$&'), \"]\"), 'g'), ''); // escape regex for ignore\n    } else {\n      throw new Error('ignore should be instance of a String or RegExp');\n    }\n  }\n  if (locale in _alpha.alpha) {\n    return _alpha.alpha[locale].test(str);\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nvar locales = exports.locales = Object.keys(_alpha.alpha);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isAlphanumeric;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isAlphanumeric(_str) {\n  var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  (0, _assertString.default)(_str);\n  var str = _str;\n  var ignore = options.ignore;\n  if (ignore) {\n    if (ignore instanceof RegExp) {\n      str = str.replace(ignore, '');\n    } else if (typeof ignore === 'string') {\n      str = str.replace(new RegExp(\"[\".concat(ignore.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g, '\\\\$&'), \"]\"), 'g'), ''); // escape regex for ignore\n    } else {\n      throw new Error('ignore should be instance of a String or RegExp');\n    }\n  }\n  if (locale in _alpha.alphanumeric) {\n    return _alpha.alphanumeric[locale].test(str);\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nvar locales = exports.locales = Object.keys(_alpha.alphanumeric);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isNumeric;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar numericNoSymbols = /^[0-9]+$/;\nfunction isNumeric(str, options) {\n  (0, _assertString.default)(str);\n  if (options && options.no_symbols) {\n    return numericNoSymbols.test(str);\n  }\n  return new RegExp(\"^[+-]?([0-9]*[\".concat((options || {}).locale ? _alpha.decimal[options.locale] : '.', \"])?[0-9]+$\")).test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isPassportNumber;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Reference:\n * https://en.wikipedia.org/ -- Wikipedia\n * https://docs.microsoft.com/en-us/microsoft-365/compliance/eu-passport-number -- EU Passport Number\n * https://countrycode.org/ -- Country Codes\n */\nvar passportRegexByCountryCode = {\n  AM: /^[A-Z]{2}\\d{7}$/,\n  // ARMENIA\n  AR: /^[A-Z]{3}\\d{6}$/,\n  // ARGENTINA\n  AT: /^[A-Z]\\d{7}$/,\n  // AUSTRIA\n  AU: /^[A-Z]\\d{7}$/,\n  // AUSTRALIA\n  AZ: /^[A-Z]{1}\\d{8}$/,\n  // AZERBAIJAN\n  BE: /^[A-Z]{2}\\d{6}$/,\n  // BELGIUM\n  BG: /^\\d{9}$/,\n  // BULGARIA\n  BR: /^[A-Z]{2}\\d{6}$/,\n  // BRAZIL\n  BY: /^[A-Z]{2}\\d{7}$/,\n  // BELARUS\n  CA: /^[A-Z]{2}\\d{6}$/,\n  // CANADA\n  CH: /^[A-Z]\\d{7}$/,\n  // SWITZERLAND\n  CN: /^G\\d{8}$|^E(?![IO])[A-Z0-9]\\d{7}$/,\n  // CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits\n  CY: /^[A-Z](\\d{6}|\\d{8})$/,\n  // CYPRUS\n  CZ: /^\\d{8}$/,\n  // CZECH REPUBLIC\n  DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,\n  // GERMANY\n  DK: /^\\d{9}$/,\n  // DENMARK\n  DZ: /^\\d{9}$/,\n  // ALGERIA\n  EE: /^([A-Z]\\d{7}|[A-Z]{2}\\d{7})$/,\n  // ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits\n  ES: /^[A-Z0-9]{2}([A-Z0-9]?)\\d{6}$/,\n  // SPAIN\n  FI: /^[A-Z]{2}\\d{7}$/,\n  // FINLAND\n  FR: /^\\d{2}[A-Z]{2}\\d{5}$/,\n  // FRANCE\n  GB: /^\\d{9}$/,\n  // UNITED KINGDOM\n  GR: /^[A-Z]{2}\\d{7}$/,\n  // GREECE\n  HR: /^\\d{9}$/,\n  // CROATIA\n  HU: /^[A-Z]{2}(\\d{6}|\\d{7})$/,\n  // HUNGARY\n  IE: /^[A-Z0-9]{2}\\d{7}$/,\n  // IRELAND\n  IN: /^[A-Z]{1}-?\\d{7}$/,\n  // INDIA\n  ID: /^[A-C]\\d{7}$/,\n  // INDONESIA\n  IR: /^[A-Z]\\d{8}$/,\n  // IRAN\n  IS: /^(A)\\d{7}$/,\n  // ICELAND\n  IT: /^[A-Z0-9]{2}\\d{7}$/,\n  // ITALY\n  JM: /^[Aa]\\d{7}$/,\n  // JAMAICA\n  JP: /^[A-Z]{2}\\d{7}$/,\n  // JAPAN\n  KR: /^[MS]\\d{8}$/,\n  // SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports]\n  KZ: /^[a-zA-Z]\\d{7}$/,\n  // KAZAKHSTAN\n  LI: /^[a-zA-Z]\\d{5}$/,\n  // LIECHTENSTEIN\n  LT: /^[A-Z0-9]{8}$/,\n  // LITHUANIA\n  LU: /^[A-Z0-9]{8}$/,\n  // LUXEMBURG\n  LV: /^[A-Z0-9]{2}\\d{7}$/,\n  // LATVIA\n  LY: /^[A-Z0-9]{8}$/,\n  // LIBYA\n  MT: /^\\d{7}$/,\n  // MALTA\n  MZ: /^([A-Z]{2}\\d{7})|(\\d{2}[A-Z]{2}\\d{5})$/,\n  // MOZAMBIQUE\n  MY: /^[AHK]\\d{8}$/,\n  // MALAYSIA\n  MX: /^\\d{10,11}$/,\n  // MEXICO\n  NL: /^[A-Z]{2}[A-Z0-9]{6}\\d$/,\n  // NETHERLANDS\n  NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\\d{6}$/,\n  // NEW ZEALAND\n  PH: /^([A-Z](\\d{6}|\\d{7}[A-Z]))|([A-Z]{2}(\\d{6}|\\d{7}))$/,\n  // PHILIPPINES\n  PK: /^[A-Z]{2}\\d{7}$/,\n  // PAKISTAN\n  PL: /^[A-Z]{2}\\d{7}$/,\n  // POLAND\n  PT: /^[A-Z]\\d{6}$/,\n  // PORTUGAL\n  RO: /^\\d{8,9}$/,\n  // ROMANIA\n  RU: /^\\d{9}$/,\n  // RUSSIAN FEDERATION\n  SE: /^\\d{8}$/,\n  // SWEDEN\n  SL: /^(P)[A-Z]\\d{7}$/,\n  // SLOVENIA\n  SK: /^[0-9A-Z]\\d{7}$/,\n  // SLOVAKIA\n  TH: /^[A-Z]{1,2}\\d{6,7}$/,\n  // THAILAND\n  TR: /^[A-Z]\\d{8}$/,\n  // TURKEY\n  UA: /^[A-Z]{2}\\d{6}$/,\n  // UKRAINE\n  US: /^\\d{9}$/,\n  // UNITED STATES\n  ZA: /^[TAMD]\\d{8}$/ // SOUTH AFRICA\n};\n\n/**\n * Check if str is a valid passport number\n * relative to provided ISO Country Code.\n *\n * @param {string} str\n * @param {string} countryCode\n * @return {boolean}\n */\nfunction isPassportNumber(str, countryCode) {\n  (0, _assertString.default)(str);\n  /** Remove All Whitespaces, Convert to UPPERCASE */\n  var normalizedStr = str.replace(/\\s/g, '').toUpperCase();\n  return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isInt;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;\nvar intLeadingZeroes = /^[-+]?[0-9]+$/;\nfunction isInt(str, options) {\n  (0, _assertString.default)(str);\n  options = options || {};\n\n  // Get the regex to use for testing, based on whether\n  // leading zeroes are allowed or not.\n  var regex = options.allow_leading_zeroes === false ? int : intLeadingZeroes;\n\n  // Check min/max/lt/gt\n  var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min;\n  var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max;\n  var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt;\n  var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt;\n  return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isPort;\nvar _isInt = _interopRequireDefault(require(\"./isInt\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isPort(str) {\n  return (0, _isInt.default)(str, {\n    allow_leading_zeroes: false,\n    min: 0,\n    max: 65535\n  });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isLowercase;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isLowercase(str) {\n  (0, _assertString.default)(str);\n  return str === str.toLowerCase();\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isUppercase;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isUppercase(str) {\n  (0, _assertString.default)(str);\n  return str === str.toUpperCase();\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isIMEI;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar imeiRegexWithoutHypens = /^[0-9]{15}$/;\nvar imeiRegexWithHypens = /^\\d{2}-\\d{6}-\\d{6}-\\d{1}$/;\nfunction isIMEI(str, options) {\n  (0, _assertString.default)(str);\n  options = options || {};\n\n  // default regex for checking imei is the one without hyphens\n\n  var imeiRegex = imeiRegexWithoutHypens;\n  if (options.allow_hyphens) {\n    imeiRegex = imeiRegexWithHypens;\n  }\n  if (!imeiRegex.test(str)) {\n    return false;\n  }\n  str = str.replace(/-/g, '');\n  var sum = 0,\n    mul = 2,\n    l = 14;\n  for (var i = 0; i < l; i++) {\n    var digit = str.substring(l - i - 1, l - i);\n    var tp = parseInt(digit, 10) * mul;\n    if (tp >= 10) {\n      sum += tp % 10 + 1;\n    } else {\n      sum += tp;\n    }\n    if (mul === 1) {\n      mul += 1;\n    } else {\n      mul -= 1;\n    }\n  }\n  var chk = (10 - sum % 10) % 10;\n  if (chk !== parseInt(str.substring(14, 15), 10)) {\n    return false;\n  }\n  return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isAscii;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable no-control-regex */\nvar ascii = /^[\\x00-\\x7F]+$/;\n/* eslint-enable no-control-regex */\n\nfunction isAscii(str) {\n  (0, _assertString.default)(str);\n  return ascii.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isFullWidth;\nexports.fullWidth = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar fullWidth = exports.fullWidth = /[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/;\nfunction isFullWidth(str) {\n  (0, _assertString.default)(str);\n  return fullWidth.test(str);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isHalfWidth;\nexports.halfWidth = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar halfWidth = exports.halfWidth = /[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/;\nfunction isHalfWidth(str) {\n  (0, _assertString.default)(str);\n  return halfWidth.test(str);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isVariableWidth;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isFullWidth = require(\"./isFullWidth\");\nvar _isHalfWidth = require(\"./isHalfWidth\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isVariableWidth(str) {\n  (0, _assertString.default)(str);\n  return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMultibyte;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable no-control-regex */\nvar multibyte = /[^\\x00-\\x7F]/;\n/* eslint-enable no-control-regex */\n\nfunction isMultibyte(str) {\n  (0, _assertString.default)(str);\n  return multibyte.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = multilineRegexp;\n/**\n * Build RegExp object from an array\n * of multiple/multi-line regexp parts\n *\n * @param {string[]} parts\n * @param {string} flags\n * @return {object} - RegExp object\n */\nfunction multilineRegexp(parts, flags) {\n  var regexpAsStringLiteral = parts.join('');\n  return new RegExp(regexpAsStringLiteral, flags);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isSemVer;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _multilineRegex = _interopRequireDefault(require(\"./util/multilineRegex\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Regular Expression to match\n * semantic versioning (SemVer)\n * built from multi-line, multi-parts regexp\n * Reference: https://semver.org/\n */\nvar semanticVersioningRegex = (0, _multilineRegex.default)(['^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)', '(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-z-][0-9a-z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-z-][0-9a-z-]*))*))', '?(?:\\\\+([0-9a-z-]+(?:\\\\.[0-9a-z-]+)*))?$'], 'i');\nfunction isSemVer(str) {\n  (0, _assertString.default)(str);\n  return semanticVersioningRegex.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isSurrogatePair;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar surrogatePair = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;\nfunction isSurrogatePair(str) {\n  (0, _assertString.default)(str);\n  return surrogatePair.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\nvar includes = function includes(arr, val) {\n  return arr.some(function (arrVal) {\n    return val === arrVal;\n  });\n};\nvar _default = exports.default = includes;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isDecimal;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _includes = _interopRequireDefault(require(\"./util/includes\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction decimalRegExp(options) {\n  var regExp = new RegExp(\"^[-+]?([0-9]+)?(\\\\\".concat(_alpha.decimal[options.locale], \"[0-9]{\").concat(options.decimal_digits, \"})\").concat(options.force_decimal ? '' : '?', \"$\"));\n  return regExp;\n}\nvar default_decimal_options = {\n  force_decimal: false,\n  decimal_digits: '1,',\n  locale: 'en-US'\n};\nvar blacklist = ['', '-', '+'];\nfunction isDecimal(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, default_decimal_options);\n  if (options.locale in _alpha.decimal) {\n    return !(0, _includes.default)(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str);\n  }\n  throw new Error(\"Invalid locale '\".concat(options.locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isHexadecimal;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;\nfunction isHexadecimal(str) {\n  (0, _assertString.default)(str);\n  return hexadecimal.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isOctal;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar octal = /^(0o)?[0-7]+$/i;\nfunction isOctal(str) {\n  (0, _assertString.default)(str);\n  return octal.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isDivisibleBy;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toFloat = _interopRequireDefault(require(\"./toFloat\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isDivisibleBy(str, num) {\n  (0, _assertString.default)(str);\n  return (0, _toFloat.default)(str) % parseInt(num, 10) === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isHexColor;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;\nfunction isHexColor(str) {\n  (0, _assertString.default)(str);\n  return hexcolor.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isRgbColor;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar rgbColor = /^rgb\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\)$/;\nvar rgbaColor = /^rgba\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\\.\\d|1(\\.0)?|0(\\.0)?)\\)$/;\nvar rgbColorPercent = /^rgb\\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\\)$/;\nvar rgbaColorPercent = /^rgba\\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\\.\\d|1(\\.0)?|0(\\.0)?)\\)$/;\nfunction isRgbColor(str) {\n  var includePercentValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  (0, _assertString.default)(str);\n  if (!includePercentValues) {\n    return rgbColor.test(str) || rgbaColor.test(str);\n  }\n  return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isHSL;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar hslComma = /^hsla?\\(((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%){2}(,((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%?))?\\)$/i;\nvar hslSpace = /^hsla?\\(((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?))(deg|grad|rad|turn)?(\\s(\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%){2}\\s?(\\/\\s((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%?)\\s?)?\\)$/i;\nfunction isHSL(str) {\n  (0, _assertString.default)(str);\n\n  // Strip duplicate spaces before calling the validation regex (See  #1598 for more info)\n  var strippedStr = str.replace(/\\s+/g, ' ').replace(/\\s?(hsla?\\(|\\)|,)\\s?/ig, '$1');\n  if (strippedStr.indexOf(',') !== -1) {\n    return hslComma.test(strippedStr);\n  }\n  return hslSpace.test(strippedStr);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISRC;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// see http://isrc.ifpi.org/en/isrc-standard/code-syntax\nvar isrc = /^[A-Z]{2}[0-9A-Z]{3}\\d{2}\\d{5}$/;\nfunction isISRC(str) {\n  (0, _assertString.default)(str);\n  return isrc.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isIBAN;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * List of country codes with\n * corresponding IBAN regular expression\n * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n */\nvar ibanRegexThroughCountryCode = {\n  AD: /^(AD[0-9]{2})\\d{8}[A-Z0-9]{12}$/,\n  AE: /^(AE[0-9]{2})\\d{3}\\d{16}$/,\n  AL: /^(AL[0-9]{2})\\d{8}[A-Z0-9]{16}$/,\n  AT: /^(AT[0-9]{2})\\d{16}$/,\n  AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\\d{20}$/,\n  BA: /^(BA[0-9]{2})\\d{16}$/,\n  BE: /^(BE[0-9]{2})\\d{12}$/,\n  BG: /^(BG[0-9]{2})[A-Z]{4}\\d{6}[A-Z0-9]{8}$/,\n  BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,\n  BR: /^(BR[0-9]{2})\\d{23}[A-Z]{1}[A-Z0-9]{1}$/,\n  BY: /^(BY[0-9]{2})[A-Z0-9]{4}\\d{20}$/,\n  CH: /^(CH[0-9]{2})\\d{5}[A-Z0-9]{12}$/,\n  CR: /^(CR[0-9]{2})\\d{18}$/,\n  CY: /^(CY[0-9]{2})\\d{8}[A-Z0-9]{16}$/,\n  CZ: /^(CZ[0-9]{2})\\d{20}$/,\n  DE: /^(DE[0-9]{2})\\d{18}$/,\n  DK: /^(DK[0-9]{2})\\d{14}$/,\n  DO: /^(DO[0-9]{2})[A-Z]{4}\\d{20}$/,\n  DZ: /^(DZ\\d{24})$/,\n  EE: /^(EE[0-9]{2})\\d{16}$/,\n  EG: /^(EG[0-9]{2})\\d{25}$/,\n  ES: /^(ES[0-9]{2})\\d{20}$/,\n  FI: /^(FI[0-9]{2})\\d{14}$/,\n  FO: /^(F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[0-9]{2})\\d{16}$/\n};\n\n/**\n * Check if the country codes passed are valid using the\n * ibanRegexThroughCountryCode as a reference\n *\n * @param {array} countryCodeArray\n * @return {boolean}\n */\n\nfunction hasOnlyValidCountryCodes(countryCodeArray) {\n  var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function (countryCode) {\n    return !(countryCode in ibanRegexThroughCountryCode);\n  });\n  if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * Check whether string has correct universal IBAN format\n * The IBAN consists of up to 34 alphanumeric characters, as follows:\n * Country Code using ISO 3166-1 alpha-2, two letters\n * check digits, two digits and\n * Basic Bank Account Number (BBAN), up to 30 alphanumeric characters.\n * NOTE: Permitted IBAN characters are: digits [0-9] and the 26 latin alphabetic [A-Z]\n *\n * @param {string} str - string under validation\n * @param {object} options - object to pass the countries to be either whitelisted or blacklisted\n * @return {boolean}\n */\nfunction hasValidIbanFormat(str, options) {\n  // Strip white spaces and hyphens\n  var strippedStr = str.replace(/[\\s\\-]+/gi, '').toUpperCase();\n  var isoCountryCode = strippedStr.slice(0, 2).toUpperCase();\n  var isoCountryCodeInIbanRegexCodeObject = (isoCountryCode in ibanRegexThroughCountryCode);\n  if (options.whitelist) {\n    if (!hasOnlyValidCountryCodes(options.whitelist)) {\n      return false;\n    }\n    var isoCountryCodeInWhiteList = options.whitelist.includes(isoCountryCode);\n    if (!isoCountryCodeInWhiteList) {\n      return false;\n    }\n  }\n  if (options.blacklist) {\n    var isoCountryCodeInBlackList = options.blacklist.includes(isoCountryCode);\n    if (isoCountryCodeInBlackList) {\n      return false;\n    }\n  }\n  return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr);\n}\n\n/**\n   * Check whether string has valid IBAN Checksum\n   * by performing basic mod-97 operation and\n   * the remainder should equal 1\n   * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string\n   * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35\n   * -- Interpret the string as a decimal integer and\n   * -- compute the remainder on division by 97 (mod 97)\n   * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n   *\n   * @param {string} str\n   * @return {boolean}\n   */\nfunction hasValidIbanChecksum(str) {\n  var strippedStr = str.replace(/[^A-Z0-9]+/gi, '').toUpperCase(); // Keep only digits and A-Z latin alphabetic\n  var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4);\n  var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function (char) {\n    return char.charCodeAt(0) - 55;\n  });\n  var remainder = alphaCapsReplacedWithDigits.match(/\\d{1,7}/g).reduce(function (acc, value) {\n    return Number(acc + value) % 97;\n  }, '');\n  return remainder === 1;\n}\nfunction isIBAN(str) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  (0, _assertString.default)(str);\n  return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str);\n}\nvar locales = exports.locales = Object.keys(ibanRegexThroughCountryCode);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.CountryCodes = void 0;\nexports.default = isISO31661Alpha2;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\nvar validISO31661Alpha2CountriesCodes = new Set(['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']);\nfunction isISO31661Alpha2(str) {\n  (0, _assertString.default)(str);\n  return validISO31661Alpha2CountriesCodes.has(str.toUpperCase());\n}\nvar CountryCodes = exports.CountryCodes = validISO31661Alpha2CountriesCodes;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBIC;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isISO31661Alpha = require(\"./isISO31661Alpha2\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// https://en.wikipedia.org/wiki/ISO_9362\nvar isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;\nfunction isBIC(str) {\n  (0, _assertString.default)(str);\n\n  // toUpperCase() should be removed when a new major version goes out that changes\n  // the regex to [A-Z] (per the spec).\n  var countryCode = str.slice(4, 6).toUpperCase();\n  if (!_isISO31661Alpha.CountryCodes.has(countryCode) && countryCode !== 'XK') {\n    return false;\n  }\n  return isBICReg.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMD5;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar md5 = /^[a-f0-9]{32}$/;\nfunction isMD5(str) {\n  (0, _assertString.default)(str);\n  return md5.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isHash;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar lengths = {\n  md5: 32,\n  md4: 32,\n  sha1: 40,\n  sha256: 64,\n  sha384: 96,\n  sha512: 128,\n  ripemd128: 32,\n  ripemd160: 40,\n  tiger128: 32,\n  tiger160: 40,\n  tiger192: 48,\n  crc32: 8,\n  crc32b: 8\n};\nfunction isHash(str, algorithm) {\n  (0, _assertString.default)(str);\n  var hash = new RegExp(\"^[a-fA-F0-9]{\".concat(lengths[algorithm], \"}$\"));\n  return hash.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBase64;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar notBase64 = /[^A-Z0-9+\\/=]/i;\nvar urlSafeBase64 = /^[A-Z0-9_\\-]*$/i;\nvar defaultBase64Options = {\n  urlSafe: false\n};\nfunction isBase64(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, defaultBase64Options);\n  var len = str.length;\n  if (options.urlSafe) {\n    return urlSafeBase64.test(str);\n  }\n  if (len % 4 !== 0 || notBase64.test(str)) {\n    return false;\n  }\n  var firstPaddingChar = str.indexOf('=');\n  return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '=';\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isJWT;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isBase = _interopRequireDefault(require(\"./isBase64\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isJWT(str) {\n  (0, _assertString.default)(str);\n  var dotSplit = str.split('.');\n  var len = dotSplit.length;\n  if (len !== 3) {\n    return false;\n  }\n  return dotSplit.reduce(function (acc, currElem) {\n    return acc && (0, _isBase.default)(currElem, {\n      urlSafe: true\n    });\n  }, true);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isJSON;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar default_json_options = {\n  allow_primitives: false\n};\nfunction isJSON(str, options) {\n  (0, _assertString.default)(str);\n  try {\n    options = (0, _merge.default)(options, default_json_options);\n    var primitives = [];\n    if (options.allow_primitives) {\n      primitives = [null, false, true];\n    }\n    var obj = JSON.parse(str);\n    return primitives.includes(obj) || !!obj && _typeof(obj) === 'object';\n  } catch (e) {/* ignore */}\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isEmpty;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_is_empty_options = {\n  ignore_whitespace: false\n};\nfunction isEmpty(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, default_is_empty_options);\n  return (options.ignore_whitespace ? str.trim().length : str.length) === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isLength;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/* eslint-disable prefer-rest-params */\nfunction isLength(str, options) {\n  (0, _assertString.default)(str);\n  var min;\n  var max;\n  if (_typeof(options) === 'object') {\n    min = options.min || 0;\n    max = options.max;\n  } else {\n    // backwards compatibility: isLength(str, min [, max])\n    min = arguments[1] || 0;\n    max = arguments[2];\n  }\n  var presentationSequences = str.match(/(\\uFE0F|\\uFE0E)/g) || [];\n  var surrogatePairs = str.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g) || [];\n  var len = str.length - presentationSequences.length - surrogatePairs.length;\n  return len >= min && (typeof max === 'undefined' || len <= max);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isUUID;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar uuid = {\n  1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n  2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n  3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n  4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n  5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n  7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n  all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i\n};\nfunction isUUID(str, version) {\n  (0, _assertString.default)(str);\n  var pattern = uuid[![undefined, null].includes(version) ? version : 'all'];\n  return !!pattern && pattern.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMongoId;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isHexadecimal = _interopRequireDefault(require(\"./isHexadecimal\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isMongoId(str) {\n  (0, _assertString.default)(str);\n  return (0, _isHexadecimal.default)(str) && str.length === 24;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isAfter;\nvar _toDate = _interopRequireDefault(require(\"./toDate\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isAfter(date, options) {\n  // For backwards compatibility:\n  // isAfter(str [, date]), i.e. `options` could be used as argument for the legacy `date`\n  var comparisonDate = (options === null || options === void 0 ? void 0 : options.comparisonDate) || options || Date().toString();\n  var comparison = (0, _toDate.default)(comparisonDate);\n  var original = (0, _toDate.default)(date);\n  return !!(original && comparison && original > comparison);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBefore;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toDate = _interopRequireDefault(require(\"./toDate\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isBefore(str) {\n  var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());\n  (0, _assertString.default)(str);\n  var comparison = (0, _toDate.default)(date);\n  var original = (0, _toDate.default)(str);\n  return !!(original && comparison && original < comparison);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isIn;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toString = _interopRequireDefault(require(\"./util/toString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction isIn(str, options) {\n  (0, _assertString.default)(str);\n  var i;\n  if (Object.prototype.toString.call(options) === '[object Array]') {\n    var array = [];\n    for (i in options) {\n      // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n      // istanbul ignore else\n      if ({}.hasOwnProperty.call(options, i)) {\n        array[i] = (0, _toString.default)(options[i]);\n      }\n    }\n    return array.indexOf(str) >= 0;\n  } else if (_typeof(options) === 'object') {\n    return options.hasOwnProperty(str);\n  } else if (options && typeof options.indexOf === 'function') {\n    return options.indexOf(str) >= 0;\n  }\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isLuhnNumber;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isLuhnNumber(str) {\n  (0, _assertString.default)(str);\n  var sanitized = str.replace(/[- ]+/g, '');\n  var sum = 0;\n  var digit;\n  var tmpNum;\n  var shouldDouble;\n  for (var i = sanitized.length - 1; i >= 0; i--) {\n    digit = sanitized.substring(i, i + 1);\n    tmpNum = parseInt(digit, 10);\n    if (shouldDouble) {\n      tmpNum *= 2;\n      if (tmpNum >= 10) {\n        sum += tmpNum % 10 + 1;\n      } else {\n        sum += tmpNum;\n      }\n    } else {\n      sum += tmpNum;\n    }\n    shouldDouble = !shouldDouble;\n  }\n  return !!(sum % 10 === 0 ? sanitized : false);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isCreditCard;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isLuhnNumber = _interopRequireDefault(require(\"./isLuhnNumber\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar cards = {\n  amex: /^3[47][0-9]{13}$/,\n  dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,\n  discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,\n  jcb: /^(?:2131|1800|35\\d{3})\\d{11}$/,\n  mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,\n  // /^[25][1-7][0-9]{14}$/;\n  unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,\n  visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/\n};\nvar allCards = function () {\n  var tmpCardsArray = [];\n  for (var cardProvider in cards) {\n    // istanbul ignore else\n    if (cards.hasOwnProperty(cardProvider)) {\n      tmpCardsArray.push(cards[cardProvider]);\n    }\n  }\n  return tmpCardsArray;\n}();\nfunction isCreditCard(card) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  (0, _assertString.default)(card);\n  var provider = options.provider;\n  var sanitized = card.replace(/[- ]+/g, '');\n  if (provider && provider.toLowerCase() in cards) {\n    // specific provider in the list\n    if (!cards[provider.toLowerCase()].test(sanitized)) {\n      return false;\n    }\n  } else if (provider && !(provider.toLowerCase() in cards)) {\n    /* specific provider not in the list */\n    throw new Error(\"\".concat(provider, \" is not a valid credit card provider.\"));\n  } else if (!allCards.some(function (cardProvider) {\n    return cardProvider.test(sanitized);\n  })) {\n    // no specific provider\n    return false;\n  }\n  return (0, _isLuhnNumber.default)(card);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isIdentityCard;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isInt = _interopRequireDefault(require(\"./isInt\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar validators = {\n  PL: function PL(str) {\n    (0, _assertString.default)(str);\n    var weightOfDigits = {\n      1: 1,\n      2: 3,\n      3: 7,\n      4: 9,\n      5: 1,\n      6: 3,\n      7: 7,\n      8: 9,\n      9: 1,\n      10: 3,\n      11: 0\n    };\n    if (str != null && str.length === 11 && (0, _isInt.default)(str, {\n      allow_leading_zeroes: true\n    })) {\n      var digits = str.split('').slice(0, -1);\n      var sum = digits.reduce(function (acc, digit, index) {\n        return acc + Number(digit) * weightOfDigits[index + 1];\n      }, 0);\n      var modulo = sum % 10;\n      var lastDigit = Number(str.charAt(str.length - 1));\n      if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) {\n        return true;\n      }\n    }\n    return false;\n  },\n  ES: function ES(str) {\n    (0, _assertString.default)(str);\n    var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/;\n    var charsValue = {\n      X: 0,\n      Y: 1,\n      Z: 2\n    };\n    var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E'];\n\n    // sanitize user input\n    var sanitized = str.trim().toUpperCase();\n\n    // validate the data structure\n    if (!DNI.test(sanitized)) {\n      return false;\n    }\n\n    // validate the control digit\n    var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (char) {\n      return charsValue[char];\n    });\n    return sanitized.endsWith(controlDigits[number % 23]);\n  },\n  FI: function FI(str) {\n    // https://dvv.fi/en/personal-identity-code#:~:text=control%20character%20for%20a-,personal,-identity%20code%20calculated\n    (0, _assertString.default)(str);\n    if (str.length !== 11) {\n      return false;\n    }\n    if (!str.match(/^\\d{6}[\\-A\\+]\\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) {\n      return false;\n    }\n    var checkDigits = '0123456789ABCDEFHJKLMNPRSTUVWXY';\n    var idAsNumber = parseInt(str.slice(0, 6), 10) * 1000 + parseInt(str.slice(7, 10), 10);\n    var remainder = idAsNumber % 31;\n    var checkDigit = checkDigits[remainder];\n    return checkDigit === str.slice(10, 11);\n  },\n  IN: function IN(str) {\n    var DNI = /^[1-9]\\d{3}\\s?\\d{4}\\s?\\d{4}$/;\n\n    // multiplication table\n    var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]];\n\n    // permutation table\n    var p = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]];\n\n    // sanitize user input\n    var sanitized = str.trim();\n\n    // validate the data structure\n    if (!DNI.test(sanitized)) {\n      return false;\n    }\n    var c = 0;\n    var invertedArray = sanitized.replace(/\\s/g, '').split('').map(Number).reverse();\n    invertedArray.forEach(function (val, i) {\n      c = d[c][p[i % 8][val]];\n    });\n    return c === 0;\n  },\n  IR: function IR(str) {\n    if (!str.match(/^\\d{10}$/)) return false;\n    str = \"0000\".concat(str).slice(str.length - 6);\n    if (parseInt(str.slice(3, 9), 10) === 0) return false;\n    var lastNumber = parseInt(str.slice(9, 10), 10);\n    var sum = 0;\n    for (var i = 0; i < 9; i++) {\n      sum += parseInt(str.slice(i, i + 1), 10) * (10 - i);\n    }\n    sum %= 11;\n    return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum;\n  },\n  IT: function IT(str) {\n    if (str.length !== 9) return false;\n    if (str === 'CA00000AA') return false; // https://it.wikipedia.org/wiki/Carta_d%27identit%C3%A0_elettronica_italiana\n    return str.search(/C[A-Z]\\d{5}[A-Z]{2}/i) > -1;\n  },\n  NO: function NO(str) {\n    var sanitized = str.trim();\n    if (isNaN(Number(sanitized))) return false;\n    if (sanitized.length !== 11) return false;\n    if (sanitized === '00000000000') return false;\n\n    // https://no.wikipedia.org/wiki/F%C3%B8dselsnummer\n    var f = sanitized.split('').map(Number);\n    var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11;\n    var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11;\n    if (k1 !== f[9] || k2 !== f[10]) return false;\n    return true;\n  },\n  TH: function TH(str) {\n    if (!str.match(/^[1-8]\\d{12}$/)) return false;\n\n    // validate check digit\n    var sum = 0;\n    for (var i = 0; i < 12; i++) {\n      sum += parseInt(str[i], 10) * (13 - i);\n    }\n    return str[12] === ((11 - sum % 11) % 10).toString();\n  },\n  LK: function LK(str) {\n    var old_nic = /^[1-9]\\d{8}[vx]$/i;\n    var new_nic = /^[1-9]\\d{11}$/i;\n    if (str.length === 10 && old_nic.test(str)) return true;else if (str.length === 12 && new_nic.test(str)) return true;\n    return false;\n  },\n  'he-IL': function heIL(str) {\n    var DNI = /^\\d{9}$/;\n\n    // sanitize user input\n    var sanitized = str.trim();\n\n    // validate the data structure\n    if (!DNI.test(sanitized)) {\n      return false;\n    }\n    var id = sanitized;\n    var sum = 0,\n      incNum;\n    for (var i = 0; i < id.length; i++) {\n      incNum = Number(id[i]) * (i % 2 + 1); // Multiply number by 1 or 2\n      sum += incNum > 9 ? incNum - 9 : incNum; // Sum the digits up and add to total\n    }\n    return sum % 10 === 0;\n  },\n  'ar-LY': function arLY(str) {\n    // Libya National Identity Number NIN is 12 digits, the first digit is either 1 or 2\n    var NIN = /^(1|2)\\d{11}$/;\n\n    // sanitize user input\n    var sanitized = str.trim();\n\n    // validate the data structure\n    if (!NIN.test(sanitized)) {\n      return false;\n    }\n    return true;\n  },\n  'ar-TN': function arTN(str) {\n    var DNI = /^\\d{8}$/;\n\n    // sanitize user input\n    var sanitized = str.trim();\n\n    // validate the data structure\n    if (!DNI.test(sanitized)) {\n      return false;\n    }\n    return true;\n  },\n  'zh-CN': function zhCN(str) {\n    var provincesAndCities = ['11',\n    // 北京\n    '12',\n    // 天津\n    '13',\n    // 河北\n    '14',\n    // 山西\n    '15',\n    // 内蒙古\n    '21',\n    // 辽宁\n    '22',\n    // 吉林\n    '23',\n    // 黑龙江\n    '31',\n    // 上海\n    '32',\n    // 江苏\n    '33',\n    // 浙江\n    '34',\n    // 安徽\n    '35',\n    // 福建\n    '36',\n    // 江西\n    '37',\n    // 山东\n    '41',\n    // 河南\n    '42',\n    // 湖北\n    '43',\n    // 湖南\n    '44',\n    // 广东\n    '45',\n    // 广西\n    '46',\n    // 海南\n    '50',\n    // 重庆\n    '51',\n    // 四川\n    '52',\n    // 贵州\n    '53',\n    // 云南\n    '54',\n    // 西藏\n    '61',\n    // 陕西\n    '62',\n    // 甘肃\n    '63',\n    // 青海\n    '64',\n    // 宁夏\n    '65',\n    // 新疆\n    '71',\n    // 台湾\n    '81',\n    // 香港\n    '82',\n    // 澳门\n    '91' // 国外\n    ];\n    var powers = ['7', '9', '10', '5', '8', '4', '2', '1', '6', '3', '7', '9', '10', '5', '8', '4', '2'];\n    var parityBit = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];\n    var checkAddressCode = function checkAddressCode(addressCode) {\n      return provincesAndCities.includes(addressCode);\n    };\n    var checkBirthDayCode = function checkBirthDayCode(birDayCode) {\n      var yyyy = parseInt(birDayCode.substring(0, 4), 10);\n      var mm = parseInt(birDayCode.substring(4, 6), 10);\n      var dd = parseInt(birDayCode.substring(6), 10);\n      var xdata = new Date(yyyy, mm - 1, dd);\n      if (xdata > new Date()) {\n        return false;\n        // eslint-disable-next-line max-len\n      } else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd) {\n        return true;\n      }\n      return false;\n    };\n    var getParityBit = function getParityBit(idCardNo) {\n      var id17 = idCardNo.substring(0, 17);\n      var power = 0;\n      for (var i = 0; i < 17; i++) {\n        power += parseInt(id17.charAt(i), 10) * parseInt(powers[i], 10);\n      }\n      var mod = power % 11;\n      return parityBit[mod];\n    };\n    var checkParityBit = function checkParityBit(idCardNo) {\n      return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase();\n    };\n    var check15IdCardNo = function check15IdCardNo(idCardNo) {\n      var check = /^[1-9]\\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}$/.test(idCardNo);\n      if (!check) return false;\n      var addressCode = idCardNo.substring(0, 2);\n      check = checkAddressCode(addressCode);\n      if (!check) return false;\n      var birDayCode = \"19\".concat(idCardNo.substring(6, 12));\n      check = checkBirthDayCode(birDayCode);\n      if (!check) return false;\n      return true;\n    };\n    var check18IdCardNo = function check18IdCardNo(idCardNo) {\n      var check = /^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}(\\d|x|X)$/.test(idCardNo);\n      if (!check) return false;\n      var addressCode = idCardNo.substring(0, 2);\n      check = checkAddressCode(addressCode);\n      if (!check) return false;\n      var birDayCode = idCardNo.substring(6, 14);\n      check = checkBirthDayCode(birDayCode);\n      if (!check) return false;\n      return checkParityBit(idCardNo);\n    };\n    var checkIdCardNo = function checkIdCardNo(idCardNo) {\n      var check = /^\\d{15}|(\\d{17}(\\d|x|X))$/.test(idCardNo);\n      if (!check) return false;\n      if (idCardNo.length === 15) {\n        return check15IdCardNo(idCardNo);\n      }\n      return check18IdCardNo(idCardNo);\n    };\n    return checkIdCardNo(str);\n  },\n  'zh-HK': function zhHK(str) {\n    // sanitize user input\n    str = str.trim();\n\n    // HKID number starts with 1 or 2 letters, followed by 6 digits,\n    // then a checksum contained in square / round brackets or nothing\n    var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\\([0-9A]\\))|(\\[[0-9A]\\])|([0-9A]))$/;\n    var regexIsDigit = /^[0-9]$/;\n\n    // convert the user input to all uppercase and apply regex\n    str = str.toUpperCase();\n    if (!regexHKID.test(str)) return false;\n    str = str.replace(/\\[|\\]|\\(|\\)/g, '');\n    if (str.length === 8) str = \"3\".concat(str);\n    var checkSumVal = 0;\n    for (var i = 0; i <= 7; i++) {\n      var convertedChar = void 0;\n      if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11;else convertedChar = str[i];\n      checkSumVal += convertedChar * (9 - i);\n    }\n    checkSumVal %= 11;\n    var checkSumConverted;\n    if (checkSumVal === 0) checkSumConverted = '0';else if (checkSumVal === 1) checkSumConverted = 'A';else checkSumConverted = String(11 - checkSumVal);\n    if (checkSumConverted === str[str.length - 1]) return true;\n    return false;\n  },\n  'zh-TW': function zhTW(str) {\n    var ALPHABET_CODES = {\n      A: 10,\n      B: 11,\n      C: 12,\n      D: 13,\n      E: 14,\n      F: 15,\n      G: 16,\n      H: 17,\n      I: 34,\n      J: 18,\n      K: 19,\n      L: 20,\n      M: 21,\n      N: 22,\n      O: 35,\n      P: 23,\n      Q: 24,\n      R: 25,\n      S: 26,\n      T: 27,\n      U: 28,\n      V: 29,\n      W: 32,\n      X: 30,\n      Y: 31,\n      Z: 33\n    };\n    var sanitized = str.trim().toUpperCase();\n    if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false;\n    return Array.from(sanitized).reduce(function (sum, number, index) {\n      if (index === 0) {\n        var code = ALPHABET_CODES[number];\n        return code % 10 * 9 + Math.floor(code / 10);\n      }\n      if (index === 9) {\n        return (10 - sum % 10 - Number(number)) % 10 === 0;\n      }\n      return sum + Number(number) * (9 - index);\n    }, 0);\n  }\n};\nfunction isIdentityCard(str, locale) {\n  (0, _assertString.default)(str);\n  if (locale in validators) {\n    return validators[locale](str);\n  } else if (locale === 'any') {\n    for (var key in validators) {\n      // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n      // istanbul ignore else\n      if (validators.hasOwnProperty(key)) {\n        var validator = validators[key];\n        if (validator(str)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isEAN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * The most commonly used EAN standard is\n * the thirteen-digit EAN-13, while the\n * less commonly used 8-digit EAN-8 barcode was\n * introduced for use on small packages.\n * Also EAN/UCC-14 is used for Grouping of individual\n * trade items above unit level(Intermediate, Carton or Pallet).\n * For more info about EAN-14 checkout: https://www.gtin.info/itf-14-barcodes/\n * EAN consists of:\n * GS1 prefix, manufacturer code, product code and check digit\n * Reference: https://en.wikipedia.org/wiki/International_Article_Number\n * Reference: https://www.gtin.info/\n */\n\n/**\n * Define EAN Lenghts; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14\n * and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14),\n * with exact numberic matching of 8 or 13 or 14 digits [0-9]\n */\nvar LENGTH_EAN_8 = 8;\nvar LENGTH_EAN_14 = 14;\nvar validEanRegex = /^(\\d{8}|\\d{13}|\\d{14})$/;\n\n/**\n * Get position weight given:\n * EAN length and digit index/position\n *\n * @param {number} length\n * @param {number} index\n * @return {number}\n */\nfunction getPositionWeightThroughLengthAndIndex(length, index) {\n  if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) {\n    return index % 2 === 0 ? 3 : 1;\n  }\n  return index % 2 === 0 ? 1 : 3;\n}\n\n/**\n * Calculate EAN Check Digit\n * Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit\n *\n * @param {string} ean\n * @return {number}\n */\nfunction calculateCheckDigit(ean) {\n  var checksum = ean.slice(0, -1).split('').map(function (char, index) {\n    return Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index);\n  }).reduce(function (acc, partialSum) {\n    return acc + partialSum;\n  }, 0);\n  var remainder = 10 - checksum % 10;\n  return remainder < 10 ? remainder : 0;\n}\n\n/**\n * Check if string is valid EAN:\n * Matches EAN-8/EAN-13/EAN-14 regex\n * Has valid check digit.\n *\n * @param {string} str\n * @return {boolean}\n */\nfunction isEAN(str) {\n  (0, _assertString.default)(str);\n  var actualCheckDigit = Number(str.slice(-1));\n  return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISIN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;\n\n// this link details how the check digit is calculated:\n// https://www.isin.org/isin-format/. it is a little bit\n// odd in that it works with digits, not numbers. in order\n// to make only one pass through the ISIN characters, the\n// each alpha character is handled as 2 characters within\n// the loop.\n\nfunction isISIN(str) {\n  (0, _assertString.default)(str);\n  if (!isin.test(str)) {\n    return false;\n  }\n  var double = true;\n  var sum = 0;\n  // convert values\n  for (var i = str.length - 2; i >= 0; i--) {\n    if (str[i] >= 'A' && str[i] <= 'Z') {\n      var value = str[i].charCodeAt(0) - 55;\n      var lo = value % 10;\n      var hi = Math.trunc(value / 10);\n      // letters have two digits, so handle the low order\n      // and high order digits separately.\n      for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) {\n        var digit = _arr[_i];\n        if (double) {\n          if (digit >= 5) {\n            sum += 1 + (digit - 5) * 2;\n          } else {\n            sum += digit * 2;\n          }\n        } else {\n          sum += digit;\n        }\n        double = !double;\n      }\n    } else {\n      var _digit = str[i].charCodeAt(0) - '0'.charCodeAt(0);\n      if (double) {\n        if (_digit >= 5) {\n          sum += 1 + (_digit - 5) * 2;\n        } else {\n          sum += _digit * 2;\n        }\n      } else {\n        sum += _digit;\n      }\n      double = !double;\n    }\n  }\n  var check = Math.trunc((sum + 9) / 10) * 10 - sum;\n  return +str[str.length - 1] === check;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISBN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/;\nvar possibleIsbn13 = /^(?:[0-9]{13})$/;\nvar factor = [1, 3];\nfunction isISBN(isbn, options) {\n  (0, _assertString.default)(isbn);\n\n  // For backwards compatibility:\n  // isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version`\n  var version = String((options === null || options === void 0 ? void 0 : options.version) || options);\n  if (!(options !== null && options !== void 0 && options.version || options)) {\n    return isISBN(isbn, {\n      version: 10\n    }) || isISBN(isbn, {\n      version: 13\n    });\n  }\n  var sanitizedIsbn = isbn.replace(/[\\s-]+/g, '');\n  var checksum = 0;\n  if (version === '10') {\n    if (!possibleIsbn10.test(sanitizedIsbn)) {\n      return false;\n    }\n    for (var i = 0; i < version - 1; i++) {\n      checksum += (i + 1) * sanitizedIsbn.charAt(i);\n    }\n    if (sanitizedIsbn.charAt(9) === 'X') {\n      checksum += 10 * 10;\n    } else {\n      checksum += 10 * sanitizedIsbn.charAt(9);\n    }\n    if (checksum % 11 === 0) {\n      return true;\n    }\n  } else if (version === '13') {\n    if (!possibleIsbn13.test(sanitizedIsbn)) {\n      return false;\n    }\n    for (var _i = 0; _i < 12; _i++) {\n      checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i);\n    }\n    if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) {\n      return true;\n    }\n  }\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISSN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar issn = '^\\\\d{4}-?\\\\d{3}[\\\\dX]$';\nfunction isISSN(str) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  (0, _assertString.default)(str);\n  var testIssn = issn;\n  testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn;\n  testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i');\n  if (!testIssn.test(str)) {\n    return false;\n  }\n  var digits = str.replace('-', '').toUpperCase();\n  var checksum = 0;\n  for (var i = 0; i < digits.length; i++) {\n    var digit = digits[i];\n    checksum += (digit === 'X' ? 10 : +digit) * (8 - i);\n  }\n  return checksum % 11 === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.iso7064Check = iso7064Check;\nexports.luhnCheck = luhnCheck;\nexports.reverseMultiplyAndSum = reverseMultiplyAndSum;\nexports.verhoeffCheck = verhoeffCheck;\n/**\n * Algorithmic validation functions\n * May be used as is or implemented in the workflow of other validators.\n */\n\n/*\n * ISO 7064 validation function\n * Called with a string of numbers (incl. check digit)\n * to validate according to ISO 7064 (MOD 11, 10).\n */\nfunction iso7064Check(str) {\n  var checkvalue = 10;\n  for (var i = 0; i < str.length - 1; i++) {\n    checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11;\n  }\n  checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue;\n  return checkvalue === parseInt(str[10], 10);\n}\n\n/*\n * Luhn (mod 10) validation function\n * Called with a string of numbers (incl. check digit)\n * to validate according to the Luhn algorithm.\n */\nfunction luhnCheck(str) {\n  var checksum = 0;\n  var second = false;\n  for (var i = str.length - 1; i >= 0; i--) {\n    if (second) {\n      var product = parseInt(str[i], 10) * 2;\n      if (product > 9) {\n        // sum digits of product and add to checksum\n        checksum += product.toString().split('').map(function (a) {\n          return parseInt(a, 10);\n        }).reduce(function (a, b) {\n          return a + b;\n        }, 0);\n      } else {\n        checksum += product;\n      }\n    } else {\n      checksum += parseInt(str[i], 10);\n    }\n    second = !second;\n  }\n  return checksum % 10 === 0;\n}\n\n/*\n * Reverse TIN multiplication and summation helper function\n * Called with an array of single-digit integers and a base multiplier\n * to calculate the sum of the digits multiplied in reverse.\n * Normally used in variations of MOD 11 algorithmic checks.\n */\nfunction reverseMultiplyAndSum(digits, base) {\n  var total = 0;\n  for (var i = 0; i < digits.length; i++) {\n    total += digits[i] * (base - i);\n  }\n  return total;\n}\n\n/*\n * Verhoeff validation helper function\n * Called with a string of numbers\n * to validate according to the Verhoeff algorithm.\n */\nfunction verhoeffCheck(str) {\n  var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]];\n  var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]];\n\n  // Copy (to prevent replacement) and reverse\n  var str_copy = str.split('').reverse().join('');\n  var checksum = 0;\n  for (var i = 0; i < str_copy.length; i++) {\n    checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]];\n  }\n  return checksum === 0;\n}","\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isTaxID;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar algorithms = _interopRequireWildcard(require(\"./util/algorithms\"));\nvar _isDate = _interopRequireDefault(require(\"./isDate\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/**\n * TIN Validation\n * Validates Tax Identification Numbers (TINs) from the US, EU member states and the United Kingdom.\n *\n * EU-UK:\n * National TIN validity is calculated using public algorithms as made available by DG TAXUD.\n *\n * See `https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx` for more information.\n *\n * US:\n * An Employer Identification Number (EIN), also known as a Federal Tax Identification Number,\n *  is used to identify a business entity.\n *\n * NOTES:\n *  - Prefix 47 is being reserved for future use\n *  - Prefixes 26, 27, 45, 46 and 47 were previously assigned by the Philadelphia campus.\n *\n * See `http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes`\n * for more information.\n */\n\n// Locale functions\n\n/*\n * bg-BG validation function\n * (Edinen graždanski nomer (EGN/ЕГН), persons only)\n * Checks if birth date (first six digits) is valid and calculates check (last) digit\n */\nfunction bgBgCheck(tin) {\n  // Extract full year, normalize month and check birth date validity\n  var century_year = tin.slice(0, 2);\n  var month = parseInt(tin.slice(2, 4), 10);\n  if (month > 40) {\n    month -= 40;\n    century_year = \"20\".concat(century_year);\n  } else if (month > 20) {\n    month -= 20;\n    century_year = \"18\".concat(century_year);\n  } else {\n    century_year = \"19\".concat(century_year);\n  }\n  if (month < 10) {\n    month = \"0\".concat(month);\n  }\n  var date = \"\".concat(century_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // split digits into an array for further processing\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n\n  // Calculate checksum by multiplying digits with fixed values\n  var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6];\n  var checksum = 0;\n  for (var i = 0; i < multip_lookup.length; i++) {\n    checksum += digits[i] * multip_lookup[i];\n  }\n  checksum = checksum % 11 === 10 ? 0 : checksum % 11;\n  return checksum === digits[9];\n}\n\n/**\n * Check if an input is a valid Canadian SIN (Social Insurance Number)\n *\n * The Social Insurance Number (SIN) is a 9 digit number that\n * you need to work in Canada or to have access to government programs and benefits.\n *\n * https://en.wikipedia.org/wiki/Social_Insurance_Number\n * https://www.canada.ca/en/employment-social-development/services/sin.html\n * https://www.codercrunch.com/challenge/819302488/sin-validator\n *\n * @param {string} input\n * @return {boolean}\n */\nfunction isCanadianSIN(input) {\n  var digitsArray = input.split('');\n  var even = digitsArray.filter(function (_, idx) {\n    return idx % 2;\n  }).map(function (i) {\n    return Number(i) * 2;\n  }).join('').split('');\n  var total = digitsArray.filter(function (_, idx) {\n    return !(idx % 2);\n  }).concat(even).map(function (i) {\n    return Number(i);\n  }).reduce(function (acc, cur) {\n    return acc + cur;\n  });\n  return total % 10 === 0;\n}\n\n/*\n * cs-CZ validation function\n * (Rodné číslo (RČ), persons only)\n * Checks if birth date (first six digits) is valid and divisibility by 11\n * Material not in DG TAXUD document sourced from:\n * -`https://lorenc.info/3MA381/overeni-spravnosti-rodneho-cisla.htm`\n * -`https://www.mvcr.cz/clanek/rady-a-sluzby-dokumenty-rodne-cislo.aspx`\n */\nfunction csCzCheck(tin) {\n  tin = tin.replace(/\\W/, '');\n\n  // Extract full year from TIN length\n  var full_year = parseInt(tin.slice(0, 2), 10);\n  if (tin.length === 10) {\n    if (full_year < 54) {\n      full_year = \"20\".concat(full_year);\n    } else {\n      full_year = \"19\".concat(full_year);\n    }\n  } else {\n    if (tin.slice(6) === '000') {\n      return false;\n    } // Three-zero serial not assigned before 1954\n    if (full_year < 54) {\n      full_year = \"19\".concat(full_year);\n    } else {\n      return false; // No 18XX years seen in any of the resources\n    }\n  }\n  // Add missing zero if needed\n  if (full_year.length === 3) {\n    full_year = [full_year.slice(0, 2), '0', full_year.slice(2)].join('');\n  }\n\n  // Extract month from TIN and normalize\n  var month = parseInt(tin.slice(2, 4), 10);\n  if (month > 50) {\n    month -= 50;\n  }\n  if (month > 20) {\n    // Month-plus-twenty was only introduced in 2004\n    if (parseInt(full_year, 10) < 2004) {\n      return false;\n    }\n    month -= 20;\n  }\n  if (month < 10) {\n    month = \"0\".concat(month);\n  }\n\n  // Check date validity\n  var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // Verify divisibility by 11\n  if (tin.length === 10) {\n    if (parseInt(tin, 10) % 11 !== 0) {\n      // Some numbers up to and including 1985 are still valid if\n      // check (last) digit equals 0 and modulo of first 9 digits equals 10\n      var checkdigit = parseInt(tin.slice(0, 9), 10) % 11;\n      if (parseInt(full_year, 10) < 1986 && checkdigit === 10) {\n        if (parseInt(tin.slice(9), 10) !== 0) {\n          return false;\n        }\n      } else {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n/*\n * de-AT validation function\n * (Abgabenkontonummer, persons/entities)\n * Verify TIN validity by calling luhnCheck()\n */\nfunction deAtCheck(tin) {\n  return algorithms.luhnCheck(tin);\n}\n\n/*\n * de-DE validation function\n * (Steueridentifikationsnummer (Steuer-IdNr.), persons only)\n * Tests for single duplicate/triplicate value, then calculates ISO 7064 check (last) digit\n * Partial implementation of spec (same result with both algorithms always)\n */\nfunction deDeCheck(tin) {\n  // Split digits into an array for further processing\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n\n  // Fill array with strings of number positions\n  var occurences = [];\n  for (var i = 0; i < digits.length - 1; i++) {\n    occurences.push('');\n    for (var j = 0; j < digits.length - 1; j++) {\n      if (digits[i] === digits[j]) {\n        occurences[i] += j;\n      }\n    }\n  }\n\n  // Remove digits with one occurence and test for only one duplicate/triplicate\n  occurences = occurences.filter(function (a) {\n    return a.length > 1;\n  });\n  if (occurences.length !== 2 && occurences.length !== 3) {\n    return false;\n  }\n\n  // In case of triplicate value only two digits are allowed next to each other\n  if (occurences[0].length === 3) {\n    var trip_locations = occurences[0].split('').map(function (a) {\n      return parseInt(a, 10);\n    });\n    var recurrent = 0; // Amount of neighbour occurences\n    for (var _i = 0; _i < trip_locations.length - 1; _i++) {\n      if (trip_locations[_i] + 1 === trip_locations[_i + 1]) {\n        recurrent += 1;\n      }\n    }\n    if (recurrent === 2) {\n      return false;\n    }\n  }\n  return algorithms.iso7064Check(tin);\n}\n\n/*\n * dk-DK validation function\n * (CPR-nummer (personnummer), persons only)\n * Checks if birth date (first six digits) is valid and assigned to century (seventh) digit,\n * and calculates check (last) digit\n */\nfunction dkDkCheck(tin) {\n  tin = tin.replace(/\\W/, '');\n\n  // Extract year, check if valid for given century digit and add century\n  var year = parseInt(tin.slice(4, 6), 10);\n  var century_digit = tin.slice(6, 7);\n  switch (century_digit) {\n    case '0':\n    case '1':\n    case '2':\n    case '3':\n      year = \"19\".concat(year);\n      break;\n    case '4':\n    case '9':\n      if (year < 37) {\n        year = \"20\".concat(year);\n      } else {\n        year = \"19\".concat(year);\n      }\n      break;\n    default:\n      if (year < 37) {\n        year = \"20\".concat(year);\n      } else if (year > 58) {\n        year = \"18\".concat(year);\n      } else {\n        return false;\n      }\n      break;\n  }\n  // Add missing zero if needed\n  if (year.length === 3) {\n    year = [year.slice(0, 2), '0', year.slice(2)].join('');\n  }\n  // Check date validity\n  var date = \"\".concat(year, \"/\").concat(tin.slice(2, 4), \"/\").concat(tin.slice(0, 2));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // Split digits into an array for further processing\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n  var checksum = 0;\n  var weight = 4;\n  // Multiply by weight and add to checksum\n  for (var i = 0; i < 9; i++) {\n    checksum += digits[i] * weight;\n    weight -= 1;\n    if (weight === 1) {\n      weight = 7;\n    }\n  }\n  checksum %= 11;\n  if (checksum === 1) {\n    return false;\n  }\n  return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum;\n}\n\n/*\n * el-CY validation function\n * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons only)\n * Verify TIN validity by calculating ASCII value of check (last) character\n */\nfunction elCyCheck(tin) {\n  // split digits into an array for further processing\n  var digits = tin.slice(0, 8).split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n  var checksum = 0;\n  // add digits in even places\n  for (var i = 1; i < digits.length; i += 2) {\n    checksum += digits[i];\n  }\n\n  // add digits in odd places\n  for (var _i2 = 0; _i2 < digits.length; _i2 += 2) {\n    if (digits[_i2] < 2) {\n      checksum += 1 - digits[_i2];\n    } else {\n      checksum += 2 * (digits[_i2] - 2) + 5;\n      if (digits[_i2] > 4) {\n        checksum += 2;\n      }\n    }\n  }\n  return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8);\n}\n\n/*\n * el-GR validation function\n * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons/entities)\n * Verify TIN validity by calculating check (last) digit\n * Algorithm not in DG TAXUD document- sourced from:\n * - `http://epixeirisi.gr/%CE%9A%CE%A1%CE%99%CE%A3%CE%99%CE%9C%CE%91-%CE%98%CE%95%CE%9C%CE%91%CE%A4%CE%91-%CE%A6%CE%9F%CE%A1%CE%9F%CE%9B%CE%9F%CE%93%CE%99%CE%91%CE%A3-%CE%9A%CE%91%CE%99-%CE%9B%CE%9F%CE%93%CE%99%CE%A3%CE%A4%CE%99%CE%9A%CE%97%CE%A3/23791/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82-%CE%A6%CE%BF%CF%81%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CE%BA%CE%BF%CF%8D-%CE%9C%CE%B7%CF%84%CF%81%CF%8E%CE%BF%CF%85`\n */\nfunction elGrCheck(tin) {\n  // split digits into an array for further processing\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n  var checksum = 0;\n  for (var i = 0; i < 8; i++) {\n    checksum += digits[i] * Math.pow(2, 8 - i);\n  }\n  return checksum % 11 % 10 === digits[8];\n}\n\n/*\n * en-GB validation function (should go here if needed)\n * (National Insurance Number (NINO) or Unique Taxpayer Reference (UTR),\n * persons/entities respectively)\n */\n\n/*\n * en-IE validation function\n * (Personal Public Service Number (PPS No), persons only)\n * Verify TIN validity by calculating check (second to last) character\n */\nfunction enIeCheck(tin) {\n  var checksum = algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) {\n    return parseInt(a, 10);\n  }), 8);\n  if (tin.length === 9 && tin[8] !== 'W') {\n    checksum += (tin[8].charCodeAt(0) - 64) * 9;\n  }\n  checksum %= 23;\n  if (checksum === 0) {\n    return tin[7].toUpperCase() === 'W';\n  }\n  return tin[7].toUpperCase() === String.fromCharCode(64 + checksum);\n}\n\n// Valid US IRS campus prefixes\nvar enUsCampusPrefix = {\n  andover: ['10', '12'],\n  atlanta: ['60', '67'],\n  austin: ['50', '53'],\n  brookhaven: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'],\n  cincinnati: ['30', '32', '35', '36', '37', '38', '61'],\n  fresno: ['15', '24'],\n  internet: ['20', '26', '27', '45', '46', '47'],\n  kansas: ['40', '44'],\n  memphis: ['94', '95'],\n  ogden: ['80', '90'],\n  philadelphia: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'],\n  sba: ['31']\n};\n\n// Return an array of all US IRS campus prefixes\nfunction enUsGetPrefixes() {\n  var prefixes = [];\n  for (var location in enUsCampusPrefix) {\n    // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n    // istanbul ignore else\n    if (enUsCampusPrefix.hasOwnProperty(location)) {\n      prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location]));\n    }\n  }\n  return prefixes;\n}\n\n/*\n * en-US validation function\n * Verify that the TIN starts with a valid IRS campus prefix\n */\nfunction enUsCheck(tin) {\n  return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1;\n}\n\n/*\n * es-AR validation function\n * Clave Única de Identificación Tributaria (CUIT/CUIL)\n * Sourced from:\n * - https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id_nivel1=3036&id_nivel2=3040&p=Conceptos%20b%C3%A1sicos\n * - https://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria\n */\n\nfunction esArCheck(tin) {\n  var accum = 0;\n  var digits = tin.split('');\n  var digit = parseInt(digits.pop(), 10);\n  for (var i = 0; i < digits.length; i++) {\n    accum += digits[9 - i] * (2 + i % 6);\n  }\n  var verif = 11 - accum % 11;\n  if (verif === 11) {\n    verif = 0;\n  } else if (verif === 10) {\n    verif = 9;\n  }\n  return digit === verif;\n}\n\n/*\n * es-ES validation function\n * (Documento Nacional de Identidad (DNI)\n * or Número de Identificación de Extranjero (NIE), persons only)\n * Verify TIN validity by calculating check (last) character\n */\nfunction esEsCheck(tin) {\n  // Split characters into an array for further processing\n  var chars = tin.toUpperCase().split('');\n\n  // Replace initial letter if needed\n  if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) {\n    var lead_replace = 0;\n    switch (chars[0]) {\n      case 'Y':\n        lead_replace = 1;\n        break;\n      case 'Z':\n        lead_replace = 2;\n        break;\n      default:\n    }\n    chars.splice(0, 1, lead_replace);\n    // Fill with zeros if smaller than proper\n  } else {\n    while (chars.length < 9) {\n      chars.unshift(0);\n    }\n  }\n\n  // Calculate checksum and check according to lookup\n  var lookup = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E'];\n  chars = chars.join('');\n  var checksum = parseInt(chars.slice(0, 8), 10) % 23;\n  return chars[8] === lookup[checksum];\n}\n\n/*\n * et-EE validation function\n * (Isikukood (IK), persons only)\n * Checks if birth date (century digit and six following) is valid and calculates check (last) digit\n * Material not in DG TAXUD document sourced from:\n * - `https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Estonia-TIN.pdf`\n */\nfunction etEeCheck(tin) {\n  // Extract year and add century\n  var full_year = tin.slice(1, 3);\n  var century_digit = tin.slice(0, 1);\n  switch (century_digit) {\n    case '1':\n    case '2':\n      full_year = \"18\".concat(full_year);\n      break;\n    case '3':\n    case '4':\n      full_year = \"19\".concat(full_year);\n      break;\n    default:\n      full_year = \"20\".concat(full_year);\n      break;\n  }\n  // Check date validity\n  var date = \"\".concat(full_year, \"/\").concat(tin.slice(3, 5), \"/\").concat(tin.slice(5, 7));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // Split digits into an array for further processing\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n  var checksum = 0;\n  var weight = 1;\n  // Multiply by weight and add to checksum\n  for (var i = 0; i < 10; i++) {\n    checksum += digits[i] * weight;\n    weight += 1;\n    if (weight === 10) {\n      weight = 1;\n    }\n  }\n  // Do again if modulo 11 of checksum is 10\n  if (checksum % 11 === 10) {\n    checksum = 0;\n    weight = 3;\n    for (var _i3 = 0; _i3 < 10; _i3++) {\n      checksum += digits[_i3] * weight;\n      weight += 1;\n      if (weight === 10) {\n        weight = 1;\n      }\n    }\n    if (checksum % 11 === 10) {\n      return digits[10] === 0;\n    }\n  }\n  return checksum % 11 === digits[10];\n}\n\n/*\n * fi-FI validation function\n * (Henkilötunnus (HETU), persons only)\n * Checks if birth date (first six digits plus century symbol) is valid\n * and calculates check (last) digit\n */\nfunction fiFiCheck(tin) {\n  // Extract year and add century\n  var full_year = tin.slice(4, 6);\n  var century_symbol = tin.slice(6, 7);\n  switch (century_symbol) {\n    case '+':\n      full_year = \"18\".concat(full_year);\n      break;\n    case '-':\n      full_year = \"19\".concat(full_year);\n      break;\n    default:\n      full_year = \"20\".concat(full_year);\n      break;\n  }\n  // Check date validity\n  var date = \"\".concat(full_year, \"/\").concat(tin.slice(2, 4), \"/\").concat(tin.slice(0, 2));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // Calculate check character\n  var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31;\n  if (checksum < 10) {\n    return checksum === parseInt(tin.slice(10), 10);\n  }\n  checksum -= 10;\n  var letters_lookup = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y'];\n  return letters_lookup[checksum] === tin.slice(10);\n}\n\n/*\n * fr/nl-BE validation function\n * (Numéro national (N.N.), persons only)\n * Checks if birth date (first six digits) is valid and calculates check (last two) digits\n */\nfunction frBeCheck(tin) {\n  // Zero month/day value is acceptable\n  if (tin.slice(2, 4) !== '00' || tin.slice(4, 6) !== '00') {\n    // Extract date from first six digits of TIN\n    var date = \"\".concat(tin.slice(0, 2), \"/\").concat(tin.slice(2, 4), \"/\").concat(tin.slice(4, 6));\n    if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n      return false;\n    }\n  }\n  var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97;\n  var checkdigits = parseInt(tin.slice(9, 11), 10);\n  if (checksum !== checkdigits) {\n    checksum = 97 - parseInt(\"2\".concat(tin.slice(0, 9)), 10) % 97;\n    if (checksum !== checkdigits) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/*\n * fr-FR validation function\n * (Numéro fiscal de référence (numéro SPI), persons only)\n * Verify TIN validity by calculating check (last three) digits\n */\nfunction frFrCheck(tin) {\n  tin = tin.replace(/\\s/g, '');\n  var checksum = parseInt(tin.slice(0, 10), 10) % 511;\n  var checkdigits = parseInt(tin.slice(10, 13), 10);\n  return checksum === checkdigits;\n}\n\n/*\n * fr/lb-LU validation function\n * (numéro d’identification personnelle, persons only)\n * Verify birth date validity and run Luhn and Verhoeff checks\n */\nfunction frLuCheck(tin) {\n  // Extract date and check validity\n  var date = \"\".concat(tin.slice(0, 4), \"/\").concat(tin.slice(4, 6), \"/\").concat(tin.slice(6, 8));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // Run Luhn check\n  if (!algorithms.luhnCheck(tin.slice(0, 12))) {\n    return false;\n  }\n  // Remove Luhn check digit and run Verhoeff check\n  return algorithms.verhoeffCheck(\"\".concat(tin.slice(0, 11)).concat(tin[12]));\n}\n\n/*\n * hr-HR validation function\n * (Osobni identifikacijski broj (OIB), persons/entities)\n * Verify TIN validity by calling iso7064Check(digits)\n */\nfunction hrHrCheck(tin) {\n  return algorithms.iso7064Check(tin);\n}\n\n/*\n * hu-HU validation function\n * (Adóazonosító jel, persons only)\n * Verify TIN validity by calculating check (last) digit\n */\nfunction huHuCheck(tin) {\n  // split digits into an array for further processing\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n  var checksum = 8;\n  for (var i = 1; i < 9; i++) {\n    checksum += digits[i] * (i + 1);\n  }\n  return checksum % 11 === digits[9];\n}\n\n/*\n * lt-LT validation function (should go here if needed)\n * (Asmens kodas, persons/entities respectively)\n * Current validation check is alias of etEeCheck- same format applies\n */\n\n/*\n * it-IT first/last name validity check\n * Accepts it-IT TIN-encoded names as a three-element character array and checks their validity\n * Due to lack of clarity between resources (\"Are only Italian consonants used?\n * What happens if a person has X in their name?\" etc.) only two test conditions\n * have been implemented:\n * Vowels may only be followed by other vowels or an X character\n * and X characters after vowels may only be followed by other X characters.\n */\nfunction itItNameCheck(name) {\n  // true at the first occurence of a vowel\n  var vowelflag = false;\n\n  // true at the first occurence of an X AFTER vowel\n  // (to properly handle last names with X as consonant)\n  var xflag = false;\n  for (var i = 0; i < 3; i++) {\n    if (!vowelflag && /[AEIOU]/.test(name[i])) {\n      vowelflag = true;\n    } else if (!xflag && vowelflag && name[i] === 'X') {\n      xflag = true;\n    } else if (i > 0) {\n      if (vowelflag && !xflag) {\n        if (!/[AEIOU]/.test(name[i])) {\n          return false;\n        }\n      }\n      if (xflag) {\n        if (!/X/.test(name[i])) {\n          return false;\n        }\n      }\n    }\n  }\n  return true;\n}\n\n/*\n * it-IT validation function\n * (Codice fiscale (TIN-IT), persons only)\n * Verify name, birth date and codice catastale validity\n * and calculate check character.\n * Material not in DG-TAXUD document sourced from:\n * `https://en.wikipedia.org/wiki/Italian_fiscal_code`\n */\nfunction itItCheck(tin) {\n  // Capitalize and split characters into an array for further processing\n  var chars = tin.toUpperCase().split('');\n\n  // Check first and last name validity calling itItNameCheck()\n  if (!itItNameCheck(chars.slice(0, 3))) {\n    return false;\n  }\n  if (!itItNameCheck(chars.slice(3, 6))) {\n    return false;\n  }\n\n  // Convert letters in number spaces back to numbers if any\n  var number_locations = [6, 7, 9, 10, 12, 13, 14];\n  var number_replace = {\n    L: '0',\n    M: '1',\n    N: '2',\n    P: '3',\n    Q: '4',\n    R: '5',\n    S: '6',\n    T: '7',\n    U: '8',\n    V: '9'\n  };\n  for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) {\n    var i = _number_locations[_i4];\n    if (chars[i] in number_replace) {\n      chars.splice(i, 1, number_replace[chars[i]]);\n    }\n  }\n\n  // Extract month and day, and check date validity\n  var month_replace = {\n    A: '01',\n    B: '02',\n    C: '03',\n    D: '04',\n    E: '05',\n    H: '06',\n    L: '07',\n    M: '08',\n    P: '09',\n    R: '10',\n    S: '11',\n    T: '12'\n  };\n  var month = month_replace[chars[8]];\n  var day = parseInt(chars[9] + chars[10], 10);\n  if (day > 40) {\n    day -= 40;\n  }\n  if (day < 10) {\n    day = \"0\".concat(day);\n  }\n  var date = \"\".concat(chars[6]).concat(chars[7], \"/\").concat(month, \"/\").concat(day);\n  if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n    return false;\n  }\n\n  // Calculate check character by adding up even and odd characters as numbers\n  var checksum = 0;\n  for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) {\n    var char_to_int = parseInt(chars[_i5], 10);\n    if (isNaN(char_to_int)) {\n      char_to_int = chars[_i5].charCodeAt(0) - 65;\n    }\n    checksum += char_to_int;\n  }\n  var odd_convert = {\n    // Maps of characters at odd places\n    A: 1,\n    B: 0,\n    C: 5,\n    D: 7,\n    E: 9,\n    F: 13,\n    G: 15,\n    H: 17,\n    I: 19,\n    J: 21,\n    K: 2,\n    L: 4,\n    M: 18,\n    N: 20,\n    O: 11,\n    P: 3,\n    Q: 6,\n    R: 8,\n    S: 12,\n    T: 14,\n    U: 16,\n    V: 10,\n    W: 22,\n    X: 25,\n    Y: 24,\n    Z: 23,\n    0: 1,\n    1: 0\n  };\n  for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) {\n    var _char_to_int = 0;\n    if (chars[_i6] in odd_convert) {\n      _char_to_int = odd_convert[chars[_i6]];\n    } else {\n      var multiplier = parseInt(chars[_i6], 10);\n      _char_to_int = 2 * multiplier + 1;\n      if (multiplier > 4) {\n        _char_to_int += 2;\n      }\n    }\n    checksum += _char_to_int;\n  }\n  if (String.fromCharCode(65 + checksum % 26) !== chars[15]) {\n    return false;\n  }\n  return true;\n}\n\n/*\n * lv-LV validation function\n * (Personas kods (PK), persons only)\n * Check validity of birth date and calculate check (last) digit\n * Support only for old format numbers (not starting with '32', issued before 2017/07/01)\n * Material not in DG TAXUD document sourced from:\n * `https://boot.ritakafija.lv/forums/index.php?/topic/88314-personas-koda-algoritms-%C4%8Deksumma/`\n */\nfunction lvLvCheck(tin) {\n  tin = tin.replace(/\\W/, '');\n  // Extract date from TIN\n  var day = tin.slice(0, 2);\n  if (day !== '32') {\n    // No date/checksum check if new format\n    var month = tin.slice(2, 4);\n    if (month !== '00') {\n      // No date check if unknown month\n      var full_year = tin.slice(4, 6);\n      switch (tin[6]) {\n        case '0':\n          full_year = \"18\".concat(full_year);\n          break;\n        case '1':\n          full_year = \"19\".concat(full_year);\n          break;\n        default:\n          full_year = \"20\".concat(full_year);\n          break;\n      }\n      // Check date validity\n      var date = \"\".concat(full_year, \"/\").concat(tin.slice(2, 4), \"/\").concat(day);\n      if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n        return false;\n      }\n    }\n\n    // Calculate check digit\n    var checksum = 1101;\n    var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2];\n    for (var i = 0; i < tin.length - 1; i++) {\n      checksum -= parseInt(tin[i], 10) * multip_lookup[i];\n    }\n    return parseInt(tin[10], 10) === checksum % 11;\n  }\n  return true;\n}\n\n/*\n * mt-MT validation function\n * (Identity Card Number or Unique Taxpayer Reference, persons/entities)\n * Verify Identity Card Number structure (no other tests found)\n */\nfunction mtMtCheck(tin) {\n  if (tin.length !== 9) {\n    // No tests for UTR\n    var chars = tin.toUpperCase().split('');\n    // Fill with zeros if smaller than proper\n    while (chars.length < 8) {\n      chars.unshift(0);\n    }\n    // Validate format according to last character\n    switch (tin[7]) {\n      case 'A':\n      case 'P':\n        if (parseInt(chars[6], 10) === 0) {\n          return false;\n        }\n        break;\n      default:\n        {\n          var first_part = parseInt(chars.join('').slice(0, 5), 10);\n          if (first_part > 32000) {\n            return false;\n          }\n          var second_part = parseInt(chars.join('').slice(5, 7), 10);\n          if (first_part === second_part) {\n            return false;\n          }\n        }\n    }\n  }\n  return true;\n}\n\n/*\n * nl-NL validation function\n * (Burgerservicenummer (BSN) or Rechtspersonen Samenwerkingsverbanden Informatie Nummer (RSIN),\n * persons/entities respectively)\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction nlNlCheck(tin) {\n  return algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) {\n    return parseInt(a, 10);\n  }), 9) % 11 === parseInt(tin[8], 10);\n}\n\n/*\n * pl-PL validation function\n * (Powszechny Elektroniczny System Ewidencji Ludności (PESEL)\n * or Numer identyfikacji podatkowej (NIP), persons/entities)\n * Verify TIN validity by validating birth date (PESEL) and calculating check (last) digit\n */\nfunction plPlCheck(tin) {\n  // NIP\n  if (tin.length === 10) {\n    // Calculate last digit by multiplying with lookup\n    var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7];\n    var _checksum = 0;\n    for (var i = 0; i < lookup.length; i++) {\n      _checksum += parseInt(tin[i], 10) * lookup[i];\n    }\n    _checksum %= 11;\n    if (_checksum === 10) {\n      return false;\n    }\n    return _checksum === parseInt(tin[9], 10);\n  }\n\n  // PESEL\n  // Extract full year using month\n  var full_year = tin.slice(0, 2);\n  var month = parseInt(tin.slice(2, 4), 10);\n  if (month > 80) {\n    full_year = \"18\".concat(full_year);\n    month -= 80;\n  } else if (month > 60) {\n    full_year = \"22\".concat(full_year);\n    month -= 60;\n  } else if (month > 40) {\n    full_year = \"21\".concat(full_year);\n    month -= 40;\n  } else if (month > 20) {\n    full_year = \"20\".concat(full_year);\n    month -= 20;\n  } else {\n    full_year = \"19\".concat(full_year);\n  }\n  // Add leading zero to month if needed\n  if (month < 10) {\n    month = \"0\".concat(month);\n  }\n  // Check date validity\n  var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n  if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n\n  // Calculate last digit by mulitplying with odd one-digit numbers except 5\n  var checksum = 0;\n  var multiplier = 1;\n  for (var _i7 = 0; _i7 < tin.length - 1; _i7++) {\n    checksum += parseInt(tin[_i7], 10) * multiplier % 10;\n    multiplier += 2;\n    if (multiplier > 10) {\n      multiplier = 1;\n    } else if (multiplier === 5) {\n      multiplier += 2;\n    }\n  }\n  checksum = 10 - checksum % 10;\n  return checksum === parseInt(tin[10], 10);\n}\n\n/*\n* pt-BR validation function\n* (Cadastro de Pessoas Físicas (CPF, persons)\n* Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities)\n* Both inputs will be validated\n*/\n\nfunction ptBrCheck(tin) {\n  if (tin.length === 11) {\n    var _sum;\n    var remainder;\n    _sum = 0;\n    if (\n    // Reject known invalid CPFs\n    tin === '11111111111' || tin === '22222222222' || tin === '33333333333' || tin === '44444444444' || tin === '55555555555' || tin === '66666666666' || tin === '77777777777' || tin === '88888888888' || tin === '99999999999' || tin === '00000000000') return false;\n    for (var i = 1; i <= 9; i++) _sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i);\n    remainder = _sum * 10 % 11;\n    if (remainder === 10) remainder = 0;\n    if (remainder !== parseInt(tin.substring(9, 10), 10)) return false;\n    _sum = 0;\n    for (var _i8 = 1; _i8 <= 10; _i8++) _sum += parseInt(tin.substring(_i8 - 1, _i8), 10) * (12 - _i8);\n    remainder = _sum * 10 % 11;\n    if (remainder === 10) remainder = 0;\n    if (remainder !== parseInt(tin.substring(10, 11), 10)) return false;\n    return true;\n  }\n  if (\n  // Reject know invalid CNPJs\n  tin === '00000000000000' || tin === '11111111111111' || tin === '22222222222222' || tin === '33333333333333' || tin === '44444444444444' || tin === '55555555555555' || tin === '66666666666666' || tin === '77777777777777' || tin === '88888888888888' || tin === '99999999999999') {\n    return false;\n  }\n  var length = tin.length - 2;\n  var identifiers = tin.substring(0, length);\n  var verificators = tin.substring(length);\n  var sum = 0;\n  var pos = length - 7;\n  for (var _i9 = length; _i9 >= 1; _i9--) {\n    sum += identifiers.charAt(length - _i9) * pos;\n    pos -= 1;\n    if (pos < 2) {\n      pos = 9;\n    }\n  }\n  var result = sum % 11 < 2 ? 0 : 11 - sum % 11;\n  if (result !== parseInt(verificators.charAt(0), 10)) {\n    return false;\n  }\n  length += 1;\n  identifiers = tin.substring(0, length);\n  sum = 0;\n  pos = length - 7;\n  for (var _i10 = length; _i10 >= 1; _i10--) {\n    sum += identifiers.charAt(length - _i10) * pos;\n    pos -= 1;\n    if (pos < 2) {\n      pos = 9;\n    }\n  }\n  result = sum % 11 < 2 ? 0 : 11 - sum % 11;\n  if (result !== parseInt(verificators.charAt(1), 10)) {\n    return false;\n  }\n  return true;\n}\n\n/*\n * pt-PT validation function\n * (Número de identificação fiscal (NIF), persons/entities)\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction ptPtCheck(tin) {\n  var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) {\n    return parseInt(a, 10);\n  }), 9) % 11;\n  if (checksum > 9) {\n    return parseInt(tin[8], 10) === 0;\n  }\n  return checksum === parseInt(tin[8], 10);\n}\n\n/*\n * ro-RO validation function\n * (Cod Numeric Personal (CNP) or Cod de înregistrare fiscală (CIF),\n * persons only)\n * Verify CNP validity by calculating check (last) digit (test not found for CIF)\n * Material not in DG TAXUD document sourced from:\n * `https://en.wikipedia.org/wiki/National_identification_number#Romania`\n */\nfunction roRoCheck(tin) {\n  if (tin.slice(0, 4) !== '9000') {\n    // No test found for this format\n    // Extract full year using century digit if possible\n    var full_year = tin.slice(1, 3);\n    switch (tin[0]) {\n      case '1':\n      case '2':\n        full_year = \"19\".concat(full_year);\n        break;\n      case '3':\n      case '4':\n        full_year = \"18\".concat(full_year);\n        break;\n      case '5':\n      case '6':\n        full_year = \"20\".concat(full_year);\n        break;\n      default:\n    }\n\n    // Check date validity\n    var date = \"\".concat(full_year, \"/\").concat(tin.slice(3, 5), \"/\").concat(tin.slice(5, 7));\n    if (date.length === 8) {\n      if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n        return false;\n      }\n    } else if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n      return false;\n    }\n\n    // Calculate check digit\n    var digits = tin.split('').map(function (a) {\n      return parseInt(a, 10);\n    });\n    var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9];\n    var checksum = 0;\n    for (var i = 0; i < multipliers.length; i++) {\n      checksum += digits[i] * multipliers[i];\n    }\n    if (checksum % 11 === 10) {\n      return digits[12] === 1;\n    }\n    return digits[12] === checksum % 11;\n  }\n  return true;\n}\n\n/*\n * sk-SK validation function\n * (Rodné číslo (RČ) or bezvýznamové identifikačné číslo (BIČ), persons only)\n * Checks validity of pre-1954 birth numbers (rodné číslo) only\n * Due to the introduction of the pseudo-random BIČ it is not possible to test\n * post-1954 birth numbers without knowing whether they are BIČ or RČ beforehand\n */\nfunction skSkCheck(tin) {\n  if (tin.length === 9) {\n    tin = tin.replace(/\\W/, '');\n    if (tin.slice(6) === '000') {\n      return false;\n    } // Three-zero serial not assigned before 1954\n\n    // Extract full year from TIN length\n    var full_year = parseInt(tin.slice(0, 2), 10);\n    if (full_year > 53) {\n      return false;\n    }\n    if (full_year < 10) {\n      full_year = \"190\".concat(full_year);\n    } else {\n      full_year = \"19\".concat(full_year);\n    }\n\n    // Extract month from TIN and normalize\n    var month = parseInt(tin.slice(2, 4), 10);\n    if (month > 50) {\n      month -= 50;\n    }\n    if (month < 10) {\n      month = \"0\".concat(month);\n    }\n\n    // Check date validity\n    var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n    if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/*\n * sl-SI validation function\n * (Davčna številka, persons/entities)\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction slSiCheck(tin) {\n  var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) {\n    return parseInt(a, 10);\n  }), 8) % 11;\n  if (checksum === 10) {\n    return parseInt(tin[7], 10) === 0;\n  }\n  return checksum === parseInt(tin[7], 10);\n}\n\n/*\n * sv-SE validation function\n * (Personnummer or samordningsnummer, persons only)\n * Checks validity of birth date and calls luhnCheck() to validate check (last) digit\n */\nfunction svSeCheck(tin) {\n  // Make copy of TIN and normalize to two-digit year form\n  var tin_copy = tin.slice(0);\n  if (tin.length > 11) {\n    tin_copy = tin_copy.slice(2);\n  }\n\n  // Extract date of birth\n  var full_year = '';\n  var month = tin_copy.slice(2, 4);\n  var day = parseInt(tin_copy.slice(4, 6), 10);\n  if (tin.length > 11) {\n    full_year = tin.slice(0, 4);\n  } else {\n    full_year = tin.slice(0, 2);\n    if (tin.length === 11 && day < 60) {\n      // Extract full year from centenarian symbol\n      // Should work just fine until year 10000 or so\n      var current_year = new Date().getFullYear().toString();\n      var current_century = parseInt(current_year.slice(0, 2), 10);\n      current_year = parseInt(current_year, 10);\n      if (tin[6] === '-') {\n        if (parseInt(\"\".concat(current_century).concat(full_year), 10) > current_year) {\n          full_year = \"\".concat(current_century - 1).concat(full_year);\n        } else {\n          full_year = \"\".concat(current_century).concat(full_year);\n        }\n      } else {\n        full_year = \"\".concat(current_century - 1).concat(full_year);\n        if (current_year - parseInt(full_year, 10) < 100) {\n          return false;\n        }\n      }\n    }\n  }\n\n  // Normalize day and check date validity\n  if (day > 60) {\n    day -= 60;\n  }\n  if (day < 10) {\n    day = \"0\".concat(day);\n  }\n  var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(day);\n  if (date.length === 8) {\n    if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n      return false;\n    }\n  } else if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n    return false;\n  }\n  return algorithms.luhnCheck(tin.replace(/\\W/, ''));\n}\n\n/**\n * uk-UA validation function\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction ukUaCheck(tin) {\n  // Calculate check digit\n  var digits = tin.split('').map(function (a) {\n    return parseInt(a, 10);\n  });\n  var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7];\n  var checksum = 0;\n  for (var i = 0; i < multipliers.length; i++) {\n    checksum += digits[i] * multipliers[i];\n  }\n  return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11;\n}\n\n// Locale lookup objects\n\n/*\n * Tax id regex formats for various locales\n *\n * Where not explicitly specified in DG-TAXUD document both\n * uppercase and lowercase letters are acceptable.\n */\nvar taxIdFormat = {\n  'bg-BG': /^\\d{10}$/,\n  'cs-CZ': /^\\d{6}\\/{0,1}\\d{3,4}$/,\n  'de-AT': /^\\d{9}$/,\n  'de-DE': /^[1-9]\\d{10}$/,\n  'dk-DK': /^\\d{6}-{0,1}\\d{4}$/,\n  'el-CY': /^[09]\\d{7}[A-Z]$/,\n  'el-GR': /^([0-4]|[7-9])\\d{8}$/,\n  'en-CA': /^\\d{9}$/,\n  'en-GB': /^\\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\\d{6}[ABCD ]$/i,\n  'en-IE': /^\\d{7}[A-W][A-IW]{0,1}$/i,\n  'en-US': /^\\d{2}[- ]{0,1}\\d{7}$/,\n  'es-AR': /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,\n  'es-ES': /^(\\d{0,8}|[XYZKLM]\\d{7})[A-HJ-NP-TV-Z]$/i,\n  'et-EE': /^[1-6]\\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\\d$/,\n  'fi-FI': /^\\d{6}[-+A]\\d{3}[0-9A-FHJ-NPR-Y]$/i,\n  'fr-BE': /^\\d{11}$/,\n  'fr-FR': /^[0-3]\\d{12}$|^[0-3]\\d\\s\\d{2}(\\s\\d{3}){3}$/,\n  // Conforms both to official spec and provided example\n  'fr-LU': /^\\d{13}$/,\n  'hr-HR': /^\\d{11}$/,\n  'hu-HU': /^8\\d{9}$/,\n  'it-IT': /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,\n  'lv-LV': /^\\d{6}-{0,1}\\d{5}$/,\n  // Conforms both to DG TAXUD spec and original research\n  'mt-MT': /^\\d{3,7}[APMGLHBZ]$|^([1-8])\\1\\d{7}$/i,\n  'nl-NL': /^\\d{9}$/,\n  'pl-PL': /^\\d{10,11}$/,\n  'pt-BR': /(?:^\\d{11}$)|(?:^\\d{14}$)/,\n  'pt-PT': /^\\d{9}$/,\n  'ro-RO': /^\\d{13}$/,\n  'sk-SK': /^\\d{6}\\/{0,1}\\d{3,4}$/,\n  'sl-SI': /^[1-9]\\d{7}$/,\n  'sv-SE': /^(\\d{6}[-+]{0,1}\\d{4}|(18|19|20)\\d{6}[-+]{0,1}\\d{4})$/,\n  'uk-UA': /^\\d{10}$/\n};\n// taxIdFormat locale aliases\ntaxIdFormat['lb-LU'] = taxIdFormat['fr-LU'];\ntaxIdFormat['lt-LT'] = taxIdFormat['et-EE'];\ntaxIdFormat['nl-BE'] = taxIdFormat['fr-BE'];\ntaxIdFormat['fr-CA'] = taxIdFormat['en-CA'];\n\n// Algorithmic tax id check functions for various locales\nvar taxIdCheck = {\n  'bg-BG': bgBgCheck,\n  'cs-CZ': csCzCheck,\n  'de-AT': deAtCheck,\n  'de-DE': deDeCheck,\n  'dk-DK': dkDkCheck,\n  'el-CY': elCyCheck,\n  'el-GR': elGrCheck,\n  'en-CA': isCanadianSIN,\n  'en-IE': enIeCheck,\n  'en-US': enUsCheck,\n  'es-AR': esArCheck,\n  'es-ES': esEsCheck,\n  'et-EE': etEeCheck,\n  'fi-FI': fiFiCheck,\n  'fr-BE': frBeCheck,\n  'fr-FR': frFrCheck,\n  'fr-LU': frLuCheck,\n  'hr-HR': hrHrCheck,\n  'hu-HU': huHuCheck,\n  'it-IT': itItCheck,\n  'lv-LV': lvLvCheck,\n  'mt-MT': mtMtCheck,\n  'nl-NL': nlNlCheck,\n  'pl-PL': plPlCheck,\n  'pt-BR': ptBrCheck,\n  'pt-PT': ptPtCheck,\n  'ro-RO': roRoCheck,\n  'sk-SK': skSkCheck,\n  'sl-SI': slSiCheck,\n  'sv-SE': svSeCheck,\n  'uk-UA': ukUaCheck\n};\n// taxIdCheck locale aliases\ntaxIdCheck['lb-LU'] = taxIdCheck['fr-LU'];\ntaxIdCheck['lt-LT'] = taxIdCheck['et-EE'];\ntaxIdCheck['nl-BE'] = taxIdCheck['fr-BE'];\ntaxIdCheck['fr-CA'] = taxIdCheck['en-CA'];\n\n// Regexes for locales where characters should be omitted before checking format\nvar allsymbols = /[-\\\\\\/!@#$%\\^&\\*\\(\\)\\+\\=\\[\\]]+/g;\nvar sanitizeRegexes = {\n  'de-AT': allsymbols,\n  'de-DE': /[\\/\\\\]/g,\n  'fr-BE': allsymbols\n};\n// sanitizeRegexes locale aliases\nsanitizeRegexes['nl-BE'] = sanitizeRegexes['fr-BE'];\n\n/*\n * Validator function\n * Return true if the passed string is a valid tax identification number\n * for the specified locale.\n * Throw an error exception if the locale is not supported.\n */\nfunction isTaxID(str) {\n  var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n  (0, _assertString.default)(str);\n  // Copy TIN to avoid replacement if sanitized\n  var strcopy = str.slice(0);\n  if (locale in taxIdFormat) {\n    if (locale in sanitizeRegexes) {\n      strcopy = strcopy.replace(sanitizeRegexes[locale], '');\n    }\n    if (!taxIdFormat[locale].test(strcopy)) {\n      return false;\n    }\n    if (locale in taxIdCheck) {\n      return taxIdCheck[locale](strcopy);\n    }\n    // Fallthrough; not all locales have algorithmic checks\n    return true;\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMobilePhone;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable max-len */\nvar phones = {\n  'am-AM': /^(\\+?374|0)(33|4[134]|55|77|88|9[13-689])\\d{6}$/,\n  'ar-AE': /^((\\+?971)|0)?5[024568]\\d{7}$/,\n  'ar-BH': /^(\\+?973)?(3|6)\\d{7}$/,\n  'ar-DZ': /^(\\+?213|0)(5|6|7)\\d{8}$/,\n  'ar-LB': /^(\\+?961)?((3|81)\\d{6}|7\\d{7})$/,\n  'ar-EG': /^((\\+?20)|0)?1[0125]\\d{8}$/,\n  'ar-IQ': /^(\\+?964|0)?7[0-9]\\d{8}$/,\n  'ar-JO': /^(\\+?962|0)?7[789]\\d{7}$/,\n  'ar-KW': /^(\\+?965)([569]\\d{7}|41\\d{6})$/,\n  'ar-LY': /^((\\+?218)|0)?(9[1-6]\\d{7}|[1-8]\\d{7,9})$/,\n  'ar-MA': /^(?:(?:\\+|00)212|0)[5-7]\\d{8}$/,\n  'ar-OM': /^((\\+|00)968)?(9[1-9])\\d{6}$/,\n  'ar-PS': /^(\\+?970|0)5[6|9](\\d{7})$/,\n  'ar-SA': /^(!?(\\+?966)|0)?5\\d{8}$/,\n  'ar-SD': /^((\\+?249)|0)?(9[012369]|1[012])\\d{7}$/,\n  'ar-SY': /^(!?(\\+?963)|0)?9\\d{8}$/,\n  'ar-TN': /^(\\+?216)?[2459]\\d{7}$/,\n  'az-AZ': /^(\\+994|0)(10|5[015]|7[07]|99)\\d{7}$/,\n  'bs-BA': /^((((\\+|00)3876)|06))((([0-3]|[5-6])\\d{6})|(4\\d{7}))$/,\n  'be-BY': /^(\\+?375)?(24|25|29|33|44)\\d{7}$/,\n  'bg-BG': /^(\\+?359|0)?8[789]\\d{7}$/,\n  'bn-BD': /^(\\+?880|0)1[13456789][0-9]{8}$/,\n  'ca-AD': /^(\\+376)?[346]\\d{5}$/,\n  'cs-CZ': /^(\\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n  'da-DK': /^(\\+?45)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n  'de-DE': /^((\\+49|0)1)(5[0-25-9]\\d|6([23]|0\\d?)|7([0-57-9]|6\\d))\\d{7,9}$/,\n  'de-AT': /^(\\+43|0)\\d{1,4}\\d{3,12}$/,\n  'de-CH': /^(\\+41|0)([1-9])\\d{1,9}$/,\n  'de-LU': /^(\\+352)?((6\\d1)\\d{6})$/,\n  'dv-MV': /^(\\+?960)?(7[2-9]|9[1-9])\\d{5}$/,\n  'el-GR': /^(\\+?30|0)?6(8[5-9]|9(?![26])[0-9])\\d{7}$/,\n  'el-CY': /^(\\+?357?)?(9(9|6)\\d{6})$/,\n  'en-AI': /^(\\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\\d{4}$/,\n  'en-AU': /^(\\+?61|0)4\\d{8}$/,\n  'en-AG': /^(?:\\+1|1)268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}$/,\n  'en-BM': /^(\\+?1)?441(((3|7)\\d{6}$)|(5[0-3][0-9]\\d{4}$)|(59\\d{5}$))/,\n  'en-BS': /^(\\+?1[-\\s]?|0)?\\(?242\\)?[-\\s]?\\d{3}[-\\s]?\\d{4}$/,\n  'en-GB': /^(\\+?44|0)7\\d{9}$/,\n  'en-GG': /^(\\+?44|0)1481\\d{6}$/,\n  'en-GH': /^(\\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\\d{7}$/,\n  'en-GY': /^(\\+592|0)6\\d{6}$/,\n  'en-HK': /^(\\+?852[-\\s]?)?[456789]\\d{3}[-\\s]?\\d{4}$/,\n  'en-MO': /^(\\+?853[-\\s]?)?[6]\\d{3}[-\\s]?\\d{4}$/,\n  'en-IE': /^(\\+?353|0)8[356789]\\d{7}$/,\n  'en-IN': /^(\\+?91|0)?[6789]\\d{9}$/,\n  'en-JM': /^(\\+?876)?\\d{7}$/,\n  'en-KE': /^(\\+?254|0)(7|1)\\d{8}$/,\n  'fr-CF': /^(\\+?236| ?)(70|75|77|72|21|22)\\d{6}$/,\n  'en-SS': /^(\\+?211|0)(9[1257])\\d{7}$/,\n  'en-KI': /^((\\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,\n  'en-KN': /^(?:\\+1|1)869(?:46\\d|48[89]|55[6-8]|66\\d|76[02-7])\\d{4}$/,\n  'en-LS': /^(\\+?266)(22|28|57|58|59|27|52)\\d{6}$/,\n  'en-MT': /^(\\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,\n  'en-MU': /^(\\+?230|0)?\\d{8}$/,\n  'en-MW': /^(\\+?265|0)(((77|88|31|99|98|21)\\d{7})|(((111)|1)\\d{6})|(32000\\d{4}))$/,\n  'en-NA': /^(\\+?264|0)(6|8)\\d{7}$/,\n  'en-NG': /^(\\+?234|0)?[789]\\d{9}$/,\n  'en-NZ': /^(\\+?64|0)[28]\\d{7,9}$/,\n  'en-PG': /^(\\+?675|0)?(7\\d|8[18])\\d{6}$/,\n  'en-PK': /^((00|\\+)?92|0)3[0-6]\\d{8}$/,\n  'en-PH': /^(09|\\+639)\\d{9}$/,\n  'en-RW': /^(\\+?250|0)?[7]\\d{8}$/,\n  'en-SG': /^(\\+65)?[3689]\\d{7}$/,\n  'en-SL': /^(\\+?232|0)\\d{8}$/,\n  'en-TZ': /^(\\+?255|0)?[67]\\d{8}$/,\n  'en-UG': /^(\\+?256|0)?[7]\\d{8}$/,\n  'en-US': /^((\\+1|1)?( |-)?)?(\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,\n  'en-ZA': /^(\\+?27|0)\\d{9}$/,\n  'en-ZM': /^(\\+?26)?09[567]\\d{7}$/,\n  'en-ZW': /^(\\+263)[0-9]{9}$/,\n  'en-BW': /^(\\+?267)?(7[1-8]{1})\\d{6}$/,\n  'es-AR': /^\\+?549(11|[2368]\\d)\\d{8}$/,\n  'es-BO': /^(\\+?591)?(6|7)\\d{7}$/,\n  'es-CO': /^(\\+?57)?3(0(0|1|2|4|5)|1\\d|2[0-4]|5(0|1))\\d{7}$/,\n  'es-CL': /^(\\+?56|0)[2-9]\\d{1}\\d{7}$/,\n  'es-CR': /^(\\+506)?[2-8]\\d{7}$/,\n  'es-CU': /^(\\+53|0053)?5\\d{7}$/,\n  'es-DO': /^(\\+?1)?8[024]9\\d{7}$/,\n  'es-HN': /^(\\+?504)?[9|8|3|2]\\d{7}$/,\n  'es-EC': /^(\\+?593|0)([2-7]|9[2-9])\\d{7}$/,\n  'es-ES': /^(\\+?34)?[6|7]\\d{8}$/,\n  'es-PE': /^(\\+?51)?9\\d{8}$/,\n  'es-MX': /^(\\+?52)?(1|01)?\\d{10,11}$/,\n  'es-NI': /^(\\+?505)\\d{7,8}$/,\n  'es-PA': /^(\\+?507)\\d{7,8}$/,\n  'es-PY': /^(\\+?595|0)9[9876]\\d{7}$/,\n  'es-SV': /^(\\+?503)?[67]\\d{7}$/,\n  'es-UY': /^(\\+598|0)9[1-9][\\d]{6}$/,\n  'es-VE': /^(\\+?58)?(2|4)\\d{9}$/,\n  'et-EE': /^(\\+?372)?\\s?(5|8[1-4])\\s?([0-9]\\s?){6,7}$/,\n  'fa-IR': /^(\\+?98[\\-\\s]?|0)9[0-39]\\d[\\-\\s]?\\d{3}[\\-\\s]?\\d{4}$/,\n  'fi-FI': /^(\\+?358|0)\\s?(4[0-6]|50)\\s?(\\d\\s?){4,8}$/,\n  'fj-FJ': /^(\\+?679)?\\s?\\d{3}\\s?\\d{4}$/,\n  'fo-FO': /^(\\+?298)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n  'fr-BF': /^(\\+226|0)[67]\\d{7}$/,\n  'fr-BJ': /^(\\+229)\\d{8}$/,\n  'fr-CD': /^(\\+?243|0)?(8|9)\\d{8}$/,\n  'fr-CM': /^(\\+?237)6[0-9]{8}$/,\n  'fr-FR': /^(\\+?33|0)[67]\\d{8}$/,\n  'fr-GF': /^(\\+?594|0|00594)[67]\\d{8}$/,\n  'fr-GP': /^(\\+?590|0|00590)[67]\\d{8}$/,\n  'fr-MQ': /^(\\+?596|0|00596)[67]\\d{8}$/,\n  'fr-PF': /^(\\+?689)?8[789]\\d{6}$/,\n  'fr-RE': /^(\\+?262|0|00262)[67]\\d{8}$/,\n  'fr-WF': /^(\\+681)?\\d{6}$/,\n  'he-IL': /^(\\+972|0)([23489]|5[012345689]|77)[1-9]\\d{6}$/,\n  'hu-HU': /^(\\+?36|06)(20|30|31|50|70)\\d{7}$/,\n  'id-ID': /^(\\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\\s?|\\d]{5,11})$/,\n  'ir-IR': /^(\\+98|0)?9\\d{9}$/,\n  'it-IT': /^(\\+?39)?\\s?3\\d{2} ?\\d{6,7}$/,\n  'it-SM': /^((\\+378)|(0549)|(\\+390549)|(\\+3780549))?6\\d{5,9}$/,\n  'ja-JP': /^(\\+81[ \\-]?(\\(0\\))?|0)[6789]0[ \\-]?\\d{4}[ \\-]?\\d{4}$/,\n  'ka-GE': /^(\\+?995)?(79\\d{7}|5\\d{8})$/,\n  'kk-KZ': /^(\\+?7|8)?7\\d{9}$/,\n  'kl-GL': /^(\\+?299)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n  'ko-KR': /^((\\+?82)[ \\-]?)?0?1([0|1|6|7|8|9]{1})[ \\-]?\\d{3,4}[ \\-]?\\d{4}$/,\n  'ky-KG': /^(\\+?7\\s?\\+?7|0)\\s?\\d{2}\\s?\\d{3}\\s?\\d{4}$/,\n  'lt-LT': /^(\\+370|8)\\d{8}$/,\n  'lv-LV': /^(\\+?371)2\\d{7}$/,\n  'mg-MG': /^((\\+?261|0)(2|3)\\d)?\\d{7}$/,\n  'mn-MN': /^(\\+|00|011)?976(77|81|88|91|94|95|96|99)\\d{6}$/,\n  'my-MM': /^(\\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,\n  'ms-MY': /^(\\+?60|0)1(([0145](-|\\s)?\\d{7,8})|([236-9](-|\\s)?\\d{7}))$/,\n  'mz-MZ': /^(\\+?258)?8[234567]\\d{7}$/,\n  'nb-NO': /^(\\+?47)?[49]\\d{7}$/,\n  'ne-NP': /^(\\+?977)?9[78]\\d{8}$/,\n  'nl-BE': /^(\\+?32|0)4\\d{8}$/,\n  'nl-NL': /^(((\\+|00)?31\\(0\\))|((\\+|00)?31)|0)6{1}\\d{8}$/,\n  'nl-AW': /^(\\+)?297(56|59|64|73|74|99)\\d{5}$/,\n  'nn-NO': /^(\\+?47)?[49]\\d{7}$/,\n  'pl-PL': /^(\\+?48)? ?([5-8]\\d|45) ?\\d{3} ?\\d{2} ?\\d{2}$/,\n  'pt-BR': /^((\\+?55\\ ?[1-9]{2}\\ ?)|(\\+?55\\ ?\\([1-9]{2}\\)\\ ?)|(0[1-9]{2}\\ ?)|(\\([1-9]{2}\\)\\ ?)|([1-9]{2}\\ ?))((\\d{4}\\-?\\d{4})|(9[1-9]{1}\\d{3}\\-?\\d{4}))$/,\n  'pt-PT': /^(\\+?351)?9[1236]\\d{7}$/,\n  'pt-AO': /^(\\+244)\\d{9}$/,\n  'ro-MD': /^(\\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\\d{6}$/,\n  'ro-RO': /^(\\+?40|0)\\s?7\\d{2}(\\/|\\s|\\.|-)?\\d{3}(\\s|\\.|-)?\\d{3}$/,\n  'ru-RU': /^(\\+?7|8)?9\\d{9}$/,\n  'si-LK': /^(?:0|94|\\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\\d{7}$/,\n  'sl-SI': /^(\\+386\\s?|0)(\\d{1}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2}|\\d{2}\\s?\\d{3}\\s?\\d{3})$/,\n  'sk-SK': /^(\\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n  'so-SO': /^(\\+?252|0)((6[0-9])\\d{7}|(7[1-9])\\d{7})$/,\n  'sq-AL': /^(\\+355|0)6[789]\\d{6}$/,\n  'sr-RS': /^(\\+3816|06)[- \\d]{5,9}$/,\n  'sv-SE': /^(\\+?46|0)[\\s\\-]?7[\\s\\-]?[02369]([\\s\\-]?\\d){7}$/,\n  'tg-TJ': /^(\\+?992)?[5][5]\\d{7}$/,\n  'th-TH': /^(\\+66|66|0)\\d{9}$/,\n  'tr-TR': /^(\\+?90|0)?5\\d{9}$/,\n  'tk-TM': /^(\\+993|993|8)\\d{8}$/,\n  'uk-UA': /^(\\+?38|8)?0\\d{9}$/,\n  'uz-UZ': /^(\\+?998)?(6[125-79]|7[1-69]|88|9\\d)\\d{7}$/,\n  'vi-VN': /^((\\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,\n  'zh-CN': /^((\\+|00)86)?(1[3-9]|9[28])\\d{9}$/,\n  'zh-TW': /^(\\+?886\\-?|0)?9\\d{8}$/,\n  'dz-BT': /^(\\+?975|0)?(17|16|77|02)\\d{6}$/,\n  'ar-YE': /^(((\\+|00)9677|0?7)[0137]\\d{7}|((\\+|00)967|0)[1-7]\\d{6})$/,\n  'ar-EH': /^(\\+?212|0)[\\s\\-]?(5288|5289)[\\s\\-]?\\d{5}$/,\n  'fa-AF': /^(\\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\\d{7})$/\n};\n/* eslint-enable max-len */\n\n// aliases\nphones['en-CA'] = phones['en-US'];\nphones['fr-CA'] = phones['en-CA'];\nphones['fr-BE'] = phones['nl-BE'];\nphones['zh-HK'] = phones['en-HK'];\nphones['zh-MO'] = phones['en-MO'];\nphones['ga-IE'] = phones['en-IE'];\nphones['fr-CH'] = phones['de-CH'];\nphones['it-CH'] = phones['fr-CH'];\nfunction isMobilePhone(str, locale, options) {\n  (0, _assertString.default)(str);\n  if (options && options.strictMode && !str.startsWith('+')) {\n    return false;\n  }\n  if (Array.isArray(locale)) {\n    return locale.some(function (key) {\n      // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n      // istanbul ignore else\n      if (phones.hasOwnProperty(key)) {\n        var phone = phones[key];\n        if (phone.test(str)) {\n          return true;\n        }\n      }\n      return false;\n    });\n  } else if (locale in phones) {\n    return phones[locale].test(str);\n    // alias falsey locale as 'any'\n  } else if (!locale || locale === 'any') {\n    for (var key in phones) {\n      // istanbul ignore else\n      if (phones.hasOwnProperty(key)) {\n        var phone = phones[key];\n        if (phone.test(str)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nvar locales = exports.locales = Object.keys(phones);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isEthereumAddress;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar eth = /^(0x)[0-9a-f]{40}$/i;\nfunction isEthereumAddress(str) {\n  (0, _assertString.default)(str);\n  return eth.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isCurrency;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction currencyRegex(options) {\n  var decimal_digits = \"\\\\d{\".concat(options.digits_after_decimal[0], \"}\");\n  options.digits_after_decimal.forEach(function (digit, index) {\n    if (index !== 0) decimal_digits = \"\".concat(decimal_digits, \"|\\\\d{\").concat(digit, \"}\");\n  });\n  var symbol = \"(\".concat(options.symbol.replace(/\\W/, function (m) {\n      return \"\\\\\".concat(m);\n    }), \")\").concat(options.require_symbol ? '' : '?'),\n    negative = '-?',\n    whole_dollar_amount_without_sep = '[1-9]\\\\d*',\n    whole_dollar_amount_with_sep = \"[1-9]\\\\d{0,2}(\\\\\".concat(options.thousands_separator, \"\\\\d{3})*\"),\n    valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],\n    whole_dollar_amount = \"(\".concat(valid_whole_dollar_amounts.join('|'), \")?\"),\n    decimal_amount = \"(\\\\\".concat(options.decimal_separator, \"(\").concat(decimal_digits, \"))\").concat(options.require_decimal ? '' : '?');\n  var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : '');\n\n  // default is negative sign before symbol, but there are two other options (besides parens)\n  if (options.allow_negatives && !options.parens_for_negatives) {\n    if (options.negative_sign_after_digits) {\n      pattern += negative;\n    } else if (options.negative_sign_before_digits) {\n      pattern = negative + pattern;\n    }\n  }\n\n  // South African Rand, for example, uses R 123 (space) and R-123 (no space)\n  if (options.allow_negative_sign_placeholder) {\n    pattern = \"( (?!\\\\-))?\".concat(pattern);\n  } else if (options.allow_space_after_symbol) {\n    pattern = \" ?\".concat(pattern);\n  } else if (options.allow_space_after_digits) {\n    pattern += '( (?!$))?';\n  }\n  if (options.symbol_after_digits) {\n    pattern += symbol;\n  } else {\n    pattern = symbol + pattern;\n  }\n  if (options.allow_negatives) {\n    if (options.parens_for_negatives) {\n      pattern = \"(\\\\(\".concat(pattern, \"\\\\)|\").concat(pattern, \")\");\n    } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {\n      pattern = negative + pattern;\n    }\n  }\n\n  // ensure there's a dollar and/or decimal amount, and that\n  // it doesn't start with a space or a negative sign followed by a space\n  return new RegExp(\"^(?!-? )(?=.*\\\\d)\".concat(pattern, \"$\"));\n}\nvar default_currency_options = {\n  symbol: '$',\n  require_symbol: false,\n  allow_space_after_symbol: false,\n  symbol_after_digits: false,\n  allow_negatives: true,\n  parens_for_negatives: false,\n  negative_sign_before_digits: false,\n  negative_sign_after_digits: false,\n  allow_negative_sign_placeholder: false,\n  thousands_separator: ',',\n  decimal_separator: '.',\n  allow_decimal: true,\n  require_decimal: false,\n  digits_after_decimal: [2],\n  allow_space_after_digits: false\n};\nfunction isCurrency(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, default_currency_options);\n  return currencyRegex(options).test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBtcAddress;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar bech32 = /^(bc1)[a-z0-9]{25,39}$/;\nvar base58 = /^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;\nfunction isBtcAddress(str) {\n  (0, _assertString.default)(str);\n  return bech32.test(str) || base58.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.isFreightContainerID = void 0;\nexports.isISO6346 = isISO6346;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// https://en.wikipedia.org/wiki/ISO_6346\n// according to ISO6346 standard, checksum digit is mandatory for freight container but recommended\n// for other container types (J and Z)\nvar isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/;\nvar isDigit = /^[0-9]$/;\nfunction isISO6346(str) {\n  (0, _assertString.default)(str);\n  str = str.toUpperCase();\n  if (!isISO6346Str.test(str)) return false;\n  if (str.length === 11) {\n    var sum = 0;\n    for (var i = 0; i < str.length - 1; i++) {\n      if (!isDigit.test(str[i])) {\n        var convertedCode = void 0;\n        var letterCode = str.charCodeAt(i) - 55;\n        if (letterCode < 11) convertedCode = letterCode;else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + letterCode % 11;else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + letterCode % 21;else convertedCode = 34 + letterCode % 31;\n        sum += convertedCode * Math.pow(2, i);\n      } else sum += str[i] * Math.pow(2, i);\n    }\n    var checkSumDigit = sum % 11;\n    return Number(str[str.length - 1]) === checkSumDigit;\n  }\n  return true;\n}\nvar isFreightContainerID = exports.isFreightContainerID = isISO6346;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISO6391;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar isISO6391Set = new Set(['aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu', 'ja', 'jv', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu']);\nfunction isISO6391(str) {\n  (0, _assertString.default)(str);\n  return isISO6391Set.has(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISO8601;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable max-len */\n// from http://goo.gl/0ejHHW\nvar iso8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\n// same as above, except with a strict 'T' separator between date and time\nvar iso8601StrictSeparator = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\n/* eslint-enable max-len */\nvar isValidDate = function isValidDate(str) {\n  // str must have passed the ISO8601 check\n  // this check is meant to catch invalid dates\n  // like 2009-02-31\n  // first check for ordinal dates\n  var ordinalMatch = str.match(/^(\\d{4})-?(\\d{3})([ T]{1}\\.*|$)/);\n  if (ordinalMatch) {\n    var oYear = Number(ordinalMatch[1]);\n    var oDay = Number(ordinalMatch[2]);\n    // if is leap year\n    if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366;\n    return oDay <= 365;\n  }\n  var match = str.match(/(\\d{4})-?(\\d{0,2})-?(\\d*)/).map(Number);\n  var year = match[1];\n  var month = match[2];\n  var day = match[3];\n  var monthString = month ? \"0\".concat(month).slice(-2) : month;\n  var dayString = day ? \"0\".concat(day).slice(-2) : day;\n\n  // create a date object and compare\n  var d = new Date(\"\".concat(year, \"-\").concat(monthString || '01', \"-\").concat(dayString || '01'));\n  if (month && day) {\n    return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day;\n  }\n  return true;\n};\nfunction isISO8601(str) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  (0, _assertString.default)(str);\n  var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str);\n  if (check && options.strict) return isValidDate(str);\n  return check;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isRFC3339;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */\n\nvar dateFullYear = /[0-9]{4}/;\nvar dateMonth = /(0[1-9]|1[0-2])/;\nvar dateMDay = /([12]\\d|0[1-9]|3[01])/;\nvar timeHour = /([01][0-9]|2[0-3])/;\nvar timeMinute = /[0-5][0-9]/;\nvar timeSecond = /([0-5][0-9]|60)/;\nvar timeSecFrac = /(\\.[0-9]+)?/;\nvar timeNumOffset = new RegExp(\"[-+]\".concat(timeHour.source, \":\").concat(timeMinute.source));\nvar timeOffset = new RegExp(\"([zZ]|\".concat(timeNumOffset.source, \")\"));\nvar partialTime = new RegExp(\"\".concat(timeHour.source, \":\").concat(timeMinute.source, \":\").concat(timeSecond.source).concat(timeSecFrac.source));\nvar fullDate = new RegExp(\"\".concat(dateFullYear.source, \"-\").concat(dateMonth.source, \"-\").concat(dateMDay.source));\nvar fullTime = new RegExp(\"\".concat(partialTime.source).concat(timeOffset.source));\nvar rfc3339 = new RegExp(\"^\".concat(fullDate.source, \"[ tT]\").concat(fullTime.source, \"$\"));\nfunction isRFC3339(str) {\n  (0, _assertString.default)(str);\n  return rfc3339.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isISO31661Alpha3;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3\nvar validISO31661Alpha3CountriesCodes = new Set(['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']);\nfunction isISO31661Alpha3(str) {\n  (0, _assertString.default)(str);\n  return validISO31661Alpha3CountriesCodes.has(str.toUpperCase());\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.CurrencyCodes = void 0;\nexports.default = isISO4217;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// from https://en.wikipedia.org/wiki/ISO_4217\nvar validISO4217CurrencyCodes = new Set(['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLE', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX', 'YER', 'ZAR', 'ZMW', 'ZWL']);\nfunction isISO4217(str) {\n  (0, _assertString.default)(str);\n  return validISO4217CurrencyCodes.has(str.toUpperCase());\n}\nvar CurrencyCodes = exports.CurrencyCodes = validISO4217CurrencyCodes;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBase32;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar base32 = /^[A-Z2-7]+=*$/;\nvar crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/;\nvar defaultBase32Options = {\n  crockford: false\n};\nfunction isBase32(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, defaultBase32Options);\n  if (options.crockford) {\n    return crockfordBase32.test(str);\n  }\n  var len = str.length;\n  if (len % 8 === 0 && base32.test(str)) {\n    return true;\n  }\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isBase58;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz\nvar base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/;\nfunction isBase58(str) {\n  (0, _assertString.default)(str);\n  if (base58Reg.test(str)) {\n    return true;\n  }\n  return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isDataURI;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar validMediaType = /^[a-z]+\\/[a-z0-9\\-\\+\\._]+$/i;\nvar validAttribute = /^[a-z\\-]+=[a-z0-9\\-]+$/i;\nvar validData = /^[a-z0-9!\\$&'\\(\\)\\*\\+,;=\\-\\._~:@\\/\\?%\\s]*$/i;\nfunction isDataURI(str) {\n  (0, _assertString.default)(str);\n  var data = str.split(',');\n  if (data.length < 2) {\n    return false;\n  }\n  var attributes = data.shift().trim().split(';');\n  var schemeAndMediaType = attributes.shift();\n  if (schemeAndMediaType.slice(0, 5) !== 'data:') {\n    return false;\n  }\n  var mediaType = schemeAndMediaType.slice(5);\n  if (mediaType !== '' && !validMediaType.test(mediaType)) {\n    return false;\n  }\n  for (var i = 0; i < attributes.length; i++) {\n    if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') && !validAttribute.test(attributes[i])) {\n      return false;\n    }\n  }\n  for (var _i = 0; _i < data.length; _i++) {\n    if (!validData.test(data[_i])) {\n      return false;\n    }\n  }\n  return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMagnetURI;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar magnetURIComponent = /(?:^magnet:\\?|[^?&]&)xt(?:\\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;\nfunction isMagnetURI(url) {\n  (0, _assertString.default)(url);\n  if (url.indexOf('magnet:?') !== 0) {\n    return false;\n  }\n  return magnetURIComponent.test(url);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = rtrim;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction rtrim(str, chars) {\n  (0, _assertString.default)(str);\n  if (chars) {\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n    var pattern = new RegExp(\"[\".concat(chars.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), \"]+$\"), 'g');\n    return str.replace(pattern, '');\n  }\n  // Use a faster and more safe than regex trim method https://blog.stevenlevithan.com/archives/faster-trim-javascript\n  var strIndex = str.length - 1;\n  while (/\\s/.test(str.charAt(strIndex))) {\n    strIndex -= 1;\n  }\n  return str.slice(0, strIndex + 1);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = ltrim;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction ltrim(str, chars) {\n  (0, _assertString.default)(str);\n  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n  var pattern = chars ? new RegExp(\"^[\".concat(chars.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), \"]+\"), 'g') : /^\\s+/g;\n  return str.replace(pattern, '');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = trim;\nvar _rtrim = _interopRequireDefault(require(\"./rtrim\"));\nvar _ltrim = _interopRequireDefault(require(\"./ltrim\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction trim(str, chars) {\n  return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMailtoURI;\nvar _trim = _interopRequireDefault(require(\"./trim\"));\nvar _isEmail = _interopRequireDefault(require(\"./isEmail\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction parseMailtoQueryString(queryString) {\n  var allowedParams = new Set(['subject', 'body', 'cc', 'bcc']),\n    query = {\n      cc: '',\n      bcc: ''\n    };\n  var isParseFailed = false;\n  var queryParams = queryString.split('&');\n  if (queryParams.length > 4) {\n    return false;\n  }\n  var _iterator = _createForOfIteratorHelper(queryParams),\n    _step;\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var q = _step.value;\n      var _q$split = q.split('='),\n        _q$split2 = _slicedToArray(_q$split, 2),\n        key = _q$split2[0],\n        value = _q$split2[1];\n\n      // checked for invalid and duplicated query params\n      if (key && !allowedParams.has(key)) {\n        isParseFailed = true;\n        break;\n      }\n      if (value && (key === 'cc' || key === 'bcc')) {\n        query[key] = value;\n      }\n      if (key) {\n        allowedParams.delete(key);\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n  return isParseFailed ? false : query;\n}\nfunction isMailtoURI(url, options) {\n  (0, _assertString.default)(url);\n  if (url.indexOf('mailto:') !== 0) {\n    return false;\n  }\n  var _url$replace$split = url.replace('mailto:', '').split('?'),\n    _url$replace$split2 = _slicedToArray(_url$replace$split, 2),\n    to = _url$replace$split2[0],\n    _url$replace$split2$ = _url$replace$split2[1],\n    queryString = _url$replace$split2$ === void 0 ? '' : _url$replace$split2$;\n  if (!to && !queryString) {\n    return true;\n  }\n  var query = parseMailtoQueryString(queryString);\n  if (!query) {\n    return false;\n  }\n  return \"\".concat(to, \",\").concat(query.cc, \",\").concat(query.bcc).split(',').every(function (email) {\n    email = (0, _trim.default)(email, ' ');\n    if (email) {\n      return (0, _isEmail.default)(email, options);\n    }\n    return true;\n  });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isMimeType;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/*\n  Checks if the provided string matches to a correct Media type format (MIME type)\n\n  This function only checks is the string format follows the\n  etablished rules by the according RFC specifications.\n  This function supports 'charset' in textual media types\n  (https://tools.ietf.org/html/rfc6657).\n\n  This function does not check against all the media types listed\n  by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml)\n  because of lightness purposes : it would require to include\n  all these MIME types in this librairy, which would weigh it\n  significantly. This kind of effort maybe is not worth for the use that\n  this function has in this entire librairy.\n\n  More informations in the RFC specifications :\n  - https://tools.ietf.org/html/rfc2045\n  - https://tools.ietf.org/html/rfc2046\n  - https://tools.ietf.org/html/rfc7231#section-3.1.1.1\n  - https://tools.ietf.org/html/rfc7231#section-3.1.1.5\n*/\n\n// Match simple MIME types\n// NB :\n//   Subtype length must not exceed 100 characters.\n//   This rule does not comply to the RFC specs (what is the max length ?).\nvar mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\\/[a-zA-Z0-9\\.\\-\\+_]{1,100}$/i; // eslint-disable-line max-len\n\n// Handle \"charset\" in \"text/*\"\nvar mimeTypeText = /^text\\/[a-zA-Z0-9\\.\\-\\+]{1,100};\\s?charset=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?$/i; // eslint-disable-line max-len\n\n// Handle \"boundary\" in \"multipart/*\"\nvar mimeTypeMultipart = /^multipart\\/[a-zA-Z0-9\\.\\-\\+]{1,100}(;\\s?(boundary|charset)=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?){0,2}$/i; // eslint-disable-line max-len\n\nfunction isMimeType(str) {\n  (0, _assertString.default)(str);\n  return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isLatLong;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar lat = /^\\(?[+-]?(90(\\.0+)?|[1-8]?\\d(\\.\\d+)?)$/;\nvar long = /^\\s?[+-]?(180(\\.0+)?|1[0-7]\\d(\\.\\d+)?|\\d{1,2}(\\.\\d+)?)\\)?$/;\nvar latDMS = /^(([1-8]?\\d)\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|90\\D+0\\D+0)\\D+[NSns]?$/i;\nvar longDMS = /^\\s*([1-7]?\\d{1,2}\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|180\\D+0\\D+0)\\D+[EWew]?$/i;\nvar defaultLatLongOptions = {\n  checkDMS: false\n};\nfunction isLatLong(str, options) {\n  (0, _assertString.default)(str);\n  options = (0, _merge.default)(options, defaultLatLongOptions);\n  if (!str.includes(',')) return false;\n  var pair = str.split(',');\n  if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false;\n  if (options.checkDMS) {\n    return latDMS.test(pair[0]) && longDMS.test(pair[1]);\n  }\n  return lat.test(pair[0]) && long.test(pair[1]);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isPostalCode;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// common patterns\nvar threeDigit = /^\\d{3}$/;\nvar fourDigit = /^\\d{4}$/;\nvar fiveDigit = /^\\d{5}$/;\nvar sixDigit = /^\\d{6}$/;\nvar patterns = {\n  AD: /^AD\\d{3}$/,\n  AT: fourDigit,\n  AU: fourDigit,\n  AZ: /^AZ\\d{4}$/,\n  BA: /^([7-8]\\d{4}$)/,\n  BE: fourDigit,\n  BG: fourDigit,\n  BR: /^\\d{5}-\\d{3}$/,\n  BY: /^2[1-4]\\d{4}$/,\n  CA: /^[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][\\s\\-]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i,\n  CH: fourDigit,\n  CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\\d{4}$/,\n  CZ: /^\\d{3}\\s?\\d{2}$/,\n  DE: fiveDigit,\n  DK: fourDigit,\n  DO: fiveDigit,\n  DZ: fiveDigit,\n  EE: fiveDigit,\n  ES: /^(5[0-2]{1}|[0-4]{1}\\d{1})\\d{3}$/,\n  FI: fiveDigit,\n  FR: /^\\d{2}\\s?\\d{3}$/,\n  GB: /^(gir\\s?0aa|[a-z]{1,2}\\d[\\da-z]?\\s?(\\d[a-z]{2})?)$/i,\n  GR: /^\\d{3}\\s?\\d{2}$/,\n  HR: /^([1-5]\\d{4}$)/,\n  HT: /^HT\\d{4}$/,\n  HU: fourDigit,\n  ID: fiveDigit,\n  IE: /^(?!.*(?:o))[A-Za-z]\\d[\\dw]\\s\\w{4}$/i,\n  IL: /^(\\d{5}|\\d{7})$/,\n  IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,\n  IR: /^(?!(\\d)\\1{3})[13-9]{4}[1346-9][013-9]{5}$/,\n  IS: threeDigit,\n  IT: fiveDigit,\n  JP: /^\\d{3}\\-\\d{4}$/,\n  KE: fiveDigit,\n  KR: /^(\\d{5}|\\d{6})$/,\n  LI: /^(948[5-9]|949[0-7])$/,\n  LT: /^LT\\-\\d{5}$/,\n  LU: fourDigit,\n  LV: /^LV\\-\\d{4}$/,\n  LK: fiveDigit,\n  MG: threeDigit,\n  MX: fiveDigit,\n  MT: /^[A-Za-z]{3}\\s{0,1}\\d{4}$/,\n  MY: fiveDigit,\n  NL: /^[1-9]\\d{3}\\s?(?!sa|sd|ss)[a-z]{2}$/i,\n  NO: fourDigit,\n  NP: /^(10|21|22|32|33|34|44|45|56|57)\\d{3}$|^(977)$/i,\n  NZ: fourDigit,\n  PL: /^\\d{2}\\-\\d{3}$/,\n  PR: /^00[679]\\d{2}([ -]\\d{4})?$/,\n  PT: /^\\d{4}\\-\\d{3}?$/,\n  RO: sixDigit,\n  RU: sixDigit,\n  SA: fiveDigit,\n  SE: /^[1-9]\\d{2}\\s?\\d{2}$/,\n  SG: sixDigit,\n  SI: fourDigit,\n  SK: /^\\d{3}\\s?\\d{2}$/,\n  TH: fiveDigit,\n  TN: fourDigit,\n  TW: /^\\d{3}(\\d{2})?$/,\n  UA: fiveDigit,\n  US: /^\\d{5}(-\\d{4})?$/,\n  ZA: fourDigit,\n  ZM: fiveDigit\n};\nvar locales = exports.locales = Object.keys(patterns);\nfunction isPostalCode(str, locale) {\n  (0, _assertString.default)(str);\n  if (locale in patterns) {\n    return patterns[locale].test(str);\n  } else if (locale === 'any') {\n    for (var key in patterns) {\n      // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n      // istanbul ignore else\n      if (patterns.hasOwnProperty(key)) {\n        var pattern = patterns[key];\n        if (pattern.test(str)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = escape;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction escape(str) {\n  (0, _assertString.default)(str);\n  return str.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#x27;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\\//g, '&#x2F;').replace(/\\\\/g, '&#x5C;').replace(/`/g, '&#96;');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = unescape;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction unescape(str) {\n  (0, _assertString.default)(str);\n  return str.replace(/&quot;/g, '\"').replace(/&#x27;/g, \"'\").replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&#x2F;/g, '/').replace(/&#x5C;/g, '\\\\').replace(/&#96;/g, '`').replace(/&amp;/g, '&');\n  // &amp; replacement has to be the last one to prevent\n  // bugs with intermediate strings containing escape sequences\n  // See: https://github.com/validatorjs/validator.js/issues/1827\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = blacklist;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction blacklist(str, chars) {\n  (0, _assertString.default)(str);\n  return str.replace(new RegExp(\"[\".concat(chars, \"]+\"), 'g'), '');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = stripLow;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _blacklist = _interopRequireDefault(require(\"./blacklist\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction stripLow(str, keep_new_lines) {\n  (0, _assertString.default)(str);\n  var chars = keep_new_lines ? '\\\\x00-\\\\x09\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F' : '\\\\x00-\\\\x1F\\\\x7F';\n  return (0, _blacklist.default)(str, chars);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = whitelist;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction whitelist(str, chars) {\n  (0, _assertString.default)(str);\n  return str.replace(new RegExp(\"[^\".concat(chars, \"]+\"), 'g'), '');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isWhitelisted;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isWhitelisted(str, chars) {\n  (0, _assertString.default)(str);\n  for (var i = str.length - 1; i >= 0; i--) {\n    if (chars.indexOf(str[i]) === -1) {\n      return false;\n    }\n  }\n  return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = normalizeEmail;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_normalize_email_options = {\n  // The following options apply to all email addresses\n  // Lowercases the local part of the email address.\n  // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024).\n  // The domain is always lowercased, as per RFC 1035\n  all_lowercase: true,\n  // The following conversions are specific to GMail\n  // Lowercases the local part of the GMail address (known to be case-insensitive)\n  gmail_lowercase: true,\n  // Removes dots from the local part of the email address, as that's ignored by GMail\n  gmail_remove_dots: true,\n  // Removes the subaddress (e.g. \"+foo\") from the email address\n  gmail_remove_subaddress: true,\n  // Conversts the googlemail.com domain to gmail.com\n  gmail_convert_googlemaildotcom: true,\n  // The following conversions are specific to Outlook.com / Windows Live / Hotmail\n  // Lowercases the local part of the Outlook.com address (known to be case-insensitive)\n  outlookdotcom_lowercase: true,\n  // Removes the subaddress (e.g. \"+foo\") from the email address\n  outlookdotcom_remove_subaddress: true,\n  // The following conversions are specific to Yahoo\n  // Lowercases the local part of the Yahoo address (known to be case-insensitive)\n  yahoo_lowercase: true,\n  // Removes the subaddress (e.g. \"-foo\") from the email address\n  yahoo_remove_subaddress: true,\n  // The following conversions are specific to Yandex\n  // Lowercases the local part of the Yandex address (known to be case-insensitive)\n  yandex_lowercase: true,\n  // The following conversions are specific to iCloud\n  // Lowercases the local part of the iCloud address (known to be case-insensitive)\n  icloud_lowercase: true,\n  // Removes the subaddress (e.g. \"+foo\") from the email address\n  icloud_remove_subaddress: true\n};\n\n// List of domains used by iCloud\nvar icloud_domains = ['icloud.com', 'me.com'];\n\n// List of domains used by Outlook.com and its predecessors\n// This list is likely incomplete.\n// Partial reference:\n// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/\nvar outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com'];\n\n// List of domains used by Yahoo Mail\n// This list is likely incomplete\nvar yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com'];\n\n// List of domains used by yandex.ru\nvar yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru'];\n\n// replace single dots, but not multiple consecutive dots\nfunction dotsReplacer(match) {\n  if (match.length > 1) {\n    return match;\n  }\n  return '';\n}\nfunction normalizeEmail(email, options) {\n  options = (0, _merge.default)(options, default_normalize_email_options);\n  var raw_parts = email.split('@');\n  var domain = raw_parts.pop();\n  var user = raw_parts.join('@');\n  var parts = [user, domain];\n\n  // The domain is always lowercased, as it's case-insensitive per RFC 1035\n  parts[1] = parts[1].toLowerCase();\n  if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') {\n    // Address is GMail\n    if (options.gmail_remove_subaddress) {\n      parts[0] = parts[0].split('+')[0];\n    }\n    if (options.gmail_remove_dots) {\n      // this does not replace consecutive dots like example..email@gmail.com\n      parts[0] = parts[0].replace(/\\.+/g, dotsReplacer);\n    }\n    if (!parts[0].length) {\n      return false;\n    }\n    if (options.all_lowercase || options.gmail_lowercase) {\n      parts[0] = parts[0].toLowerCase();\n    }\n    parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1];\n  } else if (icloud_domains.indexOf(parts[1]) >= 0) {\n    // Address is iCloud\n    if (options.icloud_remove_subaddress) {\n      parts[0] = parts[0].split('+')[0];\n    }\n    if (!parts[0].length) {\n      return false;\n    }\n    if (options.all_lowercase || options.icloud_lowercase) {\n      parts[0] = parts[0].toLowerCase();\n    }\n  } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) {\n    // Address is Outlook.com\n    if (options.outlookdotcom_remove_subaddress) {\n      parts[0] = parts[0].split('+')[0];\n    }\n    if (!parts[0].length) {\n      return false;\n    }\n    if (options.all_lowercase || options.outlookdotcom_lowercase) {\n      parts[0] = parts[0].toLowerCase();\n    }\n  } else if (yahoo_domains.indexOf(parts[1]) >= 0) {\n    // Address is Yahoo\n    if (options.yahoo_remove_subaddress) {\n      var components = parts[0].split('-');\n      parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0];\n    }\n    if (!parts[0].length) {\n      return false;\n    }\n    if (options.all_lowercase || options.yahoo_lowercase) {\n      parts[0] = parts[0].toLowerCase();\n    }\n  } else if (yandex_domains.indexOf(parts[1]) >= 0) {\n    if (options.all_lowercase || options.yandex_lowercase) {\n      parts[0] = parts[0].toLowerCase();\n    }\n    parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preferred\n  } else if (options.all_lowercase) {\n    // Any other address\n    parts[0] = parts[0].toLowerCase();\n  }\n  return parts.join('@');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isSlug;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar charsetRegex = /^[^\\s-_](?!.*?[-_]{2,})[a-z0-9-\\\\][^\\s]*[^-_\\s]$/;\nfunction isSlug(str) {\n  (0, _assertString.default)(str);\n  return charsetRegex.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isLicensePlate;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar validators = {\n  'cs-CZ': function csCZ(str) {\n    return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str);\n  },\n  'de-DE': function deDE(str) {\n    return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|M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de-LI': function deLI(str) {\n    return /^FL[- ]?\\d{1,5}[UZ]?$/.test(str);\n  },\n  'en-IN': function enIN(str) {\n    return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str);\n  },\n  'es-AR': function esAR(str) {\n    return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str);\n  },\n  'fi-FI': function fiFI(str) {\n    return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str);\n  },\n  'hu-HU': function huHU(str) {\n    return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\\d{3})|(M\\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \\d{2}-\\d{2})|(CD \\d{3}-\\d{3})|(C-(C|X) \\d{4})|(X-(A|B|C) \\d{4})|(([EPVZ]-\\d{5}))|(S A[A-Z]{2} \\d{2})|(SP \\d{2}-\\d{2}))$/.test(str);\n  },\n  'pt-BR': function ptBR(str) {\n    return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str);\n  },\n  'pt-PT': function ptPT(str) {\n    return /^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(str);\n  },\n  'sq-AL': function sqAL(str) {\n    return /^[A-Z]{2}[- ]?((\\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\\d{3}))$/.test(str);\n  },\n  'sv-SE': function svSE(str) {\n    return /^[A-HJ-PR-UW-Z]{3} ?[\\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim());\n  },\n  'en-PK': function enPK(str) {\n    return /(^[A-Z]{2}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\\s|-){0,1})[0-9]{4}((\\s|-)[0-9]{2}){0,1}$)/.test(str.trim());\n  }\n};\nfunction isLicensePlate(str, locale) {\n  (0, _assertString.default)(str);\n  if (locale in validators) {\n    return validators[locale](str);\n  } else if (locale === 'any') {\n    for (var key in validators) {\n      /* eslint guard-for-in: 0 */\n      var validator = validators[key];\n      if (validator(str)) {\n        return true;\n      }\n    }\n    return false;\n  }\n  throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isStrongPassword;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar upperCaseRegex = /^[A-Z]$/;\nvar lowerCaseRegex = /^[a-z]$/;\nvar numberRegex = /^[0-9]$/;\nvar symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\\[\\]:\";'<>?,.\\/\\\\ ]$/;\nvar defaultOptions = {\n  minLength: 8,\n  minLowercase: 1,\n  minUppercase: 1,\n  minNumbers: 1,\n  minSymbols: 1,\n  returnScore: false,\n  pointsPerUnique: 1,\n  pointsPerRepeat: 0.5,\n  pointsForContainingLower: 10,\n  pointsForContainingUpper: 10,\n  pointsForContainingNumber: 10,\n  pointsForContainingSymbol: 10\n};\n\n/* Counts number of occurrences of each char in a string\n * could be moved to util/ ?\n*/\nfunction countChars(str) {\n  var result = {};\n  Array.from(str).forEach(function (char) {\n    var curVal = result[char];\n    if (curVal) {\n      result[char] += 1;\n    } else {\n      result[char] = 1;\n    }\n  });\n  return result;\n}\n\n/* Return information about a password */\nfunction analyzePassword(password) {\n  var charMap = countChars(password);\n  var analysis = {\n    length: password.length,\n    uniqueChars: Object.keys(charMap).length,\n    uppercaseCount: 0,\n    lowercaseCount: 0,\n    numberCount: 0,\n    symbolCount: 0\n  };\n  Object.keys(charMap).forEach(function (char) {\n    /* istanbul ignore else */\n    if (upperCaseRegex.test(char)) {\n      analysis.uppercaseCount += charMap[char];\n    } else if (lowerCaseRegex.test(char)) {\n      analysis.lowercaseCount += charMap[char];\n    } else if (numberRegex.test(char)) {\n      analysis.numberCount += charMap[char];\n    } else if (symbolRegex.test(char)) {\n      analysis.symbolCount += charMap[char];\n    }\n  });\n  return analysis;\n}\nfunction scorePassword(analysis, scoringOptions) {\n  var points = 0;\n  points += analysis.uniqueChars * scoringOptions.pointsPerUnique;\n  points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;\n  if (analysis.lowercaseCount > 0) {\n    points += scoringOptions.pointsForContainingLower;\n  }\n  if (analysis.uppercaseCount > 0) {\n    points += scoringOptions.pointsForContainingUpper;\n  }\n  if (analysis.numberCount > 0) {\n    points += scoringOptions.pointsForContainingNumber;\n  }\n  if (analysis.symbolCount > 0) {\n    points += scoringOptions.pointsForContainingSymbol;\n  }\n  return points;\n}\nfunction isStrongPassword(str) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  (0, _assertString.default)(str);\n  var analysis = analyzePassword(str);\n  options = (0, _merge.default)(options || {}, defaultOptions);\n  if (options.returnScore) {\n    return scorePassword(analysis, options);\n  }\n  return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = isVAT;\nexports.vatMatchers = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar algorithms = _interopRequireWildcard(require(\"./util/algorithms\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar AU = function AU(str) {\n  var match = str.match(/^(AU)?(\\d{11})$/);\n  if (!match) {\n    return false;\n  }\n  // @see {@link https://abr.business.gov.au/Help/AbnFormat}\n  var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];\n  str = str.replace(/^AU/, '');\n  var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1);\n  var total = 0;\n  for (var i = 0; i < 11; i++) {\n    total += weights[i] * ABN.charAt(i);\n  }\n  return total !== 0 && total % 89 === 0;\n};\nvar CH = function CH(str) {\n  // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0}\n  var hasValidCheckNumber = function hasValidCheckNumber(digits) {\n    var lastDigit = digits.pop(); // used as check number\n    var weights = [5, 4, 3, 2, 7, 6, 5, 4];\n    var calculatedCheckNumber = (11 - digits.reduce(function (acc, el, idx) {\n      return acc + el * weights[idx];\n    }, 0) % 11) % 11;\n    return lastDigit === calculatedCheckNumber;\n  };\n\n  // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html}\n  return /^(CHE[- ]?)?(\\d{9}|(\\d{3}\\.\\d{3}\\.\\d{3})|(\\d{3} \\d{3} \\d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\\d/g).map(function (el) {\n    return +el;\n  }));\n};\nvar PT = function PT(str) {\n  var match = str.match(/^(PT)?(\\d{9})$/);\n  if (!match) {\n    return false;\n  }\n  var tin = match[2];\n  var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) {\n    return parseInt(a, 10);\n  }), 9) % 11;\n  if (checksum > 9) {\n    return parseInt(tin[8], 10) === 0;\n  }\n  return checksum === parseInt(tin[8], 10);\n};\nvar vatMatchers = exports.vatMatchers = {\n  /**\r\n   * European Union VAT identification numbers\r\n   */\n  AT: function AT(str) {\n    return /^(AT)?U\\d{8}$/.test(str);\n  },\n  BE: function BE(str) {\n    return /^(BE)?\\d{10}$/.test(str);\n  },\n  BG: function BG(str) {\n    return /^(BG)?\\d{9,10}$/.test(str);\n  },\n  HR: function HR(str) {\n    return /^(HR)?\\d{11}$/.test(str);\n  },\n  CY: function CY(str) {\n    return /^(CY)?\\w{9}$/.test(str);\n  },\n  CZ: function CZ(str) {\n    return /^(CZ)?\\d{8,10}$/.test(str);\n  },\n  DK: function DK(str) {\n    return /^(DK)?\\d{8}$/.test(str);\n  },\n  EE: function EE(str) {\n    return /^(EE)?\\d{9}$/.test(str);\n  },\n  FI: function FI(str) {\n    return /^(FI)?\\d{8}$/.test(str);\n  },\n  FR: function FR(str) {\n    return /^(FR)?\\w{2}\\d{9}$/.test(str);\n  },\n  DE: function DE(str) {\n    return /^(DE)?\\d{9}$/.test(str);\n  },\n  EL: function EL(str) {\n    return /^(EL)?\\d{9}$/.test(str);\n  },\n  HU: function HU(str) {\n    return /^(HU)?\\d{8}$/.test(str);\n  },\n  IE: function IE(str) {\n    return /^(IE)?\\d{7}\\w{1}(W)?$/.test(str);\n  },\n  IT: function IT(str) {\n    return /^(IT)?\\d{11}$/.test(str);\n  },\n  LV: function LV(str) {\n    return /^(LV)?\\d{11}$/.test(str);\n  },\n  LT: function LT(str) {\n    return /^(LT)?\\d{9,12}$/.test(str);\n  },\n  LU: function LU(str) {\n    return /^(LU)?\\d{8}$/.test(str);\n  },\n  MT: function MT(str) {\n    return /^(MT)?\\d{8}$/.test(str);\n  },\n  NL: function NL(str) {\n    return /^(NL)?\\d{9}B\\d{2}$/.test(str);\n  },\n  PL: function PL(str) {\n    return /^(PL)?(\\d{10}|(\\d{3}-\\d{3}-\\d{2}-\\d{2})|(\\d{3}-\\d{2}-\\d{2}-\\d{3}))$/.test(str);\n  },\n  PT: PT,\n  RO: function RO(str) {\n    return /^(RO)?\\d{2,10}$/.test(str);\n  },\n  SK: function SK(str) {\n    return /^(SK)?\\d{10}$/.test(str);\n  },\n  SI: function SI(str) {\n    return /^(SI)?\\d{8}$/.test(str);\n  },\n  ES: function ES(str) {\n    return /^(ES)?\\w\\d{7}[A-Z]$/.test(str);\n  },\n  SE: function SE(str) {\n    return /^(SE)?\\d{12}$/.test(str);\n  },\n  /**\r\n   * VAT numbers of non-EU countries\r\n   */\n  AL: function AL(str) {\n    return /^(AL)?\\w{9}[A-Z]$/.test(str);\n  },\n  MK: function MK(str) {\n    return /^(MK)?\\d{13}$/.test(str);\n  },\n  AU: AU,\n  BY: function BY(str) {\n    return /^(УНП )?\\d{9}$/.test(str);\n  },\n  CA: function CA(str) {\n    return /^(CA)?\\d{9}$/.test(str);\n  },\n  IS: function IS(str) {\n    return /^(IS)?\\d{5,6}$/.test(str);\n  },\n  IN: function IN(str) {\n    return /^(IN)?\\d{15}$/.test(str);\n  },\n  ID: function ID(str) {\n    return /^(ID)?(\\d{15}|(\\d{2}.\\d{3}.\\d{3}.\\d{1}-\\d{3}.\\d{3}))$/.test(str);\n  },\n  IL: function IL(str) {\n    return /^(IL)?\\d{9}$/.test(str);\n  },\n  KZ: function KZ(str) {\n    return /^(KZ)?\\d{12}$/.test(str);\n  },\n  NZ: function NZ(str) {\n    return /^(NZ)?\\d{9}$/.test(str);\n  },\n  NG: function NG(str) {\n    return /^(NG)?(\\d{12}|(\\d{8}-\\d{4}))$/.test(str);\n  },\n  NO: function NO(str) {\n    return /^(NO)?\\d{9}MVA$/.test(str);\n  },\n  PH: function PH(str) {\n    return /^(PH)?(\\d{12}|\\d{3} \\d{3} \\d{3} \\d{3})$/.test(str);\n  },\n  RU: function RU(str) {\n    return /^(RU)?(\\d{10}|\\d{12})$/.test(str);\n  },\n  SM: function SM(str) {\n    return /^(SM)?\\d{5}$/.test(str);\n  },\n  SA: function SA(str) {\n    return /^(SA)?\\d{15}$/.test(str);\n  },\n  RS: function RS(str) {\n    return /^(RS)?\\d{9}$/.test(str);\n  },\n  CH: CH,\n  TR: function TR(str) {\n    return /^(TR)?\\d{10}$/.test(str);\n  },\n  UA: function UA(str) {\n    return /^(UA)?\\d{12}$/.test(str);\n  },\n  GB: function GB(str) {\n    return /^GB((\\d{3} \\d{4} ([0-8][0-9]|9[0-6]))|(\\d{9} \\d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str);\n  },\n  UZ: function UZ(str) {\n    return /^(UZ)?\\d{9}$/.test(str);\n  },\n  /**\r\n   * VAT numbers of Latin American countries\r\n   */\n  AR: function AR(str) {\n    return /^(AR)?\\d{11}$/.test(str);\n  },\n  BO: function BO(str) {\n    return /^(BO)?\\d{7}$/.test(str);\n  },\n  BR: function BR(str) {\n    return /^(BR)?((\\d{2}.\\d{3}.\\d{3}\\/\\d{4}-\\d{2})|(\\d{3}.\\d{3}.\\d{3}-\\d{2}))$/.test(str);\n  },\n  CL: function CL(str) {\n    return /^(CL)?\\d{8}-\\d{1}$/.test(str);\n  },\n  CO: function CO(str) {\n    return /^(CO)?\\d{10}$/.test(str);\n  },\n  CR: function CR(str) {\n    return /^(CR)?\\d{9,12}$/.test(str);\n  },\n  EC: function EC(str) {\n    return /^(EC)?\\d{13}$/.test(str);\n  },\n  SV: function SV(str) {\n    return /^(SV)?\\d{4}-\\d{6}-\\d{3}-\\d{1}$/.test(str);\n  },\n  GT: function GT(str) {\n    return /^(GT)?\\d{7}-\\d{1}$/.test(str);\n  },\n  HN: function HN(str) {\n    return /^(HN)?$/.test(str);\n  },\n  MX: function MX(str) {\n    return /^(MX)?\\w{3,4}\\d{6}\\w{3}$/.test(str);\n  },\n  NI: function NI(str) {\n    return /^(NI)?\\d{3}-\\d{6}-\\d{4}\\w{1}$/.test(str);\n  },\n  PA: function PA(str) {\n    return /^(PA)?$/.test(str);\n  },\n  PY: function PY(str) {\n    return /^(PY)?\\d{6,8}-\\d{1}$/.test(str);\n  },\n  PE: function PE(str) {\n    return /^(PE)?\\d{11}$/.test(str);\n  },\n  DO: function DO(str) {\n    return /^(DO)?(\\d{11}|(\\d{3}-\\d{7}-\\d{1})|[1,4,5]{1}\\d{8}|([1,4,5]{1})-\\d{2}-\\d{5}-\\d{1})$/.test(str);\n  },\n  UY: function UY(str) {\n    return /^(UY)?\\d{12}$/.test(str);\n  },\n  VE: function VE(str) {\n    return /^(VE)?[J,G,V,E]{1}-(\\d{9}|(\\d{8}-\\d{1}))$/.test(str);\n  }\n};\nfunction isVAT(str, countryCode) {\n  (0, _assertString.default)(str);\n  (0, _assertString.default)(countryCode);\n  if (countryCode in vatMatchers) {\n    return vatMatchers[countryCode](str);\n  }\n  throw new Error(\"Invalid country code: '\".concat(countryCode, \"'\"));\n}","\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\nvar _toDate = _interopRequireDefault(require(\"./lib/toDate\"));\nvar _toFloat = _interopRequireDefault(require(\"./lib/toFloat\"));\nvar _toInt = _interopRequireDefault(require(\"./lib/toInt\"));\nvar _toBoolean = _interopRequireDefault(require(\"./lib/toBoolean\"));\nvar _equals = _interopRequireDefault(require(\"./lib/equals\"));\nvar _contains = _interopRequireDefault(require(\"./lib/contains\"));\nvar _matches = _interopRequireDefault(require(\"./lib/matches\"));\nvar _isEmail = _interopRequireDefault(require(\"./lib/isEmail\"));\nvar _isURL = _interopRequireDefault(require(\"./lib/isURL\"));\nvar _isMACAddress = _interopRequireDefault(require(\"./lib/isMACAddress\"));\nvar _isIP = _interopRequireDefault(require(\"./lib/isIP\"));\nvar _isIPRange = _interopRequireDefault(require(\"./lib/isIPRange\"));\nvar _isFQDN = _interopRequireDefault(require(\"./lib/isFQDN\"));\nvar _isDate = _interopRequireDefault(require(\"./lib/isDate\"));\nvar _isTime = _interopRequireDefault(require(\"./lib/isTime\"));\nvar _isBoolean = _interopRequireDefault(require(\"./lib/isBoolean\"));\nvar _isLocale = _interopRequireDefault(require(\"./lib/isLocale\"));\nvar _isAbaRouting = _interopRequireDefault(require(\"./lib/isAbaRouting\"));\nvar _isAlpha = _interopRequireWildcard(require(\"./lib/isAlpha\"));\nvar _isAlphanumeric = _interopRequireWildcard(require(\"./lib/isAlphanumeric\"));\nvar _isNumeric = _interopRequireDefault(require(\"./lib/isNumeric\"));\nvar _isPassportNumber = _interopRequireDefault(require(\"./lib/isPassportNumber\"));\nvar _isPort = _interopRequireDefault(require(\"./lib/isPort\"));\nvar _isLowercase = _interopRequireDefault(require(\"./lib/isLowercase\"));\nvar _isUppercase = _interopRequireDefault(require(\"./lib/isUppercase\"));\nvar _isIMEI = _interopRequireDefault(require(\"./lib/isIMEI\"));\nvar _isAscii = _interopRequireDefault(require(\"./lib/isAscii\"));\nvar _isFullWidth = _interopRequireDefault(require(\"./lib/isFullWidth\"));\nvar _isHalfWidth = _interopRequireDefault(require(\"./lib/isHalfWidth\"));\nvar _isVariableWidth = _interopRequireDefault(require(\"./lib/isVariableWidth\"));\nvar _isMultibyte = _interopRequireDefault(require(\"./lib/isMultibyte\"));\nvar _isSemVer = _interopRequireDefault(require(\"./lib/isSemVer\"));\nvar _isSurrogatePair = _interopRequireDefault(require(\"./lib/isSurrogatePair\"));\nvar _isInt = _interopRequireDefault(require(\"./lib/isInt\"));\nvar _isFloat = _interopRequireWildcard(require(\"./lib/isFloat\"));\nvar _isDecimal = _interopRequireDefault(require(\"./lib/isDecimal\"));\nvar _isHexadecimal = _interopRequireDefault(require(\"./lib/isHexadecimal\"));\nvar _isOctal = _interopRequireDefault(require(\"./lib/isOctal\"));\nvar _isDivisibleBy = _interopRequireDefault(require(\"./lib/isDivisibleBy\"));\nvar _isHexColor = _interopRequireDefault(require(\"./lib/isHexColor\"));\nvar _isRgbColor = _interopRequireDefault(require(\"./lib/isRgbColor\"));\nvar _isHSL = _interopRequireDefault(require(\"./lib/isHSL\"));\nvar _isISRC = _interopRequireDefault(require(\"./lib/isISRC\"));\nvar _isIBAN = _interopRequireWildcard(require(\"./lib/isIBAN\"));\nvar _isBIC = _interopRequireDefault(require(\"./lib/isBIC\"));\nvar _isMD = _interopRequireDefault(require(\"./lib/isMD5\"));\nvar _isHash = _interopRequireDefault(require(\"./lib/isHash\"));\nvar _isJWT = _interopRequireDefault(require(\"./lib/isJWT\"));\nvar _isJSON = _interopRequireDefault(require(\"./lib/isJSON\"));\nvar _isEmpty = _interopRequireDefault(require(\"./lib/isEmpty\"));\nvar _isLength = _interopRequireDefault(require(\"./lib/isLength\"));\nvar _isByteLength = _interopRequireDefault(require(\"./lib/isByteLength\"));\nvar _isUUID = _interopRequireDefault(require(\"./lib/isUUID\"));\nvar _isMongoId = _interopRequireDefault(require(\"./lib/isMongoId\"));\nvar _isAfter = _interopRequireDefault(require(\"./lib/isAfter\"));\nvar _isBefore = _interopRequireDefault(require(\"./lib/isBefore\"));\nvar _isIn = _interopRequireDefault(require(\"./lib/isIn\"));\nvar _isLuhnNumber = _interopRequireDefault(require(\"./lib/isLuhnNumber\"));\nvar _isCreditCard = _interopRequireDefault(require(\"./lib/isCreditCard\"));\nvar _isIdentityCard = _interopRequireDefault(require(\"./lib/isIdentityCard\"));\nvar _isEAN = _interopRequireDefault(require(\"./lib/isEAN\"));\nvar _isISIN = _interopRequireDefault(require(\"./lib/isISIN\"));\nvar _isISBN = _interopRequireDefault(require(\"./lib/isISBN\"));\nvar _isISSN = _interopRequireDefault(require(\"./lib/isISSN\"));\nvar _isTaxID = _interopRequireDefault(require(\"./lib/isTaxID\"));\nvar _isMobilePhone = _interopRequireWildcard(require(\"./lib/isMobilePhone\"));\nvar _isEthereumAddress = _interopRequireDefault(require(\"./lib/isEthereumAddress\"));\nvar _isCurrency = _interopRequireDefault(require(\"./lib/isCurrency\"));\nvar _isBtcAddress = _interopRequireDefault(require(\"./lib/isBtcAddress\"));\nvar _isISO = require(\"./lib/isISO6346\");\nvar _isISO2 = _interopRequireDefault(require(\"./lib/isISO6391\"));\nvar _isISO3 = _interopRequireDefault(require(\"./lib/isISO8601\"));\nvar _isRFC = _interopRequireDefault(require(\"./lib/isRFC3339\"));\nvar _isISO31661Alpha = _interopRequireDefault(require(\"./lib/isISO31661Alpha2\"));\nvar _isISO31661Alpha2 = _interopRequireDefault(require(\"./lib/isISO31661Alpha3\"));\nvar _isISO4 = _interopRequireDefault(require(\"./lib/isISO4217\"));\nvar _isBase = _interopRequireDefault(require(\"./lib/isBase32\"));\nvar _isBase2 = _interopRequireDefault(require(\"./lib/isBase58\"));\nvar _isBase3 = _interopRequireDefault(require(\"./lib/isBase64\"));\nvar _isDataURI = _interopRequireDefault(require(\"./lib/isDataURI\"));\nvar _isMagnetURI = _interopRequireDefault(require(\"./lib/isMagnetURI\"));\nvar _isMailtoURI = _interopRequireDefault(require(\"./lib/isMailtoURI\"));\nvar _isMimeType = _interopRequireDefault(require(\"./lib/isMimeType\"));\nvar _isLatLong = _interopRequireDefault(require(\"./lib/isLatLong\"));\nvar _isPostalCode = _interopRequireWildcard(require(\"./lib/isPostalCode\"));\nvar _ltrim = _interopRequireDefault(require(\"./lib/ltrim\"));\nvar _rtrim = _interopRequireDefault(require(\"./lib/rtrim\"));\nvar _trim = _interopRequireDefault(require(\"./lib/trim\"));\nvar _escape = _interopRequireDefault(require(\"./lib/escape\"));\nvar _unescape = _interopRequireDefault(require(\"./lib/unescape\"));\nvar _stripLow = _interopRequireDefault(require(\"./lib/stripLow\"));\nvar _whitelist = _interopRequireDefault(require(\"./lib/whitelist\"));\nvar _blacklist = _interopRequireDefault(require(\"./lib/blacklist\"));\nvar _isWhitelisted = _interopRequireDefault(require(\"./lib/isWhitelisted\"));\nvar _normalizeEmail = _interopRequireDefault(require(\"./lib/normalizeEmail\"));\nvar _isSlug = _interopRequireDefault(require(\"./lib/isSlug\"));\nvar _isLicensePlate = _interopRequireDefault(require(\"./lib/isLicensePlate\"));\nvar _isStrongPassword = _interopRequireDefault(require(\"./lib/isStrongPassword\"));\nvar _isVAT = _interopRequireDefault(require(\"./lib/isVAT\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar version = '13.12.0';\nvar validator = {\n  version: version,\n  toDate: _toDate.default,\n  toFloat: _toFloat.default,\n  toInt: _toInt.default,\n  toBoolean: _toBoolean.default,\n  equals: _equals.default,\n  contains: _contains.default,\n  matches: _matches.default,\n  isEmail: _isEmail.default,\n  isURL: _isURL.default,\n  isMACAddress: _isMACAddress.default,\n  isIP: _isIP.default,\n  isIPRange: _isIPRange.default,\n  isFQDN: _isFQDN.default,\n  isBoolean: _isBoolean.default,\n  isIBAN: _isIBAN.default,\n  isBIC: _isBIC.default,\n  isAbaRouting: _isAbaRouting.default,\n  isAlpha: _isAlpha.default,\n  isAlphaLocales: _isAlpha.locales,\n  isAlphanumeric: _isAlphanumeric.default,\n  isAlphanumericLocales: _isAlphanumeric.locales,\n  isNumeric: _isNumeric.default,\n  isPassportNumber: _isPassportNumber.default,\n  isPort: _isPort.default,\n  isLowercase: _isLowercase.default,\n  isUppercase: _isUppercase.default,\n  isAscii: _isAscii.default,\n  isFullWidth: _isFullWidth.default,\n  isHalfWidth: _isHalfWidth.default,\n  isVariableWidth: _isVariableWidth.default,\n  isMultibyte: _isMultibyte.default,\n  isSemVer: _isSemVer.default,\n  isSurrogatePair: _isSurrogatePair.default,\n  isInt: _isInt.default,\n  isIMEI: _isIMEI.default,\n  isFloat: _isFloat.default,\n  isFloatLocales: _isFloat.locales,\n  isDecimal: _isDecimal.default,\n  isHexadecimal: _isHexadecimal.default,\n  isOctal: _isOctal.default,\n  isDivisibleBy: _isDivisibleBy.default,\n  isHexColor: _isHexColor.default,\n  isRgbColor: _isRgbColor.default,\n  isHSL: _isHSL.default,\n  isISRC: _isISRC.default,\n  isMD5: _isMD.default,\n  isHash: _isHash.default,\n  isJWT: _isJWT.default,\n  isJSON: _isJSON.default,\n  isEmpty: _isEmpty.default,\n  isLength: _isLength.default,\n  isLocale: _isLocale.default,\n  isByteLength: _isByteLength.default,\n  isUUID: _isUUID.default,\n  isMongoId: _isMongoId.default,\n  isAfter: _isAfter.default,\n  isBefore: _isBefore.default,\n  isIn: _isIn.default,\n  isLuhnNumber: _isLuhnNumber.default,\n  isCreditCard: _isCreditCard.default,\n  isIdentityCard: _isIdentityCard.default,\n  isEAN: _isEAN.default,\n  isISIN: _isISIN.default,\n  isISBN: _isISBN.default,\n  isISSN: _isISSN.default,\n  isMobilePhone: _isMobilePhone.default,\n  isMobilePhoneLocales: _isMobilePhone.locales,\n  isPostalCode: _isPostalCode.default,\n  isPostalCodeLocales: _isPostalCode.locales,\n  isEthereumAddress: _isEthereumAddress.default,\n  isCurrency: _isCurrency.default,\n  isBtcAddress: _isBtcAddress.default,\n  isISO6346: _isISO.isISO6346,\n  isFreightContainerID: _isISO.isFreightContainerID,\n  isISO6391: _isISO2.default,\n  isISO8601: _isISO3.default,\n  isRFC3339: _isRFC.default,\n  isISO31661Alpha2: _isISO31661Alpha.default,\n  isISO31661Alpha3: _isISO31661Alpha2.default,\n  isISO4217: _isISO4.default,\n  isBase32: _isBase.default,\n  isBase58: _isBase2.default,\n  isBase64: _isBase3.default,\n  isDataURI: _isDataURI.default,\n  isMagnetURI: _isMagnetURI.default,\n  isMailtoURI: _isMailtoURI.default,\n  isMimeType: _isMimeType.default,\n  isLatLong: _isLatLong.default,\n  ltrim: _ltrim.default,\n  rtrim: _rtrim.default,\n  trim: _trim.default,\n  escape: _escape.default,\n  unescape: _unescape.default,\n  stripLow: _stripLow.default,\n  whitelist: _whitelist.default,\n  blacklist: _blacklist.default,\n  isWhitelisted: _isWhitelisted.default,\n  normalizeEmail: _normalizeEmail.default,\n  toString: toString,\n  isSlug: _isSlug.default,\n  isStrongPassword: _isStrongPassword.default,\n  isTaxID: _isTaxID.default,\n  isDate: _isDate.default,\n  isTime: _isTime.default,\n  isLicensePlate: _isLicensePlate.default,\n  isVAT: _isVAT.default,\n  ibanLocales: _isIBAN.locales\n};\nvar _default = exports.default = validator;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","import { AddressModel, AddressModelSchema } from \"./API/Cart/cartAPISchema\";\r\nimport { isAlpha, AlphaLocale } from \"validator\";\r\n\r\nexport const MAX_FULLNAME_LENGTH = 36; // Limitation in M3 for full name.\r\nexport const MIN_FULLNAME_LENGTH = 3;\r\n\r\nexport const FieldType = {\r\n    firstName: \"\",\r\n    lastName: \"\",\r\n    address: \"\",\r\n    city: \"\",\r\n} as const;\r\n\r\nexport type FieldType = keyof typeof FieldType;\r\n\r\n/**\r\n * Defines the allowed special characters for different field types.\r\n */\r\nconst ALLOWED_SPECIAL_CHARACTERS: Record<FieldType, string> = {\r\n    firstName: \"-'. \",\r\n    lastName: \"-'. \",\r\n    address: \"-'. 1234567890\",\r\n    city: \"-'. \",\r\n} as const;\r\n\r\nconst FEEDBACK_TEXTS = {\r\n    no: {\r\n        REQUIRED: \"påkrevd\",\r\n        PHONE_MIN_LENGTH: \"må være minst 8 siffer\",\r\n        PHONE_MAX_LENGTH: \"må være maks 10 siffer\",\r\n        PHONE_NUMBER_REQUIRED_LENGTH: \"må være 8 siffer\",\r\n        POSTAL_CODE_REQUIRED_LENGTH: \"må være 4 siffer\",\r\n        INVALID: \"ugyldig \",\r\n        PERSON_IDENTIFIER_REQUIRED_LENGTH: \"må være 11 siffer\",\r\n        CANNOT_CONTAIN_NUMBERS: \"kan ikke inneholde tall\",\r\n        CAN_ONLY_CONTAIN_NUMBERS: \"kan kun inneholde tall\",\r\n        CANNOT_CONTAIN_SPECIAL_CHARACTERS: \"kan ikke inneholde ugyldige tegn\",\r\n        REQUIRED_DELIVERY_METHOD: \"Du må velge en leveringsmetode\",\r\n        REQUIRED_DELIVERY_WINDOW: \"Du må velge et leveringsvindu\",\r\n        REQUIRED_DELIVERY_LOCATION: \"Du må velge et leveringssted\",\r\n        REQUIRED_PAYMENT_METHOD: \"Du må velge en betalingsmetode\",\r\n        REQUIRED_PERSON_IDENTIFIER: \"Du må fylle inn fødselsnummer\",\r\n        REQUIRED_AFTERPAY_INSTALLMENT_METHOD:\r\n            \"Du må velge en delbetalingsmetode\",\r\n        REQUIRED_AFTERPAY_INSTALLMENT_PLAN: \"Du må velge en nedbetalingsplan\",\r\n        GENERIC_ERROR: \"Noe gikk galt, vennligst prøv igjen senenere\",\r\n        UNKNOWN_POSTALCODE: \"Ukjent postnummer\",\r\n        POSTALCODE_AND_CITY_DONT_MATCH:\r\n            \"Postnummer og poststed stemmer ikke overens\",\r\n        PASSWORD_RESET_EMAIL_REQUIRED:\r\n            \"Vennligst fyll inn epostadresse for å kunne tilbakestille passord\",\r\n        PASSWORD_RESET_EMAIL_INVALID:\r\n            \"Vennligst fyll inn en gyldig epostadresse for å kunne tilbakestille passord\",\r\n        CONSENT_REQUIRED: \"Du må godta vilkårene\",\r\n        NAME_MAXLENGTH_EXCEEDED: `Samlet lengde av fornavn og etternavn kan ikke overstige ${MAX_FULLNAME_LENGTH} tegn`,\r\n    },\r\n    en: {\r\n        REQUIRED: \"required\",\r\n        PHONE_MIN_LENGTH: \"must be at least 8 digits\",\r\n        PHONE_MAX_LENGTH: \"must be a maximum of 10 digits\",\r\n        PHONE_NUMBER_REQUIRED_LENGTH: \"must be 8 digits\",\r\n        POSTAL_CODE_REQUIRED_LENGTH: \"must be 4 digits\",\r\n        INVALID: \"invalid\",\r\n        PERSON_IDENTIFIER_REQUIRED_LENGTH: \"must be 11 digits\",\r\n        CANNOT_CONTAIN_NUMBERS: \"cannot contain numbers\",\r\n        CAN_ONLY_CONTAIN_NUMBERS: \"can only contain numbers\",\r\n        CANNOT_CONTAIN_SPECIAL_CHARACTERS: \"cannot contain special characters\",\r\n        REQUIRED_DELIVERY_METHOD: \"You must choose a delivery method\",\r\n        REQUIRED_DELIVERY_WINDOW: \"You must choose a delivery window\",\r\n        REQUIRED_DELIVERY_LOCATION: \"You must choose a delivery location\",\r\n        REQUIRED_PAYMENT_METHOD: \"You must choose a payment method\",\r\n        REQUIRED_PERSON_IDENTIFIER: \"You must enter a personal identifier\",\r\n        REQUIRED_AFTERPAY_INSTALLMENT_METHOD:\r\n            \"You must choose an installment method\",\r\n        REQUIRED_AFTERPAY_INSTALLMENT_PLAN:\r\n            \"You must choose an installment plan\",\r\n        GENERIC_ERROR: \"Something went wrong, please try again later\",\r\n        UNKNOWN_POSTALCODE: \"Unknown postal code\",\r\n        POSTALCODE_AND_CITY_DONT_MATCH: \"Postal code and city do not match\",\r\n        PASSWORD_RESET_EMAIL_REQUIRED:\r\n            \"Please enter an email address to reset your password\",\r\n        PASSWORD_RESET_EMAIL_INVALID:\r\n            \"Please enter a valid email address to reset your password\",\r\n        CONSENT_REQUIRED: \"You must accept the terms and conditions\",\r\n        NAME_MAXLENGTH_EXCEEDED: `Samlet lengde av fornavn og etternavn kan ikke overstige ${MAX_FULLNAME_LENGTH} tegn`,\r\n    },\r\n} as const;\r\n\r\nexport type SupportedFeedbackTextLocales = keyof typeof FEEDBACK_TEXTS;\r\n\r\n/**\r\n * Returns the feedback text based on the specified locale.\r\n * If the locale is not found, it defaults to Norwegian.\r\n *\r\n * @param locale - The locale to get the feedback text for.\r\n * @returns The feedback text for the specified locale.\r\n */\r\nexport const FEEDBACK_TEXT = (locale: SupportedFeedbackTextLocales = \"no\") => {\r\n    return FEEDBACK_TEXTS[locale] || FEEDBACK_TEXTS.no; // Default to Norwegian if the locale\r\n};\r\n\r\n/**\r\n * Collection of validation helper functions.\r\n */\r\nexport const validationHelper = {\r\n    isPhoneNumber: (phoneNumber: string): boolean => {\r\n        const phoneNumberRegex = /^\\d{8,10}$/;\r\n        return phoneNumberRegex.test(phoneNumber);\r\n    },\r\n    isPostalCode: (postalCode: string): boolean => {\r\n        const postalCodeRegex = /^\\d{4}$/;\r\n        return postalCodeRegex.test(postalCode);\r\n    },\r\n    validCustomerInformation: (customerInformation: AddressModel): boolean => {\r\n        return AddressModelSchema.safeParse(customerInformation).success;\r\n    },\r\n    containsNumbers: (value: string): boolean => {\r\n        return /\\d/.test(value);\r\n    },\r\n    containsOnlyNumbers: (value: string): boolean => {\r\n        return /^\\d+$/.test(value);\r\n    },\r\n    containsSpecialCharacters: (value: string): boolean => {\r\n        const regex = /[^\\p{L}\\p{N}\\p{M}-]/u;\r\n        return regex.test(value);\r\n    },\r\n\r\n    /**\r\n     * Checks if the given value contains any disallowed special characters based on the field type.\r\n     *\r\n     * @param fieldType - The type of the field.\r\n     * @param value - The value to be checked.\r\n     * @param locale - The country code for locale-specific checks. Defaults to \"nb-NO\".\r\n     * @returns A boolean indicating whether the value contains disallowed special characters.\r\n     */\r\n    containsDisallowedSpecialCharacters(\r\n        fieldType: FieldType,\r\n        value: string,\r\n        locale: AlphaLocale | undefined = \"nb-NO\",\r\n    ): boolean {\r\n        return !isAlpha(value, locale, {\r\n            ignore: ALLOWED_SPECIAL_CHARACTERS[fieldType],\r\n        });\r\n    },\r\n};\r\n","import { Money } from \"../../../services/models/cart.models\";\r\nimport * as z from \"zod\";\r\nimport {\r\n    FEEDBACK_TEXT,\r\n    MAX_FULLNAME_LENGTH,\r\n    validationHelper,\r\n} from \"../../validationHelpers\";\r\nimport { GoogleAnalytics4EventModelSchema } from \"../GoogleAnalytics/GoogleAnalyticsSchema\";\r\n\r\nexport const MoneySchema = z.object({\r\n    amount: z.number(),\r\n    currency: z.string(),\r\n});\r\n\r\nexport const emailSchema = z\r\n    .string()\r\n    .trim()\r\n    .toLowerCase()\r\n    .min(1, { message: FEEDBACK_TEXT().REQUIRED })\r\n    .email({ message: FEEDBACK_TEXT().INVALID });\r\n\r\nexport const firstNameSchema = z\r\n    .string()\r\n    .trim()\r\n    .min(1, { message: FEEDBACK_TEXT().REQUIRED })\r\n    .superRefine((value, context) => {\r\n        if (validationHelper.containsNumbers(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_NUMBERS,\r\n            });\r\n        }\r\n        if (\r\n            validationHelper.containsDisallowedSpecialCharacters(\r\n                \"firstName\",\r\n                value,\r\n            )\r\n        ) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_SPECIAL_CHARACTERS,\r\n            });\r\n        }\r\n    });\r\n\r\nexport const lastNameSchema = z\r\n    .string()\r\n    .trim()\r\n    .min(1, { message: FEEDBACK_TEXT().REQUIRED })\r\n    .superRefine((value, context) => {\r\n        if (validationHelper.containsNumbers(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_NUMBERS,\r\n            });\r\n        }\r\n        if (\r\n            validationHelper.containsDisallowedSpecialCharacters(\r\n                \"lastName\",\r\n                value,\r\n            )\r\n        ) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_SPECIAL_CHARACTERS,\r\n            });\r\n        }\r\n    });\r\n\r\nexport const phoneNumberSchema = z\r\n    .string()\r\n    .trim()\r\n    .superRefine((value, context) => {\r\n        if (value.length < 1) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().REQUIRED,\r\n            });\r\n        }\r\n        if (value.length != 8) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().PHONE_NUMBER_REQUIRED_LENGTH,\r\n            });\r\n        }\r\n        if (validationHelper.containsSpecialCharacters(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_SPECIAL_CHARACTERS,\r\n            });\r\n        }\r\n        if (!validationHelper.isPhoneNumber(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().INVALID,\r\n            });\r\n        }\r\n    });\r\n\r\nexport const addressSchema = z\r\n    .string()\r\n    .trim()\r\n    .min(1, { message: FEEDBACK_TEXT().REQUIRED })\r\n    .superRefine((value, context) => {\r\n        if (\r\n            validationHelper.containsDisallowedSpecialCharacters(\r\n                \"address\",\r\n                value,\r\n            )\r\n        ) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_SPECIAL_CHARACTERS,\r\n            });\r\n        }\r\n    });\r\n\r\nexport const postalCodeSchema = z\r\n    .string()\r\n    .trim()\r\n    .min(1, { message: FEEDBACK_TEXT().REQUIRED })\r\n    .superRefine((value, context) => {\r\n        if (value.length !== 4) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().POSTAL_CODE_REQUIRED_LENGTH,\r\n            });\r\n        }\r\n        if (!validationHelper.isPostalCode(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().POSTAL_CODE_REQUIRED_LENGTH,\r\n            });\r\n        }\r\n    });\r\n\r\nexport const citySchema = z\r\n    .string()\r\n    .trim()\r\n    .min(1, { message: FEEDBACK_TEXT().REQUIRED })\r\n    .superRefine((value, context) => {\r\n        if (validationHelper.containsNumbers(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_NUMBERS,\r\n            });\r\n        }\r\n        if (\r\n            validationHelper.containsDisallowedSpecialCharacters(\"city\", value)\r\n        ) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CANNOT_CONTAIN_SPECIAL_CHARACTERS,\r\n            });\r\n        }\r\n    });\r\n\r\nexport type KeySellingPoint = z.infer<typeof KeySellingPointSchema>;\r\nexport const KeySellingPointSchema = z.object({\r\n    img: z.string(),\r\n    heading: z.string(),\r\n    description: z.string(),\r\n});\r\n\r\nexport type PaymentMethodPreview = z.infer<typeof PaymentMethodPreviewSchema>;\r\nexport const PaymentMethodPreviewSchema = z.object({\r\n    paymentMethodId: z.string(),\r\n    systemKeyword: z.string(),\r\n    imageId: z.string(),\r\n});\r\n\r\nexport type LineItemModel = z.infer<typeof LineItemSchema>;\r\nexport const LineItemSchema = z.object({\r\n    name: z.string().toLowerCase(),\r\n    brand: z.string(),\r\n    quantity: z.number(),\r\n    code: z.string(),\r\n    color: z.string(),\r\n    size: z.string(),\r\n    listPrice: MoneySchema,\r\n    discountedPrice: MoneySchema,\r\n    imageUrl: z.string().optional(),\r\n    altText: z.string().optional(),\r\n    productUrl: z.string().optional(),\r\n    ean: z.string(),\r\n    currentInventory: z.number(),\r\n    memberPromotionsText: z.string().optional().nullable(),    \r\n    memberPromotionsLink: z.string().optional().nullable(),\r\n    esalesKey: z.string(),\r\n});\r\n\r\nexport type Product = z.infer<typeof ProductSchema>;\r\nexport const ProductSchema = z.object({\r\n    header: z.string(),\r\n    name: z.string(),\r\n    count: z.number(),\r\n    size: z.string(),\r\n    color: z.string(),\r\n    shippingText: z.string(),\r\n});\r\n\r\nexport type Cart = z.infer<typeof CartSchema>;\r\nexport const CartSchema = z.object({\r\n    itemCount: z.number(),\r\n    total: MoneySchema,\r\n    subTotal: MoneySchema,\r\n    subTotalWithoutDiscounts: MoneySchema,\r\n    discountTotal: MoneySchema,\r\n    selectedShippingMethodPrice: MoneySchema,\r\n    lineItems: z.array(LineItemSchema),\r\n    appliedCoupons: z.record(z.string()).optional(),\r\n    paymentMethods: z.array(PaymentMethodPreviewSchema),\r\n    freeShippingActive: z.boolean(),\r\n    freeShippingLimit: MoneySchema,\r\n    isAuthenticated: z.boolean(),\r\n});\r\n\r\nexport type BaseAddressModel = z.infer<typeof BaseAddressModelSchema>;\r\nconst BaseAddressModelSchema = z.object({\r\n    email: emailSchema,\r\n    firstName: firstNameSchema,\r\n    lastName: lastNameSchema,\r\n    phoneNumber: phoneNumberSchema,\r\n    address: addressSchema,\r\n    postalCode: postalCodeSchema,\r\n    city: citySchema,\r\n});\r\n\r\nexport type AddressModel = z.infer<typeof AddressModelSchema>;\r\nexport const AddressModelSchema = BaseAddressModelSchema.superRefine(\r\n    (data, ctx) => {\r\n        if (\r\n            (data.firstName?.length || 0) + (data.lastName?.length || 0) >=\r\n            MAX_FULLNAME_LENGTH\r\n        ) {\r\n            ctx.addIssue({\r\n                path: [\"firstName\"],\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().NAME_MAXLENGTH_EXCEEDED,\r\n            });\r\n            ctx.addIssue({\r\n                path: [\"lastName\"],\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().NAME_MAXLENGTH_EXCEEDED,\r\n            });\r\n        }\r\n    },\r\n);\r\n\r\nexport type CheckoutInputModel = z.infer<typeof CheckoutInputModelSchema>;\r\nexport const CheckoutInputModelSchema = z.object({\r\n    billingAddress: BaseAddressModelSchema.partial(),\r\n    shippingAddress: BaseAddressModelSchema.partial(),\r\n});\r\n\r\nexport type AddressModelWithoutAnalytics = z.\r\ninfer<typeof AddressModelWithoutAnalyticsSchema>;\r\nexport const AddressModelWithoutAnalyticsSchema = BaseAddressModelSchema.superRefine((data, ctx) => {\r\n    if (\r\n        (data.firstName?.length || 0) + (data.lastName?.length || 0) >=\r\n        MAX_FULLNAME_LENGTH\r\n    ) {\r\n        ctx.addIssue({\r\n            path: [\"firstName\"],\r\n            code: z.ZodIssueCode.custom,\r\n            message: FEEDBACK_TEXT().NAME_MAXLENGTH_EXCEEDED,\r\n        });\r\n        ctx.addIssue({\r\n            path: [\"lastName\"],\r\n            code: z.ZodIssueCode.custom,\r\n            message: FEEDBACK_TEXT().NAME_MAXLENGTH_EXCEEDED,\r\n        });\r\n    }\r\n});\r\n\r\nexport type PlaceholderAddressModel = z.infer<\r\n    typeof PlaceholderAddressModelSchema\r\n>;\r\nexport const PlaceholderAddressModelSchema = z.object({\r\n    ...BaseAddressModelSchema.shape,\r\n    email: z.string().min(0).optional(),\r\n    firstName: z.string().min(0).optional(),\r\n    lastName: z.string().min(0).optional(),\r\n    phoneNumber: z.string().min(0).optional(),\r\n    address: z.string().min(0).optional(),\r\n    postalCode: z.string().min(0).optional(),\r\n    city: z.string().min(0).optional(),\r\n});\r\n\r\nexport type LoginModel = z.infer<typeof LoginModelSchema>;\r\nexport const LoginModelSchema = z.object({\r\n    email: emailSchema,\r\n    password: z.string().min(1, { message: FEEDBACK_TEXT().REQUIRED }),\r\n});\r\n\r\nexport type OrderConfirmation = z.infer<typeof OrderConfirmationSchema>;\r\nexport const OrderConfirmationSchema = z.object({\r\n    addressModel: AddressModelSchema,\r\n    estimatedDeliveryTime: z.string(),\r\n    paymentOption: z.string(),\r\n    orderConfirmationText: z.string(),\r\n    customerServiceText: z.string(),\r\n    errorState: z.string().optional(),\r\n    itemCount: z.string(),\r\n    total: z.custom<Money>(),\r\n    shippingCost: z.custom<Money>(),\r\n    cartItems: z.array(LineItemSchema),\r\n});\r\n\r\nexport type GetCartResponseModel = z.infer<typeof GetCartResponseModelSchema>;\r\nexport const GetCartResponseModelSchema = z.object({\r\n    cartDto: CartSchema,\r\n});\r\n\r\nexport type UpdateProductQuantityResponseModel = z.infer<typeof UpdateProductQuantityResponseModelSchema>;\r\nexport const UpdateProductQuantityResponseModelSchema = z.object({\r\n    cartDto: CartSchema,\r\n});","import { USER_FEEDBACK } from \"../APIErrors\";\r\nimport {\r\n    CartSchema,\r\n    Product,\r\n    Cart,\r\n    AddressModelWithoutAnalytics,\r\n    GetCartResponseModel,\r\n    GetCartResponseModelSchema,\r\n    UpdateProductQuantityResponseModel,\r\n    UpdateProductQuantityResponseModelSchema,\r\n} from \"./cartAPISchema\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\nimport Quantity from \"Scripts/global/modules/quantity_wp\";\r\n\r\nconst API_URL = \"/api/cart\";\r\n\r\n/**\r\n * Adds a product to the shopping cart.\r\n *\r\n * @param code - The code/productId of the product to be added.\r\n * @returns A Promise that resolves to the updated shopping cart.\r\n * @throws An error if the HTTP request fails or the response is not valid.\r\n */\r\nexport async function addProductToCart(\r\n    code: string,\r\n): Promise<UpdateProductQuantityResponseModel> {\r\n    const url = `${API_URL}`;\r\n    const formData = {\r\n        Code: code,\r\n        Quantity: 1,\r\n    };\r\n\r\n    const body = JSON.stringify(formData);\r\n\r\n    const response = await fetch(url, {\r\n        method: \"POST\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: body,\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response, body);\r\n        return Promise.reject(USER_FEEDBACK.GENERIC);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = UpdateProductQuantityResponseModelSchema.parse(data);\r\n\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Retrieves the shopping cart from the API.\r\n *\r\n * @returns A Promise that resolves to the shopping cart data.\r\n * @throws An error if the HTTP request fails or the response is not valid.\r\n */\r\nexport async function getCart(): Promise<GetCartResponseModel> {\r\n    const url = `${API_URL}`;\r\n    const response = await fetch(url, {\r\n        method: \"GET\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        Promise.reject(await response.json());\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = GetCartResponseModelSchema.parse(data);\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Updates the quantity of a product in the shopping cart.\r\n *\r\n * @param code - The code of the product.\r\n * @param quantity - The new quantity of the product.\r\n * @param signal - An AbortSignal object that allows cancelling the request.\r\n * @returns A Promise that resolves to the updated shopping cart.\r\n * @throws If the request fails or is aborted.\r\n */\r\nexport async function updateProductQuantity(\r\n    code: string,\r\n    quantity: number,\r\n    isAdditive: boolean,\r\n    signal: AbortSignal,\r\n): Promise<UpdateProductQuantityResponseModel> {\r\n    const url = `${API_URL}/${code}`;\r\n\r\n    const response = await fetch(url, {\r\n        method: \"PUT\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: JSON.stringify({\r\n            quantity: quantity,\r\n            isAdditive: isAdditive,\r\n        }),\r\n        signal: signal,\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return Promise.reject(await response.json());\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = UpdateProductQuantityResponseModelSchema.parse(data);\r\n\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Removes a product from the shopping cart.\r\n *\r\n * @param code - The code/productId of the product to be deleted.\r\n * @returns A Promise that resolves to the updated shopping cart.\r\n * @throws An error if the HTTP request fails or the response is not valid.\r\n */\r\nexport async function removeProductFromCart(\r\n    code: string,\r\n): Promise<UpdateProductQuantityResponseModel> {\r\n    const url = `${API_URL}/${code}`;\r\n    const response = await fetch(url, {\r\n        method: \"DELETE\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return Promise.reject(USER_FEEDBACK.GENERIC);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = UpdateProductQuantityResponseModelSchema.parse(data);\r\n\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Adds a discount code to the shopping cart.\r\n *\r\n * @param discountCode The discount code to be added.\r\n * @returns A Promise that resolves to the updated shopping cart.\r\n */\r\nexport async function addDiscountCode(discountCode: string): Promise<Cart> {\r\n    const url = `${API_URL}/coupon`;\r\n    const body = JSON.stringify({\r\n        couponCode: discountCode,\r\n    });\r\n\r\n    const response = await fetch(url, {\r\n        method: \"POST\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: body,\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response, body);\r\n        return Promise.reject(USER_FEEDBACK.COULD_NOT_ADD_DISCOUNT_CODE);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = CartSchema.parse(data);\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Removes a discount code from the shopping cart.\r\n *\r\n * @param discountCode - The discount code to be removed.\r\n * @returns A Promise that resolves to the updated shopping cart.\r\n * @throws An error if there is an HTTP error during the API call.\r\n */\r\nexport async function removeDiscountCode(discountCode: string): Promise<Cart> {\r\n    const url = `${API_URL}/coupon`;\r\n    const response = await fetch(url, {\r\n        method: \"DELETE\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: JSON.stringify({\r\n            couponCode: discountCode,\r\n        }),\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return Promise.reject(USER_FEEDBACK.GENERIC);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = CartSchema.parse(data);\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Updates the customer's address information.\r\n *\r\n * @param addressModel - The address model to be updated. It can be a single AddressModel object or an array of AddressModel objects.\r\n * @returns A Promise that resolves to a boolean indicating whether the update was successful.\r\n */\r\nexport async function updateCustomer(\r\n    addressModel: AddressModelWithoutAnalytics | Array<AddressModelWithoutAnalytics>,\r\n): Promise<boolean> {\r\n    const url = `${API_URL}/address`;\r\n\r\n    if (!Array.isArray(addressModel)) {\r\n        addressModel = [addressModel];\r\n    }\r\n\r\n    const response = await fetch(url, {\r\n        method: \"PUT\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: JSON.stringify(addressModel),\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return Promise.reject(false);\r\n    }\r\n    return Promise.resolve(true);\r\n}","import { useShoppingCartStore } from \"../components/shoppingCart/stores/shoppingCartStore\";\r\nimport { useProductPageStore } from \"../stores/productPageStore\";\r\nimport {\r\n    API_ERROR_MESSAGES,\r\n    API_ERROR_NAMES,\r\n    USER_FEEDBACK,\r\n} from \"../utils/API/APIErrors\";\r\nimport {\r\n    addDiscountCode,\r\n    removeDiscountCode,\r\n    removeProductFromCart,\r\n    updateProductQuantity,\r\n    addProductToCart,\r\n} from \"../utils/API/Cart/cartAPI\";\r\nimport { LineItemModel } from \"../utils/API/Cart/cartAPISchema\";\r\nimport { handleGtmTracking } from \"../utils/API/GTM\";\r\nimport { Ga4Events } from \"./models/gtm.models\";\r\nimport GtmService from \"./gtm.service\";\r\nimport { GoogleAnalytics4EventModelSchema } from \"../utils/API/GoogleAnalytics/GoogleAnalyticsSchema\";\r\n\r\nexport default class ShoppingCartService {\r\n    /**\r\n     * Adds a product to the shopping cart.\r\n     *\r\n     * @param code - The code of the product to add.\r\n     * @param isQuickAdd - Indicates if the product is being added quickly.\r\n     * @param itemListId - The ID of the item list, if method is called from an upsell list\r\n     * @param itemListName - The name of the item list. If method is called from an upsell list\r\n     * @returns A promise that resolves when the product has been added to the cart.\r\n     *\r\n     * @throws Will call `handleRemoveProductFromCartError` if there is an error adding the product to the cart.\r\n     */\r\n    static apiAddProductToCart = async (\r\n        code: string,\r\n        isQuickAdd: boolean,\r\n        itemListId: string,\r\n        itemListName: string,\r\n    ): Promise<void> => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n        const productPageStore = useProductPageStore();\r\n        let lineItem: LineItemModel | undefined;\r\n\r\n        try {\r\n            const data = await addProductToCart(code);\r\n            shoppingCartStore.setCart(data.cartDto);\r\n            productPageStore.setCartItemCount(data.cartDto.itemCount);\r\n\r\n            const lineItem = shoppingCartStore.cart?.lineItems.find(\r\n                (x) => x.code === code,\r\n            ) as LineItemModel;\r\n\r\n            isQuickAdd\r\n                ? GtmService.pushCheckoutEvent(\r\n                      Ga4Events.AddToCartFromList,\r\n                      lineItem,\r\n                      {\r\n                          item_list_id: itemListId,\r\n                          item_list_name: itemListName,\r\n                      },\r\n                  )\r\n                : GtmService.pushCheckoutEvent(Ga4Events.AddToCart, lineItem);\r\n        } catch (error) {\r\n            lineItem\r\n                ? this.setLineItemError(lineItem, USER_FEEDBACK.GENERIC)\r\n                : console.log(USER_FEEDBACK.GENERIC);\r\n        }\r\n\r\n        // If on the product page, show cartStatus popup\r\n        productPageStore.setCartStatusIsOpen(true);\r\n    };\r\n\r\n    /**\r\n     * Deletes a product from the shopping cart.\r\n     * Sets the `cart` value with the returned data.\r\n     *\r\n     * @param {number} code - The code of the product.\r\n     * @param {number} ean - The european article number of the product.\r\n     * @returns {Promise} - A promise that resolves when the product is successfully deleted.\r\n     */\r\n\r\n    static apiRemoveProductFromCart = async (code: string): Promise<void> => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n        const productPageStore = useProductPageStore();\r\n        const lineItem = shoppingCartStore.cart?.lineItems.find(\r\n            (x) => x.code === code,\r\n        ) as LineItemModel;\r\n\r\n        // In case the product is the last one in the cart, we need to obtain the checkout event model before removing the product\r\n        const checkoutEventModel = await GtmService.getCheckoutEventModel(\r\n            Ga4Events.RemoveFromCart,\r\n            lineItem?.code,\r\n        );\r\n\r\n        try {\r\n            const data = await removeProductFromCart(code);\r\n            shoppingCartStore.setCart(data.cartDto);\r\n            productPageStore.setCartItemCount(data.cartDto.itemCount);\r\n            handleGtmTracking(checkoutEventModel);\r\n        } catch (error) {\r\n            this.handleRemoveProductFromCartError(lineItem);\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Updates the quantity of a product in the shopping cart.\r\n     *\r\n     * @param code - The product code.\r\n     * @param ean - The EAN (European Article Number) of the product.\r\n     * @param quantity - The quantity to of the product.\r\n     * @param isAdditive - A flag indicating whether the quantity should be added to the existing quantity (true) or set as the new quantity (false).\r\n     * @param signal - An AbortSignal to allow aborting the request.\r\n     * @returns A promise that resolves when the update is complete.\r\n     *\r\n     * @throws {Error} If there is an error during the update process.\r\n     */\r\n    static apiUpdateProductQuantity = async (\r\n        code: string,\r\n        ean: string,\r\n        quantity: number,\r\n        isAdditive: boolean,\r\n        signal: AbortSignal,\r\n    ): Promise<void> => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        const lineItem = shoppingCartStore.cart?.lineItems.find(\r\n            (x) => x.ean === ean,\r\n        ) as LineItemModel;\r\n\r\n        try {\r\n            const data = await updateProductQuantity(\r\n                code,\r\n                quantity,\r\n                isAdditive,\r\n                signal,\r\n            );\r\n\r\n            if (shoppingCartStore.lineItemErrors?.[lineItem.ean]) {\r\n                const { [lineItem.ean]: _, ...rest } =\r\n                    shoppingCartStore.lineItemErrors;\r\n                shoppingCartStore.setLineItemErrors(rest);\r\n            }\r\n\r\n            shoppingCartStore.setCart(data.cartDto);\r\n            GtmService.pushCheckoutEvent(\r\n                quantity > 0 ? Ga4Events.AddToCart : Ga4Events.RemoveFromCart,\r\n            );\r\n        } catch (error) {\r\n            if (error instanceof Error) {\r\n                this.handleUpdateProductQuantityError(lineItem, error);\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Handles the error when deleting a product from the shopping cart.\r\n     *\r\n     * @param {LineItemModel} lineItem - The line item representing the product to be deleted.\r\n     */\r\n    private static handleRemoveProductFromCartError = (\r\n        lineItem: LineItemModel,\r\n    ) => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        if (!lineItem || !shoppingCartStore.cart) return;\r\n\r\n        shoppingCartStore.setLineItemErrors({\r\n            ...shoppingCartStore.lineItemErrors,\r\n            [lineItem.ean]: USER_FEEDBACK.GENERIC,\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Handles the error that occurs when updating the quantity of a product in the shopping cart.\r\n     * Adds line-item specific errors to the `lineItemErrors` object and sets the `summaryError` value otherwise.\r\n     *\r\n     * @param {Error} error - The error object that occurred during the update.\r\n     * @param {LineItemModel} lineItem - The line item where the error occurred.\r\n     */\r\n    private static handleUpdateProductQuantityError = (\r\n        lineItem: LineItemModel,\r\n        error?: Error,\r\n    ): void => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        if (!error) {\r\n            this.setLineItemError(lineItem, \"\");\r\n            return;\r\n        }\r\n\r\n        if (error.name === API_ERROR_NAMES.ABORT_ERROR) {\r\n            return;\r\n        }\r\n\r\n        if (!lineItem || !shoppingCartStore.cart) return;\r\n\r\n        if (error.message === API_ERROR_MESSAGES.CART_FULL) {\r\n            shoppingCartStore.setSummaryError(USER_FEEDBACK.CART_FULL);\r\n            return;\r\n        }\r\n\r\n        if (error.message === USER_FEEDBACK.INSUFFICIENT_STOCK) {\r\n            this.setLineItemError(lineItem, USER_FEEDBACK.INSUFFICIENT_STOCK);\r\n            return;\r\n        }\r\n\r\n        this.setLineItemError(lineItem, USER_FEEDBACK.GENERIC);\r\n    };\r\n\r\n    /**\r\n     * Sets the error value for a line item.\r\n     *\r\n     * @param {LineItemModel} lineItem - The line item to set the error for.\r\n     * @param {string} errorValue - The error value to set.\r\n     */\r\n    private static setLineItemError = (\r\n        lineItem: LineItemModel,\r\n        errorValue: string,\r\n    ) => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        if (shoppingCartStore.lineItemErrors?.[lineItem.ean] === errorValue)\r\n            return;\r\n\r\n        shoppingCartStore.setLineItemErrors({\r\n            ...shoppingCartStore.lineItemErrors,\r\n            [lineItem.ean]: errorValue,\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Adds a discount code to the shopping cart.\r\n     * Sets the `cart` value with the returned data.\r\n     *\r\n     * @param {string} discountCode - The discount code to be added.\r\n     */\r\n    static apiAddDiscountCode = async (discountCode: string): Promise<void> => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        try {\r\n            const data = await addDiscountCode(discountCode);\r\n            shoppingCartStore.setCart(data);\r\n        } catch (error) {\r\n            this.handleAddDiscountCodeError(error as string);\r\n            return;\r\n        }\r\n\r\n        shoppingCartStore.addDiscountCode(discountCode);\r\n        this.handleAddDiscountCodeError();\r\n    };\r\n\r\n    /**\r\n     * Handles the error when adding a discount code.\r\n     *\r\n     * @param {string} error - The error message, if any.\r\n     */\r\n    private static handleAddDiscountCodeError = (error?: string) => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        if (!error) shoppingCartStore.setDiscountError(\"\");\r\n\r\n        if (error === USER_FEEDBACK.COULD_NOT_ADD_DISCOUNT_CODE) {\r\n            shoppingCartStore.setDiscountError(error);\r\n        }\r\n\r\n        if (error === USER_FEEDBACK.GENERIC) {\r\n            shoppingCartStore.setDiscountError(error);\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Removes a discount code from the shopping cart.\r\n     * Sets the `cart` value with the returned data.\r\n     *\r\n     * @param {string} discountCode - The discount code to be removed.\r\n     * @returns {Promise<void>} - A promise that resolves when the discount code is successfully removed.\r\n     */\r\n    static apiRemoveDiscountCode = async (\r\n        discountCode: string,\r\n    ): Promise<void> => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        try {\r\n            const data = await removeDiscountCode(discountCode);\r\n            shoppingCartStore.setCart(data);\r\n        } catch (error) {\r\n            this.handleRemoveDiscountCodeError(error as string);\r\n        }\r\n\r\n        shoppingCartStore.removeDiscountCode(discountCode);\r\n        this.handleRemoveDiscountCodeError();\r\n    };\r\n\r\n    /**\r\n     * Handles the error when removing a discount code.\r\n     *\r\n     * @param {string} error - The error message, if any.\r\n     */\r\n    private static handleRemoveDiscountCodeError = (error?: string) => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        if (!error) shoppingCartStore.setDiscountError(\"\");\r\n\r\n        if (error === USER_FEEDBACK.GENERIC) {\r\n            shoppingCartStore.setDiscountError(error);\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Removes the line item with the specified EAN from the LineItemsOutOfStock list.\r\n     *\r\n     * @param {string} ean - The EAN (European Article Number) of the product.\r\n     */\r\n    static removeFromProductsOutOfStock = (_: string, ean: string) => {\r\n        const shoppingCartStore = useShoppingCartStore();\r\n\r\n        shoppingCartStore.lineItemsOutOfStock =\r\n            shoppingCartStore.lineItemsOutOfStock.filter((x) => x.ean !== ean);\r\n    };\r\n}\r\n","<template>\r\n  <form @submit.prevent=\"submitForm\">\r\n    <div class=\"product__size\">\r\n      <SizePickerSuit\r\n        v-if=\"sizePickerType === SizePickerTypes.SizePickerSuit\"\r\n        v-bind=\"sizePickerSuitProps\"\r\n      />\r\n      <SizePickerPants\r\n        v-if=\"sizePickerType === SizePickerTypes.SizePickerPants\"\r\n        v-bind=\"sizePickerPantsProps\"\r\n      />\r\n      <SizePickerRegular\r\n        v-if=\"sizePickerType === SizePickerTypes.SizePickerRegular\"\r\n        v-bind=\"sizePickerRegularProps\"\r\n      />\r\n    </div>\r\n    <div v-if=\"props.isProductInStock\" class=\"product__add\">\r\n      <input type=\"hidden\" value=\"1\" :name='$t(\"skuParameterCode\")' />\r\n      <button\r\n        class=\"btn btn--profile btn--inset u-display-block btn--add-to-cart product__add-to-cart-btn\"\r\n        type=\"submit\"\r\n      >\r\n        {{ $t(\"addToBasket\") }}\r\n      </button>\r\n    </div>\r\n\r\n    <!-- Disabled Add to cart button for out-of-stock case -->\r\n    <div v-else class=\"product__add\">\r\n      <button\r\n        class=\"btn btn--add-to-cart u-display-block product__add-to-cart-btn\"\r\n        type=\"submit\"\r\n        disabled\r\n      >\r\n        {{ $t(\"addToBasket\") }}\r\n      </button>\r\n    </div>\r\n\r\n    <!--Product availability information-->\r\n    <!-- Show availability only if shopId is not Jean Paul and showAvailability prop is true-->\r\n    <div v-if=\"props.shopId != 'JeanPaul' && props.showAvailability\" class=\"product__availability\">\r\n      <div v-if=\"isProductInStock\" class=\"product__availability__text\">\r\n        <!-- Store inventory button -->\r\n        <Icon :type=\"IconTypes.AvailableCheck\" :size=\"IconSizes.Micro\" />\r\n        <p>\r\n          {{ $t(\"availableOnline\") }}\r\n        </p>\r\n      </div>\r\n      <!-- Sold out message only if product available in physical store -->\r\n      <div v-else class=\"product__availability__text\">\r\n        <Icon :type=\"IconTypes.SoldoutX\" :size=\"IconSizes.Micro\" />\r\n        <p>\r\n          {{ $t(\"soldoutOnline\") }}\r\n        </p>\r\n      </div>\r\n\r\n      <div v-if=\"productAvailableInStore\" class=\"product__availability-link product__availability__instore-text\">\r\n        <!-- Store inventory button -->\r\n        <Icon :type=\"IconTypes.AvailableCheck\" :size=\"IconSizes.Micro\" />\r\n        <button\r\n          class=\"btn--link  _js-vue-component-toggler\"\r\n          data-togglewhat=\"storeInventory\"\r\n        >\r\n        <p>\r\n          {{ $t(\"availableInStore\") }}\r\n        </p>\r\n      </button>\r\n      </div>\r\n      <!-- Sold out message only if product available in physical store -->\r\n      <div v-else class=\"product__availability__text\">\r\n        <Icon :type=\"IconTypes.SoldoutX\" :size=\"IconSizes.Micro\" />\r\n        <p>\r\n          {{ $t(\"soldoutInStores\") }}\r\n        </p>\r\n      </div>\r\n    </div>\r\n  </form>\r\n  <CartStatus\r\n    v-if=\"props.checkoutLink && props.displayName && props.cartStatusImage\"\r\n    :display-name=\"props.displayName\"\r\n    :item-color=\"props.itemColor\"\r\n    :item-meta-color=\"props.itemMetaColor\"\r\n    :cart-status-image=\"props.cartStatusImage\"\r\n    :checkout-link=\"props.checkoutLink\"\r\n    :esalesKey=\"props.esalesKey\"\r\n    :categoryName=\"props.categoryName\"\r\n  />\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport {computed, onBeforeMount, onMounted, onUnmounted, ref, watch, withDefaults} from \"vue\";\r\nimport SizePickerSuit from \"./sizePickerSuit.vue\";\r\nimport SizePickerPants from \"./sizePickerPants.vue\";\r\nimport SizePickerRegular from \"./sizePickerRegular.vue\";\r\nimport {validateSizeSelection} from \"../../mixins/productSize.mixin\";\r\nimport {useProductPageStore} from \"../../stores/productPageStore\";\r\nimport {vueComponentToggler} from \"../../../../global/modules/toggler_wp\";\r\nimport {vueInventory} from \"../../../../global/modules/inventory_wp\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport {IconSizes, IconTypes} from \"../../components/icon/icon.model\";\r\nimport CartStatus from \"../../views/cartStatus/cartStatus.vue\";\r\nimport ShoppingCartService from \"../../services/shoppingcart.service\";\r\n\r\nconst productPageStore = useProductPageStore();\r\n\r\nexport interface AddToCartFormProps {\r\n  matrixSizes: Record<string, any>;\r\n  regularSizes: Record<string, any>;\r\n  shopId: string;\r\n  isSizeGuide?: boolean;\r\n  isProductInStock: boolean;\r\n  productAvailableInStore?: boolean;\r\n  displayName: string;\r\n  itemColor: string;\r\n  itemMetaColor: string;\r\n  cartStatusImage: string;\r\n  checkoutLink?: string;\r\n  esalesKey: string;\r\n  showInventoryNotification?: boolean;\r\n  showAvailability?: boolean;\r\n  addToCartCallback?: Function;\r\n  isQuickAdd?: boolean;\r\n  itemListId?: string;\r\n  itemListName?: string;\r\n  categoryName: string;\r\n}\r\n\r\nconst props = withDefaults(defineProps<AddToCartFormProps>(), {\r\n  isSizeGuide: false,\r\n  showInventoryNotification: false,\r\n  showAvailability: false,\r\n  isQuickAdd: false,\r\n});\r\n\r\nconst formSubmitted = ref(false);\r\n\r\nconst SizePickerTypes = {\r\n  SizePickerSuit: \"suit\",\r\n  SizePickerPants: \"pants\",\r\n  SizePickerRegular: \"regular\",\r\n} as const;\r\n\r\nconst sizePickerType = computed(() => {\r\n  try {\r\n    if (props.matrixSizes.length > 0) {\r\n      const firstSize = props.matrixSizes[0][0].name ?? \"\";\r\n      return isSuitSize(firstSize)\r\n        ? SizePickerTypes.SizePickerSuit\r\n        : SizePickerTypes.SizePickerPants;\r\n    }\r\n\r\n    return SizePickerTypes.SizePickerRegular;\r\n  } catch (error) {\r\n    console.error(\"Error parsing matrixSizes:\", error);\r\n    return SizePickerTypes.SizePickerRegular;\r\n  }\r\n});\r\n\r\n// Function to determine if it's a suit size\r\nconst isSuitSize = (sizeName: string): boolean => {\r\n  return /^[BC]\\d+$/.test(sizeName); // Starts with B or C followed by digits\r\n};\r\n\r\nconst fewItemsLeftThreshold = computed(() => {\r\n  return parseInt('$t(\"fewItemsLeftThreshold\")');;\r\n});\r\n\r\nconst sizePickerRegularProps = computed(() => {\r\n  return {\r\n    isSizeGuide: props.isSizeGuide,\r\n    regularSizes: props.regularSizes,\r\n    showInventoryNotification: props.showInventoryNotification,\r\n  };\r\n});\r\n\r\nconst sizePickerPantsProps = computed(() => {\r\n  return {\r\n    isSizeGuide: props.isSizeGuide,\r\n    matrixSizes: props.matrixSizes,\r\n    showInventoryNotification: props.showInventoryNotification,\r\n  };\r\n});\r\n\r\nconst sizePickerSuitProps = computed(() => {\r\n  return {\r\n    isSizeGuide: props.isSizeGuide,\r\n    matrixSizes: props.matrixSizes,\r\n    showInventoryNotification: props.showInventoryNotification,\r\n  };\r\n});\r\n\r\nconst validateSelection = () => {\r\n  return validateSizeSelection(sizePickerType.value, productPageStore);\r\n};\r\n\r\nasync function checkStockStatus(\r\n  count: string,\r\n  treshold: number = 0,\r\n): Promise<void> {\r\n  const inventoryIsLow = parseInt(count) <= treshold;\r\n\r\n  if (inventoryIsLow) {\r\n    productPageStore.inventoryIsLow = true;\r\n  } else {\r\n    productPageStore.inventoryIsLow = false;\r\n  }\r\n\r\n  productPageStore.setCheckInventoryStatus(false);\r\n}\r\n\r\nconst getAddToCartRecs = async () => {\r\n  productPageStore.cartStatusUpsell.isLoading = true;\r\n\r\n  const variantKey = props.esalesKey + productPageStore.size;\r\n\r\n  await SearchService.products(\r\n    `/publicapi/esales/add-to-cart-recs?variantKey=${variantKey}`,\r\n    undefined,\r\n    \"\",\r\n    \"4\",\r\n  ).then((response) => {\r\n    productPageStore.cartStatusUpsell.setUpsellModel(response.data);\r\n  });\r\n\r\n  productPageStore.cartStatusUpsell.isLoading = false;\r\n}\r\n\r\n\r\nconst submitForm = async () => {\r\n  if (!validateSelection()) {\r\n    return;\r\n  }\r\n\r\n  await ShoppingCartService.apiAddProductToCart(productPageStore.skuCode, props.isQuickAdd, props.itemListId || \"\", props.itemListName || \"\");\r\n\r\n  formSubmitted.value = true;\r\n\r\n  if (props.addToCartCallback) {\r\n    props.addToCartCallback();\r\n  }\r\n};\r\n\r\nonBeforeMount(() => {\r\n  if (props.isQuickAdd) {productPageStore.resetState();}\r\n});\r\n\r\nonUnmounted(() => {\r\n  productPageStore.resetState();\r\n\r\n  // Scroll to the last added lineItem only if the form is submitted\r\n  if (formSubmitted.value) {\r\n    const checkoutLineItems = document.querySelectorAll(\".checkout-line-item\");\r\n\r\n    if (checkoutLineItems.length > 0) {\r\n      const lastCheckoutLineItem = checkoutLineItems[checkoutLineItems.length - 1];\r\n\r\n      lastCheckoutLineItem.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\r\n    }\r\n  }\r\n});\r\n\r\nonMounted(() => {\r\n  vueComponentToggler();\r\n  vueInventory();\r\n\r\n  productPageStore.setItemColor(props.itemColor ?? \"\");\r\n  productPageStore.setItemMetaColor(props.itemMetaColor ?? \"\");\r\n  productPageStore.setDisplayName(props.displayName ?? \"\");\r\n  productPageStore.setCartStatusIsOpen(false);\r\n});\r\n\r\nwatch(\r\n  () => productPageStore.checkInventoryStatus,\r\n  (newValue) => {\r\n    if (newValue === true) {\r\n      // Trigger the API call with the inventory count value\r\n      checkStockStatus(\r\n        productPageStore.inventoryCount,\r\n        fewItemsLeftThreshold.value,\r\n      );\r\n    }\r\n  },\r\n);\r\n\r\nwatch(() => productPageStore.size, async (newValue, oldValue) => {\r\n  if (newValue !== oldValue) {\r\n    await getAddToCartRecs();\r\n  }\r\n});\r\n\r\n</script>\r\n","import { AddToCartFormProps } from \"../components/addToCartForm/addToCartForm.vue\";\r\nimport { SkuDetails } from \"../components/addToCartForm/sizePicker.models\";\r\nimport { Product, ProductVariant } from \"../services/search.service\";\r\nimport { isSuitSize } from \"./productSize.mixin\";\r\n\r\nfunction mapVariantToSkuDetails(variant: ProductVariant): SkuDetails {\r\n    return {\r\n      name: variant.size ?? \"\", // Maps the size\r\n      skuCode: variant.custom?.EpiCode?.[0]?.label ?? \"\", // Safely gets SKU code\r\n      inventoryCount: variant.stockNumber ?? 0, // Ensures it's always a number\r\n      regularSize: variant.size ?? \"\", // Important for regular sizes\r\n      isMatrix: false, // Defaults to false unless overridden\r\n      hasPrice: true, // Default to true (adjust if needed)\r\n      suitSize: \"\", // Empty for regular sizes\r\n      suitWidth: \"\",\r\n      suitLength: \"\",\r\n      matrixSizeL: \"\",\r\n      matrixSizeW: \"\",\r\n    };\r\n  }\r\n\r\nexport function mapProductsToAddToCartFormProps(\r\n    productVariants: ProductVariant[],\r\n    isMatrixSize: boolean,\r\n    product: Product,\r\n    store: string,\r\n    addToCartCallback: () => void,\r\n    itemListId?: string,\r\n    itemListName?: string\r\n  ): AddToCartFormProps {\r\n    let matrixSizesProp: SkuDetails[][] = [];\r\n    let regularSizesProp: SkuDetails[][] = [];\r\n  \r\n    if (isMatrixSize) {\r\n        const firstSize = productVariants[0]?.size ?? \"\";\r\n\r\n        if (isSuitSize(firstSize)) {\r\n            // Suit sizes -> grouped by width (matrixSizeW) and list matching lengths (matrixSizeL)\r\n            const groupedByWidth: Record<string, SkuDetails[]> = {};\r\n\r\n            productVariants.forEach((variant) => {\r\n                const mappedDetails = {\r\n                    ...mapVariantToSkuDetails(variant),\r\n                    isMatrix: true,\r\n                    matrixSizeL: variant.size?.slice(2) ?? \"\", // Extract Length (e.g., '30' from '3032')\r\n                    matrixSizeW: variant.size?.slice(0, 2) ?? \"\", // Extract Width (e.g., '32' from '3032')\r\n                    suitSize: variant.size?.slice(2) ?? \"\", // Suit size reuses length\r\n                    suitWidth: variant.size?.charAt(0) ?? \"\", // Suit width mapped from the first digit\r\n                    suitLength: variant.size?.charAt(1) ?? \"\", // Suit length mapped from second digit\r\n                };\r\n\r\n                if (!groupedByWidth[mappedDetails.matrixSizeW]) {\r\n                    groupedByWidth[mappedDetails.matrixSizeW] = [];\r\n                }\r\n                groupedByWidth[mappedDetails.matrixSizeW].push(mappedDetails);\r\n            });\r\n\r\n            // Convert object values into an array of arrays\r\n            matrixSizesProp = Object.values(groupedByWidth);\r\n        } else {\r\n            // Pants sizes -> each variant gets its own array with one reactive object\r\n            matrixSizesProp = productVariants.map((variant) => {\r\n                const size = variant.size ?? \"\";\r\n\r\n                let width = \"\";\r\n                let length = \"\";\r\n\r\n                if (/^\\d+$/.test(size.slice(0, 2))) {\r\n                    // Case 1: Numeric width (e.g., \"3032\")\r\n                    width = size.slice(0, 2);\r\n                    length = size.slice(2);\r\n                } else {\r\n                    // Case 2: Letter-based width (e.g., \"L30\")\r\n                    const match = size.match(/^([A-Za-z]+)(\\d+)$/);\r\n                    width = match ? match[1] : \"\";\r\n                    length = match ? match[2] : \"\";\r\n                }\r\n\r\n                return [\r\n                    {\r\n                        ...mapVariantToSkuDetails(variant),\r\n                        isMatrix: true,\r\n                        matrixSizeL: length, // Correct length\r\n                        matrixSizeW: width, // Correct width\r\n                        suitWidth: \"\",\r\n                        suitLength: \"\",\r\n                        suitSize: \"\",\r\n                    },\r\n                ];\r\n            });\r\n        }\r\n    } else {\r\n        // Regular sizes -> one array containing all variants\r\n        regularSizesProp = [productVariants.map(mapVariantToSkuDetails)];\r\n    }\r\n  \r\n    return {\r\n      matrixSizes: matrixSizesProp,\r\n      regularSizes: regularSizesProp,\r\n      shopId: store || \"\",\r\n      isSizeGuide: false,\r\n      isProductInStock: product.inStock,\r\n      productAvailableInStore: false,\r\n      displayName: product.title || \"\",\r\n      itemColor: product.custom?.ColorName?.[0]?.label || \"\",\r\n      itemMetaColor: product.custom?.MetaColor?.[0]?.label || \"\",\r\n      cartStatusImage: product.imageInfo?.thumbnail || \"\",\r\n      checkoutLink: \"\",\r\n      esalesKey: product.key || \"\",\r\n      addToCartCallback: addToCartCallback,\r\n      isQuickAdd: true,\r\n      itemListId: itemListId,\r\n      itemListName: itemListName,\r\n    };\r\n  }","<template>\r\n  <article\r\n    class=\"teaser-product teaser-product--variation _js-product-variation\"\r\n    :data-variation-id=\"product.key\"\r\n    :data-variation=\"trackingAsString\"\r\n  >\r\n    <a\r\n      :href=\"product.link\"\r\n      class=\"teaser-product__link-image\"\r\n      tabindex=\"0\"\r\n      :aria-label=\"`${product.brand} ${product.title}`\"\r\n      @click=\"clickLink\"\r\n      @click.middle=\"middleClickLink\"\r\n      @click.right=\"rightClickLink\"\r\n    >\r\n      <h3 class=\"sr-only\">{{ product.brand }} {{ product.title }}</h3>\r\n      <div\r\n        v-if=\"product.isNews || product.isInStockOnWeb\"\r\n        class=\"teaser-product__not-available\"\r\n      >\r\n        {{ $t(\"soldOut\") }}\r\n      </div>\r\n      <div class=\"teaser-product__photos\">\r\n        <div class=\"teaser-product__photo\">\r\n          <ResponsiveImage\r\n            v-if=\"productImage\"\r\n            width=\"642\"\r\n            height=\"856\"\r\n            img-class=\"teaser-product__image\"\r\n            :src=\"fallbackImage\"\r\n            :sources=\"imageSources\"\r\n          />\r\n        </div>\r\n        <div\r\n          v-if=\"hoverColor && hoverColor.fallbackImage\"\r\n          class=\"teaser-product__photo teaser-product__photo--variant\"\r\n        >\r\n          <ResponsiveImage\r\n            width=\"642\"\r\n            height=\"856\"\r\n            img-class=\"teaser-product__image\"\r\n            :src=\"hoverColor.fallbackImage\"\r\n            :sources=\"hoverColor.imageSources\"\r\n            :lazy=\"false\"\r\n          />\r\n        </div>\r\n        <div v-if=\"!props.hidePromotion\" class=\"label__container\">\r\n          <template v-if=\"memberPromotion\">\r\n            <span :class=\"`label ${memberPromotion?.className}`\">\r\n              {{ memberPromotion.text }}\r\n            </span>\r\n          </template>\r\n          <template v-if=\"promotion\">\r\n            <span :class=\"`label ${promotion.className}`\">\r\n              {{ promotion.text }}\r\n            </span>\r\n          </template>\r\n        </div>\r\n      </div>\r\n    </a>\r\n    <div class=\"teaser-product__elements\">\r\n    <div class=\"teaser-product__content\">\r\n      <!-- Favorite button -->\r\n      <div\r\n        v-if=\"!props.hideFavorites && epiProductCode\"\r\n        class=\"teaser-product__lovebutton\"\r\n      >\r\n        <button\r\n          type=\"button\"\r\n          class=\"btn btn--small btn--transparent love\"\r\n          :class=\"{\r\n            'is-loved': isFavorite,\r\n          }\"\r\n          :disabled=\"favoriteStore.isLoadingFavorites\"\r\n          aria-hidden=\"true\"\r\n          :title=\"$tc(title)\"\r\n          :aria-expanded=\"!isUserAuthenticated ? isLoginActive : undefined\"\r\n          :aria-controls=\"!isUserAuthenticated ? 'login' : undefined\"\r\n          @click=\"clickFavorite()\"\r\n        >\r\n          <Icon :type=\"IconTypes.Heart\" :size=\"IconSizes.Tiny\" />\r\n        </button>\r\n      </div>\r\n      <!-- Colors -->\r\n      <div class=\"teaser-product__colors\" v-if=\"!props.hideColors\">\r\n        <a\r\n          v-for=\"color in colorVariationsToDisplay\"\r\n          :key=\"color.rgb\"\r\n          :href=\"color.url\"\r\n          :class=\"[\r\n            `item-color`,\r\n            color.isSelf ? `self` : null,\r\n            color.meta ? `item-color--${color.meta}` : null,\r\n          ]\"\r\n          :style=\"{ 'background-color': `rgb(${color.rgb})` }\"\r\n          :aria-label=\"`${color.name} (${color.meta}) ${product.title}`\"\r\n          @mouseover=\"mouseOverColor(color)\"\r\n          @mouseout=\"mouseOutColor()\"\r\n        ></a>\r\n        <span v-if=\"remainingColorVariations > 0\" class=\"remaining-colors\">\r\n          +{{ remainingColorVariations }}\r\n        </span>\r\n      </div>\r\n      <!-- Brand -->\r\n      <div class=\"teaser-product__brand\">\r\n        {{ product.brand }}\r\n      </div>\r\n      <!-- Sizes -->\r\n      <template v-if=\"!props.hideSizes && isInStock\">\r\n        <div v-if=\"sizes\" class=\"teaser-product__sizes\">\r\n          <template v-if=\"isMatrixSize\">\r\n            <span>{{ $t(\"availableInManySizes\") }}</span>\r\n          </template>\r\n          <template v-else>\r\n            <span\r\n              v-for=\"size in sizes\"\r\n              :key=\"size.label\"\r\n              :class=\"{\r\n                'teaser-product__sizes__outofstock': !size.available,\r\n              }\"\r\n              >{{ formatSize(size.label) }}\r\n            </span>\r\n          </template>\r\n        </div>\r\n      </template>\r\n      <template v-if=\"!props.hideSizes && !isInStock\">\r\n        <div class=\"teaser-product__sizes\">\r\n          <span>{{ $t(\"onlyInStores\") }}</span>\r\n        </div>\r\n      </template>\r\n      <!-- Highlight text (not sure if used) -->\r\n      <div\r\n        v-if=\"product.custom.HighlightText\"\r\n        class=\"teaser-product__highlight-text\"\r\n      >\r\n        {{ product.custom.HighlightText[0].label }}\r\n      </div>\r\n      <!-- Name -->\r\n      <div class=\"teaser-product__name\">\r\n        <a\r\n          :href=\"product.link\"\r\n          aria-hidden=\"true\"\r\n          @click=\"clickLink\"\r\n          @click.middle=\"middleClickLink\"\r\n          @click.right=\"rightClickLink\"\r\n        >\r\n          {{ product.title }}\r\n        </a>\r\n      </div>\r\n      <!-- Price -->\r\n      <div class=\"teaser-product__price\">\r\n        <div v-if=\"price\" class=\"price\">\r\n          {{ price }}\r\n        </div>\r\n        <div v-if=\"newPrice\" class=\"price price--new\">\r\n          {{ newPrice }}\r\n        </div>\r\n        <div v-if=\"oldPrice\" class=\"price price--old\">\r\n          {{ oldPrice }}\r\n        </div>\r\n      </div>\r\n      <!-- Member promotion -->\r\n      <div\r\n        v-if=\"product.custom.MemberPromotion\"\r\n        class=\"teaser-product__members-promotions-text\"\r\n      >\r\n        {{ product.custom.MemberPromotion[0].label }}\r\n      </div>\r\n    </div>\r\n\r\n      <!-- Quick add button -->\r\n      <button\r\n        v-if=\"isInStock && isQuickAdd\"\r\n        class=\"btn btn--small btn--transparent teaser-product__quickadd\"\r\n        type=\"button\"\r\n        @click=\"openQuickAddDialog\"\r\n      >\r\n        {{ $t(\"quickAdd\") }}\r\n      </button>\r\n\r\n      <!-- PopupDialog with AddToCartForm slotted -->\r\n        <dialog\r\n          v-if=\"isInStock && isQuickAdd\"\r\n          ref=\"quickAddDialogElement\"\r\n          class=\"quick-add-dialog\"\r\n          :class=\"{ 'is-visible': isDialogVisible }\"\r\n          aria-live=\"polite\"\r\n          :aria-hidden=\"!isDialogVisible\"\r\n          role=\"dialog\"\r\n          aria-labelledby=\"quick-add-dialog-heading\"\r\n          @click.self=\"closeQuickAddDialog\"\r\n        >\r\n          <article class=\"quick-add-dialog__content\">\r\n            <!-- Close Button -->\r\n            <button\r\n              class=\"btn btn--small btn--link btn--close quick-add-dialog__close\"\r\n              type=\"button\"\r\n              @click.prevent=\"closeQuickAddDialog\"\r\n              :title=\"$t('close')\"\r\n            >\r\n              <Icon type=\"close\" />\r\n            </button>\r\n\r\n            <div class=\"quick-add-dialog__body\">\r\n              <div class=\"quick-add-dialog__image\">\r\n                <a\r\n                  :href=\"product.link\"\r\n                  class=\"quick-add-dialog__image--link\"\r\n                  tabindex=\"0\"\r\n                  :aria-label=\"`${product.brand} ${product.title}`\"\r\n                  @click=\"clickLink\"\r\n                  @click.middle=\"middleClickLink\"\r\n                  @click.right=\"rightClickLink\"\r\n                >\r\n                  <picture>\r\n                    <source type=\"image/webp\" :srcset=\"fallbackImage\" />\r\n                    <img\r\n                      alt=\"\"\r\n                      width=\"auto\"\r\n                      height=\"auto\"\r\n                      :src=\"fallbackImage\"\r\n                      :sources=\"imageSources\"\r\n                    />\r\n                  </picture>\r\n                </a>\r\n                <div class=\"quick-add-dialog__product-info quick-add-dialog__product-info--mobile\">\r\n                  <div class=\"product__info\">\r\n                    <h3 class=\"product__brand\">{{ product.brand }}</h3>\r\n                    <span class=\"product__name product__name--large\">\r\n                      <a\r\n                        :href=\"product.link\"\r\n                        aria-hidden=\"true\"\r\n                        @click=\"clickLink\"\r\n                        @click.middle=\"middleClickLink\"\r\n                        @click.right=\"rightClickLink\"\r\n                      >\r\n                        {{ product.title }}\r\n                      </a>\r\n                    </span>\r\n                    <p class=\"product__price product__price--large\">\r\n                      <div v-if=\"price\" class=\"price\">\r\n                        {{ price }}\r\n                      </div>\r\n                      <div v-if=\"newPrice\" class=\"price price--new\">\r\n                        {{ newPrice }}\r\n                      </div>\r\n                      <div v-if=\"oldPrice\" class=\"price price--old\">\r\n                        {{ oldPrice }}\r\n                      </div>\r\n                    </p>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n              <div class=\"quick-add-dialog__main\">\r\n                <!-- Header with Product Info -->\r\n                <div class=\"quick-add-dialog__product-info quick-add-dialog__product-info--desktop\">\r\n                  <div class=\"product__info\">\r\n                    <h3 class=\"product__brand\">{{ product.brand }}</h3>\r\n                    <span class=\"product__name product__name--large\">\r\n                      <a\r\n                        :href=\"product.link\"\r\n                        aria-hidden=\"true\"\r\n                        @click=\"clickLink\"\r\n                        @click.middle=\"middleClickLink\"\r\n                        @click.right=\"rightClickLink\"\r\n                      >\r\n                        {{ product.title }}\r\n                      </a>\r\n                    </span>\r\n                    <p class=\"product__price product__price--large\">\r\n                      <div v-if=\"price\" class=\"price\">\r\n                        {{ price }}\r\n                      </div>\r\n                      <div v-if=\"newPrice\" class=\"price price--new\">\r\n                        {{ newPrice }}\r\n                      </div>\r\n                      <div v-if=\"oldPrice\" class=\"price price--old\">\r\n                        {{ oldPrice }}\r\n                      </div>\r\n                    </p>\r\n                  </div>\r\n                </div>\r\n                <!-- AddToCartForm -->\r\n                <div class=\"quick-add-dialog__form\">\r\n                  <AddToCartForm v-if=\"isDialogVisible\" v-bind=\"addToCartFormProps\" :key=\"dialogKey\" />\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </article>\r\n        </dialog>\r\n    </div>\r\n  </article>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { notifyClick } from \"../../mixins/notifyClick\";\r\nimport { getProductClickEvent, pushDataToGtm } from \"../../mixins/tracking\";\r\nimport {\r\n  ProductVariant,\r\n  Product,\r\n  ProductImage,\r\n  ProductImageSource,\r\n  ProductGroup,\r\n} from \"../../services/search.service\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport ResponsiveImage from \"../../components/responsiveImage/responsiveImage.vue\";\r\nimport { formatSize} from \"../../mixins/productSize.mixin\";\r\nimport {\r\n  computeMemberPromotion,\r\n  computePromotion,\r\n} from \"../../mixins/productBadge.mixin\";\r\nimport {\r\n  computeNewPrice,\r\n  computeOldPrice,\r\n  computePrice,\r\n  computeRebate,\r\n  priceAsNumber,\r\n} from \"../../mixins/productPrice.mixin\";\r\nimport { getCustomApptusValue } from \"../../utils/search.utils\";\r\nimport { computed, ref, onUnmounted, watch, onMounted } from \"vue\";\r\nimport { useFavoritesStore } from \"../../stores/favoritesStore\";\r\nimport GtmService from \"../../services/gtm.service\";\r\nimport AddToCartForm, {\r\n  AddToCartFormProps,\r\n} from \"../addToCartForm/addToCartForm.vue\";\r\nimport { mapProductsToAddToCartFormProps } from \"../../mixins/addToCart.mixin\";\r\n\r\nconst props = defineProps<{\r\n  userId: string;\r\n  productGroup: ProductGroup;\r\n  product: Product;\r\n  isUserAuthenticated: boolean;\r\n  useGtmTracking: boolean;\r\n  isLoadingProducts?: boolean;\r\n  isLoadingFavorites?: boolean;\r\n  smallLabel?: boolean;\r\n  hideSizes?: boolean;\r\n  hideColors?: boolean;\r\n  hidePromotion?: boolean;\r\n  hideFavorites?: boolean;\r\n  trackSelectItem?: boolean;\r\n  itemListId?: string;\r\n  itemListName?: string;\r\n  itemListIndex?: number;\r\n  store?: string;\r\n  isQuickAdd?: boolean;\r\n}>();\r\n\r\nconst isLoginActive = ref(false);\r\nconst hoverColor = ref<HoverColor>();\r\nconst favoriteStore = useFavoritesStore();\r\nconst quickAddDialogElement = ref<HTMLDialogElement | null>(null);\r\nconst isDialogVisible = ref(false);\r\nconst dialogKey = ref(0); // Unique key to force re-render of AddToCartForm\r\nconst breakpoint = 1025;\r\nlet mediaQueryMax: MediaQueryList | null = null;\r\nlet mediaQueryMin: MediaQueryList | null = null;\r\n\r\nconst openQuickAddDialog = () => {\r\n  if (quickAddDialogElement.value) {\r\n    isDialogVisible.value = true;\r\n    dialogKey.value++; // Change key to force unmount/mount\r\n    quickAddDialogElement.value.showModal();\r\n  } else {\r\n    console.warn(\"quickAddDialogElement is not ready yet.\");\r\n  }\r\n};\r\n\r\nconst closeQuickAddDialog = () => {\r\n  isDialogVisible.value = false;\r\n  quickAddDialogElement.value?.close();\r\n};\r\n\r\nconst handleBreakpointChange = () => {\r\n  if (isDialogVisible.value) {\r\n    closeQuickAddDialog();\r\n  }\r\n};\r\n\r\nconst addToCartFormProps = computed<AddToCartFormProps>(() => {\r\n  return mapProductsToAddToCartFormProps(\r\n    props.product.variants,\r\n    isMatrixSize.value,\r\n    props.product,\r\n    props.store ?? \"\",\r\n    closeQuickAddDialog,\r\n    props.itemListId,\r\n    props.itemListName\r\n  );\r\n});\r\n\r\nconst isFavorite = computed(() => {\r\n  if (!favoriteStore) {\r\n    return false;\r\n  }\r\n  if (!epiProductCode.value) {\r\n    return false;\r\n  }\r\n\r\n  return favoriteStore.isFavorite(epiProductCode.value);\r\n});\r\n\r\nconst newPrice = computed(() => {\r\n  return computeNewPrice(props.product);\r\n});\r\n\r\nconst oldPrice = computed(() => {\r\n  return computeOldPrice(props.product);\r\n});\r\n\r\nconst price = computed(() => {\r\n  return computePrice(props.product);\r\n});\r\n\r\nconst rebate = computed(() => {\r\n  return computeRebate(props.product);\r\n});\r\n\r\nconst promotion = computed(() => {\r\n  return computePromotion(props.product, props.smallLabel);\r\n});\r\n\r\nconst memberPromotion = computed(() => {\r\n  return computeMemberPromotion(props.product, props.smallLabel);\r\n});\r\n\r\nconst title = computed(() => {\r\n  return isFavorite.value ? \"removeFavorite\" : \"addFavorite\";\r\n});\r\n\r\nconst epiProductCode = computed((): string => {\r\n  return props.product.custom.EpiPoductCode[0].label;\r\n});\r\n\r\ntype Color = {\r\n  isSelf: boolean;\r\n  rgb: string;\r\n  name: string;\r\n  url: string;\r\n  meta: string;\r\n  imageAlt: string;\r\n  fallbackImage: string;\r\n  imageSources: Array<{\r\n    srcset: string;\r\n    media: string;\r\n    type: string;\r\n  }>;\r\n};\r\ntype HoverColor = Color | null;\r\n\r\nconst colors = computed((): Color[] => {\r\n  const colorList: Color[] = [];\r\n  const validProducts = props.productGroup.products;\r\n\r\n  validProducts.forEach((product) => {\r\n    const productImage = product.imageInfo?.images?.[0];\r\n\r\n    const color: Color = {\r\n      isSelf: product === props.product,\r\n      rgb: product.custom?.RGBColorCode?.[0]?.label || \"\",\r\n      name: product.custom?.ColorName?.[0]?.label || \"\",\r\n      url: product.link,\r\n      meta: product.custom?.MetaColor?.[0]?.label?.toLowerCase() || \"\",\r\n      imageAlt: productImage?.alt || \"\",\r\n      fallbackImage: productImage ? getFallbackImage(productImage) : \"\",\r\n      imageSources: productImage ? getImageSources(productImage) : [],\r\n    };\r\n\r\n    colorList.push(color);\r\n  });\r\n\r\n  return colorList;\r\n});\r\n\r\nconst colorsDisplayCount = computed(() =>\r\n  Math.min(props.store === \"JeanPaul\" ? 5 : 7, colors.value.length),\r\n);\r\n\r\nconst colorVariationsToDisplay = computed(() =>\r\n  colors.value.slice(0, colorsDisplayCount.value),\r\n);\r\n\r\nconst remainingColorVariations = computed(\r\n  () => colors.value.length - colorsDisplayCount.value,\r\n);\r\n\r\nconst isMatrixSize = computed((): boolean => {\r\n  return props.product.custom?.IsMatrixSize?.[0]?.label === \"True\";\r\n});\r\n\r\nconst metaColor = computed((): string => {\r\n  const product = props.product as Product;\r\n\r\n  return product.custom?.MetaColor?.[0]?.label;\r\n});\r\n\r\nconst department = computed((): string => {\r\n  const product = props.product as Product;\r\n\r\n  return product.custom?.Dept?.[0]?.label;\r\n});\r\n\r\nconst category = computed((): string => {\r\n  const product = props.product as Product;\r\n\r\n  return getCustomApptusValue(product, \"Category\");\r\n});\r\n\r\nconst gtmStockStatus = computed((): string => {\r\n  const product = props.product as Product;\r\n\r\n  return product.custom?.GtmStockStatus?.[0]?.label;\r\n});\r\n\r\nconst isInStock = computed((): boolean => {\r\n  return (props.product as Product).inStock;\r\n});\r\n\r\nconst variantsInStock = computed((): ProductVariant[] => {\r\n  const product = props.product as Product;\r\n\r\n  return (product.variants || []).filter((variant: ProductVariant) => {\r\n    return !!variant.inStock;\r\n  });\r\n});\r\n\r\nconst sizes = computed(\r\n  (): Array<{\r\n    label: string;\r\n    available: boolean;\r\n  }> => {\r\n    return (variantsInStock.value || [])\r\n      .filter((variant: ProductVariant) => {\r\n        return !!variant.size;\r\n      })\r\n      .map((variant: ProductVariant) => {\r\n        return {\r\n          label: variant.size as string,\r\n          available: true,\r\n        };\r\n      });\r\n  },\r\n);\r\n\r\nconst productImage = computed((): ProductImage | undefined => {\r\n  if (props.product.imageInfo && props.product.imageInfo.images) {\r\n    return props.product.imageInfo.images[0];\r\n  }\r\n  return undefined;\r\n});\r\n\r\nconst fallbackImage = computed((): string => {\r\n  if (!productImage.value) {\r\n    return \"\";\r\n  } else {\r\n    return getFallbackImage(productImage.value);\r\n  }\r\n});\r\n\r\nconst imageSources = computed(\r\n  ():\r\n    | Array<{\r\n        srcset: string;\r\n        media: string;\r\n        type: string;\r\n      }>\r\n    | undefined => {\r\n    if (!productImage.value) {\r\n      return;\r\n    }\r\n\r\n    return getImageSources(productImage.value);\r\n  },\r\n);\r\n\r\nconst tracking = computed((): object | undefined => {\r\n  if (!props.useGtmTracking) {\r\n    return undefined;\r\n  }\r\n\r\n  const tracking = getProductClickEvent({\r\n    userId: props.userId || \"\",\r\n    department: department.value,\r\n    brand: props.product.brand,\r\n    category: category.value,\r\n    rebate: rebate.value,\r\n    stock: gtmStockStatus.value,\r\n    price: priceAsNumber(props.product),\r\n    metaColor: metaColor.value,\r\n    key: props.product.key,\r\n    title: props.product.title,\r\n  });\r\n\r\n  return tracking;\r\n});\r\n\r\nconst trackingAsString = computed((): string | undefined => {\r\n  if (!props.useGtmTracking) {\r\n    return undefined;\r\n  }\r\n\r\n  return JSON.stringify(tracking.value);\r\n});\r\n\r\nonMounted(() => {\r\n  // Detect going below 1025px\r\n  mediaQueryMax = window.matchMedia(`(max-width: ${breakpoint}px)`);\r\n  mediaQueryMax.addEventListener(\"change\", handleBreakpointChange);\r\n\r\n  // Detect going above 1025px\r\n  mediaQueryMin = window.matchMedia(`(min-width: ${breakpoint + 1}px)`);\r\n  mediaQueryMin.addEventListener(\"change\", handleBreakpointChange);\r\n});\r\n\r\nonUnmounted(() => {\r\n  if (mediaQueryMax) {\r\n    mediaQueryMax.removeEventListener(\"change\", handleBreakpointChange);\r\n  }\r\n  if (mediaQueryMin) {\r\n    mediaQueryMin.removeEventListener(\"change\", handleBreakpointChange);\r\n  }\r\n  const loginModalEl = document.getElementById(\"login\");\r\n\r\n  if (loginModalEl) {\r\n    loginModalEl.removeEventListener(\"elementToggled\", hideLogin);\r\n  }\r\n});\r\n\r\nwatch(() => isDialogVisible, (newVal) => {\r\n  if (newVal) {\r\n    quickAddDialogElement.value?.showModal();\r\n  } else {\r\n    quickAddDialogElement.value?.close();\r\n  }\r\n});\r\n\r\n/**\r\n * Click link\r\n */\r\nfunction clickLink($event: Event) {\r\n  notifyClick($event, props.product);\r\n\r\n  if (props.useGtmTracking) {\r\n    pushDataToGtm(tracking);\r\n  }\r\n\r\n  if (props.trackSelectItem) {\r\n    GtmService.pushSelectItemEvent(\r\n      props.itemListId ?? \"\",\r\n      props.itemListName ?? \"\",\r\n      props.isUserAuthenticated,\r\n      props.product,\r\n      props.itemListIndex,\r\n    );\r\n  }\r\n}\r\n\r\n/**\r\n * Middle click link\r\n */\r\nfunction middleClickLink($event: Event) {\r\n  notifyClick($event, props.product);\r\n}\r\n\r\n/**\r\n * Right click link\r\n */\r\nfunction rightClickLink($event: Event) {\r\n  notifyClick($event, props.product);\r\n}\r\n\r\n/**\r\n * Click favorite\r\n */\r\nfunction clickFavorite(): void {\r\n  if (props.isUserAuthenticated) {\r\n    return toggleFavorite();\r\n  }\r\n  if (favoriteStore.isLoadingFavorites) {\r\n    return;\r\n  }\r\n  displayLogin();\r\n}\r\n\r\n/**\r\n * Display login\r\n */\r\nfunction displayLogin() {\r\n  const loginModalEl = document.getElementById(\"login\");\r\n\r\n  if (loginModalEl) {\r\n    loginModalEl.classList.toggle(\"is-active\");\r\n\r\n    isLoginActive.value = true;\r\n\r\n    loginModalEl.addEventListener(\"elementToggled\", hideLogin);\r\n  }\r\n}\r\n\r\n/**\r\n * Hide login\r\n */\r\nfunction hideLogin() {\r\n  const loginModalEl = document.getElementById(\"login\");\r\n\r\n  isLoginActive.value = false;\r\n\r\n  if (loginModalEl) {\r\n    loginModalEl.removeEventListener(\"elementToggled\", hideLogin);\r\n  }\r\n}\r\n\r\n/**\r\n * Toggle favorite\r\n */\r\nfunction toggleFavorite(): void {\r\n  if (!epiProductCode.value) {\r\n    return;\r\n  }\r\n\r\n  favoriteStore.toggleFavorite(epiProductCode.value);\r\n}\r\n\r\n/**\r\n * Mouse over color\r\n */\r\nfunction mouseOverColor(color) {\r\n  hoverColor.value = color;\r\n}\r\n\r\n/**\r\n * Mouse out color\r\n */\r\nfunction mouseOutColor() {\r\n  hoverColor.value = null;\r\n}\r\n\r\nfunction getFallbackImage(productImage: ProductImage): string {\r\n  return productImage.sources[productImage.sources.length - 1].url;\r\n}\r\n\r\nfunction getImageSources(productImage: ProductImage): Array<{\r\n  srcset: string;\r\n  media: string;\r\n  type: string;\r\n}> {\r\n  const sources = productImage.sources.slice(0, -1);\r\n\r\n  return sources.map((source: ProductImageSource, i: number) => {\r\n    const isLast = i === sources.length - 1;\r\n\r\n    return {\r\n      srcset: source.url,\r\n      media: isLast ? \"\" : `(max-width: ${source.width * 2}px)`,\r\n      type: \"image/webp\",\r\n    };\r\n  });\r\n}\r\n</script>\r\n","<script setup lang=\"ts\">\r\nimport { computed } from \"vue\";\r\n\r\nexport interface CategoryBlockProps {\r\n  imageUrl: string;\r\n  imageAltText: string;\r\n  heading: string;\r\n  subHeading: string;\r\n  text: string;\r\n  rowIndex: number;\r\n  leftOrRight: string;\r\n  layout: string;\r\n  link?: string;\r\n}\r\n\r\nconst props = defineProps<{\r\n  categoryBlock: CategoryBlockProps;\r\n}>();\r\n\r\nconst rowStyle = computed(() => \"--itemRow: \" + props.categoryBlock.rowIndex);\r\nconst layoutClass = computed(\r\n  () => \"category-grid__item--\" + props.categoryBlock.layout.toLowerCase(),\r\n);\r\nconst leftOrRightClass = computed(\r\n  () => \"category-grid__item--\" + props.categoryBlock.leftOrRight.toLowerCase(),\r\n);\r\nconst content = computed(\r\n  () =>\r\n    props.categoryBlock.heading ||\r\n    props.categoryBlock.subHeading ||\r\n    props.categoryBlock.text,\r\n);\r\nconst imageContainerElement = computed(() =>\r\n  props.categoryBlock.link ? \"a\" : \"div\",\r\n);\r\n</script>\r\n\r\n<template>\r\n  <li\r\n    class=\"category-grid__item\"\r\n    :class=\"[leftOrRightClass, layoutClass]\"\r\n    :style=\"rowStyle\"\r\n  >\r\n    <div class=\"category-block\">\r\n      <component\r\n        :is=\"imageContainerElement\"\r\n        :href=\"props.categoryBlock.link\"\r\n        class=\"category-block__link\"\r\n      >\r\n        <div class=\"category-block__image\">\r\n          <img\r\n            v-if=\"props.categoryBlock.imageUrl\"\r\n            :src=\"props.categoryBlock.imageUrl\"\r\n            :alt=\"props.categoryBlock?.imageAltText\"\r\n          />\r\n        </div>\r\n      </component>\r\n      <!-- <div class=\"category-block__content\" v-if=\"content\">\r\n        <h3 class=\"category-block__heading\" v-if=\"props.categoryBlock.heading\">\r\n          {{ props.categoryBlock.heading }}\r\n        </h3>\r\n        <p class=\"category-block__text\" v-if=\"props.categoryBlock.subHeading\">\r\n          {{ props.categoryBlock.subHeading }}\r\n        </p>\r\n        <p class=\"category-block__text\" v-if=\"props.categoryBlock.text\">\r\n          {{ props.categoryBlock.text }}\r\n        </p>\r\n      </div> -->\r\n    </div>\r\n  </li>\r\n</template>\r\n","<template>\r\n  <div>\r\n    <!-- Search result: Facets -->\r\n    <div\r\n      v-if=\"primaryList && primaryList.facets\"\r\n      class=\"layout-searchpage__filters\"\r\n      :class=\"{\r\n        'is-active': showFacets,\r\n      }\"\r\n    >\r\n      <template v-if=\"searchpage\">\r\n        <h2\r\n          v-if=\"\r\n            primaryList &&\r\n            primaryList.productGroups &&\r\n            primaryList.productGroups.length > 0\r\n          \"\r\n          class=\"layout-searchpage__subheading\"\r\n        >\r\n          {{ $t(\"hitsIn\") }} {{ $t(\"products\") }}\r\n          <span class=\"layout-searchpage__hit-count\"\r\n            >({{ primaryList.totalHits }} {{ $t(\"hits\") }})</span\r\n          >\r\n        </h2>\r\n      </template>\r\n      <template v-else>\r\n        <component\r\n          :is=\"headingLevelWithDefault\"\r\n          class=\"layout-category__heading\"\r\n        >\r\n          {{ heading }}\r\n          <span\r\n            v-if=\"\r\n              primaryList &&\r\n              primaryList.productGroups &&\r\n              primaryList.productGroups.length > 0\r\n            \"\r\n            class=\"layout-category__heading__count\"\r\n          >\r\n            {{ primaryList.totalHits }} {{ $t(\"styles\") }}\r\n          </span>\r\n        </component>\r\n      </template>\r\n      <!-- SEO Information -->\r\n      <div v-if=\"props.seoInformation\" class=\"layout-category__seo-information\">\r\n        <span>\r\n          {{\r\n            isSmallScreen && !isExpanded ? truncatedText : props.seoInformation\r\n          }}\r\n        </span>\r\n        <button\r\n          v-if=\"isSmallScreen && props.seoInformation.length > maxCharacters\"\r\n          @click=\"toggleReadMore\"\r\n          class=\"btn--read-more\"\r\n        >\r\n          {{ isExpanded ? $t(\"readLess\") : $t(\"readMore\") }}\r\n        </button>\r\n      </div>\r\n      <!-- Subcategories -->\r\n      <template v-if=\"subcategories && subcategories.length != 0\">\r\n        <div class=\"product-subcategories\">\r\n          <template v-for=\"subcategory in subcategories\" :key=\"subcategory.url\">\r\n            <a\r\n              :href=\"subcategory.url\"\r\n              :class=\"{\r\n                'is-active': subcategory.isSelected,\r\n              }\"\r\n              class=\"product-subcategories__subcategory\"\r\n              >{{ subcategory.name }}</a\r\n            >\r\n          </template>\r\n        </div>\r\n      </template>\r\n      <!-- End Subcategories -->\r\n      <div class=\"layout-searchpage__mobile-filters\">\r\n        <button\r\n          class=\"btn btn--category-filters\"\r\n          data-togglewhat=\"categoryMenu\"\r\n          aria-expanded=\"false\"\r\n          @click=\"showFacets = !showFacets\"\r\n          @keyup.esc=\"esc()\"\r\n        >\r\n          <span class=\"u-text-smaller\">Filtrer</span>\r\n          <Icon type=\"sorting\" />\r\n        </button>\r\n      </div>\r\n      <div\r\n        class=\"layout-category__navigation\"\r\n        :class=\"{\r\n          'is-active': showFacets,\r\n        }\"\r\n      >\r\n        <div class=\"layout-category__navigation__scroll\">\r\n          <div\r\n            class=\"product-filter__submit product-filter__submit--fixed u-hide-for-medium\"\r\n          >\r\n            <button\r\n              type=\"button\"\r\n              class=\"btn btn--inset btn--profile filter__btn-use\"\r\n              @click=\"showFacets = !showFacets\"\r\n            >\r\n              {{ $t(\"close\") }}\r\n            </button>\r\n          </div>\r\n          <div class=\"product-filter__facet-wrapper\">\r\n            <Facets\r\n              v-if=\"primaryList.facets\"\r\n              :facets=\"primaryList.facets\"\r\n              :sort=\"primaryList.sort\"\r\n              @upsertFacet=\"upsertFacet($event)\"\r\n              @updateSort=\"updateSort($event)\"\r\n              @useFilter=\"useFilter()\"\r\n            />\r\n            <Pills\r\n              v-if=\"primaryList.facets\"\r\n              :facets=\"primaryList.facets\"\r\n              @upsertFacet=\"upsertFacet($event)\"\r\n            />\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <!-- Search result: Products -->\r\n    <ul\r\n      v-if=\"\r\n        primaryList &&\r\n        primaryList.productGroups &&\r\n        primaryList.productGroups.length > 0\r\n      \"\r\n      class=\"category-grid\"\r\n      data-layout=\"4\"\r\n    >\r\n      <template v-for=\"(productGroup, index) in primaryList.productGroups\">\r\n        <template v-if=\"productGroup.products && productGroup.products[0]\">\r\n          <li\r\n            :key=\"`${productGroup.key}-${productGroup.products[0].key}`\"\r\n            class=\"category-grid__item\"\r\n          >\r\n            <ProductTeaser\r\n              :product-group=\"productGroup\"\r\n              :product=\"productGroup.products[0]\"\r\n              :is-user-authenticated=\"isUserAuthenticated\"\r\n              :hideFavoriteForm=\"hideFavorites\"\r\n              :use-gtm-tracking=\"useProductGtmTracking\"\r\n              :user-id=\"userId\"\r\n              :store=\"store\"\r\n            />\r\n          </li>\r\n          <!-- Render categoryBlocks on the corresponding rowIndex -->\r\n          <template\r\n            v-for=\"categoryBlock in props.categoryBlocks\"\r\n            :key=\"categoryBlock\"\r\n          >\r\n            <template v-if=\"categoryBlock.rowIndex === index\">\r\n              <!-- Render your category block component here -->\r\n              <CategoryBlock :category-block=\"categoryBlock\" />\r\n            </template>\r\n          </template>\r\n        </template>\r\n      </template>\r\n      <!-- Load more -->\r\n      <li\r\n        v-if=\"thereAreMorePages\"\r\n        class=\"category-grid__item category-grid__item--loadmore pageNum-container\"\r\n      >\r\n        <button class=\"btn btn--loadmore\" @click=\"clickNextPage()\">\r\n          {{ $t(\"loadMore\") }}\r\n        </button>\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, onMounted, ref, watch } from \"vue\";\r\nimport Facets from \"../../components/search/facets.vue\";\r\nimport Pills from \"../../components/search/pills.vue\";\r\nimport ProductTeaser from \"../../components/productTeaser/productTeaser.vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { PrimaryList } from \"../../services/models/search.models\";\r\nimport { SubCategories } from \"../categoryPage/categoryPage.vue\";\r\nimport CategoryBlock, {\r\n  CategoryBlockProps,\r\n} from \"../categoryBlock/categoryBlock.vue\";\r\n\r\nconst props = defineProps<{\r\n  heading?: string;\r\n  seoInformation?: string;\r\n  headingAlreadyOnPage?: boolean;\r\n  subcategories?: SubCategories;\r\n  searchpage: boolean;\r\n  primaryList: PrimaryList | null;\r\n  hideFavorites: boolean;\r\n  isUserAuthenticated: boolean;\r\n  thereAreMorePages: boolean;\r\n  useProductGtmTracking: boolean;\r\n  userId: string;\r\n  categoryBlocks?: Array<CategoryBlockProps>;\r\n  store: string;\r\n}>();\r\n\r\nconst showFacets = ref(false);\r\nconst isExpanded = ref(false); // Tracks whether the full text is shown\r\nconst maxCharacters = 80; // Character limit for SEO truncation\r\nconst isSmallScreen = ref(false); // Tracks if the screen size is small\r\n\r\nconst headingLevelWithDefault = computed(() =>\r\n  props.headingAlreadyOnPage ? \"h2\" : \"h1\",\r\n);\r\n\r\nconst truncatedText = computed(() =>\r\n  props.seoInformation && props.seoInformation.length > maxCharacters\r\n    ? `${props.seoInformation.slice(0, maxCharacters)}...`\r\n    : props.seoInformation,\r\n);\r\n\r\nonMounted(() => {\r\n  const focusedElement = document.getElementsByClassName(\"is-active\")[0];\r\n  (focusedElement as HTMLAnchorElement | null)?.focus();\r\n  const focusedElementWrapper = document.getElementsByClassName(\r\n    \"product-subcategories\",\r\n  )[0];\r\n  focusedElementWrapper?.scrollBy(50, 0);\r\n  handleResize();\r\n  window.addEventListener(\"resize\", handleResize);\r\n});\r\n\r\nwatch(isSmallScreen, () => {\r\n  // Reset the state if the screen size changes\r\n  if (!isSmallScreen.value) {\r\n    isExpanded.value = false;\r\n  }\r\n});\r\n\r\nconst emit = defineEmits([\r\n  \"upsertFacet\",\r\n  \"updateSort\",\r\n  \"useFilter\",\r\n  \"nextPage\",\r\n]);\r\n\r\n// Check if the screen size matches the \"small\" breakpoint\r\nfunction handleResize() {\r\n  const smallScreenMediaQuery = window.matchMedia(\"(max-width: 1025px)\");\r\n  isSmallScreen.value = smallScreenMediaQuery.matches;\r\n}\r\n/**\r\n * Toggle read more\r\n */\r\nfunction toggleReadMore() {\r\n  isExpanded.value = !isExpanded.value;\r\n}\r\n/**\r\n * Upsert facet\r\n */\r\nfunction upsertFacet(payload) {\r\n  emit(\"upsertFacet\", payload);\r\n}\r\n/**\r\n * Update sort\r\n */\r\nfunction updateSort(payload) {\r\n  emit(\"updateSort\", payload);\r\n}\r\n/**\r\n * Use filter\r\n */\r\nfunction useFilter() {\r\n  showFacets.value = false;\r\n\r\n  emit(\"useFilter\");\r\n}\r\n/**\r\n * Click next page\r\n */\r\nfunction clickNextPage() {\r\n  emit(\"nextPage\");\r\n}\r\n/**\r\n * Esc\r\n */\r\nfunction esc() {\r\n  showFacets.value = false;\r\n}\r\n</script>\r\n","<template>\r\n  <div class=\"teaser teaser--simple teaser--fixed-ratio teaser--small\">\r\n    <article>\r\n      <div class=\"teaser__photo\">\r\n        <a\r\n          :href=\"article.link\"\r\n          class=\"teaser__link\"\r\n          tabindex=\"-1\"\r\n          aria-hidden=\"true\"\r\n          @click=\"notifyClick($event, article)\"\r\n          @click.middle=\"notifyClick($event, article)\"\r\n          @click.right=\"notifyClick($event, article)\"\r\n        >\r\n          <ResponsiveImage\r\n            v-if=\"contentImage\"\r\n            width=\"856\"\r\n            height=\"642\"\r\n            :alt-text=\"contentImage.alt\"\r\n            :src=\"fallbackImage\"\r\n            :sources=\"imageSources\"\r\n          />\r\n        </a>\r\n      </div>\r\n      <div class=\"teaser__content\">\r\n        <h3 class=\"teaser__heading\">\r\n          <a\r\n            :href=\"article.link\"\r\n            @click=\"notifyClick($event, article)\"\r\n            @click.middle=\"notifyClick($event, article)\"\r\n            @click.right=\"notifyClick($event, article)\"\r\n          >\r\n            {{ article.title }}\r\n          </a>\r\n        </h3>\r\n      </div>\r\n    </article>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport NotifyClick from \"../../mixins/notifyClick\";\r\nimport ResponsiveImage from \"../../components/responsiveImage/responsiveImage.vue\";\r\nimport {\r\n  ContentItem,\r\n  ContentImage,\r\n  ContentImageSource,\r\n} from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    ResponsiveImage,\r\n  },\r\n  mixins: [NotifyClick],\r\n  props: [\"contentItem\"],\r\n  computed: {\r\n    article(): ContentItem {\r\n      return this.contentItem;\r\n    },\r\n    text(): string {\r\n      return (\r\n        this.article.custom &&\r\n        this.article.custom.MainIntro &&\r\n        this.article.custom.MainIntro[0] &&\r\n        this.article.custom.MainIntro[0].label\r\n      );\r\n    },\r\n    contentImage(): ContentImage | undefined {\r\n      if (this.article.image) {\r\n        return this.article.image;\r\n      }\r\n    },\r\n    fallbackImage(): string {\r\n      if (!this.contentImage) {\r\n        return \"\";\r\n      }\r\n\r\n      return getFallbackImage(this.contentImage);\r\n    },\r\n    imageSources():\r\n      | Array<{\r\n          srcset: string;\r\n          media: string;\r\n          type: string;\r\n        }>\r\n      | undefined {\r\n      if (!this.contentImage) {\r\n        return;\r\n      }\r\n\r\n      return getImageSources(this.contentImage);\r\n    },\r\n  },\r\n});\r\n\r\nfunction getFallbackImage(contentImage: ContentImage): string {\r\n  return contentImage.sources[contentImage.sources.length - 1].url;\r\n}\r\n\r\nfunction getImageSources(contentImage: ContentImage): Array<{\r\n  srcset: string;\r\n  media: string;\r\n  type: string;\r\n}> {\r\n  const sources = contentImage.sources.slice(0, -1);\r\n\r\n  return sources.map((source: ContentImageSource, i: number) => {\r\n    const isLast = i === sources.length - 1;\r\n\r\n    return {\r\n      srcset: source.url,\r\n      media: isLast ? \"\" : `(max-width: ${source.width * 2}px)`,\r\n      type: \"image/webp\",\r\n    };\r\n  });\r\n}\r\n</script>\r\n","<template>\r\n  <div class=\"teaser teaser--simple teaser--fixed-ratio teaser--small\">\r\n    <article>\r\n      <div class=\"teaser__photo\">\r\n        <a\r\n          :href=\"article.link\"\r\n          class=\"teaser__link\"\r\n          tabindex=\"-1\"\r\n          aria-hidden=\"true\"\r\n          @click=\"notifyClick($event, article)\"\r\n          @click.middle=\"notifyClick($event, article)\"\r\n          @click.right=\"notifyClick($event, article)\"\r\n        >\r\n          <ResponsiveImage\r\n            v-if=\"contentImage\"\r\n            width=\"856\"\r\n            height=\"642\"\r\n            :alt-text=\"contentImage.alt\"\r\n            :src=\"fallbackImage\"\r\n            :sources=\"imageSources\"\r\n          />\r\n        </a>\r\n      </div>\r\n      <div class=\"teaser__content\">\r\n        <h3 class=\"teaser__heading\">\r\n          <a\r\n            :href=\"article.link\"\r\n            @click=\"notifyClick($event, article)\"\r\n            @click.middle=\"notifyClick($event, article)\"\r\n            @click.right=\"notifyClick($event, article)\"\r\n          >\r\n            {{ article.title }}\r\n          </a>\r\n        </h3>\r\n      </div>\r\n    </article>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport NotifyClick from \"../../mixins/notifyClick\";\r\nimport ResponsiveImage from \"../../components/responsiveImage/responsiveImage.vue\";\r\nimport {\r\n  ContentItem,\r\n  ContentImage,\r\n  ContentImageSource,\r\n} from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    ResponsiveImage,\r\n  },\r\n  mixins: [NotifyClick],\r\n  props: [\"contentItem\"],\r\n  computed: {\r\n    article(): ContentItem {\r\n      return this.contentItem;\r\n    },\r\n    text(): string {\r\n      return (\r\n        this.article.custom &&\r\n        this.article.custom.MainIntro &&\r\n        this.article.custom.MainIntro[0] &&\r\n        this.article.custom.MainIntro[0].label\r\n      );\r\n    },\r\n    contentImage(): ContentImage | undefined {\r\n      if (this.article.image) {\r\n        return this.article.image;\r\n      }\r\n    },\r\n    fallbackImage(): string {\r\n      if (!this.contentImage) {\r\n        return \"\";\r\n      }\r\n\r\n      return getFallbackImage(this.contentImage);\r\n    },\r\n    imageSources():\r\n      | Array<{\r\n          srcset: string;\r\n          media: string;\r\n          type: string;\r\n        }>\r\n      | undefined {\r\n      if (!this.contentImage) {\r\n        return;\r\n      }\r\n\r\n      return getImageSources(this.contentImage);\r\n    },\r\n  },\r\n});\r\n\r\nfunction getFallbackImage(contentImage: ContentImage): string {\r\n  return contentImage.sources[contentImage.sources.length - 1].url;\r\n}\r\n\r\nfunction getImageSources(contentImage: ContentImage): Array<{\r\n  srcset: string;\r\n  media: string;\r\n  type: string;\r\n}> {\r\n  const sources = contentImage.sources.slice(0, -1);\r\n\r\n  return sources.map((source: ContentImageSource, i: number) => {\r\n    const isLast = i === sources.length - 1;\r\n\r\n    return {\r\n      srcset: source.url,\r\n      media: isLast ? \"\" : `(max-width: ${source.width * 2}px)`,\r\n      type: \"image/webp\",\r\n    };\r\n  });\r\n}\r\n</script>\r\n","<template>\r\n  <div>\r\n    <h2 class=\"layout-searchpage__subheading\">\r\n      {{ $t(\"hitsIn\") }} {{ $t(\"articles\") }}\r\n      <span class=\"layout-searchpage__hit-count\"\r\n        >({{ nArticles }} {{ $t(\"hits\") }})</span\r\n      >\r\n    </h2>\r\n    <ul class=\"category-grid category-grid--articles\" data-layout=\"4\">\r\n      <li v-for=\"article in articles\" :key=\"article.key\">\r\n        <Article :content-item=\"article\" />\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport Article from \"./article.vue\";\r\nimport {\r\n  CONTENT_LIST_ARTICLES,\r\n  ContentList,\r\n  ContentItem,\r\n} from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    Article,\r\n  },\r\n  props: [\"contentLists\"],\r\n  computed: {\r\n    contentList(): ContentList | undefined {\r\n      return (this.contentLists || []).find(\r\n        (contentList) => contentList.id === CONTENT_LIST_ARTICLES,\r\n      );\r\n    },\r\n    nArticles(): number | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.totalHits;\r\n    },\r\n    articles(): Array<ContentItem> | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.items;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <div>\r\n    <h2 class=\"layout-searchpage__subheading\">\r\n      {{ $t(\"hitsIn\") }} {{ $t(\"articles\") }}\r\n      <span class=\"layout-searchpage__hit-count\"\r\n        >({{ nArticles }} {{ $t(\"hits\") }})</span\r\n      >\r\n    </h2>\r\n    <ul class=\"category-grid category-grid--articles\" data-layout=\"4\">\r\n      <li v-for=\"article in articles\" :key=\"article.key\">\r\n        <Article :content-item=\"article\" />\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport Article from \"./article.vue\";\r\nimport {\r\n  CONTENT_LIST_ARTICLES,\r\n  ContentList,\r\n  ContentItem,\r\n} from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    Article,\r\n  },\r\n  props: [\"contentLists\"],\r\n  computed: {\r\n    contentList(): ContentList | undefined {\r\n      return (this.contentLists || []).find(\r\n        (contentList) => contentList.id === CONTENT_LIST_ARTICLES,\r\n      );\r\n    },\r\n    nArticles(): number | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.totalHits;\r\n    },\r\n    articles(): Array<ContentItem> | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.items;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <article class=\"store-list-item\">\r\n    <div class=\"store-list-item__col\">\r\n      <h3 class=\"store-list-item__heading\">{{ store.title }}</h3>\r\n      <address>\r\n        {{ address }}<br />\r\n        <span class=\"u-font-weight-bold\">\r\n          {{ $t(\"phoneNumber\") }}:\r\n          <a :href=\"getPhoneHref(phone)\">{{ phone }}</a>\r\n        </span>\r\n      </address>\r\n    </div>\r\n    <div class=\"store-list-item__col\">\r\n      <h4 class=\"store-list-item__heading\">{{ $t(\"openingHours\") }}</h4>\r\n      <p>{{ hours }}</p>\r\n      <a :href=\"mapUrl\" target=\"_blank\" class=\"btn btn--inline\">\r\n        {{ $t(\"findTheWay\") }}\r\n      </a>\r\n    </div>\r\n    <div class=\"store-list-item__col u-flex-center\">\r\n      <a\r\n        :href=\"store.link\"\r\n        class=\"btn btn--profile btn--small u-text-nowrap\"\r\n        @click=\"notifyClick($event, store)\"\r\n        @click.middle=\"notifyClick($event, store)\"\r\n        @click.right=\"notifyClick($event, store)\"\r\n      >\r\n        {{ $t(\"goToStore\") }}\r\n      </a>\r\n    </div>\r\n  </article>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport NotifyClick from \"../../mixins/notifyClick\";\r\nimport { ContentItem } from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  mixins: [NotifyClick],\r\n  props: [\"contentItem\"],\r\n  computed: {\r\n    store(): ContentItem {\r\n      return this.contentItem;\r\n    },\r\n    address(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Address &&\r\n          this.store.custom.Address[0] &&\r\n          this.store.custom.Address[0].label) ||\r\n        \"\"\r\n      );\r\n    },\r\n    phone(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Phone &&\r\n          this.store.custom.Phone[0] &&\r\n          this.store.custom.Phone[0].label) ||\r\n        \"\"\r\n      );\r\n    },\r\n    hours(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.OpeningHours &&\r\n          this.store.custom.OpeningHours[0] &&\r\n          this.store.custom.OpeningHours[0].label) ||\r\n        \"\"\r\n      );\r\n    },\r\n    lat(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Lat &&\r\n          this.store.custom.Lat[0] &&\r\n          this.store.custom.Lat[0].label) ||\r\n        \"\"\r\n      ).replace(\",\", \".\");\r\n    },\r\n    lon(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Lon &&\r\n          this.store.custom.Lon[0] &&\r\n          this.store.custom.Lon[0].label) ||\r\n        \"\"\r\n      ).replace(\",\", \".\");\r\n    },\r\n    mapUrl(): string {\r\n      let q: any = `${this.store.title} ${this.address}`;\r\n\r\n      return `https://maps.google.com/?q=${encodeURIComponent(q)}`;\r\n    },\r\n  },\r\n  methods: {\r\n    getPhoneHref: function (pNr) {\r\n      return \"tel: \" + pNr;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <article class=\"store-list-item\">\r\n    <div class=\"store-list-item__col\">\r\n      <h3 class=\"store-list-item__heading\">{{ store.title }}</h3>\r\n      <address>\r\n        {{ address }}<br />\r\n        <span class=\"u-font-weight-bold\">\r\n          {{ $t(\"phoneNumber\") }}:\r\n          <a :href=\"getPhoneHref(phone)\">{{ phone }}</a>\r\n        </span>\r\n      </address>\r\n    </div>\r\n    <div class=\"store-list-item__col\">\r\n      <h4 class=\"store-list-item__heading\">{{ $t(\"openingHours\") }}</h4>\r\n      <p>{{ hours }}</p>\r\n      <a :href=\"mapUrl\" target=\"_blank\" class=\"btn btn--inline\">\r\n        {{ $t(\"findTheWay\") }}\r\n      </a>\r\n    </div>\r\n    <div class=\"store-list-item__col u-flex-center\">\r\n      <a\r\n        :href=\"store.link\"\r\n        class=\"btn btn--profile btn--small u-text-nowrap\"\r\n        @click=\"notifyClick($event, store)\"\r\n        @click.middle=\"notifyClick($event, store)\"\r\n        @click.right=\"notifyClick($event, store)\"\r\n      >\r\n        {{ $t(\"goToStore\") }}\r\n      </a>\r\n    </div>\r\n  </article>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport NotifyClick from \"../../mixins/notifyClick\";\r\nimport { ContentItem } from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  mixins: [NotifyClick],\r\n  props: [\"contentItem\"],\r\n  computed: {\r\n    store(): ContentItem {\r\n      return this.contentItem;\r\n    },\r\n    address(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Address &&\r\n          this.store.custom.Address[0] &&\r\n          this.store.custom.Address[0].label) ||\r\n        \"\"\r\n      );\r\n    },\r\n    phone(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Phone &&\r\n          this.store.custom.Phone[0] &&\r\n          this.store.custom.Phone[0].label) ||\r\n        \"\"\r\n      );\r\n    },\r\n    hours(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.OpeningHours &&\r\n          this.store.custom.OpeningHours[0] &&\r\n          this.store.custom.OpeningHours[0].label) ||\r\n        \"\"\r\n      );\r\n    },\r\n    lat(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Lat &&\r\n          this.store.custom.Lat[0] &&\r\n          this.store.custom.Lat[0].label) ||\r\n        \"\"\r\n      ).replace(\",\", \".\");\r\n    },\r\n    lon(): string {\r\n      return (\r\n        (this.store.custom &&\r\n          this.store.custom.Lon &&\r\n          this.store.custom.Lon[0] &&\r\n          this.store.custom.Lon[0].label) ||\r\n        \"\"\r\n      ).replace(\",\", \".\");\r\n    },\r\n    mapUrl(): string {\r\n      let q: any = `${this.store.title} ${this.address}`;\r\n\r\n      return `https://maps.google.com/?q=${encodeURIComponent(q)}`;\r\n    },\r\n  },\r\n  methods: {\r\n    getPhoneHref: function (pNr) {\r\n      return \"tel: \" + pNr;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <div class=\"layout-searchpage__store-list\">\r\n    <h2 class=\"layout-searchpage__subheading u-text-center\">\r\n      {{ $t(\"hitsIn\") }} {{ $t(\"stores\") }}\r\n      <span class=\"layout-searchpage__hit-count\"\r\n        >({{ nStores }} {{ $t(\"hits\") }})</span\r\n      >\r\n    </h2>\r\n    <ul v-if=\"stores\">\r\n      <li v-for=\"store in stores\" :key=\"store.key\">\r\n        <Store :content-item=\"store\" />\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport Store from \"./store.vue\";\r\nimport {\r\n  CONTENT_LIST_STORES,\r\n  ContentList,\r\n  ContentItem,\r\n} from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    Store,\r\n  },\r\n  props: [\"contentLists\"],\r\n  computed: {\r\n    contentList(): ContentList | undefined {\r\n      return (this.contentLists || []).find(\r\n        (contentList) => contentList.id === CONTENT_LIST_STORES,\r\n      );\r\n    },\r\n    nStores(): number | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.totalHits;\r\n    },\r\n    stores(): Array<ContentItem> | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.items;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <div class=\"layout-searchpage__store-list\">\r\n    <h2 class=\"layout-searchpage__subheading u-text-center\">\r\n      {{ $t(\"hitsIn\") }} {{ $t(\"stores\") }}\r\n      <span class=\"layout-searchpage__hit-count\"\r\n        >({{ nStores }} {{ $t(\"hits\") }})</span\r\n      >\r\n    </h2>\r\n    <ul v-if=\"stores\">\r\n      <li v-for=\"store in stores\" :key=\"store.key\">\r\n        <Store :content-item=\"store\" />\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent } from \"vue\";\r\nimport Store from \"./store.vue\";\r\nimport {\r\n  CONTENT_LIST_STORES,\r\n  ContentList,\r\n  ContentItem,\r\n} from \"../../services/search.service\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    Store,\r\n  },\r\n  props: [\"contentLists\"],\r\n  computed: {\r\n    contentList(): ContentList | undefined {\r\n      return (this.contentLists || []).find(\r\n        (contentList) => contentList.id === CONTENT_LIST_STORES,\r\n      );\r\n    },\r\n    nStores(): number | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.totalHits;\r\n    },\r\n    stores(): Array<ContentItem> | undefined {\r\n      if (!this.contentList) {\r\n        return;\r\n      }\r\n\r\n      return this.contentList.items;\r\n    },\r\n  },\r\n});\r\n</script>\r\n","import { createRouter, createWebHistory, RouteRecordRaw } from \"vue-router\";\r\nimport Products from \"./products.vue\";\r\nimport Articles from \"./articles.vue\";\r\nimport Stores from \"./stores.vue\";\r\n\r\nexport enum SearchPageRoutes {\r\n    Products = \"products\",\r\n    Articles = \"articles\",\r\n    Stores = \"stores\",\r\n}\r\n\r\nconst routes: Array<RouteRecordRaw> = [\r\n    {\r\n        name: SearchPageRoutes.Products,\r\n        path: \"/produkter\",\r\n        component: Products,\r\n    },\r\n    {\r\n        name: SearchPageRoutes.Articles,\r\n        path: \"/artikler\",\r\n        component: Articles,\r\n    },\r\n    {\r\n        name: SearchPageRoutes.Stores,\r\n        path: \"/butikker\",\r\n        component: Stores,\r\n    },\r\n];\r\n\r\nexport default function (base?: string) {\r\n    if (!base) return;\r\n\r\n    return createRouter({\r\n        history: createWebHistory(base),\r\n        routes,\r\n    });\r\n}","/**\r\n * Router push\r\n */\r\nexport const routerPush = (config, router) => {\r\n    router.push(config).catch((error) => {\r\n        if (error.name !== \"NavigationDuplicated\") {\r\n            throw error;\r\n        }\r\n    });\r\n};\r\n\r\n/**\r\n * Router replace\r\n */\r\nexport const routerReplace = (config, router) => {\r\n    router.replace(config).catch((error) => {\r\n        if (error.name !== \"NavigationDuplicated\") {\r\n            throw error;\r\n        }\r\n    });\r\n};\r\n","<template>\r\n  <!-- Preview bar -->\r\n  <div class=\"info-bar info-bar--bg-black u-text-white\">\r\n    <p>\r\n      <strong class=\"u-text-white\"></strong>\r\n      <button class=\"btn\" @click=\"$emit('clickExit', $event)\">\r\n        <span class=\"u-text-white\">Exit preview mode</span>\r\n        <Icon :type=\"IconTypes.Close\" :size=\"IconSizes.Small\" />\r\n      </button>\r\n    </p>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport { defineComponent } from \"vue\";\r\n\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../icon/icon.model\";\r\n\r\nexport default defineComponent({\r\n  components: {\r\n    Icon,\r\n  },\r\n  data() {\r\n    return {\r\n      IconSizes,\r\n      IconTypes,\r\n    };\r\n  },\r\n});\r\n</script>\r\n","<template>\r\n  <div>\r\n    <!-- Preview bar -->\r\n    <PreviewBar v-if=\"isPreview\" @clickExit=\"clickExitPreview()\" />\r\n    <!-- Search page -->\r\n    <div class=\"l bg-neutral-lightest\">\r\n      <div class=\"l__content\">\r\n        <h1 class=\"sr-only\">\r\n          {{ displayName }}\r\n        </h1>\r\n        <div class=\"layout-searchpage__top\">\r\n          <div class=\"layout-searchpage__search-form\">\r\n            <!-- Quick search -->\r\n            <QuickSearch\r\n              ref=\"quickSearch\"\r\n              class-name=\"search-form quicksearch--on-page\"\r\n              :absolute-panel=\"true\"\r\n              :search-page-url=\"baseUrlPath\"\r\n              :placeholder=\"$tc('searchPlaceholder')\"\r\n              :reset-on-search=\"true\"\r\n              :disabled=\"isLoading\"\r\n              :is-results-hidden=\"isQuickSearchResultsHidden\"\r\n              @input=\"showQuickSearch($event)\"\r\n              @inputFocus=\"showQuickSearch($event.target.value)\"\r\n            />\r\n          </div>\r\n          <!-- You searched for -->\r\n          <p\r\n            v-if=\"searchQuery\"\r\n            class=\"h2 u-text-center u-trailer u-leader-half\"\r\n          >\r\n            {{ $t(\"youSearchedFor\") }} \"{{ searchQuery }}\"\r\n          </p>\r\n          <!-- Categories -->\r\n          <fieldset\r\n            v-if=\"searchQuery\"\r\n            class=\"layout-searchpage__search-category\"\r\n          >\r\n            <legend class=\"sr-only\">\r\n              {{ $t(\"categories\") }}\r\n            </legend>\r\n            <label v-if=\"displayProductsRadio\" class=\"radio u-padded-quart\">\r\n              <input\r\n                v-model=\"searchCategory\"\r\n                type=\"radio\"\r\n                name=\"search-category\"\r\n                :value=\"SearchPageRoutes.Products\"\r\n                @change=\"changeCategory($event)\"\r\n              />\r\n              <span>{{ $t(\"products\") }} ({{ nProducts }})</span>\r\n            </label>\r\n            <label v-if=\"nArticles\" class=\"radio u-padded-quart\">\r\n              <input\r\n                v-model=\"searchCategory\"\r\n                type=\"radio\"\r\n                name=\"search-category\"\r\n                :value=\"SearchPageRoutes.Articles\"\r\n                @change=\"changeCategory($event)\"\r\n              />\r\n              <span>{{ $t(\"articles\") }} ({{ nArticles }})</span>\r\n            </label>\r\n            <label v-if=\"nStores\" class=\"radio u-padded-quart\">\r\n              <input\r\n                v-model=\"searchCategory\"\r\n                type=\"radio\"\r\n                name=\"search-category\"\r\n                :value=\"SearchPageRoutes.Stores\"\r\n                @change=\"changeCategory($event)\"\r\n              />\r\n              <span>{{ $t(\"stores\") }} ({{ nStores }})</span>\r\n            </label>\r\n          </fieldset>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <!-- Hits -->\r\n    <div class=\"layout-searchpage__results\">\r\n      <!-- Message -->\r\n      <div\r\n        v-if=\"searchResult && searchResult.message\"\r\n        class=\"layout-searchpage__nohits\"\r\n        role=\"alert\"\r\n      >\r\n        {{ searchResult.message }}\r\n      </div>\r\n      <!-- No hits -->\r\n      <div\r\n        v-if=\"\r\n          searchResult &&\r\n          ((searchResult.primaryList &&\r\n            searchResult.primaryList.productGroups &&\r\n            searchResult.primaryList.productGroups.length === 0) ||\r\n            (searchResult.autoCorrect &&\r\n              searchResult.autoCorrect.originalTotalHits === 0)) &&\r\n          searchCategory === SearchPageRoutes.Products\r\n        \"\r\n        class=\"layout-searchpage__nohits\"\r\n        role=\"alert\"\r\n      >\r\n        {{ $t(\"noHits\") }}\r\n      </div>\r\n      <!-- Auto correct -->\r\n      <div\r\n        v-if=\"\r\n          searchResult &&\r\n          searchResult.autoCorrect &&\r\n          searchCategory === SearchPageRoutes.Products\r\n        \"\r\n      >\r\n        <div class=\"layout-searchpage__hint\">\r\n          <strong>{{ $t(\"autoCorrect\") }}</strong>\r\n          <u>{{ searchResult.autoCorrect.q }}</u>\r\n        </div>\r\n      </div>\r\n      <!-- Loader -->\r\n      <div v-if=\"isLoading\" class=\"loader-wrapper\">\r\n        <div class=\"loader\" />\r\n      </div>\r\n      <!-- TODO: Error -->\r\n      <div v-if=\"searchError\" style=\"color: red\">\r\n        {{ searchError }}\r\n      </div>\r\n      <!-- Router view -->\r\n      <template v-if=\"searchResult\">\r\n        <router-view\r\n          v-bind=\"searchResult\"\r\n          :searchpage=\"true\"\r\n          :is-user-authenticated=\"isUserAuthenticated\"\r\n          :hide-favorites=\"hideFavorites\"\r\n          :there-are-more-pages=\"thereAreMorePages\"\r\n          :use-product-gtm-tracking=\"true\"\r\n          :user-id=\"userId\"\r\n          :store=\"store\"\r\n          @upsertFacet=\"upsertFacet($event)\"\r\n          @useFilter=\"applyFilter()\"\r\n          @nextPage=\"nextPage()\"\r\n          @updateSort=\"updateSort($event)\"\r\n        />\r\n      </template>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref, computed, onMounted, watch } from \"vue\";\r\nimport { useRoute, useRouter } from \"vue-router\";\r\nimport axios, { CancelTokenSource } from \"axios\";\r\nimport { SearchPageRoutes } from \"./searchPage.router\";\r\nimport { routerReplace, routerPush } from \"../../mixins/routing\";\r\nimport SearchService, {\r\n  SearchResult,\r\n  CONTENT_LIST_ARTICLES,\r\n  CONTENT_LIST_STORES,\r\n  ContentList,\r\n  Facet,\r\n} from \"../../services/search.service\";\r\nimport PreviewBar from \"../../components/previewBar/previewBar.vue\";\r\nimport QuickSearch from \"../../components/quickSearch/quickSearch.vue\";\r\nimport { useFavoritesStore } from \"../../stores/favoritesStore\";\r\n\r\nconst FACET_PREFIX = \"filter.\";\r\nconst FACET_DELIMITER = \",\";\r\nconst CANCEL_SEARCH_REQUEST = \"CancelSearchRequest\";\r\nconst INITIAL_SEARCH = true;\r\n\r\n//Dataset means all props are strings for now\r\nconst props = defineProps<{\r\n  baseUrlPath: string;\r\n  displayName: string;\r\n  userAuthenticated: string;\r\n  favoriteFormHidden: string;\r\n  pageSize: string;\r\n  userId: string;\r\n  store: string;\r\n}>();\r\n\r\nconst favoritesStore = useFavoritesStore();\r\n\r\nconst isLoading = ref(false);\r\nconst searchQuery = ref(\"\");\r\nconst page = ref(0);\r\nconst searchCategory = ref(SearchPageRoutes.Products);\r\nconst searchFacets = ref({});\r\nconst searchResult = ref(null as SearchResult | null);\r\nconst sort = ref(null as string | null);\r\nconst cancelTokenSource = ref(null as CancelTokenSource | null);\r\nconst searchError = ref(\"\");\r\nconst isQuickSearchResultsHidden = ref(true);\r\nconst preview = ref(undefined as string | undefined);\r\n\r\n// Get routes\r\nconst route = useRoute();\r\nconst router = useRouter();\r\n\r\nonMounted(() => {\r\n  if (isUserAuthenticated.value) {\r\n    favoritesStore.getFavorites()\r\n  }\r\n});\r\n\r\nconst nProducts = computed((): number | undefined => {\r\n  if (!searchResult.value || !searchResult.value?.primaryList) {\r\n    return;\r\n  }\r\n  return searchResult.value.primaryList.totalHits;\r\n});\r\nconst displayProductsRadio = computed((): boolean => {\r\n  if (!searchResult.value) {\r\n    return false;\r\n  }\r\n  if (searchFacets.value) {\r\n    if (Object.keys(searchFacets.value).length > 0) {\r\n      // Always show radio button if there are filters\r\n      return true;\r\n    }\r\n  }\r\n  if (!nArticles.value && !nStores.value) {\r\n    return false;\r\n  }\r\n  if (!nProducts.value) {\r\n    return false;\r\n  }\r\n\r\n  return true;\r\n});\r\nconst nArticles = computed((): number | undefined => {\r\n  const contentList = getContentList(searchResult.value, CONTENT_LIST_ARTICLES);\r\n\r\n  return contentList && contentList.totalHits;\r\n});\r\nconst nStores = computed((): number | undefined => {\r\n  const contentList = getContentList(searchResult.value, CONTENT_LIST_STORES);\r\n\r\n  return contentList && contentList.totalHits;\r\n});\r\nconst pageSizeNumber = computed((): number => {\r\n  return props.pageSize ? Number(props.pageSize) : 12;\r\n});\r\nconst thereAreMorePages = computed((): boolean => {\r\n  if (!searchResult.value || !searchResult.value.primaryList) {\r\n    return false;\r\n  }\r\n\r\n  const limit = (page.value + 1) * pageSizeNumber.value;\r\n\r\n  return searchResult.value.primaryList.totalHits > limit;\r\n});\r\nconst hideFavorites = computed((): boolean => {\r\n  return props.favoriteFormHidden === \"True\";\r\n});\r\nconst isUserAuthenticated = computed((): boolean => {\r\n  return props.userAuthenticated === \"True\";\r\n});\r\nconst isPreview = computed((): boolean => {\r\n  return preview.value === \"true\";\r\n});\r\n\r\nwatch(\r\n  [() => route.fullPath, () => route.query, () => route.name],\r\n  ([toPath, toQuery, toName], [fromPath, fromQuery, fromName]) => {\r\n    /**\r\n     * Initial navigation: Trigger search\r\n     */\r\n    if (!fromPath) {\r\n      search(INITIAL_SEARCH);\r\n\r\n      return;\r\n    }\r\n    /**\r\n     * We don't want to trigger a search from just changing category (products/articles/stores)\r\n     */\r\n    if (fromQuery?.q === toQuery.q && fromName !== toName) {\r\n      return;\r\n    }\r\n    /**\r\n     * We don't want to trigger a search again after adding autoCorrect to the\r\n     * browser URL. If \"q\" is equal to previous route, yet \"ac\" is defined\r\n     * and changed: Prevent search.\r\n     */\r\n    if (\r\n      fromQuery?.q === toQuery.q &&\r\n      toQuery.ac &&\r\n      fromQuery?.ac !== toQuery.ac\r\n    ) {\r\n      return;\r\n    }\r\n    /**\r\n     * Route has changed: Trigger search\r\n     */\r\n    if (toPath !== fromPath) {\r\n      search();\r\n    }\r\n  },\r\n  { immediate: true },\r\n);\r\n\r\n/**\r\n * Show quick search\r\n */\r\nfunction showQuickSearch(currentValue: string) {\r\n  if (!currentValue) {\r\n    isQuickSearchResultsHidden.value = true;\r\n  } else {\r\n    isQuickSearchResultsHidden.value = false;\r\n  }\r\n}\r\n\r\n/**function\r\n * Search\r\n */\r\nfunction search(isInitialSearch = false) {\r\n  searchQuery.value = getSearchQueryFromRoute(route);\r\n  searchCategory.value = getSearchCategoryFromRoute(route);\r\n  searchFacets.value = getSearchFacetsFromRoute(route);\r\n  sort.value = getSortFromRoute(route);\r\n  page.value = getPageFromRoute(route);\r\n  preview.value = getPreviewFromRoute(route);\r\n\r\n  if (cancelTokenSource.value) {\r\n    // Cancel previous request\r\n    cancelTokenSource.value.cancel(CANCEL_SEARCH_REQUEST);\r\n\r\n    cancelTokenSource.value = null;\r\n  }\r\n\r\n  if (!searchQuery.value) {\r\n    searchResult.value = null;\r\n\r\n    return;\r\n  }\r\n\r\n  isLoading.value = true;\r\n\r\n  const localCancelTokenSource = (cancelTokenSource.value =\r\n    axios.CancelToken.source());\r\n\r\n  const searchPromise = SearchService.search(\r\n    localCancelTokenSource,\r\n    searchQuery.value,\r\n    searchFacets.value,\r\n    sort.value,\r\n    pageSizeNumber.value,\r\n    page.value,\r\n    preview.value,\r\n  );\r\n\r\n  searchPromise\r\n    .then((result) => {\r\n      searchResult.value = result.data;\r\n\r\n      if (searchResult.value && searchResult.value.autoCorrect) {\r\n        /**\r\n         * If search results contain autoCorrect, we want to store it in the browser\r\n         * URL. This is because we want to actually search for the autoCorrected\r\n         * term when filtering on facets. See getSearchQueryFromRoute().\r\n         */\r\n        routerReplace(\r\n          {\r\n            name: route.name,\r\n            query: {\r\n              ...route.query,\r\n              ac: searchResult.value.autoCorrect.q,\r\n            },\r\n          },\r\n          router,\r\n        );\r\n      }\r\n\r\n      const defaultRouteName = isInitialSearch\r\n        ? route.name\r\n        : getDefaultRouteNameFromSearchResult(\r\n            searchFacets.value,\r\n            searchResult.value,\r\n          );\r\n\r\n      if (defaultRouteName !== route.name) {\r\n        routerReplace(\r\n          {\r\n            name: defaultRouteName,\r\n            query: {\r\n              ...route.query,\r\n            },\r\n          },\r\n          router,\r\n        );\r\n      }\r\n\r\n      isLoading.value = false;\r\n    })\r\n    .catch((error) => {\r\n      isLoading.value = false;\r\n      searchResult.value = null;\r\n\r\n      if (error.message !== CANCEL_SEARCH_REQUEST) {\r\n        console.error(error);\r\n      }\r\n    });\r\n}\r\n\r\n/**\r\n * Change category\r\n */\r\nfunction changeCategory(e: Event) {\r\n  routerPush(\r\n    {\r\n      name: (<HTMLInputElement>e.target).value,\r\n      query: route.query,\r\n    },\r\n    router,\r\n  );\r\n}\r\n/**\r\n * Upsert facet\r\n */\r\nfunction upsertFacet({\r\n  facet,\r\n  selectedValues,\r\n  useFilter = false,\r\n}: {\r\n  facet: Facet;\r\n  selectedValues: Array<string>;\r\n  useFilter: boolean;\r\n}) {\r\n  searchFacets.value[facet.id] = selectedValues;\r\n\r\n  if (useFilter) {\r\n    applyFilter();\r\n  }\r\n}\r\n/**\r\n * Update sort\r\n */\r\nfunction updateSort(newSort: string): void {\r\n  sort.value = newSort;\r\n}\r\n/**\r\n * Use filter\r\n */\r\nfunction applyFilter() {\r\n  const currentRouterQuery = route.query;\r\n\r\n  const newRouterQuery = Object.assign({}, currentRouterQuery);\r\n\r\n  Object.keys(searchFacets.value).forEach((facetId) => {\r\n    const selectedValues = searchFacets.value[facetId];\r\n\r\n    newRouterQuery[`${FACET_PREFIX}${facetId}`] =\r\n      selectedValues.join(FACET_DELIMITER);\r\n\r\n    if (selectedValues.length === 0) {\r\n      delete newRouterQuery[`${FACET_PREFIX}${facetId}`];\r\n    }\r\n  });\r\n\r\n  delete newRouterQuery[\"page\"];\r\n\r\n  if (sort.value) {\r\n    newRouterQuery.sort = sort.value;\r\n  } else {\r\n    delete newRouterQuery.sort;\r\n  }\r\n\r\n  routerPush(\r\n    {\r\n      name: route.name || SearchPageRoutes.Products,\r\n      query: newRouterQuery,\r\n    },\r\n    router,\r\n  );\r\n}\r\n/**\r\n * Next page\r\n */\r\nfunction nextPage() {\r\n  const page = getPageFromRoute(route);\r\n\r\n  routerPush(\r\n    {\r\n      name: route.name,\r\n      query: {\r\n        ...route.query,\r\n        page: page + 1,\r\n      },\r\n    },\r\n    router,\r\n  );\r\n}\r\n/**\r\n * Click exit preview\r\n */\r\nfunction clickExitPreview() {\r\n  routerPush(\r\n    {\r\n      name: route.name,\r\n      query: {\r\n        q: route.query.q,\r\n      },\r\n    },\r\n    router,\r\n  );\r\n}\r\n\r\nfunction getSearchQueryFromRoute($route) {\r\n  if ($route.query && $route.query.ac) {\r\n    return $route.query.ac as string;\r\n  }\r\n\r\n  return (($route.query && $route.query.q) as string) || \"\";\r\n}\r\n\r\nfunction getSearchCategoryFromRoute($route) {\r\n  return ($route.name as SearchPageRoutes) || SearchPageRoutes.Products;\r\n}\r\n\r\nfunction getSearchFacetsFromRoute($route) {\r\n  if (!$route.query) {\r\n    return [];\r\n  }\r\n\r\n  const searchFacets = {};\r\n\r\n  Object.keys($route.query)\r\n    .filter((key) => {\r\n      // For all query params beginning with prefix\r\n      return (\r\n        key.indexOf(FACET_PREFIX) === 0 && key.length > FACET_PREFIX.length\r\n      );\r\n    })\r\n    .forEach((key) => {\r\n      // Remove prefix and split on delimiter\r\n      searchFacets[key.split(FACET_PREFIX)[1]] =\r\n        $route.query[key].split(FACET_DELIMITER);\r\n    });\r\n\r\n  return searchFacets;\r\n}\r\n\r\nfunction getSortFromRoute($route): string | null {\r\n  return $route.query.sort || null;\r\n}\r\n\r\nfunction getPageFromRoute($route): number {\r\n  if (typeof $route.query.page !== \"undefined\") {\r\n    return Number($route.query.page);\r\n  }\r\n\r\n  return 0;\r\n}\r\n\r\nfunction getPreviewFromRoute($route): string {\r\n  return $route.query.PREVIEW;\r\n}\r\n\r\nfunction getContentList(\r\n  searchResult: SearchResult | null,\r\n  contentListId: string,\r\n): any {\r\n  if (!searchResult) {\r\n    return;\r\n  }\r\n\r\n  const contentList = searchResult.contentLists.find(\r\n    (contentList: ContentList) => {\r\n      return contentList.id === contentListId;\r\n    },\r\n  );\r\n\r\n  if (!contentList || !contentList.items) {\r\n    return;\r\n  }\r\n\r\n  return contentList;\r\n}\r\n\r\nfunction getDefaultRouteNameFromSearchResult(\r\n  searchFacets: any,\r\n  searchResult: SearchResult,\r\n): string {\r\n  if (Object.keys(searchFacets).length > 0) {\r\n    return SearchPageRoutes.Products;\r\n  }\r\n  if (\r\n    searchResult.primaryList &&\r\n    searchResult.primaryList.productGroups &&\r\n    searchResult.primaryList.productGroups.length > 0\r\n  ) {\r\n    return SearchPageRoutes.Products;\r\n  }\r\n\r\n  const articlesContentList = getContentList(\r\n    searchResult,\r\n    CONTENT_LIST_ARTICLES,\r\n  );\r\n\r\n  if (articlesContentList && articlesContentList.totalHits > 0) {\r\n    return SearchPageRoutes.Articles;\r\n  }\r\n\r\n  const storesContentList = getContentList(searchResult, CONTENT_LIST_STORES);\r\n\r\n  if (storesContentList && storesContentList.totalHits > 0) {\r\n    return SearchPageRoutes.Stores;\r\n  }\r\n\r\n  return SearchPageRoutes.Products;\r\n}\r\n</script>\r\n","<template>\r\n  <div class=\"u-position-relative\">\r\n    <!-- Preview bar -->\r\n    <template v-if=\"isPreview\">\r\n      <PreviewBar v-if=\"isPreview\" @clickExit=\"clickExitPreview()\" />\r\n    </template>\r\n    <!-- Category result -->\r\n    <template v-if=\"categoryResult\">\r\n      <!-- Loader -->\r\n      <div v-if=\"isLoading\" class=\"loader-wrapper\">\r\n        <div class=\"loader\" />\r\n      </div>\r\n      <!-- Message -->\r\n      <div\r\n        v-if=\"categoryResult && categoryResult.message\"\r\n        class=\"u-text-center\"\r\n        role=\"alert\"\r\n      >\r\n        {{ categoryResult.message }}\r\n      </div>\r\n      <!-- Products -->\r\n      <products\r\n        v-if=\"\r\n          categoryResult &&\r\n          categoryResult.primaryList &&\r\n          categoryResult.primaryList.productGroups &&\r\n          categoryResult.primaryList.productGroups.length > 0\r\n        \"\r\n        v-bind=\"categoryResult\"\r\n        :subcategories=\"subcategories\"\r\n        :heading=\"heading\"\r\n        :seoInformation=\"props.seoInformation\"\r\n        :headingAlreadyOnPage=\"isHeadingAlreadyOnPage\"\r\n        :searchpage=\"false\"\r\n        :is-user-authenticated=\"isUserAuthenticated\"\r\n        :hide-favorites=\"hideFavorites\"\r\n        :there-are-more-pages=\"thereAreMorePages\"\r\n        :use-product-gtm-tracking=\"true\"\r\n        :user-id=\"userId\"\r\n        :category-blocks=\"categoryBlocks\"\r\n        :store=\"store\"\r\n        @upsertFacet=\"upsertFacet($event)\"\r\n        @useFilter=\"ApplyFilter()\"\r\n        @nextPage=\"nextPage()\"\r\n        @toggleFavorite=\"clickFavorite($event)\"\r\n        @updateSort=\"updateSort($event)\"\r\n      />\r\n    </template>\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref, computed, onMounted, watch } from \"vue\";\r\nimport axios, { CancelTokenSource } from \"axios\";\r\nimport {\r\n  pushDataToGtm,\r\n  getCategoryImpressionsEvent,\r\n  getFilterImpressionsEvent,\r\n} from \"../../mixins/tracking\";\r\nimport { routerPush } from \"../../mixins/routing\";\r\nimport SearchService, {\r\n  CategoryResult,\r\n  Facet,\r\n} from \"../../services/search.service\";\r\nimport PreviewBar from \"../../components/previewBar/previewBar.vue\";\r\nimport Products from \"./../searchPage/products.vue\";\r\nimport { useRoute, useRouter } from \"vue-router\";\r\nimport { useFavoritesStore } from \"../../stores/favoritesStore\";\r\n\r\nconst FACET_PREFIX = \"filter.\";\r\nconst FACET_DELIMITER = \",\";\r\nconst CANCEL_SEARCH_REQUEST = \"CancelSearchRequest\";\r\n\r\nenum TrackingEvents {\r\n  CategoryPage = \"categoryPage\",\r\n  FiltePage = \"FilterPage\",\r\n}\r\n\r\nexport type CategoryBlock = {\r\n  imageUrl: string;\r\n  imageAltText: string;\r\n  heading: string;\r\n  subHeading: string;\r\n  text: string;\r\n  link: string;\r\n  rowIndex: number;\r\n  leftOrRight: string;\r\n};\r\n\r\nexport type SubCategories =\r\n  | { name: string; url: string; isSelected: boolean }[]\r\n  | null;\r\n//Dataset means all props are strings for now\r\nconst props = defineProps<{\r\n  userId: string;\r\n  store: string;\r\n  heading: string;\r\n  headingAlreadyOnPage?: string;\r\n  category: string;\r\n  subcategoriesIncoming?: string | null;\r\n  favoriteFormHidden: string;\r\n  userAuthenticated: string;\r\n  pageSize: string;\r\n  pageId: string;\r\n  tracking: string;\r\n  contentlinkId: number | undefined;\r\n  seoInformation: string;\r\n  categoryBlocks: string; // JSON string\r\n}>();\r\n\r\nconst favoritesStore = useFavoritesStore();\r\n\r\nconst isLoading = ref(false);\r\nconst page = ref(0);\r\nconst cancelTokenSource = ref(null as CancelTokenSource | null);\r\nconst searchFacets = ref({});\r\nconst categoryResult = ref(null as CategoryResult | null);\r\nconst sort = ref(null as string | null);\r\nconst preview = ref(undefined as string | undefined);\r\nconst categoryBlocks = ref(Array<CategoryBlock>());\r\n\r\n// Get routes\r\nconst route = useRoute();\r\nconst router = useRouter();\r\n\r\nconst pageSizeNumber = computed((): number => {\r\n  return props.pageSize ? Number(props.pageSize) : 12;\r\n});\r\n\r\nconst thereAreMorePages = computed((): boolean => {\r\n  if (!categoryResult.value || !categoryResult.value.primaryList) {\r\n    return false;\r\n  }\r\n\r\n  const limit = (page.value + 1) * pageSizeNumber.value;\r\n\r\n  return categoryResult.value.primaryList.totalHits > limit;\r\n});\r\n\r\nconst subcategories = computed(() => {\r\n  if (!props.subcategoriesIncoming) return null;\r\n\r\n  try {\r\n    const subcategories = JSON.parse(props.subcategoriesIncoming);\r\n    // const doubledSubcats = [\r\n    //   ...subcategories.map((subcat) => ({ ...subcat, isSelected: false })),\r\n    //   ...subcategories,\r\n    // ];\r\n    // doubledSubcats[0].name = \"Vis alle\";\r\n    // return doubledSubcats;\r\n    subcategories[0].name = \"Vis alle\";\r\n    return subcategories;\r\n  } catch {\r\n    return [];\r\n  }\r\n});\r\n\r\n//We're getting booleans as string. Convert to bools\r\nconst hideFavorites = computed((): boolean => {\r\n  return props.favoriteFormHidden === \"True\";\r\n});\r\nconst isUserAuthenticated = computed((): boolean => {\r\n  return props.userAuthenticated === \"True\";\r\n});\r\nconst isPreview = computed((): boolean => {\r\n  return preview.value === \"true\";\r\n});\r\nconst isHeadingAlreadyOnPage = computed((): boolean => {\r\n  return props.headingAlreadyOnPage === \"True\";\r\n});\r\n\r\nonMounted(() => {\r\n  if (isUserAuthenticated.value) {\r\n    favoritesStore.getFavorites();\r\n  }\r\n\r\n  if (props.categoryBlocks) {\r\n    categoryBlocks.value = JSON.parse(props.categoryBlocks) as Array<CategoryBlock>;\r\n  }\r\n});\r\n\r\nwatch(\r\n  [() => route.fullPath, () => route.hash],\r\n  ([toPath, toHash], [fromPath, fromHash]) => {\r\n    /**\r\n     * Just hash change: Don't search\r\n     */\r\n    if (\r\n      toHash &&\r\n      fromHash &&\r\n      fromPath &&\r\n      toHash !== fromHash &&\r\n      toPath.replace(toHash, \"\") === fromPath.replace(fromHash, \"\")\r\n    ) {\r\n      return;\r\n    }\r\n    /**\r\n     * Initial navigation: Trigger search\r\n     */\r\n    if (!fromPath) {\r\n      search();\r\n      return;\r\n    }\r\n    /**\r\n     * Route has changed: Trigger search\r\n     */\r\n    if (toPath !== fromPath) {\r\n      search();\r\n    }\r\n  },\r\n  { immediate: true },\r\n);\r\n\r\nwatch(categoryResult, () => {\r\n  if (!categoryResult.value || !categoryResult.value.primaryList) {\r\n    return;\r\n  }\r\n\r\n  if (props.tracking === TrackingEvents.CategoryPage) {\r\n    const tracking = getCategoryImpressionsEvent({\r\n      userId: props.userId,\r\n      store: props.store,\r\n      productGroups: categoryResult.value.primaryList.productGroups,\r\n    });\r\n\r\n    pushDataToGtm(tracking);\r\n  } else if (props.tracking === TrackingEvents.FiltePage) {\r\n    const tracking = getFilterImpressionsEvent({\r\n      store: props.store,\r\n      listName: \"\",\r\n      productGroups: categoryResult.value.primaryList.productGroups,\r\n    });\r\n    pushDataToGtm(tracking);\r\n  }\r\n});\r\n\r\nfunction clickFavorite(productKey: string) {\r\n  favoritesStore.toggleFavorite(productKey);\r\n}\r\n\r\n/**\r\n * Search\r\n */\r\nfunction search() {\r\n  searchFacets.value = getSearchFacetsFromRoute(route);\r\n  sort.value = getSortFromRoute(route);\r\n  page.value = getPageFromRoute(route);\r\n  preview.value = getPreviewFromRoute(route);\r\n\r\n  if (cancelTokenSource.value) {\r\n    // Cancel previous request\r\n    cancelTokenSource.value.cancel(CANCEL_SEARCH_REQUEST);\r\n\r\n    cancelTokenSource.value = null;\r\n  }\r\n\r\n  isLoading.value = true;\r\n\r\n  const localCancelTokenSource = (cancelTokenSource.value =\r\n    axios.CancelToken.source());\r\n\r\n  const searchPromise = SearchService.category(\r\n    localCancelTokenSource,\r\n    props.pageId,\r\n    searchFacets.value,\r\n    sort.value,\r\n    pageSizeNumber.value,\r\n    page.value,\r\n    preview.value,\r\n    props.contentlinkId,\r\n  );\r\n\r\n  searchPromise\r\n    .then((result) => {\r\n      categoryResult.value = result.data;\r\n      isLoading.value = false;\r\n    })\r\n    .catch((error) => {\r\n      isLoading.value = false;\r\n      categoryResult.value = null;\r\n\r\n      if (error.message !== CANCEL_SEARCH_REQUEST) {\r\n        console.error(error);\r\n      }\r\n    });\r\n}\r\n/**\r\n * Upsert facet\r\n */\r\nfunction upsertFacet({\r\n  facet,\r\n  selectedValues,\r\n  useFilter = false,\r\n}: {\r\n  facet: Facet;\r\n  selectedValues: Array<string>;\r\n  useFilter: boolean;\r\n}) {\r\n  searchFacets.value[facet.id] = selectedValues;\r\n  if (useFilter) {\r\n    ApplyFilter();\r\n  }\r\n}\r\n/**\r\n * Update sort\r\n */\r\nfunction updateSort(newSort: string): void {\r\n  sort.value = newSort;\r\n}\r\n/**\r\n * Use filter\r\n */\r\nfunction ApplyFilter() {\r\n  const currentRouterQuery = route.query;\r\n  const newRouterQuery = Object.assign({}, currentRouterQuery);\r\n\r\n  Object.keys(searchFacets.value).forEach((facetId) => {\r\n    const selectedValues = searchFacets.value[facetId];\r\n\r\n    newRouterQuery[`${FACET_PREFIX}${facetId}`] =\r\n      selectedValues.join(FACET_DELIMITER);\r\n\r\n    if (selectedValues.length === 0) {\r\n      delete newRouterQuery[`${FACET_PREFIX}${facetId}`];\r\n    }\r\n  });\r\n  delete newRouterQuery[\"page\"];\r\n\r\n  if (sort.value) {\r\n    newRouterQuery.sort = sort.value;\r\n  } else {\r\n    delete newRouterQuery.sort;\r\n  }\r\n\r\n  routerPush(\r\n    {\r\n      name: route.name,\r\n      query: newRouterQuery,\r\n    },\r\n    router,\r\n  );\r\n}\r\n/**\r\n * Next page\r\n */\r\nfunction nextPage() {\r\n  const page = getPageFromRoute(route);\r\n\r\n  routerPush(\r\n    {\r\n      name: route.name,\r\n      query: {\r\n        ...route.query,\r\n        page: page + 1,\r\n      },\r\n    },\r\n    router,\r\n  );\r\n}\r\n/**\r\n * Click exit preview\r\n */\r\nfunction clickExitPreview() {\r\n  routerPush(\r\n    {\r\n      name: route.name,\r\n      query: {\r\n        q: route.query.q,\r\n      },\r\n    },\r\n    router,\r\n  );\r\n}\r\n\r\nfunction getSearchFacetsFromRoute($route) {\r\n  if (!$route.query) {\r\n    return [];\r\n  }\r\n\r\n  const searchFacets = {};\r\n\r\n  Object.keys($route.query)\r\n    .filter((key) => {\r\n      // For all query params beginning with prefix\r\n      return (\r\n        key.indexOf(FACET_PREFIX) === 0 && key.length > FACET_PREFIX.length\r\n      );\r\n    })\r\n    .forEach((key) => {\r\n      // Remove prefix and split on delimiter\r\n      searchFacets[key.split(FACET_PREFIX)[1]] =\r\n        $route.query[key].split(FACET_DELIMITER);\r\n    });\r\n\r\n  return searchFacets;\r\n}\r\n\r\nfunction getSortFromRoute($route): string | null {\r\n  return $route.query.sort || null;\r\n}\r\n\r\nfunction getPageFromRoute($route): number {\r\n  if (typeof $route.query.page !== \"undefined\") {\r\n    return Number($route.query.page);\r\n  }\r\n\r\n  return 0;\r\n}\r\n\r\nfunction getPreviewFromRoute($route): string {\r\n  return $route.query.PREVIEW;\r\n}\r\n</script>\r\n","import { createRouter, createWebHistory, RouteRecordRaw } from \"vue-router\";\r\nimport CategoryPage from \"./categoryPage.vue\";\r\n\r\nexport enum CategoryPageRoutes {\r\n    Root = \"root\",\r\n}\r\n\r\nconst routes: Array<RouteRecordRaw> = [\r\n    {\r\n        name: CategoryPageRoutes.Root,\r\n        path: \"/\",\r\n        component: CategoryPage\r\n    },\r\n];\r\n\r\nexport default function (base?: string) {\r\n    if (!base) return;\r\n\r\n    return createRouter({\r\n        history: createWebHistory(base),\r\n        routes,\r\n    });\r\n}","<script setup lang=\"ts\">\r\nimport { onMounted, ref } from \"vue\";\r\nimport ProductsModuleContent from \"./productsModuleContent.vue\";\r\nimport { useFavoritesStore } from \"../../stores/favoritesStore\";\r\nimport {\r\n  useListPathUpsell,\r\n  useProductPageUpsell,\r\n} from \"../../composables/useUpsell\";\r\n\r\nconst props = defineProps<{\r\n  heading: string;\r\n  apiUrl: string;\r\n  listPath?: string;\r\n  userAuthenticated: string;\r\n  lazy: string;\r\n  limit: number;\r\n  useSliderForDesktop: string;\r\n  showAsColumnOnMobile: string;\r\n  productKey: string;\r\n  categoryName: string;\r\n  currentPage?: string;\r\n  allowQuickAdd: string;\r\n}>();\r\n\r\nconst favoritesStore = useFavoritesStore();\r\nconst rootElement = ref();\r\nconst { upsellModel, isLoading } = props.listPath\r\n  ? useListPathUpsell({\r\n      listPath: props.listPath,\r\n      limit: props.limit,\r\n      lazyLoad: true,\r\n      rootElement,\r\n    })\r\n  : useProductPageUpsell({\r\n      productKey: props.productKey,\r\n      categoryName: props.categoryName,\r\n      lazyLoad: true,\r\n      rootElement,\r\n    });\r\n\r\nonMounted(() => {\r\n  if (props.userAuthenticated) {\r\n    favoritesStore.getFavorites();\r\n  }\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div ref=\"rootElement\">\r\n    <div\r\n      class=\"product-list\"\r\n      v-for=\"(upsellItem, index) in upsellModel\"\r\n      :key=\"index\"\r\n    >\r\n      <ProductsModuleContent\r\n        v-if=\"upsellItem.primaryList\"\r\n        :heading=\"\r\n          upsellItem.primaryList.label ??\r\n          props.heading ??\r\n          $t('maybeYouAlsoLike')\r\n        \"\r\n        :search-result-recommend-list=\"upsellItem\"\r\n        :use-slider-for-desktop=\"useSliderForDesktop === 'True'\"\r\n        :show-as-column-on-mobile=\"showAsColumnOnMobile === 'True'\"\r\n        :user-authenticated=\"userAuthenticated === 'True'\"\r\n        :favorite-form-hidden=\"false\"\r\n        :is-loading=\"isLoading\"\r\n        :is-quick-add=\"allowQuickAdd === 'True'\"\r\n        :product-count=\"upsellItem.primaryList.productGroups.length\"\r\n        :use-skeleton-loaders=\"true\"\r\n        :hide-promotion=\"false\"\r\n        :hide-sizes=\"false\"\r\n        :hide-colors=\"false\"\r\n        :hide-favorites=\"false\"\r\n        :item-list-id=\"`${props.currentPage ?? 'productpage'}-${upsellItem.primaryList.algorithm}`\"\r\n        :item-list-name=\"`${props.currentPage ?? 'productpage'}-${upsellItem.primaryList.algorithm}`\"\r\n        :upsell-algorithm=\"upsellItem.primaryList.algorithm\"\r\n        :track-view-item-list=\"true\"\r\n        :track-select-item=\"true\"\r\n      />\r\n    </div>\r\n  </div>\r\n</template>\r\n","<template>\r\n  <div class=\"minicart-container\">\r\n    <a\r\n      class=\"page-actions__action nav-profile-menu__trigger\"\r\n      :href=\"props.checkoutUrl\"\r\n    >\r\n      <template v-if=\"productPageStore.cartEmpty\">\r\n        <Icon :type=\"IconTypes.BagEmpty\" :size=\"IconSizes.MiniCartEmpty\" />\r\n      </template>\r\n      <template v-else>\r\n        <Icon :type=\"IconTypes.BagEmpty\" :size=\"IconSizes.MiniCartEmpty\" />\r\n        <span class=\"page-actions__action-amount page-actions__action-amount--minicart\">{{\r\n          productPageStore.cartItemCount\r\n        }}</span>\r\n      </template>\r\n\r\n      <span class=\"page-actions__action-label u-hide-for-medium-down\"\r\n        >Handlekurv</span\r\n      ></a\r\n    >\r\n  </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { onMounted } from \"vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { IconSizes, IconTypes } from \"../../components/icon/icon.model\";\r\nimport { useProductPageStore } from \"../../stores/productPageStore\";\r\n\r\nconst props = defineProps<{\r\n  checkoutUrl: string;\r\n  useMinicartOnMobileString?: string;\r\n}>();\r\n\r\nconst productPageStore = useProductPageStore();\r\n\r\nconst refreshCartState = async () => {\r\n  try {\r\n    const response = await fetch(\"/Cart/MiniCartContent\");\r\n    if (!response.ok) throw new Error(\"Failed to fetch cart data.\");\r\n    const data = await response.json();\r\n    productPageStore.setCartItemCount(data.itemCount);\r\n  } catch (error) {\r\n    console.error(\"Error refreshing cart state:\", error);\r\n  }\r\n};\r\n\r\nonMounted(async () => {\r\n  await refreshCartState();\r\n});\r\n</script>\r\n","/**\n * A set of all the parents currently being observe. This is the only non weak\n * registry.\n */\nconst parents = new Set();\n/**\n * Element coordinates that is constantly kept up to date.\n */\nconst coords = new WeakMap();\n/**\n * Siblings of elements that have been removed from the dom.\n */\nconst siblings = new WeakMap();\n/**\n * Animations that are currently running.\n */\nconst animations = new WeakMap();\n/**\n * A map of existing intersection observers used to track element movements.\n */\nconst intersections = new WeakMap();\n/**\n * Intervals for automatically checking the position of elements occasionally.\n */\nconst intervals = new WeakMap();\n/**\n * The configuration options for each group of elements.\n */\nconst options = new WeakMap();\n/**\n * Debounce counters by id, used to debounce calls to update positions.\n */\nconst debounces = new WeakMap();\n/**\n * All parents that are currently enabled are tracked here.\n */\nconst enabled = new WeakSet();\n/**\n * The document used to calculate transitions.\n */\nlet root;\n/**\n * The root’s XY scroll positions.\n */\nlet scrollX = 0;\nlet scrollY = 0;\n/**\n * Used to sign an element as the target.\n */\nconst TGT = \"__aa_tgt\";\n/**\n * Used to sign an element as being part of a removal.\n */\nconst DEL = \"__aa_del\";\n/**\n * Used to sign an element as being \"new\". When an element is removed from the\n * dom, but may cycle back in we can sign it with new to ensure the next time\n * it is recognized we consider it new.\n */\nconst NEW = \"__aa_new\";\n/**\n * Callback for handling all mutations.\n * @param mutations - A mutation list\n */\nconst handleMutations = (mutations) => {\n    const elements = getElements(mutations);\n    // If elements is \"false\" that means this mutation that should be ignored.\n    if (elements) {\n        elements.forEach((el) => animate(el));\n    }\n};\n/**\n *\n * @param entries - Elements that have been resized.\n */\nconst handleResizes = (entries) => {\n    entries.forEach((entry) => {\n        if (entry.target === root)\n            updateAllPos();\n        if (coords.has(entry.target))\n            updatePos(entry.target);\n    });\n};\n/**\n * Observe this elements position.\n * @param el - The element to observe the position of.\n */\nfunction observePosition(el) {\n    const oldObserver = intersections.get(el);\n    oldObserver === null || oldObserver === void 0 ? void 0 : oldObserver.disconnect();\n    let rect = coords.get(el);\n    let invocations = 0;\n    const buffer = 5;\n    if (!rect) {\n        rect = getCoords(el);\n        coords.set(el, rect);\n    }\n    const { offsetWidth, offsetHeight } = root;\n    const rootMargins = [\n        rect.top - buffer,\n        offsetWidth - (rect.left + buffer + rect.width),\n        offsetHeight - (rect.top + buffer + rect.height),\n        rect.left - buffer,\n    ];\n    const rootMargin = rootMargins\n        .map((px) => `${-1 * Math.floor(px)}px`)\n        .join(\" \");\n    const observer = new IntersectionObserver(() => {\n        ++invocations > 1 && updatePos(el);\n    }, {\n        root,\n        threshold: 1,\n        rootMargin,\n    });\n    observer.observe(el);\n    intersections.set(el, observer);\n}\n/**\n * Update the exact position of a given element.\n * @param el - An element to update the position of.\n */\nfunction updatePos(el) {\n    clearTimeout(debounces.get(el));\n    const optionsOrPlugin = getOptions(el);\n    const delay = isPlugin(optionsOrPlugin) ? 500 : optionsOrPlugin.duration;\n    debounces.set(el, setTimeout(async () => {\n        const currentAnimation = animations.get(el);\n        try {\n            await (currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.finished);\n            coords.set(el, getCoords(el));\n            observePosition(el);\n        }\n        catch {\n            // ignore errors as the `.finished` promise is rejected when animations were cancelled\n        }\n    }, delay));\n}\n/**\n * Updates all positions that are currently being tracked.\n */\nfunction updateAllPos() {\n    clearTimeout(debounces.get(root));\n    debounces.set(root, setTimeout(() => {\n        parents.forEach((parent) => forEach(parent, (el) => lowPriority(() => updatePos(el))));\n    }, 100));\n}\n/**\n * Its possible for a quick scroll or other fast events to get past the\n * intersection observer, so occasionally we need want \"cold-poll\" for the\n * latests and greatest position. We try to do this in the most non-disruptive\n * fashion possible. First we only do this ever couple seconds, staggard by a\n * random offset.\n * @param el - Element\n */\nfunction poll(el) {\n    setTimeout(() => {\n        intervals.set(el, setInterval(() => lowPriority(updatePos.bind(null, el)), 2000));\n    }, Math.round(2000 * Math.random()));\n}\n/**\n * Perform some operation that is non critical at some point.\n * @param callback\n */\nfunction lowPriority(callback) {\n    if (typeof requestIdleCallback === \"function\") {\n        requestIdleCallback(() => callback());\n    }\n    else {\n        requestAnimationFrame(() => callback());\n    }\n}\n/**\n * The mutation observer responsible for watching each root element.\n */\nlet mutations;\n/**\n * A resize observer, responsible for recalculating elements on resize.\n */\nlet resize;\n/**\n * If this is in a browser, initialize our Web APIs\n */\nif (typeof window !== \"undefined\") {\n    root = document.documentElement;\n    mutations = new MutationObserver(handleMutations);\n    resize = new ResizeObserver(handleResizes);\n    window.addEventListener(\"scroll\", () => {\n        scrollY = window.scrollY;\n        scrollX = window.scrollX;\n    });\n    resize.observe(root);\n}\n/**\n * Retrieves all the elements that may have been affected by the last mutation\n * including ones that have been removed and are no longer in the DOM.\n * @param mutations - A mutation list.\n * @returns\n */\nfunction getElements(mutations) {\n    const observedNodes = mutations.reduce((nodes, mutation) => {\n        return [\n            ...nodes,\n            ...Array.from(mutation.addedNodes),\n            ...Array.from(mutation.removedNodes),\n        ];\n    }, []);\n    // Short circuit if _only_ comment nodes are observed\n    const onlyCommentNodesObserved = observedNodes.every((node) => node.nodeName === \"#comment\");\n    if (onlyCommentNodesObserved)\n        return false;\n    return mutations.reduce((elements, mutation) => {\n        // Short circuit if we find a purposefully deleted node.\n        if (elements === false)\n            return false;\n        if (mutation.target instanceof Element) {\n            target(mutation.target);\n            if (!elements.has(mutation.target)) {\n                elements.add(mutation.target);\n                for (let i = 0; i < mutation.target.children.length; i++) {\n                    const child = mutation.target.children.item(i);\n                    if (!child)\n                        continue;\n                    if (DEL in child) {\n                        return false;\n                    }\n                    target(mutation.target, child);\n                    elements.add(child);\n                }\n            }\n            if (mutation.removedNodes.length) {\n                for (let i = 0; i < mutation.removedNodes.length; i++) {\n                    const child = mutation.removedNodes[i];\n                    if (DEL in child) {\n                        return false;\n                    }\n                    if (child instanceof Element) {\n                        elements.add(child);\n                        target(mutation.target, child);\n                        siblings.set(child, [\n                            mutation.previousSibling,\n                            mutation.nextSibling,\n                        ]);\n                    }\n                }\n            }\n        }\n        return elements;\n    }, new Set());\n}\n/**\n * Assign the target to an element.\n * @param el - The root element\n * @param child\n */\nfunction target(el, child) {\n    if (!child && !(TGT in el))\n        Object.defineProperty(el, TGT, { value: el });\n    else if (child && !(TGT in child))\n        Object.defineProperty(child, TGT, { value: el });\n}\n/**\n * Determines what kind of change took place on the given element and then\n * performs the proper animation based on that.\n * @param el - The specific element to animate.\n */\nfunction animate(el) {\n    var _a;\n    const isMounted = el.isConnected;\n    const preExisting = coords.has(el);\n    if (isMounted && siblings.has(el))\n        siblings.delete(el);\n    if (animations.has(el)) {\n        (_a = animations.get(el)) === null || _a === void 0 ? void 0 : _a.cancel();\n    }\n    if (NEW in el) {\n        add(el);\n    }\n    else if (preExisting && isMounted) {\n        remain(el);\n    }\n    else if (preExisting && !isMounted) {\n        remove(el);\n    }\n    else {\n        add(el);\n    }\n}\n/**\n * Removes all non-digits from a string and casts to a number.\n * @param str - A string containing a pixel value.\n * @returns\n */\nfunction raw(str) {\n    return Number(str.replace(/[^0-9.\\-]/g, \"\"));\n}\n/**\n * Get the scroll offset of elements\n * @param el - Element\n * @returns\n */\nfunction getScrollOffset(el) {\n    let p = el.parentElement;\n    while (p) {\n        if (p.scrollLeft || p.scrollTop) {\n            return { x: p.scrollLeft, y: p.scrollTop };\n        }\n        p = p.parentElement;\n    }\n    return { x: 0, y: 0 };\n}\n/**\n * Get the coordinates of elements adjusted for scroll position.\n * @param el - Element\n * @returns\n */\nfunction getCoords(el) {\n    const rect = el.getBoundingClientRect();\n    const { x, y } = getScrollOffset(el);\n    return {\n        top: rect.top + y,\n        left: rect.left + x,\n        width: rect.width,\n        height: rect.height,\n    };\n}\n/**\n * Returns the width/height that the element should be transitioned between.\n * This takes into account box-sizing.\n * @param el - Element being animated\n * @param oldCoords - Old set of Coordinates coordinates\n * @param newCoords - New set of Coordinates coordinates\n * @returns\n */\nfunction getTransitionSizes(el, oldCoords, newCoords) {\n    let widthFrom = oldCoords.width;\n    let heightFrom = oldCoords.height;\n    let widthTo = newCoords.width;\n    let heightTo = newCoords.height;\n    const styles = getComputedStyle(el);\n    const sizing = styles.getPropertyValue(\"box-sizing\");\n    if (sizing === \"content-box\") {\n        const paddingY = raw(styles.paddingTop) +\n            raw(styles.paddingBottom) +\n            raw(styles.borderTopWidth) +\n            raw(styles.borderBottomWidth);\n        const paddingX = raw(styles.paddingLeft) +\n            raw(styles.paddingRight) +\n            raw(styles.borderRightWidth) +\n            raw(styles.borderLeftWidth);\n        widthFrom -= paddingX;\n        widthTo -= paddingX;\n        heightFrom -= paddingY;\n        heightTo -= paddingY;\n    }\n    return [widthFrom, widthTo, heightFrom, heightTo].map(Math.round);\n}\n/**\n * Retrieves animation options for the current element.\n * @param el - Element to retrieve options for.\n * @returns\n */\nfunction getOptions(el) {\n    return TGT in el && options.has(el[TGT])\n        ? options.get(el[TGT])\n        : { duration: 250, easing: \"ease-in-out\" };\n}\n/**\n * Returns the target of a given animation (generally the parent).\n * @param el - An element to check for a target\n * @returns\n */\nfunction getTarget(el) {\n    if (TGT in el)\n        return el[TGT];\n    return undefined;\n}\n/**\n * Checks if animations are enabled or disabled for a given element.\n * @param el - Any element\n * @returns\n */\nfunction isEnabled(el) {\n    const target = getTarget(el);\n    return target ? enabled.has(target) : false;\n}\n/**\n * Iterate over the children of a given parent.\n * @param parent - A parent element\n * @param callback - A callback\n */\nfunction forEach(parent, ...callbacks) {\n    callbacks.forEach((callback) => callback(parent, options.has(parent)));\n    for (let i = 0; i < parent.children.length; i++) {\n        const child = parent.children.item(i);\n        if (child) {\n            callbacks.forEach((callback) => callback(child, options.has(child)));\n        }\n    }\n}\n/**\n * Always return tuple to provide consistent interface\n */\nfunction getPluginTuple(pluginReturn) {\n    if (Array.isArray(pluginReturn))\n        return pluginReturn;\n    return [pluginReturn];\n}\n/**\n * Determine if config is plugin\n */\nfunction isPlugin(config) {\n    return typeof config === \"function\";\n}\n/**\n * The element in question is remaining in the DOM.\n * @param el - Element to flip\n * @returns\n */\nfunction remain(el) {\n    const oldCoords = coords.get(el);\n    const newCoords = getCoords(el);\n    if (!isEnabled(el))\n        return coords.set(el, newCoords);\n    let animation;\n    if (!oldCoords)\n        return;\n    const pluginOrOptions = getOptions(el);\n    if (typeof pluginOrOptions !== \"function\") {\n        const deltaX = oldCoords.left - newCoords.left;\n        const deltaY = oldCoords.top - newCoords.top;\n        const [widthFrom, widthTo, heightFrom, heightTo] = getTransitionSizes(el, oldCoords, newCoords);\n        const start = {\n            transform: `translate(${deltaX}px, ${deltaY}px)`,\n        };\n        const end = {\n            transform: `translate(0, 0)`,\n        };\n        if (widthFrom !== widthTo) {\n            start.width = `${widthFrom}px`;\n            end.width = `${widthTo}px`;\n        }\n        if (heightFrom !== heightTo) {\n            start.height = `${heightFrom}px`;\n            end.height = `${heightTo}px`;\n        }\n        animation = el.animate([start, end], {\n            duration: pluginOrOptions.duration,\n            easing: pluginOrOptions.easing,\n        });\n    }\n    else {\n        const [keyframes] = getPluginTuple(pluginOrOptions(el, \"remain\", oldCoords, newCoords));\n        animation = new Animation(keyframes);\n        animation.play();\n    }\n    animations.set(el, animation);\n    coords.set(el, newCoords);\n    animation.addEventListener(\"finish\", updatePos.bind(null, el));\n}\n/**\n * Adds the element with a transition.\n * @param el - Animates the element being added.\n */\nfunction add(el) {\n    if (NEW in el)\n        delete el[NEW];\n    const newCoords = getCoords(el);\n    coords.set(el, newCoords);\n    const pluginOrOptions = getOptions(el);\n    if (!isEnabled(el))\n        return;\n    let animation;\n    if (typeof pluginOrOptions !== \"function\") {\n        animation = el.animate([\n            { transform: \"scale(.98)\", opacity: 0 },\n            { transform: \"scale(0.98)\", opacity: 0, offset: 0.5 },\n            { transform: \"scale(1)\", opacity: 1 },\n        ], {\n            duration: pluginOrOptions.duration * 1.5,\n            easing: \"ease-in\",\n        });\n    }\n    else {\n        const [keyframes] = getPluginTuple(pluginOrOptions(el, \"add\", newCoords));\n        animation = new Animation(keyframes);\n        animation.play();\n    }\n    animations.set(el, animation);\n    animation.addEventListener(\"finish\", updatePos.bind(null, el));\n}\n/**\n * Clean up after removing an element from the dom.\n * @param el - Element being removed\n * @param styles - Optional styles that should be removed from the element.\n */\nfunction cleanUp(el, styles) {\n    var _a;\n    el.remove();\n    coords.delete(el);\n    siblings.delete(el);\n    animations.delete(el);\n    (_a = intersections.get(el)) === null || _a === void 0 ? void 0 : _a.disconnect();\n    setTimeout(() => {\n        if (DEL in el)\n            delete el[DEL];\n        Object.defineProperty(el, NEW, { value: true, configurable: true });\n        if (styles && el instanceof HTMLElement) {\n            for (const style in styles) {\n                el.style[style] = \"\";\n            }\n        }\n    }, 0);\n}\n/**\n * Animates the removal of an element.\n * @param el - Element to remove\n */\nfunction remove(el) {\n    var _a;\n    if (!siblings.has(el) || !coords.has(el))\n        return;\n    const [prev, next] = siblings.get(el);\n    Object.defineProperty(el, DEL, { value: true, configurable: true });\n    const finalX = window.scrollX;\n    const finalY = window.scrollY;\n    if (next && next.parentNode && next.parentNode instanceof Element) {\n        next.parentNode.insertBefore(el, next);\n    }\n    else if (prev && prev.parentNode) {\n        prev.parentNode.appendChild(el);\n    }\n    else {\n        (_a = getTarget(el)) === null || _a === void 0 ? void 0 : _a.appendChild(el);\n    }\n    if (!isEnabled(el))\n        return cleanUp(el);\n    const [top, left, width, height] = deletePosition(el);\n    const optionsOrPlugin = getOptions(el);\n    const oldCoords = coords.get(el);\n    if (finalX !== scrollX || finalY !== scrollY) {\n        adjustScroll(el, finalX, finalY, optionsOrPlugin);\n    }\n    let animation;\n    let styleReset = {\n        position: \"absolute\",\n        top: `${top}px`,\n        left: `${left}px`,\n        width: `${width}px`,\n        height: `${height}px`,\n        margin: \"0\",\n        pointerEvents: \"none\",\n        transformOrigin: \"center\",\n        zIndex: \"100\",\n    };\n    if (!isPlugin(optionsOrPlugin)) {\n        Object.assign(el.style, styleReset);\n        animation = el.animate([\n            {\n                transform: \"scale(1)\",\n                opacity: 1,\n            },\n            {\n                transform: \"scale(.98)\",\n                opacity: 0,\n            },\n        ], { duration: optionsOrPlugin.duration, easing: \"ease-out\" });\n    }\n    else {\n        const [keyframes, options] = getPluginTuple(optionsOrPlugin(el, \"remove\", oldCoords));\n        if ((options === null || options === void 0 ? void 0 : options.styleReset) !== false) {\n            styleReset = (options === null || options === void 0 ? void 0 : options.styleReset) || styleReset;\n            Object.assign(el.style, styleReset);\n        }\n        animation = new Animation(keyframes);\n        animation.play();\n    }\n    animations.set(el, animation);\n    animation.addEventListener(\"finish\", cleanUp.bind(null, el, styleReset));\n}\n/**\n * If the element being removed is at the very bottom of the page, and the\n * the page was scrolled into a space being \"made available\" by the element\n * that was removed, the page scroll will have jumped up some amount. We need\n * to offset the jump by the amount that the page was \"automatically\" scrolled\n * up. We can do this by comparing the scroll position before and after the\n * element was removed, and then offsetting by that amount.\n *\n * @param el - The element being deleted\n * @param finalX - The final X scroll position\n * @param finalY - The final Y scroll position\n * @param optionsOrPlugin - The options or plugin\n * @returns\n */\nfunction adjustScroll(el, finalX, finalY, optionsOrPlugin) {\n    const scrollDeltaX = scrollX - finalX;\n    const scrollDeltaY = scrollY - finalY;\n    const scrollBefore = document.documentElement.style.scrollBehavior;\n    const scrollBehavior = getComputedStyle(root).scrollBehavior;\n    if (scrollBehavior === \"smooth\") {\n        document.documentElement.style.scrollBehavior = \"auto\";\n    }\n    window.scrollTo(window.scrollX + scrollDeltaX, window.scrollY + scrollDeltaY);\n    if (!el.parentElement)\n        return;\n    const parent = el.parentElement;\n    let lastHeight = parent.clientHeight;\n    let lastWidth = parent.clientWidth;\n    const startScroll = performance.now();\n    // Here we use a manual scroll animation to keep the element using the same\n    // easing and timing as the parent’s scroll animation.\n    function smoothScroll() {\n        requestAnimationFrame(() => {\n            if (!isPlugin(optionsOrPlugin)) {\n                const deltaY = lastHeight - parent.clientHeight;\n                const deltaX = lastWidth - parent.clientWidth;\n                if (startScroll + optionsOrPlugin.duration > performance.now()) {\n                    window.scrollTo({\n                        left: window.scrollX - deltaX,\n                        top: window.scrollY - deltaY,\n                    });\n                    lastHeight = parent.clientHeight;\n                    lastWidth = parent.clientWidth;\n                    smoothScroll();\n                }\n                else {\n                    document.documentElement.style.scrollBehavior = scrollBefore;\n                }\n            }\n        });\n    }\n    smoothScroll();\n}\n/**\n * Determines the position of the element being removed.\n * @param el - The element being deleted\n * @returns\n */\nfunction deletePosition(el) {\n    const oldCoords = coords.get(el);\n    const [width, , height] = getTransitionSizes(el, oldCoords, getCoords(el));\n    let offsetParent = el.parentElement;\n    while (offsetParent &&\n        (getComputedStyle(offsetParent).position === \"static\" ||\n            offsetParent instanceof HTMLBodyElement)) {\n        offsetParent = offsetParent.parentElement;\n    }\n    if (!offsetParent)\n        offsetParent = document.body;\n    const parentStyles = getComputedStyle(offsetParent);\n    const parentCoords = coords.get(offsetParent) || getCoords(offsetParent);\n    const top = Math.round(oldCoords.top - parentCoords.top) -\n        raw(parentStyles.borderTopWidth);\n    const left = Math.round(oldCoords.left - parentCoords.left) -\n        raw(parentStyles.borderLeftWidth);\n    return [top, left, width, height];\n}\n/**\n * A function that automatically adds animation effects to itself and its\n * immediate children. Specifically it adds effects for adding, moving, and\n * removing DOM elements.\n * @param el - A parent element to add animations to.\n * @param options - An optional object of options.\n */\nfunction autoAnimate(el, config = {}) {\n    if (mutations && resize) {\n        const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n        const isDisabledDueToReduceMotion = mediaQuery.matches &&\n            !isPlugin(config) &&\n            !config.disrespectUserMotionPreference;\n        if (!isDisabledDueToReduceMotion) {\n            enabled.add(el);\n            if (getComputedStyle(el).position === \"static\") {\n                Object.assign(el.style, { position: \"relative\" });\n            }\n            forEach(el, updatePos, poll, (element) => resize === null || resize === void 0 ? void 0 : resize.observe(element));\n            if (isPlugin(config)) {\n                options.set(el, config);\n            }\n            else {\n                options.set(el, { duration: 250, easing: \"ease-in-out\", ...config });\n            }\n            mutations.observe(el, { childList: true });\n            parents.add(el);\n        }\n    }\n    return Object.freeze({\n        parent: el,\n        enable: () => {\n            enabled.add(el);\n        },\n        disable: () => {\n            enabled.delete(el);\n        },\n        isEnabled: () => enabled.has(el),\n    });\n}\n/**\n * The vue directive.\n */\nconst vAutoAnimate = {\n    mounted: (el, binding) => {\n        autoAnimate(el, binding.value || {});\n    },\n    // ignore ssr see #96:\n    getSSRProps: () => ({}),\n};\n\nexport { autoAnimate as default, getTransitionSizes, vAutoAnimate };\n","<script setup lang=\"ts\">\r\nimport Icon from \"../../components/icon/icon.vue\";\r\n\r\ntype ErrorType = \"global\" | \"line-item\" | \"success\";\r\n\r\nconst props = defineProps<{\r\n  error?: string;\r\n  errorIsHtml?: boolean;\r\n  type?: ErrorType;\r\n}>();\r\n</script>\r\n\r\n<template>\r\n  <div\r\n    v-if=\"props.error\"\r\n    role=\"alert\"\r\n    class=\"checkout-feedback\"\r\n    :class=\"props.type && `checkout-feedback--${props.type}`\"\r\n  >\r\n    <Icon type=\"info\" size=\"tiny\" />\r\n    <span>{{ props.error }}</span>\r\n    <!-- <span v-if=\"props.errorIsHtml\" v-html=\"props.error\"></span>\r\n    <span v-if=\"!props.errorIsHtml\">{{ props.error }}</span> -->\r\n  </div>\r\n</template>\r\n","import {CheckoutStep, CheckoutSteps,} from \"../global/apps/services/models/checkout.models\";\r\nimport {formatWithoutRounding} from \"../global/apps/mixins/productPrice.mixin\";\r\nimport {Money} from \"../global/apps/services/models/cart.models\";\r\nimport {DeliveryLocation, DeliveryMethod,} from \"../global/apps/utils/API/Delivery/deliveryAPISchema\";\r\nimport {AddPaymentMethodRequestDto, PaymentMethodViewModel,} from \"../global/apps/utils/API/Payment/paymentAPISchema\";\r\nimport {formatCurrency} from \"../global/apps/utils/currencyHelpers\";\r\nimport {Ga4Event, Ga4Events} from \"../global/apps/services/models/gtm.models\";\r\n\r\nexport const DeliveryMethods = {\r\n    MyPack: \"MyPack\",\r\n    Porterbuddy: \"Porterbuddy\",\r\n    HomeDelivery: \"HomeDelivery\",\r\n    PickUpInStore: \"PickUpInStore\",\r\n} as const;\r\n\r\nexport const AfterpayMethods = {\r\n    Account: \"account\",\r\n    Installment: \"installment\",\r\n} as const;\r\n\r\nconst validPaymentImageIds = [\r\n    \"riverty_invoice\",\r\n    \"vipps\",\r\n    \"nets\",\r\n    \"riverty_installment\",\r\n];\r\n\r\n/**\r\n * Checks if an order qualifies for free shipping.\r\n * To qualify for free shipping the freeShippingActive flag must be true and the order value must be greater than or equal to the freeShippingLimit.\r\n *\r\n * @param freeShippingActive - Indicates if free shipping is active.\r\n * @param freeShippingLimit - The minimum order value required for free shipping.\r\n * @param subTotal - The total order value.\r\n * @returns A boolean value indicating if the order qualifies for free shipping.\r\n */\r\nexport const qualifiesForFreeShipping = (\r\n    freeShippingActive?: boolean,\r\n    freeShippingLimit?: Money,\r\n    subTotal?: Money,\r\n): boolean => {\r\n    if (!freeShippingActive || !freeShippingLimit || !subTotal) return false;\r\n    return freeShippingActive && freeShippingLimit.amount <= subTotal.amount;\r\n};\r\n\r\n/**\r\n * Calculates the remaining amount needed to qualify for free shipping, if a free shipping treshold is active\r\n *\r\n * @returns {Money | undefined} The remaining amount needed to qualify for free shipping, or undefined if a free shipping treshold is not active\r\n */\r\nexport const amountNeededToQualifyForFreeShipping = (\r\n    freeShippingActive?: boolean,\r\n    freeShippingLimit?: Money,\r\n    value?: Money,\r\n): Money | undefined => {\r\n    if (\r\n        !freeShippingActive ||\r\n        !value ||\r\n        !freeShippingLimit ||\r\n        freeShippingLimit.amount <= value.amount\r\n    )\r\n        return;\r\n\r\n    return {\r\n        amount: freeShippingLimit.amount - value.amount,\r\n        currency: value.currency,\r\n    };\r\n};\r\n\r\n/**\r\n * Computes and returns the formatted text for shipping cost.\r\n *\r\n * @returns {string} The formatted shipping cost text.\r\n */\r\nexport const shippingCostFormatted = (\r\n    freeShippingActive: boolean,\r\n    freeShippingLimit: Money,\r\n    value: Money,\r\n    selectedShippingMethodPrice: Money,\r\n): string => {\r\n    if (\r\n        (freeShippingActive && freeShippingLimit.amount <= value.amount) ||\r\n        !selectedShippingMethodPrice.amount\r\n    )\r\n        return \"Fri frakt\";\r\n\r\n    if (selectedShippingMethodPrice?.amount) {\r\n        return `${formatCurrency(selectedShippingMethodPrice.currency)} ${formatWithoutRounding(selectedShippingMethodPrice.amount)}`;\r\n    }\r\n\r\n    return \"Beregnes senere\";\r\n};\r\n\r\n/**\r\n * Returns a formatted string representing the delivery window timestamp.\r\n *\r\n * @param date - The date object representing the delivery window timestamp.\r\n * @returns A string in the format \"HH:MM\" representing the delivery window timestamp.\r\n */\r\nexport const deliveryWindowTimeStamp = (date: Date) => {\r\n    const hours = date.getHours().toString().padStart(2, \"0\");\r\n    const minutes = date.getMinutes().toString().padStart(2, \"0\");\r\n    return `${hours}:${minutes}`;\r\n};\r\n\r\n/**\r\n * Formats the given date and returns the weekday in no-NB.\r\n *\r\n * @param date - The date to format.\r\n * @returns The formatted weekday.\r\n */\r\nexport const formatDay = (date: Date) => {\r\n    if (isToday(date)) return \"I dag\";\r\n\r\n    return date.toLocaleDateString(\"no-NB\", {\r\n        weekday: \"long\",\r\n        day: \"numeric\",\r\n        month: \"long\",\r\n    });\r\n};\r\n\r\n/**\r\n * Checks if a given date is today.\r\n *\r\n * @param {Date} date - The date to check.\r\n * @returns {boolean} - Returns true if the date is today, false otherwise.\r\n */\r\nconst isToday = (date: Date) => {\r\n    const today = new Date();\r\n    return (\r\n        date.getDate() === today.getDate() &&\r\n        date.getMonth() === today.getMonth() &&\r\n        date.getFullYear() === today.getFullYear()\r\n    );\r\n};\r\n\r\n/**\r\n * Returns the formatted address details for a given delivery location.\r\n *\r\n * @param {DeliveryLocation} location - The delivery location object.\r\n * @returns {string} - The address details.\r\n */\r\nexport const formatDeliveryLocationAddress = (\r\n    location: DeliveryLocation,\r\n): string => {\r\n    return `${location.deliveryAddress?.trim()}, ${location.postalCode} ${location.city}`;\r\n};\r\n\r\n/**\r\n * Returns the logo name for a given delivery method.\r\n * The purpose of the logo name is to identify the image filename\r\n *\r\n * @param deliveryMethod - The delivery method object.\r\n * @returns The logo name corresponding to the delivery method.\r\n */\r\nexport const LogoNameForDeliveryMethod = (\r\n    deliveryMethod: DeliveryMethod,\r\n): string => {\r\n    switch (deliveryMethod.name) {\r\n        case \"Porterbuddy\":\r\n            return \"porterbuddy\";\r\n        case \"MyPack\":\r\n        case \"HomeDelivery\":\r\n            return \"postnord\";\r\n        default:\r\n            return \"\";\r\n    }\r\n};\r\n\r\n/**\r\n * Returns the logo name for a given payment method image ID.\r\n * The purpose of the logo name is to identify the image filename\r\n *\r\n * @param imageId The ID of the payment method image.\r\n * @returns The logo name for the payment method.\r\n */\r\nexport const logoNameForPaymentMethod = (imageId: string): string => {\r\n    if (!imageId || !validPaymentImageIds.find((id) => id === imageId)) {\r\n        return \"\";\r\n    }\r\n\r\n    return `payment_${imageId}`;\r\n};\r\n\r\n/**\r\n * Returns the CSS classname for a given payment method ID.\r\n *\r\n * @param id - The payment method ID.\r\n * @returns The CSS class name for the payment method.\r\n */\r\nexport const paymentClass = (id: string): string => {\r\n    const prefix = \"checkout-payment__\";\r\n    switch (id) {\r\n        case \"nets\":\r\n            return `${prefix}nets`;\r\n        case \"vipps\":\r\n            return `${prefix}vipps`;\r\n        case \"afterpay_invoice\":\r\n            return `${prefix}invoice`;\r\n        case \"afterpay_installment\":\r\n            return `${prefix}installment`;\r\n        default:\r\n            return \"\";\r\n    }\r\n};\r\n\r\n/**\r\n * Checks if the given payment method has Afterpay installment information.\r\n *\r\n * @param paymentMethod - The payment method to check.\r\n * @returns A boolean indicating whether the payment method has Afterpay installment information.\r\n */\r\nexport const hasAfterpayInstallmentInfo = (\r\n    paymentMethod: PaymentMethodViewModel,\r\n) => {\r\n    return !!paymentMethod?.afterPayViewModel?.installmentInfo;\r\n};\r\n\r\n/**\r\n * Checks if the given payment method has Afterpay methods available.\r\n *\r\n * @param paymentMethod - The payment method to check.\r\n * @returns A boolean indicating whether Afterpay methods are available.\r\n */\r\nexport const hasAfterpayMethods = (\r\n    paymentMethod: PaymentMethodViewModel,\r\n): boolean => {\r\n    return !!(\r\n        paymentMethod?.afterPayViewModel?.accountInfo ||\r\n        paymentMethod?.afterPayViewModel?.installmentInfo\r\n    );\r\n};\r\n\r\n/**\r\n * Returns the first Afterpay method based on the provided payment method.\r\n *\r\n * @param paymentMethod - The payment method view model.\r\n * @returns The first Afterpay method (\"Account\" or \"Installment\"), or an empty string if no Afterpay method is found.\r\n */\r\nexport const getFirstAfterpayMethod = (\r\n    paymentMethod: PaymentMethodViewModel,\r\n): string => {\r\n    if (paymentMethod?.afterPayViewModel?.accountInfo)\r\n        return AfterpayMethods.Account;\r\n    if (paymentMethod?.afterPayViewModel?.installmentInfo)\r\n        return AfterpayMethods.Installment;\r\n\r\n    return \"\";\r\n};\r\n\r\n/**\r\n * Retrieves a payment method from an array of payment methods based on the selected system keyword.\r\n *\r\n * @param paymentMethods - An array of PaymentMethodViewModel objects representing the available payment methods.\r\n * @param selectedSystemKeyword - The system keyword of the selected payment method.\r\n * @returns The PaymentMethodViewModel object that matches the selected system keyword, or undefined if no match is found.\r\n */\r\nexport const getPaymentMethodBySystemKeyword = (\r\n    paymentMethods: PaymentMethodViewModel[],\r\n    selectedSystemKeyword: string,\r\n) => {\r\n    return paymentMethods.find(\r\n        (method) => method.systemKeyword === selectedSystemKeyword,\r\n    );\r\n};\r\n\r\n/**\r\n * Retrieves the value of the first installment from the given payment method.\r\n *\r\n * @param paymentMethod - The payment method view model.\r\n * @returns The value of the first installment, or undefined if it is not available.\r\n */\r\nexport const getFirstInstallmentValue = (\r\n    paymentMethod: PaymentMethodViewModel,\r\n) => {\r\n    if (!paymentMethod) return;\r\n\r\n    return paymentMethod?.afterPayViewModel?.installmentInfo\r\n        ?.installmentListItems?.[0]?.value;\r\n};\r\n\r\n/**\r\n * Returns the payment body based on the provided payment method and optional parameters.\r\n *\r\n * @param paymentMethod - The payment method view model.\r\n * @param personIdentifier - The person identifier (optional).\r\n * @param selectedAfterPayInstallmentOption - The selected AfterPay installment option (optional).\r\n * @param selectedAfterPayInstallmentPlan - The selected AfterPay installment plan (optional).\r\n * @returns The payment body object.\r\n */\r\nexport const getPaymentBody = (\r\n    paymentMethod: PaymentMethodViewModel,\r\n    personIdentifier?: string,\r\n    selectedAfterPayInstallmentOption?: string,\r\n    selectedAfterPayInstallmentPlan?: string,\r\n) => {\r\n    const body: AddPaymentMethodRequestDto = {};\r\n\r\n    if (paymentMethod.requirePersonIdentifier) {\r\n        body.personIdentifier = personIdentifier;\r\n    }\r\n\r\n    if (paymentMethod.isAfterPayInstallment) {\r\n        body.selectedAfterPayInstallmentOption =\r\n            selectedAfterPayInstallmentOption;\r\n    }\r\n\r\n    if (selectedAfterPayInstallmentOption === AfterpayMethods.Installment) {\r\n        body.selectedAfterPayInstallmentPlan = selectedAfterPayInstallmentPlan;\r\n    }\r\n\r\n    return body;\r\n};\r\n\r\n/**\r\n * Function that returns the selected delivery method.\r\n *\r\n * @param {Array} deliveryMethods - The array of delivery methods.\r\n * @param {string} selectedDeliveryMethodId - The ID of the selected delivery method.\r\n * @returns {any} The selected delivery method.\r\n */\r\nexport const getSelectedDeliveryMethod = (\r\n    deliveryMethods: DeliveryMethod[],\r\n    selectedDeliveryMethodId: string,\r\n) => {\r\n    return deliveryMethods?.find(\r\n        (method) => method.id === selectedDeliveryMethodId,\r\n    );\r\n};\r\n\r\n/**\r\n * Sets information errors based on the provided errors.\r\n *\r\n * @param errors - The errors object containing the error messages.\r\n * @param informationErrors - The information errors object to be updated.\r\n */\r\nexport const setInformationErrors = (errors, informationErrors) => {\r\n    clearErrors(informationErrors);\r\n\r\n    errors.errors.forEach(\r\n        (issue: { path: string | number; message: string }) => {\r\n            informationErrors[issue.path].push(issue.message);\r\n        },\r\n    );\r\n};\r\n\r\n/**\r\n * Clears any errors in the error object.\r\n */\r\nexport const clearErrors = (errorObject) => {\r\n    Object.keys(errorObject).forEach((key) => (errorObject[key] = []));\r\n};\r\n\r\n/**\r\n * Retrieves the first delivery location from the given delivery method.\r\n *\r\n * @param deliveryMethod - The delivery method object.\r\n * @returns The first delivery location, or undefined if no delivery locations are available.\r\n */\r\nexport const getFirstDeliveryLocation = (deliveryMethod: DeliveryMethod) => {\r\n    return deliveryMethod?.deliveryLocations?.[0];\r\n};\r\n\r\n/**\r\n * Retrieves the first delivery window from the given delivery method.\r\n * @param deliveryMethod - The delivery method object.\r\n * @returns The first delivery window, or undefined if no delivery windows are available.\r\n */\r\nexport const getFirstDeliveryWindow = (deliveryMethod: DeliveryMethod) => {\r\n    return deliveryMethod?.deliveryWindows?.[0];\r\n};\r\n\r\n/**\r\n * Checks if a delivery method has delivery locations.\r\n *\r\n * @param deliveryMethod - The delivery method to check.\r\n * @returns A boolean indicating whether the delivery method has delivery locations.\r\n */\r\nexport const hasDeliveryLocations = (\r\n    deliveryMethod: DeliveryMethod,\r\n): boolean => {\r\n    return !!deliveryMethod?.deliveryLocations?.length;\r\n};\r\n\r\n/**\r\n * Checks if a delivery method has delivery windows.\r\n *\r\n * @param deliveryMethod - The delivery method to check.\r\n * @returns A boolean indicating whether the delivery method has delivery windows.\r\n */\r\nexport const hasDeliveryWindows = (\r\n    deliveryMethod: DeliveryMethod,\r\n): boolean | undefined => {\r\n    return !!deliveryMethod?.deliveryWindows?.length;\r\n};\r\n\r\n/**\r\n * Converts the first character of a string to uppercase and the rest to lowercase.\r\n *\r\n * @param text - The input string.\r\n * @returns The converted string.\r\n */\r\nexport const sentenceCase = (text: string) => {\r\n    return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();\r\n};\r\n\r\n/**\r\n * Converts a given checkout step to a corresponding Google Analytics event name.\r\n *\r\n * @param checkoutStep - The current step in the checkout process.\r\n * @returns The Google Analytics event name corresponding to the provided checkout step.\r\n *\r\n * Checkout steps and their corresponding event names:\r\n * - `CheckoutSteps.CustomerInformation`: \"begin_checkout\"\r\n * - `CheckoutSteps.Delivery`: \"add_shipping_info_address\"\r\n * - `CheckoutSteps.Payment`: \"add_shipping_info\"\r\n * - `CheckoutSteps.FinalizeOrder`: \"add_payment_info\"\r\n * - Default: \"\"\r\n */\r\nexport const toGoogleAnalyticsEventName = (\r\n    checkoutStep: CheckoutStep,\r\n): Ga4Event => {\r\n    switch (checkoutStep) {\r\n        case CheckoutSteps.CustomerInformation:\r\n            return Ga4Events.BeginCheckout;\r\n        case CheckoutSteps.Delivery:\r\n            return Ga4Events.AddShippingInfoAddress;\r\n        case CheckoutSteps.Payment:\r\n            return Ga4Events.AddShippingInfo;\r\n        case CheckoutSteps.FinalizeOrder:\r\n            return Ga4Events.AddPaymentInfo;\r\n        case CheckoutSteps.Confirmation:\r\n            return Ga4Events.Purchase;\r\n        default:\r\n            return Ga4Events.NoEvent;\r\n    }\r\n};\r\n","import {\r\n    PlaceholderAddressModel,\r\n    PlaceholderAddressModelSchema,\r\n} from \"../Cart/cartAPISchema\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\n\r\nconst API_URL = \"/api/customer\";\r\n\r\nexport async function getCustomerInformation(): Promise<PlaceholderAddressModel | null> {\r\n    const url = `${API_URL}`;\r\n    const response = await fetch(url.toString(), {\r\n        method: \"GET\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        throw new Error(`HTTP error! status: ${response.status}`);\r\n    }\r\n\r\n    if (response.status === 204) {\r\n        return null;\r\n    };\r\n\r\n    const data = await response.json();\r\n    const validatedData = PlaceholderAddressModelSchema.parse(data);\r\n\r\n    return validatedData;\r\n}\r\n","import { defineStore } from \"pinia\";\r\nimport { AddressModelWithoutAnalytics, PlaceholderAddressModel } from \"Scripts/global/apps/utils/API/Cart/cartAPISchema\";\r\n\r\nexport const useCustomerInformationStore = defineStore(\"customerInformation\", {\r\n    state: () => ({\r\n        /*\r\n        * fields holds the current value of the customer information form input fields\r\n        */\r\n        fields: {\r\n            email: \"\" as string | undefined,\r\n            firstName: \"\" as string | undefined,\r\n            lastName: \"\" as string | undefined,\r\n            phoneNumber: \"\" as string | undefined,\r\n            address: \"\" as string | undefined,\r\n            postalCode: \"\" as string | undefined,\r\n            city: \"\" as string | undefined,\r\n        } as PlaceholderAddressModel,\r\n        /*\r\n        * errors holds the current error messages for the customer information form input fields\r\n        */\r\n        errors: {\r\n            email: [],\r\n            firstName: [],\r\n            lastName: [],\r\n            phoneNumber: [],\r\n            address: [],\r\n            postalCode: [],\r\n            city: [],\r\n        },\r\n        /*\r\n        * submittedFields holds the last value of the customer information form input fields that were submitted over the API\r\n        */\r\n        submittedFields: {\r\n            email: \"\",\r\n            firstName: \"\",\r\n            lastName: \"\",\r\n            phoneNumber: \"\",\r\n            address: \"\",\r\n            postalCode: \"\",\r\n        } as AddressModelWithoutAnalytics,\r\n        retrievingCity: false,\r\n        errorSummaryVisible: false,\r\n    }),\r\n    actions: {\r\n        setField(field: string | number, value: string | undefined) {\r\n            this.fields[field] = value;\r\n        },\r\n        setFields(fields: PlaceholderAddressModel | null | undefined) {\r\n            if (!fields) {\r\n                this.clearAllFields();\r\n                return;\r\n            }\r\n\r\n            this.fields = fields;\r\n        },\r\n        clearAllFields() {\r\n            this.fields = {\r\n                email: \"\",\r\n                firstName: \"\",\r\n                lastName: \"\",\r\n                phoneNumber: \"\",\r\n                address: \"\",\r\n                postalCode: \"\",\r\n                city: \"\",\r\n            };\r\n        },\r\n        setError(field: string | number, error: any) {\r\n            this.errors[field] = error;\r\n        },\r\n        clearError(field: string | number) {\r\n            this.errors[field] = [];\r\n        },\r\n        clearAllErrors() {\r\n            this.errors = {\r\n                email: [],\r\n                firstName: [],\r\n                lastName: [],\r\n                phoneNumber: [],\r\n                address: [],\r\n                postalCode: [],\r\n                city: [],\r\n            };\r\n        },\r\n        setSubmittedFields(fields: AddressModelWithoutAnalytics) {\r\n            this.submittedFields = fields;\r\n        },\r\n        setErrorSummaryVisible(visible: boolean) {\r\n            this.errorSummaryVisible = visible;\r\n        },\r\n        setRetrievingCity(retrieving: boolean) {\r\n            this.retrievingCity = retrieving;\r\n        },\r\n    },\r\n    getters: {\r\n        fieldsEmpty: (state) => {\r\n            return Object.values(state.fields).some((field) => field === \"\");\r\n        },\r\n        errorsExist: (state) => {\r\n            return Object.values(state.errors).some(\r\n                (error) => error.length > 0,\r\n            );\r\n        },\r\n    },\r\n});\r\n","import { API_ERROR_MESSAGES, USER_FEEDBACK } from \"../APIErrors\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\n\r\nconst API_URL = \"/api/postal\";\r\n\r\n/**\r\n * Retrieves the city name associated with a given postal code.\r\n * If the postal code is not found, an empty string is returned.\r\n *\r\n * @param postalCode The postal code to retrieve the city for.\r\n * @returns A Promise that resolves to the city name.\r\n */\r\nexport const getCityFromPostalCode = async (\r\n    postalCode: string,\r\n): Promise<string> => {\r\n    const url = `${API_URL}/${postalCode}`;\r\n\r\n    const response = await fetch(url, {\r\n        method: \"GET\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return API_ERROR_MESSAGES.COULD_NOT_GET_CITY;\r\n    }\r\n\r\n    const city = await response.json();\r\n    return city === \"\" ? USER_FEEDBACK.UNKNOWN_POSTALCODE : city;\r\n};\r\n","import { defineStore } from \"pinia\";\r\nimport {\r\n    DeliveryLocation,\r\n    DeliveryMethod,\r\n    DeliveryModel,\r\n    DeliveryWindow,\r\n} from \"../../../utils/API/Delivery/deliveryAPISchema\";\r\n\r\nexport const useDeliveryInformationStore = defineStore(\"deliveryInformation\", {\r\n    state: () => ({\r\n        deliveryInformation: null as DeliveryModel | null | undefined,\r\n        selectedDeliveryMethod: null as DeliveryMethod | null | undefined,\r\n        selectedDeliveryLocation: null as DeliveryLocation | null | undefined,\r\n        selectedDeliveryWindow: undefined as DeliveryWindow | undefined,\r\n        errors: {\r\n            deliveryMethod: [] as string[],\r\n            deliveryWindow: [] as string[],\r\n            deliveryLocation: [] as string[],\r\n        },\r\n    }),\r\n    actions: {\r\n        setSelectedDeliveryMethod(\r\n            deliveryMethod: DeliveryMethod | null | undefined,\r\n        ) {\r\n            this.selectedDeliveryMethod = deliveryMethod;\r\n            this.selectedDeliveryLocation = deliveryMethod?.deliveryLocations?.[0] ?? undefined;\r\n            this.selectedDeliveryWindow = deliveryMethod?.deliveryWindows?.[0] ?? undefined;\r\n        },\r\n        setSelectedDeliveryLocation(deliveryLocation: DeliveryLocation | null) {\r\n            this.selectedDeliveryLocation = deliveryLocation;\r\n        },\r\n        setSelectedDeliveryWindow(deliveryWindow: DeliveryWindow | undefined) {\r\n            this.selectedDeliveryWindow = deliveryWindow;\r\n        },\r\n        setError(field: string | number, error: string) {\r\n            this.errors[field] = error;\r\n        },\r\n        setErrors(errors: {\r\n            deliveryMethod: string[];\r\n            deliveryWindow: string[];\r\n            deliveryLocation: string[];\r\n        }) {\r\n            this.errors = errors;\r\n        },\r\n        clearAllErrors() {\r\n            this.errors = {\r\n                deliveryMethod: [],\r\n                deliveryWindow: [],\r\n                deliveryLocation: [],\r\n            };\r\n        },\r\n    },\r\n});\r\n","import {\r\n    hasDeliveryLocations,\r\n    hasDeliveryWindows,\r\n} from \"../../../../../helpers/checkoutHelpers\";\r\nimport { z } from \"zod\";\r\nimport { FEEDBACK_TEXT } from \"../../validationHelpers\";\r\nimport { CartSchema, citySchema, postalCodeSchema } from \"../Cart/cartAPISchema\";\r\nimport { GoogleAnalytics4EventModelSchema } from \"../GoogleAnalytics/GoogleAnalyticsSchema\";\r\nexport type Price = z.infer<typeof PriceSchema>;\r\nexport const PriceSchema = z.object({\r\n    currency: z.string(),\r\n    fractionalDenomination: z.number(),\r\n});\r\n\r\nexport type PickupWindow = z.infer<typeof PickupWindowSchema>;\r\nexport const PickupWindowSchema = z.object({\r\n    start: z.string(),\r\n    end: z.string(),\r\n    token: z.string(),\r\n    price: PriceSchema,\r\n});\r\n\r\nexport type DeliveryWindow = z.infer<typeof DeliveryWindowSchema>;\r\nexport const DeliveryWindowSchema = PickupWindowSchema.extend({\r\n    consolidated: z.boolean(),\r\n    displayPrice: PriceSchema,\r\n    expiresAt: z.string(),\r\n    price: PriceSchema,\r\n    product: z.string(),\r\n});\r\n\r\nexport type UpdateDeliveryRequestDto = z.infer<\r\n    typeof UpdateDeliveryRequestDtoSchema\r\n>;\r\nexport const UpdateDeliveryRequestDtoSchema = z.object({\r\n    deliveryLocationId: z.string().optional(),\r\n    deliveryWindow: DeliveryWindowSchema.optional(),\r\n});\r\n\r\nexport type DeliveryLocation = z.infer<typeof DeliveryLocationSchema>;\r\nexport const DeliveryLocationSchema = z.object({\r\n    id: z.string(),\r\n    IsPickUpInStore: z.boolean().optional(),\r\n    name: z.string().optional(),\r\n    deliveryAddress: z.string().optional(),\r\n    postalCode: postalCodeSchema.optional(),\r\n    city: citySchema.optional(),\r\n});\r\n\r\nexport type DeliveryMethod = z.infer<typeof DeliveryMethodSchema>;\r\nexport const DeliveryMethodSchema = z.object({\r\n    name: z.string(),\r\n    id: z.string().uuid(),\r\n    price: z.number(),\r\n    description: z.string().nullable(),\r\n    displayName: z.string(),\r\n    isDefaultSelection: z.boolean(),\r\n    ordering: z.number(),\r\n    deliveryWindows: z.array(DeliveryWindowSchema).nullable(),\r\n    deliveryLocations: z.array(DeliveryLocationSchema).nullable(),\r\n});\r\n\r\nexport type DeliveryModel = z.infer<typeof DeliveryModelSchema>;\r\nexport const DeliveryModelSchema = z.object({\r\n    deliveryMethods: z.array(DeliveryMethodSchema),\r\n});\r\n\r\nexport const createAddDeliveryMethodRequestDtoSchema = (\r\n    selectedDeliveryMethod: DeliveryMethod,\r\n) => {\r\n    return UpdateDeliveryRequestDtoSchema.refine(\r\n        (data) => {\r\n            if (\r\n                hasDeliveryWindows(selectedDeliveryMethod) &&\r\n                !data.deliveryWindow?.token\r\n            ) {\r\n                return false;\r\n            }\r\n            return true;\r\n        },\r\n        {\r\n            message: FEEDBACK_TEXT().REQUIRED_DELIVERY_WINDOW,\r\n            path: [\"deliveryWindow\"],\r\n        },\r\n    ).refine(\r\n        (data) => {\r\n            if (\r\n                hasDeliveryLocations(selectedDeliveryMethod) &&\r\n                !data.deliveryLocationId\r\n            ) {\r\n                return false;\r\n            }\r\n            return true;\r\n        },\r\n        {\r\n            message: FEEDBACK_TEXT().REQUIRED_DELIVERY_LOCATION,\r\n            path: [\"deliveryLocation\"],\r\n        },\r\n    );\r\n};\r\n\r\nexport type GetDeliveryInformationResponseModel = z.infer<typeof GetDeliveryInformationResponseModelSchema>;\r\nexport const GetDeliveryInformationResponseModelSchema = z.object({\r\n    deliveryDto: DeliveryModelSchema,\r\n});\r\n\r\nexport type SetDeliveryOptionResponseModel = z.infer<typeof SetDeliveryOptionResponseModelSchema>;\r\nexport const SetDeliveryOptionResponseModelSchema = z.object({\r\n    cartDto: CartSchema,\r\n});","import {\r\n    AddressModel,\r\n    Cart,\r\n    CartSchema,\r\n    CheckoutInputModel,\r\n} from \"../Cart/cartAPISchema\";\r\nimport {\r\n    DeliveryLocation,\r\n    DeliveryLocationSchema,\r\n    DeliveryMethod,\r\n    DeliveryModel,\r\n    DeliveryModelSchema,\r\n    GetDeliveryInformationResponseModel,\r\n    GetDeliveryInformationResponseModelSchema,\r\n    SetDeliveryOptionResponseModel,\r\n    SetDeliveryOptionResponseModelSchema,\r\n    UpdateDeliveryRequestDto,\r\n} from \"./deliveryAPISchema\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\nimport { json } from \"stream/consumers\";\r\nimport { ShippingMethod } from \"Scripts/global/apps/services/models/checkout.models\";\r\n\r\nconst API_URL = \"/api/delivery\";\r\n\r\n/**\r\n * Retrieves delivery information from the API.\r\n *\r\n * @returns A promise that resolves to a `DeliveryModel` object.\r\n * @throws An error if the HTTP request fails or the response is not valid.\r\n */\r\nexport async function getDeliveryInformation(): Promise<GetDeliveryInformationResponseModel> {\r\n    const url = `${API_URL}`;\r\n    const response = await fetch(url.toString(), {\r\n        method: \"GET\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        throw new Error(`HTTP error! status: ${response.status}`);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = GetDeliveryInformationResponseModelSchema.parse(data);\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Retrieves delivery information from the API.\r\n *\r\n * @returns A promise that resolves to a `DeliveryModel` object.\r\n * @throws An error if the HTTP request fails or the response is not valid.\r\n */\r\nexport async function getDeliveryLocations(\r\n    shippingMethodName: string,\r\n    postalCode: string,\r\n): Promise<Array<DeliveryLocation>> {\r\n    const url = `${API_URL}/deliveryLocations?shippingMethodName=${shippingMethodName}&postalCode=${postalCode}`;\r\n\r\n    const response = await fetch(url.toString(), {\r\n        method: \"GET\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        throw new Error(`HTTP error! status: ${response.status}`);\r\n    }\r\n\r\n    const data = await response.json();\r\n    //Parse all array entries in the response data to the DeliveryLocationSchema\r\n    const validatedData = data.map((deliveryLocation: DeliveryLocation) =>\r\n        DeliveryLocationSchema.parse(deliveryLocation),\r\n    );\r\n    return validatedData;\r\n}\r\n\r\n/**\r\n * Sets the selected delivery option for a given delivery method.\r\n *\r\n * @param request - The selected delivery option schema.\r\n * @returns A promise that resolves to a boolean indicating whether the delivery option was set successfully.\r\n */\r\nexport async function setDeliveryOption(\r\n    deliveryMethodId: string,\r\n    request: UpdateDeliveryRequestDto,\r\n): Promise<SetDeliveryOptionResponseModel> {\r\n    const url = `${API_URL}/${deliveryMethodId}`;\r\n    const body = JSON.stringify(request);\r\n    const response = await fetch(url.toString(), {\r\n        method: \"PUT\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: JSON.stringify(request),\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response, body);\r\n        return Promise.reject(false);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedData = SetDeliveryOptionResponseModelSchema.parse(data);\r\n\r\n    return validatedData;\r\n}\r\n","import {\r\n    AfterpayMethods,\r\n    hasAfterpayMethods,\r\n} from \"../../../../../helpers/checkoutHelpers\";\r\nimport { z } from \"zod\";\r\nimport { FEEDBACK_TEXT, validationHelper } from \"../../validationHelpers\";\r\nimport { GoogleAnalytics4EventModelSchema } from \"../GoogleAnalytics/GoogleAnalyticsSchema\";\r\n\r\nexport type SelectListGroup = z.infer<typeof SelectListGroupSchema>;\r\nexport const SelectListGroupSchema = z.object({\r\n    disabled: z.boolean(),\r\n    name: z.string(),\r\n});\r\n\r\nexport type SelectListItem = z.infer<typeof SelectListItemSchema>;\r\nexport const SelectListItemSchema = z.object({\r\n    disabled: z.boolean(),\r\n    group: SelectListGroupSchema.nullable(),\r\n    selected: z.boolean(),\r\n    text: z.string(),\r\n    value: z.string(),\r\n});\r\n\r\nexport type AfterPayTermsInfo = z.infer<typeof AfterPayTermsInfoSchema>;\r\nexport const AfterPayTermsInfoSchema = z.object({\r\n    installmentAmount: z.string().nullable(),\r\n    interestRate: z.string().nullable(),\r\n    effectiveInterestRate: z.string().nullable(),\r\n    effectiveAnnualPercentageRate: z.string(),\r\n    totalInterestAmount: z.string().nullable(),\r\n    startupFee: z.string().nullable(),\r\n    monthlyFee: z.string().nullable(),\r\n    totalAmount: z.string().nullable(),\r\n});\r\n\r\nexport type AfterPayInstallmentInfo = z.infer<\r\n    typeof AfterPayInstallmentInfoSchema\r\n>;\r\nexport const AfterPayInstallmentInfoSchema = AfterPayTermsInfoSchema.extend({\r\n    heading: z.string(),\r\n});\r\n\r\nexport type AfterPayInstallmentViewModel = z.infer<\r\n    typeof AfterPayInstallmentViewModelSchema\r\n>;\r\nexport const AfterPayInstallmentViewModelSchema = z.object({\r\n    installmentListItems: z.array(SelectListItemSchema).nullable(),\r\n    installmentInfoItems: z.record(AfterPayInstallmentInfoSchema),\r\n});\r\n\r\nexport type AfterPayAccountInfo = z.infer<typeof AfterPayAccountInfoSchema>;\r\nexport const AfterPayAccountInfoSchema = AfterPayTermsInfoSchema.extend({\r\n    mainBody: z.string().optional(), // XhtmlString containing HTML markup\r\n    montlyCost: z.string(),\r\n    priceExample: z.string(),\r\n});\r\n\r\nexport type AfterPayViewModel = z.infer<typeof AfterPayViewModelSchema>;\r\nexport const AfterPayViewModelSchema = z.object({\r\n    accountInfo: AfterPayAccountInfoSchema,\r\n    installmentInfo: AfterPayInstallmentViewModelSchema.nullable(),\r\n    isAccountAvailable: z.boolean(),\r\n    isInstallmentAvailable: z.boolean(),\r\n});\r\n\r\nexport type LoginModel = z.infer<typeof CheckoutOptionViewModelSchema>;\r\nexport const CheckoutOptionViewModelSchema = z.object({\r\n    description: z.string(),\r\n    id: z.string(),\r\n    isDefault: z.boolean(),\r\n    name: z.string(),\r\n});\r\n\r\nexport type PaymentMethodViewModel = z.infer<\r\n    typeof PaymentMethodViewModelSchema\r\n>;\r\n\r\nexport const PaymentMethodViewModelSchema =\r\n    CheckoutOptionViewModelSchema.extend({\r\n        disclaimer: z.string().nullable(),\r\n        paymentMethodId: z.string().uuid(),\r\n        systemKeyword: z.string(),\r\n        requirePersonIdentifier: z.boolean(),\r\n        imageId: z.string(),\r\n        isAfterPayInstallment: z.boolean(),\r\n        isAfterPayInvoice: z.boolean(),\r\n        afterPayViewModel: AfterPayViewModelSchema.nullable(),\r\n    });\r\n\r\nexport const AfterPayInstallmentTypeSchema = z.enum([\r\n    AfterpayMethods.Account,\r\n    AfterpayMethods.Installment,\r\n]);\r\n\r\nexport type AfterPayInstallmentType = z.infer<\r\n    typeof AfterPayInstallmentTypeSchema\r\n>;\r\n\r\nexport type AddPaymentMethodRequestDto = z.infer<\r\n    typeof AddPaymentMethodRequestDtoSchema\r\n>;\r\n\r\nexport type SelectPaymentResultDto = z.infer<\r\n    typeof SelectPaymentResultDtoSchema\r\n>;\r\n\r\nexport type ValidatedCartResultDto = z.infer<\r\n    typeof ValidatedCartResultDtoSchema\r\n>;\r\n\r\nexport const PersonIdentifierSchema = z\r\n    .string()\r\n    .length(11, {\r\n        message: FEEDBACK_TEXT().PERSON_IDENTIFIER_REQUIRED_LENGTH,\r\n    })\r\n    .superRefine((value, context) => {\r\n        if (!validationHelper.containsOnlyNumbers(value)) {\r\n            context.addIssue({\r\n                code: z.ZodIssueCode.custom,\r\n                message: FEEDBACK_TEXT().CAN_ONLY_CONTAIN_NUMBERS,\r\n            });\r\n        }\r\n    });\r\n\r\nexport const AddPaymentMethodRequestDtoSchema = z.object({\r\n    personIdentifier: PersonIdentifierSchema.optional(),\r\n    selectedAfterPayInstallmentOption: z.string().optional(),\r\n    selectedAfterPayInstallmentPlan: z.string().optional(),\r\n});\r\n\r\nexport const UpdatedCartLineItemDtoSchema = z.object({\r\n    name: z.string(),\r\n    size: z.string(),\r\n    oldQuantity: z.number(),\r\n    newQuantity: z.number(),\r\n});\r\n\r\nexport const ValidatedCartResultDtoSchema = z.object({\r\n    cartLinesUpdated: z.array(UpdatedCartLineItemDtoSchema),\r\n    cartTotal: z.number(),\r\n    shippingTotal: z.number(),\r\n    description: z.string().optional().nullable(),\r\n    itemCount: z.number(),\r\n});\r\n\r\nexport const SelectPaymentResultDtoSchema = z.object({\r\n    url: z.string().optional().nullable(),\r\n    errorMessage: z.string().optional().nullable(),\r\n    cartResultDto: ValidatedCartResultDtoSchema.optional().nullable(),\r\n});\r\n\r\nexport const createAddPaymentMethodRequestDtoSchema = (\r\n    selectedPaymentMethod: PaymentMethodViewModel,\r\n) => {\r\n    return AddPaymentMethodRequestDtoSchema.refine(\r\n        (data) => {\r\n            if (\r\n                selectedPaymentMethod.requirePersonIdentifier &&\r\n                !data.personIdentifier\r\n            ) {\r\n                return false;\r\n            }\r\n            return true;\r\n        },\r\n        {\r\n            message: FEEDBACK_TEXT().REQUIRED_PERSON_IDENTIFIER,\r\n            path: [\"personIdentifier\"],\r\n        },\r\n    )\r\n        .refine(\r\n            (data) => {\r\n                if (\r\n                    hasAfterpayMethods(selectedPaymentMethod) &&\r\n                    !data.selectedAfterPayInstallmentOption\r\n                ) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            },\r\n            {\r\n                message: FEEDBACK_TEXT().REQUIRED_AFTERPAY_INSTALLMENT_METHOD,\r\n                path: [\"selectedAfterPayInstallmentOption\"],\r\n            },\r\n        )\r\n        .refine(\r\n            (data) => {\r\n                if (\r\n                    data.selectedAfterPayInstallmentOption ===\r\n                        AfterpayMethods.Installment &&\r\n                    !data.selectedAfterPayInstallmentPlan\r\n                ) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            },\r\n            {\r\n                message: FEEDBACK_TEXT().REQUIRED_AFTERPAY_INSTALLMENT_PLAN,\r\n                path: [\"selectedAfterPayInstallmentPlan\"],\r\n            },\r\n        );\r\n};\r\n\r\nexport type PaymentMethodsDto = z.infer<typeof PaymentMethodsDtoSchema>;\r\nexport const PaymentMethodsDtoSchema = z.object({\r\n    paymentMethods: z.array(PaymentMethodViewModelSchema),\r\n});\r\n\r\nexport type GetPaymentMethodsResponseModel = z.infer<typeof GetPaymentMethodsResponseModelSchema>;\r\nexport const GetPaymentMethodsResponseModelSchema = z.object({\r\n    paymentMethodsDto: PaymentMethodsDtoSchema,\r\n});","import { USER_FEEDBACK } from \"../APIErrors\";\r\nimport {\r\n    AddPaymentMethodRequestDto,\r\n    GetPaymentMethodsResponseModel,\r\n    GetPaymentMethodsResponseModelSchema,\r\n    PaymentMethodsDto,\r\n    PaymentMethodsDtoSchema,\r\n    PaymentMethodViewModel,\r\n    PaymentMethodViewModelSchema,\r\n    SelectPaymentResultDto,\r\n    SelectPaymentResultDtoSchema,\r\n} from \"./paymentAPISchema\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\n\r\nconst API_URL = \"/api/payment\";\r\n\r\nexport const getPaymentMethods = async (): Promise<GetPaymentMethodsResponseModel> => {\r\n    const url = `${API_URL}`;\r\n    const response = await fetch(url.toString(), {\r\n        method: \"GET\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return Promise.reject(USER_FEEDBACK.GENERIC);\r\n    }\r\n\r\n    const data = await response.json();\r\n    const validatedObject = GetPaymentMethodsResponseModelSchema.parse(data);\r\n\r\n    return validatedObject;\r\n};\r\n\r\nexport const setPaymentMethod = async (\r\n    paymentId: string,\r\n    addPaymentMethodRequestDto: AddPaymentMethodRequestDto,\r\n): Promise<SelectPaymentResultDto> => {\r\n    const url = `${API_URL}/${paymentId}`;\r\n    const body = JSON.stringify(addPaymentMethodRequestDto);\r\n    const response = await fetch(url.toString(), {\r\n        method: \"PUT\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: body,\r\n    });\r\n\r\n\r\n    if (!response.ok) {\r\n        LogErrorResponse(url, response, body);\r\n        return {};\r\n    }\r\n    \r\n    const data = await response.json();\r\n    const validatedData = SelectPaymentResultDtoSchema.parse(data);\r\n    return validatedData;\r\n};\r\n","import { defineStore } from \"pinia\";\r\nimport {\r\n    PaymentMethodViewModel,\r\n    ValidatedCartResultDto,\r\n    AfterPayTermsInfo,\r\n    SelectListItem,\r\n    AfterPayInstallmentInfo,\r\n} from \"../../../utils/API/Payment/paymentAPISchema\";\r\nimport { AfterpayMethods } from \"../../../../../helpers/checkoutHelpers\";\r\n\r\nexport const usePaymentInformationStore = defineStore(\"paymentInformation\", {\r\n    state: () => ({\r\n        paymentMethods: null as PaymentMethodViewModel[] | null | undefined,\r\n        selectedPaymentMethod: null as\r\n            | PaymentMethodViewModel\r\n            | null\r\n            | undefined,\r\n        selectedAfterPayInstallmentOption: AfterpayMethods.Account as string,\r\n        selectedAfterPayInstallmentPlan: undefined as\r\n            | AfterPayInstallmentInfo\r\n            | undefined,\r\n        personIdentifier: \"\" as string | undefined,\r\n        thirdpartyPaymentUrl: \"\" as string | null | undefined,\r\n        errors: {\r\n            personIdentifier: [] as string[],\r\n            selectedAfterPayInstallmentOption: [] as string[],\r\n            selectedAfterPayInstallmentPlan: [] as string[],\r\n            paymentMethod: [] as string[],\r\n            finalizeOrder: [] as string[],\r\n        },\r\n        cartContentChangedPaymentContent: undefined as\r\n            | ValidatedCartResultDto\r\n            | undefined,\r\n        showCartContentChangedPaymentError: false,\r\n    }),\r\n    actions: {\r\n        setPaymentMethods(\r\n            paymentMethods: PaymentMethodViewModel[] | null | undefined,\r\n        ) {\r\n            this.paymentMethods = paymentMethods;\r\n        },\r\n        setSelectedPaymentMethod(\r\n            selectedPaymentMethod: PaymentMethodViewModel | null | undefined,\r\n        ) {\r\n            this.selectedPaymentMethod = selectedPaymentMethod;\r\n\r\n        },\r\n        setSelectedAfterPayInstallmentOption(\r\n            selectedAfterPayInstallmentOption: string,\r\n        ) {\r\n            this.selectedAfterPayInstallmentOption =\r\n                selectedAfterPayInstallmentOption;\r\n        },\r\n        setSelectedAfterPayInstallmentPlan(\r\n            afterPayInstallmentPlan: AfterPayInstallmentInfo | undefined,\r\n        ) {\r\n            this.selectedAfterPayInstallmentPlan = afterPayInstallmentPlan;\r\n        },\r\n        setError(field: string | number, error: string[]) {\r\n            this.errors[field] = error;\r\n        },\r\n        setErrors(errors: {\r\n            personIdentifier: string[];\r\n            selectedAfterPayInstallmentOption: string[];\r\n            selectedAfterPayInstallmentPlan: string[];\r\n            paymentMethod: string[];\r\n            finalizeOrder: string[];\r\n        }) {\r\n            this.errors = errors;\r\n        },\r\n        SetShowCartContentChangedPaymentError(\r\n            showCartContentChangedPaymentError: boolean,\r\n        ) {\r\n            this.showCartContentChangedPaymentError =\r\n                showCartContentChangedPaymentError;\r\n        },\r\n        clearAllErrors() {\r\n            this.errors = {\r\n                personIdentifier: [],\r\n                selectedAfterPayInstallmentOption: [],\r\n                selectedAfterPayInstallmentPlan: [],\r\n                paymentMethod: [],\r\n                finalizeOrder: [],\r\n            };\r\n        },\r\n        setCartContentChangedPaymentContent(\r\n            value: ValidatedCartResultDto | undefined,\r\n        ) {\r\n            this.cartContentChangedPaymentContent = value;\r\n        },\r\n        setThirdpartyPaymentUrl(url: string | null | undefined) {\r\n            this.thirdpartyPaymentUrl = url;\r\n        },\r\n        setPersonIdentifier(personIdentifier: string | undefined) {\r\n            this.personIdentifier = personIdentifier;\r\n        },\r\n        setSelectedAfterpayInstallmentPlanByValue(value: string) {\r\n            this.selectedAfterPayInstallmentPlan =\r\n                this.selectedPaymentMethod?.afterPayViewModel?.installmentInfo?.installmentInfoItems?.[\r\n                    value\r\n                ];\r\n        },\r\n    },\r\n    getters: {\r\n        selectedAfterPayInstallmentPlanId: (state) => {\r\n            if (\r\n                !state.selectedPaymentMethod?.afterPayViewModel?.installmentInfo\r\n                    ?.installmentInfoItems\r\n            )\r\n                return;\r\n\r\n            const selectedKey = getKeyByValue(\r\n                state.selectedPaymentMethod?.afterPayViewModel?.installmentInfo\r\n                    ?.installmentInfoItems,\r\n                state.selectedAfterPayInstallmentPlan,\r\n            );\r\n            if (!selectedKey) return;\r\n\r\n            return state.selectedPaymentMethod?.afterPayViewModel?.installmentInfo?.installmentListItems?.find(\r\n                (x) => x.value === selectedKey,\r\n            )?.value;\r\n        },\r\n    },\r\n});\r\n\r\nfunction getKeyByValue(\r\n    record: Record<any, any>,\r\n    value: any,\r\n): string | undefined {\r\n    if (!record) return;\r\n\r\n    for (const [key, val] of Object.entries(record)) {\r\n        if (val === value) {\r\n            return key;\r\n        }\r\n    }\r\n    return undefined;\r\n}\r\n","import { getCustomerInformation } from \"../utils/API/Customer/customerAPI\";\r\nimport { useCustomerInformationStore } from \"../components/checkout/stores/customerInformationStore\";\r\nimport {\r\n    CheckoutStage,\r\n    CheckoutStages,\r\n    CheckoutStep,\r\n    CheckoutSteps,\r\n} from \"./models/checkout.models\";\r\nimport { useCheckoutStateStore } from \"../components/checkout/stores/checkoutStateStore\";\r\nimport {\r\n    AddressModel,\r\n    AddressModelSchema,\r\n    AddressModelWithoutAnalytics,\r\n    AddressModelWithoutAnalyticsSchema,\r\n    Cart,\r\n    CartSchema,\r\n} from \"../utils/API/Cart/cartAPISchema\";\r\nimport { getCityFromPostalCode } from \"../utils/API/Postal/postalAPI\";\r\nimport { USER_FEEDBACK } from \"../utils/API/APIErrors\";\r\nimport { FEEDBACK_TEXT } from \"../utils/validationHelpers\";\r\nimport { useDeliveryInformationStore } from \"../components/checkout/stores/deliveryInformationStore\";\r\nimport {\r\n    createAddDeliveryMethodRequestDtoSchema,\r\n    SetDeliveryOptionResponseModel,\r\n    UpdateDeliveryRequestDto,\r\n} from \"../utils/API/Delivery/deliveryAPISchema\";\r\nimport {\r\n    getDeliveryInformation,\r\n    setDeliveryOption,\r\n} from \"../utils/API/Delivery/deliveryAPI\";\r\nimport { getCart, updateCustomer } from \"../utils/API/Cart/cartAPI\";\r\nimport { getPaymentBody, toGoogleAnalyticsEventName } from \"../../../helpers/checkoutHelpers\";\r\nimport {\r\n    setPaymentMethod,\r\n    getPaymentMethods,\r\n} from \"../utils/API/Payment/paymentAPI\";\r\nimport {\r\n    createAddPaymentMethodRequestDtoSchema,\r\n    SelectPaymentResultDtoSchema,\r\n} from \"../utils/API/Payment/paymentAPISchema\";\r\nimport { useShoppingCartStore } from \"../components/shoppingCart/stores/shoppingCartStore\";\r\nimport { usePaymentInformationStore } from \"../components/checkout/stores/paymentInformationStore\";\r\nimport { nextTick } from \"vue\";\r\nimport GtmService from \"./gtm.service\";\r\n\r\n/**\r\n * Attempts to retrieve customer information from the API.\r\n * If no customer information is found, verification is needed (User is not logged in).\r\n *\r\n * @returns {boolean} Returns true if verification is needed, false otherwise.\r\n */\r\nexport const verificationIsNeeded = async () => {\r\n    const customerInformationStore = useCustomerInformationStore();\r\n\r\n    const customerData = await apiGetCustomerInformation();\r\n    if (!customerData) return true;\r\n\r\n    customerInformationStore.setFields(customerData);\r\n    return false;\r\n};\r\n\r\n/**\r\n * Fetches customer information from the API and updates the customerInformation value.\r\n * Sets the cartIsLoading value to true before making the API call and sets it back to false after the call is completed.\r\n *\r\n * @returns {Promise<void>} A promise that resolves when the customer information is fetched and updated successfully.\r\n */\r\nexport const apiGetCustomerInformation = async () => {\r\n    try {\r\n        const data = await getCustomerInformation();\r\n\r\n        // Convert null fields to empty strings\r\n        for (let key in data) {\r\n            if (data[key] === null) {\r\n                data[key] = \"\";\r\n            }\r\n        }\r\n\r\n        return data;\r\n    } catch (error) {\r\n        console.error(error);\r\n    }\r\n};\r\n\r\n/**\r\n * Checks if a step in the checkout process has been completed.\r\n *\r\n * @param step - The step to check.\r\n * @returns A promise that resolves to a boolean indicating whether the step has been completed.\r\n */\r\nconst stepCompleted = async (step: CheckoutStep): Promise<boolean> => {\r\n    const checkoutStateStore = useCheckoutStateStore();\r\n\r\n    if (checkoutStateStore.isLoading) return false;\r\n    checkoutStateStore.setIsLoading(true);\r\n\r\n    if (step === CheckoutSteps.CustomerInformation) {\r\n        const result = await submitCustomerInformationForm();\r\n        checkoutStateStore.setIsLoading(false);\r\n        return result;\r\n    }\r\n\r\n    if (step === CheckoutSteps.Delivery) {\r\n        const result = await submitDeliveryInformationForm();\r\n        checkoutStateStore.setIsLoading(false);\r\n        return result;\r\n    }\r\n\r\n    if (step === CheckoutSteps.Payment) {\r\n        const result = await submitPaymentInformationForm();\r\n        checkoutStateStore.setIsLoading(false);\r\n        return result;\r\n    }\r\n\r\n    checkoutStateStore.setIsLoading(false);\r\n    return false;\r\n};\r\n\r\n/**\r\n * Triggers the submission of the customer information form.\r\n * If the form is valid, the customer information is updated using the API.\r\n * If the form is invalid, the form errors are set and the form is not submitted.\r\n *\r\n * @returns {Promise<void>} A promise that resolves when the form is submitted successfully.\r\n */\r\nconst submitCustomerInformationForm = async () => {\r\n    const customerInformationStore = useCustomerInformationStore();\r\n\r\n    customerInformationStore.setErrorSummaryVisible(true);\r\n\r\n    const validationResult = AddressModelWithoutAnalyticsSchema.safeParse(\r\n        customerInformationStore.fields,\r\n    );\r\n\r\n    if (!validationResult.success) {\r\n        customerInformationStore.clearAllErrors();\r\n\r\n        validationResult.error.errors.forEach((error) => {\r\n            const path = error.path[0];\r\n            customerInformationStore.setError(path, [\r\n                ...customerInformationStore.errors[path],\r\n                ...[error.message],\r\n            ]);\r\n        });\r\n    }\r\n\r\n    let matchingCityResult;\r\n    if (validationResult.success) {\r\n        matchingCityResult = await getCityFromPostalCode(\r\n            validationResult.data.postalCode,\r\n        );\r\n\r\n        if (matchingCityResult === USER_FEEDBACK.UNKNOWN_POSTALCODE) {\r\n            customerInformationStore.setError(\"postalCode\", [\r\n                FEEDBACK_TEXT().UNKNOWN_POSTALCODE,\r\n            ]);\r\n            return false;\r\n        }\r\n\r\n        if (matchingCityResult !== validationResult.data.city.toUpperCase()) {\r\n            customerInformationStore.setError(\"postalCode\", [\r\n                FEEDBACK_TEXT().POSTALCODE_AND_CITY_DONT_MATCH,\r\n            ]);\r\n            return false;\r\n        }\r\n    }\r\n\r\n    if (\r\n        !validationResult.success ||\r\n        matchingCityResult == USER_FEEDBACK.UNKNOWN_POSTALCODE\r\n    ) {\r\n        return false;\r\n    }\r\n\r\n    const success = await apiUpdateCustomer(validationResult.data);\r\n    if (!success) return false;\r\n\r\n    setSubmittedCustomerInformation(validationResult.data);\r\n    customerInformationStore.clearAllErrors();\r\n    return true;\r\n};\r\n\r\n/**\r\n * Submits the delivery information form.\r\n * If the form is valid, the delivery information is updated using the API.\r\n * If the form is invalid, the form errors are set and the form is not submitted.\r\n *\r\n * @returns {boolean} Returns `true` if the form submission is successful, otherwise `false`.\r\n */\r\nexport const submitDeliveryInformationForm = async () => {\r\n    const deliveryInformationStore = useDeliveryInformationStore();\r\n\r\n    if (\r\n        !deliveryInformationStore.selectedDeliveryMethod ||\r\n        !deliveryInformationStore.selectedDeliveryMethod?.id\r\n    ) {\r\n        deliveryInformationStore.setError(\r\n            \"deliveryMethod\",\r\n            FEEDBACK_TEXT().REQUIRED_DELIVERY_METHOD,\r\n        );\r\n        return false;\r\n    }\r\n\r\n    const requestBody: UpdateDeliveryRequestDto = {\r\n        deliveryLocationId:\r\n            deliveryInformationStore.selectedDeliveryLocation?.id ?? undefined,\r\n    };\r\n\r\n    if (deliveryInformationStore.selectedDeliveryWindow) {\r\n        requestBody.deliveryWindow =\r\n            deliveryInformationStore.selectedDeliveryWindow ?? undefined;\r\n    }\r\n\r\n    const validationSchema = createAddDeliveryMethodRequestDtoSchema(\r\n        deliveryInformationStore.selectedDeliveryMethod,\r\n    );\r\n\r\n    const validationResult = validationSchema.safeParse(requestBody);\r\n\r\n    if (!validationResult.success) {\r\n        setDeliveryInformationErrors(validationResult.error);\r\n        return false;\r\n    }\r\n\r\n    const data = await apiUpdateDelivery(\r\n        deliveryInformationStore.selectedDeliveryMethod.id,\r\n        requestBody,\r\n    );\r\n\r\n    if (!data) return false;\r\n\r\n    const shoppingCartStore = useShoppingCartStore();\r\n    deliveryInformationStore.clearAllErrors();\r\n    shoppingCartStore.setCart(data.cartDto);\r\n    return true;\r\n};\r\n\r\n/**\r\n * Submits the payment information form.\r\n * If the form is valid, the payment information is updated using the API.\r\n * If the form is invalid, the form errors are set and the form is not submitted.\r\n *\r\n * @returns {boolean} Returns true if the payment information form is successfully submitted, otherwise false.\r\n */\r\nconst submitPaymentInformationForm = async () => {\r\n    const customerInformationStore = useCustomerInformationStore();\r\n    const paymentInformationStore = usePaymentInformationStore();\r\n    customerInformationStore.clearAllErrors();\r\n    paymentInformationStore.clearAllErrors();\r\n\r\n    if (\r\n        !paymentInformationStore.selectedPaymentMethod ||\r\n        !paymentInformationStore.selectedPaymentMethod.systemKeyword\r\n    ) {\r\n        paymentInformationStore.setError(\"paymentMethod\", [\r\n            FEEDBACK_TEXT().REQUIRED_PAYMENT_METHOD,\r\n        ]);\r\n        return false;\r\n    }\r\n\r\n    const success = await apiSetPaymentMethod();\r\n    if (!success) {\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n};\r\n\r\n/**\r\n * Sets the payment method for the checkout process.\r\n * If the selected payment method and payment system keyword are available, the payment method is set using the API.\r\n *\r\n * @returns {Promise<boolean>} A promise that resolves to true if the payment method is set successfully, otherwise false.\r\n */\r\nconst apiSetPaymentMethod = async (): Promise<boolean> => {\r\n    const paymentInformationStore = usePaymentInformationStore();\r\n\r\n    if (\r\n        !paymentInformationStore.selectedPaymentMethod ||\r\n        !paymentInformationStore.selectedPaymentMethod.systemKeyword\r\n    ) {\r\n        return false;\r\n    }\r\n\r\n    const requestBody = getPaymentBody(\r\n        paymentInformationStore.selectedPaymentMethod,\r\n        paymentInformationStore.personIdentifier,\r\n        paymentInformationStore.selectedAfterPayInstallmentOption,\r\n        paymentInformationStore.selectedAfterPayInstallmentPlanId,\r\n    );\r\n\r\n    const validationSchema = createAddPaymentMethodRequestDtoSchema(\r\n        paymentInformationStore.selectedPaymentMethod,\r\n    );\r\n\r\n    const bodyValidationResult = validationSchema.safeParse(requestBody);\r\n\r\n    if (!bodyValidationResult.success) {\r\n        paymentInformationStore.clearAllErrors();\r\n\r\n        bodyValidationResult.error.errors.forEach((error) => {\r\n            const path = error.path[0];\r\n            paymentInformationStore.setError(path, [\r\n                ...paymentInformationStore.errors[path],\r\n                ...[error.message],\r\n            ]);\r\n        });\r\n        return false;\r\n    }\r\n\r\n    let response;\r\n    try {\r\n        response = await setPaymentMethod(\r\n            paymentInformationStore.selectedPaymentMethod.systemKeyword,\r\n            requestBody,\r\n        );\r\n\r\n        if (!response) return false;\r\n    } catch (error) {\r\n        paymentInformationStore.setError(\"finalizeOrder\", [\r\n            FEEDBACK_TEXT().GENERIC_ERROR,\r\n        ]);\r\n        return false;\r\n    }\r\n\r\n    const responseValidationResult =\r\n        SelectPaymentResultDtoSchema.safeParse(response);\r\n\r\n    if (!responseValidationResult.success) {\r\n        return false;\r\n    }\r\n\r\n    if (responseValidationResult.data.errorMessage) {\r\n        paymentInformationStore.setError(\"finalizeOrder\", [\r\n            responseValidationResult.data.errorMessage as string,\r\n        ]);\r\n        return false;\r\n    }\r\n\r\n    if (responseValidationResult.data.cartResultDto) {\r\n        paymentInformationStore.setCartContentChangedPaymentContent(\r\n            responseValidationResult.data.cartResultDto,\r\n        );\r\n        paymentInformationStore.SetShowCartContentChangedPaymentError(true);\r\n        return false;\r\n    }\r\n\r\n    paymentInformationStore.setThirdpartyPaymentUrl(\r\n        responseValidationResult?.data?.url,\r\n    );\r\n    const customerInformationStore = useCustomerInformationStore();\r\n    customerInformationStore.clearAllErrors();\r\n    paymentInformationStore.clearAllErrors();\r\n    return true;\r\n};\r\n\r\n/**\r\n * Updates the customer information using the API.\r\n *\r\n * @async\r\n * @function apiUpdateCustomer\r\n * @returns {Promise} A promise that resolves when the customer information is successfully updated.\r\n */\r\nconst apiUpdateCustomer = async (\r\n    customerInformation: AddressModelWithoutAnalytics,\r\n): Promise<boolean> => {\r\n    try {\r\n        const success = await updateCustomer(customerInformation);\r\n        if (success) return true;\r\n        return false;\r\n    } catch (error) {\r\n        if (error instanceof Error) {\r\n            console.log(error.message);\r\n        }\r\n    }\r\n    return false;\r\n};\r\n\r\n/**\r\n * Updates the delivery method for the checkout.\r\n *\r\n * @param {string} deliveryMethodId - The ID of the delivery method.\r\n * @param {UpdateDeliveuseCustomerInformationStore.ClearAllErrorso} request - The request object containing the updated delivery information.\r\n * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the update was successful.\r\n */\r\nconst apiUpdateDelivery = async (\r\n    deliveryMethodId: string,\r\n    request: UpdateDeliveryRequestDto,\r\n): Promise<SetDeliveryOptionResponseModel | null> => {\r\n    try {\r\n        const data = await setDeliveryOption(deliveryMethodId, request);\r\n        return data;\r\n    } catch (error) {\r\n        if (error instanceof Error) {\r\n            console.log(error.message);\r\n        }\r\n    }\r\n    return null;\r\n};\r\n\r\n/**\r\n * Sets the delivery information errors.\r\n *\r\n * @param {Object} errors - The errors object containing the path and message.\r\n */\r\nconst setDeliveryInformationErrors = (errors) => {\r\n    const deliveryInformationStore = useDeliveryInformationStore();\r\n    deliveryInformationStore.setErrors(errors);\r\n};\r\n\r\n/**\r\n * Sets the payment information errors.\r\n *\r\n * @param {Object} errors - The errors object containing the path and message.\r\n */\r\nconst setPaymentInformationErrors = (errors) => {\r\n    const paymentInformationStore = usePaymentInformationStore();\r\n    paymentInformationStore.setErrors(errors);\r\n};\r\n\r\n/**\r\n * Checks if all checkout steps prior to the given toStep have been completed.\r\n *\r\n * @param {CheckoutStep} toStep - The step to check against.\r\n * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether all prior steps have been completed.\r\n */\r\nconst priorStepsCompleted = async (toStep: CheckoutStep) => {\r\n    for (const step of Object.values(CheckoutSteps)) {\r\n        if (step === toStep) {\r\n            return true;\r\n        }\r\n\r\n        const completed = await stepCompleted(step);\r\n        if (!completed) {\r\n            return false;\r\n        }\r\n    }\r\n\r\n    return true;\r\n};\r\n\r\n/**\r\n * Navigates to the specified checkout step if the current step is completed.\r\n * This is necessary to ensure that required data for the next step is available before use.\r\n *\r\n * @param {CheckoutStep} toStep - The checkout step to navigate to.\r\n */\r\nexport const goToCheckoutStep = async (toStep: CheckoutStep) => {\r\n    const okToProceed = await priorStepsCompleted(toStep);\r\n    const checkoutStateStore = useCheckoutStateStore();\r\n\r\n    if (checkoutStateStore.currentCheckoutStep === toStep || !okToProceed)\r\n        return;\r\n\r\n    if (\r\n        toStep == CheckoutSteps.Delivery &&\r\n        checkoutStateStore.currentCheckoutStep ===\r\n            CheckoutSteps.CustomerInformation\r\n    ) {\r\n        await apiGetDeliveryInformation();\r\n    }\r\n\r\n    const paymentInformationStore = usePaymentInformationStore();\r\n\r\n    if (\r\n        toStep == CheckoutSteps.Payment &&\r\n        !paymentInformationStore.paymentMethods\r\n    ) {\r\n        await apiGetPaymentMethods();\r\n    }\r\n\r\n    if (toStep === CheckoutSteps.FinalizeOrder) {\r\n        tryToFinalizeOrder();\r\n    }\r\n\r\n    GtmService.pushCheckoutEvent(toGoogleAnalyticsEventName(toStep));\r\n    nextTick(() => (checkoutStateStore.currentCheckoutStep = toStep));\r\n};\r\n\r\n/**\r\n * Tries to finalize the order by redirecting to the third-party payment URL.\r\n */\r\nconst tryToFinalizeOrder = () => {\r\n    const paymentInformationStore = usePaymentInformationStore();\r\n    if (paymentInformationStore.thirdpartyPaymentUrl) {\r\n        window.location.href = paymentInformationStore.thirdpartyPaymentUrl;\r\n    }\r\n};\r\n\r\n/**\r\n * Fetches payment options from the API and updates the divs value.\r\n *\r\n * @returns {Promise<void>} A promise that resolves when the payment options are fetched and updated successfully.\r\n */\r\nconst apiGetPaymentMethods = async () => {\r\n    const paymentInformationStore = usePaymentInformationStore();\r\n    const checkoutStateStore = useCheckoutStateStore();\r\n\r\n    try {\r\n        const data = await getPaymentMethods();\r\n        paymentInformationStore.paymentMethods = data.paymentMethodsDto.paymentMethods;\r\n        paymentInformationStore.selectedPaymentMethod =\r\n            data?.paymentMethodsDto.paymentMethods.find((method) => method.isDefault) ?? data[0];\r\n    } catch (error) {\r\n        console.error(error);\r\n    }\r\n};\r\n\r\n/**\r\n * Fetches the delivery information from the API and updates the deliveryInformation and selectedDeliveryMethodId variables.\r\n *\r\n * @returns {Promise<void>} A promise that resolves when the delivery information is fetched and updated successfully.\r\n */\r\nconst apiGetDeliveryInformation = async () => {\r\n    const deliveryInformationStore = useDeliveryInformationStore();\r\n    const checkoutStateStore = useCheckoutStateStore();\r\n\r\n    try {\r\n        const data = await getDeliveryInformation();\r\n        deliveryInformationStore.deliveryInformation = data.deliveryDto;\r\n\r\n        deliveryInformationStore.setSelectedDeliveryMethod(\r\n            data.deliveryDto.deliveryMethods?.find((option) => option.isDefaultSelection),\r\n        );\r\n    } catch (error) {\r\n        console.error(error);\r\n    }\r\n};\r\n\r\n/**\r\n * Fetches the shopping cart data from the API and updates the shopping cart store.\r\n *\r\n * This function asynchronously calls the `getShoppingCart` API to retrieve the current\r\n * shopping cart data. Upon successful retrieval, it updates the shopping cart store\r\n * with the fetched data. If an error occurs during the API call, it logs the error to the console.\r\n *\r\n * @async\r\n * @function apiGetShoppingCart\r\n * @returns {Promise<void>} A promise that resolves when the shopping cart data has been fetched and the store updated.\r\n */\r\nexport const apiGetShoppingCart = async () => {\r\n    try {\r\n        const data = await getCart();\r\n        const newCart = CartSchema.parse(data.cartDto);\r\n        return newCart;\r\n    } catch (error) {\r\n        console.error(error);\r\n    }\r\n};\r\n\r\n/**\r\n * Sets the submitted customer information.\r\n *\r\n * @param {AddressModel} customerInformation - The customer information to be set.\r\n */\r\nconst setSubmittedCustomerInformation = (\r\n    customerInformation: AddressModelWithoutAnalytics,\r\n) => {\r\n    const customerInformationStore = useCustomerInformationStore();\r\n    customerInformationStore.setSubmittedFields(customerInformation);\r\n};\r\n\r\nexport const goToCheckoutStage = async (stage: CheckoutStage) => {\r\n    const checkoutStateStore = useCheckoutStateStore();\r\n\r\n    if (stage === CheckoutStages.Verification) {\r\n        checkoutStateStore.setIsLoading(true);\r\n\r\n        const verificationNeeded = await verificationIsNeeded();\r\n        stage = verificationNeeded ? CheckoutStages.Verification : CheckoutStages.Checkout;\r\n\r\n        checkoutStateStore.setIsLoading(false);\r\n    }\r\n\r\n    if (stage === CheckoutStages.Checkout) {\r\n        GtmService.pushCheckoutEvent(toGoogleAnalyticsEventName(CheckoutSteps.CustomerInformation));\r\n    }\r\n\r\n    checkoutStateStore.setCheckoutStage(stage);\r\n};\r\n\r\nexport const goToCheckoutStageAfterLogin = async () => {\r\n    const checkoutStateStore = useCheckoutStateStore();\r\n    const customerInformationStore = useCustomerInformationStore();\r\n\r\n    const customerInformation = await apiGetCustomerInformation();\r\n    customerInformationStore.setFields(customerInformation);\r\n\r\n    checkoutStateStore.currentCheckoutStage = CheckoutStages.Checkout;\r\n    GtmService.pushCheckoutEvent(toGoogleAnalyticsEventName(CheckoutSteps.CustomerInformation));\r\n};\r\n\r\n/**\r\n * Retrieves the city matching the given postal code.\r\n *\r\n * @param {string} postalCode - The postal code to match.\r\n * @returns {Promise<string>} - A promise that resolves to the matching city.\r\n */\r\nexport const TryGetCityMatchingPostalCode = async (postalCode: string) => {\r\n    if (!postalCode) return;\r\n    const customerInformationStore = useCustomerInformationStore();\r\n    customerInformationStore.setRetrievingCity(true);\r\n\r\n    const matchingCityResult = await getCityFromPostalCode(postalCode);\r\n\r\n    customerInformationStore.setRetrievingCity(false);\r\n    return matchingCityResult;\r\n};\r\n","<script setup lang=\"ts\">\r\nimport { computed, onMounted, ref } from \"vue\";\r\nimport {\r\n  formatWithoutRounding,\r\n  formatPrice,\r\n} from \"../../mixins/productPrice.mixin\";\r\nimport { LineItemModel, Cart } from \"../../utils/API/Cart/cartAPISchema\";\r\nimport { Money } from \"../../services/models/cart.models\";\r\nimport { formatCurrency } from \"../../utils/currencyHelpers\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport ShoppingCartError from \"./shoppingCartError.vue\";\r\nimport PaymentProviders from \"./paymentProviders.vue\";\r\nimport { CheckoutStages } from \"../../services/models/checkout.models\";\r\nimport {\r\n  amountNeededToQualifyForFreeShipping,\r\n  shippingCostFormatted,\r\n  qualifiesForFreeShipping,\r\n} from \"../../.././../helpers/checkoutHelpers\";\r\nimport { useShoppingCartStore } from \"./stores/shoppingCartStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\n\r\nconst props = defineProps<{\r\n  showCheckoutLink?: boolean;\r\n  error?: string;\r\n}>();\r\n\r\nconst shoppingCartStore = useShoppingCartStore();\r\nconst root = ref();\r\nconst totalList = ref();\r\n\r\nconst error = computed(() => {\r\n  return props.error;\r\n});\r\n\r\n/**\r\n * Computes whether the shopping cart is eligible for free shipping.\r\n *\r\n * @returns {boolean} True if the shopping cart is eligible for free shipping, false otherwise.\r\n */\r\nconst freeShipping = computed(() => {\r\n  if (!shoppingCartStore.cart) return false;\r\n\r\n  return qualifiesForFreeShipping(\r\n    shoppingCartStore.cart.freeShippingActive,\r\n    shoppingCartStore.cart.freeShippingLimit,\r\n    shoppingCartStore.cart.subTotal,\r\n  );\r\n});\r\n\r\n/**\r\n * Computed property that returns the shipping call to action text.\r\n *\r\n * @returns {string} The shipping call to action text.\r\n */\r\nconst shippingCallToActionText = computed(() => {\r\n  const remainingAmount = amountNeededToQualifyForFreeShipping(\r\n    shoppingCartStore.cart?.freeShippingActive,\r\n    shoppingCartStore.cart?.freeShippingLimit,\r\n    shoppingCartStore.cart?.subTotal,\r\n  )?.amount;\r\n\r\n  if (!remainingAmount) return \"\";\r\n\r\n  return `Du er ${formatWithoutRounding(remainingAmount)} unna fri frakt`;\r\n});\r\n\r\n/**\r\n * Handles the action of navigating to the checkout stage.\r\n *\r\n * @function handleGoToCheckout\r\n * @returns {void}\r\n */\r\nconst handleGoToCheckout = () => {\r\n  CheckoutService.goToCheckoutStage(CheckoutStages.Verification);\r\n};\r\n\r\nonMounted(() => {\r\n  autoAnimate(root.value);\r\n  autoAnimate(totalList.value);\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div ref=\"root\" class=\"checkout-summary\">\r\n    <h2 class=\"checkout-summary__heading\">{{ $t(\"summary\") }}</h2>\r\n    <ShoppingCartError :error=\"error\" type=\"global\" />\r\n    <div>\r\n      <ul\r\n        v-if=\"shoppingCartStore.cart?.lineItems\"\r\n        class=\"checkout-summary__group\"\r\n      >\r\n        <li\r\n          v-for=\"lineItem in shoppingCartStore.cart.lineItems\"\r\n          :key=\"lineItem.code\"\r\n          class=\"checkout-summary__entry\"\r\n        >\r\n          <div class=\"checkout-summary__product\">\r\n            <span class=\"checkout-summary__product-name\">\r\n              {{ lineItem.name }} ({{ lineItem.quantity }} stk)\r\n            </span>\r\n          </div>\r\n          <div class=\"checkout-summary__price\">\r\n            <span class=\"checkout-summary__price\"\r\n              >{{ formatCurrency(lineItem.listPrice.currency) }}\r\n              {{\r\n                formatWithoutRounding(\r\n                  lineItem.quantity * lineItem.discountedPrice.amount,\r\n                )\r\n              }}\r\n            </span>\r\n          </div>\r\n        </li>\r\n      </ul>\r\n      <div ref=\"totalList\" class=\"checkout-summary__group\">\r\n        <div\r\n          v-if=\"shoppingCartStore.cart?.discountTotal?.amount\"\r\n          class=\"checkout-summary__entry checkout-summary__entry\"\r\n        >\r\n          <div>{{ $t(\"discountTotal\") }}</div>\r\n          <div>\r\n            <span class=\"checkout-summary__discount\"\r\n              >-\r\n              {{\r\n                shoppingCartStore.cart.discountTotal &&\r\n                formatCurrency(shoppingCartStore.cart.discountTotal.currency)\r\n              }}\r\n              {{\r\n                formatWithoutRounding(\r\n                  shoppingCartStore.cart.discountTotal.amount,\r\n                )\r\n              }}</span\r\n            >\r\n          </div>\r\n        </div>\r\n        <div\r\n          v-if=\"shoppingCartStore.cart?.total?.amount\"\r\n          class=\"checkout-summary__entry checkout-summary__entry\"\r\n        >\r\n          <div>{{ $t(\"shipping\") }}</div>\r\n          <div>\r\n            <span>{{ shoppingCartStore.shippingCostFormatted }}</span>\r\n          </div>\r\n        </div>\r\n        <div\r\n          v-if=\"shoppingCartStore.cart && !freeShipping\"\r\n          class=\"checkout-summary__entry checkout-summary__entry--gray\"\r\n        >\r\n          <div class=\"checkout-summary__shipping-tip\">\r\n            {{ shippingCallToActionText }}\r\n          </div>\r\n        </div>\r\n      </div>\r\n      <h4 class=\"checkout-summary__total\">\r\n        <span>{{ $t(\"total\") }}: </span>\r\n        <span\r\n          >{{\r\n            shoppingCartStore.cart?.total &&\r\n            formatCurrency(shoppingCartStore.cart.total.currency)\r\n          }}\r\n          {{\r\n            shoppingCartStore.cart?.total &&\r\n            formatWithoutRounding(shoppingCartStore.totalAmount)\r\n          }}</span\r\n        >\r\n      </h4>\r\n      <div\r\n        v-if=\"props.showCheckoutLink || shoppingCartStore.cart?.paymentMethods\"\r\n        class=\"checkout-summary__extra\"\r\n      >\r\n        <button\r\n          v-if=\"props.showCheckoutLink\"\r\n          class=\"btn btn--profile btn--smaller\"\r\n          @click=\"handleGoToCheckout\"\r\n        >\r\n          <span>{{ $t(\"toCheckout\") }}</span>\r\n        </button>\r\n        <div\r\n          v-if=\"shoppingCartStore.cart?.paymentMethods\"\r\n          class=\"checkout-summary__extra-info\"\r\n        >\r\n          <span>{{ $t(\"acceptedPaymentMethods\") }}</span>\r\n          <PaymentProviders\r\n            :payment-methods=\"shoppingCartStore.cart?.paymentMethods\"\r\n          ></PaymentProviders>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, onMounted, watch, onUnmounted } from \"vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport ShoppingCartError from \"./shoppingCartError.vue\";\r\nimport { useShoppingCartStore } from \"./stores/shoppingCartStore\";\r\nimport ShoppingCartService from \"../../services/shoppingcart.service\";\r\n\r\nconst props = defineProps<{\r\n  discounts: Record<string, string>;\r\n}>();\r\n\r\nconst shoppingCartStore = useShoppingCartStore();\r\nconst discountsList = ref();\r\nconst root = ref();\r\nconst discountCodeInputRef = ref();\r\n\r\n// Watch props.discounts old and new value. If props.discounts has more keys than the old value, clear the input.\r\nwatch(\r\n  () => props.discounts,\r\n  (newVal, oldVal) => {\r\n    if (Object.keys(newVal).length > Object.keys(oldVal).length) {\r\n      discountCodeInputRef.value.value = \"\";\r\n    }\r\n  },\r\n  { deep: true },\r\n);\r\n\r\n/**\r\n * Resets discount error if the discount input is empty.\r\n */\r\nconst handleDiscountInput = () => {\r\n  if (discountCodeInputRef.value.value.trim() === \"\")\r\n    shoppingCartStore.setDiscountError(\"\");\r\n};\r\n\r\n/**\r\n * Handles the event when a discount code is added.\r\n *\r\n * @param {Event} e - The event object.\r\n */\r\nconst handleAddDiscountCode = (e: Event) => {\r\n  e.preventDefault();\r\n\r\n  const discountCode = discountCodeInputRef.value.value.trim();\r\n  if (!discountCode) return;\r\n\r\n  shoppingCartStore.setDiscountError(\"\");\r\n  ShoppingCartService.apiAddDiscountCode(discountCode);\r\n};\r\n\r\n/**\r\n * Handles the event when a discount code is removed.\r\n *\r\n * @param {Event} e - The event object.\r\n * @param {string} discountCode - The discount code to be removed.\r\n * @returns {Promise<void>} - A promise that resolves when the discount code is removed.\r\n */\r\nconst handleRemoveDiscountCode = async (\r\n  e: Event,\r\n  discountCode: string,\r\n): Promise<void> => {\r\n  e.preventDefault();\r\n  ShoppingCartService.apiRemoveDiscountCode(discountCode);\r\n};\r\n\r\nonMounted(() => {\r\n  autoAnimate(root.value);\r\n  autoAnimate(discountsList.value);\r\n});\r\n\r\nonUnmounted(() => {\r\n  shoppingCartStore.setDiscountError(\"\");\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div ref=\"root\" class=\"checkout-discounts\">\r\n    <form>\r\n      <fieldset>\r\n        <legend class=\"sr-only\">\r\n          {{ $t(\"discountCodes\") }}\r\n          <Icon size=\"small\" type=\"discount\" />\r\n        </legend>\r\n        <label class=\"sr-only\" for=\"discount-input\">{{ $t(\"code\") }}</label>\r\n        <div class=\"checkout-discounts__form\">\r\n          <input\r\n            id=\"discount-input\"\r\n            ref=\"discountCodeInputRef\"\r\n            class=\"checkout-discounts__input\"\r\n            type=\"text\"\r\n            value=\"\"\r\n            placeholder=\"Rabattkode\"\r\n            :aria-describedby=\"\r\n              shoppingCartStore.discountError ? 'discount-error' : ''\r\n            \"\r\n            @input=\"handleDiscountInput\"\r\n          />\r\n          <button\r\n            class=\"btn btn--profile btn--small checkout-discounts__button\"\r\n            @click=\"(event) => handleAddDiscountCode(event)\"\r\n          >\r\n            <span>{{ $t(\"use\") }}</span>\r\n          </button>\r\n        </div>\r\n      </fieldset>\r\n    </form>\r\n    <ShoppingCartError\r\n      v-if=\"shoppingCartStore.discountError\"\r\n      id=\"discount-error\"\r\n      :error=\"shoppingCartStore.discountError\"\r\n      type=\"line-item\"\r\n    />\r\n    <ul ref=\"discountsList\" aria-live=\"polite\">\r\n      <li v-for=\"(_, key, index) in props.discounts\" :key=\"index\">\r\n        <button\r\n          class=\"btn btn--profile btn--small\"\r\n          title=\"fjern rabattkode\"\r\n          @click=\"(event) => handleRemoveDiscountCode(event, key)\"\r\n        >\r\n          {{ key }}<Icon type=\"close\" />\r\n        </button>\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { formatWithoutRounding } from \"../../mixins/productPrice.mixin\";\r\nimport { formatSize } from \"../../mixins/productSize.mixin\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { computed, onMounted, ref, watch } from \"vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport { LineItemModel } from \"../../utils/API/Cart/cartAPISchema\";\r\nimport ShoppingCartError from \"./shoppingCartError.vue\";\r\nimport { USER_FEEDBACK } from \"../../utils/API/APIErrors\";\r\nimport ShoppingCartService from \"../../services/shoppingcart.service\";\r\nimport { useShoppingCartStore } from \"./stores/shoppingCartStore\";\r\nimport { useProductPageStore } from \"../../stores/productPageStore\";\r\n\r\nconst props = defineProps<{\r\n  lineItem: LineItemModel;\r\n  error?: string;\r\n  outOfStock?: boolean;\r\n}>();\r\n\r\nconst shoppingCartStore = useShoppingCartStore();\r\nconst productPageStore = useProductPageStore();\r\nlet abortController = new AbortController();\r\nconst root = ref();\r\nconst error = computed(() => {\r\n  return props.error;\r\n});\r\nlet isUpdatingFromApi = false;\r\nconst localQuantity = ref(props.lineItem.quantity);\r\n\r\n// **Watch shoppingCartStore and sync localQuantity without recursion**\r\nwatch(\r\n  () =>\r\n    shoppingCartStore?.cart?.lineItems?.find(\r\n      (item) => item.code === props.lineItem.code\r\n    )?.quantity,\r\n  (newQuantity) => {\r\n    if (newQuantity === undefined || newQuantity === localQuantity.value) return;\r\n\r\n    isUpdatingFromApi = true;\r\n    localQuantity.value = newQuantity;\r\n    isUpdatingFromApi = false;\r\n  }\r\n);\r\n\r\n/**\r\n * Multiplies the list price of the line item by the quantity.\r\n *\r\n * @returns {number} The total list price.\r\n */\r\nconst listPriceTotal = computed(() => {\r\n  return props.lineItem.listPrice.amount * localQuantity.value;\r\n});\r\n\r\n/**\r\n * Multiplies the discounted price of the line item by the quantity.\r\n *\r\n * @returns {number} The total discounted price.\r\n */\r\nconst discountedPriceTotal = computed(() => {\r\n  return props.lineItem.discountedPrice.amount * localQuantity.value;\r\n});\r\n\r\n// If the discounted price is less than the list price, the product is on sale\r\nconst discountActive = computed(() => {\r\n  return (\r\n    props.lineItem.discountedPrice.amount < props.lineItem.listPrice.amount\r\n  );\r\n});\r\n\r\n/**\r\n * Validates the quantity of a line item.\r\n * The quantity must be greater than 0 and less than or equal to the current inventory.\r\n *\r\n * @param {number} quantity - The quantity to be validated.\r\n * @returns {boolean} - True if the quantity is valid, false otherwise.\r\n */\r\nconst validQuantity = (quantity: number) => {\r\n  return quantity <= props.lineItem.currentInventory && quantity > 0;\r\n};\r\n\r\nconst increaseQuantity = () => {\r\n  const newQuantity = localQuantity.value + 1;\r\n  if (!validQuantity(newQuantity)) return;\r\n\r\n  productPageStore.incrementCartItemCount();\r\n\r\n  abortController.abort();\r\n  abortController = new AbortController();\r\n\r\n  // Update API and shoppingCartStore\r\n  ShoppingCartService.apiUpdateProductQuantity(\r\n    props.lineItem.code,\r\n    props.lineItem.ean,\r\n    1, // Increase by 1\r\n    true,\r\n    abortController.signal \r\n  );\r\n};\r\n\r\nconst decreaseQuantity = () => {\r\n  const newQuantity = Math.max(1, localQuantity.value - 1);\r\n  if (!validQuantity(newQuantity)) return;\r\n\r\n  if (localQuantity.value > 1) {\r\n    productPageStore.decrementCartItemCount();\r\n  }\r\n\r\n  abortController.abort();\r\n  abortController = new AbortController();\r\n\r\n  // Update API and shoppingCartStore\r\n  ShoppingCartService.apiUpdateProductQuantity(\r\n    props.lineItem.code,\r\n    props.lineItem.ean,\r\n    -1, // Decrease by 1\r\n    true,\r\n    abortController.signal \r\n  );\r\n};\r\n\r\n/**\r\n * Handles the quantity error for the line item.\r\n * Sets an appropriate error if value is higher than the current inventory.\r\n * Otherwise clear the error.\r\n *\r\n * @param {number} newQuantity - The new quantity value.\r\n */\r\nconst updateQuantityError = (newQuantity: number) => {\r\n  if (newQuantity > props.lineItem.currentInventory) {\r\n    shoppingCartStore.setLineItemError(\r\n      props.lineItem.ean,\r\n      USER_FEEDBACK.INSUFFICIENT_STOCK,\r\n    );\r\n    return;\r\n  }\r\n\r\n  shoppingCartStore.setLineItemError(props.lineItem.ean, \"\");\r\n};\r\n/**\r\n * Deletes the product from the cart.\r\n */\r\nconst removeProduct = async () => {\r\n  props.outOfStock\r\n    ? ShoppingCartService.removeFromProductsOutOfStock(\r\n        props.lineItem.code,\r\n        props.lineItem.ean,\r\n      )\r\n    : ShoppingCartService.apiRemoveProductFromCart(\r\n        props.lineItem.code\r\n      );\r\n};\r\n\r\nonMounted(() => {\r\n  autoAnimate(root.value);\r\n});\r\n</script>\r\n\r\n<template>\r\n  <li\r\n    ref=\"root\"\r\n    class=\"checkout-line-item\"\r\n    :class=\"{ 'checkout-line-item--out-of-stock': outOfStock }\"\r\n  >\r\n    <div class=\"checkout-line-item__container\">\r\n      <div class=\"checkout-line-item__photo\">\r\n        <a :href=\"props.lineItem.productUrl\">\r\n          <img :src=\"props.lineItem.imageUrl\" :alt=\"props.lineItem.altText\" />\r\n        </a>\r\n      </div>\r\n      <div class=\"checkout-line-item__content\">\r\n        <h3>\r\n          <a class=\"checkout-line-item__name\" :href=\"props.lineItem.productUrl\">\r\n            {{ props.lineItem.name }}\r\n          </a>\r\n          <span class=\"checkout-line-item__brand\">\r\n            ({{ props.lineItem.brand }})\r\n          </span>\r\n        </h3>\r\n        <div class=\"checkout-line-item__details\">\r\n          <div class=\"checkout-line-item__price\">\r\n            <span\r\n              v-if=\"discountActive\"\r\n              class=\"checkout-line-item__price--discounted\"\r\n            >\r\n              {{ formatWithoutRounding(discountedPriceTotal) }}</span\r\n            >\r\n            <span\r\n              :class=\"discountActive && 'checkout-line-item__price--original'\"\r\n            >\r\n              {{ formatWithoutRounding(listPriceTotal) }}</span\r\n            >\r\n          </div>\r\n          <div class=\"checkout-line-item__size\">\r\n            <span class=\"checkout-line-item__size--label\"\r\n              >{{ $t(\"size\") }}:\r\n            </span>\r\n            <span class=\"checkout-line-item__size--value\">{{\r\n              formatSize(lineItem.size)\r\n            }}</span>\r\n          </div>\r\n          <div class=\"checkout-line-item__color\">\r\n            <span class=\"checkout-line-item__color--label\"\r\n              >{{ $t(\"color\") }}:\r\n            </span>\r\n            <span class=\"checkout-line-item__color--value\">{{\r\n              props.lineItem.color\r\n            }}</span>\r\n          </div>\r\n        </div>\r\n        <div\r\n          v-if=\"!outOfStock\"\r\n          class=\"cart-item__actions checkout-line-item__quantity\"\r\n        >\r\n          <input type=\"hidden\" name=\"c\" value=\"1933833\" />\r\n          <div\r\n            class=\"line-item-select-quantity line-item-select-quantity--dark line-item-select-quantity--small\"\r\n          >\r\n            <button\r\n              class=\"line-item-select-quantity__button\"\r\n              :aria-label=\"$t('decreaseQuantity').toString()\"\r\n              @click=\"decreaseQuantity()\"\r\n            >\r\n              -\r\n            </button>\r\n            <input\r\n              v-model=\"localQuantity\"\r\n              type=\"number\"\r\n              class=\"line-item-select-quantity__input checkout-line-item__quantity-input\"\r\n              min=\"1\"\r\n              aria-live=\"assertive\"\r\n              aria-label=\"Antall\"\r\n              :readonly=\"true\"\r\n            />\r\n            <button\r\n              class=\"line-item-select-quantity__button\"\r\n              :aria-label=\"$t('increaseQuantity').toString()\"\r\n              @click=\"increaseQuantity()\"\r\n            >\r\n              +\r\n            </button>\r\n          </div>\r\n        </div>\r\n      </div>\r\n      <div class=\"checkout-line-item__remove-item\">\r\n        <button\r\n          class=\"btn--icon\"\r\n          aria-label=\"fjern produkt fra handlekurv\"\r\n          @click=\"removeProduct()\"\r\n        >\r\n          <Icon type=\"bin\" size=\"checkout\" />\r\n        </button>\r\n      </div>\r\n    </div>\r\n    <div class=\"checkout-line-item__trailer\">\r\n      <div v-if=\"props.lineItem.memberPromotionsText\" class=\"checkout-line-item__members-promotions-text\">        \r\n        <div v-if=\"props.lineItem.memberPromotionsLink\">\r\n          <a :href=\"props.lineItem.memberPromotionsLink\">{{ props.lineItem.memberPromotionsText }}</a>\r\n        </div>\r\n        <div v-else>\r\n          {{ props.lineItem.memberPromotionsText }}\r\n        </div>        \r\n      </div>\r\n    </div>\r\n    <ShoppingCartError :error=\"error\" type=\"line-item\" />\r\n  </li>\r\n</template>\r\n","<template>\r\n  <div ref=\"root\" class=\"checkout-line-item skeleton__container\">\r\n    <div class=\"checkout-line-item__container\">\r\n      <div class=\"checkout-line-item__photo skeleton__img skeleton__img--lineitem\"></div>\r\n      <div class=\"checkout-line-item__content\">\r\n        <div class=\"skeleton__heading\"></div>\r\n        <div class=\"checkout-line-item__details\">\r\n          <div class=\"checkout-line-item__price\">\r\n            <div class=\"skeleton__text skeleton__text--long\"></div>\r\n          </div>\r\n          <div class=\"checkout-line-item__size\">\r\n            <div class=\"skeleton__text\"></div>\r\n          </div>\r\n          <div class=\"checkout-line-item__color\">\r\n            <div class=\"skeleton__text skeleton__text\"></div>\r\n          </div>\r\n        </div>\r\n        <div class=\"cart-item__actions checkout-line-item__quantity\">\r\n          <div class=\"skeleton__quantity\"></div>\r\n        </div>\r\n      </div>\r\n      <div class=\"checkout-line-item__remove-item\">\r\n        <div class=\"skeleton__remove-item\"></div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<template>\r\n  <span class=\"skeleton__text skeleton__text--top-text\"></span>\r\n</template>\r\n>\r\n","<script setup lang=\"ts\">\r\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from \"vue\";\r\nimport { formatWithoutRounding } from \"../../mixins/productPrice.mixin\";\r\nimport ShoppingCartSummary from \"./shoppingCartSummary.vue\";\r\nimport { formatCurrency } from \"../../utils/currencyHelpers\";\r\nimport ShoppingCartKsps from \"./shoppingCartKsps.vue\";\r\nimport ShoppingCartDiscounts from \"./shoppingCartDiscounts.vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport LineItem from \"./lineItem.vue\";\r\nimport { API_ERROR_MESSAGES } from \"../../utils/API/APIErrors\";\r\nimport LineItemSkeleton from \"./lineItemSkeleton.vue\";\r\nimport TopTextSkeleton from \"./topTextSkeleton.vue\";\r\nimport PaymentProviders from \"./paymentProviders.vue\";\r\nimport { CheckoutStages } from \"../../services/models/checkout.models\";\r\nimport { qualifiesForFreeShipping } from \"../../.././../helpers/checkoutHelpers\";\r\nimport { useCheckoutStateStore } from \"../checkout/stores/checkoutStateStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\nimport { useShoppingCartStore } from \"./stores/shoppingCartStore\";\r\nimport ShoppingCartService from \"../../services/shoppingcart.service\";\r\nimport ProductsModuleContent from \"../../views/productsModule/productsModuleContent.vue\";\r\nimport Searchbox from \"../searchbox/searchbox.vue\";\r\nimport { useCartPageUpsell } from \"../../composables/useUpsell\";\r\n\r\nconst props = defineProps<{\r\n  ksps: string | null; // JSON Content from NewCheckoutIndex.cshtml\r\n  oldCheckoutUrl: string | null;\r\n  maxCartSize?: string;\r\n  initialLineItemCount?: string; // Number of line items in the cart when the component is mounted\r\n  baseUrlPath: string;\r\n  isQuickAdd?: boolean;\r\n}>();\r\n\r\nconst MOBILE_UPSELL_DISPLAY_TRESHOLD = 1023;\r\nconst shoppingCartStore = useShoppingCartStore();\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst INITIAL_LINE_ITEM_COUNT = ref(Number(props.initialLineItemCount) || 3);\r\nconst MAX_CART_SIZE = ref(Number(props.maxCartSize) || 99);\r\nconst inStockListElement = ref();\r\nconst outOfStockListElement = ref();\r\n\r\nwatch(\r\n  () => shoppingCartStore.cart?.itemCount,\r\n  (newVal) => {\r\n    localStorage.setItem(\"totalProductCount\", JSON.stringify(newVal));\r\n  },\r\n  { deep: true },\r\n);\r\n\r\nconst mobileUpsellVisible = ref(\r\n  window.innerWidth < MOBILE_UPSELL_DISPLAY_TRESHOLD,\r\n);\r\nconst handleResize = () => {\r\n  mobileUpsellVisible.value =\r\n    window.innerWidth < MOBILE_UPSELL_DISPLAY_TRESHOLD;\r\n};\r\n\r\n/**\r\n * Computed property that returns the line items in stock.\r\n *\r\n * @returns {Array} The line items in stock.\r\n */\r\nconst lineItemsInStock = computed(() => {\r\n  return shoppingCartStore.cart?.lineItems.filter(\r\n    (lineItem) => lineItem.quantity <= lineItem.currentInventory,\r\n  );\r\n});\r\n\r\n/**\r\n * Computes whether free shipping is applicable for the shopping cart.\r\n *\r\n * @returns {boolean} True if free shipping is applicable, false otherwise.\r\n */\r\nconst freeShipping = computed(() => {\r\n  if (!shoppingCartStore.cart) return false;\r\n\r\n  return qualifiesForFreeShipping(\r\n    shoppingCartStore.cart.freeShippingActive,\r\n    shoppingCartStore.cart.freeShippingLimit,\r\n    shoppingCartStore.cart.subTotal,\r\n  );\r\n});\r\n\r\n/**\r\n * Computes the current size of the shopping cart. (Adds together all quantity values of lineItems)\r\n *\r\n * @returns {number} The current size of the shopping cart.\r\n */\r\nconst currentCartSize = computed(() => {\r\n  return (\r\n    lineItemsInStock.value?.reduce(\r\n      (acc, lineItem) => acc + lineItem.quantity,\r\n      0,\r\n    ) || 0\r\n  );\r\n});\r\n\r\n/**\r\n * Determines if the shopping cart is full.\r\n * @returns {boolean} True if the shopping cart is full, false otherwise.\r\n */\r\nconst cartIsFull = computed(() => {\r\n  if (!currentCartSize.value) return false;\r\n  return currentCartSize.value >= MAX_CART_SIZE.value;\r\n});\r\n\r\n/**\r\n * Computed property for the top text in the shopping cart view on mobile viewports.\r\n * Conditionally contains shipping cost if the cart qualifies for free shipping.\r\n *\r\n * @returns {string} The top text value.\r\n */\r\nconst topText = computed(() => {\r\n  if (!shoppingCartStore.cart) return;\r\n\r\n  const baseText = `${currentCartSize.value} varer / Totalsum: ${formatWithoutRounding(shoppingCartStore.cart.total.amount)}`;\r\n  return freeShipping.value ? `${baseText} (Fri frakt)` : baseText;\r\n});\r\n\r\n/**\r\n * If the new cart value contains item(s) with a quantity that exceeds the current inventory, add it to the LineItemsOutOfStock array if it's not already there.\r\n * Also remove the item from the cart so that the summary is updated.\r\n *\r\n * @param {Object} cart - The new value of the 'cart' property.\r\n */\r\nwatch(\r\n  () => shoppingCartStore.cart,\r\n  (newValue) => {\r\n    newValue?.lineItems.forEach((lineItem) => {\r\n      if (lineItem.quantity <= lineItem.currentInventory) return;\r\n\r\n      if (\r\n        !shoppingCartStore.lineItemsOutOfStock?.some(\r\n          (x) => x.ean === lineItem.ean,\r\n        )\r\n      ) {\r\n        shoppingCartStore.lineItemsOutOfStock.push(lineItem);\r\n      }\r\n\r\n      ShoppingCartService.apiRemoveProductFromCart(lineItem.code);\r\n    });\r\n  },\r\n);\r\n\r\n/**\r\n * If cartIsFull becomes false, remove the summaryError value.\r\n *\r\n * @param {boolean} newValue - The new value of the 'cartIsFull' property.\r\n */\r\nwatch(cartIsFull, (newValue) => {\r\n  if (!newValue) {\r\n    shoppingCartStore.setSummaryError(\"\");\r\n  }\r\n});\r\n\r\n/**\r\n * Clears the discountError value.\r\n */\r\nconst handleResetDiscountError = () => {\r\n  shoppingCartStore.setDiscountError(\"\");\r\n};\r\n\r\nconst handleGoToCheckout = () => {\r\n  CheckoutService.goToCheckoutStage(CheckoutStages.Verification);\r\n};\r\n\r\nonMounted(() => {\r\n  window.addEventListener(\"resize\", handleResize);\r\n\r\n  if (props.ksps) {\r\n    shoppingCartStore.setKsps(JSON.parse(props.ksps));\r\n  }\r\n\r\n  if (props.baseUrlPath) {\r\n    checkoutStateStore.setBaseUrlPath(props.baseUrlPath);\r\n  }\r\n\r\n  autoAnimate(inStockListElement.value);\r\n  autoAnimate(outOfStockListElement.value);\r\n});\r\n\r\nonBeforeUnmount(() => {\r\n  window.removeEventListener(\"resize\", handleResize);\r\n});\r\n\r\nconst variantKeys = computed(() => {\r\n    const cart = shoppingCartStore.cart;\r\n    return cart && cart.lineItems ? cart.lineItems.map(lineItem => lineItem.esalesKey) : [];\r\n});\r\n\r\nconst { upsellModel, isLoading } = useCartPageUpsell({variantKeys, trigger: variantKeys});\r\n\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div class=\"layout-new-checkout__top\">\r\n      <h1>{{ $t(\"shoppingCart\") }}</h1>\r\n      <div class=\"layout-new-checkout__top-content\">\r\n        <span v-if=\"topText\" class=\"layout-new-checkout__top-text\">{{\r\n          topText\r\n        }}</span>\r\n        <TopTextSkeleton\r\n          v-if=\"!shoppingCartStore.cart && checkoutStateStore.isLoading\"\r\n          class=\"layout-new-checkout__top-text\"\r\n        />\r\n      </div>\r\n    </div>\r\n    <div class=\"layout-new-checkout\">\r\n      <div class=\"layout-new-checkout__heading\">\r\n        <h1>{{ $t(\"shoppingCart\") }}</h1>\r\n      </div>\r\n      <div class=\"layout-new-checkout__main\">\r\n        <div class=\"layout-new-checkout__vertical-split\">\r\n          <div\r\n            class=\"layout-new-checkout__primary layout-new-checkout__element\"\r\n          >\r\n            <div\r\n              class=\"layout-new-checkout__primary-content layout-new-checkout__primary-content--shoppingcart\"\r\n            >\r\n              <h2 class=\"sr-only\">{{ $t(\"products\") }}</h2>\r\n              <ul\r\n                ref=\"outOfStockListElement\"\r\n                :aria-hidden=\"!shoppingCartStore.lineItemsOutOfStock?.length\"\r\n                class=\"checkout-line-items checkout-line-items--out-of-stock\"\r\n              >\r\n                <LineItem\r\n                  v-for=\"lineItem in shoppingCartStore.lineItemsOutOfStock\"\r\n                  :key=\"lineItem.ean\"\r\n                  :line-item=\"lineItem\"\r\n                  :out-of-stock=\"true\"\r\n                  :error=\"API_ERROR_MESSAGES.OUT_OF_STOCK\"\r\n                ></LineItem>\r\n              </ul>\r\n              <ul\r\n                ref=\"inStockListElement\"\r\n                :aria-hidden=\"!shoppingCartStore.lineItemsOutOfStock?.length\"\r\n                class=\"checkout-line-items\"\r\n              >\r\n                <LineItem\r\n                  v-for=\"lineItem in lineItemsInStock\"\r\n                  :key=\"lineItem.ean\"\r\n                  :line-item=\"lineItem\"\r\n                  :error=\"shoppingCartStore.lineItemErrors?.[lineItem.ean]\"\r\n                ></LineItem>\r\n              </ul>\r\n              <div\r\n                v-if=\"!shoppingCartStore.cart && checkoutStateStore.isLoading\"\r\n                class=\"checkout-line-items\"\r\n              >\r\n                <LineItemSkeleton\r\n                  v-for=\"(_, index) in INITIAL_LINE_ITEM_COUNT\"\r\n                  :key=\"index\"\r\n                ></LineItemSkeleton>\r\n              </div>\r\n              <template\r\n                v-if=\"\r\n                  !lineItemsInStock?.length &&\r\n                  !shoppingCartStore.lineItemsOutOfStock?.length &&\r\n                  !checkoutStateStore.isLoading\r\n                \"\r\n              >\r\n                <h3 class=\"layout-new-checkout__primary-placeholder\">\r\n                  {{ $t(\"shoppingCartEmpty\") }}\r\n                </h3>\r\n              </template>\r\n            </div>\r\n            <template v-for=\"(upsellItem, index) in upsellModel\" :key=\"index\">\r\n              <ProductsModuleContent\r\n                v-if=\"upsellItem.primaryList\"\r\n                :key=\"index\"\r\n                v-show=\"!mobileUpsellVisible\"\r\n                :heading=\"upsellItem.primaryList.label ?? $t('maybeYouAlsoLike')\"\r\n                :search-result-recommend-list=\"upsellItem\"\r\n                :user-authenticated=\"\r\n                  shoppingCartStore.cart?.isAuthenticated ?? false\r\n                \"\r\n                :favorite-form-hidden=\"true\"\r\n                :is-loading=\"isLoading\"\r\n                :hide-sizes=\"true\"\r\n                :hide-colors=\"true\"\r\n                :hide-favorites=\"true\"\r\n                :is-quick-add=props.isQuickAdd\r\n                :productCount=\"upsellItem.primaryList.productGroups.length\"\r\n                :use-skeleton-loaders=\"true\"\r\n                :track-view-item-list=\"!mobileUpsellVisible\"\r\n                :track-select-item=\"true\"\r\n                :item-list-id=\"`shoppingcart-${upsellItem.primaryList.algorithm}`\"\r\n                :item-list-name=\"`shoppingcart-${upsellItem.primaryList.algorithm}`\"\r\n                :upsell-algorithm=\"upsellItem.primaryList.algorithm\"\r\n                container-class=\"product-list__upsell-small product-list__upsell-small--desktop\"\r\n                :use-slider-for-desktop=\"true\"\r\n              />\r\n            </template>\r\n          </div>\r\n          <div class=\"layout-new-checkout__secondary\">\r\n            <div\r\n              v-if=\"lineItemsInStock?.length\"\r\n              class=\"layout-new-checkout layout-new-checkout__element layout-new-checkout__element-small\"\r\n            >\r\n              <h2 class=\"accordion-new__heading\">Legg til rabattkode</h2>\r\n              <ShoppingCartDiscounts\r\n                :discounts=\"shoppingCartStore.cart?.appliedCoupons || {}\"\r\n                @resetDiscountError=\"handleResetDiscountError\"\r\n                @apiAddDiscountCode=\"ShoppingCartService.apiAddDiscountCode\"\r\n                @apiRemoveDiscountCode=\"\r\n                  ShoppingCartService.apiRemoveDiscountCode\r\n                \"\r\n              />\r\n            </div>\r\n            <div\r\n              v-if=\"shoppingCartStore.cart\"\r\n              class=\"layout-new-checkout__summary layout-new-checkout__element\"\r\n            >\r\n              <ShoppingCartSummary\r\n                :cart=\"shoppingCartStore.cart\"\r\n                :error=\"shoppingCartStore.summaryError || ''\"\r\n                :show-checkout-link=\"!!shoppingCartStore.cart?.itemCount\"\r\n              />\r\n            </div>\r\n            <template v-for=\"(upsellItem, index) in upsellModel\" :key=\"index\">\r\n              <ProductsModuleContent\r\n                v-if=\"upsellItem.primaryList\"\r\n                :key=\"index\"\r\n                v-show=\"mobileUpsellVisible\"\r\n                :heading=\"upsellItem.primaryList.label ?? $t('maybeYouAlsoLike')\"\r\n                :search-result-recommend-list=\"upsellItem\"\r\n                :show-as-column-on-mobile=\"false\"\r\n                :user-authenticated=\"\r\n                  shoppingCartStore.cart?.isAuthenticated ?? false\r\n                \"\r\n                :favorite-form-hidden=\"true\"\r\n                :is-loading=\"isLoading\"\r\n                :hide-sizes=\"true\"\r\n                :hide-colors=\"true\"\r\n                :hide-favorites=\"true\"\r\n                :is-quick-add=props.isQuickAdd\r\n                :productCount=\"upsellItem.primaryList.productGroups.length\"\r\n                :use-skeleton-loaders=\"true\"\r\n                :track-view-item-list=\"mobileUpsellVisible\"\r\n                :track-select-item=\"true\"\r\n                :item-list-id=\"`shoppingcart-${upsellItem.primaryList.algorithm}`\"\r\n                :item-list-name=\"`shoppingcart-${upsellItem.primaryList.algorithm}`\"\r\n                :upsell-algorithm=\"upsellItem.primaryList.algorithm\"\r\n                container-class=\"product-list__upsell-small product-list__upsell-small--mobile\"\r\n              />\r\n            </template>\r\n            <ShoppingCartKsps\r\n              v-if=\"shoppingCartStore.ksps\"\r\n              :key-selling-points=\"shoppingCartStore.ksps\"\r\n            />\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <div\r\n      v-if=\"shoppingCartStore.cart?.subTotal?.amount && props.oldCheckoutUrl\"\r\n      class=\"layout-new-checkout__summary-fixed\"\r\n    >\r\n      <h4 class=\"layout-new-checkout__summary-fixed-heading\">\r\n        <span>{{ $t(\"total\") }}: </span>\r\n        <span\r\n          >{{\r\n            shoppingCartStore.cart.total &&\r\n            formatCurrency(shoppingCartStore.cart.total.currency)\r\n          }}\r\n          {{\r\n            shoppingCartStore.cart.total &&\r\n            formatWithoutRounding(shoppingCartStore.totalAmount)\r\n          }}</span\r\n        >\r\n      </h4>\r\n      <button\r\n        v-if=\"shoppingCartStore.cart?.itemCount\"\r\n        class=\"btn btn--profile btn--checkout checkout-form__submit\"\r\n        @click=\"handleGoToCheckout\"\r\n      >\r\n        {{ $t(\"toCheckout\") }}\r\n      </button>\r\n      <PaymentProviders\r\n        v-if=\"shoppingCartStore.cart?.paymentMethods\"\r\n        :payment-methods=\"shoppingCartStore.cart.paymentMethods\"\r\n      ></PaymentProviders>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { computed, ref, defineEmits } from \"vue\";\r\nimport { FEEDBACK_TEXT } from \"../../utils/validationHelpers\";\r\nimport { TranslateResult } from \"vue-i18n\";\r\n\r\nconst props = defineProps<{\r\n  modelValue?: string;\r\n  label: string | TranslateResult;\r\n  type: string;\r\n  labelClass?: string;\r\n  inputClass?: string;\r\n  required?: boolean;\r\n  error?: string;\r\n  displayRequiredError?: boolean;\r\n  autofocus?: boolean;\r\n  autocomplete?: string;\r\n  emitInputElement?: boolean;\r\n  emitEventName?: string;\r\n  pattern?: string;\r\n  disabled?: boolean;\r\n  maxLength?: number;\r\n}>();\r\n\r\nconst emits = defineEmits(['update:modelValue', 'blur']);\r\nconst inputElement = ref<HTMLInputElement | null>();\r\nconst id = Math.random();\r\n\r\n/**\r\n * Computed property that filters out errors regarding empty values, as they are handled by input and label classes.\r\n *\r\n * @returns {Array} The filtered errors.\r\n */\r\nconst errorFiltered = computed(() => {\r\n  if (!props.error) return;\r\n  if (\r\n    (!props.displayRequiredError && props.error === FEEDBACK_TEXT().REQUIRED) ||\r\n    props.error === \"Required\"\r\n  )\r\n    return;\r\n\r\n  return props.error;\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <label class=\"checkout-form__label\" :class=\"props.labelClass\">\r\n      <input\r\n        ref=\"inputElement\"\r\n        :value=\"modelValue\"\r\n        :type=\"type\"\r\n        class=\"checkout-form__input\"\r\n        :class=\"[inputClass, { 'checkout-form__input--error': !!error }]\"\r\n        :autocomplete=\"autocomplete\"\r\n        :aria-required=\"required\"\r\n        :aria-invalid=\"!!error\"\r\n        placeholder=\" \"\r\n        :autofocus=\"autofocus\"\r\n        :aria-describedby=\"errorFiltered ? `error-${id}` : ''\"\r\n        :pattern=\"pattern\"\r\n        :disabled=\"disabled\"\r\n        :maxLength=\"maxLength\"\r\n        @input=\"$emit('update:modelValue', $event.target.value)\"\r\n        @blur=\"$emit('blur', $event)\"\r\n      />\r\n      <span\r\n        class=\"checkout-form__label-text\"\r\n        :class=\"{ 'checkout-form__label-text--error': !!error }\"\r\n        >{{ label }}</span\r\n      >\r\n    </label>\r\n    <div\r\n      v-show=\"errorFiltered\"\r\n      :id=\"`error-${id}`\"\r\n      class=\"checkout-form__error checkout-form__error--inline\"\r\n    >\r\n      {{ errorFiltered }}\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { ref } from \"vue\";\r\nimport FormInput from \"../form/formInput.vue\";\r\nimport {\r\n  AddressModelSchema,\r\n  postalCodeSchema,\r\n} from \"../../utils/API/Cart/cartAPISchema\";\r\nimport { CheckoutSteps } from \"../../services/models/checkout.models\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { validationHelper } from \"../../utils/validationHelpers\";\r\nimport { USER_FEEDBACK, API_ERROR_MESSAGES } from \"../../utils/API/APIErrors\";\r\nimport { sentenceCase } from \"../../../../helpers/checkoutHelpers\";\r\nimport { useCustomerInformationStore } from \"./stores/customerInformationStore\";\r\nimport { useCheckoutStateStore } from \"./stores/checkoutStateStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\n\r\nconst props = defineProps<{\r\n  isActive?: boolean;\r\n}>();\r\n\r\nconst customerInformationStore = useCustomerInformationStore();\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst retrievingCity = ref<boolean>(false);\r\n\r\nconst submitForm = () => {\r\n  CheckoutService.goToCheckoutStep(CheckoutSteps.Delivery);\r\n};\r\n\r\nconst handleBlur = (path: string) => {\r\n  let validationResult = AddressModelSchema.safeParse(\r\n    customerInformationStore.fields,\r\n  );\r\n\r\n  if (validationResult.success) {\r\n    customerInformationStore.setError(path, []);\r\n    return;\r\n  }\r\n\r\n  const pathRelatedErrors = validationResult.error.errors.filter(\r\n    (error) => error.path.toString() === path,\r\n  );\r\n\r\n  const errorMessages = pathRelatedErrors.map((error) => error.message);\r\n  customerInformationStore.setError(path, errorMessages);\r\n};\r\n\r\nconst handlePostalPlaceBlur = async () => {\r\n  let validationResult = postalCodeSchema.safeParse(\r\n    customerInformationStore.fields?.postalCode,\r\n  );\r\n\r\n  if (!validationResult.success) {\r\n    const errorMessages = validationResult.error.errors.map(\r\n      (error) => error.message,\r\n    );\r\n\r\n    customerInformationStore.setError(\"postalCode\", errorMessages);\r\n\r\n    return;\r\n  }\r\n\r\n  const matchingCityResult = await CheckoutService.TryGetCityMatchingPostalCode(\r\n    validationResult.data,\r\n  );\r\n\r\n  if (\r\n    !matchingCityResult ||\r\n    matchingCityResult === API_ERROR_MESSAGES.COULD_NOT_GET_CITY\r\n  ) {\r\n    return;\r\n  }\r\n\r\n  if (matchingCityResult === USER_FEEDBACK.UNKNOWN_POSTALCODE) {\r\n    customerInformationStore.setError(\"postalCode\", [\r\n      USER_FEEDBACK.UNKNOWN_POSTALCODE,\r\n    ]);\r\n\r\n    retrievingCity.value = false;\r\n    return;\r\n  }\r\n\r\n  customerInformationStore.setError(\"postalCode\", []);\r\n  customerInformationStore.setError(\"city\", []);\r\n};\r\n\r\n/**\r\n * Handles the input of a postal code.\r\n *\r\n *\r\n * @param {string} postalCode - The postal code input.\r\n * @returns {Promise<void>} - A promise that resolves when the postal code input is handled.\r\n */\r\nconst handlePostalCodeInput = async (postalCode: string) => {\r\n  customerInformationStore.setField(\"postalCode\", postalCode);\r\n\r\n  if (!validationHelper.isPostalCode(postalCode)) return;\r\n\r\n  const matchingCityResult = await CheckoutService.TryGetCityMatchingPostalCode(postalCode);\r\n  if (\r\n    !matchingCityResult ||\r\n    matchingCityResult === API_ERROR_MESSAGES.COULD_NOT_GET_CITY\r\n  )\r\n    return;\r\n\r\n  if (matchingCityResult === USER_FEEDBACK.UNKNOWN_POSTALCODE) {\r\n    customerInformationStore.setError(\"postalCode\", [\r\n      USER_FEEDBACK.UNKNOWN_POSTALCODE,\r\n    ]);\r\n\r\n    retrievingCity.value = false;\r\n    return;\r\n  }\r\n\r\n  customerInformationStore.setField(\"city\", sentenceCase(matchingCityResult));\r\n  customerInformationStore.setError(\"postalCode\", []);\r\n  customerInformationStore.setError(\"city\", []);\r\n};\r\n\r\n\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div\r\n      v-if=\"!props.isActive && customerInformationStore.fields\"\r\n      class=\"checkout-form__inactive\"\r\n    >\r\n      <div>\r\n        <div>\r\n          <span>{{ customerInformationStore.fields?.firstName }} {{ customerInformationStore.fields?.lastName }}</span>\r\n        </div>\r\n        <div>\r\n          <span>{{ customerInformationStore.fields?.address }}, {{ customerInformationStore.fields?.postalCode }} {{ customerInformationStore.fields?.city?.toUpperCase() }}</span>\r\n        </div>\r\n        <span>{{ customerInformationStore.fields?.email }}, {{ customerInformationStore.fields?.phoneNumber }}</span>\r\n      </div>\r\n    </div>\r\n    <form\r\n      v-if=\"props.isActive\"\r\n      class=\"checkout-form\"\r\n      novalidate\r\n      @submit.prevent=\"submitForm\"\r\n    >\r\n      <fieldset class=\"checkout-form__fieldset--customerinformation\">\r\n        <legend>{{ $t(\"customerInformation\") }}</legend>\r\n        <div\r\n          v-if=\"\r\n            customerInformationStore.errorSummaryVisible && customerInformationStore.errorsExist\r\n          \"\r\n          ref=\"customerInformationErrorsElement\"\r\n          tabindex=\"-1\"\r\n          class=\"checkout-form__error-summary\"\r\n        >\r\n          <h3 v-if=\"customerInformationStore.errorsExist\">\r\n            {{ $t(\"errorsInForm\") }}\r\n          </h3>\r\n          <ul\r\n            role=\"alert\"\r\n            class=\"checkout-form__error-list\"\r\n            :aria-hidden=\"customerInformationStore.errorsExist\"\r\n          >\r\n            <template\r\n              v-for=\"(messages, path) in customerInformationStore.errors\"\r\n            >\r\n              <li v-if=\"messages[0]\" :key=\"path\" class=\"checkout-form__error\">\r\n                {{ $t(path) }}: {{ messages[0] }}\r\n              </li>\r\n            </template>\r\n          </ul>\r\n        </div>\r\n        <FormInput\r\n          v-model=\"customerInformationStore.fields.email\"\r\n          input-class=\"checkout-form__input\"\r\n          :label=\"$t('email').toString()\"\r\n          :error=\"customerInformationStore.errors.email?.[0]\"\r\n          label-class=\"checkout-form__label\"\r\n          type=\"email\"\r\n          :required=\"true\"\r\n          :autofocus=\"true\"\r\n          autocomplete=\"email\"\r\n          @blur=\"() => handleBlur('email')\"\r\n        />\r\n        <div class=\"checkout-form__row\">\r\n          <FormInput\r\n            v-model=\"customerInformationStore.fields.firstName\"\r\n            :label=\"$t('firstName').toString()\"\r\n            :error=\"customerInformationStore.errors.firstName?.[0]\"\r\n            input-class=\"checkout-form__input\"\r\n            label-class=\"checkout-form__label\"\r\n            type=\"text\"\r\n            :required=\"true\"\r\n            autocomplete=\"given-name\"\r\n            @blur=\"() => handleBlur('firstName')\"\r\n          />\r\n          <FormInput\r\n            v-model=\"customerInformationStore.fields.lastName\"\r\n            :label=\"$t('lastName').toString()\"\r\n            :error=\"customerInformationStore.errors.lastName?.[0]\"\r\n            input-class=\"checkout-form__input\"\r\n            label-class=\"checkout-form__label\"\r\n            type=\"text\"\r\n            :required=\"true\"\r\n            autocomplete=\"family-name\"\r\n            @blur=\"() => handleBlur('lastName')\"\r\n          />\r\n        </div>\r\n        <FormInput\r\n          v-model=\"customerInformationStore.fields.phoneNumber\"\r\n          :label=\"$t('phoneNumber').toString()\"\r\n          :error=\"customerInformationStore.errors.phoneNumber?.[0]\"\r\n          input-class=\"checkout-form__input\"\r\n          label-class=\"checkout-form__label\"\r\n          type=\"tel\"\r\n          :required=\"true\"\r\n          autocomplete=\"tel\"\r\n          @blur=\"() => handleBlur('phoneNumber')\"\r\n        />\r\n        <FormInput\r\n          v-model=\"customerInformationStore.fields.address\"\r\n          :label=\"$t('address').toString()\"\r\n          :error=\"customerInformationStore.errors.address?.[0]\"\r\n          input-class=\"checkout-form__input\"\r\n          label-class=\"checkout-form__label\"\r\n          type=\"text\"\r\n          :required=\"true\"\r\n          autocomplete=\"street-address\"\r\n          @blur=\"() => handleBlur('address')\"\r\n        />\r\n        <div class=\"checkout-form__row\">\r\n          <FormInput\r\n            v-model=\"customerInformationStore.fields.postalCode\"\r\n            :label=\"$t('postalCode').toString()\"\r\n            :error=\"customerInformationStore.errors.postalCode?.[0]\"\r\n            input-class=\"checkout-form__input\"\r\n            label-class=\"checkout-form__label\"\r\n            type=\"text\"\r\n            :required=\"true\"\r\n            autocomplete=\"postal-code\"\r\n            @input=\"($event) => handlePostalCodeInput($event.target.value)\"\r\n            @blur=\"() => handlePostalPlaceBlur()\"\r\n          />\r\n          <FormInput\r\n            v-model=\"customerInformationStore.fields.city\"\r\n            :label=\"$t('city').toString()\"\r\n            :error=\"customerInformationStore.errors.city?.[0]\"\r\n            input-class=\"checkout-form__input\"\r\n            label-class=\"checkout-form__label\"\r\n            type=\"text\"\r\n            :required=\"true\"\r\n            autocomplete=\"address-level2\"\r\n            :disabled=\"customerInformationStore.retrievingCity\"\r\n            @blur=\"() => handleBlur('city')\"\r\n          />\r\n        </div>\r\n        <button\r\n          :disabled=\"checkoutStateStore.isLoading\"\r\n          class=\"btn btn--profile btn--checkout btn--smaller checkout-form__submit\"\r\n          type=\"submit\"\r\n        >\r\n          <Icon\r\n            v-if=\"checkoutStateStore.isLoading\"\r\n            type=\"spinner\"\r\n            size=\"tiny\"\r\n            class=\"icon--spinner\"\r\n          ></Icon>\r\n          <span v-if=\"checkoutStateStore.isLoading\">{{ $t(\"loading\") }}</span>\r\n          <span v-if=\"!checkoutStateStore.isLoading\">{{ $t(\"continue\") }}</span>\r\n        </button>\r\n      </fieldset>\r\n    </form>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { ref, onMounted, computed } from \"vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport { DeliveryWindow } from \"../../utils/API/Delivery/deliveryAPISchema\";\r\nimport {\r\n  deliveryWindowTimeStamp,\r\n  formatDay,\r\n} from \"../../../../helpers/checkoutHelpers\";\r\nimport { useDeliveryInformationStore } from \"./stores/deliveryInformationStore\";\r\n\r\nconst props = defineProps<{\r\n  deliveryWindows: DeliveryWindow[];\r\n  selectedDeliveryWindow?: DeliveryWindow;\r\n}>();\r\n\r\nconst deliveryInformationStore = useDeliveryInformationStore();\r\n\r\nconst INITIAL_AMOUNT_VISIBLE = 4;\r\nconst containerElement = ref();\r\nconst visibleWindowsAmount = ref(INITIAL_AMOUNT_VISIBLE);\r\n\r\nconst remainingHiddenWindows = computed(() => {\r\n  return props.deliveryWindows.length > visibleWindowsAmount.value;\r\n});\r\n\r\nconst visibleWindows = computed(() => {\r\n  return props.deliveryWindows.slice(0, visibleWindowsAmount.value);\r\n});\r\n\r\nconst handleLoadMoreClick = (e: Event) => {\r\n  e.preventDefault();\r\n  visibleWindowsAmount.value += INITIAL_AMOUNT_VISIBLE;\r\n};\r\n\r\nconst handleDeliveryWindowClick = (deliveryWindow: DeliveryWindow) => {\r\n  deliveryInformationStore.setSelectedDeliveryWindow(deliveryWindow);\r\n};\r\n\r\nonMounted(() => {\r\n  autoAnimate(containerElement.value);\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div ref=\"containerElement\" class=\"checkout-delivery__windows\">\r\n      <label\r\n        v-for=\"deliveryWindow in visibleWindows\"\r\n        :key=\"deliveryWindow.token\"\r\n        class=\"checkout-delivery__window\"\r\n        :for=\"deliveryWindow.token\"\r\n      >\r\n        <input\r\n          :id=\"deliveryWindow.token\"\r\n          type=\"radio\"\r\n          name=\"delivery-window\"\r\n          :checked=\"props.selectedDeliveryWindow === deliveryWindow\"\r\n          :value=\"deliveryWindow.token\"\r\n          @click=\"handleDeliveryWindowClick(deliveryWindow)\"\r\n        />\r\n        <div class=\"checkout-delivery__window-content\">\r\n          <div class=\"checkout-delivery__window-date\">\r\n            {{ formatDay(new Date(deliveryWindow.end)) }}\r\n          </div>\r\n          <div class=\"checkout-delivery__window-description\">\r\n            <div class=\"checkout-delivery__window-timestamp\">\r\n              {{ deliveryWindowTimeStamp(new Date(deliveryWindow.start)) }}-{{\r\n                deliveryWindowTimeStamp(new Date(deliveryWindow.end))\r\n              }}\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </label>\r\n    </div>\r\n    <button\r\n      v-if=\"remainingHiddenWindows\"\r\n      class=\"btn btn--link checkout-delivery__windows-loadmore\"\r\n      @click=\"(e) => handleLoadMoreClick(e)\"\r\n    >\r\n      {{ $t(\"seeMoreDeliveryWindows\") }}\r\n    </button>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { ref, computed } from \"vue\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { TranslateResult } from \"vue-i18n\";\r\nimport { ComboboxOptionModel } from \"../../services/models/combobox.models\";\r\n\r\nconst props = defineProps<{\r\n  heading: string | TranslateResult;\r\n  hideHeading?: boolean;\r\n  options: ComboboxOptionModel[];\r\n  selectedId?: string;\r\n}>();\r\n\r\nconst emits = defineEmits([\"update:modelValue\"]);\r\n\r\n/**\r\n * Computed property that returns the index of the selected option in the combobox.\r\n * If no option is selected, it returns 0.\r\n *\r\n * @returns {number} The index of the selected option.\r\n */\r\nconst selectedIndex = computed(() => {\r\n  if (!props.selectedId) return 0;\r\n\r\n  return (\r\n    props.options.findIndex((option) => option.id === props.selectedId) ?? 0\r\n  );\r\n});\r\n\r\nconst rootElement = ref();\r\nconst comboElement = ref();\r\nconst listboxElement = ref();\r\nconst comboboxOpen = ref(false);\r\nconst randomizedId = Math.random();\r\nconst comboContainerElement = ref<HTMLElement>();\r\nconst optionElements = ref<HTMLElement[]>();\r\nconst activeIndex = ref(selectedIndex.value);\r\n\r\n// Save a list of named combobox actions, for future readability\r\nconst SelectActions = {\r\n  Close: 0,\r\n  CloseSelect: 1,\r\n  First: 2,\r\n  Last: 3,\r\n  Next: 4,\r\n  Open: 5,\r\n  PageDown: 6,\r\n  PageUp: 7,\r\n  Previous: 8,\r\n  Select: 9,\r\n  Type: 10,\r\n};\r\n\r\n// map a key press to an action\r\nfunction getActionFromKey(\r\n  event: { key: any; altKey: any; ctrlKey: any; metaKey: any },\r\n  menuOpen: any,\r\n) {\r\n  const { key, altKey, ctrlKey, metaKey } = event;\r\n  const openKeys = [\"ArrowDown\", \"ArrowUp\", \"Enter\", \" \"]; // all keys that will do the default open action\r\n  // handle opening when closed\r\n  if (!menuOpen && openKeys.includes(key)) {\r\n    return SelectActions.Open;\r\n  }\r\n\r\n  // home and end move the selected option when open or closed\r\n  if (key === \"Home\") {\r\n    return SelectActions.First;\r\n  }\r\n  if (key === \"End\") {\r\n    return SelectActions.Last;\r\n  }\r\n\r\n  // handle typing characters when open or closed\r\n  if (\r\n    key === \"Backspace\" ||\r\n    key === \"Clear\" ||\r\n    (key.length === 1 && key !== \" \" && !altKey && !ctrlKey && !metaKey)\r\n  ) {\r\n    return SelectActions.Type;\r\n  }\r\n\r\n  // handle keys when open\r\n  if (menuOpen) {\r\n    if (key === \"ArrowUp\" && altKey) {\r\n      return SelectActions.CloseSelect;\r\n    } else if (key === \"ArrowDown\" && !altKey) {\r\n      return SelectActions.Next;\r\n    } else if (key === \"ArrowUp\") {\r\n      return SelectActions.Previous;\r\n    } else if (key === \"PageUp\") {\r\n      return SelectActions.PageUp;\r\n    } else if (key === \"PageDown\") {\r\n      return SelectActions.PageDown;\r\n    } else if (key === \"Escape\") {\r\n      return SelectActions.Close;\r\n    } else if (key === \"Enter\" || key === \" \") {\r\n      return SelectActions.CloseSelect;\r\n    }\r\n  }\r\n}\r\n// get an updated option index after performing an action\r\nfunction getUpdatedIndex(\r\n  currentIndex: number,\r\n  maxIndex: number,\r\n  action: number,\r\n) {\r\n  const pageSize = 10; // used for pageup/pagedown\r\n\r\n  switch (action) {\r\n    case SelectActions.First:\r\n      return 0;\r\n    case SelectActions.Last:\r\n      return maxIndex;\r\n    case SelectActions.Previous:\r\n      return Math.max(0, currentIndex - 1);\r\n    case SelectActions.Next:\r\n      return Math.min(maxIndex, currentIndex + 1);\r\n    case SelectActions.PageUp:\r\n      return Math.max(0, currentIndex - pageSize);\r\n    case SelectActions.PageDown:\r\n      return Math.min(maxIndex, currentIndex + pageSize);\r\n    default:\r\n      return currentIndex;\r\n  }\r\n}\r\n\r\nconst updateMenuState = (open: boolean, callFocus = true) => {\r\n  if (comboboxOpen.value === open) {\r\n    return;\r\n  }\r\n\r\n  comboboxOpen.value = open;\r\n\r\n  // update activedescendant\r\n  const activeID = open ? `${randomizedId}-${selectedIndex.value}` : \"\";\r\n\r\n  if (activeID === \"\" && !isElementInView(comboElement.value)) {\r\n    comboElement.value.scrollIntoView({ behavior: \"smooth\", block: \"nearest\" });\r\n  }\r\n\r\n  // move focus back to the combobox, if needed\r\n  callFocus && comboElement.value.focus();\r\n};\r\n\r\n// check if element is visible in browser view port\r\nfunction isElementInView(element: { getBoundingClientRect: () => DOMRect }) {\r\n  var bounding = element.getBoundingClientRect();\r\n\r\n  return (\r\n    bounding.top >= 0 &&\r\n    bounding.left >= 0 &&\r\n    bounding.bottom <=\r\n      (window.innerHeight || document.documentElement.clientHeight) &&\r\n    bounding.right <=\r\n      (window.innerWidth || document.documentElement.clientWidth)\r\n  );\r\n}\r\n\r\n// check if an element is currently scrollable\r\nfunction isScrollable(element: { clientHeight: number; scrollHeight: number }) {\r\n  return element && element.clientHeight < element.scrollHeight;\r\n}\r\n\r\n// ensure a given child element is within the parent's visible scroll area\r\n// if the child is not visible, scroll the parent\r\nfunction maintainScrollVisibility(\r\n  activeElement: HTMLElement,\r\n  scrollParent: HTMLElement,\r\n) {\r\n  const { offsetHeight, offsetTop } = activeElement;\r\n  const { offsetHeight: parentOffsetHeight, scrollTop } = scrollParent;\r\n\r\n  const isAbove = offsetTop < scrollTop;\r\n  const isBelow = offsetTop + offsetHeight > scrollTop + parentOffsetHeight;\r\n\r\n  if (isAbove) {\r\n    scrollParent.scrollTo(0, offsetTop);\r\n  } else if (isBelow) {\r\n    scrollParent.scrollTo(0, offsetTop - parentOffsetHeight + offsetHeight);\r\n  }\r\n}\r\n\r\nconst onComboBlur = (event: { relatedTarget: any }) => {\r\n  // do nothing if relatedTarget is contained within listboxElement\r\n  if (listboxElement.value.contains(event.relatedTarget)) {\r\n    return;\r\n  }\r\n\r\n  // select current option and close\r\n  if (comboboxOpen.value) {\r\n    selectOption(selectedIndex.value);\r\n    updateMenuState(false, false);\r\n  }\r\n};\r\n\r\nconst onComboClick = (e) => {\r\n  e.preventDefault();\r\n  e.stopPropagation();\r\n  updateMenuState(!comboboxOpen.value, false);\r\n};\r\n\r\nconst onComboKeyDown = (event: KeyboardEvent) => {\r\n  const { key } = event;\r\n  const max = props.options.length - 1;\r\n\r\n  const action = getActionFromKey(event, comboboxOpen.value);\r\n\r\n  switch (action) {\r\n    case SelectActions.Last:\r\n    case SelectActions.First:\r\n      updateMenuState(true);\r\n    // intentional fallthrough\r\n    case SelectActions.Next:\r\n    case SelectActions.Previous:\r\n    case SelectActions.PageUp:\r\n    case SelectActions.PageDown:\r\n      event.preventDefault();\r\n      return onOptionChange(getUpdatedIndex(activeIndex.value, max, action));\r\n    case SelectActions.CloseSelect:\r\n      event.preventDefault();\r\n      selectOption(activeIndex.value);\r\n    // intentional fallthrough\r\n    case SelectActions.Close:\r\n      event.preventDefault();\r\n      return updateMenuState(false);\r\n    case SelectActions.Open:\r\n      event.preventDefault();\r\n      return updateMenuState(true);\r\n  }\r\n};\r\n\r\nconst onOptionChange = (index: number) => {\r\n  activeIndex.value = index;\r\n  if (!optionElements.value) return;\r\n\r\n  // ensure the new option is in view\r\n  if (isScrollable(listboxElement.value)) {\r\n    maintainScrollVisibility(optionElements.value[index], listboxElement.value);\r\n  }\r\n\r\n  // ensure the new option is visible on screen\r\n  // ensure the new option is in view\r\n  if (!isElementInView(optionElements.value[index])) {\r\n    optionElements.value[index].scrollIntoView({\r\n      behavior: \"smooth\",\r\n      block: \"nearest\",\r\n    });\r\n  }\r\n};\r\n\r\nconst onOptionClick = (index: number) => {\r\n  onOptionChange(index);\r\n  selectOption(index);\r\n  updateMenuState(false);\r\n};\r\n\r\n/**\r\n * Selects an option from the combobox.\r\n * Emits an event with the selected index.\r\n *\r\n * @param {number} index - The index of the option to select.\r\n */\r\nconst selectOption = (index: number) => {\r\n  emits(\"update:modelValue\", props.options[index].id);\r\n};\r\n</script>\r\n\r\n<template>\r\n  <div ref=\"rootElement\">\r\n    <label\r\n      :id=\"`combobox-${randomizedId}-label`\"\r\n      class=\"combo__label\"\r\n      :class=\"props.hideHeading && 'sr-only'\"\r\n      >{{ props.heading }}</label\r\n    >\r\n    <div\r\n      ref=\"comboContainerElement\"\r\n      class=\"combo js-select\"\r\n      :class=\"comboboxOpen && 'open'\"\r\n    >\r\n      <div\r\n        :id=\"`combox-${randomizedId}`\"\r\n        ref=\"comboElement\"\r\n        :aria-activedescendant=\"`${randomizedId}-${selectedIndex}`\"\r\n        aria-controls=\"listbox1\"\r\n        :aria-expanded=\"comboboxOpen\"\r\n        aria-haspopup=\"listbox\"\r\n        aria-labelledby=\"combo1-label\"\r\n        class=\"combo__input\"\r\n        role=\"combobox\"\r\n        tabindex=\"0\"\r\n        @blur=\"(e) => onComboBlur(e)\"\r\n        @click=\"(e) => onComboClick(e)\"\r\n        @keydown=\"(e) => onComboKeyDown(e)\"\r\n      >\r\n        <div class=\"combo-input-content\">\r\n          <p\r\n            v-if=\"props.options[selectedIndex]?.heading\"\r\n            class=\"combo__heading\"\r\n          >\r\n            {{ props.options[selectedIndex].heading }}\r\n          </p>\r\n          <p\r\n            v-if=\"props.options[selectedIndex]?.description\"\r\n            class=\"combo__description\"\r\n          >\r\n            {{ props.options[selectedIndex].description }}\r\n          </p>\r\n        </div>\r\n        <Icon\r\n          ref=\"icon\"\r\n          class=\"combo__icon\"\r\n          size=\"accordion\"\r\n          type=\"chevron\"\r\n        ></Icon>\r\n      </div>\r\n      <div\r\n        :id=\"`listbox-${randomizedId}`\"\r\n        ref=\"listboxElement\"\r\n        class=\"combo__menu\"\r\n        role=\"listbox\"\r\n        :aria-labelledby=\"`combobox-${randomizedId}-label`\"\r\n        tabindex=\"-1\"\r\n        @focusout=\"(e) => onComboBlur(e)\"\r\n      >\r\n        <template\r\n          v-for=\"(option, index) in props.options\"\r\n          :key=\"`${randomizedId}-${index}`\"\r\n        >\r\n          <div\r\n            :id=\"`${randomizedId}-${index}`\"\r\n            ref=\"optionElements\"\r\n            role=\"option\"\r\n            class=\"combo__option\"\r\n            :class=\"index == activeIndex && 'option-current'\"\r\n            :aria-selected=\"index === selectedIndex\"\r\n            :aria-current=\"index === activeIndex\"\r\n            @click.stop.prevent=\"() => onOptionClick(index)\"\r\n          >\r\n            <div class=\"combo__option-content\">\r\n              <div class=\"\">\r\n                <p v-if=\"option.heading\" class=\"combo__heading\">\r\n                  {{ option.heading }}\r\n                </p>\r\n                <p class=\"combo__description\">\r\n                  {{ option.description }}\r\n                </p>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </template>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, watch, onMounted } from \"vue\";\r\nimport { ComboboxOptionModel } from \"../../services/models/combobox.models\";\r\nimport { useDeliveryInformationStore } from \"../checkout/stores/deliveryInformationStore\";\r\nimport { getDeliveryLocations } from \"../../utils/API/Delivery/deliveryAPI\";\r\nimport { useCustomerInformationStore } from \"../checkout/stores/customerInformationStore\";\r\nimport { DeliveryLocation } from \"../../utils/API/Delivery/deliveryAPISchema\";\r\nimport { IconSizes, IconTypes } from \"../icon/icon.model\";\r\nimport Icon from \"../icon/icon.vue\";\r\n\r\nconst customerInformationStore = useCustomerInformationStore();\r\nconst deliveryInformationStore = useDeliveryInformationStore();\r\nconst previousSearchQuery = ref(\"\");\r\nconst query = ref(customerInformationStore.fields.postalCode || \"\");\r\nconst selectedDeliveryLocation = ref();\r\nconst comboboxOptions = ref<ComboboxOptionModel[]>([]);\r\nconst searchInput = ref<HTMLInputElement | null>(null);\r\n\r\nconst handleSearchInput = (event: InputEvent) => {\r\n  const input = event.target as HTMLInputElement;\r\n  const value = input.value;\r\n\r\n  // Allow only digits and limit to 4 characters\r\n  if (/^\\d*$/.test(value) && value.length <= 4) {\r\n    query.value = value;\r\n  } else {\r\n    // Revert to the previous valid value if the input is invalid\r\n    input.value = query.value;\r\n  }\r\n};\r\n\r\nconst resetInput = () => {\r\n  query.value = \"\";\r\n  // Small timeout to ensure DOM update is rendered before focusing\r\n  setTimeout(() => {\r\n    const inputElement = document.getElementById(\r\n      \"postalCodeInput\",\r\n    ) as HTMLInputElement | null;\r\n    inputElement?.focus();\r\n  }, 0);\r\n};\r\n\r\nconst props = defineProps<{\r\n  toggleVisibility: () => void;\r\n}>();\r\n\r\nconst handleSelectComboOption = (option: ComboboxOptionModel) => {\r\n  // Parse the description to extract delivery address, postal code, and city\r\n  const [deliveryAddress, postalCodeCity] =\r\n    option.description?.split(\",\") ?? [];\r\n  const [postalCode, city] = postalCodeCity?.trim().split(\" \") ?? [];\r\n\r\n  // Create a new DeliveryLocation object from the selected option\r\n  const selectedLocation: DeliveryLocation = {\r\n    id: option.id.toString(), // Ensure the id is a string\r\n    name: option.heading, // Use the heading as the name\r\n    deliveryAddress: deliveryAddress?.trim(),\r\n    postalCode: postalCode?.trim(),\r\n    city: city?.trim(),\r\n  };\r\n\r\n  // Set the selected delivery location\r\n  selectedDeliveryLocation.value = selectedLocation;\r\n\r\n  // Update the deliveryInformationStore with the selected location\r\n  deliveryInformationStore.setSelectedDeliveryLocation(selectedLocation);\r\n\r\n  // Toggle visibility after selecting an option\r\n  props.toggleVisibility();\r\n};\r\n\r\nconst apiGetDeliveryLocations = async () => {\r\n  const data = await getDeliveryLocations(\r\n    deliveryInformationStore?.selectedDeliveryMethod?.name ?? \"MyPack\",\r\n    query.value,\r\n  );\r\n\r\n  comboBoxMapping(data);\r\n};\r\n\r\nconst comboBoxMapping = (data: Array<DeliveryLocation>) => {\r\n  // Map the API data to the ComboboxOptionModel format\r\n  comboboxOptions.value = data.map((location: any) => ({\r\n    id: location.id,\r\n    heading: location.name,\r\n    description: `${location.deliveryAddress}, ${location.postalCode} ${location.city}`,\r\n  }));\r\n};\r\n\r\n//When query reaches 4 digits and the query is not the same as the previous query, log to console\r\nwatch(query, (value) => {\r\n  if (value.length === 4 && value !== previousSearchQuery.value) {\r\n    previousSearchQuery.value = value;\r\n    apiGetDeliveryLocations();\r\n  }\r\n});\r\n\r\nonMounted(() => {\r\n  if (query.value.length === 4) {\r\n    apiGetDeliveryLocations();\r\n  }\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div class=\"searchbox\">\r\n    <label class=\"searchbox__label\" for=\"postalCodeInput\">{{\r\n      $t(\"changeDeliveryLocation\")\r\n    }}</label>\r\n    <div class=\"searchbox__container\">\r\n      <input\r\n        class=\"searchbox__input\"\r\n        id=\"postalCodeInput\"\r\n        :value=\"query\"\r\n        @input.prevent=\"handleSearchInput\"\r\n        placeholder=\"Skriv inn et postnummer...\"\r\n        ref=\"searchInput\"\r\n      />\r\n      <button\r\n        v-if=\"query\"\r\n        class=\"searchbox__reset-button\"\r\n        @click.prevent=\"resetInput\"\r\n        aria-label=\"Reset input\"\r\n      >\r\n        <Icon :type=\"IconTypes.Close\" :size=\"IconSizes.Small\" />\r\n      </button>\r\n    </div>\r\n    <ul v-if=\"comboboxOptions.length > 0\" class=\"searchbox__results\">\r\n      <li v-for=\"option in comboboxOptions\" :key=\"option.id\">\r\n        <button\r\n          @click.prevent=\"handleSelectComboOption(option)\"\r\n          class=\"searchbox__result\"\r\n        >\r\n          <div class=\"searchbox__result-content\">\r\n            <p class=\"combo__heading\">{{ option.heading }}</p>\r\n            <p class=\"combo__description\">{{ option.description }}</p>\r\n          </div>\r\n        </button>\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { ref, onMounted, computed, watch } from \"vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport Combobox from \"../combobox/Combobox.vue\";\r\nimport { DeliveryLocation } from \"../../utils/API/Delivery/deliveryAPISchema\";\r\nimport { formatDeliveryLocationAddress } from \"../../../../helpers/checkoutHelpers\";\r\nimport { useDeliveryInformationStore } from \"./stores/deliveryInformationStore\";\r\nimport searchbox from \"../searchbox/searchbox.vue\";\r\n\r\nconst props = defineProps<{\r\n  deliveryLocations?: DeliveryLocation[];\r\n  selectedDeliveryLocationId?: string;\r\n}>();\r\n\r\nconst deliveryInformationStore = useDeliveryInformationStore();\r\nconst containerElement = ref();\r\n// Ref to control the visibility of the searchbox\r\nconst isSearchboxVisible = ref(false);\r\n\r\n/**\r\n * Creates and array of objects that satisfy the ComboboxOption interface for usage in the Combobox component.\r\n *\r\n * @returns {Array} The options for the combobox.\r\n */\r\nconst comboboxOptions = computed(() => {\r\n  return (\r\n    props.deliveryLocations?.map((location: DeliveryLocation) => ({\r\n      heading: location.name || \"\",\r\n      description: formatDeliveryLocationAddress(location),\r\n      id: location.id,\r\n    })) || []\r\n  );\r\n});\r\n\r\nconst setDeliveryLocationById = (id: string) => {\r\n  const location = props.deliveryLocations?.find(\r\n    (location) => location.id === id,\r\n  );\r\n\r\n  if (location) {\r\n    deliveryInformationStore.setSelectedDeliveryLocation(location);\r\n  }\r\n};\r\n\r\n// Toggle searchbox visibility when the \"Endre\" button is clicked\r\nconst toggleSearchboxVisibility = () => {\r\n  isSearchboxVisible.value = !isSearchboxVisible.value;\r\n};\r\n\r\nonMounted(() => {\r\n  if (containerElement.value) autoAnimate(containerElement.value);\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div\r\n    v-if=\"\r\n      deliveryInformationStore.selectedDeliveryMethod?.name === 'PickUpInStore'\r\n    \"\r\n    ref=\"containerElement\"\r\n    class=\"checkout-delivery__locations\"\r\n  >\r\n    <Combobox\r\n      @update:modelValue=\"setDeliveryLocationById\"\r\n      v-if=\"props.deliveryLocations\"\r\n      :heading=\"$t('selectDeliveryLocation')\"\r\n      :hide-heading=\"true\"\r\n      :options=\"comboboxOptions\"\r\n      :selected-id=\"deliveryInformationStore.selectedDeliveryLocation?.id\"\r\n    />\r\n  </div>\r\n  <div\r\n    v-if=\"deliveryInformationStore.selectedDeliveryMethod?.name === 'MyPack'\"\r\n  >\r\n    <div v-if=\"deliveryInformationStore.selectedDeliveryLocation\">\r\n      <div class=\"searchbox__selected\">\r\n        <div class=\"searchbox__address-information\">\r\n          <div class=\"combo__heading\">\r\n            {{ deliveryInformationStore.selectedDeliveryLocation?.name }}\r\n          </div>\r\n          <div class=\"combo__description\">\r\n            {{\r\n              formatDeliveryLocationAddress(\r\n                deliveryInformationStore.selectedDeliveryLocation,\r\n              )\r\n            }}\r\n          </div>\r\n        </div>\r\n        <div>\r\n          <button\r\n            class=\"checkout-step-selector__edit-step checkout-step-selector__activator\"\r\n            @click.prevent=\"toggleSearchboxVisibility\"\r\n          >\r\n            <span class=\"checkout-step-selector__edit-text\">{{\r\n              $t(\"change\")\r\n            }}</span>\r\n          </button>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <searchbox\r\n      v-if=\"isSearchboxVisible\"\r\n      :toggle-visibility=\"toggleSearchboxVisibility\"\r\n    />\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { formatPrice } from \"../../mixins/productPrice.mixin\";\r\nimport DeliveryWindows from \"./deliveryWindows.vue\";\r\nimport DeliveryLocations from \"./deliveryLocations.vue\";\r\nimport { DeliveryMethod } from \"../../utils/API/Delivery/deliveryAPISchema\";\r\nimport { CheckoutSteps } from \"../../services/models/checkout.models\";\r\nimport {\r\n  deliveryWindowTimeStamp,\r\n  formatDay,\r\n  formatDeliveryLocationAddress,\r\n  LogoNameForDeliveryMethod,\r\n  hasDeliveryWindows,\r\n  DeliveryMethods,\r\n} from \"../../../../helpers/checkoutHelpers\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { useDeliveryInformationStore } from \"./stores/deliveryInformationStore\";\r\nimport { useCheckoutStateStore } from \"./stores/checkoutStateStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\nimport Searchbox from \"../searchbox/searchbox.vue\";\r\nimport { onMounted } from \"vue\";\r\n\r\nconst props = defineProps<{\r\n  isActive?: boolean;\r\n}>();\r\n\r\nconst deliveryInformationStore = useDeliveryInformationStore();\r\nconst checkoutStateStore = useCheckoutStateStore();\r\n\r\nconst submitForm = () => {\r\n  CheckoutService.goToCheckoutStep(CheckoutSteps.Payment);\r\n};\r\n\r\n/**\r\n * Sets the selected delivery method ID.\r\n *\r\n * @param {string} id - The ID of the selected delivery method.\r\n * @returns {void}\r\n */\r\nconst handleSetDeliveryMethod = (deliveryMethod: DeliveryMethod) => {\r\n  deliveryInformationStore.setSelectedDeliveryMethod(deliveryMethod);\r\n};\r\n\r\n/**\r\n * Determines whether to display the delivery method based on the provided delivery method object.\r\n *\r\n * @param {DeliveryMethod} deliveryMethod - The delivery method object.\r\n * @returns {boolean} - Returns true if the delivery method should be displayed, otherwise false.\r\n */\r\nconst displayDeliveryMethod = (deliveryMethod: DeliveryMethod) => {\r\n  if (\r\n    deliveryMethod?.displayName === DeliveryMethods.Porterbuddy &&\r\n    !hasDeliveryWindows(deliveryMethod)\r\n  ) {\r\n    return false;\r\n  }\r\n\r\n  return true;\r\n};\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div\r\n      v-if=\"!props.isActive && deliveryInformationStore.deliveryInformation\"\r\n      class=\"checkout-form__inactive\"\r\n    >\r\n      <span>\r\n        <span v-if=\"deliveryInformationStore.selectedDeliveryMethod\">\r\n          {{ deliveryInformationStore.selectedDeliveryMethod?.displayName }}\r\n        </span>\r\n        <span v-if=\"deliveryInformationStore.selectedDeliveryLocation\">\r\n          <div>\r\n            {{ deliveryInformationStore.selectedDeliveryLocation?.name }}\r\n          </div>\r\n          <div>\r\n            {{\r\n              formatDeliveryLocationAddress(\r\n                deliveryInformationStore.selectedDeliveryLocation,\r\n              )\r\n            }}\r\n          </div>\r\n        </span>\r\n        <div v-if=\"deliveryInformationStore.selectedDeliveryWindow\">\r\n          {{\r\n            formatDay(\r\n              new Date(deliveryInformationStore.selectedDeliveryWindow.end),\r\n            )\r\n          }}\r\n          {{\r\n            deliveryWindowTimeStamp(\r\n              new Date(deliveryInformationStore.selectedDeliveryWindow.end),\r\n            )\r\n          }}-{{\r\n            deliveryWindowTimeStamp(\r\n              new Date(deliveryInformationStore.selectedDeliveryWindow.end),\r\n            )\r\n          }}\r\n          <span v-if=\"deliveryInformationStore.selectedDeliveryMethod?.price\">\r\n            -\r\n            {{\r\n              formatPrice(\r\n                deliveryInformationStore.selectedDeliveryMethod?.price,\r\n              )\r\n            }}\r\n          </span>\r\n        </div>\r\n      </span>\r\n    </div>\r\n    <form\r\n      v-if=\"props.isActive && deliveryInformationStore.deliveryInformation\"\r\n      class=\"checkout-form checkout-delivery\"\r\n      novalidate\r\n      @submit.prevent=\"submitForm\"\r\n    >\r\n      <fieldset>\r\n        <legend>{{ $t(\"deliveryMethods\") }}</legend>\r\n        <template\r\n          v-for=\"deliveryMethod in deliveryInformationStore?.deliveryInformation?.deliveryMethods.filter(\r\n            (x) => displayDeliveryMethod(x),\r\n          ) || []\"\r\n          :key=\"deliveryMethod.id\"\r\n        >\r\n          <div class=\"checkout-form__radio\">\r\n            <label class=\"checkout-form__label\" :for=\"deliveryMethod.id\">\r\n              <input\r\n                :id=\"deliveryMethod.id\"\r\n                type=\"radio\"\r\n                name=\"delivery-method\"\r\n                :value=\"deliveryMethod.displayName\"\r\n                :checked=\"\r\n                  deliveryMethod ===\r\n                  deliveryInformationStore.selectedDeliveryMethod\r\n                \"\r\n                @click=\"handleSetDeliveryMethod(deliveryMethod)\"\r\n              />\r\n              <div class=\"checkout-form__radio-heading\">\r\n                {{ deliveryMethod.displayName }}\r\n                {{ formatPrice(deliveryMethod.price) }}\r\n              </div>\r\n              <div class=\"checkout-form__radio-content\">\r\n                <div class=\"checkout-form__radio-description\">\r\n                  <div>\r\n                    <span v-if=\"deliveryMethod.description\">\r\n                      {{ deliveryMethod.description.trim() }}\r\n                    </span>\r\n                    <span v-if=\"deliveryMethod.deliveryWindows?.length\">\r\n                      ({{ $t(\"deliveryWindowTip\") }})\r\n                    </span>\r\n                  </div>\r\n                  <Icon\r\n                    v-if=\"LogoNameForDeliveryMethod(deliveryMethod)\"\r\n                    :type=\"LogoNameForDeliveryMethod(deliveryMethod)\"\r\n                    :title=\"`${deliveryMethod.displayName} logo`\"\r\n                    size=\"delivery-logo\"\r\n                    class=\"checkout-delivery-icon checkout-delivery-icon--porterbuddy\"\r\n                  />\r\n                </div>\r\n                <DeliveryWindows\r\n                  v-if=\"\r\n                    deliveryMethod.deliveryWindows &&\r\n                    deliveryMethod ===\r\n                      deliveryInformationStore.selectedDeliveryMethod\r\n                  \"\r\n                  :delivery-windows=\"deliveryMethod.deliveryWindows\"\r\n                  :selected-delivery-window=\"\r\n                    deliveryInformationStore.selectedDeliveryWindow\r\n                  \"\r\n                />\r\n                <DeliveryLocations\r\n                  v-if=\"\r\n                    deliveryMethod.deliveryLocations &&\r\n                    deliveryMethod.deliveryLocations.length &&\r\n                    deliveryMethod ===\r\n                      deliveryInformationStore.selectedDeliveryMethod\r\n                  \"\r\n                  :delivery-locations=\"deliveryMethod.deliveryLocations\"\r\n                  :selected-delivery-location-id=\"\r\n                    deliveryInformationStore.selectedDeliveryLocation?.id\r\n                  \"\r\n                />\r\n              </div>\r\n            </label>\r\n          </div>\r\n        </template>\r\n        <button\r\n          :disabled=\"checkoutStateStore.isLoading\"\r\n          class=\"btn btn--profile btn--spinner btn--checkout btn--smaller checkout-form__submit\"\r\n          type=\"submit\"\r\n        >\r\n          <Icon\r\n            v-if=\"checkoutStateStore.isLoading\"\r\n            type=\"spinner\"\r\n            size=\"tiny\"\r\n            class=\"icon--spinner\"\r\n          ></Icon>\r\n          <span v-if=\"checkoutStateStore.isLoading\">{{ $t(\"loading\") }}</span>\r\n          <span v-if=\"!checkoutStateStore.isLoading\">{{ $t(\"continue\") }}</span>\r\n        </button>\r\n      </fieldset>\r\n    </form>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { ValidatedCartResultDto } from \"../../utils/API/Payment/paymentAPISchema\";\r\nimport { ref, watch } from \"vue\";\r\nimport { formatWithoutRounding } from \"../../mixins/productPrice.mixin\";\r\nimport { usePaymentInformationStore } from \"./stores/paymentInformationStore\";\r\n\r\nconst props = defineProps<{\r\n  errorDetails?: ValidatedCartResultDto;\r\n  visible?: boolean;\r\n}>();\r\n\r\nconst paymentInformationStore = usePaymentInformationStore();\r\nconst dialog = ref<HTMLDialogElement | null>(null);\r\n\r\nwatch(\r\n  () => paymentInformationStore.showCartContentChangedPaymentError,\r\n  (value) => {\r\n    if (value) {\r\n      dialog.value?.showModal();\r\n    } else {\r\n      dialog.value?.close();\r\n    }\r\n  },\r\n);\r\n\r\nfunction openDialog() {\r\n  if (dialog.value) {\r\n    paymentInformationStore.SetShowCartContentChangedPaymentError(true);\r\n  }\r\n}\r\n\r\nconst closeDialog = () => {\r\n  if (dialog.value) {\r\n    paymentInformationStore.SetShowCartContentChangedPaymentError(false);\r\n  }\r\n};\r\n\r\n/**\r\n * Retrieves the current URL of the window.\r\n * @returns {string} The current URL.\r\n */\r\nconst getHref = () => {\r\n  return window.location.href;\r\n};\r\n\r\n/**\r\n * Returns the origin of the current window location.\r\n *\r\n * @returns {string} The origin of the current window location.\r\n */\r\nconst getOrigin = () => {\r\n  return window.location.origin;\r\n};\r\n</script>\r\n\r\n<template>\r\n  <dialog ref=\"dialog\" class=\"dialog\">\r\n    <div class=\"dialog__layout\">\r\n      <div class=\"dialog__header\">\r\n        <h2>Beklager!</h2>\r\n        <button\r\n          class=\"dialog__close btn btn--icon\"\r\n          :aria-label=\"$t('close').toString()\"\r\n          @click=\"closeDialog()\"\r\n        >\r\n          <Icon type=\"close\" />\r\n        </button>\r\n      </div>\r\n      <div class=\"dialog__contents finalize-payment-error\">\r\n        <p\r\n          v-if=\"\r\n            paymentInformationStore.cartContentChangedPaymentContent\r\n              ?.description\r\n          \"\r\n          class=\"finalize-payment-error__description\"\r\n        >\r\n          {{\r\n            paymentInformationStore.cartContentChangedPaymentContent\r\n              ?.description\r\n          }}\r\n        </p>\r\n        <table class=\"finalize-payment-error__table\">\r\n          <caption class=\"sr-only\">\r\n            {{\r\n              $t(\"productInfo\")\r\n            }}\r\n          </caption>\r\n          <thead class=\"finalize-payment-error__table-head\">\r\n            <tr class=\"finalize-payment-error__table-row\">\r\n              <th scope=\"col\">{{ $t(\"product\") }}</th>\r\n              <th scope=\"col\">{{ $t(\"amount\") }}</th>\r\n              <th scope=\"col\">{{ $t(\"newAmount\") }}</th>\r\n            </tr>\r\n          </thead>\r\n          <tbody class=\"finalize-payment-error__table-body\">\r\n            <tr\r\n              v-for=\"cartline in paymentInformationStore\r\n                .cartContentChangedPaymentContent?.cartLinesUpdated\"\r\n              :key=\"cartline.name\"\r\n              class=\"finalize-payment-error__table-row\"\r\n            >\r\n              <td>{{ cartline.name }} {{ cartline.size }}</td>\r\n              <td class=\"finalize-payment-error__amount--old\">\r\n                {{ cartline.oldQuantity }}\r\n              </td>\r\n              <td class=\"finalize-payment-error__amount--new\">\r\n                {{ cartline.newQuantity }}\r\n              </td>\r\n            </tr>\r\n          </tbody>\r\n        </table>\r\n        <div class=\"finalize-payment-error__details\">\r\n          <div\r\n            v-if=\"\r\n              paymentInformationStore.cartContentChangedPaymentContent\r\n                ?.itemCount\r\n            \"\r\n          >\r\n            {{ $t(\"newShippingCost\") }}:\r\n            <span class=\"finalize-payment-error__price\">\r\n              {{\r\n                formatWithoutRounding(\r\n                  paymentInformationStore.cartContentChangedPaymentContent\r\n                    ?.shippingTotal,\r\n                )\r\n              }}\r\n            </span>\r\n          </div>\r\n          <div\r\n            v-if=\"\r\n              paymentInformationStore.cartContentChangedPaymentContent\r\n                ?.itemCount\r\n            \"\r\n          >\r\n            {{ $t(\"newTotal\") }}:\r\n            <span class=\"finalize-payment-error__price\">\r\n              {{\r\n                formatWithoutRounding(\r\n                  paymentInformationStore.cartContentChangedPaymentContent\r\n                    ?.cartTotal,\r\n                )\r\n              }}\r\n            </span>\r\n          </div>\r\n        </div>\r\n        <div class=\"finalize-payment-error__actions\">\r\n          <button\r\n            v-if=\"\r\n              paymentInformationStore.cartContentChangedPaymentContent\r\n                ?.itemCount\r\n            \"\r\n            class=\"btn btn--profile finalize-payment-error__action\"\r\n          >\r\n            {{ $t(\"proceedToPayment\") }}\r\n          </button>\r\n          <a\r\n            v-if=\"\r\n              !paymentInformationStore.cartContentChangedPaymentContent\r\n                ?.itemCount\r\n            \"\r\n            :href=\"getOrigin()\"\r\n            class=\"btn btn--profile finalize-payment-error__action\"\r\n          >\r\n            {{ $t(\"goToStartpage\") }}\r\n          </a>\r\n          <a :href=\"getHref()\" class=\"btn finalize-payment-error__action\">{{\r\n            $t(\"goToShoppingcart\")\r\n          }}</a>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </dialog>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { AfterPayInstallmentInfo } from \"../../utils/API/Payment/paymentAPISchema\";\r\n\r\nconst props = defineProps<{\r\n  installment?: AfterPayInstallmentInfo;\r\n}>();\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <h3 v-if=\"props.installment\">{{ props.installment.heading }}</h3>\r\n    <ul>\r\n      <li v-if=\"props.installment\">\r\n        <span>{{ $t(\"afterpayMontlycost\") }}: </span\r\n        ><span>{{ props.installment.installmentAmount }}</span>\r\n      </li>\r\n      <li v-if=\"props.installment\">\r\n        <span>{{ $t(\"afterpayInterest\") }}: </span>\r\n        <span>{{ props.installment.interestRate }}</span>\r\n      </li>\r\n      <li v-if=\"props.installment\">\r\n        <span>{{ $t(\"afterpayStartupfee\") }}: </span>\r\n        <span>{{ props.installment.startupFee }}</span>\r\n      </li>\r\n      <li v-if=\"props.installment\">\r\n        <span>{{ $t(\"afterpayMonthlyfee\") }}: </span>\r\n        <span>{{ props.installment.monthlyFee }}</span>\r\n      </li>\r\n      <li v-if=\"props.installment\">\r\n        <span>{{ $t(\"afterpayYearlyinterest\") }}: </span>\r\n        <span>{{ props.installment.effectiveAnnualPercentageRate }}</span>\r\n      </li>\r\n      <li v-if=\"props.installment\">\r\n        <span>{{ $t(\"afterpayTotalcost\") }}: </span>\r\n        <span>{{ props.installment.totalAmount }}</span>\r\n      </li>\r\n    </ul>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport {\r\n  PaymentMethodViewModel,\r\n  PersonIdentifierSchema,\r\n  SelectListItem,\r\n} from \"../../utils/API/Payment/paymentAPISchema\";\r\nimport {\r\n  logoNameForPaymentMethod,\r\n  paymentClass,\r\n  AfterpayMethods,\r\n  hasAfterpayInstallmentInfo,\r\n} from \"../../../../helpers/checkoutHelpers\";\r\nimport ShoppingCartError from \"../shoppingCart/shoppingCartError.vue\";\r\nimport FormInput from \"../form/formInput.vue\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { ref, onMounted } from \"vue\";\r\nimport { CheckoutSteps } from \"../../services/models/checkout.models\";\r\nimport Combobox from \"../../components/combobox/Combobox.vue\";\r\nimport AfterpayAccountInfo from \"./afterpayAccountInfo.vue\";\r\nimport FinalizePaymentError from \"./finalizePaymentError.vue\";\r\nimport AfterpayInstallment from \"./afterpayInstallment.vue\";\r\nimport { ComboboxOptionModel } from \"../../services/models/combobox.models\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport { usePaymentInformationStore } from \"./stores/paymentInformationStore\";\r\nimport { useCheckoutStateStore } from \"./stores/checkoutStateStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\n\r\nconst props = defineProps<{\r\n  isActive: boolean;\r\n}>();\r\n\r\nconst paymentInformationStore = usePaymentInformationStore();\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst submitContainerElement = ref<HTMLElement>();\r\nconst finalizePaymentErrorElement = ref<HTMLDialogElement>();\r\n\r\nconst submitForm = (): void => {\r\n  CheckoutService.goToCheckoutStep(CheckoutSteps.FinalizeOrder);\r\n};\r\n\r\nconst handleSetPaymentOption = (\r\n  paymentMethod: PaymentMethodViewModel,\r\n): void => {\r\n  if (!paymentMethod.afterPayViewModel?.installmentInfo) {\r\n    paymentInformationStore.setSelectedPaymentMethod(paymentMethod);\r\n    return;\r\n  }\r\n\r\n  paymentInformationStore.setSelectedPaymentMethod(paymentMethod);\r\n  paymentInformationStore.setSelectedAfterPayInstallmentOption(\r\n    AfterpayMethods.Account,\r\n  );\r\n  paymentInformationStore.setSelectedAfterPayInstallmentPlan(\r\n    Object.values(\r\n      paymentMethod?.afterPayViewModel?.installmentInfo?.installmentInfoItems,\r\n    )?.[0],\r\n  );\r\n};\r\n\r\n/**\r\n * Handles the blur event for the person identifier input field.\r\n * Validates that the person identifier is 11 characters long using zod.\r\n */\r\nconst handlePersonIdentifierBlur = (path: string): void => {\r\n  const validationResult = PersonIdentifierSchema.safeParse(\r\n    paymentInformationStore.personIdentifier,\r\n  );\r\n\r\n  if (validationResult.success) {\r\n    paymentInformationStore.setError(path, []);\r\n    return;\r\n  }\r\n\r\n  const pathRelatedErrors = validationResult.error.errors.filter(\r\n    (error) => error.path.toString() === path || [],\r\n  );\r\n\r\n  const errorMessages = pathRelatedErrors.map((error) => error.message);\r\n  paymentInformationStore.setError(path, errorMessages);\r\n};\r\n\r\nconst handleSetSelectedAfterpayMethod = (method: string): void => {\r\n  paymentInformationStore.setSelectedAfterPayInstallmentOption(method);\r\n};\r\n\r\n/**\r\n * Generates an array of combobox options based on the provided payment method.\r\n * If the payment method does not have any installment info, an empty array is returned.\r\n *\r\n * @param {PaymentMethodViewModel} paymentMethod - The payment method object.\r\n * @returns {Array<ComboboxOptionModel>} - An array of combobox options.\r\n */\r\nconst comboboxOptions = (\r\n  paymentMethod: PaymentMethodViewModel,\r\n): Array<ComboboxOptionModel> => {\r\n  return (\r\n    paymentMethod.afterPayViewModel?.installmentInfo?.installmentListItems?.map(\r\n      (listItem: SelectListItem) => ({\r\n        heading: listItem.text || \"\",\r\n        id: listItem.value,\r\n      }),\r\n    ) || []\r\n  );\r\n};\r\n\r\nconst setSelectedAfterpayInstallmentPlanByValue = (value: string): void => {\r\n  paymentInformationStore.setSelectedAfterpayInstallmentPlanByValue(value);\r\n};\r\n\r\nonMounted(() => {\r\n  if (submitContainerElement.value) {\r\n    autoAnimate(submitContainerElement.value);\r\n  }\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div\r\n      v-if=\"!props.isActive && paymentInformationStore.selectedPaymentMethod\"\r\n      class=\"checkout-form__inactive\"\r\n    >\r\n      <div v-if=\"paymentInformationStore.selectedPaymentMethod\">\r\n        <span>{{ paymentInformationStore.selectedPaymentMethod.name }}</span>\r\n      </div>\r\n    </div>\r\n    <form\r\n      v-if=\"props.isActive && paymentInformationStore.paymentMethods\"\r\n      class=\"checkout-form checkout-delivery\"\r\n      novalidate\r\n      @submit.prevent=\"submitForm\"\r\n    >\r\n      <fieldset>\r\n        <legend>{{ $t(\"paymentMethods\") }}</legend>\r\n        <div\r\n          v-for=\"paymentMethod in paymentInformationStore.paymentMethods\"\r\n          :key=\"paymentMethod.id\"\r\n          class=\"checkout-form__radio\"\r\n        >\r\n          <label class=\"checkout-form__label\" :for=\"paymentMethod.id\">\r\n            <input\r\n              :id=\"paymentMethod.id\"\r\n              type=\"radio\"\r\n              name=\"delivery-method\"\r\n              :checked=\"\r\n                paymentMethod.systemKeyword ===\r\n                paymentInformationStore.selectedPaymentMethod?.systemKeyword\r\n              \"\r\n              @click=\"handleSetPaymentOption(paymentMethod)\"\r\n            />\r\n            <div class=\"checkout-form__radio-heading\">\r\n              {{ paymentMethod.name }}\r\n            </div>\r\n            <div\r\n              class=\"checkout-form__radio-content checkout-payment__installment-selection\"\r\n            >\r\n              <div class=\"checkout-form__radio-description\">\r\n                <div>\r\n                  <span v-if=\"paymentMethod.description\">\r\n                    {{ paymentMethod.description }}\r\n                  </span>\r\n                </div>\r\n                <Icon\r\n                  v-if=\"logoNameForPaymentMethod(paymentMethod.imageId)\"\r\n                  :type=\"logoNameForPaymentMethod(paymentMethod.imageId)\"\r\n                  :title=\"`${paymentMethod.name} logo`\"\r\n                  size=\"delivery-logo\"\r\n                  class=\"checkout-delivery-icon checkout-delivery-icon--porterbuddy\"\r\n                />\r\n              </div>\r\n              <fieldset\r\n                v-if=\"\r\n                  paymentMethod.systemKeyword ===\r\n                    paymentInformationStore.selectedPaymentMethod\r\n                      ?.systemKeyword &&\r\n                  paymentInformationStore.selectedPaymentMethod\r\n                    ?.isAfterPayInstallment\r\n                \"\r\n                class=\"\"\r\n              >\r\n                <legend>{{ $t(\"selectAfterpayMethod\") }}</legend>\r\n                <div\r\n                  class=\"checkout-form__radio\"\r\n                  @click=\"\r\n                    handleSetSelectedAfterpayMethod(AfterpayMethods.Account)\r\n                  \"\r\n                >\r\n                  <label\r\n                    class=\"checkout-form__label\"\r\n                    :for=\"AfterpayMethods.Account\"\r\n                  >\r\n                    <input\r\n                      :id=\"AfterpayMethods.Account\"\r\n                      type=\"radio\"\r\n                      name=\"afterpay-method\"\r\n                      :checked=\"\r\n                        paymentInformationStore.selectedAfterPayInstallmentOption ===\r\n                        AfterpayMethods.Account\r\n                      \"\r\n                      :value=\"AfterpayMethods.Account\"\r\n                    />\r\n                    <div class=\"checkout-form__radio-heading\">\r\n                      {{ $t(\"afterpayAccountlabel\") }}\r\n                    </div>\r\n                    <div class=\"checkout-form__radio-content\">\r\n                      <AfterpayAccountInfo\r\n                        v-if=\"\r\n                          paymentInformationStore.selectedPaymentMethod\r\n                            ?.afterPayViewModel?.accountInfo\r\n                        \"\r\n                        class=\"checkout-payment__afterpay-account-info\"\r\n                        :account-info=\"\r\n                          paymentInformationStore.selectedPaymentMethod\r\n                            ?.afterPayViewModel?.accountInfo\r\n                        \"\r\n                      >\r\n                      </AfterpayAccountInfo>\r\n                    </div>\r\n                  </label>\r\n                </div>\r\n                <div\r\n                  v-if=\"\r\n                    hasAfterpayInstallmentInfo(\r\n                      paymentInformationStore.selectedPaymentMethod,\r\n                    )\r\n                  \"\r\n                  class=\"checkout-form__radio\"\r\n                  @click=\"\r\n                    handleSetSelectedAfterpayMethod(AfterpayMethods.Installment)\r\n                  \"\r\n                >\r\n                  <label\r\n                    class=\"checkout-form__label\"\r\n                    :for=\"AfterpayMethods.Installment\"\r\n                  >\r\n                    <input\r\n                      :id=\"AfterpayMethods.Installment\"\r\n                      type=\"radio\"\r\n                      name=\"afterpay-method\"\r\n                      :value=\"AfterpayMethods.Installment\"\r\n                      :checked=\"\r\n                        paymentInformationStore.selectedAfterPayInstallmentOption ===\r\n                        AfterpayMethods.Installment\r\n                      \"\r\n                    />\r\n                    <div class=\"checkout-form__radio-heading\">\r\n                      {{ $t(\"afterpayInstallmentlabel\") }}\r\n                    </div>\r\n                    <div class=\"checkout-form__radio-content\">\r\n                      <Combobox\r\n                        @update:modelValue=\"\r\n                          setSelectedAfterpayInstallmentPlanByValue\r\n                        \"\r\n                        heading=\"Velg nedbetalingsløsning\"\r\n                        :hide-heading=\"true\"\r\n                        :options=\"\r\n                          comboboxOptions(\r\n                            paymentInformationStore.selectedPaymentMethod,\r\n                          )\r\n                        \"\r\n                        :selected-id=\"\r\n                          paymentInformationStore.selectedAfterPayInstallmentPlanId\r\n                        \"\r\n                      ></Combobox>\r\n                      <AfterpayInstallment\r\n                        class=\"checkout-payment__afterpay-installment-info\"\r\n                        :installment=\"\r\n                          paymentInformationStore.selectedAfterPayInstallmentPlan\r\n                        \"\r\n                      ></AfterpayInstallment>\r\n                    </div>\r\n                  </label>\r\n                </div>\r\n              </fieldset>\r\n              <div\r\n                v-if=\"\r\n                  paymentMethod.requirePersonIdentifier &&\r\n                  paymentMethod.systemKeyword ===\r\n                    paymentInformationStore.selectedPaymentMethod?.systemKeyword\r\n                \"\r\n                :class=\"paymentClass(paymentMethod.id)\"\r\n              >\r\n                <FormInput\r\n                  v-model=\"paymentInformationStore.personIdentifier\"\r\n                  label=\"Fødselsnummer\"\r\n                  label-class=\"checkout-payment__person-identifier\"\r\n                  type=\"tel\"\r\n                  :required=\"true\"\r\n                  autocomplete=\"off\"\r\n                  pattern=\"\\d{11}\"\r\n                  :autofocus=\"true\"\r\n                  :error=\"paymentInformationStore.errors.personIdentifier[0]\"\r\n                  :display-required-error=\"true\"\r\n                  :max-length=11\r\n                  @blur=\"() => handlePersonIdentifierBlur('personIdentifier')\"\r\n                />\r\n                <p\r\n                  v-if=\"paymentMethod.disclaimer\"\r\n                  class=\"checkout-payment__disclaimer\"\r\n                  v-html=\"paymentMethod.disclaimer\"\r\n                ></p>\r\n              </div>\r\n            </div>\r\n          </label>\r\n        </div>\r\n      </fieldset>\r\n      <div class=\"checkout-payment__submit\" ref=\"submitContainerElement\">\r\n        <ShoppingCartError\r\n          v-if=\"paymentInformationStore.errors.finalizeOrder.length\"\r\n          ref=\"submitErrrorElement\"\r\n          class=\"checkout-payment__submit-error\"\r\n          type=\"global\"\r\n          :error-is-html=\"true\"\r\n          :error=\"paymentInformationStore.errors.finalizeOrder[0]\"\r\n        />\r\n        <button\r\n          :disabled=\"checkoutStateStore.isLoading\"\r\n          class=\"btn btn--profile btn--checkout\"\r\n          type=\"submit\"\r\n        >\r\n          <Icon\r\n            v-if=\"checkoutStateStore.isLoading\"\r\n            type=\"spinner\"\r\n            size=\"tiny\"\r\n            class=\"icon--spinner\"\r\n          ></Icon>\r\n          <span v-if=\"checkoutStateStore.isLoading\">{{ $t(\"loading\") }}</span>\r\n          <span v-if=\"!checkoutStateStore.isLoading\">{{\r\n            $t(\"finalizeOrder\")\r\n          }}</span>\r\n        </button>\r\n        <FinalizePaymentError\r\n          ref=\"finalizePaymentErrorElement\"\r\n          :visible=\"paymentInformationStore.showCartContentChangedPaymentError\"\r\n          :error-details=\"\r\n            paymentInformationStore.cartContentChangedPaymentContent\r\n          \"\r\n        />\r\n      </div>\r\n    </form>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, onMounted, computed, watch, nextTick } from \"vue\";\r\nimport { HeadingLevel } from \"../accordion/accordionSchema\";\r\nimport { CheckoutStages, CheckoutStep } from \"../../services/models/checkout.models\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { useCheckoutStateStore } from \"./stores/checkoutStateStore\";\r\nimport { sentenceCase } from \"../../../../helpers/checkoutHelpers\";\r\n\r\nconst OFFSET_TO_SHOW_PREVIOUSLY_COMPLETED_STEP = 300 as const;\r\n\r\nconst props = defineProps<{\r\n  headingLevel?: HeadingLevel;\r\n  headingClass?: string;\r\n  containerClass?: string;\r\n  stepClass?: string;\r\n  steps: Array<CheckoutStep>;\r\n  completedSteps?: Array<CheckoutStep>;\r\n  activeStep: CheckoutStep;\r\n}>();\r\n\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst stepElements = ref();\r\n\r\n/**\r\n * Watches the `activeStep` prop for changes and scrolls to the new active step.\r\n *\r\n * @param {Function} callback - The callback function to execute when the `activeStep` prop changes.\r\n * @param {any} newActiveStep - The new value of the `activeStep` prop.\r\n * @param {any} oldActiveStep - The previous value of the `activeStep` prop.\r\n */\r\nwatch(\r\n  () => props.activeStep,\r\n  (newActiveStep, oldActiveStep) => {\r\n    if (newActiveStep !== oldActiveStep) scrollToStep(newActiveStep);\r\n  },\r\n);\r\n\r\nconst headingLevelWithDefault = computed(() => props.headingLevel ?? \"h2\");\r\n\r\n/**\r\n * Scrolls to the specified checkout step.\r\n *\r\n * @param {CheckoutStep} step - The checkout step to scroll to.\r\n */\r\nconst scrollToStep = (\r\n  step: CheckoutStep,\r\n  scrollBehavior: ScrollBehavior = \"smooth\",\r\n) => {\r\n  const stepElement = stepElements.value[\r\n    props.steps.indexOf(step)\r\n  ] as HTMLElement;\r\n\r\n  if (stepElement) {\r\n    nextTick(() =>\r\n      window.scrollTo({\r\n        top: stepElement.offsetTop - OFFSET_TO_SHOW_PREVIOUSLY_COMPLETED_STEP,\r\n        behavior: scrollBehavior,\r\n      }),\r\n    );\r\n  }\r\n};\r\n\r\n/**\r\n * Determines whether to display the edit button for a given step.\r\n * The edit button is displayed if the step is not the active step and\r\n * if the step has been completed.\r\n *\r\n * @param {number} step - The step to check.\r\n * @returns {boolean} - True if the edit button should be displayed, false otherwise.\r\n */\r\nconst displayEditButton = (step) => {\r\n  return (\r\n    props.activeStep != step &&\r\n    props.completedSteps &&\r\n    props.completedSteps.includes(step)\r\n  );\r\n};\r\n\r\n/**\r\n * Returns a string that combines the number indicator and the checkout step.\r\n *\r\n * @param {number} numberIndicator - The number indicator for the step.\r\n * @param {CheckoutStep} step - The checkout step.\r\n * @returns {string} - The combined string of the number indicator and the step.\r\n */\r\nconst buttonHeading = (numberIndicator: number, step: CheckoutStep) => {\r\n  return `${numberIndicator}. ${step}`;\r\n};\r\n\r\nconst handleClick = (step: CheckoutStep) => {\r\n  checkoutStateStore.setToCheckoutStep(step);\r\n};\r\n\r\nconst goToShoppingCart = () => {\r\n  checkoutStateStore.setCheckoutStage(CheckoutStages.ShoppingCart);\r\n}\r\n\r\nonMounted(() => {\r\n  if (props.activeStep) scrollToStep(props.activeStep, \"auto\");\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div :class=\"props.containerClass\">\r\n    <div class=\"layout-new-checkout__primary-content\">\r\n      <div class=\"checkout-feedback checkout-feedback--line-item\" v-if=\"checkoutStateStore.newItemsAfterVerification?.length\">\r\n        <div class=\"u-text-left\">\r\n          <Icon type=\"info\" size=\"tiny\"/> Handlekurven din har produkter fra en tidligere handel. Sjekk sammendrag eller <button class=\"btn--inline\" @click.prevent=\"goToShoppingCart\">endre i handlekurven</button></div>\r\n        </div>\r\n      <div\r\n        v-for=\"(step, index) in props.steps\"\r\n        ref=\"stepElements\"\r\n        :key=\"index\"\r\n        class=\"checkout-step-selector\"\r\n        :class=\"props.stepClass\"\r\n      >\r\n        <component\r\n          :is=\"headingLevelWithDefault\"\r\n          :class=\"[\r\n            props.headingClass,\r\n            {\r\n              'checkout-step-selector__heading--padded':\r\n                !displayEditButton(step),\r\n            },\r\n          ]\"\r\n        >\r\n          <span\r\n            :class=\"{\r\n              'checkout-step-selector__heading-content--padded':\r\n                displayEditButton(step),\r\n            }\"\r\n            >{{ buttonHeading(index + 1, step) }}</span\r\n          >\r\n          <button\r\n            v-if=\"displayEditButton(step)\"\r\n            class=\"checkout-step-selector__edit-step checkout-step-selector__activator\"\r\n            @click=\"handleClick(step)\"\r\n          >\r\n            <Icon type=\"pen\" size=\"checkout-edit\"></Icon>\r\n            <span class=\"checkout-step-selector__edit-text\">{{\r\n              $t(\"change\")\r\n            }}</span>\r\n          </button>\r\n        </component>\r\n        <div v-if=\"props.activeStep\" class=\"checkout-step-selector__content\">\r\n          <slot :name=\"step\"></slot>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed, onMounted, ref } from \"vue\";\r\nimport { formatWithoutRounding } from \"../../mixins/productPrice.mixin\";\r\nimport { Cart } from \"../../utils/API/Cart/cartAPISchema\";\r\nimport { Money } from \"../../services/models/cart.models\";\r\nimport { formatCurrency } from \"../../utils/currencyHelpers\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport ShoppingCartError from \"../shoppingCart/shoppingCartError.vue\";\r\nimport {\r\n  amountNeededToQualifyForFreeShipping,\r\n  shippingCostFormatted,\r\n  qualifiesForFreeShipping,\r\n} from \"../../../../helpers/checkoutHelpers\";\r\nimport { useShoppingCartStore } from \"../shoppingCart/stores/shoppingCartStore\";\r\n\r\nconst props = defineProps<{\r\n  headingClass?: string;\r\n  showCheckoutLink?: boolean;\r\n  checkoutAvailable?: boolean;\r\n  error?: string;\r\n}>();\r\n\r\nconst root = ref();\r\nconst totalList = ref();\r\nconst shoppingCartStore = useShoppingCartStore();\r\n\r\nconst error = computed(() => {\r\n  return props.error;\r\n});\r\n\r\n/**\r\n * Computes whether the shopping cart is eligible for free shipping.\r\n *\r\n * @returns {boolean} True if the shopping cart is eligible for free shipping, false otherwise.\r\n */\r\nconst freeShipping = computed(() => {\r\n  if (!shoppingCartStore.cart) return false;\r\n\r\n  return qualifiesForFreeShipping(\r\n    shoppingCartStore.cart?.freeShippingActive,\r\n    shoppingCartStore.cart?.freeShippingLimit,\r\n    shoppingCartStore.cart?.subTotal,\r\n  );\r\n});\r\n\r\n/**\r\n * Computed property that returns the shipping call to action text.\r\n *\r\n * @returns {string} The shipping call to action text.\r\n */\r\nconst shippingCallToActionText = computed(() => {\r\n  const remainingAmount = amountNeededToQualifyForFreeShipping(\r\n    shoppingCartStore.cart?.freeShippingActive,\r\n    shoppingCartStore.cart?.freeShippingLimit,\r\n    shoppingCartStore.cart?.subTotal,\r\n  )?.amount;\r\n\r\n  if (!remainingAmount) return \"\";\r\n\r\n  return `Du er ${formatWithoutRounding(remainingAmount)} unna fri frakt`;\r\n});\r\n\r\nonMounted(() => {\r\n  autoAnimate(root.value);\r\n  autoAnimate(totalList.value);\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div ref=\"root\" class=\"checkout-summary checkout-summary--checkout\">\r\n    <h2 class=\"checkout-summary__heading sr-only\">{{ $t(\"summary\") }}</h2>\r\n    <ShoppingCartError :error=\"error\" type=\"global\" />\r\n    <div>\r\n      <div\r\n        ref=\"totalList\"\r\n        class=\"checkout-summary__group checkout-summary__group--checkout\"\r\n      >\r\n        <div\r\n          v-if=\"shoppingCartStore.cart?.discountTotal?.amount\"\r\n          class=\"checkout-summary__entry checkout-summary__entry\"\r\n        >\r\n          <div>{{ $t(\"discountTotal\") }}</div>\r\n          <div>\r\n            <span class=\"checkout-summary__discount\"\r\n              >-\r\n              {{\r\n                shoppingCartStore.cart.discountTotal &&\r\n                formatCurrency(shoppingCartStore.cart.discountTotal.currency)\r\n              }}\r\n              {{\r\n                formatWithoutRounding(\r\n                  shoppingCartStore.cart.discountTotal.amount,\r\n                )\r\n              }}</span\r\n            >\r\n          </div>\r\n        </div>\r\n        <div\r\n          v-if=\"shoppingCartStore.cart?.total?.amount\"\r\n          class=\"checkout-summary__entry checkout-summary__entry\"\r\n        >\r\n          <div>{{ $t(\"shipping\") }}</div>\r\n          <div>\r\n            <span>{{ shoppingCartStore.shippingCostFormatted }}</span>\r\n          </div>\r\n        </div>\r\n        <div\r\n          v-if=\"shoppingCartStore.cart && !freeShipping\"\r\n          class=\"checkout-summary__entry checkout-summary__entry--gray\"\r\n        >\r\n          <div class=\"checkout-summary__shipping-tip\">\r\n            {{ shippingCallToActionText }}\r\n          </div>\r\n        </div>\r\n      </div>\r\n      <h4 class=\"checkout-summary__total\">\r\n        <span>{{ $t(\"total\") }}: </span>\r\n        <span\r\n          >{{\r\n            shoppingCartStore.cart?.total &&\r\n            formatCurrency(shoppingCartStore.cart.total.currency)\r\n          }}\r\n          {{\r\n            shoppingCartStore.cart?.total &&\r\n            formatWithoutRounding(shoppingCartStore.totalAmount)\r\n          }}</span\r\n        >\r\n      </h4>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, onMounted, computed } from \"vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport { HeadingLevel } from \"./accordionSchema\";\r\n\r\nconst accordion = ref();\r\nconst icon = ref();\r\nconst expanded = ref(false);\r\n\r\nconst props = defineProps<{\r\n  heading: string;\r\n  headingSecondPart?: string;\r\n  headingLevel?: HeadingLevel;\r\n  headingClass?: string;\r\n  hideIcon?: boolean;\r\n  extraClass?: string;\r\n}>();\r\n\r\nconst headingLevelWithDefault = computed(() => props.headingLevel ?? \"h2\");\r\n\r\nonMounted(() => {\r\n  autoAnimate(accordion.value);\r\n});\r\n\r\nconst expandedAttribute = computed(() => ({\r\n  expanded: expanded.value,\r\n  collapsed: !expanded.value,\r\n}));\r\n</script>\r\n\r\n<template>\r\n  <div\r\n    ref=\"accordion\"\r\n    class=\"accordion-new\"\r\n    :class=\"[expandedAttribute, props.extraClass]\"\r\n  >\r\n    <component :is=\"headingLevelWithDefault\" :class=\"props.headingClass\">\r\n      <button\r\n        :aria-expanded=\"expanded ? 'true' : 'false'\"\r\n        class=\"accordion-new__activator\"\r\n        @click=\"expanded = !expanded\"\r\n      >\r\n        <div class=\"accordion-new__heading-container\">\r\n          <span>{{ props.heading }}</span>\r\n          <span v-if=\"props.headingSecondPart\">{{\r\n            props.headingSecondPart\r\n          }}</span>\r\n        </div>\r\n        <Icon\r\n          v-if=\"!props.hideIcon\"\r\n          ref=\"icon\"\r\n          class=\"accordion-new__icon\"\r\n          size=\"accordion\"\r\n          type=\"chevron\"\r\n        ></Icon>\r\n      </button>\r\n    </component>\r\n    <div v-if=\"expanded\" class=\"accordion-new__content\">\r\n      <slot></slot>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { AddressModel, Cart } from \"../../utils/API/Cart/cartAPISchema\";\r\nimport ShoppingCartSummary from \"../shoppingCart/shoppingCartSummary.vue\";\r\nimport {\r\n  CheckoutSteps,\r\n  CheckoutStep,\r\n} from \"../../services/models/checkout.models\";\r\nimport CustomerInformationForm from \"./customerInformationForm.vue\";\r\nimport DeliveryInformationForm from \"./deliveryInformationForm.vue\";\r\nimport PaymentInformationForm from \"./paymentInformationForm.vue\";\r\nimport CheckoutStepSelector from \"./checkoutStepSelector.vue\";\r\nimport CheckoutSummary from \"./checkoutSummary.vue\";\r\nimport { onMounted, computed, reactive, ref, watch, toRefs } from \"vue\";\r\nimport { formatWithoutRounding } from \"../../mixins/productPrice.mixin\";\r\nimport Accordion from \"../accordion/accordion.vue\";\r\nimport { useCustomerInformationStore } from \"./stores/customerInformationStore\";\r\nimport { useCheckoutStateStore } from \"./stores/checkoutStateStore\";\r\nimport { useDeliveryInformationStore } from \"./stores/deliveryInformationStore\";\r\nimport { usePaymentInformationStore } from \"./stores/paymentInformationStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\nimport { useShoppingCartStore } from \"../shoppingCart/stores/shoppingCartStore\";\r\nimport LineItem from \"../shoppingCart/lineItem.vue\";\r\n\r\nconst customerInformationStore = useCustomerInformationStore();\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst deliveryInformationStore = useDeliveryInformationStore();\r\nconst paymentInformationStore = usePaymentInformationStore();\r\nconst shoppingCartStore = useShoppingCartStore();\r\n\r\nconst props = defineProps<{\r\n  cart?: Cart;\r\n  customerInformation?: AddressModel;\r\n}>();\r\n\r\nconst deliveryInformationStoreRef = toRefs(deliveryInformationStore);\r\n\r\nconst steps: Array<CheckoutStep> = [\r\n  CheckoutSteps.CustomerInformation,\r\n  CheckoutSteps.Delivery,\r\n  CheckoutSteps.Payment,\r\n];\r\n\r\nconst completedSteps = computed(() => {\r\n  return [\r\n    ...(customerInformationStore.fields\r\n      ? [CheckoutSteps.CustomerInformation]\r\n      : []),\r\n    ...(deliveryInformationStore.deliveryInformation\r\n      ? [CheckoutSteps.Delivery]\r\n      : []),\r\n    ...(paymentInformationStore.selectedPaymentMethod?.systemKeyword\r\n      ? [CheckoutSteps.Payment]\r\n      : []),\r\n  ];\r\n});\r\n\r\nconst paymentInformationErrors = reactive<Record<string, string[]>>({\r\n  personIdentifier: [],\r\n  selectedAfterPayInstallmentOption: [],\r\n  selectedAfterPayInstallmentPlan: [],\r\n  paymentMethod: [],\r\n  finalizeOrder: [],\r\n});\r\n\r\nexport type PaymentInformationErrorKeyPaymentInformationErrorKey =\r\n  keyof typeof paymentInformationErrors;\r\n\r\nwatch(\r\n  deliveryInformationStoreRef?.selectedDeliveryMethod,\r\n  (oldValue, newValue) => {\r\n    if (!newValue) return;\r\n    CheckoutService.submitDeliveryInformationForm();\r\n  },\r\n);\r\n\r\n/**\r\n * Computed property that generates the top text for the checkout component.\r\n * The top text includes the number of items in the cart and the total price.\r\n *\r\n * @returns {string} The formatted top text for the checkout component.\r\n */\r\nconst itemCountFormatted = computed(() => {\r\n  return `${shoppingCartStore.cart?.itemCount ?? 0} varer`;\r\n});\r\n\r\n/**\r\n * Computes and returns the formatted subtotal of the cart.\r\n *\r\n * @returns {string} The formatted subtotal of the cart.\r\n */\r\nconst subTotalFormatted = computed(() => {\r\n  return (\r\n    shoppingCartStore.cart &&\r\n    formatWithoutRounding(shoppingCartStore.cart.total.amount)\r\n  );\r\n});\r\n\r\nonMounted(() => {\r\n  if (props.customerInformation) {\r\n    customerInformationStore.fields = props.customerInformation;\r\n  }\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div class=\"layout-new-checkout__top\">\r\n      <h1 class=\"sr-only\">Kasse</h1>\r\n      <div\r\n        v-if=\"shoppingCartStore.cart\"\r\n        class=\"layout-new-checkout__top-content\"\r\n      >\r\n        <Accordion\r\n          :heading=\"itemCountFormatted ?? ''\"\r\n          :heading-second-part=\"subTotalFormatted ?? ''\"\r\n          heading-class=\"layout-new-checkout__accordion-heading\"\r\n          extra-class=\"layout-new-checkout__top-content--padded\"\r\n        >\r\n          <CheckoutSummary\r\n            :discount-total=\"shoppingCartStore.cart?.discountTotal\"\r\n            :checkout-available=\"false\"\r\n            :show-checkout-link=\"false\"\r\n          />\r\n        </Accordion>\r\n      </div>\r\n    </div>\r\n    <div class=\"layout-new-checkout\">\r\n      <div class=\"layout-new-checkout__main\">\r\n        <div class=\"layout-new-checkout__vertical-split\">\r\n          <CheckoutStepSelector\r\n            :steps=\"steps\"\r\n            :completed-steps=\"completedSteps\"\r\n            container-class=\"layout-new-checkout__primary\"\r\n            step-class=\"layout-new-checkout__element\"\r\n            heading-class=\"checkout-form__selector-heading\"\r\n            :active-step=\"checkoutStateStore.currentCheckoutStep\"\r\n          >\r\n            <template #[steps[0]]>\r\n              <CustomerInformationForm\r\n                :is-active=\"checkoutStateStore.currentCheckoutStep === steps[0]\"\r\n              />\r\n            </template>\r\n            <template #[steps[1]]>\r\n              <DeliveryInformationForm\r\n                :is-active=\"checkoutStateStore.currentCheckoutStep === steps[1]\"\r\n              />\r\n            </template>\r\n            <template #[steps[2]]>\r\n              <div v-if=\"checkoutStateStore.currentCheckoutStep === steps[2]\">\r\n                <PaymentInformationForm\r\n                  :is-active=\"\r\n                    checkoutStateStore.currentCheckoutStep === steps[2]\r\n                  \"\r\n                >\r\n                </PaymentInformationForm>\r\n              </div>\r\n            </template>\r\n          </CheckoutStepSelector>\r\n          <div\r\n            class=\"layout-new-checkout__secondary layout-new-checkout__secondary--desktop-only\"\r\n          >\r\n            <div class=\"layout-new-checkout__element\">\r\n              <ShoppingCartSummary\r\n                :cart=\"shoppingCartStore.cart\"\r\n                :show-checkout-link=\"false\"\r\n              />\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","import * as z from \"zod\";\r\nimport { FEEDBACK_TEXT } from \"../../validationHelpers\";\r\n\r\nexport const verificationSchema = z.object({\r\n    email: z.string().min(1, { message: FEEDBACK_TEXT().REQUIRED }),\r\n    password: z.string().min(1, { message: FEEDBACK_TEXT().REQUIRED }),\r\n});\r\n\r\nexport const resetPasswordEmailVerificationSchema = z\r\n    .string()\r\n    .trim()\r\n    .toLowerCase()\r\n    .min(1, { message: FEEDBACK_TEXT().PASSWORD_RESET_EMAIL_REQUIRED })\r\n    .email({ message: FEEDBACK_TEXT().PASSWORD_RESET_EMAIL_INVALID });\r\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n  (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n    ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n    : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  )\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    const arr = new Uint8Array(1)\n    const proto = { foo: function () { return 42 } }\n    Object.setPrototypeOf(proto, Uint8Array.prototype)\n    Object.setPrototypeOf(arr, proto)\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n})\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  const buf = new Uint8Array(length)\n  Object.setPrototypeOf(buf, Buffer.prototype)\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayView(value)\n  }\n\n  if (value == null) {\n    throw new TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof SharedArrayBuffer !== 'undefined' &&\n      (isInstance(value, SharedArrayBuffer) ||\n      (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  const valueOf = value.valueOf && value.valueOf()\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  const b = fromObject(value)\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n  assertSize(size)\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  const length = byteLength(string, encoding) | 0\n  let buf = createBuffer(length)\n\n  const actual = buf.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual)\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  const length = array.length < 0 ? 0 : checked(array.length) | 0\n  const buf = createBuffer(length)\n  for (let i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255\n  }\n  return buf\n}\n\nfunction fromArrayView (arrayView) {\n  if (isInstance(arrayView, Uint8Array)) {\n    const copy = new Uint8Array(arrayView)\n    return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n  }\n  return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  let buf\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array)\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset)\n  } else {\n    buf = new Uint8Array(array, byteOffset, length)\n  }\n\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(buf, Buffer.prototype)\n\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    const len = checked(obj.length) | 0\n    const buf = createBuffer(len)\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len)\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  let x = a.length\n  let y = b.length\n\n  for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  let i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  const buffer = Buffer.allocUnsafe(length)\n  let pos = 0\n  for (i = 0; i < list.length; ++i) {\n    let buf = list[i]\n    if (isInstance(buf, Uint8Array)) {\n      if (pos + buf.length > buffer.length) {\n        if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n        buf.copy(buffer, pos)\n      } else {\n        Uint8Array.prototype.set.call(\n          buffer,\n          buf,\n          pos\n        )\n      }\n    } else if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    } else {\n      buf.copy(buffer, pos)\n    }\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  const len = string.length\n  const mustMatch = (arguments.length > 2 && arguments[2] === true)\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  let loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  const i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  const len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (let i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  const len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (let i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  const len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (let i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  const length = this.length\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  let str = ''\n  const max = exports.INSPECT_MAX_BYTES\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n  if (this.length > max) str += ' ... '\n  return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength)\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  let x = thisEnd - thisStart\n  let y = end - start\n  const len = Math.min(x, y)\n\n  const thisCopy = this.slice(thisStart, thisEnd)\n  const targetCopy = target.slice(start, end)\n\n  for (let i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  let indexSize = 1\n  let arrLength = arr.length\n  let valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  let i\n  if (dir) {\n    let foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      let found = true\n      for (let j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  const remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  const strLen = string.length\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  let i\n  for (i = 0; i < length; ++i) {\n    const parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0\n    if (isFinite(length)) {\n      length = length >>> 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  const remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return asciiWrite(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  const res = []\n\n  let i = start\n  while (i < end) {\n    const firstByte = buf[i]\n    let codePoint = null\n    let bytesPerSequence = (firstByte > 0xEF)\n      ? 4\n      : (firstByte > 0xDF)\n          ? 3\n          : (firstByte > 0xBF)\n              ? 2\n              : 1\n\n    if (i + bytesPerSequence <= end) {\n      let secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  const len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  let res = ''\n  let i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  const len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  let out = ''\n  for (let i = start; i < end; ++i) {\n    out += hexSliceLookupTable[buf[i]]\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  const bytes = buf.slice(start, end)\n  let res = ''\n  // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n  for (let i = 0; i < bytes.length - 1; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  const len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  const newBuf = this.subarray(start, end)\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  let val = this[offset + --byteLength]\n  let mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const lo = first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24\n\n  const hi = this[++offset] +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    last * 2 ** 24\n\n  return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const hi = first * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  const lo = this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last\n\n  return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let i = byteLength\n  let mul = 1\n  let val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = this[offset + 4] +\n    this[offset + 5] * 2 ** 8 +\n    this[offset + 6] * 2 ** 16 +\n    (last << 24) // Overflow\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let mul = 1\n  let i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset + 3] = (value >>> 24)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 1] = (value >>> 8)\n  this[offset] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset + 7] = lo\n  lo = lo >> 8\n  buf[offset + 6] = lo\n  lo = lo >> 8\n  buf[offset + 5] = lo\n  lo = lo >> 8\n  buf[offset + 4] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset + 3] = hi\n  hi = hi >> 8\n  buf[offset + 2] = hi\n  hi = hi >> 8\n  buf[offset + 1] = hi\n  hi = hi >> 8\n  buf[offset] = hi\n  return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = 0\n  let mul = 1\n  let sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  let sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 3] = (value >>> 24)\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  const len = end - start\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end)\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      const code = val.charCodeAt(0)\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  } else if (typeof val === 'boolean') {\n    val = Number(val)\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  let i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    const bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding)\n    const len = bytes.length\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n  errors[sym] = class NodeError extends Base {\n    constructor () {\n      super()\n\n      Object.defineProperty(this, 'message', {\n        value: getMessage.apply(this, arguments),\n        writable: true,\n        configurable: true\n      })\n\n      // Add the error code to the name to include it in the stack trace.\n      this.name = `${this.name} [${sym}]`\n      // Access the stack to generate the error message including the error code\n      // from the name.\n      this.stack // eslint-disable-line no-unused-expressions\n      // Reset the name to the actual name.\n      delete this.name\n    }\n\n    get code () {\n      return sym\n    }\n\n    set code (value) {\n      Object.defineProperty(this, 'code', {\n        configurable: true,\n        enumerable: true,\n        value,\n        writable: true\n      })\n    }\n\n    toString () {\n      return `${this.name} [${sym}]: ${this.message}`\n    }\n  }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n  function (name) {\n    if (name) {\n      return `${name} is outside of buffer bounds`\n    }\n\n    return 'Attempt to access memory outside buffer bounds'\n  }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n  function (name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n  }, TypeError)\nE('ERR_OUT_OF_RANGE',\n  function (str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`\n    let received = input\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n      received = addNumericalSeparator(String(input))\n    } else if (typeof input === 'bigint') {\n      received = String(input)\n      if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n        received = addNumericalSeparator(received)\n      }\n      received += 'n'\n    }\n    msg += ` It must be ${range}. Received ${received}`\n    return msg\n  }, RangeError)\n\nfunction addNumericalSeparator (val) {\n  let res = ''\n  let i = val.length\n  const start = val[0] === '-' ? 1 : 0\n  for (; i >= start + 4; i -= 3) {\n    res = `_${val.slice(i - 3, i)}${res}`\n  }\n  return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n  validateNumber(offset, 'offset')\n  if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n    boundsError(offset, buf.length - (byteLength + 1))\n  }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n  if (value > max || value < min) {\n    const n = typeof min === 'bigint' ? 'n' : ''\n    let range\n    if (byteLength > 3) {\n      if (min === 0 || min === BigInt(0)) {\n        range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n      } else {\n        range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n                `${(byteLength + 1) * 8 - 1}${n}`\n      }\n    } else {\n      range = `>= ${min}${n} and <= ${max}${n}`\n    }\n    throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n  }\n  checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n  if (typeof value !== 'number') {\n    throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n  }\n}\n\nfunction boundsError (value, length, type) {\n  if (Math.floor(value) !== value) {\n    validateNumber(value, type)\n    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n  }\n\n  if (length < 0) {\n    throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n  }\n\n  throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n                                    `>= ${type ? 1 : 0} and <= ${length}`,\n                                    value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0]\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  let codePoint\n  const length = string.length\n  let leadSurrogate = null\n  const bytes = []\n\n  for (let i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  let c, hi, lo\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  let i\n  for (i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n  const alphabet = '0123456789abcdef'\n  const table = new Array(256)\n  for (let i = 0; i < 16; ++i) {\n    const i16 = i * 16\n    for (let j = 0; j < 16; ++j) {\n      table[i16 + j] = alphabet[i] + alphabet[j]\n    }\n  }\n  return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n  return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n  throw new Error('BigInt not supported')\n}\n","import { Buffer } from \"buffer\";\r\nimport { LogErrorResponse } from \"../Logging/LoggingAPI\";\r\n\r\nconst API_URL = \"/api/profile\";\r\n\r\n/**\r\n * Logs in a user with the provided email and password.\r\n * The credentials are sent as a base64 encoded string in the Authorization header\r\n *\r\n * @param email - The user's email.\r\n * @param password - The user's password.\r\n * @returns A promise that resolves to a boolean indicating whether the login was successful.\r\n */\r\nexport async function login(email: string, password: string): Promise<boolean> {\r\n    const url = `${API_URL}/login`;\r\n    const credentials = Buffer.from(`${email}:${password}`).toString(\"base64\");\r\n\r\n    const response = await fetch(url, {\r\n        method: \"POST\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n            Authorization: `Basic ${credentials}`,\r\n        },\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\n/**\r\n * Resets the password for a user.\r\n *\r\n * @param email - The email address of the user.\r\n * @returns A promise that resolves to a boolean indicating whether the password reset was successful.\r\n */\r\nexport async function resetPassword(email: string): Promise<boolean> {\r\n    const url = `${API_URL}/resetpassword`;\r\n    const body = JSON.stringify(email);\r\n\r\n    const response = await fetch(url, {\r\n        method: \"POST\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json\",\r\n        },\r\n        body: body,\r\n    });\r\n\r\n    if (!response.ok) {\r\n        await LogErrorResponse(url, response, body);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n}\r\n","<script lang=\"ts\" setup>\r\nimport { onMounted, reactive, ref } from \"vue\";\r\nimport {\r\n  CheckoutStages,\r\n  VerificationStep,\r\n  VerificationSteps,\r\n} from \"../../services/models/checkout.models\";\r\nimport FormInput from \"../form/formInput.vue\";\r\nimport { USER_FEEDBACK } from \"../../utils/API/APIErrors\";\r\nimport ShoppingCartError from \"../shoppingCart/shoppingCartError.vue\";\r\nimport autoAnimate from \"@formkit/auto-animate\";\r\nimport Icon from \"../icon/icon.vue\";\r\nimport {\r\n  resetPasswordEmailVerificationSchema,\r\n  verificationSchema,\r\n} from \"../../utils/API/Profile/profileAPISchema\";\r\nimport {\r\n  clearErrors,\r\n  setInformationErrors,\r\n} from \"../../../../helpers/checkoutHelpers\";\r\nimport { useCheckoutStateStore } from \"../checkout/stores/checkoutStateStore\";\r\nimport * as CheckoutService from \"../../services/checkout.service\";\r\nimport { login, resetPassword } from \"../../utils/API/Profile/profileAPI\";\r\nimport { apiGetShoppingCart } from \"../../services/checkout.service\";\r\nimport { useShoppingCartStore } from \"../shoppingCart/stores/shoppingCartStore\";\r\n\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst shoppingCartStore = useShoppingCartStore();\r\nconst fieldsetElement = ref<HTMLElement | null>();\r\nconst verificationError = ref<string | undefined>();\r\nconst positiveFeedback = ref<string | undefined>();\r\nconst email = ref(\"\");\r\nconst password = ref(\"\");\r\nconst verificationInformationErrorsElement = ref<HTMLElement>();\r\n\r\nconst verificationInformationErrors = reactive<Record<string, string[]>>({\r\n  email: [],\r\n  password: [],\r\n});\r\n\r\nconst currentVerificationStep = ref<VerificationStep>(\r\n  VerificationSteps.DecideVerificationType,\r\n);\r\n\r\n/**\r\n * Clears the login information error.\r\n */\r\nconst clearLoginInformationError = () => {\r\n  verificationError.value = undefined;\r\n};\r\n\r\n/**\r\n * Clears the positive feedback value.\r\n */\r\nconst clearPositiveFeedback = () => {\r\n  positiveFeedback.value = undefined;\r\n};\r\n\r\n/**\r\n * Performs a login request to the API.\r\n *\r\n * @param {string} email - The user's email address.\r\n * @param {string} password - The user's password.\r\n * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the login was successful.\r\n */\r\nconst apiLogin = async (email: string, password: string): Promise<boolean> => {\r\n  const success = await login(email, password);\r\n  return success;\r\n};\r\n\r\n/**\r\n * Calls the API to reset the password for the specified email.\r\n *\r\n * @param {string} email - The email address for which the password needs to be reset.\r\n * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the password reset was successful.\r\n */\r\nconst apiResetPassword = async (email: string): Promise<boolean> => {\r\n  checkoutStateStore.setIsLoading(true);\r\n\r\n  const success = await resetPassword(email);\r\n\r\n  checkoutStateStore.setIsLoading(false);\r\n  return success;\r\n};\r\n\r\n/**\r\n * Submits the form for verification.\r\n * This will call the API to verify the user's login information.\r\n * If the login is successful, emit an event to go to the next step in the checkout process.\r\n * If the login fails, the user will receive an error message.\r\n *\r\n * @returns {Promise<void>} A promise that resolves when the form is submitted.\r\n */\r\nconst submitForm = async (): Promise<void> => {\r\n  clearErrors(verificationInformationErrors);\r\n  clearPositiveFeedback();\r\n  clearLoginInformationError();\r\n  checkoutStateStore.setIsLoading(true);\r\n\r\n  const validationResult = verificationSchema.safeParse({\r\n    email: email.value,\r\n    password: password.value,\r\n  });\r\n\r\n  if (!validationResult.success && email.value && password.value) {\r\n    verificationError.value = USER_FEEDBACK.LOGIN_FAILED;\r\n  }\r\n\r\n  if (!validationResult.success) {\r\n    setInformationErrors(validationResult.error, verificationInformationErrors);\r\n    checkoutStateStore.setIsLoading(false);\r\n    return;\r\n  }\r\n\r\n  const successfulApiLogin = await apiLogin(email.value, password.value);\r\n  password.value = \"\";\r\n\r\n  if (!successfulApiLogin) {\r\n    verificationError.value = USER_FEEDBACK.LOGIN_FAILED;\r\n    checkoutStateStore.setIsLoading(false);\r\n    return;\r\n  }\r\n\r\n  // If the login is successful, retrieve the shopping cart to ensure that the contents are up to date.\r\n  // Shopping cart contents from the guest session will be merged with the user's shopping cart.\r\n  const newCart = await apiGetShoppingCart();\r\n  if (newCart && shoppingCartStore.cart?.lineItems !== newCart?.lineItems) {\r\n    const items = getItemsAddedFromVerification(shoppingCartStore.cart?.lineItems, newCart.lineItems);\r\n    checkoutStateStore.setNewItemsAfterVerification(items);\r\n  }\r\n\r\n  if (newCart) {\r\n    shoppingCartStore.setCart(newCart);\r\n  }\r\n\r\n  checkoutStateStore.setIsLoading(false);\r\n  CheckoutService.goToCheckoutStageAfterLogin();\r\n};\r\n\r\nconst getItemsAddedFromVerification = (itemsBeforeVerification, itemsAfterVerification) => {\r\n  return itemsAfterVerification\r\n    .map((newItem) => {\r\n      const existingItem = itemsBeforeVerification.find(\r\n        (item) => item.size === newItem.size && item.code === newItem.code\r\n      );\r\n      if (existingItem) {\r\n        return {\r\n          ...newItem,\r\n          quantity: newItem.quantity - existingItem.quantity,\r\n        };\r\n      }\r\n      return newItem;\r\n    })\r\n    .filter((item) => item.quantity > 0);\r\n};\r\n\r\n/**\r\n * Handles the action of proceeding as a guest. This will skip the login step and go directly to the checkout.\r\n */\r\nconst handleProceedAsGuest = () => {\r\n  CheckoutService.goToCheckoutStage(CheckoutStages.Checkout);\r\n};\r\n\r\n/**\r\n * Handles the action to proceed with the login process. This will show the login form.\r\n */\r\nconst handleProceedWithLogin = () => {\r\n  currentVerificationStep.value = VerificationSteps.Login;\r\n};\r\n\r\n/**\r\n * Handles the action of going back to the verification step where the user can decide the verification type.\r\n */\r\nconst handleBackToVerification = () => {\r\n  currentVerificationStep.value = VerificationSteps.DecideVerificationType;\r\n};\r\n\r\n/**\r\n * Handles the reset password event.\r\n * This will call the API to reset the password for the specified email.\r\n * If the reset is successful, the user wilbl receive an email with instructions on how to reset the password.\r\n * If the reset fails, the user will receive an error message.\r\n *\r\n * @param {Event} event - The event object.\r\n * @returns {Promise<void>} - A promise that resolves when the password is reset.\r\n */\r\nconst handleResetPassword = async (): Promise<void> => {\r\n  clearErrors(verificationInformationErrors);\r\n  clearPositiveFeedback();\r\n  clearLoginInformationError();\r\n\r\n  const validationResult = resetPasswordEmailVerificationSchema.safeParse(\r\n    email.value,\r\n  );\r\n\r\n  if (!validationResult.success) {\r\n    verificationInformationErrors.email = validationResult.error.errors.map(\r\n      (error) => error.message,\r\n    );\r\n\r\n    return;\r\n  }\r\n\r\n  const resetSuccessful = await apiResetPassword(email.value);\r\n\r\n  if (!resetSuccessful) {\r\n    verificationError.value = USER_FEEDBACK.RESET_PASSWORD_FAILED;\r\n    return;\r\n  }\r\n\r\n  positiveFeedback.value = USER_FEEDBACK.RESET_PASSWORD_SUCCESS;\r\n};\r\n\r\nonMounted(() => {\r\n  // Ensures that the next step is visible within the viewport\r\n  window.scrollTo(0, 0);\r\n\r\n  if (fieldsetElement.value) {\r\n    autoAnimate(fieldsetElement.value);\r\n  }\r\n\r\n  if (verificationInformationErrorsElement.value) {\r\n    autoAnimate(verificationInformationErrorsElement.value);\r\n  }\r\n\r\n  if (fieldsetElement.value) {\r\n    autoAnimate(fieldsetElement.value);\r\n  }\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <div\r\n      v-if=\"\r\n        currentVerificationStep === VerificationSteps.DecideVerificationType\r\n      \"\r\n    >\r\n      <div class=\"layout-new-checkout layout-new-checkout--white\">\r\n        <div class=\"layout-new-checkout__top layout-new-checkout__top--white\">\r\n          <h1>{{ VerificationSteps.DecideVerificationType }}</h1>\r\n        </div>\r\n        <div class=\"layout-new-checkout__main\">\r\n          <div\r\n            class=\"layout-new-checkout__element layout-new-checkout__element--small layout-new-checkout__element--centered layout-new-checkout__element--verification\"\r\n          >\r\n            <div class=\"layout-new-checkout__loginpath\">\r\n              <div class=\"layout-new-checkout__loginpath-option\">\r\n                <h2>{{ $t(\"withoutProfile\") }}</h2>\r\n                <button\r\n                  class=\"btn btn--profile btn--smaller checkout-form__submit\"\r\n                  @click=\"handleProceedAsGuest\"\r\n                >\r\n                  {{ $t(\"proceedAsGuest\") }}\r\n                </button>\r\n              </div>\r\n              <div class=\"layout-new-checkout__loginpath-option\">\r\n                <h2>{{ $t(\"withProfile\") }}</h2>\r\n                <button\r\n                  class=\"btn btn--white btn--smaller\"\r\n                  @click=\"handleProceedWithLogin\"\r\n                >\r\n                  {{ $t(\"login\") }}\r\n                </button>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <div v-if=\"currentVerificationStep === VerificationSteps.Login\">\r\n      <div class=\"layout-new-checkout layout-new-checkout--white\">\r\n        <div>\r\n          <button\r\n            class=\"btn btn--link layout-new-checkout__back-button\"\r\n            @click=\"handleBackToVerification\"\r\n          >\r\n            <Icon size=\"tiny\" type=\"arrow\"></Icon><span>Tilbake</span>\r\n          </button>\r\n        </div>\r\n        <div class=\"layout-new-checkout__top layout-new-checkout__top--white\">\r\n          <h1>{{ VerificationSteps.Login }}</h1>\r\n        </div>\r\n        <div class=\"layout-new-checkout__main\">\r\n          <div\r\n            class=\"layout-new-checkout__element layout-new-checkout__element--small layout-new-checkout__element--centered layout-new-checkout__element--login\"\r\n          >\r\n            <div class=\"layout-new-checkout__loginpath\">\r\n              <form\r\n                class=\"checkout-form\"\r\n                novalidate\r\n                @submit.prevent=\"submitForm\"\r\n              >\r\n                <fieldset ref=\"fieldsetElement\">\r\n                  <legend>{{ $t(\"loginWithProfile\") }}</legend>\r\n                  <span class=\"layout-new-checkout__verification-text\">{{\r\n                    $t(\"accessBenefits\")\r\n                  }}</span>\r\n                  <div class=\"layout-new-checkout__verification-inputs\">\r\n                    <FormInput\r\n                      v-model=\"email\"\r\n                      input-class=\"checkout-form__input\"\r\n                      :label=\"$t('email')\"\r\n                      label-class=\"checkout-form__label\"\r\n                      type=\"email\"\r\n                      :required=\"true\"\r\n                      :autofocus=\"true\"\r\n                      :error=\"verificationInformationErrors.email[0]\"\r\n                      autocomplete=\"email\"\r\n                      :disabled=\"checkoutStateStore.isLoading\"\r\n                    />\r\n                    <FormInput\r\n                      v-model=\"password\"\r\n                      input-class=\"checkout-form__input\"\r\n                      :label=\"$t('password')\"\r\n                      label-class=\"checkout-form__label\"\r\n                      type=\"password\"\r\n                      :required=\"true\"\r\n                      :error=\"verificationInformationErrors.password[0]\"\r\n                      autocomplete=\"password\"\r\n                      :disabled=\"checkoutStateStore.isLoading\"\r\n                    />\r\n                  </div>\r\n                  <button\r\n                    type=\"button\"\r\n                    class=\"btn btn--link btn--small layout-new-checkout__loginpath-forgotten-password\"\r\n                    @click.prevent.stop=\"() => handleResetPassword()\"\r\n                  >\r\n                    {{ $t(\"forgottenPassword\") }}\r\n                  </button>\r\n                  <ShoppingCartError\r\n                    v-if=\"positiveFeedback\"\r\n                    :error=\"positiveFeedback\"\r\n                    type=\"success\"\r\n                  />\r\n                  <ShoppingCartError :error=\"verificationError\" type=\"global\" />\r\n                  <button\r\n                    :disabled=\"checkoutStateStore.isLoading\"\r\n                    class=\"btn btn--profile btn--smaller\"\r\n                    type=\"submit\"\r\n                  >\r\n                    <Icon\r\n                      v-if=\"checkoutStateStore.isLoading\"\r\n                      type=\"spinner\"\r\n                      size=\"tiny\"\r\n                      class=\"icon--spinner\"\r\n                    ></Icon>\r\n                    <span v-if=\"checkoutStateStore.isLoading\">{{\r\n                      $t(\"loading\")\r\n                    }}</span>\r\n                    <span v-if=\"!checkoutStateStore.isLoading\">{{\r\n                      $t(\"login\")\r\n                    }}</span>\r\n                  </button>\r\n                </fieldset>\r\n              </form>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport { defineProps, onMounted, ref } from \"vue\";\r\nimport ShoppingCart from \"../../components/shoppingCart/shoppingCart.vue\";\r\nimport { CheckoutStages } from \"../../services/models/checkout.models\";\r\nimport {\r\n  Cart,\r\n  PlaceholderAddressModel,\r\n} from \"../../utils/API/Cart/cartAPISchema\";\r\nimport Checkout from \"../../components/checkout/checkout.vue\";\r\nimport Verification from \"../../components/verification/verification.vue\";\r\nimport { useCheckoutStateStore } from \"../../components/checkout/stores/checkoutStateStore\";\r\nimport { useShoppingCartStore } from \"../../components/shoppingCart/stores/shoppingCartStore\";\r\nimport { useFavoritesStore } from \"../../stores/favoritesStore\";\r\nimport { apiGetShoppingCart } from \"../../services/checkout.service\";\r\n\r\nconst props = defineProps<{\r\n  ksps: string | null; // JSON Content from NewCheckoutIndex.cshtml\r\n  oldCheckoutUrl: string | null;\r\n  maxCartSize?: string;\r\n  initialLineItemCount?: string; // Number of line items in the cart when the component is mounted\r\n}>();\r\n\r\nconst checkoutStateStore = useCheckoutStateStore();\r\nconst shoppingCartStore = useShoppingCartStore();\r\nconst favoritesStore = useFavoritesStore();\r\nconst cart = ref<Cart>();\r\nconst customerInformation = ref<PlaceholderAddressModel>();\r\n\r\n/**\r\n * Initializes the shopping cart by setting the loading states for the checkout and upsell stores,\r\n * then fetching the shopping cart and upsell model data from the API.\r\n *\r\n * @async\r\n * @function initShoppingCart\r\n * @returns {Promise<void>} A promise that resolves when the shopping cart and upsell model data have been fetched and the loading states have been updated.\r\n */\r\nconst initShoppingCart = async () => {\r\n  checkoutStateStore.setIsLoading(true);\r\n\r\n  const newCart = await apiGetShoppingCart();\r\n  if (newCart) {\r\n    shoppingCartStore.setCart(newCart);\r\n  }\r\n  checkoutStateStore.setIsLoading(false);\r\n\r\n  if (shoppingCartStore.cart?.isAuthenticated && !favoritesStore.favorites) {\r\n    favoritesStore.getFavorites();\r\n  }\r\n};\r\n\r\nonMounted(() => {\r\n  initShoppingCart();\r\n});\r\n</script>\r\n\r\n<template>\r\n  <div>\r\n    <ShoppingCart\r\n      v-if=\"\r\n        checkoutStateStore.currentCheckoutStage === CheckoutStages.ShoppingCart\r\n      \"\r\n      :ksps=\"props.ksps\"\r\n      :old-checkout-url=\"props.oldCheckoutUrl\"\r\n      :max-cart-size=\"props.maxCartSize\"\r\n      :initial-line-item-count=\"props.initialLineItemCount\"\r\n      :is-quick-add=\"true\"\r\n    />\r\n    <Verification\r\n      v-if=\"\r\n        checkoutStateStore.currentCheckoutStage === CheckoutStages.Verification\r\n      \"\r\n    ></Verification>\r\n    <Checkout\r\n      v-if=\"checkoutStateStore.currentCheckoutStage === CheckoutStages.Checkout\"\r\n      :customer-information=\"customerInformation\"\r\n      :cart=\"cart\"\r\n    />\r\n  </div>\r\n</template>\r\n","<template>\r\n  <div>\r\n    <App v-bind=\"attributes\" />\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nexport default {};\r\n</script>\r\n","<script setup lang=\"ts\">\r\n//Imports here\r\nimport { ref } from \"vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\n\r\n//Dataset means all props are strings for now\r\nconst props = defineProps<{\r\n  inlineStyle?: string;\r\n  modalHeading?: string;\r\n  heading?: string;\r\n  discountCode: string;\r\n  expirationDate: string;\r\n  description?: string;\r\n  image?: string;\r\n}>();\r\n\r\nconst dialog = ref<HTMLDialogElement>();\r\nconst isExpanded = ref<boolean>(false);\r\n\r\nfunction closeDialog() {\r\n  setIsExpanded(false);\r\n  dialog.value?.close();\r\n}\r\n\r\nfunction showDialog() {\r\n  setIsExpanded(true);\r\n  dialog.value?.showModal();\r\n}\r\n\r\nfunction setIsExpanded(expandedState: boolean) {\r\n  isExpanded.value = expandedState;\r\n}\r\n</script>\r\n<template>\r\n  <div>\r\n    <button\r\n      class=\"loyalty-discounts__offer loyalty-discount reset-button\"\r\n      :style=\"inlineStyle\"\r\n      :aria-expanded=\"isExpanded\"\r\n      aria-haspopup=\"dialog\"\r\n      @click=\"showDialog()\"\r\n    >\r\n      <div class=\"loyalty-discount__image-container\">\r\n        <img class=\"loyalty-discount__image\" :src=\"image\" />\r\n      </div>\r\n      <div class=\"loyalty-discount__textcontent\">\r\n        <span class=\"loyalty-discount__category\">{{ $t(\"category\") }}</span>\r\n        <h2 v-html=\"heading\" />\r\n        <span v-if=\"discountCode\" class=\"loyalty-discount__discountcode\"\r\n          >{{ $t(\"discountCode\") }}: <strong>{{ discountCode }}</strong></span\r\n        >\r\n        <span v-if=\"expirationDate\" class=\"loyalty-discount__expiration-date\"\r\n          >{{ $t(\"expires\") }} {{ expirationDate }}</span\r\n        >\r\n      </div>\r\n    </button>\r\n    <dialog ref=\"dialog\" class=\"dialog\">\r\n      <div class=\"dialog__layout\">\r\n        <div class=\"dialog__modal-heading\">\r\n          <h2 v-if=\"modalHeading\">\r\n            {{ modalHeading }}\r\n          </h2>\r\n          <button\r\n            class=\"dialog__close btn btn--icon\"\r\n            :aria-label=\"$t('close').toString()\"\r\n            @click=\"closeDialog()\"\r\n          >\r\n            <Icon type=\"close\" />\r\n          </button>\r\n        </div>\r\n        <div class=\"dialog__contents\">\r\n          <div class=\"loyalty-discount loyalty-discount--in-dialog\">\r\n            <div class=\"loyalty-discounts__offer\">\r\n              <div class=\"loyalty-discount__image-container\">\r\n                <img class=\"loyalty-discount__image\" :src=\"image\" />\r\n              </div>\r\n              <div class=\"loyalty-discount__textcontent\">\r\n                <span class=\"loyalty-discount__category\">\r\n                  {{ $t(\"category\") }}</span\r\n                >\r\n                <h2 v-if=\"heading\" v-html=\"heading\" />\r\n                <span v-if=\"discountCode\" class=\"loyalty-discount__discountcode\"\r\n                  >{{ $t(\"discountCode\") }}:\r\n                  <strong>{{ discountCode }}</strong></span\r\n                >\r\n                <span\r\n                  v-if=\"expirationDate\"\r\n                  class=\"loyalty-discount__expiration-date\"\r\n                  >{{ $t(\"expires\") }} {{ expirationDate }}</span\r\n                >\r\n                <span\r\n                  v-if=\"description\"\r\n                  class=\"loyalty-discount__description\"\r\n                  v-html=\"description\"\r\n                />\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </dialog>\r\n  </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, onMounted } from \"vue\";\r\nimport Icon from \"../../components/icon/icon.vue\";\r\nimport { ProductImageDto } from \"./productImageDto.model\";\r\n\r\nconst SELECTED_THUMBNAIL_CLASS = \"image-zoom__thumbnail-selected\";\r\nconst OVERFLOW_HIDDEN_CLASS = \"u-overflow-hidden\";\r\nconst INTERSECTION_THRESHOLD = 0.2;\r\nconst SCROLL_LOGICAL_POSITION = \"start\";\r\nconst ON_MOUNTED_SCROLL_BEHAVIOR = \"instant\";\r\nconst AFTER_MOUNTED_SCROLL_BEHAVIOR = \"smooth\";\r\nconst FIRST_VIDEO_FRAME_PARAMETER = \"#t=0.1\";\r\n\r\nconst props = defineProps<{\r\n  video: string;\r\n  images: string;\r\n}>();\r\n\r\nconst dialog = ref<HTMLDialogElement>();\r\nconst isExpanded = ref<boolean>(false);\r\nconst imageDtos = ref<Array<ProductImageDto>>();\r\nconst body = ref<HTMLBodyElement | null>();\r\nconst imageThumbnails = ref<Array<HTMLImageElement> | null>();\r\nconst videoThumbnail = ref<HTMLVideoElement | null>();\r\nconst imageElements = ref<Array<HTMLImageElement> | null>();\r\nconst videoElement = ref<HTMLVideoElement | null>();\r\nconst intersectionObserver = ref<IntersectionObserver>();\r\n\r\nconst addIntersectionObservers = () => {\r\n  intersectionObserver.value = new IntersectionObserver(\r\n    (entries) => handleIntersect(entries),\r\n    { threshold: INTERSECTION_THRESHOLD },\r\n  );\r\n\r\n  imageElements.value?.forEach((image) => {\r\n    intersectionObserver.value?.observe(image);\r\n  });\r\n\r\n  videoElement.value && intersectionObserver.value?.observe(videoElement.value);\r\n};\r\n\r\nconst removeIntersectionObservers = () => {\r\n  imageElements.value?.forEach((image) => {\r\n    intersectionObserver.value?.unobserve(image);\r\n  });\r\n\r\n  videoElement.value &&\r\n    intersectionObserver.value?.unobserve(videoElement.value);\r\n};\r\n\r\nconst handleIntersect = (entries: IntersectionObserverEntry[]) => {\r\n  entries.forEach((entry) => {\r\n    if (!entry.isIntersecting) return;\r\n\r\n    if (entry.target instanceof HTMLImageElement) {\r\n      const intersectImage = imageDtos.value?.find(\r\n        (imageDto) =>\r\n          imageDto.source === (entry.target as HTMLImageElement).src,\r\n      );\r\n      if (intersectImage)\r\n        selectImageThumbnail(intersectImage as ProductImageDto);\r\n    }\r\n\r\n    if (entry.target instanceof HTMLVideoElement) {\r\n      selectVideoThumbnail();\r\n    }\r\n  });\r\n};\r\n\r\nconst showDialog = () => {\r\n  dialog.value?.showModal();\r\n  preventBackgroundScroll(true);\r\n  setIsExpanded(true);\r\n\r\n  // If a videoElement exists, it is always the first element to be displayed\r\n  if (videoElement.value) {\r\n    scrollToVideo(ON_MOUNTED_SCROLL_BEHAVIOR);\r\n    selectVideoThumbnail();\r\n  }\r\n\r\n  // If no videoElement exists, display the first image element\r\n  if (!videoElement.value && imageDtos.value) {\r\n    scrollToImage(imageDtos.value[0], ON_MOUNTED_SCROLL_BEHAVIOR);\r\n    selectImageThumbnail(imageDtos.value[0]);\r\n  }\r\n\r\n  addIntersectionObservers();\r\n};\r\n\r\nconst closeDialog = () => {\r\n  dialog.value?.close();\r\n};\r\n\r\nconst handleClose = () => {\r\n  removeIntersectionObservers();\r\n  preventBackgroundScroll(false);\r\n  setIsExpanded(false);\r\n};\r\n\r\nconst setIsExpanded = (expandedState: boolean) => {\r\n  isExpanded.value = expandedState;\r\n};\r\n\r\n// Preventing scroll on body element in order to keep its scrollbar from overlapping the one within the dialog\r\nconst preventBackgroundScroll = (preventScroll: boolean) => {\r\n  if (!body.value) return;\r\n\r\n  preventScroll\r\n    ? body.value.classList.add(OVERFLOW_HIDDEN_CLASS)\r\n    : body.value.classList.remove(OVERFLOW_HIDDEN_CLASS);\r\n};\r\n\r\nconst handleImageThumbnailClick = (image: ProductImageDto) => {\r\n  scrollToImage(image, AFTER_MOUNTED_SCROLL_BEHAVIOR);\r\n};\r\n\r\nconst handleVideoThumbnailClick = () => {\r\n  scrollToVideo(AFTER_MOUNTED_SCROLL_BEHAVIOR);\r\n};\r\n\r\nconst scrollToImage = (\r\n  image: ProductImageDto,\r\n  scrollBehavior: ScrollBehavior = 'smooth',\r\n) => {\r\n  imageElements.value\r\n    ?.find((imageElement) => imageElement.src == image.source)\r\n    ?.scrollIntoView({\r\n      behavior: scrollBehavior,\r\n      block: SCROLL_LOGICAL_POSITION,\r\n    });\r\n};\r\n\r\nconst scrollToVideo = (scrollBehavior: ScrollBehavior = 'smooth') => {\r\n  videoElement.value?.scrollIntoView({\r\n    behavior: scrollBehavior,\r\n    block: SCROLL_LOGICAL_POSITION,\r\n  });\r\n};\r\n\r\nconst selectImageThumbnail = (thumbnail: ProductImageDto) => {\r\n  if (!imageThumbnails.value) return;\r\n\r\n  const selectedThumbnail = imageThumbnails.value.find(\r\n    (imageThumbnail) => imageThumbnail.src === thumbnail.thumbnail,\r\n  );\r\n\r\n  if (selectedThumbnail) {\r\n    selectedThumbnail.classList.add(SELECTED_THUMBNAIL_CLASS);\r\n    selectedThumbnail.setAttribute('aria-current', 'true');\r\n  }\r\n\r\n  resetImageThumbnails(selectedThumbnail);\r\n  resetVideoThumbnail();\r\n};\r\n\r\nconst selectVideoThumbnail = () => {\r\n  if (!videoThumbnail.value) return;\r\n\r\n  videoThumbnail.value.classList.add(SELECTED_THUMBNAIL_CLASS);\r\n  videoThumbnail.value.setAttribute('aria-current', 'false');\r\n\r\n  resetImageThumbnails();\r\n};\r\n\r\nconst resetImageThumbnails = (exception?: HTMLImageElement) => {\r\n  if (!imageThumbnails.value) return;\r\n\r\n  imageThumbnails.value.forEach((thumbnail) => {\r\n    if (thumbnail === exception) return;\r\n\r\n    thumbnail.classList.remove(SELECTED_THUMBNAIL_CLASS);\r\n    thumbnail.ariaCurrent = \"false\";\r\n  });\r\n};\r\n\r\nconst resetVideoThumbnail = () => {\r\n  if (!videoThumbnail.value) return;\r\n\r\n  videoThumbnail.value.classList.remove(SELECTED_THUMBNAIL_CLASS);\r\n  videoThumbnail.value.ariaCurrent = \"false\";\r\n};\r\n\r\nonMounted(() => {\r\n  imageDtos.value = JSON.parse(props.images);\r\n  body.value = document.querySelector(\"body\");\r\n});\r\n</script>\r\n<template v-if=\"imageDtos.value && imageDtos.length\">\r\n  <div>\r\n    <button\r\n      class=\"image-zoom image-zoom__button-trigger\"\r\n      :aria-expanded=\"isExpanded\"\r\n      aria-haspopup=\"dialog\"\r\n      :tooltip=\"$t('highres').toString()\"\r\n      :aria-description=\"$t('highres').toString()\"\r\n      @click=\"showDialog()\"\r\n    >\r\n      <Icon type=\"search\" size=\"tiny\" :title=\"$t('highres').toString()\" />\r\n    </button>\r\n    <dialog\r\n      ref=\"dialog\"\r\n      class=\"dialog dialog--fullscreen\"\r\n      @close=\"handleClose()\"\r\n    >\r\n      <div class=\"dialog__layout\">\r\n        <div class=\"dialog__contents\">\r\n          <button\r\n            class=\"dialog__close dialog__close--fixed btn btn--icon\"\r\n            :aria-label=\"$t('close').toString()\"\r\n            :title=\"$t('close').toString()\"\r\n            @click=\"closeDialog()\"\r\n          >\r\n            <Icon type=\"close\" :title=\"$t('close').toString()\" />\r\n          </button>\r\n          <div class=\"image-zoom image-zoom__dialog-content\">\r\n            <video\r\n              v-if=\"video\"\r\n              ref=\"videoElement\"\r\n              class=\"image-zoom__video\"\r\n              muted=\"true\"\r\n              loop=\"true\"\r\n              playsinline=\"true\"\r\n              autoplay\r\n              :src=\"video\"\r\n              @click=\"closeDialog()\"\r\n            >\r\n              <source :src=\"video\" />\r\n            </video>\r\n            <template v-for=\"image in imageDtos\" :key=\"image.source\">\r\n              <img\r\n                ref=\"imageElements\"\r\n                class=\"image-zoom__image\"\r\n                :src=\"image.source\"\r\n                :alt=\"image.altText\"\r\n                @click=\"closeDialog()\"\r\n              />\r\n            </template>\r\n            <ul class=\"image-zoom__thumbnails\">\r\n              <li v-if=\"video\" class=\"image-zoom__thumbnail-container\">\r\n                <button\r\n                  autofocus\r\n                  :aria-label=\"$t('goToVideo').toString()\"\r\n                  :title=\"$t('goToVideo').toString()\"\r\n                  @click=\"handleVideoThumbnailClick()\"\r\n                >\r\n                  <video\r\n                    ref=\"videoThumbnail\"\r\n                    class=\"image-zoom__thumbnail\"\r\n                    preload=\"metadata\"\r\n                    alt=\"\"\r\n                  >\r\n                    <source :src=\"video + FIRST_VIDEO_FRAME_PARAMETER\" />\r\n                  </video>\r\n                </button>\r\n              </li>\r\n              <template v-for=\"(image, index) in imageDtos\" :key=\"image.thumbnail\">\r\n                <li class=\"image-zoom__thumbnail-container\">\r\n                  <button\r\n                    :autofocus=\"index == 0 && !video\"\r\n                    :aria-label=\"`${$t('goToImage')} ${index + 1}`\"\r\n                    :title=\"`${$t('goToImage')} ${index + 1}`\"\r\n                    @click=\"handleImageThumbnailClick(image)\"\r\n                  >\r\n                    <img\r\n                      ref=\"imageThumbnails\"\r\n                      class=\"image-zoom__thumbnail\"\r\n                      :src=\"image.thumbnail\"\r\n                      alt=\"\"\r\n                    />\r\n                  </button>\r\n                </li>\r\n              </template>\r\n            </ul>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </dialog>\r\n  </div>\r\n</template>\r\n","/*!\n  * shared v9.14.0\n  * (c) 2024 kazuya kawaguchi\n  * Released under the MIT License.\n  */\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst inBrowser = typeof window !== 'undefined';\nlet mark;\nlet measure;\nif ((process.env.NODE_ENV !== 'production')) {\n    const perf = inBrowser && window.performance;\n    if (perf &&\n        perf.mark &&\n        perf.measure &&\n        perf.clearMarks &&\n        // @ts-ignore browser compat\n        perf.clearMeasures) {\n        mark = (tag) => {\n            perf.mark(tag);\n        };\n        measure = (name, startTag, endTag) => {\n            perf.measure(name, startTag, endTag);\n            perf.clearMarks(startTag);\n            perf.clearMarks(endTag);\n        };\n    }\n}\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n    if (args.length === 1 && isObject(args[0])) {\n        args = args[0];\n    }\n    if (!args || !args.hasOwnProperty) {\n        args = {};\n    }\n    return message.replace(RE_ARGS, (match, identifier) => {\n        return args.hasOwnProperty(identifier) ? args[identifier] : '';\n    });\n}\nconst makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);\nconst generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });\nconst friendlyJSONstringify = (json) => JSON.stringify(json)\n    .replace(/\\u2028/g, '\\\\u2028')\n    .replace(/\\u2029/g, '\\\\u2029')\n    .replace(/\\u0027/g, '\\\\u0027');\nconst isNumber = (val) => typeof val === 'number' && isFinite(val);\nconst isDate = (val) => toTypeString(val) === '[object Date]';\nconst isRegExp = (val) => toTypeString(val) === '[object RegExp]';\nconst isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;\nconst assign = Object.assign;\nlet _globalThis;\nconst getGlobalThis = () => {\n    // prettier-ignore\n    return (_globalThis ||\n        (_globalThis =\n            typeof globalThis !== 'undefined'\n                ? globalThis\n                : typeof self !== 'undefined'\n                    ? self\n                    : typeof window !== 'undefined'\n                        ? window\n                        : typeof global !== 'undefined'\n                            ? global\n                            : {}));\n};\nfunction escapeHtml(rawText) {\n    return rawText\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;')\n        .replace(/\"/g, '&quot;')\n        .replace(/'/g, '&apos;');\n}\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/* eslint-enable */\n/**\n * Useful Utilities By Evan you\n * Modified by kazuya kawaguchi\n * MIT License\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts\n */\nconst isArray = Array.isArray;\nconst isFunction = (val) => typeof val === 'function';\nconst isString = (val) => typeof val === 'string';\nconst isBoolean = (val) => typeof val === 'boolean';\nconst isSymbol = (val) => typeof val === 'symbol';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPromise = (val) => {\n    return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst isPlainObject = (val) => {\n    if (!isObject(val))\n        return false;\n    const proto = Object.getPrototypeOf(val);\n    return proto === null || proto.constructor === Object;\n};\n// for converting list and named values to displayed strings.\nconst toDisplayString = (val) => {\n    return val == null\n        ? ''\n        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)\n            ? JSON.stringify(val, null, 2)\n            : String(val);\n};\nfunction join(items, separator = '') {\n    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\nconst RANGE = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n    const lines = source.split(/\\r?\\n/);\n    let count = 0;\n    const res = [];\n    for (let i = 0; i < lines.length; i++) {\n        count += lines[i].length + 1;\n        if (count >= start) {\n            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {\n                if (j < 0 || j >= lines.length)\n                    continue;\n                const line = j + 1;\n                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);\n                const lineLength = lines[j].length;\n                if (j === i) {\n                    // push underline\n                    const pad = start - (count - lineLength) + 1;\n                    const length = Math.max(1, end > count ? lineLength - pad : end - start);\n                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));\n                }\n                else if (j > i) {\n                    if (end > count) {\n                        const length = Math.max(Math.min(end - count, lineLength), 1);\n                        res.push(`   |  ` + '^'.repeat(length));\n                    }\n                    count += lineLength + 1;\n                }\n            }\n            break;\n        }\n    }\n    return res.join('\\n');\n}\nfunction incrementer(code) {\n    let current = code;\n    return () => ++current;\n}\n\nfunction warn(msg, err) {\n    if (typeof console !== 'undefined') {\n        console.warn(`[intlify] ` + msg);\n        /* istanbul ignore if */\n        if (err) {\n            console.warn(err.stack);\n        }\n    }\n}\nconst hasWarned = {};\nfunction warnOnce(msg) {\n    if (!hasWarned[msg]) {\n        hasWarned[msg] = true;\n        warn(msg);\n    }\n}\n\n/**\n * Event emitter, forked from the below:\n * - original repository url: https://github.com/developit/mitt\n * - code url: https://github.com/developit/mitt/blob/master/src/index.ts\n * - author: Jason Miller (https://github.com/developit)\n * - license: MIT\n */\n/**\n * Create a event emitter\n *\n * @returns An event emitter\n */\nfunction createEmitter() {\n    const events = new Map();\n    const emitter = {\n        events,\n        on(event, handler) {\n            const handlers = events.get(event);\n            const added = handlers && handlers.push(handler);\n            if (!added) {\n                events.set(event, [handler]);\n            }\n        },\n        off(event, handler) {\n            const handlers = events.get(event);\n            if (handlers) {\n                handlers.splice(handlers.indexOf(handler) >>> 0, 1);\n            }\n        },\n        emit(event, payload) {\n            (events.get(event) || [])\n                .slice()\n                .map(handler => handler(payload));\n            (events.get('*') || [])\n                .slice()\n                .map(handler => handler(event, payload));\n        }\n    };\n    return emitter;\n}\n\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction deepCopy(src, des) {\n    // src and des should both be objects, and none of them can be a array\n    if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\n        throw new Error('Invalid value');\n    }\n    const stack = [{ src, des }];\n    while (stack.length) {\n        const { src, des } = stack.pop();\n        Object.keys(src).forEach(key => {\n            if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {\n                // replace with src[key] when:\n                // src[key] or des[key] is not an object, or\n                // src[key] or des[key] is an array\n                des[key] = src[key];\n            }\n            else {\n                // src[key] and des[key] are both objects, merge them\n                stack.push({ src: src[key], des: des[key] });\n            }\n        });\n    }\n}\n\nexport { assign, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, toDisplayString, toTypeString, warn, warnOnce };\n","/*!\n  * message-compiler v9.14.0\n  * (c) 2024 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nconst LOCATION_STUB = {\n    start: { line: 1, column: 1, offset: 0 },\n    end: { line: 1, column: 1, offset: 0 }\n};\nfunction createPosition(line, column, offset) {\n    return { line, column, offset };\n}\nfunction createLocation(start, end, source) {\n    const loc = { start, end };\n    if (source != null) {\n        loc.source = source;\n    }\n    return loc;\n}\n\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n    if (args.length === 1 && isObject(args[0])) {\n        args = args[0];\n    }\n    if (!args || !args.hasOwnProperty) {\n        args = {};\n    }\n    return message.replace(RE_ARGS, (match, identifier) => {\n        return args.hasOwnProperty(identifier) ? args[identifier] : '';\n    });\n}\nconst assign = Object.assign;\nconst isString = (val) => typeof val === 'string';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\nfunction join(items, separator = '') {\n    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\n\nconst CompileWarnCodes = {\n    USE_MODULO_SYNTAX: 1,\n    __EXTEND_POINT__: 2\n};\n/** @internal */\nconst warnMessages = {\n    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`\n};\nfunction createCompileWarn(code, loc, ...args) {\n    const msg = format(warnMessages[code] || '', ...(args || [])) ;\n    const message = { message: String(msg), code };\n    if (loc) {\n        message.location = loc;\n    }\n    return message;\n}\n\nconst CompileErrorCodes = {\n    // tokenizer error codes\n    EXPECTED_TOKEN: 1,\n    INVALID_TOKEN_IN_PLACEHOLDER: 2,\n    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\n    UNKNOWN_ESCAPE_SEQUENCE: 4,\n    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\n    UNBALANCED_CLOSING_BRACE: 6,\n    UNTERMINATED_CLOSING_BRACE: 7,\n    EMPTY_PLACEHOLDER: 8,\n    NOT_ALLOW_NEST_PLACEHOLDER: 9,\n    INVALID_LINKED_FORMAT: 10,\n    // parser error codes\n    MUST_HAVE_MESSAGES_IN_PLURAL: 11,\n    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\n    UNEXPECTED_EMPTY_LINKED_KEY: 13,\n    UNEXPECTED_LEXICAL_ANALYSIS: 14,\n    // generator error codes\n    UNHANDLED_CODEGEN_NODE_TYPE: 15,\n    // minifier error codes\n    UNHANDLED_MINIFIER_NODE_TYPE: 16,\n    // Special value for higher-order compilers to pick up the last code\n    // to avoid collision of error codes. This should always be kept as the last\n    // item.\n    __EXTEND_POINT__: 17\n};\n/** @internal */\nconst errorMessages = {\n    // tokenizer error messages\n    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\n    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\n    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\n    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\n    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\n    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\n    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\n    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\n    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\n    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\n    // parser error messages\n    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\n    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\n    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\n    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,\n    // generator error messages\n    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,\n    // minimizer error messages\n    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`\n};\nfunction createCompileError(code, loc, options = {}) {\n    const { domain, messages, args } = options;\n    const msg = format((messages || errorMessages)[code] || '', ...(args || []))\n        ;\n    const error = new SyntaxError(String(msg));\n    error.code = code;\n    if (loc) {\n        error.location = loc;\n    }\n    error.domain = domain;\n    return error;\n}\n/** @internal */\nfunction defaultOnError(error) {\n    throw error;\n}\n\n// eslint-disable-next-line no-useless-escape\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nconst detectHtmlTag = (source) => RE_HTML_TAG.test(source);\n\nconst CHAR_SP = ' ';\nconst CHAR_CR = '\\r';\nconst CHAR_LF = '\\n';\nconst CHAR_LS = String.fromCharCode(0x2028);\nconst CHAR_PS = String.fromCharCode(0x2029);\nfunction createScanner(str) {\n    const _buf = str;\n    let _index = 0;\n    let _line = 1;\n    let _column = 1;\n    let _peekOffset = 0;\n    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\n    const isLF = (index) => _buf[index] === CHAR_LF;\n    const isPS = (index) => _buf[index] === CHAR_PS;\n    const isLS = (index) => _buf[index] === CHAR_LS;\n    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\n    const index = () => _index;\n    const line = () => _line;\n    const column = () => _column;\n    const peekOffset = () => _peekOffset;\n    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\n    const currentChar = () => charAt(_index);\n    const currentPeek = () => charAt(_index + _peekOffset);\n    function next() {\n        _peekOffset = 0;\n        if (isLineEnd(_index)) {\n            _line++;\n            _column = 0;\n        }\n        if (isCRLF(_index)) {\n            _index++;\n        }\n        _index++;\n        _column++;\n        return _buf[_index];\n    }\n    function peek() {\n        if (isCRLF(_index + _peekOffset)) {\n            _peekOffset++;\n        }\n        _peekOffset++;\n        return _buf[_index + _peekOffset];\n    }\n    function reset() {\n        _index = 0;\n        _line = 1;\n        _column = 1;\n        _peekOffset = 0;\n    }\n    function resetPeek(offset = 0) {\n        _peekOffset = offset;\n    }\n    function skipToPeek() {\n        const target = _index + _peekOffset;\n        // eslint-disable-next-line no-unmodified-loop-condition\n        while (target !== _index) {\n            next();\n        }\n        _peekOffset = 0;\n    }\n    return {\n        index,\n        line,\n        column,\n        peekOffset,\n        charAt,\n        currentChar,\n        currentPeek,\n        next,\n        peek,\n        reset,\n        resetPeek,\n        skipToPeek\n    };\n}\n\nconst EOF = undefined;\nconst DOT = '.';\nconst LITERAL_DELIMITER = \"'\";\nconst ERROR_DOMAIN$3 = 'tokenizer';\nfunction createTokenizer(source, options = {}) {\n    const location = options.location !== false;\n    const _scnr = createScanner(source);\n    const currentOffset = () => _scnr.index();\n    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\n    const _initLoc = currentPosition();\n    const _initOffset = currentOffset();\n    const _context = {\n        currentType: 14 /* TokenTypes.EOF */,\n        offset: _initOffset,\n        startLoc: _initLoc,\n        endLoc: _initLoc,\n        lastType: 14 /* TokenTypes.EOF */,\n        lastOffset: _initOffset,\n        lastStartLoc: _initLoc,\n        lastEndLoc: _initLoc,\n        braceNest: 0,\n        inLinked: false,\n        text: ''\n    };\n    const context = () => _context;\n    const { onError } = options;\n    function emitError(code, pos, offset, ...args) {\n        const ctx = context();\n        pos.column += offset;\n        pos.offset += offset;\n        if (onError) {\n            const loc = location ? createLocation(ctx.startLoc, pos) : null;\n            const err = createCompileError(code, loc, {\n                domain: ERROR_DOMAIN$3,\n                args\n            });\n            onError(err);\n        }\n    }\n    function getToken(context, type, value) {\n        context.endLoc = currentPosition();\n        context.currentType = type;\n        const token = { type };\n        if (location) {\n            token.loc = createLocation(context.startLoc, context.endLoc);\n        }\n        if (value != null) {\n            token.value = value;\n        }\n        return token;\n    }\n    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);\n    function eat(scnr, ch) {\n        if (scnr.currentChar() === ch) {\n            scnr.next();\n            return ch;\n        }\n        else {\n            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n            return '';\n        }\n    }\n    function peekSpaces(scnr) {\n        let buf = '';\n        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\n            buf += scnr.currentPeek();\n            scnr.peek();\n        }\n        return buf;\n    }\n    function skipSpaces(scnr) {\n        const buf = peekSpaces(scnr);\n        scnr.skipToPeek();\n        return buf;\n    }\n    function isIdentifierStart(ch) {\n        if (ch === EOF) {\n            return false;\n        }\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 97 && cc <= 122) || // a-z\n            (cc >= 65 && cc <= 90) || // A-Z\n            cc === 95 // _\n        );\n    }\n    function isNumberStart(ch) {\n        if (ch === EOF) {\n            return false;\n        }\n        const cc = ch.charCodeAt(0);\n        return cc >= 48 && cc <= 57; // 0-9\n    }\n    function isNamedIdentifierStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = isIdentifierStart(scnr.currentPeek());\n        scnr.resetPeek();\n        return ret;\n    }\n    function isListIdentifierStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\n        const ret = isNumberStart(ch);\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLiteralStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === LITERAL_DELIMITER;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedDotStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \".\" /* TokenChars.LinkedDot */;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedModifierStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 9 /* TokenTypes.LinkedDot */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = isIdentifierStart(scnr.currentPeek());\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedDelimiterStart(scnr, context) {\n        const { currentType } = context;\n        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||\n            currentType === 12 /* TokenTypes.LinkedModifier */)) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \":\" /* TokenChars.LinkedDelimiter */;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedReferStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {\n            return false;\n        }\n        const fn = () => {\n            const ch = scnr.currentPeek();\n            if (ch === \"{\" /* TokenChars.BraceLeft */) {\n                return isIdentifierStart(scnr.peek());\n            }\n            else if (ch === \"@\" /* TokenChars.LinkedAlias */ ||\n                ch === \"%\" /* TokenChars.Modulo */ ||\n                ch === \"|\" /* TokenChars.Pipe */ ||\n                ch === \":\" /* TokenChars.LinkedDelimiter */ ||\n                ch === \".\" /* TokenChars.LinkedDot */ ||\n                ch === CHAR_SP ||\n                !ch) {\n                return false;\n            }\n            else if (ch === CHAR_LF) {\n                scnr.peek();\n                return fn();\n            }\n            else {\n                // other characters\n                return isTextStart(scnr, false);\n            }\n        };\n        const ret = fn();\n        scnr.resetPeek();\n        return ret;\n    }\n    function isPluralStart(scnr) {\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \"|\" /* TokenChars.Pipe */;\n        scnr.resetPeek();\n        return ret;\n    }\n    function detectModuloStart(scnr) {\n        const spaces = peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \"%\" /* TokenChars.Modulo */ &&\n            scnr.peek() === \"{\" /* TokenChars.BraceLeft */;\n        scnr.resetPeek();\n        return {\n            isModulo: ret,\n            hasSpace: spaces.length > 0\n        };\n    }\n    function isTextStart(scnr, reset = true) {\n        const fn = (hasSpace = false, prev = '', detectModulo = false) => {\n            const ch = scnr.currentPeek();\n            if (ch === \"{\" /* TokenChars.BraceLeft */) {\n                return prev === \"%\" /* TokenChars.Modulo */ ? false : hasSpace;\n            }\n            else if (ch === \"@\" /* TokenChars.LinkedAlias */ || !ch) {\n                return prev === \"%\" /* TokenChars.Modulo */ ? true : hasSpace;\n            }\n            else if (ch === \"%\" /* TokenChars.Modulo */) {\n                scnr.peek();\n                return fn(hasSpace, \"%\" /* TokenChars.Modulo */, true);\n            }\n            else if (ch === \"|\" /* TokenChars.Pipe */) {\n                return prev === \"%\" /* TokenChars.Modulo */ || detectModulo\n                    ? true\n                    : !(prev === CHAR_SP || prev === CHAR_LF);\n            }\n            else if (ch === CHAR_SP) {\n                scnr.peek();\n                return fn(true, CHAR_SP, detectModulo);\n            }\n            else if (ch === CHAR_LF) {\n                scnr.peek();\n                return fn(true, CHAR_LF, detectModulo);\n            }\n            else {\n                return true;\n            }\n        };\n        const ret = fn();\n        reset && scnr.resetPeek();\n        return ret;\n    }\n    function takeChar(scnr, fn) {\n        const ch = scnr.currentChar();\n        if (ch === EOF) {\n            return EOF;\n        }\n        if (fn(ch)) {\n            scnr.next();\n            return ch;\n        }\n        return null;\n    }\n    function isIdentifier(ch) {\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 97 && cc <= 122) || // a-z\n            (cc >= 65 && cc <= 90) || // A-Z\n            (cc >= 48 && cc <= 57) || // 0-9\n            cc === 95 || // _\n            cc === 36 // $\n        );\n    }\n    function takeIdentifierChar(scnr) {\n        return takeChar(scnr, isIdentifier);\n    }\n    function isNamedIdentifier(ch) {\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 97 && cc <= 122) || // a-z\n            (cc >= 65 && cc <= 90) || // A-Z\n            (cc >= 48 && cc <= 57) || // 0-9\n            cc === 95 || // _\n            cc === 36 || // $\n            cc === 45 // -\n        );\n    }\n    function takeNamedIdentifierChar(scnr) {\n        return takeChar(scnr, isNamedIdentifier);\n    }\n    function isDigit(ch) {\n        const cc = ch.charCodeAt(0);\n        return cc >= 48 && cc <= 57; // 0-9\n    }\n    function takeDigit(scnr) {\n        return takeChar(scnr, isDigit);\n    }\n    function isHexDigit(ch) {\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 48 && cc <= 57) || // 0-9\n            (cc >= 65 && cc <= 70) || // A-F\n            (cc >= 97 && cc <= 102)); // a-f\n    }\n    function takeHexDigit(scnr) {\n        return takeChar(scnr, isHexDigit);\n    }\n    function getDigits(scnr) {\n        let ch = '';\n        let num = '';\n        while ((ch = takeDigit(scnr))) {\n            num += ch;\n        }\n        return num;\n    }\n    function readModulo(scnr) {\n        skipSpaces(scnr);\n        const ch = scnr.currentChar();\n        if (ch !== \"%\" /* TokenChars.Modulo */) {\n            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n        }\n        scnr.next();\n        return \"%\" /* TokenChars.Modulo */;\n    }\n    function readText(scnr) {\n        let buf = '';\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            const ch = scnr.currentChar();\n            if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n                ch === \"}\" /* TokenChars.BraceRight */ ||\n                ch === \"@\" /* TokenChars.LinkedAlias */ ||\n                ch === \"|\" /* TokenChars.Pipe */ ||\n                !ch) {\n                break;\n            }\n            else if (ch === \"%\" /* TokenChars.Modulo */) {\n                if (isTextStart(scnr)) {\n                    buf += ch;\n                    scnr.next();\n                }\n                else {\n                    break;\n                }\n            }\n            else if (ch === CHAR_SP || ch === CHAR_LF) {\n                if (isTextStart(scnr)) {\n                    buf += ch;\n                    scnr.next();\n                }\n                else if (isPluralStart(scnr)) {\n                    break;\n                }\n                else {\n                    buf += ch;\n                    scnr.next();\n                }\n            }\n            else {\n                buf += ch;\n                scnr.next();\n            }\n        }\n        return buf;\n    }\n    function readNamedIdentifier(scnr) {\n        skipSpaces(scnr);\n        let ch = '';\n        let name = '';\n        while ((ch = takeNamedIdentifierChar(scnr))) {\n            name += ch;\n        }\n        if (scnr.currentChar() === EOF) {\n            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n        }\n        return name;\n    }\n    function readListIdentifier(scnr) {\n        skipSpaces(scnr);\n        let value = '';\n        if (scnr.currentChar() === '-') {\n            scnr.next();\n            value += `-${getDigits(scnr)}`;\n        }\n        else {\n            value += getDigits(scnr);\n        }\n        if (scnr.currentChar() === EOF) {\n            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n        }\n        return value;\n    }\n    function isLiteral(ch) {\n        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;\n    }\n    function readLiteral(scnr) {\n        skipSpaces(scnr);\n        // eslint-disable-next-line no-useless-escape\n        eat(scnr, `\\'`);\n        let ch = '';\n        let literal = '';\n        while ((ch = takeChar(scnr, isLiteral))) {\n            if (ch === '\\\\') {\n                literal += readEscapeSequence(scnr);\n            }\n            else {\n                literal += ch;\n            }\n        }\n        const current = scnr.currentChar();\n        if (current === CHAR_LF || current === EOF) {\n            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\n            // TODO: Is it correct really?\n            if (current === CHAR_LF) {\n                scnr.next();\n                // eslint-disable-next-line no-useless-escape\n                eat(scnr, `\\'`);\n            }\n            return literal;\n        }\n        // eslint-disable-next-line no-useless-escape\n        eat(scnr, `\\'`);\n        return literal;\n    }\n    function readEscapeSequence(scnr) {\n        const ch = scnr.currentChar();\n        switch (ch) {\n            case '\\\\':\n            case `\\'`: // eslint-disable-line no-useless-escape\n                scnr.next();\n                return `\\\\${ch}`;\n            case 'u':\n                return readUnicodeEscapeSequence(scnr, ch, 4);\n            case 'U':\n                return readUnicodeEscapeSequence(scnr, ch, 6);\n            default:\n                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\n                return '';\n        }\n    }\n    function readUnicodeEscapeSequence(scnr, unicode, digits) {\n        eat(scnr, unicode);\n        let sequence = '';\n        for (let i = 0; i < digits; i++) {\n            const ch = takeHexDigit(scnr);\n            if (!ch) {\n                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\n                break;\n            }\n            sequence += ch;\n        }\n        return `\\\\${unicode}${sequence}`;\n    }\n    function isInvalidIdentifier(ch) {\n        return (ch !== \"{\" /* TokenChars.BraceLeft */ &&\n            ch !== \"}\" /* TokenChars.BraceRight */ &&\n            ch !== CHAR_SP &&\n            ch !== CHAR_LF);\n    }\n    function readInvalidIdentifier(scnr) {\n        skipSpaces(scnr);\n        let ch = '';\n        let identifiers = '';\n        while ((ch = takeChar(scnr, isInvalidIdentifier))) {\n            identifiers += ch;\n        }\n        return identifiers;\n    }\n    function readLinkedModifier(scnr) {\n        let ch = '';\n        let name = '';\n        while ((ch = takeIdentifierChar(scnr))) {\n            name += ch;\n        }\n        return name;\n    }\n    function readLinkedRefer(scnr) {\n        const fn = (buf) => {\n            const ch = scnr.currentChar();\n            if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n                ch === \"%\" /* TokenChars.Modulo */ ||\n                ch === \"@\" /* TokenChars.LinkedAlias */ ||\n                ch === \"|\" /* TokenChars.Pipe */ ||\n                ch === \"(\" /* TokenChars.ParenLeft */ ||\n                ch === \")\" /* TokenChars.ParenRight */ ||\n                !ch) {\n                return buf;\n            }\n            else if (ch === CHAR_SP) {\n                return buf;\n            }\n            else if (ch === CHAR_LF || ch === DOT) {\n                buf += ch;\n                scnr.next();\n                return fn(buf);\n            }\n            else {\n                buf += ch;\n                scnr.next();\n                return fn(buf);\n            }\n        };\n        return fn('');\n    }\n    function readPlural(scnr) {\n        skipSpaces(scnr);\n        const plural = eat(scnr, \"|\" /* TokenChars.Pipe */);\n        skipSpaces(scnr);\n        return plural;\n    }\n    // TODO: We need refactoring of token parsing ...\n    function readTokenInPlaceholder(scnr, context) {\n        let token = null;\n        const ch = scnr.currentChar();\n        switch (ch) {\n            case \"{\" /* TokenChars.BraceLeft */:\n                if (context.braceNest >= 1) {\n                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\n                }\n                scnr.next();\n                token = getToken(context, 2 /* TokenTypes.BraceLeft */, \"{\" /* TokenChars.BraceLeft */);\n                skipSpaces(scnr);\n                context.braceNest++;\n                return token;\n            case \"}\" /* TokenChars.BraceRight */:\n                if (context.braceNest > 0 &&\n                    context.currentType === 2 /* TokenTypes.BraceLeft */) {\n                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\n                }\n                scnr.next();\n                token = getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n                context.braceNest--;\n                context.braceNest > 0 && skipSpaces(scnr);\n                if (context.inLinked && context.braceNest === 0) {\n                    context.inLinked = false;\n                }\n                return token;\n            case \"@\" /* TokenChars.LinkedAlias */:\n                if (context.braceNest > 0) {\n                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n                }\n                token = readTokenInLinked(scnr, context) || getEndToken(context);\n                context.braceNest = 0;\n                return token;\n            default: {\n                let validNamedIdentifier = true;\n                let validListIdentifier = true;\n                let validLiteral = true;\n                if (isPluralStart(scnr)) {\n                    if (context.braceNest > 0) {\n                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n                    }\n                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n                    // reset\n                    context.braceNest = 0;\n                    context.inLinked = false;\n                    return token;\n                }\n                if (context.braceNest > 0 &&\n                    (context.currentType === 5 /* TokenTypes.Named */ ||\n                        context.currentType === 6 /* TokenTypes.List */ ||\n                        context.currentType === 7 /* TokenTypes.Literal */)) {\n                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n                    context.braceNest = 0;\n                    return readToken(scnr, context);\n                }\n                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {\n                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));\n                    skipSpaces(scnr);\n                    return token;\n                }\n                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {\n                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));\n                    skipSpaces(scnr);\n                    return token;\n                }\n                if ((validLiteral = isLiteralStart(scnr, context))) {\n                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));\n                    skipSpaces(scnr);\n                    return token;\n                }\n                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\n                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\n                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));\n                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\n                    skipSpaces(scnr);\n                    return token;\n                }\n                break;\n            }\n        }\n        return token;\n    }\n    // TODO: We need refactoring of token parsing ...\n    function readTokenInLinked(scnr, context) {\n        const { currentType } = context;\n        let token = null;\n        const ch = scnr.currentChar();\n        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||\n            currentType === 9 /* TokenTypes.LinkedDot */ ||\n            currentType === 12 /* TokenTypes.LinkedModifier */ ||\n            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&\n            (ch === CHAR_LF || ch === CHAR_SP)) {\n            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n        }\n        switch (ch) {\n            case \"@\" /* TokenChars.LinkedAlias */:\n                scnr.next();\n                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, \"@\" /* TokenChars.LinkedAlias */);\n                context.inLinked = true;\n                return token;\n            case \".\" /* TokenChars.LinkedDot */:\n                skipSpaces(scnr);\n                scnr.next();\n                return getToken(context, 9 /* TokenTypes.LinkedDot */, \".\" /* TokenChars.LinkedDot */);\n            case \":\" /* TokenChars.LinkedDelimiter */:\n                skipSpaces(scnr);\n                scnr.next();\n                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, \":\" /* TokenChars.LinkedDelimiter */);\n            default:\n                if (isPluralStart(scnr)) {\n                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n                    // reset\n                    context.braceNest = 0;\n                    context.inLinked = false;\n                    return token;\n                }\n                if (isLinkedDotStart(scnr, context) ||\n                    isLinkedDelimiterStart(scnr, context)) {\n                    skipSpaces(scnr);\n                    return readTokenInLinked(scnr, context);\n                }\n                if (isLinkedModifierStart(scnr, context)) {\n                    skipSpaces(scnr);\n                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));\n                }\n                if (isLinkedReferStart(scnr, context)) {\n                    skipSpaces(scnr);\n                    if (ch === \"{\" /* TokenChars.BraceLeft */) {\n                        // scan the placeholder\n                        return readTokenInPlaceholder(scnr, context) || token;\n                    }\n                    else {\n                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));\n                    }\n                }\n                if (currentType === 8 /* TokenTypes.LinkedAlias */) {\n                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n                }\n                context.braceNest = 0;\n                context.inLinked = false;\n                return readToken(scnr, context);\n        }\n    }\n    // TODO: We need refactoring of token parsing ...\n    function readToken(scnr, context) {\n        let token = { type: 14 /* TokenTypes.EOF */ };\n        if (context.braceNest > 0) {\n            return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n        }\n        if (context.inLinked) {\n            return readTokenInLinked(scnr, context) || getEndToken(context);\n        }\n        const ch = scnr.currentChar();\n        switch (ch) {\n            case \"{\" /* TokenChars.BraceLeft */:\n                return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n            case \"}\" /* TokenChars.BraceRight */:\n                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\n                scnr.next();\n                return getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n            case \"@\" /* TokenChars.LinkedAlias */:\n                return readTokenInLinked(scnr, context) || getEndToken(context);\n            default: {\n                if (isPluralStart(scnr)) {\n                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n                    // reset\n                    context.braceNest = 0;\n                    context.inLinked = false;\n                    return token;\n                }\n                const { isModulo, hasSpace } = detectModuloStart(scnr);\n                if (isModulo) {\n                    return hasSpace\n                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))\n                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));\n                }\n                if (isTextStart(scnr)) {\n                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));\n                }\n                break;\n            }\n        }\n        return token;\n    }\n    function nextToken() {\n        const { currentType, offset, startLoc, endLoc } = _context;\n        _context.lastType = currentType;\n        _context.lastOffset = offset;\n        _context.lastStartLoc = startLoc;\n        _context.lastEndLoc = endLoc;\n        _context.offset = currentOffset();\n        _context.startLoc = currentPosition();\n        if (_scnr.currentChar() === EOF) {\n            return getToken(_context, 14 /* TokenTypes.EOF */);\n        }\n        return readToken(_scnr, _context);\n    }\n    return {\n        nextToken,\n        currentOffset,\n        currentPosition,\n        context\n    };\n}\n\nconst ERROR_DOMAIN$2 = 'parser';\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\n    switch (match) {\n        case `\\\\\\\\`:\n            return `\\\\`;\n        // eslint-disable-next-line no-useless-escape\n        case `\\\\\\'`:\n            // eslint-disable-next-line no-useless-escape\n            return `\\'`;\n        default: {\n            const codePoint = parseInt(codePoint4 || codePoint6, 16);\n            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\n                return String.fromCodePoint(codePoint);\n            }\n            // invalid ...\n            // Replace them with U+FFFD REPLACEMENT CHARACTER.\n            return '�';\n        }\n    }\n}\nfunction createParser(options = {}) {\n    const location = options.location !== false;\n    const { onError, onWarn } = options;\n    function emitError(tokenzer, code, start, offset, ...args) {\n        const end = tokenzer.currentPosition();\n        end.offset += offset;\n        end.column += offset;\n        if (onError) {\n            const loc = location ? createLocation(start, end) : null;\n            const err = createCompileError(code, loc, {\n                domain: ERROR_DOMAIN$2,\n                args\n            });\n            onError(err);\n        }\n    }\n    function emitWarn(tokenzer, code, start, offset, ...args) {\n        const end = tokenzer.currentPosition();\n        end.offset += offset;\n        end.column += offset;\n        if (onWarn) {\n            const loc = location ? createLocation(start, end) : null;\n            onWarn(createCompileWarn(code, loc, args));\n        }\n    }\n    function startNode(type, offset, loc) {\n        const node = { type };\n        if (location) {\n            node.start = offset;\n            node.end = offset;\n            node.loc = { start: loc, end: loc };\n        }\n        return node;\n    }\n    function endNode(node, offset, pos, type) {\n        if (type) {\n            node.type = type;\n        }\n        if (location) {\n            node.end = offset;\n            if (node.loc) {\n                node.loc.end = pos;\n            }\n        }\n    }\n    function parseText(tokenizer, value) {\n        const context = tokenizer.context();\n        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);\n        node.value = value;\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseList(tokenizer, index) {\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n        const node = startNode(5 /* NodeTypes.List */, offset, loc);\n        node.index = parseInt(index, 10);\n        tokenizer.nextToken(); // skip brach right\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseNamed(tokenizer, key, modulo) {\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n        const node = startNode(4 /* NodeTypes.Named */, offset, loc);\n        node.key = key;\n        if (modulo === true) {\n            node.modulo = true;\n        }\n        tokenizer.nextToken(); // skip brach right\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseLiteral(tokenizer, value) {\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);\n        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\n        tokenizer.nextToken(); // skip brach right\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseLinkedModifier(tokenizer) {\n        const token = tokenizer.nextToken();\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc\n        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);\n        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {\n            // empty modifier\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\n            node.value = '';\n            endNode(node, offset, loc);\n            return {\n                nextConsumeToken: token,\n                node\n            };\n        }\n        // check token\n        if (token.value == null) {\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n        }\n        node.value = token.value || '';\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return {\n            node\n        };\n    }\n    function parseLinkedKey(tokenizer, value) {\n        const context = tokenizer.context();\n        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);\n        node.value = value;\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseLinked(tokenizer) {\n        const context = tokenizer.context();\n        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);\n        let token = tokenizer.nextToken();\n        if (token.type === 9 /* TokenTypes.LinkedDot */) {\n            const parsed = parseLinkedModifier(tokenizer);\n            linkedNode.modifier = parsed.node;\n            token = parsed.nextConsumeToken || tokenizer.nextToken();\n        }\n        // asset check token\n        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n        }\n        token = tokenizer.nextToken();\n        // skip brace left\n        if (token.type === 2 /* TokenTypes.BraceLeft */) {\n            token = tokenizer.nextToken();\n        }\n        switch (token.type) {\n            case 11 /* TokenTypes.LinkedKey */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\n                break;\n            case 5 /* TokenTypes.Named */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseNamed(tokenizer, token.value || '');\n                break;\n            case 6 /* TokenTypes.List */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseList(tokenizer, token.value || '');\n                break;\n            case 7 /* TokenTypes.Literal */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseLiteral(tokenizer, token.value || '');\n                break;\n            default: {\n                // empty key\n                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\n                const nextContext = tokenizer.context();\n                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);\n                emptyLinkedKeyNode.value = '';\n                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\n                linkedNode.key = emptyLinkedKeyNode;\n                endNode(linkedNode, nextContext.offset, nextContext.startLoc);\n                return {\n                    nextConsumeToken: token,\n                    node: linkedNode\n                };\n            }\n        }\n        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return {\n            node: linkedNode\n        };\n    }\n    function parseMessage(tokenizer) {\n        const context = tokenizer.context();\n        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */\n            ? tokenizer.currentOffset()\n            : context.offset;\n        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */\n            ? context.endLoc\n            : context.startLoc;\n        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);\n        node.items = [];\n        let nextToken = null;\n        let modulo = null;\n        do {\n            const token = nextToken || tokenizer.nextToken();\n            nextToken = null;\n            switch (token.type) {\n                case 0 /* TokenTypes.Text */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseText(tokenizer, token.value || ''));\n                    break;\n                case 6 /* TokenTypes.List */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseList(tokenizer, token.value || ''));\n                    break;\n                case 4 /* TokenTypes.Modulo */:\n                    modulo = true;\n                    break;\n                case 5 /* TokenTypes.Named */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));\n                    if (modulo) {\n                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));\n                        modulo = null;\n                    }\n                    break;\n                case 7 /* TokenTypes.Literal */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseLiteral(tokenizer, token.value || ''));\n                    break;\n                case 8 /* TokenTypes.LinkedAlias */: {\n                    const parsed = parseLinked(tokenizer);\n                    node.items.push(parsed.node);\n                    nextToken = parsed.nextConsumeToken || null;\n                    break;\n                }\n            }\n        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&\n            context.currentType !== 1 /* TokenTypes.Pipe */);\n        // adjust message node loc\n        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */\n            ? context.lastOffset\n            : tokenizer.currentOffset();\n        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */\n            ? context.lastEndLoc\n            : tokenizer.currentPosition();\n        endNode(node, endOffset, endLoc);\n        return node;\n    }\n    function parsePlural(tokenizer, offset, loc, msgNode) {\n        const context = tokenizer.context();\n        let hasEmptyMessage = msgNode.items.length === 0;\n        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);\n        node.cases = [];\n        node.cases.push(msgNode);\n        do {\n            const msg = parseMessage(tokenizer);\n            if (!hasEmptyMessage) {\n                hasEmptyMessage = msg.items.length === 0;\n            }\n            node.cases.push(msg);\n        } while (context.currentType !== 14 /* TokenTypes.EOF */);\n        if (hasEmptyMessage) {\n            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\n        }\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseResource(tokenizer) {\n        const context = tokenizer.context();\n        const { offset, startLoc } = context;\n        const msgNode = parseMessage(tokenizer);\n        if (context.currentType === 14 /* TokenTypes.EOF */) {\n            return msgNode;\n        }\n        else {\n            return parsePlural(tokenizer, offset, startLoc, msgNode);\n        }\n    }\n    function parse(source) {\n        const tokenizer = createTokenizer(source, assign({}, options));\n        const context = tokenizer.context();\n        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);\n        if (location && node.loc) {\n            node.loc.source = source;\n        }\n        node.body = parseResource(tokenizer);\n        if (options.onCacheKey) {\n            node.cacheKey = options.onCacheKey(source);\n        }\n        // assert whether achieved to EOF\n        if (context.currentType !== 14 /* TokenTypes.EOF */) {\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\n        }\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    return { parse };\n}\nfunction getTokenCaption(token) {\n    if (token.type === 14 /* TokenTypes.EOF */) {\n        return 'EOF';\n    }\n    const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\n    return name.length > 10 ? name.slice(0, 9) + '…' : name;\n}\n\nfunction createTransformer(ast, options = {} // eslint-disable-line\n) {\n    const _context = {\n        ast,\n        helpers: new Set()\n    };\n    const context = () => _context;\n    const helper = (name) => {\n        _context.helpers.add(name);\n        return name;\n    };\n    return { context, helper };\n}\nfunction traverseNodes(nodes, transformer) {\n    for (let i = 0; i < nodes.length; i++) {\n        traverseNode(nodes[i], transformer);\n    }\n}\nfunction traverseNode(node, transformer) {\n    // TODO: if we need pre-hook of transform, should be implemented to here\n    switch (node.type) {\n        case 1 /* NodeTypes.Plural */:\n            traverseNodes(node.cases, transformer);\n            transformer.helper(\"plural\" /* HelperNameMap.PLURAL */);\n            break;\n        case 2 /* NodeTypes.Message */:\n            traverseNodes(node.items, transformer);\n            break;\n        case 6 /* NodeTypes.Linked */: {\n            const linked = node;\n            traverseNode(linked.key, transformer);\n            transformer.helper(\"linked\" /* HelperNameMap.LINKED */);\n            transformer.helper(\"type\" /* HelperNameMap.TYPE */);\n            break;\n        }\n        case 5 /* NodeTypes.List */:\n            transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n            transformer.helper(\"list\" /* HelperNameMap.LIST */);\n            break;\n        case 4 /* NodeTypes.Named */:\n            transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n            transformer.helper(\"named\" /* HelperNameMap.NAMED */);\n            break;\n    }\n    // TODO: if we need post-hook of transform, should be implemented to here\n}\n// transform AST\nfunction transform(ast, options = {} // eslint-disable-line\n) {\n    const transformer = createTransformer(ast);\n    transformer.helper(\"normalize\" /* HelperNameMap.NORMALIZE */);\n    // traverse\n    ast.body && traverseNode(ast.body, transformer);\n    // set meta information\n    const context = transformer.context();\n    ast.helpers = Array.from(context.helpers);\n}\n\nfunction optimize(ast) {\n    const body = ast.body;\n    if (body.type === 2 /* NodeTypes.Message */) {\n        optimizeMessageNode(body);\n    }\n    else {\n        body.cases.forEach(c => optimizeMessageNode(c));\n    }\n    return ast;\n}\nfunction optimizeMessageNode(message) {\n    if (message.items.length === 1) {\n        const item = message.items[0];\n        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n            message.static = item.value;\n            delete item.value; // optimization for size\n        }\n    }\n    else {\n        const values = [];\n        for (let i = 0; i < message.items.length; i++) {\n            const item = message.items[i];\n            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {\n                break;\n            }\n            if (item.value == null) {\n                break;\n            }\n            values.push(item.value);\n        }\n        if (values.length === message.items.length) {\n            message.static = join(values);\n            for (let i = 0; i < message.items.length; i++) {\n                const item = message.items[i];\n                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n                    delete item.value; // optimization for size\n                }\n            }\n        }\n    }\n}\n\nconst ERROR_DOMAIN$1 = 'minifier';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction minify(node) {\n    node.t = node.type;\n    switch (node.type) {\n        case 0 /* NodeTypes.Resource */: {\n            const resource = node;\n            minify(resource.body);\n            resource.b = resource.body;\n            delete resource.body;\n            break;\n        }\n        case 1 /* NodeTypes.Plural */: {\n            const plural = node;\n            const cases = plural.cases;\n            for (let i = 0; i < cases.length; i++) {\n                minify(cases[i]);\n            }\n            plural.c = cases;\n            delete plural.cases;\n            break;\n        }\n        case 2 /* NodeTypes.Message */: {\n            const message = node;\n            const items = message.items;\n            for (let i = 0; i < items.length; i++) {\n                minify(items[i]);\n            }\n            message.i = items;\n            delete message.items;\n            if (message.static) {\n                message.s = message.static;\n                delete message.static;\n            }\n            break;\n        }\n        case 3 /* NodeTypes.Text */:\n        case 9 /* NodeTypes.Literal */:\n        case 8 /* NodeTypes.LinkedModifier */:\n        case 7 /* NodeTypes.LinkedKey */: {\n            const valueNode = node;\n            if (valueNode.value) {\n                valueNode.v = valueNode.value;\n                delete valueNode.value;\n            }\n            break;\n        }\n        case 6 /* NodeTypes.Linked */: {\n            const linked = node;\n            minify(linked.key);\n            linked.k = linked.key;\n            delete linked.key;\n            if (linked.modifier) {\n                minify(linked.modifier);\n                linked.m = linked.modifier;\n                delete linked.modifier;\n            }\n            break;\n        }\n        case 5 /* NodeTypes.List */: {\n            const list = node;\n            list.i = list.index;\n            delete list.index;\n            break;\n        }\n        case 4 /* NodeTypes.Named */: {\n            const named = node;\n            named.k = named.key;\n            delete named.key;\n            break;\n        }\n        default:\n            {\n                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {\n                    domain: ERROR_DOMAIN$1,\n                    args: [node.type]\n                });\n            }\n    }\n    delete node.type;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference types=\"source-map-js\" />\nconst ERROR_DOMAIN = 'parser';\nfunction createCodeGenerator(ast, options) {\n    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;\n    const location = options.location !== false;\n    const _context = {\n        filename,\n        code: '',\n        column: 1,\n        line: 1,\n        offset: 0,\n        map: undefined,\n        breakLineCode,\n        needIndent: _needIndent,\n        indentLevel: 0\n    };\n    if (location && ast.loc) {\n        _context.source = ast.loc.source;\n    }\n    const context = () => _context;\n    function push(code, node) {\n        _context.code += code;\n    }\n    function _newline(n, withBreakLine = true) {\n        const _breakLineCode = withBreakLine ? breakLineCode : '';\n        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);\n    }\n    function indent(withNewLine = true) {\n        const level = ++_context.indentLevel;\n        withNewLine && _newline(level);\n    }\n    function deindent(withNewLine = true) {\n        const level = --_context.indentLevel;\n        withNewLine && _newline(level);\n    }\n    function newline() {\n        _newline(_context.indentLevel);\n    }\n    const helper = (key) => `_${key}`;\n    const needIndent = () => _context.needIndent;\n    return {\n        context,\n        push,\n        indent,\n        deindent,\n        newline,\n        helper,\n        needIndent\n    };\n}\nfunction generateLinkedNode(generator, node) {\n    const { helper } = generator;\n    generator.push(`${helper(\"linked\" /* HelperNameMap.LINKED */)}(`);\n    generateNode(generator, node.key);\n    if (node.modifier) {\n        generator.push(`, `);\n        generateNode(generator, node.modifier);\n        generator.push(`, _type`);\n    }\n    else {\n        generator.push(`, undefined, _type`);\n    }\n    generator.push(`)`);\n}\nfunction generateMessageNode(generator, node) {\n    const { helper, needIndent } = generator;\n    generator.push(`${helper(\"normalize\" /* HelperNameMap.NORMALIZE */)}([`);\n    generator.indent(needIndent());\n    const length = node.items.length;\n    for (let i = 0; i < length; i++) {\n        generateNode(generator, node.items[i]);\n        if (i === length - 1) {\n            break;\n        }\n        generator.push(', ');\n    }\n    generator.deindent(needIndent());\n    generator.push('])');\n}\nfunction generatePluralNode(generator, node) {\n    const { helper, needIndent } = generator;\n    if (node.cases.length > 1) {\n        generator.push(`${helper(\"plural\" /* HelperNameMap.PLURAL */)}([`);\n        generator.indent(needIndent());\n        const length = node.cases.length;\n        for (let i = 0; i < length; i++) {\n            generateNode(generator, node.cases[i]);\n            if (i === length - 1) {\n                break;\n            }\n            generator.push(', ');\n        }\n        generator.deindent(needIndent());\n        generator.push(`])`);\n    }\n}\nfunction generateResource(generator, node) {\n    if (node.body) {\n        generateNode(generator, node.body);\n    }\n    else {\n        generator.push('null');\n    }\n}\nfunction generateNode(generator, node) {\n    const { helper } = generator;\n    switch (node.type) {\n        case 0 /* NodeTypes.Resource */:\n            generateResource(generator, node);\n            break;\n        case 1 /* NodeTypes.Plural */:\n            generatePluralNode(generator, node);\n            break;\n        case 2 /* NodeTypes.Message */:\n            generateMessageNode(generator, node);\n            break;\n        case 6 /* NodeTypes.Linked */:\n            generateLinkedNode(generator, node);\n            break;\n        case 8 /* NodeTypes.LinkedModifier */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        case 7 /* NodeTypes.LinkedKey */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        case 5 /* NodeTypes.List */:\n            generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"list\" /* HelperNameMap.LIST */)}(${node.index}))`, node);\n            break;\n        case 4 /* NodeTypes.Named */:\n            generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"named\" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);\n            break;\n        case 9 /* NodeTypes.Literal */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        case 3 /* NodeTypes.Text */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        default:\n            {\n                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {\n                    domain: ERROR_DOMAIN,\n                    args: [node.type]\n                });\n            }\n    }\n}\n// generate code from AST\nconst generate = (ast, options = {} // eslint-disable-line\n) => {\n    const mode = isString(options.mode) ? options.mode : 'normal';\n    const filename = isString(options.filename)\n        ? options.filename\n        : 'message.intl';\n    const sourceMap = !!options.sourceMap;\n    // prettier-ignore\n    const breakLineCode = options.breakLineCode != null\n        ? options.breakLineCode\n        : mode === 'arrow'\n            ? ';'\n            : '\\n';\n    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';\n    const helpers = ast.helpers || [];\n    const generator = createCodeGenerator(ast, {\n        mode,\n        filename,\n        sourceMap,\n        breakLineCode,\n        needIndent\n    });\n    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);\n    generator.indent(needIndent);\n    if (helpers.length > 0) {\n        generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);\n        generator.newline();\n    }\n    generator.push(`return `);\n    generateNode(generator, ast);\n    generator.deindent(needIndent);\n    generator.push(`}`);\n    delete ast.helpers;\n    const { code, map } = generator.context();\n    return {\n        ast,\n        code,\n        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any\n    };\n};\n\nfunction baseCompile(source, options = {}) {\n    const assignedOptions = assign({}, options);\n    const jit = !!assignedOptions.jit;\n    const enalbeMinify = !!assignedOptions.minify;\n    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;\n    // parse source codes\n    const parser = createParser(assignedOptions);\n    const ast = parser.parse(source);\n    if (!jit) {\n        // transform ASTs\n        transform(ast, assignedOptions);\n        // generate javascript codes\n        return generate(ast, assignedOptions);\n    }\n    else {\n        // optimize ASTs\n        enambeOptimize && optimize(ast);\n        // minimize ASTs\n        enalbeMinify && minify(ast);\n        // In JIT mode, no ast transform, no code generation.\n        return { ast, code: '' };\n    }\n}\n\nexport { CompileErrorCodes, CompileWarnCodes, ERROR_DOMAIN$2 as ERROR_DOMAIN, LOCATION_STUB, baseCompile, createCompileError, createCompileWarn, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages, warnMessages };\n","/*!\n  * core-base v9.14.0\n  * (c) 2024 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nimport { getGlobalThis, isObject, isFunction, isString, isNumber, isPlainObject, assign, join, toDisplayString, isArray, incrementer, format as format$1, isPromise, isBoolean, warn, isRegExp, warnOnce, escapeHtml, inBrowser, mark, measure, isEmptyObject, generateCodeFrame, generateFormatCacheKey, isDate } from '@intlify/shared';\nimport { CompileWarnCodes, CompileErrorCodes, createCompileError, detectHtmlTag, defaultOnError, baseCompile as baseCompile$1 } from '@intlify/message-compiler';\nexport { CompileErrorCodes, createCompileError } from '@intlify/message-compiler';\n\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n    if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\n    }\n    if (typeof __INTLIFY_JIT_COMPILATION__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_JIT_COMPILATION__ = false;\n    }\n    if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n    }\n}\n\nconst pathStateMachine =  [];\npathStateMachine[0 /* States.BEFORE_PATH */] = {\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],\n    [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[1 /* States.IN_PATH */] = {\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],\n    [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[2 /* States.BEFORE_IDENT */] = {\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],\n    [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]\n};\npathStateMachine[3 /* States.IN_IDENT */] = {\n    [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],\n    [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]\n};\npathStateMachine[4 /* States.IN_SUB_PATH */] = {\n    [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],\n    [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [\n        4 /* States.IN_SUB_PATH */,\n        2 /* Actions.INC_SUB_PATH_DEPTH */\n    ],\n    [\"]\" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n    [\"l\" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]\n};\npathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {\n    [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n    [\"l\" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]\n};\npathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {\n    [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n    [\"l\" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]\n};\n/**\n * Check if an expression is a literal value.\n */\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral(exp) {\n    return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\nfunction stripQuotes(str) {\n    const a = str.charCodeAt(0);\n    const b = str.charCodeAt(str.length - 1);\n    return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\nfunction getPathCharType(ch) {\n    if (ch === undefined || ch === null) {\n        return \"o\" /* PathCharTypes.END_OF_FAIL */;\n    }\n    const code = ch.charCodeAt(0);\n    switch (code) {\n        case 0x5b: // [\n        case 0x5d: // ]\n        case 0x2e: // .\n        case 0x22: // \"\n        case 0x27: // '\n            return ch;\n        case 0x5f: // _\n        case 0x24: // $\n        case 0x2d: // -\n            return \"i\" /* PathCharTypes.IDENT */;\n        case 0x09: // Tab (HT)\n        case 0x0a: // Newline (LF)\n        case 0x0d: // Return (CR)\n        case 0xa0: // No-break space (NBSP)\n        case 0xfeff: // Byte Order Mark (BOM)\n        case 0x2028: // Line Separator (LS)\n        case 0x2029: // Paragraph Separator (PS)\n            return \"w\" /* PathCharTypes.WORKSPACE */;\n    }\n    return \"i\" /* PathCharTypes.IDENT */;\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\nfunction formatSubPath(path) {\n    const trimmed = path.trim();\n    // invalid leading 0\n    if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\n        return false;\n    }\n    return isLiteral(trimmed)\n        ? stripQuotes(trimmed)\n        : \"*\" /* PathCharTypes.ASTARISK */ + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\nfunction parse(path) {\n    const keys = [];\n    let index = -1;\n    let mode = 0 /* States.BEFORE_PATH */;\n    let subPathDepth = 0;\n    let c;\n    let key; // eslint-disable-line\n    let newChar;\n    let type;\n    let transition;\n    let action;\n    let typeMap;\n    const actions = [];\n    actions[0 /* Actions.APPEND */] = () => {\n        if (key === undefined) {\n            key = newChar;\n        }\n        else {\n            key += newChar;\n        }\n    };\n    actions[1 /* Actions.PUSH */] = () => {\n        if (key !== undefined) {\n            keys.push(key);\n            key = undefined;\n        }\n    };\n    actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {\n        actions[0 /* Actions.APPEND */]();\n        subPathDepth++;\n    };\n    actions[3 /* Actions.PUSH_SUB_PATH */] = () => {\n        if (subPathDepth > 0) {\n            subPathDepth--;\n            mode = 4 /* States.IN_SUB_PATH */;\n            actions[0 /* Actions.APPEND */]();\n        }\n        else {\n            subPathDepth = 0;\n            if (key === undefined) {\n                return false;\n            }\n            key = formatSubPath(key);\n            if (key === false) {\n                return false;\n            }\n            else {\n                actions[1 /* Actions.PUSH */]();\n            }\n        }\n    };\n    function maybeUnescapeQuote() {\n        const nextChar = path[index + 1];\n        if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&\n            nextChar === \"'\" /* PathCharTypes.SINGLE_QUOTE */) ||\n            (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&\n                nextChar === \"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */)) {\n            index++;\n            newChar = '\\\\' + nextChar;\n            actions[0 /* Actions.APPEND */]();\n            return true;\n        }\n    }\n    while (mode !== null) {\n        index++;\n        c = path[index];\n        if (c === '\\\\' && maybeUnescapeQuote()) {\n            continue;\n        }\n        type = getPathCharType(c);\n        typeMap = pathStateMachine[mode];\n        transition = typeMap[type] || typeMap[\"l\" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;\n        // check parse error\n        if (transition === 8 /* States.ERROR */) {\n            return;\n        }\n        mode = transition[0];\n        if (transition[1] !== undefined) {\n            action = actions[transition[1]];\n            if (action) {\n                newChar = c;\n                if (action() === false) {\n                    return;\n                }\n            }\n        }\n        // check parse finish\n        if (mode === 7 /* States.AFTER_PATH */) {\n            return keys;\n        }\n    }\n}\n// path token cache\nconst cache = new Map();\n/**\n * key-value message resolver\n *\n * @remarks\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveWithKeyValue(obj, path) {\n    return isObject(obj) ? obj[path] : null;\n}\n/**\n * message resolver\n *\n * @remarks\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveValue(obj, path) {\n    // check object\n    if (!isObject(obj)) {\n        return null;\n    }\n    // parse path\n    let hit = cache.get(path);\n    if (!hit) {\n        hit = parse(path);\n        if (hit) {\n            cache.set(path, hit);\n        }\n    }\n    // check hit\n    if (!hit) {\n        return null;\n    }\n    // resolve path value\n    const len = hit.length;\n    let last = obj;\n    let i = 0;\n    while (i < len) {\n        const val = last[hit[i]];\n        if (val === undefined) {\n            return null;\n        }\n        if (isFunction(last)) {\n            return null;\n        }\n        last = val;\n        i++;\n    }\n    return last;\n}\n\nconst DEFAULT_MODIFIER = (str) => str;\nconst DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\nconst DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : join(values);\nconst DEFAULT_INTERPOLATE = toDisplayString;\nfunction pluralDefault(choice, choicesLength) {\n    choice = Math.abs(choice);\n    if (choicesLength === 2) {\n        // prettier-ignore\n        return choice\n            ? choice > 1\n                ? 1\n                : 0\n            : 1;\n    }\n    return choice ? Math.min(choice, 2) : 0;\n}\nfunction getPluralIndex(options) {\n    // prettier-ignore\n    const index = isNumber(options.pluralIndex)\n        ? options.pluralIndex\n        : -1;\n    // prettier-ignore\n    return options.named && (isNumber(options.named.count) || isNumber(options.named.n))\n        ? isNumber(options.named.count)\n            ? options.named.count\n            : isNumber(options.named.n)\n                ? options.named.n\n                : index\n        : index;\n}\nfunction normalizeNamed(pluralIndex, props) {\n    if (!props.count) {\n        props.count = pluralIndex;\n    }\n    if (!props.n) {\n        props.n = pluralIndex;\n    }\n}\nfunction createMessageContext(options = {}) {\n    const locale = options.locale;\n    const pluralIndex = getPluralIndex(options);\n    const pluralRule = isObject(options.pluralRules) &&\n        isString(locale) &&\n        isFunction(options.pluralRules[locale])\n        ? options.pluralRules[locale]\n        : pluralDefault;\n    const orgPluralRule = isObject(options.pluralRules) &&\n        isString(locale) &&\n        isFunction(options.pluralRules[locale])\n        ? pluralDefault\n        : undefined;\n    const plural = (messages) => {\n        return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\n    };\n    const _list = options.list || [];\n    const list = (index) => _list[index];\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const _named = options.named || {};\n    isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\n    const named = (key) => _named[key];\n    function message(key) {\n        // prettier-ignore\n        const msg = isFunction(options.messages)\n            ? options.messages(key)\n            : isObject(options.messages)\n                ? options.messages[key]\n                : false;\n        return !msg\n            ? options.parent\n                ? options.parent.message(key) // resolve from parent messages\n                : DEFAULT_MESSAGE\n            : msg;\n    }\n    const _modifier = (name) => options.modifiers\n        ? options.modifiers[name]\n        : DEFAULT_MODIFIER;\n    const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)\n        ? options.processor.normalize\n        : DEFAULT_NORMALIZE;\n    const interpolate = isPlainObject(options.processor) &&\n        isFunction(options.processor.interpolate)\n        ? options.processor.interpolate\n        : DEFAULT_INTERPOLATE;\n    const type = isPlainObject(options.processor) && isString(options.processor.type)\n        ? options.processor.type\n        : DEFAULT_MESSAGE_DATA_TYPE;\n    const linked = (key, ...args) => {\n        const [arg1, arg2] = args;\n        let type = 'text';\n        let modifier = '';\n        if (args.length === 1) {\n            if (isObject(arg1)) {\n                modifier = arg1.modifier || modifier;\n                type = arg1.type || type;\n            }\n            else if (isString(arg1)) {\n                modifier = arg1 || modifier;\n            }\n        }\n        else if (args.length === 2) {\n            if (isString(arg1)) {\n                modifier = arg1 || modifier;\n            }\n            if (isString(arg2)) {\n                type = arg2 || type;\n            }\n        }\n        const ret = message(key)(ctx);\n        const msg = \n        // The message in vnode resolved with linked are returned as an array by processor.nomalize\n        type === 'vnode' && isArray(ret) && modifier\n            ? ret[0]\n            : ret;\n        return modifier ? _modifier(modifier)(msg, type) : msg;\n    };\n    const ctx = {\n        [\"list\" /* HelperNameMap.LIST */]: list,\n        [\"named\" /* HelperNameMap.NAMED */]: named,\n        [\"plural\" /* HelperNameMap.PLURAL */]: plural,\n        [\"linked\" /* HelperNameMap.LINKED */]: linked,\n        [\"message\" /* HelperNameMap.MESSAGE */]: message,\n        [\"type\" /* HelperNameMap.TYPE */]: type,\n        [\"interpolate\" /* HelperNameMap.INTERPOLATE */]: interpolate,\n        [\"normalize\" /* HelperNameMap.NORMALIZE */]: normalize,\n        [\"values\" /* HelperNameMap.VALUES */]: assign({}, _list, _named)\n    };\n    return ctx;\n}\n\nlet devtools = null;\nfunction setDevToolsHook(hook) {\n    devtools = hook;\n}\nfunction getDevToolsHook() {\n    return devtools;\n}\nfunction initI18nDevTools(i18n, version, meta) {\n    // TODO: queue if devtools is undefined\n    devtools &&\n        devtools.emit(\"i18n:init\" /* IntlifyDevToolsHooks.I18nInit */, {\n            timestamp: Date.now(),\n            i18n,\n            version,\n            meta\n        });\n}\nconst translateDevTools = /* #__PURE__*/ createDevToolsHook(\"function:translate\" /* IntlifyDevToolsHooks.FunctionTranslate */);\nfunction createDevToolsHook(hook) {\n    return (payloads) => devtools && devtools.emit(hook, payloads);\n}\n\nconst code$1 = CompileWarnCodes.__EXTEND_POINT__;\nconst inc$1 = incrementer(code$1);\nconst CoreWarnCodes = {\n    NOT_FOUND_KEY: code$1, // 2\n    FALLBACK_TO_TRANSLATE: inc$1(), // 3\n    CANNOT_FORMAT_NUMBER: inc$1(), // 4\n    FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5\n    CANNOT_FORMAT_DATE: inc$1(), // 6\n    FALLBACK_TO_DATE_FORMAT: inc$1(), // 7\n    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8\n    __EXTEND_POINT__: inc$1() // 9\n};\n/** @internal */\nconst warnMessages = {\n    [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\n    [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\n    [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\n    [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\n    [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\n    [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,\n    [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`\n};\nfunction getWarnMessage(code, ...args) {\n    return format$1(warnMessages[code], ...args);\n}\n\nconst code = CompileErrorCodes.__EXTEND_POINT__;\nconst inc = incrementer(code);\nconst CoreErrorCodes = {\n    INVALID_ARGUMENT: code, // 17\n    INVALID_DATE_ARGUMENT: inc(), // 18\n    INVALID_ISO_DATE_ARGUMENT: inc(), // 19\n    NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20\n    NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21\n    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22\n    NOT_SUPPORT_LOCALE_TYPE: inc(), // 23\n    __EXTEND_POINT__: inc() // 24\n};\nfunction createCoreError(code) {\n    return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages } : undefined);\n}\n/** @internal */\nconst errorMessages = {\n    [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\n    [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +\n        'Make sure your Date represents a valid date.',\n    [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',\n    [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',\n    [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',\n    [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',\n    [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'\n};\n\n/** @internal */\nfunction getLocale(context, options) {\n    return options.locale != null\n        ? resolveLocale(options.locale)\n        : resolveLocale(context.locale);\n}\nlet _resolveLocale;\n/** @internal */\nfunction resolveLocale(locale) {\n    if (isString(locale)) {\n        return locale;\n    }\n    else {\n        if (isFunction(locale)) {\n            if (locale.resolvedOnce && _resolveLocale != null) {\n                return _resolveLocale;\n            }\n            else if (locale.constructor.name === 'Function') {\n                const resolve = locale();\n                if (isPromise(resolve)) {\n                    throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);\n                }\n                return (_resolveLocale = resolve);\n            }\n            else {\n                throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);\n            }\n        }\n        else {\n            throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);\n        }\n    }\n}\n/**\n * Fallback with simple implemenation\n *\n * @remarks\n * A fallback locale function implemented with a simple fallback algorithm.\n *\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars\n) {\n    // prettier-ignore\n    return [...new Set([\n            start,\n            ...(isArray(fallback)\n                ? fallback\n                : isObject(fallback)\n                    ? Object.keys(fallback)\n                    : isString(fallback)\n                        ? [fallback]\n                        : [start])\n        ])];\n}\n/**\n * Fallback with locale chain\n *\n * @remarks\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\n    const startLocale = isString(start) ? start : DEFAULT_LOCALE;\n    const context = ctx;\n    if (!context.__localeChainCache) {\n        context.__localeChainCache = new Map();\n    }\n    let chain = context.__localeChainCache.get(startLocale);\n    if (!chain) {\n        chain = [];\n        // first block defined by start\n        let block = [start];\n        // while any intervening block found\n        while (isArray(block)) {\n            block = appendBlockToChain(chain, block, fallback);\n        }\n        // prettier-ignore\n        // last block defined by default\n        const defaults = isArray(fallback) || !isPlainObject(fallback)\n            ? fallback\n            : fallback['default']\n                ? fallback['default']\n                : null;\n        // convert defaults to array\n        block = isString(defaults) ? [defaults] : defaults;\n        if (isArray(block)) {\n            appendBlockToChain(chain, block, false);\n        }\n        context.__localeChainCache.set(startLocale, chain);\n    }\n    return chain;\n}\nfunction appendBlockToChain(chain, block, blocks) {\n    let follow = true;\n    for (let i = 0; i < block.length && isBoolean(follow); i++) {\n        const locale = block[i];\n        if (isString(locale)) {\n            follow = appendLocaleToChain(chain, block[i], blocks);\n        }\n    }\n    return follow;\n}\nfunction appendLocaleToChain(chain, locale, blocks) {\n    let follow;\n    const tokens = locale.split('-');\n    do {\n        const target = tokens.join('-');\n        follow = appendItemToChain(chain, target, blocks);\n        tokens.splice(-1, 1);\n    } while (tokens.length && follow === true);\n    return follow;\n}\nfunction appendItemToChain(chain, target, blocks) {\n    let follow = false;\n    if (!chain.includes(target)) {\n        follow = true;\n        if (target) {\n            follow = target[target.length - 1] !== '!';\n            const locale = target.replace(/!/g, '');\n            chain.push(locale);\n            if ((isArray(blocks) || isPlainObject(blocks)) &&\n                blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\n            ) {\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                follow = blocks[locale];\n            }\n        }\n    }\n    return follow;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Intlify core-base version\n * @internal\n */\nconst VERSION = '9.14.0';\nconst NOT_REOSLVED = -1;\nconst DEFAULT_LOCALE = 'en-US';\nconst MISSING_RESOLVE_VALUE = '';\nconst capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\nfunction getDefaultLinkedModifiers() {\n    return {\n        upper: (val, type) => {\n            // prettier-ignore\n            return type === 'text' && isString(val)\n                ? val.toUpperCase()\n                : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n                    ? val.children.toUpperCase()\n                    : val;\n        },\n        lower: (val, type) => {\n            // prettier-ignore\n            return type === 'text' && isString(val)\n                ? val.toLowerCase()\n                : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n                    ? val.children.toLowerCase()\n                    : val;\n        },\n        capitalize: (val, type) => {\n            // prettier-ignore\n            return (type === 'text' && isString(val)\n                ? capitalize(val)\n                : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n                    ? capitalize(val.children)\n                    : val);\n        }\n    };\n}\nlet _compiler;\nfunction registerMessageCompiler(compiler) {\n    _compiler = compiler;\n}\nlet _resolver;\n/**\n * Register the message resolver\n *\n * @param resolver - A {@link MessageResolver} function\n *\n * @VueI18nGeneral\n */\nfunction registerMessageResolver(resolver) {\n    _resolver = resolver;\n}\nlet _fallbacker;\n/**\n * Register the locale fallbacker\n *\n * @param fallbacker - A {@link LocaleFallbacker} function\n *\n * @VueI18nGeneral\n */\nfunction registerLocaleFallbacker(fallbacker) {\n    _fallbacker = fallbacker;\n}\n// Additional Meta for Intlify DevTools\nlet _additionalMeta =  null;\n/* #__NO_SIDE_EFFECTS__ */\nconst setAdditionalMeta = (meta) => {\n    _additionalMeta = meta;\n};\n/* #__NO_SIDE_EFFECTS__ */\nconst getAdditionalMeta = () => _additionalMeta;\nlet _fallbackContext = null;\nconst setFallbackContext = (context) => {\n    _fallbackContext = context;\n};\nconst getFallbackContext = () => _fallbackContext;\n// ID for CoreContext\nlet _cid = 0;\nfunction createCoreContext(options = {}) {\n    // setup options\n    const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;\n    const version = isString(options.version) ? options.version : VERSION;\n    const locale = isString(options.locale) || isFunction(options.locale)\n        ? options.locale\n        : DEFAULT_LOCALE;\n    const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;\n    const fallbackLocale = isArray(options.fallbackLocale) ||\n        isPlainObject(options.fallbackLocale) ||\n        isString(options.fallbackLocale) ||\n        options.fallbackLocale === false\n        ? options.fallbackLocale\n        : _locale;\n    const messages = isPlainObject(options.messages)\n        ? options.messages\n        : { [_locale]: {} };\n    const datetimeFormats = isPlainObject(options.datetimeFormats)\n            ? options.datetimeFormats\n            : { [_locale]: {} }\n        ;\n    const numberFormats = isPlainObject(options.numberFormats)\n            ? options.numberFormats\n            : { [_locale]: {} }\n        ;\n    const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());\n    const pluralRules = options.pluralRules || {};\n    const missing = isFunction(options.missing) ? options.missing : null;\n    const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n        ? options.missingWarn\n        : true;\n    const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n        ? options.fallbackWarn\n        : true;\n    const fallbackFormat = !!options.fallbackFormat;\n    const unresolving = !!options.unresolving;\n    const postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : null;\n    const processor = isPlainObject(options.processor) ? options.processor : null;\n    const warnHtmlMessage = isBoolean(options.warnHtmlMessage)\n        ? options.warnHtmlMessage\n        : true;\n    const escapeParameter = !!options.escapeParameter;\n    const messageCompiler = isFunction(options.messageCompiler)\n        ? options.messageCompiler\n        : _compiler;\n    if ((process.env.NODE_ENV !== 'production') &&\n        !false &&\n        !false &&\n        isFunction(options.messageCompiler)) {\n        warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));\n    }\n    const messageResolver = isFunction(options.messageResolver)\n        ? options.messageResolver\n        : _resolver || resolveWithKeyValue;\n    const localeFallbacker = isFunction(options.localeFallbacker)\n        ? options.localeFallbacker\n        : _fallbacker || fallbackWithSimple;\n    const fallbackContext = isObject(options.fallbackContext)\n        ? options.fallbackContext\n        : undefined;\n    // setup internal options\n    const internalOptions = options;\n    const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)\n            ? internalOptions.__datetimeFormatters\n            : new Map()\n        ;\n    const __numberFormatters = isObject(internalOptions.__numberFormatters)\n            ? internalOptions.__numberFormatters\n            : new Map()\n        ;\n    const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};\n    _cid++;\n    const context = {\n        version,\n        cid: _cid,\n        locale,\n        fallbackLocale,\n        messages,\n        modifiers,\n        pluralRules,\n        missing,\n        missingWarn,\n        fallbackWarn,\n        fallbackFormat,\n        unresolving,\n        postTranslation,\n        processor,\n        warnHtmlMessage,\n        escapeParameter,\n        messageCompiler,\n        messageResolver,\n        localeFallbacker,\n        fallbackContext,\n        onWarn,\n        __meta\n    };\n    {\n        context.datetimeFormats = datetimeFormats;\n        context.numberFormats = numberFormats;\n        context.__datetimeFormatters = __datetimeFormatters;\n        context.__numberFormatters = __numberFormatters;\n    }\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        context.__v_emitter =\n            internalOptions.__v_emitter != null\n                ? internalOptions.__v_emitter\n                : undefined;\n    }\n    // NOTE: experimental !!\n    if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n        initI18nDevTools(context, version, __meta);\n    }\n    return context;\n}\n/** @internal */\nfunction isTranslateFallbackWarn(fallback, key) {\n    return fallback instanceof RegExp ? fallback.test(key) : fallback;\n}\n/** @internal */\nfunction isTranslateMissingWarn(missing, key) {\n    return missing instanceof RegExp ? missing.test(key) : missing;\n}\n/** @internal */\nfunction handleMissing(context, key, locale, missingWarn, type) {\n    const { missing, onWarn } = context;\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        const emitter = context.__v_emitter;\n        if (emitter) {\n            emitter.emit(\"missing\" /* VueDevToolsTimelineEvents.MISSING */, {\n                locale,\n                key,\n                type,\n                groupId: `${type}:${key}`\n            });\n        }\n    }\n    if (missing !== null) {\n        const ret = missing(context, locale, key, type);\n        return isString(ret) ? ret : key;\n    }\n    else {\n        if ((process.env.NODE_ENV !== 'production') && isTranslateMissingWarn(missingWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));\n        }\n        return key;\n    }\n}\n/** @internal */\nfunction updateFallbackLocale(ctx, locale, fallback) {\n    const context = ctx;\n    context.__localeChainCache = new Map();\n    ctx.localeFallbacker(ctx, fallback, locale);\n}\n/** @internal */\nfunction isAlmostSameLocale(locale, compareLocale) {\n    if (locale === compareLocale)\n        return false;\n    return locale.split('-')[0] === compareLocale.split('-')[0];\n}\n/** @internal */\nfunction isImplicitFallback(targetLocale, locales) {\n    const index = locales.indexOf(targetLocale);\n    if (index === -1) {\n        return false;\n    }\n    for (let i = index + 1; i < locales.length; i++) {\n        if (isAlmostSameLocale(targetLocale, locales[i])) {\n            return true;\n        }\n    }\n    return false;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nfunction format(ast) {\n    const msg = (ctx) => formatParts(ctx, ast);\n    return msg;\n}\nfunction formatParts(ctx, ast) {\n    const body = ast.b || ast.body;\n    if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {\n        const plural = body;\n        const cases = plural.c || plural.cases;\n        return ctx.plural(cases.reduce((messages, c) => [\n            ...messages,\n            formatMessageParts(ctx, c)\n        ], []));\n    }\n    else {\n        return formatMessageParts(ctx, body);\n    }\n}\nfunction formatMessageParts(ctx, node) {\n    const _static = node.s || node.static;\n    if (_static) {\n        return ctx.type === 'text'\n            ? _static\n            : ctx.normalize([_static]);\n    }\n    else {\n        const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);\n        return ctx.normalize(messages);\n    }\n}\nfunction formatMessagePart(ctx, node) {\n    const type = node.t || node.type;\n    switch (type) {\n        case 3 /* NodeTypes.Text */: {\n            const text = node;\n            return (text.v || text.value);\n        }\n        case 9 /* NodeTypes.Literal */: {\n            const literal = node;\n            return (literal.v || literal.value);\n        }\n        case 4 /* NodeTypes.Named */: {\n            const named = node;\n            return ctx.interpolate(ctx.named(named.k || named.key));\n        }\n        case 5 /* NodeTypes.List */: {\n            const list = node;\n            return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));\n        }\n        case 6 /* NodeTypes.Linked */: {\n            const linked = node;\n            const modifier = linked.m || linked.modifier;\n            return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);\n        }\n        case 7 /* NodeTypes.LinkedKey */: {\n            const linkedKey = node;\n            return (linkedKey.v || linkedKey.value);\n        }\n        case 8 /* NodeTypes.LinkedModifier */: {\n            const linkedModifier = node;\n            return (linkedModifier.v || linkedModifier.value);\n        }\n        default:\n            throw new Error(`unhandled node type on format message part: ${type}`);\n    }\n}\n\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\nfunction checkHtmlMessage(source, warnHtmlMessage) {\n    if (warnHtmlMessage && detectHtmlTag(source)) {\n        warn(format$1(WARN_MESSAGE, { source }));\n    }\n}\nconst defaultOnCacheKey = (message) => message;\nlet compileCache = Object.create(null);\nfunction onCompileWarn(_warn) {\n    if (_warn.code === CompileWarnCodes.USE_MODULO_SYNTAX) {\n        warn(`The use of named interpolation with modulo syntax is deprecated. ` +\n            `It will be removed in v10.\\n` +\n            `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \\n` +\n            `(message compiler warning message: ${_warn.message})`);\n    }\n}\nfunction clearCompileCache() {\n    compileCache = Object.create(null);\n}\nconst isMessageAST = (val) => isObject(val) &&\n    (val.t === 0 || val.type === 0) &&\n    ('b' in val || 'body' in val);\nfunction baseCompile(message, options = {}) {\n    // error detecting on compile\n    let detectError = false;\n    const onError = options.onError || defaultOnError;\n    options.onError = (err) => {\n        detectError = true;\n        onError(err);\n    };\n    // compile with mesasge-compiler\n    return { ...baseCompile$1(message, options), detectError };\n}\n/* #__NO_SIDE_EFFECTS__ */\nconst compileToFunction = (message, context) => {\n    if (!isString(message)) {\n        throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);\n    }\n    // set onWarn\n    if ((process.env.NODE_ENV !== 'production')) {\n        context.onWarn = onCompileWarn;\n    }\n    {\n        // check HTML message\n        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)\n            ? context.warnHtmlMessage\n            : true;\n        (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);\n        // check caches\n        const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n        const cacheKey = onCacheKey(message);\n        const cached = compileCache[cacheKey];\n        if (cached) {\n            return cached;\n        }\n        // compile\n        const { code, detectError } = baseCompile(message, context);\n        // evaluate function\n        const msg = new Function(`return ${code}`)();\n        // if occurred compile error, don't cache\n        return !detectError\n            ? (compileCache[cacheKey] = msg)\n            : msg;\n    }\n};\nfunction compile(message, context) {\n    // set onWarn\n    if ((process.env.NODE_ENV !== 'production')) {\n        context.onWarn = onCompileWarn;\n    }\n    if (((__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__)) &&\n        isString(message)) {\n        // check HTML message\n        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)\n            ? context.warnHtmlMessage\n            : true;\n        (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);\n        // check caches\n        const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n        const cacheKey = onCacheKey(message);\n        const cached = compileCache[cacheKey];\n        if (cached) {\n            return cached;\n        }\n        // compile with JIT mode\n        const { ast, detectError } = baseCompile(message, {\n            ...context,\n            location: (process.env.NODE_ENV !== 'production'),\n            jit: true\n        });\n        // compose message function from AST\n        const msg = format(ast);\n        // if occurred compile error, don't cache\n        return !detectError\n            ? (compileCache[cacheKey] = msg)\n            : msg;\n    }\n    else {\n        if ((process.env.NODE_ENV !== 'production') && !isMessageAST(message)) {\n            warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);\n            return (() => message);\n        }\n        // AST case (passed from bundler)\n        const cacheKey = message.cacheKey;\n        if (cacheKey) {\n            const cached = compileCache[cacheKey];\n            if (cached) {\n                return cached;\n            }\n            // compose message function from message (AST)\n            return (compileCache[cacheKey] =\n                format(message));\n        }\n        else {\n            return format(message);\n        }\n    }\n}\n\nconst NOOP_MESSAGE_FUNCTION = () => '';\nconst isMessageFunction = (val) => isFunction(val);\n// implementation of `translate` function\nfunction translate(context, ...args) {\n    const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;\n    const [key, options] = parseTranslateArgs(...args);\n    const missingWarn = isBoolean(options.missingWarn)\n        ? options.missingWarn\n        : context.missingWarn;\n    const fallbackWarn = isBoolean(options.fallbackWarn)\n        ? options.fallbackWarn\n        : context.fallbackWarn;\n    const escapeParameter = isBoolean(options.escapeParameter)\n        ? options.escapeParameter\n        : context.escapeParameter;\n    const resolvedMessage = !!options.resolvedMessage;\n    // prettier-ignore\n    const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option\n        ? !isBoolean(options.default)\n            ? options.default\n            : (!messageCompiler ? () => key : key)\n        : fallbackFormat // default by `fallbackFormat` option\n            ? (!messageCompiler ? () => key : key)\n            : '';\n    const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';\n    const locale = getLocale(context, options);\n    // escape params\n    escapeParameter && escapeParams(options);\n    // resolve message format\n    // eslint-disable-next-line prefer-const\n    let [formatScope, targetLocale, message] = !resolvedMessage\n        ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)\n        : [\n            key,\n            locale,\n            messages[locale] || {}\n        ];\n    // NOTE:\n    //  Fix to work around `ssrTransfrom` bug in Vite.\n    //  https://github.com/vitejs/vite/issues/4306\n    //  To get around this, use temporary variables.\n    //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\n    let format = formatScope;\n    // if you use default message, set it as message format!\n    let cacheBaseKey = key;\n    if (!resolvedMessage &&\n        !(isString(format) ||\n            isMessageAST(format) ||\n            isMessageFunction(format))) {\n        if (enableDefaultMsg) {\n            format = defaultMsgOrKey;\n            cacheBaseKey = format;\n        }\n    }\n    // checking message format and target locale\n    if (!resolvedMessage &&\n        (!(isString(format) ||\n            isMessageAST(format) ||\n            isMessageFunction(format)) ||\n            !isString(targetLocale))) {\n        return unresolving ? NOT_REOSLVED : key;\n    }\n    // TODO: refactor\n    if ((process.env.NODE_ENV !== 'production') && isString(format) && context.messageCompiler == null) {\n        warn(`The message format compilation is not supported in this build. ` +\n            `Because message compiler isn't included. ` +\n            `You need to pre-compilation all message format. ` +\n            `So translate function return '${key}'.`);\n        return key;\n    }\n    // setup compile error detecting\n    let occurred = false;\n    const onError = () => {\n        occurred = true;\n    };\n    // compile message format\n    const msg = !isMessageFunction(format)\n        ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)\n        : format;\n    // if occurred compile error, return the message format\n    if (occurred) {\n        return format;\n    }\n    // evaluate message with context\n    const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\n    const msgContext = createMessageContext(ctxOptions);\n    const messaged = evaluateMessage(context, msg, msgContext);\n    // if use post translation option, proceed it with handler\n    const ret = postTranslation\n        ? postTranslation(messaged, key)\n        : messaged;\n    // NOTE: experimental !!\n    if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n        // prettier-ignore\n        const payloads = {\n            timestamp: Date.now(),\n            key: isString(key)\n                ? key\n                : isMessageFunction(format)\n                    ? format.key\n                    : '',\n            locale: targetLocale || (isMessageFunction(format)\n                ? format.locale\n                : ''),\n            format: isString(format)\n                ? format\n                : isMessageFunction(format)\n                    ? format.source\n                    : '',\n            message: ret\n        };\n        payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});\n        translateDevTools(payloads);\n    }\n    return ret;\n}\nfunction escapeParams(options) {\n    if (isArray(options.list)) {\n        options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);\n    }\n    else if (isObject(options.named)) {\n        Object.keys(options.named).forEach(key => {\n            if (isString(options.named[key])) {\n                options.named[key] = escapeHtml(options.named[key]);\n            }\n        });\n    }\n}\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\n    const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;\n    const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\n    let message = {};\n    let targetLocale;\n    let format = null;\n    let from = locale;\n    let to = null;\n    const type = 'translate';\n    for (let i = 0; i < locales.length; i++) {\n        targetLocale = to = locales[i];\n        if ((process.env.NODE_ENV !== 'production') &&\n            locale !== targetLocale &&\n            !isAlmostSameLocale(locale, targetLocale) &&\n            isTranslateFallbackWarn(fallbackWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\n                key,\n                target: targetLocale\n            }));\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n            const emitter = context.__v_emitter;\n            if (emitter) {\n                emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n                    type,\n                    key,\n                    from,\n                    to,\n                    groupId: `${type}:${key}`\n                });\n            }\n        }\n        message =\n            messages[targetLocale] || {};\n        // for vue-devtools timeline event\n        let start = null;\n        let startTag;\n        let endTag;\n        if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n            start = window.performance.now();\n            startTag = 'intlify-message-resolve-start';\n            endTag = 'intlify-message-resolve-end';\n            mark && mark(startTag);\n        }\n        if ((format = resolveValue(message, key)) === null) {\n            // if null, resolve with object key path\n            format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n            const end = window.performance.now();\n            const emitter = context.__v_emitter;\n            if (emitter && start && format) {\n                emitter.emit(\"message-resolve\" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {\n                    type: \"message-resolve\" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,\n                    key,\n                    message: format,\n                    time: end - start,\n                    groupId: `${type}:${key}`\n                });\n            }\n            if (startTag && endTag && mark && measure) {\n                mark(endTag);\n                measure('intlify message resolve', startTag, endTag);\n            }\n        }\n        if (isString(format) || isMessageAST(format) || isMessageFunction(format)) {\n            break;\n        }\n        if (!isImplicitFallback(targetLocale, locales)) {\n            const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n            key, targetLocale, missingWarn, type);\n            if (missingRet !== key) {\n                format = missingRet;\n            }\n        }\n        from = to;\n    }\n    return [format, targetLocale, message];\n}\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {\n    const { messageCompiler, warnHtmlMessage } = context;\n    if (isMessageFunction(format)) {\n        const msg = format;\n        msg.locale = msg.locale || targetLocale;\n        msg.key = msg.key || key;\n        return msg;\n    }\n    if (messageCompiler == null) {\n        const msg = (() => format);\n        msg.locale = targetLocale;\n        msg.key = key;\n        return msg;\n    }\n    // for vue-devtools timeline event\n    let start = null;\n    let startTag;\n    let endTag;\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        start = window.performance.now();\n        startTag = 'intlify-message-compilation-start';\n        endTag = 'intlify-message-compilation-end';\n        mark && mark(startTag);\n    }\n    const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        const end = window.performance.now();\n        const emitter = context.__v_emitter;\n        if (emitter && start) {\n            emitter.emit(\"message-compilation\" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {\n                type: \"message-compilation\" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,\n                message: format,\n                time: end - start,\n                groupId: `${'translate'}:${key}`\n            });\n        }\n        if (startTag && endTag && mark && measure) {\n            mark(endTag);\n            measure('intlify message compilation', startTag, endTag);\n        }\n    }\n    msg.locale = targetLocale;\n    msg.key = key;\n    msg.source = format;\n    return msg;\n}\nfunction evaluateMessage(context, msg, msgCtx) {\n    // for vue-devtools timeline event\n    let start = null;\n    let startTag;\n    let endTag;\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        start = window.performance.now();\n        startTag = 'intlify-message-evaluation-start';\n        endTag = 'intlify-message-evaluation-end';\n        mark && mark(startTag);\n    }\n    const messaged = msg(msgCtx);\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        const end = window.performance.now();\n        const emitter = context.__v_emitter;\n        if (emitter && start) {\n            emitter.emit(\"message-evaluation\" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {\n                type: \"message-evaluation\" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,\n                value: messaged,\n                time: end - start,\n                groupId: `${'translate'}:${msg.key}`\n            });\n        }\n        if (startTag && endTag && mark && measure) {\n            mark(endTag);\n            measure('intlify message evaluation', startTag, endTag);\n        }\n    }\n    return messaged;\n}\n/** @internal */\nfunction parseTranslateArgs(...args) {\n    const [arg1, arg2, arg3] = args;\n    const options = {};\n    if (!isString(arg1) &&\n        !isNumber(arg1) &&\n        !isMessageFunction(arg1) &&\n        !isMessageAST(arg1)) {\n        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n    }\n    // prettier-ignore\n    const key = isNumber(arg1)\n        ? String(arg1)\n        : isMessageFunction(arg1)\n            ? arg1\n            : arg1;\n    if (isNumber(arg2)) {\n        options.plural = arg2;\n    }\n    else if (isString(arg2)) {\n        options.default = arg2;\n    }\n    else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {\n        options.named = arg2;\n    }\n    else if (isArray(arg2)) {\n        options.list = arg2;\n    }\n    if (isNumber(arg3)) {\n        options.plural = arg3;\n    }\n    else if (isString(arg3)) {\n        options.default = arg3;\n    }\n    else if (isPlainObject(arg3)) {\n        assign(options, arg3);\n    }\n    return [key, options];\n}\nfunction getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {\n    return {\n        locale,\n        key,\n        warnHtmlMessage,\n        onError: (err) => {\n            onError && onError(err);\n            if ((process.env.NODE_ENV !== 'production')) {\n                const _source = getSourceForCodeFrame(source);\n                const message = `Message compilation error: ${err.message}`;\n                const codeFrame = err.location &&\n                    _source &&\n                    generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);\n                const emitter = context.__v_emitter;\n                if (emitter && _source) {\n                    emitter.emit(\"compile-error\" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {\n                        message: _source,\n                        error: err.message,\n                        start: err.location && err.location.start.offset,\n                        end: err.location && err.location.end.offset,\n                        groupId: `${'translate'}:${key}`\n                    });\n                }\n                console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\n            }\n            else {\n                throw err;\n            }\n        },\n        onCacheKey: (source) => generateFormatCacheKey(locale, key, source)\n    };\n}\nfunction getSourceForCodeFrame(source) {\n    if (isString(source)) {\n        return source;\n    }\n    else {\n        if (source.loc && source.loc.source) {\n            return source.loc.source;\n        }\n    }\n}\nfunction getMessageContextOptions(context, locale, message, options) {\n    const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;\n    const resolveMessage = (key) => {\n        let val = resolveValue(message, key);\n        // fallback to root context\n        if (val == null && fallbackContext) {\n            const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);\n            val = resolveValue(message, key);\n        }\n        if (isString(val) || isMessageAST(val)) {\n            let occurred = false;\n            const onError = () => {\n                occurred = true;\n            };\n            const msg = compileMessageFormat(context, key, locale, val, key, onError);\n            return !occurred\n                ? msg\n                : NOOP_MESSAGE_FUNCTION;\n        }\n        else if (isMessageFunction(val)) {\n            return val;\n        }\n        else {\n            // TODO: should be implemented warning message\n            return NOOP_MESSAGE_FUNCTION;\n        }\n    };\n    const ctxOptions = {\n        locale,\n        modifiers,\n        pluralRules,\n        messages: resolveMessage\n    };\n    if (context.processor) {\n        ctxOptions.processor = context.processor;\n    }\n    if (options.list) {\n        ctxOptions.list = options.list;\n    }\n    if (options.named) {\n        ctxOptions.named = options.named;\n    }\n    if (isNumber(options.plural)) {\n        ctxOptions.pluralIndex = options.plural;\n    }\n    return ctxOptions;\n}\n\nconst intlDefined = typeof Intl !== 'undefined';\nconst Availabilities = {\n    dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n    numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n};\n\n// implementation of `datetime` function\nfunction datetime(context, ...args) {\n    const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n    const { __datetimeFormatters } = context;\n    if ((process.env.NODE_ENV !== 'production') && !Availabilities.dateTimeFormat) {\n        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\n        return MISSING_RESOLVE_VALUE;\n    }\n    const [key, value, options, overrides] = parseDateTimeArgs(...args);\n    const missingWarn = isBoolean(options.missingWarn)\n        ? options.missingWarn\n        : context.missingWarn;\n    const fallbackWarn = isBoolean(options.fallbackWarn)\n        ? options.fallbackWarn\n        : context.fallbackWarn;\n    const part = !!options.part;\n    const locale = getLocale(context, options);\n    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n    fallbackLocale, locale);\n    if (!isString(key) || key === '') {\n        return new Intl.DateTimeFormat(locale, overrides).format(value);\n    }\n    // resolve format\n    let datetimeFormat = {};\n    let targetLocale;\n    let format = null;\n    let from = locale;\n    let to = null;\n    const type = 'datetime format';\n    for (let i = 0; i < locales.length; i++) {\n        targetLocale = to = locales[i];\n        if ((process.env.NODE_ENV !== 'production') &&\n            locale !== targetLocale &&\n            isTranslateFallbackWarn(fallbackWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\n                key,\n                target: targetLocale\n            }));\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n            const emitter = context.__v_emitter;\n            if (emitter) {\n                emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n                    type,\n                    key,\n                    from,\n                    to,\n                    groupId: `${type}:${key}`\n                });\n            }\n        }\n        datetimeFormat =\n            datetimeFormats[targetLocale] || {};\n        format = datetimeFormat[key];\n        if (isPlainObject(format))\n            break;\n        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n        from = to;\n    }\n    // checking format and target locale\n    if (!isPlainObject(format) || !isString(targetLocale)) {\n        return unresolving ? NOT_REOSLVED : key;\n    }\n    let id = `${targetLocale}__${key}`;\n    if (!isEmptyObject(overrides)) {\n        id = `${id}__${JSON.stringify(overrides)}`;\n    }\n    let formatter = __datetimeFormatters.get(id);\n    if (!formatter) {\n        formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));\n        __datetimeFormatters.set(id, formatter);\n    }\n    return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst DATETIME_FORMAT_OPTIONS_KEYS = [\n    'localeMatcher',\n    'weekday',\n    'era',\n    'year',\n    'month',\n    'day',\n    'hour',\n    'minute',\n    'second',\n    'timeZoneName',\n    'formatMatcher',\n    'hour12',\n    'timeZone',\n    'dateStyle',\n    'timeStyle',\n    'calendar',\n    'dayPeriod',\n    'numberingSystem',\n    'hourCycle',\n    'fractionalSecondDigits'\n];\n/** @internal */\nfunction parseDateTimeArgs(...args) {\n    const [arg1, arg2, arg3, arg4] = args;\n    const options = {};\n    let overrides = {};\n    let value;\n    if (isString(arg1)) {\n        // Only allow ISO strings - other date formats are often supported,\n        // but may cause different results in different browsers.\n        const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\n        if (!matches) {\n            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n        }\n        // Some browsers can not parse the iso datetime separated by space,\n        // this is a compromise solution by replace the 'T'/' ' with 'T'\n        const dateTime = matches[3]\n            ? matches[3].trim().startsWith('T')\n                ? `${matches[1].trim()}${matches[3].trim()}`\n                : `${matches[1].trim()}T${matches[3].trim()}`\n            : matches[1].trim();\n        value = new Date(dateTime);\n        try {\n            // This will fail if the date is not valid\n            value.toISOString();\n        }\n        catch (e) {\n            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n        }\n    }\n    else if (isDate(arg1)) {\n        if (isNaN(arg1.getTime())) {\n            throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\n        }\n        value = arg1;\n    }\n    else if (isNumber(arg1)) {\n        value = arg1;\n    }\n    else {\n        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n    }\n    if (isString(arg2)) {\n        options.key = arg2;\n    }\n    else if (isPlainObject(arg2)) {\n        Object.keys(arg2).forEach(key => {\n            if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\n                overrides[key] = arg2[key];\n            }\n            else {\n                options[key] = arg2[key];\n            }\n        });\n    }\n    if (isString(arg3)) {\n        options.locale = arg3;\n    }\n    else if (isPlainObject(arg3)) {\n        overrides = arg3;\n    }\n    if (isPlainObject(arg4)) {\n        overrides = arg4;\n    }\n    return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearDateTimeFormat(ctx, locale, format) {\n    const context = ctx;\n    for (const key in format) {\n        const id = `${locale}__${key}`;\n        if (!context.__datetimeFormatters.has(id)) {\n            continue;\n        }\n        context.__datetimeFormatters.delete(id);\n    }\n}\n\n// implementation of `number` function\nfunction number(context, ...args) {\n    const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n    const { __numberFormatters } = context;\n    if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {\n        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\n        return MISSING_RESOLVE_VALUE;\n    }\n    const [key, value, options, overrides] = parseNumberArgs(...args);\n    const missingWarn = isBoolean(options.missingWarn)\n        ? options.missingWarn\n        : context.missingWarn;\n    const fallbackWarn = isBoolean(options.fallbackWarn)\n        ? options.fallbackWarn\n        : context.fallbackWarn;\n    const part = !!options.part;\n    const locale = getLocale(context, options);\n    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n    fallbackLocale, locale);\n    if (!isString(key) || key === '') {\n        return new Intl.NumberFormat(locale, overrides).format(value);\n    }\n    // resolve format\n    let numberFormat = {};\n    let targetLocale;\n    let format = null;\n    let from = locale;\n    let to = null;\n    const type = 'number format';\n    for (let i = 0; i < locales.length; i++) {\n        targetLocale = to = locales[i];\n        if ((process.env.NODE_ENV !== 'production') &&\n            locale !== targetLocale &&\n            isTranslateFallbackWarn(fallbackWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\n                key,\n                target: targetLocale\n            }));\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n            const emitter = context.__v_emitter;\n            if (emitter) {\n                emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n                    type,\n                    key,\n                    from,\n                    to,\n                    groupId: `${type}:${key}`\n                });\n            }\n        }\n        numberFormat =\n            numberFormats[targetLocale] || {};\n        format = numberFormat[key];\n        if (isPlainObject(format))\n            break;\n        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n        from = to;\n    }\n    // checking format and target locale\n    if (!isPlainObject(format) || !isString(targetLocale)) {\n        return unresolving ? NOT_REOSLVED : key;\n    }\n    let id = `${targetLocale}__${key}`;\n    if (!isEmptyObject(overrides)) {\n        id = `${id}__${JSON.stringify(overrides)}`;\n    }\n    let formatter = __numberFormatters.get(id);\n    if (!formatter) {\n        formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));\n        __numberFormatters.set(id, formatter);\n    }\n    return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst NUMBER_FORMAT_OPTIONS_KEYS = [\n    'localeMatcher',\n    'style',\n    'currency',\n    'currencyDisplay',\n    'currencySign',\n    'useGrouping',\n    'minimumIntegerDigits',\n    'minimumFractionDigits',\n    'maximumFractionDigits',\n    'minimumSignificantDigits',\n    'maximumSignificantDigits',\n    'compactDisplay',\n    'notation',\n    'signDisplay',\n    'unit',\n    'unitDisplay',\n    'roundingMode',\n    'roundingPriority',\n    'roundingIncrement',\n    'trailingZeroDisplay'\n];\n/** @internal */\nfunction parseNumberArgs(...args) {\n    const [arg1, arg2, arg3, arg4] = args;\n    const options = {};\n    let overrides = {};\n    if (!isNumber(arg1)) {\n        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n    }\n    const value = arg1;\n    if (isString(arg2)) {\n        options.key = arg2;\n    }\n    else if (isPlainObject(arg2)) {\n        Object.keys(arg2).forEach(key => {\n            if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\n                overrides[key] = arg2[key];\n            }\n            else {\n                options[key] = arg2[key];\n            }\n        });\n    }\n    if (isString(arg3)) {\n        options.locale = arg3;\n    }\n    else if (isPlainObject(arg3)) {\n        overrides = arg3;\n    }\n    if (isPlainObject(arg4)) {\n        overrides = arg4;\n    }\n    return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearNumberFormat(ctx, locale, format) {\n    const context = ctx;\n    for (const key in format) {\n        const id = `${locale}__${key}`;\n        if (!context.__numberFormatters.has(id)) {\n            continue;\n        }\n        context.__numberFormatters.delete(id);\n    }\n}\n\n{\n    initFeatureFlags();\n}\n\nexport { CoreErrorCodes, CoreWarnCodes, DATETIME_FORMAT_OPTIONS_KEYS, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, NUMBER_FORMAT_OPTIONS_KEYS, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compile, compileToFunction, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getFallbackContext, getLocale, getWarnMessage, handleMissing, initI18nDevTools, isAlmostSameLocale, isImplicitFallback, isMessageAST, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveLocale, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, setFallbackContext, translate, translateDevTools, updateFallbackLocale };\n","/*!\n  * vue-i18n v9.14.0\n  * (c) 2024 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nimport { getGlobalThis, incrementer, format, makeSymbol, isPlainObject, isArray, deepCopy, isString, hasOwn, isObject, warn, warnOnce, isBoolean, isRegExp, isFunction, inBrowser, assign, isNumber, createEmitter, isEmptyObject } from '@intlify/shared';\nimport { CoreWarnCodes, CoreErrorCodes, createCompileError, DEFAULT_LOCALE, updateFallbackLocale, setFallbackContext, createCoreContext, clearDateTimeFormat, clearNumberFormat, setAdditionalMeta, getFallbackContext, NOT_REOSLVED, isTranslateFallbackWarn, isTranslateMissingWarn, parseTranslateArgs, translate, MISSING_RESOLVE_VALUE, parseDateTimeArgs, datetime, parseNumberArgs, number, isMessageAST, isMessageFunction, fallbackWithLocaleChain, NUMBER_FORMAT_OPTIONS_KEYS, DATETIME_FORMAT_OPTIONS_KEYS, registerMessageCompiler, compile, compileToFunction, registerMessageResolver, resolveValue, registerLocaleFallbacker, setDevToolsHook } from '@intlify/core-base';\nimport { createVNode, Text, computed, watch, getCurrentInstance, ref, shallowRef, Fragment, defineComponent, h, effectScope, inject, onMounted, onUnmounted, onBeforeMount, isRef } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * Vue I18n Version\n *\n * @remarks\n * Semver format. Same format as the package.json `version` field.\n *\n * @VueI18nGeneral\n */\nconst VERSION = '9.14.0';\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n    if (typeof __VUE_I18N_FULL_INSTALL__ !== 'boolean') {\n        getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;\n    }\n    if (typeof __VUE_I18N_LEGACY_API__ !== 'boolean') {\n        getGlobalThis().__VUE_I18N_LEGACY_API__ = true;\n    }\n    if (typeof __INTLIFY_JIT_COMPILATION__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_JIT_COMPILATION__ = false;\n    }\n    if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n    }\n    if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\n    }\n}\n\nconst code$1 = CoreWarnCodes.__EXTEND_POINT__;\nconst inc$1 = incrementer(code$1);\nconst I18nWarnCodes = {\n    FALLBACK_TO_ROOT: code$1, // 9\n    NOT_SUPPORTED_PRESERVE: inc$1(), // 10\n    NOT_SUPPORTED_FORMATTER: inc$1(), // 11\n    NOT_SUPPORTED_PRESERVE_DIRECTIVE: inc$1(), // 12\n    NOT_SUPPORTED_GET_CHOICE_INDEX: inc$1(), // 13\n    COMPONENT_NAME_LEGACY_COMPATIBLE: inc$1(), // 14\n    NOT_FOUND_PARENT_SCOPE: inc$1(), // 15\n    IGNORE_OBJ_FLATTEN: inc$1(), // 16\n    NOTICE_DROP_ALLOW_COMPOSITION: inc$1(), // 17\n    NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG: inc$1() // 18\n};\nconst warnMessages = {\n    [I18nWarnCodes.FALLBACK_TO_ROOT]: `Fall back to {type} '{key}' with root locale.`,\n    [I18nWarnCodes.NOT_SUPPORTED_PRESERVE]: `Not supported 'preserve'.`,\n    [I18nWarnCodes.NOT_SUPPORTED_FORMATTER]: `Not supported 'formatter'.`,\n    [I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE]: `Not supported 'preserveDirectiveContent'.`,\n    [I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX]: `Not supported 'getChoiceIndex'.`,\n    [I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE]: `Component name legacy compatible: '{name}' -> 'i18n'`,\n    [I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`,\n    [I18nWarnCodes.IGNORE_OBJ_FLATTEN]: `Ignore object flatten: '{key}' key has an string value`,\n    [I18nWarnCodes.NOTICE_DROP_ALLOW_COMPOSITION]: `'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze`,\n    [I18nWarnCodes.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]: `'translateExistCompatible' option will be dropped in the next major version.`\n};\nfunction getWarnMessage(code, ...args) {\n    return format(warnMessages[code], ...args);\n}\n\nconst code = CoreErrorCodes.__EXTEND_POINT__;\nconst inc = incrementer(code);\nconst I18nErrorCodes = {\n    // composer module errors\n    UNEXPECTED_RETURN_TYPE: code, // 24\n    // legacy module errors\n    INVALID_ARGUMENT: inc(), // 25\n    // i18n module errors\n    MUST_BE_CALL_SETUP_TOP: inc(), // 26\n    NOT_INSTALLED: inc(), // 27\n    NOT_AVAILABLE_IN_LEGACY_MODE: inc(), // 28\n    // directive module errors\n    REQUIRED_VALUE: inc(), // 29\n    INVALID_VALUE: inc(), // 30\n    // vue-devtools errors\n    CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: inc(), // 31\n    NOT_INSTALLED_WITH_PROVIDE: inc(), // 32\n    // unexpected error\n    UNEXPECTED_ERROR: inc(), // 33\n    // not compatible legacy vue-i18n constructor\n    NOT_COMPATIBLE_LEGACY_VUE_I18N: inc(), // 34\n    // bridge support vue 2.x only\n    BRIDGE_SUPPORT_VUE_2_ONLY: inc(), // 35\n    // need to define `i18n` option in `allowComposition: true` and `useScope: 'local' at `useI18n``\n    MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION: inc(), // 36\n    // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly\n    NOT_AVAILABLE_COMPOSITION_IN_LEGACY: inc(), // 37\n    // for enhancement\n    __EXTEND_POINT__: inc() // 38\n};\nfunction createI18nError(code, ...args) {\n    return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages, args } : undefined);\n}\nconst errorMessages = {\n    [I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: 'Unexpected return type in composer',\n    [I18nErrorCodes.INVALID_ARGUMENT]: 'Invalid argument',\n    [I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]: 'Must be called at the top of a `setup` function',\n    [I18nErrorCodes.NOT_INSTALLED]: 'Need to install with `app.use` function',\n    [I18nErrorCodes.UNEXPECTED_ERROR]: 'Unexpected error',\n    [I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE]: 'Not available in legacy mode',\n    [I18nErrorCodes.REQUIRED_VALUE]: `Required in value: {0}`,\n    [I18nErrorCodes.INVALID_VALUE]: `Invalid value`,\n    [I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: `Cannot setup vue-devtools plugin`,\n    [I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE]: 'Need to install with `provide` function',\n    [I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N]: 'Not compatible legacy VueI18n.',\n    [I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY]: 'vue-i18n-bridge support Vue 2.x only',\n    [I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]: 'Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode',\n    [I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: 'Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly'\n};\n\nconst TranslateVNodeSymbol = \n/* #__PURE__*/ makeSymbol('__translateVNode');\nconst DatetimePartsSymbol = /* #__PURE__*/ makeSymbol('__datetimeParts');\nconst NumberPartsSymbol = /* #__PURE__*/ makeSymbol('__numberParts');\nconst EnableEmitter = /* #__PURE__*/ makeSymbol('__enableEmitter');\nconst DisableEmitter = /* #__PURE__*/ makeSymbol('__disableEmitter');\nconst SetPluralRulesSymbol = makeSymbol('__setPluralRules');\nmakeSymbol('__intlifyMeta');\nconst InejctWithOptionSymbol = \n/* #__PURE__*/ makeSymbol('__injectWithOption');\nconst DisposeSymbol = /* #__PURE__*/ makeSymbol('__dispose');\nconst __VUE_I18N_BRIDGE__ =  '__VUE_I18N_BRIDGE__';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Transform flat json in obj to normal json in obj\n */\nfunction handleFlatJson(obj) {\n    // check obj\n    if (!isObject(obj)) {\n        return obj;\n    }\n    for (const key in obj) {\n        // check key\n        if (!hasOwn(obj, key)) {\n            continue;\n        }\n        // handle for normal json\n        if (!key.includes('.')) {\n            // recursive process value if value is also a object\n            if (isObject(obj[key])) {\n                handleFlatJson(obj[key]);\n            }\n        }\n        // handle for flat json, transform to normal json\n        else {\n            // go to the last object\n            const subKeys = key.split('.');\n            const lastIndex = subKeys.length - 1;\n            let currentObj = obj;\n            let hasStringValue = false;\n            for (let i = 0; i < lastIndex; i++) {\n                if (!(subKeys[i] in currentObj)) {\n                    currentObj[subKeys[i]] = {};\n                }\n                if (!isObject(currentObj[subKeys[i]])) {\n                    (process.env.NODE_ENV !== 'production') &&\n                        warn(getWarnMessage(I18nWarnCodes.IGNORE_OBJ_FLATTEN, {\n                            key: subKeys[i]\n                        }));\n                    hasStringValue = true;\n                    break;\n                }\n                currentObj = currentObj[subKeys[i]];\n            }\n            // update last object value, delete old property\n            if (!hasStringValue) {\n                currentObj[subKeys[lastIndex]] = obj[key];\n                delete obj[key];\n            }\n            // recursive process value if value is also a object\n            if (isObject(currentObj[subKeys[lastIndex]])) {\n                handleFlatJson(currentObj[subKeys[lastIndex]]);\n            }\n        }\n    }\n    return obj;\n}\nfunction getLocaleMessages(locale, options) {\n    const { messages, __i18n, messageResolver, flatJson } = options;\n    // prettier-ignore\n    const ret = (isPlainObject(messages)\n        ? messages\n        : isArray(__i18n)\n            ? {}\n            : { [locale]: {} });\n    // merge locale messages of i18n custom block\n    if (isArray(__i18n)) {\n        __i18n.forEach(custom => {\n            if ('locale' in custom && 'resource' in custom) {\n                const { locale, resource } = custom;\n                if (locale) {\n                    ret[locale] = ret[locale] || {};\n                    deepCopy(resource, ret[locale]);\n                }\n                else {\n                    deepCopy(resource, ret);\n                }\n            }\n            else {\n                isString(custom) && deepCopy(JSON.parse(custom), ret);\n            }\n        });\n    }\n    // handle messages for flat json\n    if (messageResolver == null && flatJson) {\n        for (const key in ret) {\n            if (hasOwn(ret, key)) {\n                handleFlatJson(ret[key]);\n            }\n        }\n    }\n    return ret;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getComponentOptions(instance) {\n    return instance.type ;\n}\nfunction adjustI18nResources(gl, options, componentOptions // eslint-disable-line @typescript-eslint/no-explicit-any\n) {\n    let messages = isObject(options.messages) ? options.messages : {};\n    if ('__i18nGlobal' in componentOptions) {\n        messages = getLocaleMessages(gl.locale.value, {\n            messages,\n            __i18n: componentOptions.__i18nGlobal\n        });\n    }\n    // merge locale messages\n    const locales = Object.keys(messages);\n    if (locales.length) {\n        locales.forEach(locale => {\n            gl.mergeLocaleMessage(locale, messages[locale]);\n        });\n    }\n    {\n        // merge datetime formats\n        if (isObject(options.datetimeFormats)) {\n            const locales = Object.keys(options.datetimeFormats);\n            if (locales.length) {\n                locales.forEach(locale => {\n                    gl.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\n                });\n            }\n        }\n        // merge number formats\n        if (isObject(options.numberFormats)) {\n            const locales = Object.keys(options.numberFormats);\n            if (locales.length) {\n                locales.forEach(locale => {\n                    gl.mergeNumberFormat(locale, options.numberFormats[locale]);\n                });\n            }\n        }\n    }\n}\nfunction createTextNode(key) {\n    return createVNode(Text, null, key, 0)\n        ;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// extend VNode interface\nconst DEVTOOLS_META = '__INTLIFY_META__';\nconst NOOP_RETURN_ARRAY = () => [];\nconst NOOP_RETURN_FALSE = () => false;\nlet composerID = 0;\nfunction defineCoreMissingHandler(missing) {\n    return ((ctx, locale, key, type) => {\n        return missing(locale, key, getCurrentInstance() || undefined, type);\n    });\n}\n// for Intlify DevTools\n/* #__NO_SIDE_EFFECTS__ */\nconst getMetaInfo = () => {\n    const instance = getCurrentInstance();\n    let meta = null; // eslint-disable-line @typescript-eslint/no-explicit-any\n    return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\n        ? { [DEVTOOLS_META]: meta } // eslint-disable-line @typescript-eslint/no-explicit-any\n        : null;\n};\n/**\n * Create composer interface factory\n *\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction createComposer(options = {}, VueI18nLegacy) {\n    const { __root, __injectWithOption } = options;\n    const _isGlobal = __root === undefined;\n    const flatJson = options.flatJson;\n    const _ref = inBrowser ? ref : shallowRef;\n    const translateExistCompatible = !!options.translateExistCompatible;\n    if ((process.env.NODE_ENV !== 'production')) {\n        if (translateExistCompatible && !false) {\n            warnOnce(getWarnMessage(I18nWarnCodes.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));\n        }\n    }\n    let _inheritLocale = isBoolean(options.inheritLocale)\n        ? options.inheritLocale\n        : true;\n    const _locale = _ref(\n    // prettier-ignore\n    __root && _inheritLocale\n        ? __root.locale.value\n        : isString(options.locale)\n            ? options.locale\n            : DEFAULT_LOCALE);\n    const _fallbackLocale = _ref(\n    // prettier-ignore\n    __root && _inheritLocale\n        ? __root.fallbackLocale.value\n        : isString(options.fallbackLocale) ||\n            isArray(options.fallbackLocale) ||\n            isPlainObject(options.fallbackLocale) ||\n            options.fallbackLocale === false\n            ? options.fallbackLocale\n            : _locale.value);\n    const _messages = _ref(getLocaleMessages(_locale.value, options));\n    // prettier-ignore\n    const _datetimeFormats = _ref(isPlainObject(options.datetimeFormats)\n            ? options.datetimeFormats\n            : { [_locale.value]: {} })\n        ;\n    // prettier-ignore\n    const _numberFormats = _ref(isPlainObject(options.numberFormats)\n            ? options.numberFormats\n            : { [_locale.value]: {} })\n        ;\n    // warning suppress options\n    // prettier-ignore\n    let _missingWarn = __root\n        ? __root.missingWarn\n        : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n            ? options.missingWarn\n            : true;\n    // prettier-ignore\n    let _fallbackWarn = __root\n        ? __root.fallbackWarn\n        : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n            ? options.fallbackWarn\n            : true;\n    // prettier-ignore\n    let _fallbackRoot = __root\n        ? __root.fallbackRoot\n        : isBoolean(options.fallbackRoot)\n            ? options.fallbackRoot\n            : true;\n    // configure fall back to root\n    let _fallbackFormat = !!options.fallbackFormat;\n    // runtime missing\n    let _missing = isFunction(options.missing) ? options.missing : null;\n    let _runtimeMissing = isFunction(options.missing)\n        ? defineCoreMissingHandler(options.missing)\n        : null;\n    // postTranslation handler\n    let _postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : null;\n    // prettier-ignore\n    let _warnHtmlMessage = __root\n        ? __root.warnHtmlMessage\n        : isBoolean(options.warnHtmlMessage)\n            ? options.warnHtmlMessage\n            : true;\n    let _escapeParameter = !!options.escapeParameter;\n    // custom linked modifiers\n    // prettier-ignore\n    const _modifiers = __root\n        ? __root.modifiers\n        : isPlainObject(options.modifiers)\n            ? options.modifiers\n            : {};\n    // pluralRules\n    let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\n    // runtime context\n    // eslint-disable-next-line prefer-const\n    let _context;\n    const getCoreContext = () => {\n        _isGlobal && setFallbackContext(null);\n        const ctxOptions = {\n            version: VERSION,\n            locale: _locale.value,\n            fallbackLocale: _fallbackLocale.value,\n            messages: _messages.value,\n            modifiers: _modifiers,\n            pluralRules: _pluralRules,\n            missing: _runtimeMissing === null ? undefined : _runtimeMissing,\n            missingWarn: _missingWarn,\n            fallbackWarn: _fallbackWarn,\n            fallbackFormat: _fallbackFormat,\n            unresolving: true,\n            postTranslation: _postTranslation === null ? undefined : _postTranslation,\n            warnHtmlMessage: _warnHtmlMessage,\n            escapeParameter: _escapeParameter,\n            messageResolver: options.messageResolver,\n            messageCompiler: options.messageCompiler,\n            __meta: { framework: 'vue' }\n        };\n        {\n            ctxOptions.datetimeFormats = _datetimeFormats.value;\n            ctxOptions.numberFormats = _numberFormats.value;\n            ctxOptions.__datetimeFormatters = isPlainObject(_context)\n                ? _context.__datetimeFormatters\n                : undefined;\n            ctxOptions.__numberFormatters = isPlainObject(_context)\n                ? _context.__numberFormatters\n                : undefined;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            ctxOptions.__v_emitter = isPlainObject(_context)\n                ? _context.__v_emitter\n                : undefined;\n        }\n        const ctx = createCoreContext(ctxOptions);\n        _isGlobal && setFallbackContext(ctx);\n        return ctx;\n    };\n    _context = getCoreContext();\n    updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n    // track reactivity\n    function trackReactivityValues() {\n        return [\n                _locale.value,\n                _fallbackLocale.value,\n                _messages.value,\n                _datetimeFormats.value,\n                _numberFormats.value\n            ]\n            ;\n    }\n    // locale\n    const locale = computed({\n        get: () => _locale.value,\n        set: val => {\n            _locale.value = val;\n            _context.locale = _locale.value;\n        }\n    });\n    // fallbackLocale\n    const fallbackLocale = computed({\n        get: () => _fallbackLocale.value,\n        set: val => {\n            _fallbackLocale.value = val;\n            _context.fallbackLocale = _fallbackLocale.value;\n            updateFallbackLocale(_context, _locale.value, val);\n        }\n    });\n    // messages\n    const messages = computed(() => _messages.value);\n    // datetimeFormats\n    const datetimeFormats = /* #__PURE__*/ computed(() => _datetimeFormats.value);\n    // numberFormats\n    const numberFormats = /* #__PURE__*/ computed(() => _numberFormats.value);\n    // getPostTranslationHandler\n    function getPostTranslationHandler() {\n        return isFunction(_postTranslation) ? _postTranslation : null;\n    }\n    // setPostTranslationHandler\n    function setPostTranslationHandler(handler) {\n        _postTranslation = handler;\n        _context.postTranslation = handler;\n    }\n    // getMissingHandler\n    function getMissingHandler() {\n        return _missing;\n    }\n    // setMissingHandler\n    function setMissingHandler(handler) {\n        if (handler !== null) {\n            _runtimeMissing = defineCoreMissingHandler(handler);\n        }\n        _missing = handler;\n        _context.missing = _runtimeMissing;\n    }\n    function isResolvedTranslateMessage(type, arg // eslint-disable-line @typescript-eslint/no-explicit-any\n    ) {\n        return type !== 'translate' || !arg.resolvedMessage;\n    }\n    const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => {\n        trackReactivityValues(); // track reactive dependency\n        // NOTE: experimental !!\n        let ret;\n        try {\n            if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n                setAdditionalMeta(getMetaInfo());\n            }\n            if (!_isGlobal) {\n                _context.fallbackContext = __root\n                    ? getFallbackContext()\n                    : undefined;\n            }\n            ret = fn(_context);\n        }\n        finally {\n            if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n                setAdditionalMeta(null);\n            }\n            if (!_isGlobal) {\n                _context.fallbackContext = undefined;\n            }\n        }\n        if ((warnType !== 'translate exists' && // for not `te` (e.g `t`)\n            isNumber(ret) &&\n            ret === NOT_REOSLVED) ||\n            (warnType === 'translate exists' && !ret) // for `te`\n        ) {\n            const [key, arg2] = argumentParser();\n            if ((process.env.NODE_ENV !== 'production') &&\n                __root &&\n                isString(key) &&\n                isResolvedTranslateMessage(warnType, arg2)) {\n                if (_fallbackRoot &&\n                    (isTranslateFallbackWarn(_fallbackWarn, key) ||\n                        isTranslateMissingWarn(_missingWarn, key))) {\n                    warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {\n                        key,\n                        type: warnType\n                    }));\n                }\n                // for vue-devtools timeline event\n                if ((process.env.NODE_ENV !== 'production')) {\n                    const { __v_emitter: emitter } = _context;\n                    if (emitter && _fallbackRoot) {\n                        emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n                            type: warnType,\n                            key,\n                            to: 'global',\n                            groupId: `${warnType}:${key}`\n                        });\n                    }\n                }\n            }\n            return __root && _fallbackRoot\n                ? fallbackSuccess(__root)\n                : fallbackFail(key);\n        }\n        else if (successCondition(ret)) {\n            return ret;\n        }\n        else {\n            /* istanbul ignore next */\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\n        }\n    };\n    // t\n    function t(...args) {\n        return wrapWithDeps(context => Reflect.apply(translate, null, [context, ...args]), () => parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => isString(val));\n    }\n    // rt\n    function rt(...args) {\n        const [arg1, arg2, arg3] = args;\n        if (arg3 && !isObject(arg3)) {\n            throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n        }\n        return t(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);\n    }\n    // d\n    function d(...args) {\n        return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\n    }\n    // n\n    function n(...args) {\n        return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\n    }\n    // for custom processor\n    function normalize(values) {\n        return values.map(val => isString(val) || isNumber(val) || isBoolean(val)\n            ? createTextNode(String(val))\n            : val);\n    }\n    const interpolate = (val) => val;\n    const processor = {\n        normalize,\n        interpolate,\n        type: 'vnode'\n    };\n    // translateVNode, using for `i18n-t` component\n    function translateVNode(...args) {\n        return wrapWithDeps(context => {\n            let ret;\n            const _context = context;\n            try {\n                _context.processor = processor;\n                ret = Reflect.apply(translate, null, [_context, ...args]);\n            }\n            finally {\n                _context.processor = null;\n            }\n            return ret;\n        }, () => parseTranslateArgs(...args), 'translate', \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray(val));\n    }\n    // numberParts, using for `i18n-n` component\n    function numberParts(...args) {\n        return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString(val) || isArray(val));\n    }\n    // datetimeParts, using for `i18n-d` component\n    function datetimeParts(...args) {\n        return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString(val) || isArray(val));\n    }\n    function setPluralRules(rules) {\n        _pluralRules = rules;\n        _context.pluralRules = _pluralRules;\n    }\n    // te\n    function te(key, locale) {\n        return wrapWithDeps(() => {\n            if (!key) {\n                return false;\n            }\n            const targetLocale = isString(locale) ? locale : _locale.value;\n            const message = getLocaleMessage(targetLocale);\n            const resolved = _context.messageResolver(message, key);\n            return !translateExistCompatible\n                ? isMessageAST(resolved) ||\n                    isMessageFunction(resolved) ||\n                    isString(resolved)\n                : resolved != null;\n        }, () => [key], 'translate exists', root => {\n            return Reflect.apply(root.te, root, [key, locale]);\n        }, NOOP_RETURN_FALSE, val => isBoolean(val));\n    }\n    function resolveMessages(key) {\n        let messages = null;\n        const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\n        for (let i = 0; i < locales.length; i++) {\n            const targetLocaleMessages = _messages.value[locales[i]] || {};\n            const messageValue = _context.messageResolver(targetLocaleMessages, key);\n            if (messageValue != null) {\n                messages = messageValue;\n                break;\n            }\n        }\n        return messages;\n    }\n    // tm\n    function tm(key) {\n        const messages = resolveMessages(key);\n        // prettier-ignore\n        return messages != null\n            ? messages\n            : __root\n                ? __root.tm(key) || {}\n                : {};\n    }\n    // getLocaleMessage\n    function getLocaleMessage(locale) {\n        return (_messages.value[locale] || {});\n    }\n    // setLocaleMessage\n    function setLocaleMessage(locale, message) {\n        if (flatJson) {\n            const _message = { [locale]: message };\n            for (const key in _message) {\n                if (hasOwn(_message, key)) {\n                    handleFlatJson(_message[key]);\n                }\n            }\n            message = _message[locale];\n        }\n        _messages.value[locale] = message;\n        _context.messages = _messages.value;\n    }\n    // mergeLocaleMessage\n    function mergeLocaleMessage(locale, message) {\n        _messages.value[locale] = _messages.value[locale] || {};\n        const _message = { [locale]: message };\n        if (flatJson) {\n            for (const key in _message) {\n                if (hasOwn(_message, key)) {\n                    handleFlatJson(_message[key]);\n                }\n            }\n        }\n        message = _message[locale];\n        deepCopy(message, _messages.value[locale]);\n        _context.messages = _messages.value;\n    }\n    // getDateTimeFormat\n    function getDateTimeFormat(locale) {\n        return _datetimeFormats.value[locale] || {};\n    }\n    // setDateTimeFormat\n    function setDateTimeFormat(locale, format) {\n        _datetimeFormats.value[locale] = format;\n        _context.datetimeFormats = _datetimeFormats.value;\n        clearDateTimeFormat(_context, locale, format);\n    }\n    // mergeDateTimeFormat\n    function mergeDateTimeFormat(locale, format) {\n        _datetimeFormats.value[locale] = assign(_datetimeFormats.value[locale] || {}, format);\n        _context.datetimeFormats = _datetimeFormats.value;\n        clearDateTimeFormat(_context, locale, format);\n    }\n    // getNumberFormat\n    function getNumberFormat(locale) {\n        return _numberFormats.value[locale] || {};\n    }\n    // setNumberFormat\n    function setNumberFormat(locale, format) {\n        _numberFormats.value[locale] = format;\n        _context.numberFormats = _numberFormats.value;\n        clearNumberFormat(_context, locale, format);\n    }\n    // mergeNumberFormat\n    function mergeNumberFormat(locale, format) {\n        _numberFormats.value[locale] = assign(_numberFormats.value[locale] || {}, format);\n        _context.numberFormats = _numberFormats.value;\n        clearNumberFormat(_context, locale, format);\n    }\n    // for debug\n    composerID++;\n    // watch root locale & fallbackLocale\n    if (__root && inBrowser) {\n        watch(__root.locale, (val) => {\n            if (_inheritLocale) {\n                _locale.value = val;\n                _context.locale = val;\n                updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n            }\n        });\n        watch(__root.fallbackLocale, (val) => {\n            if (_inheritLocale) {\n                _fallbackLocale.value = val;\n                _context.fallbackLocale = val;\n                updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n            }\n        });\n    }\n    // define basic composition API!\n    const composer = {\n        id: composerID,\n        locale,\n        fallbackLocale,\n        get inheritLocale() {\n            return _inheritLocale;\n        },\n        set inheritLocale(val) {\n            _inheritLocale = val;\n            if (val && __root) {\n                _locale.value = __root.locale.value;\n                _fallbackLocale.value = __root.fallbackLocale.value;\n                updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n            }\n        },\n        get availableLocales() {\n            return Object.keys(_messages.value).sort();\n        },\n        messages,\n        get modifiers() {\n            return _modifiers;\n        },\n        get pluralRules() {\n            return _pluralRules || {};\n        },\n        get isGlobal() {\n            return _isGlobal;\n        },\n        get missingWarn() {\n            return _missingWarn;\n        },\n        set missingWarn(val) {\n            _missingWarn = val;\n            _context.missingWarn = _missingWarn;\n        },\n        get fallbackWarn() {\n            return _fallbackWarn;\n        },\n        set fallbackWarn(val) {\n            _fallbackWarn = val;\n            _context.fallbackWarn = _fallbackWarn;\n        },\n        get fallbackRoot() {\n            return _fallbackRoot;\n        },\n        set fallbackRoot(val) {\n            _fallbackRoot = val;\n        },\n        get fallbackFormat() {\n            return _fallbackFormat;\n        },\n        set fallbackFormat(val) {\n            _fallbackFormat = val;\n            _context.fallbackFormat = _fallbackFormat;\n        },\n        get warnHtmlMessage() {\n            return _warnHtmlMessage;\n        },\n        set warnHtmlMessage(val) {\n            _warnHtmlMessage = val;\n            _context.warnHtmlMessage = val;\n        },\n        get escapeParameter() {\n            return _escapeParameter;\n        },\n        set escapeParameter(val) {\n            _escapeParameter = val;\n            _context.escapeParameter = val;\n        },\n        t,\n        getLocaleMessage,\n        setLocaleMessage,\n        mergeLocaleMessage,\n        getPostTranslationHandler,\n        setPostTranslationHandler,\n        getMissingHandler,\n        setMissingHandler,\n        [SetPluralRulesSymbol]: setPluralRules\n    };\n    {\n        composer.datetimeFormats = datetimeFormats;\n        composer.numberFormats = numberFormats;\n        composer.rt = rt;\n        composer.te = te;\n        composer.tm = tm;\n        composer.d = d;\n        composer.n = n;\n        composer.getDateTimeFormat = getDateTimeFormat;\n        composer.setDateTimeFormat = setDateTimeFormat;\n        composer.mergeDateTimeFormat = mergeDateTimeFormat;\n        composer.getNumberFormat = getNumberFormat;\n        composer.setNumberFormat = setNumberFormat;\n        composer.mergeNumberFormat = mergeNumberFormat;\n        composer[InejctWithOptionSymbol] = __injectWithOption;\n        composer[TranslateVNodeSymbol] = translateVNode;\n        composer[DatetimePartsSymbol] = datetimeParts;\n        composer[NumberPartsSymbol] = numberParts;\n    }\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        composer[EnableEmitter] = (emitter) => {\n            _context.__v_emitter = emitter;\n        };\n        composer[DisableEmitter] = () => {\n            _context.__v_emitter = undefined;\n        };\n    }\n    return composer;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Convert to I18n Composer Options from VueI18n Options\n *\n * @internal\n */\nfunction convertComposerOptions(options) {\n    const locale = isString(options.locale) ? options.locale : DEFAULT_LOCALE;\n    const fallbackLocale = isString(options.fallbackLocale) ||\n        isArray(options.fallbackLocale) ||\n        isPlainObject(options.fallbackLocale) ||\n        options.fallbackLocale === false\n        ? options.fallbackLocale\n        : locale;\n    const missing = isFunction(options.missing) ? options.missing : undefined;\n    const missingWarn = isBoolean(options.silentTranslationWarn) ||\n        isRegExp(options.silentTranslationWarn)\n        ? !options.silentTranslationWarn\n        : true;\n    const fallbackWarn = isBoolean(options.silentFallbackWarn) ||\n        isRegExp(options.silentFallbackWarn)\n        ? !options.silentFallbackWarn\n        : true;\n    const fallbackRoot = isBoolean(options.fallbackRoot)\n        ? options.fallbackRoot\n        : true;\n    const fallbackFormat = !!options.formatFallbackMessages;\n    const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};\n    const pluralizationRules = options.pluralizationRules;\n    const postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : undefined;\n    const warnHtmlMessage = isString(options.warnHtmlInMessage)\n        ? options.warnHtmlInMessage !== 'off'\n        : true;\n    const escapeParameter = !!options.escapeParameterHtml;\n    const inheritLocale = isBoolean(options.sync) ? options.sync : true;\n    if ((process.env.NODE_ENV !== 'production') && options.formatter) {\n        warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\n    }\n    if ((process.env.NODE_ENV !== 'production') && options.preserveDirectiveContent) {\n        warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\n    }\n    let messages = options.messages;\n    if (isPlainObject(options.sharedMessages)) {\n        const sharedMessages = options.sharedMessages;\n        const locales = Object.keys(sharedMessages);\n        messages = locales.reduce((messages, locale) => {\n            const message = messages[locale] || (messages[locale] = {});\n            assign(message, sharedMessages[locale]);\n            return messages;\n        }, (messages || {}));\n    }\n    const { __i18n, __root, __injectWithOption } = options;\n    const datetimeFormats = options.datetimeFormats;\n    const numberFormats = options.numberFormats;\n    const flatJson = options.flatJson;\n    const translateExistCompatible = options\n        .translateExistCompatible;\n    return {\n        locale,\n        fallbackLocale,\n        messages,\n        flatJson,\n        datetimeFormats,\n        numberFormats,\n        missing,\n        missingWarn,\n        fallbackWarn,\n        fallbackRoot,\n        fallbackFormat,\n        modifiers,\n        pluralRules: pluralizationRules,\n        postTranslation,\n        warnHtmlMessage,\n        escapeParameter,\n        messageResolver: options.messageResolver,\n        inheritLocale,\n        translateExistCompatible,\n        __i18n,\n        __root,\n        __injectWithOption\n    };\n}\n/**\n * create VueI18n interface factory\n *\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction createVueI18n(options = {}, VueI18nLegacy) {\n    {\n        const composer = createComposer(convertComposerOptions(options));\n        const { __extender } = options;\n        // defines VueI18n\n        const vueI18n = {\n            // id\n            id: composer.id,\n            // locale\n            get locale() {\n                return composer.locale.value;\n            },\n            set locale(val) {\n                composer.locale.value = val;\n            },\n            // fallbackLocale\n            get fallbackLocale() {\n                return composer.fallbackLocale.value;\n            },\n            set fallbackLocale(val) {\n                composer.fallbackLocale.value = val;\n            },\n            // messages\n            get messages() {\n                return composer.messages.value;\n            },\n            // datetimeFormats\n            get datetimeFormats() {\n                return composer.datetimeFormats.value;\n            },\n            // numberFormats\n            get numberFormats() {\n                return composer.numberFormats.value;\n            },\n            // availableLocales\n            get availableLocales() {\n                return composer.availableLocales;\n            },\n            // formatter\n            get formatter() {\n                (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\n                // dummy\n                return {\n                    interpolate() {\n                        return [];\n                    }\n                };\n            },\n            set formatter(val) {\n                (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\n            },\n            // missing\n            get missing() {\n                return composer.getMissingHandler();\n            },\n            set missing(handler) {\n                composer.setMissingHandler(handler);\n            },\n            // silentTranslationWarn\n            get silentTranslationWarn() {\n                return isBoolean(composer.missingWarn)\n                    ? !composer.missingWarn\n                    : composer.missingWarn;\n            },\n            set silentTranslationWarn(val) {\n                composer.missingWarn = isBoolean(val) ? !val : val;\n            },\n            // silentFallbackWarn\n            get silentFallbackWarn() {\n                return isBoolean(composer.fallbackWarn)\n                    ? !composer.fallbackWarn\n                    : composer.fallbackWarn;\n            },\n            set silentFallbackWarn(val) {\n                composer.fallbackWarn = isBoolean(val) ? !val : val;\n            },\n            // modifiers\n            get modifiers() {\n                return composer.modifiers;\n            },\n            // formatFallbackMessages\n            get formatFallbackMessages() {\n                return composer.fallbackFormat;\n            },\n            set formatFallbackMessages(val) {\n                composer.fallbackFormat = val;\n            },\n            // postTranslation\n            get postTranslation() {\n                return composer.getPostTranslationHandler();\n            },\n            set postTranslation(handler) {\n                composer.setPostTranslationHandler(handler);\n            },\n            // sync\n            get sync() {\n                return composer.inheritLocale;\n            },\n            set sync(val) {\n                composer.inheritLocale = val;\n            },\n            // warnInHtmlMessage\n            get warnHtmlInMessage() {\n                return composer.warnHtmlMessage ? 'warn' : 'off';\n            },\n            set warnHtmlInMessage(val) {\n                composer.warnHtmlMessage = val !== 'off';\n            },\n            // escapeParameterHtml\n            get escapeParameterHtml() {\n                return composer.escapeParameter;\n            },\n            set escapeParameterHtml(val) {\n                composer.escapeParameter = val;\n            },\n            // preserveDirectiveContent\n            get preserveDirectiveContent() {\n                (process.env.NODE_ENV !== 'production') &&\n                    warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\n                return true;\n            },\n            set preserveDirectiveContent(val) {\n                (process.env.NODE_ENV !== 'production') &&\n                    warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\n            },\n            // pluralizationRules\n            get pluralizationRules() {\n                return composer.pluralRules || {};\n            },\n            // for internal\n            __composer: composer,\n            // t\n            t(...args) {\n                const [arg1, arg2, arg3] = args;\n                const options = {};\n                let list = null;\n                let named = null;\n                if (!isString(arg1)) {\n                    throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n                }\n                const key = arg1;\n                if (isString(arg2)) {\n                    options.locale = arg2;\n                }\n                else if (isArray(arg2)) {\n                    list = arg2;\n                }\n                else if (isPlainObject(arg2)) {\n                    named = arg2;\n                }\n                if (isArray(arg3)) {\n                    list = arg3;\n                }\n                else if (isPlainObject(arg3)) {\n                    named = arg3;\n                }\n                // return composer.t(key, (list || named || {}) as any, options)\n                return Reflect.apply(composer.t, composer, [\n                    key,\n                    (list || named || {}),\n                    options\n                ]);\n            },\n            rt(...args) {\n                return Reflect.apply(composer.rt, composer, [...args]);\n            },\n            // tc\n            tc(...args) {\n                const [arg1, arg2, arg3] = args;\n                const options = { plural: 1 };\n                let list = null;\n                let named = null;\n                if (!isString(arg1)) {\n                    throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n                }\n                const key = arg1;\n                if (isString(arg2)) {\n                    options.locale = arg2;\n                }\n                else if (isNumber(arg2)) {\n                    options.plural = arg2;\n                }\n                else if (isArray(arg2)) {\n                    list = arg2;\n                }\n                else if (isPlainObject(arg2)) {\n                    named = arg2;\n                }\n                if (isString(arg3)) {\n                    options.locale = arg3;\n                }\n                else if (isArray(arg3)) {\n                    list = arg3;\n                }\n                else if (isPlainObject(arg3)) {\n                    named = arg3;\n                }\n                // return composer.t(key, (list || named || {}) as any, options)\n                return Reflect.apply(composer.t, composer, [\n                    key,\n                    (list || named || {}),\n                    options\n                ]);\n            },\n            // te\n            te(key, locale) {\n                return composer.te(key, locale);\n            },\n            // tm\n            tm(key) {\n                return composer.tm(key);\n            },\n            // getLocaleMessage\n            getLocaleMessage(locale) {\n                return composer.getLocaleMessage(locale);\n            },\n            // setLocaleMessage\n            setLocaleMessage(locale, message) {\n                composer.setLocaleMessage(locale, message);\n            },\n            // mergeLocaleMessage\n            mergeLocaleMessage(locale, message) {\n                composer.mergeLocaleMessage(locale, message);\n            },\n            // d\n            d(...args) {\n                return Reflect.apply(composer.d, composer, [...args]);\n            },\n            // getDateTimeFormat\n            getDateTimeFormat(locale) {\n                return composer.getDateTimeFormat(locale);\n            },\n            // setDateTimeFormat\n            setDateTimeFormat(locale, format) {\n                composer.setDateTimeFormat(locale, format);\n            },\n            // mergeDateTimeFormat\n            mergeDateTimeFormat(locale, format) {\n                composer.mergeDateTimeFormat(locale, format);\n            },\n            // n\n            n(...args) {\n                return Reflect.apply(composer.n, composer, [...args]);\n            },\n            // getNumberFormat\n            getNumberFormat(locale) {\n                return composer.getNumberFormat(locale);\n            },\n            // setNumberFormat\n            setNumberFormat(locale, format) {\n                composer.setNumberFormat(locale, format);\n            },\n            // mergeNumberFormat\n            mergeNumberFormat(locale, format) {\n                composer.mergeNumberFormat(locale, format);\n            },\n            // getChoiceIndex\n            // eslint-disable-next-line @typescript-eslint/no-unused-vars\n            getChoiceIndex(choice, choicesLength) {\n                (process.env.NODE_ENV !== 'production') &&\n                    warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));\n                return -1;\n            }\n        };\n        vueI18n.__extender = __extender;\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production')) {\n            vueI18n.__enableEmitter = (emitter) => {\n                const __composer = composer;\n                __composer[EnableEmitter] && __composer[EnableEmitter](emitter);\n            };\n            vueI18n.__disableEmitter = () => {\n                const __composer = composer;\n                __composer[DisableEmitter] && __composer[DisableEmitter]();\n            };\n        }\n        return vueI18n;\n    }\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst baseFormatProps = {\n    tag: {\n        type: [String, Object]\n    },\n    locale: {\n        type: String\n    },\n    scope: {\n        type: String,\n        // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n        validator: (val /* ComponentI18nScope */) => val === 'parent' || val === 'global',\n        default: 'parent' /* ComponentI18nScope */\n    },\n    i18n: {\n        type: Object\n    }\n};\n\nfunction getInterpolateArg(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n{ slots }, // SetupContext,\nkeys) {\n    if (keys.length === 1 && keys[0] === 'default') {\n        // default slot with list\n        const ret = slots.default ? slots.default() : [];\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return ret.reduce((slot, current) => {\n            return [\n                ...slot,\n                // prettier-ignore\n                ...(current.type === Fragment ? current.children : [current]\n                    )\n            ];\n        }, []);\n    }\n    else {\n        // named slots\n        return keys.reduce((arg, key) => {\n            const slot = slots[key];\n            if (slot) {\n                arg[key] = slot();\n            }\n            return arg;\n        }, {});\n    }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getFragmentableTag(tag) {\n    return Fragment ;\n}\n\nconst TranslationImpl = /*#__PURE__*/ defineComponent({\n    /* eslint-disable */\n    name: 'i18n-t',\n    props: assign({\n        keypath: {\n            type: String,\n            required: true\n        },\n        plural: {\n            type: [Number, String],\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            validator: (val) => isNumber(val) || !isNaN(val)\n        }\n    }, baseFormatProps),\n    /* eslint-enable */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    setup(props, context) {\n        const { slots, attrs } = context;\n        // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n        const i18n = props.i18n ||\n            useI18n({\n                useScope: props.scope,\n                __useComponent: true\n            });\n        return () => {\n            const keys = Object.keys(slots).filter(key => key !== '_');\n            const options = {};\n            if (props.locale) {\n                options.locale = props.locale;\n            }\n            if (props.plural !== undefined) {\n                options.plural = isString(props.plural) ? +props.plural : props.plural;\n            }\n            const arg = getInterpolateArg(context, keys);\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options);\n            const assignedAttrs = assign({}, attrs);\n            const tag = isString(props.tag) || isObject(props.tag)\n                ? props.tag\n                : getFragmentableTag();\n            return h(tag, assignedAttrs, children);\n        };\n    }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Translation Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [TranslationProps](component#translationprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\n *\n * @example\n * ```html\n * <div id=\"app\">\n *   <!-- ... -->\n *   <i18n keypath=\"term\" tag=\"label\" for=\"tos\">\n *     <a :href=\"url\" target=\"_blank\">{{ $t('tos') }}</a>\n *   </i18n>\n *   <!-- ... -->\n * </div>\n * ```\n * ```js\n * import { createApp } from 'vue'\n * import { createI18n } from 'vue-i18n'\n *\n * const messages = {\n *   en: {\n *     tos: 'Term of Service',\n *     term: 'I accept xxx {0}.'\n *   },\n *   ja: {\n *     tos: '利用規約',\n *     term: '私は xxx の{0}に同意します。'\n *   }\n * }\n *\n * const i18n = createI18n({\n *   locale: 'en',\n *   messages\n * })\n *\n * const app = createApp({\n *   data: {\n *     url: '/term'\n *   }\n * }).use(i18n).mount('#app')\n * ```\n *\n * @VueI18nComponent\n */\nconst Translation = TranslationImpl;\nconst I18nT = Translation;\n\nfunction isVNode(target) {\n    return isArray(target) && !isString(target[0]);\n}\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\n    const { slots, attrs } = context;\n    return () => {\n        const options = { part: true };\n        let overrides = {};\n        if (props.locale) {\n            options.locale = props.locale;\n        }\n        if (isString(props.format)) {\n            options.key = props.format;\n        }\n        else if (isObject(props.format)) {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            if (isString(props.format.key)) {\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                options.key = props.format.key;\n            }\n            // Filter out number format options only\n            overrides = Object.keys(props.format).reduce((options, prop) => {\n                return slotKeys.includes(prop)\n                    ? assign({}, options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\n                    : options;\n            }, {});\n        }\n        const parts = partFormatter(...[props.value, options, overrides]);\n        let children = [options.key];\n        if (isArray(parts)) {\n            children = parts.map((part, index) => {\n                const slot = slots[part.type];\n                const node = slot\n                    ? slot({ [part.type]: part.value, index, parts })\n                    : [part.value];\n                if (isVNode(node)) {\n                    node[0].key = `${part.type}-${index}`;\n                }\n                return node;\n            });\n        }\n        else if (isString(parts)) {\n            children = [parts];\n        }\n        const assignedAttrs = assign({}, attrs);\n        const tag = isString(props.tag) || isObject(props.tag)\n            ? props.tag\n            : getFragmentableTag();\n        return h(tag, assignedAttrs, children);\n    };\n}\n\nconst NumberFormatImpl = /*#__PURE__*/ defineComponent({\n    /* eslint-disable */\n    name: 'i18n-n',\n    props: assign({\n        value: {\n            type: Number,\n            required: true\n        },\n        format: {\n            type: [String, Object]\n        }\n    }, baseFormatProps),\n    /* eslint-enable */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    setup(props, context) {\n        const i18n = props.i18n ||\n            useI18n({\n                useScope: props.scope,\n                __useComponent: true\n            });\n        return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        i18n[NumberPartsSymbol](...args));\n    }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Number Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\n *\n * @VueI18nComponent\n */\nconst NumberFormat = NumberFormatImpl;\nconst I18nN = NumberFormat;\n\nconst DatetimeFormatImpl = /* #__PURE__*/ defineComponent({\n    /* eslint-disable */\n    name: 'i18n-d',\n    props: assign({\n        value: {\n            type: [Number, Date],\n            required: true\n        },\n        format: {\n            type: [String, Object]\n        }\n    }, baseFormatProps),\n    /* eslint-enable */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    setup(props, context) {\n        const i18n = props.i18n ||\n            useI18n({\n                useScope: props.scope,\n                __useComponent: true\n            });\n        return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        i18n[DatetimePartsSymbol](...args));\n    }\n});\n/**\n * Datetime Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\n *\n * @VueI18nComponent\n */\nconst DatetimeFormat = DatetimeFormatImpl;\nconst I18nD = DatetimeFormat;\n\nfunction getComposer$2(i18n, instance) {\n    const i18nInternal = i18n;\n    if (i18n.mode === 'composition') {\n        return (i18nInternal.__getInstance(instance) || i18n.global);\n    }\n    else {\n        const vueI18n = i18nInternal.__getInstance(instance);\n        return vueI18n != null\n            ? vueI18n.__composer\n            : i18n.global.__composer;\n    }\n}\nfunction vTDirective(i18n) {\n    const _process = (binding) => {\n        const { instance, modifiers, value } = binding;\n        /* istanbul ignore if */\n        if (!instance || !instance.$) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        const composer = getComposer$2(i18n, instance.$);\n        if ((process.env.NODE_ENV !== 'production') && modifiers.preserve) {\n            warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));\n        }\n        const parsedValue = parseValue(value);\n        return [\n            Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]),\n            composer\n        ];\n    };\n    const register = (el, binding) => {\n        const [textContent, composer] = _process(binding);\n        if (inBrowser && i18n.global === composer) {\n            // global scope only\n            el.__i18nWatcher = watch(composer.locale, () => {\n                binding.instance && binding.instance.$forceUpdate();\n            });\n        }\n        el.__composer = composer;\n        el.textContent = textContent;\n    };\n    const unregister = (el) => {\n        if (inBrowser && el.__i18nWatcher) {\n            el.__i18nWatcher();\n            el.__i18nWatcher = undefined;\n            delete el.__i18nWatcher;\n        }\n        if (el.__composer) {\n            el.__composer = undefined;\n            delete el.__composer;\n        }\n    };\n    const update = (el, { value }) => {\n        if (el.__composer) {\n            const composer = el.__composer;\n            const parsedValue = parseValue(value);\n            el.textContent = Reflect.apply(composer.t, composer, [\n                ...makeParams(parsedValue)\n            ]);\n        }\n    };\n    const getSSRProps = (binding) => {\n        const [textContent] = _process(binding);\n        return { textContent };\n    };\n    return {\n        created: register,\n        unmounted: unregister,\n        beforeUpdate: update,\n        getSSRProps\n    };\n}\nfunction parseValue(value) {\n    if (isString(value)) {\n        return { path: value };\n    }\n    else if (isPlainObject(value)) {\n        if (!('path' in value)) {\n            throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\n        }\n        return value;\n    }\n    else {\n        throw createI18nError(I18nErrorCodes.INVALID_VALUE);\n    }\n}\nfunction makeParams(value) {\n    const { path, locale, args, choice, plural } = value;\n    const options = {};\n    const named = args || {};\n    if (isString(locale)) {\n        options.locale = locale;\n    }\n    if (isNumber(choice)) {\n        options.plural = choice;\n    }\n    if (isNumber(plural)) {\n        options.plural = plural;\n    }\n    return [path, named, options];\n}\n\nfunction apply(app, i18n, ...options) {\n    const pluginOptions = isPlainObject(options[0])\n        ? options[0]\n        : {};\n    const useI18nComponentName = !!pluginOptions.useI18nComponentName;\n    const globalInstall = isBoolean(pluginOptions.globalInstall)\n        ? pluginOptions.globalInstall\n        : true;\n    if ((process.env.NODE_ENV !== 'production') && globalInstall && useI18nComponentName) {\n        warn(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {\n            name: Translation.name\n        }));\n    }\n    if (globalInstall) {\n        [!useI18nComponentName ? Translation.name : 'i18n', 'I18nT'].forEach(name => app.component(name, Translation));\n        [NumberFormat.name, 'I18nN'].forEach(name => app.component(name, NumberFormat));\n        [DatetimeFormat.name, 'I18nD'].forEach(name => app.component(name, DatetimeFormat));\n    }\n    // install directive\n    {\n        app.directive('t', vTDirective(i18n));\n    }\n}\n\nconst VueDevToolsLabels = {\n    [\"vue-devtools-plugin-vue-i18n\" /* VueDevToolsIDs.PLUGIN */]: 'Vue I18n devtools',\n    [\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */]: 'I18n Resources',\n    [\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */]: 'Vue I18n'\n};\nconst VueDevToolsPlaceholders = {\n    [\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */]: 'Search for scopes ...'\n};\nconst VueDevToolsTimelineColors = {\n    [\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */]: 0xffcd19\n};\n\nconst VUE_I18N_COMPONENT_TYPES = 'vue-i18n: composer properties';\nlet devtoolsApi;\nasync function enableDevTools(app, i18n) {\n    return new Promise((resolve, reject) => {\n        try {\n            setupDevtoolsPlugin({\n                id: \"vue-devtools-plugin-vue-i18n\" /* VueDevToolsIDs.PLUGIN */,\n                label: VueDevToolsLabels[\"vue-devtools-plugin-vue-i18n\" /* VueDevToolsIDs.PLUGIN */],\n                packageName: 'vue-i18n',\n                homepage: 'https://vue-i18n.intlify.dev',\n                logo: 'https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png',\n                componentStateTypes: [VUE_I18N_COMPONENT_TYPES],\n                app: app // eslint-disable-line @typescript-eslint/no-explicit-any\n            }, api => {\n                devtoolsApi = api;\n                api.on.visitComponentTree(({ componentInstance, treeNode }) => {\n                    updateComponentTreeTags(componentInstance, treeNode, i18n);\n                });\n                api.on.inspectComponent(({ componentInstance, instanceData }) => {\n                    if (componentInstance.vnode.el &&\n                        componentInstance.vnode.el.__VUE_I18N__ &&\n                        instanceData) {\n                        if (i18n.mode === 'legacy') {\n                            // ignore global scope on legacy mode\n                            if (componentInstance.vnode.el.__VUE_I18N__ !==\n                                i18n.global.__composer) {\n                                inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\n                            }\n                        }\n                        else {\n                            inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\n                        }\n                    }\n                });\n                api.addInspector({\n                    id: \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */,\n                    label: VueDevToolsLabels[\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */],\n                    icon: 'language',\n                    treeFilterPlaceholder: VueDevToolsPlaceholders[\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */]\n                });\n                api.on.getInspectorTree(payload => {\n                    if (payload.app === app &&\n                        payload.inspectorId === \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */) {\n                        registerScope(payload, i18n);\n                    }\n                });\n                const roots = new Map();\n                api.on.getInspectorState(async (payload) => {\n                    if (payload.app === app &&\n                        payload.inspectorId === \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */) {\n                        api.unhighlightElement();\n                        inspectScope(payload, i18n);\n                        if (payload.nodeId === 'global') {\n                            if (!roots.has(payload.app)) {\n                                const [root] = await api.getComponentInstances(payload.app);\n                                roots.set(payload.app, root);\n                            }\n                            api.highlightElement(roots.get(payload.app));\n                        }\n                        else {\n                            const instance = getComponentInstance(payload.nodeId, i18n);\n                            instance && api.highlightElement(instance);\n                        }\n                    }\n                });\n                api.on.editInspectorState(payload => {\n                    if (payload.app === app &&\n                        payload.inspectorId === \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */) {\n                        editScope(payload, i18n);\n                    }\n                });\n                api.addTimelineLayer({\n                    id: \"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */,\n                    label: VueDevToolsLabels[\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */],\n                    color: VueDevToolsTimelineColors[\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */]\n                });\n                resolve(true);\n            });\n        }\n        catch (e) {\n            console.error(e);\n            reject(false);\n        }\n    });\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getI18nScopeLable(instance) {\n    return (instance.type.name ||\n        instance.type.displayName ||\n        instance.type.__file ||\n        'Anonymous');\n}\nfunction updateComponentTreeTags(instance, // eslint-disable-line @typescript-eslint/no-explicit-any\ntreeNode, i18n) {\n    // prettier-ignore\n    const global = i18n.mode === 'composition'\n        ? i18n.global\n        : i18n.global.__composer;\n    if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {\n        // add custom tags local scope only\n        if (instance.vnode.el.__VUE_I18N__ !== global) {\n            const tag = {\n                label: `i18n (${getI18nScopeLable(instance)} Scope)`,\n                textColor: 0x000000,\n                backgroundColor: 0xffcd19\n            };\n            treeNode.tags.push(tag);\n        }\n    }\n}\nfunction inspectComposer(instanceData, composer) {\n    const type = VUE_I18N_COMPONENT_TYPES;\n    instanceData.state.push({\n        type,\n        key: 'locale',\n        editable: true,\n        value: composer.locale.value\n    });\n    instanceData.state.push({\n        type,\n        key: 'availableLocales',\n        editable: false,\n        value: composer.availableLocales\n    });\n    instanceData.state.push({\n        type,\n        key: 'fallbackLocale',\n        editable: true,\n        value: composer.fallbackLocale.value\n    });\n    instanceData.state.push({\n        type,\n        key: 'inheritLocale',\n        editable: true,\n        value: composer.inheritLocale\n    });\n    instanceData.state.push({\n        type,\n        key: 'messages',\n        editable: false,\n        value: getLocaleMessageValue(composer.messages.value)\n    });\n    {\n        instanceData.state.push({\n            type,\n            key: 'datetimeFormats',\n            editable: false,\n            value: composer.datetimeFormats.value\n        });\n        instanceData.state.push({\n            type,\n            key: 'numberFormats',\n            editable: false,\n            value: composer.numberFormats.value\n        });\n    }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getLocaleMessageValue(messages) {\n    const value = {};\n    Object.keys(messages).forEach((key) => {\n        const v = messages[key];\n        if (isFunction(v) && 'source' in v) {\n            value[key] = getMessageFunctionDetails(v);\n        }\n        else if (isMessageAST(v) && v.loc && v.loc.source) {\n            value[key] = v.loc.source;\n        }\n        else if (isObject(v)) {\n            value[key] = getLocaleMessageValue(v);\n        }\n        else {\n            value[key] = v;\n        }\n    });\n    return value;\n}\nconst ESC = {\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    '&': '&amp;'\n};\nfunction escape(s) {\n    return s.replace(/[<>\"&]/g, escapeChar);\n}\nfunction escapeChar(a) {\n    return ESC[a] || a;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getMessageFunctionDetails(func) {\n    const argString = func.source ? `(\"${escape(func.source)}\")` : `(?)`;\n    return {\n        _custom: {\n            type: 'function',\n            display: `<span>ƒ</span> ${argString}`\n        }\n    };\n}\nfunction registerScope(payload, i18n) {\n    payload.rootNodes.push({\n        id: 'global',\n        label: 'Global Scope'\n    });\n    // prettier-ignore\n    const global = i18n.mode === 'composition'\n        ? i18n.global\n        : i18n.global.__composer;\n    for (const [keyInstance, instance] of i18n.__instances) {\n        // prettier-ignore\n        const composer = i18n.mode === 'composition'\n            ? instance\n            : instance.__composer;\n        if (global === composer) {\n            continue;\n        }\n        payload.rootNodes.push({\n            id: composer.id.toString(),\n            label: `${getI18nScopeLable(keyInstance)} Scope`\n        });\n    }\n}\nfunction getComponentInstance(nodeId, i18n) {\n    let instance = null;\n    if (nodeId !== 'global') {\n        for (const [component, composer] of i18n.__instances.entries()) {\n            if (composer.id.toString() === nodeId) {\n                instance = component;\n                break;\n            }\n        }\n    }\n    return instance;\n}\nfunction getComposer$1(nodeId, i18n) {\n    if (nodeId === 'global') {\n        return i18n.mode === 'composition'\n            ? i18n.global\n            : i18n.global.__composer;\n    }\n    else {\n        const instance = Array.from(i18n.__instances.values()).find(item => item.id.toString() === nodeId);\n        if (instance) {\n            return i18n.mode === 'composition'\n                ? instance\n                : instance.__composer;\n        }\n        else {\n            return null;\n        }\n    }\n}\nfunction inspectScope(payload, i18n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n    const composer = getComposer$1(payload.nodeId, i18n);\n    if (composer) {\n        // TODO:\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        payload.state = makeScopeInspectState(composer);\n    }\n    return null;\n}\nfunction makeScopeInspectState(composer) {\n    const state = {};\n    const localeType = 'Locale related info';\n    const localeStates = [\n        {\n            type: localeType,\n            key: 'locale',\n            editable: true,\n            value: composer.locale.value\n        },\n        {\n            type: localeType,\n            key: 'fallbackLocale',\n            editable: true,\n            value: composer.fallbackLocale.value\n        },\n        {\n            type: localeType,\n            key: 'availableLocales',\n            editable: false,\n            value: composer.availableLocales\n        },\n        {\n            type: localeType,\n            key: 'inheritLocale',\n            editable: true,\n            value: composer.inheritLocale\n        }\n    ];\n    state[localeType] = localeStates;\n    const localeMessagesType = 'Locale messages info';\n    const localeMessagesStates = [\n        {\n            type: localeMessagesType,\n            key: 'messages',\n            editable: false,\n            value: getLocaleMessageValue(composer.messages.value)\n        }\n    ];\n    state[localeMessagesType] = localeMessagesStates;\n    {\n        const datetimeFormatsType = 'Datetime formats info';\n        const datetimeFormatsStates = [\n            {\n                type: datetimeFormatsType,\n                key: 'datetimeFormats',\n                editable: false,\n                value: composer.datetimeFormats.value\n            }\n        ];\n        state[datetimeFormatsType] = datetimeFormatsStates;\n        const numberFormatsType = 'Datetime formats info';\n        const numberFormatsStates = [\n            {\n                type: numberFormatsType,\n                key: 'numberFormats',\n                editable: false,\n                value: composer.numberFormats.value\n            }\n        ];\n        state[numberFormatsType] = numberFormatsStates;\n    }\n    return state;\n}\nfunction addTimelineEvent(event, payload) {\n    if (devtoolsApi) {\n        let groupId;\n        if (payload && 'groupId' in payload) {\n            groupId = payload.groupId;\n            delete payload.groupId;\n        }\n        devtoolsApi.addTimelineEvent({\n            layerId: \"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */,\n            event: {\n                title: event,\n                groupId,\n                time: Date.now(),\n                meta: {},\n                data: payload || {},\n                logType: event === \"compile-error\" /* VueDevToolsTimelineEvents.COMPILE_ERROR */\n                    ? 'error'\n                    : event === \"fallback\" /* VueDevToolsTimelineEvents.FALBACK */ ||\n                        event === \"missing\" /* VueDevToolsTimelineEvents.MISSING */\n                        ? 'warning'\n                        : 'default'\n            }\n        });\n    }\n}\nfunction editScope(payload, i18n) {\n    const composer = getComposer$1(payload.nodeId, i18n);\n    if (composer) {\n        const [field] = payload.path;\n        if (field === 'locale' && isString(payload.state.value)) {\n            composer.locale.value = payload.state.value;\n        }\n        else if (field === 'fallbackLocale' &&\n            (isString(payload.state.value) ||\n                isArray(payload.state.value) ||\n                isObject(payload.state.value))) {\n            composer.fallbackLocale.value = payload.state.value;\n        }\n        else if (field === 'inheritLocale' && isBoolean(payload.state.value)) {\n            composer.inheritLocale = payload.state.value;\n        }\n    }\n}\n\n/**\n * Supports compatibility for legacy vue-i18n APIs\n * This mixin is used when we use vue-i18n@v9.x or later\n */\nfunction defineMixin(vuei18n, composer, i18n) {\n    return {\n        beforeCreate() {\n            const instance = getCurrentInstance();\n            /* istanbul ignore if */\n            if (!instance) {\n                throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n            }\n            const options = this.$options;\n            if (options.i18n) {\n                const optionsI18n = options.i18n;\n                if (options.__i18n) {\n                    optionsI18n.__i18n = options.__i18n;\n                }\n                optionsI18n.__root = composer;\n                if (this === this.$root) {\n                    // merge option and gttach global\n                    this.$i18n = mergeToGlobal(vuei18n, optionsI18n);\n                }\n                else {\n                    optionsI18n.__injectWithOption = true;\n                    optionsI18n.__extender = i18n.__vueI18nExtend;\n                    // atttach local VueI18n instance\n                    this.$i18n = createVueI18n(optionsI18n);\n                    // extend VueI18n instance\n                    const _vueI18n = this.$i18n;\n                    if (_vueI18n.__extender) {\n                        _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n                    }\n                }\n            }\n            else if (options.__i18n) {\n                if (this === this.$root) {\n                    // merge option and gttach global\n                    this.$i18n = mergeToGlobal(vuei18n, options);\n                }\n                else {\n                    // atttach local VueI18n instance\n                    this.$i18n = createVueI18n({\n                        __i18n: options.__i18n,\n                        __injectWithOption: true,\n                        __extender: i18n.__vueI18nExtend,\n                        __root: composer\n                    });\n                    // extend VueI18n instance\n                    const _vueI18n = this.$i18n;\n                    if (_vueI18n.__extender) {\n                        _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n                    }\n                }\n            }\n            else {\n                // attach global VueI18n instance\n                this.$i18n = vuei18n;\n            }\n            if (options.__i18nGlobal) {\n                adjustI18nResources(composer, options, options);\n            }\n            // defines vue-i18n legacy APIs\n            this.$t = (...args) => this.$i18n.t(...args);\n            this.$rt = (...args) => this.$i18n.rt(...args);\n            this.$tc = (...args) => this.$i18n.tc(...args);\n            this.$te = (key, locale) => this.$i18n.te(key, locale);\n            this.$d = (...args) => this.$i18n.d(...args);\n            this.$n = (...args) => this.$i18n.n(...args);\n            this.$tm = (key) => this.$i18n.tm(key);\n            i18n.__setInstance(instance, this.$i18n);\n        },\n        mounted() {\n            /* istanbul ignore if */\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                !false &&\n                this.$el &&\n                this.$i18n) {\n                const _vueI18n = this.$i18n;\n                this.$el.__VUE_I18N__ = _vueI18n.__composer;\n                const emitter = (this.__v_emitter =\n                    createEmitter());\n                _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\n                emitter.on('*', addTimelineEvent);\n            }\n        },\n        unmounted() {\n            const instance = getCurrentInstance();\n            /* istanbul ignore if */\n            if (!instance) {\n                throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n            }\n            const _vueI18n = this.$i18n;\n            /* istanbul ignore if */\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                !false &&\n                this.$el &&\n                this.$el.__VUE_I18N__) {\n                if (this.__v_emitter) {\n                    this.__v_emitter.off('*', addTimelineEvent);\n                    delete this.__v_emitter;\n                }\n                if (this.$i18n) {\n                    _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();\n                    delete this.$el.__VUE_I18N__;\n                }\n            }\n            delete this.$t;\n            delete this.$rt;\n            delete this.$tc;\n            delete this.$te;\n            delete this.$d;\n            delete this.$n;\n            delete this.$tm;\n            if (_vueI18n.__disposer) {\n                _vueI18n.__disposer();\n                delete _vueI18n.__disposer;\n                delete _vueI18n.__extender;\n            }\n            i18n.__deleteInstance(instance);\n            delete this.$i18n;\n        }\n    };\n}\nfunction mergeToGlobal(g, options) {\n    g.locale = options.locale || g.locale;\n    g.fallbackLocale = options.fallbackLocale || g.fallbackLocale;\n    g.missing = options.missing || g.missing;\n    g.silentTranslationWarn =\n        options.silentTranslationWarn || g.silentFallbackWarn;\n    g.silentFallbackWarn = options.silentFallbackWarn || g.silentFallbackWarn;\n    g.formatFallbackMessages =\n        options.formatFallbackMessages || g.formatFallbackMessages;\n    g.postTranslation = options.postTranslation || g.postTranslation;\n    g.warnHtmlInMessage = options.warnHtmlInMessage || g.warnHtmlInMessage;\n    g.escapeParameterHtml = options.escapeParameterHtml || g.escapeParameterHtml;\n    g.sync = options.sync || g.sync;\n    g.__composer[SetPluralRulesSymbol](options.pluralizationRules || g.pluralizationRules);\n    const messages = getLocaleMessages(g.locale, {\n        messages: options.messages,\n        __i18n: options.__i18n\n    });\n    Object.keys(messages).forEach(locale => g.mergeLocaleMessage(locale, messages[locale]));\n    if (options.datetimeFormats) {\n        Object.keys(options.datetimeFormats).forEach(locale => g.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\n    }\n    if (options.numberFormats) {\n        Object.keys(options.numberFormats).forEach(locale => g.mergeNumberFormat(locale, options.numberFormats[locale]));\n    }\n    return g;\n}\n\n/**\n * Injection key for {@link useI18n}\n *\n * @remarks\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\n *\n * @VueI18nGeneral\n */\nconst I18nInjectionKey = \n/* #__PURE__*/ makeSymbol('global-vue-i18n');\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction createI18n(options = {}, VueI18nLegacy) {\n    // prettier-ignore\n    const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy)\n            ? options.legacy\n            : __VUE_I18N_LEGACY_API__;\n    // prettier-ignore\n    const __globalInjection = isBoolean(options.globalInjection)\n        ? options.globalInjection\n        : true;\n    // prettier-ignore\n    const __allowComposition = __VUE_I18N_LEGACY_API__ && __legacyMode\n            ? !!options.allowComposition\n            : true;\n    const __instances = new Map();\n    const [globalScope, __global] = createGlobal(options, __legacyMode);\n    const symbol = /* #__PURE__*/ makeSymbol((process.env.NODE_ENV !== 'production') ? 'vue-i18n' : '');\n    if ((process.env.NODE_ENV !== 'production')) {\n        if (__legacyMode && __allowComposition && !false) {\n            warn(getWarnMessage(I18nWarnCodes.NOTICE_DROP_ALLOW_COMPOSITION));\n        }\n    }\n    function __getInstance(component) {\n        return __instances.get(component) || null;\n    }\n    function __setInstance(component, instance) {\n        __instances.set(component, instance);\n    }\n    function __deleteInstance(component) {\n        __instances.delete(component);\n    }\n    {\n        const i18n = {\n            // mode\n            get mode() {\n                return __VUE_I18N_LEGACY_API__ && __legacyMode\n                    ? 'legacy'\n                    : 'composition';\n            },\n            // allowComposition\n            get allowComposition() {\n                return __allowComposition;\n            },\n            // install plugin\n            async install(app, ...options) {\n                if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                    !false) {\n                    app.__VUE_I18N__ = i18n;\n                }\n                // setup global provider\n                app.__VUE_I18N_SYMBOL__ = symbol;\n                app.provide(app.__VUE_I18N_SYMBOL__, i18n);\n                // set composer & vuei18n extend hook options from plugin options\n                if (isPlainObject(options[0])) {\n                    const opts = options[0];\n                    i18n.__composerExtend =\n                        opts.__composerExtend;\n                    i18n.__vueI18nExtend =\n                        opts.__vueI18nExtend;\n                }\n                // global method and properties injection for Composition API\n                let globalReleaseHandler = null;\n                if (!__legacyMode && __globalInjection) {\n                    globalReleaseHandler = injectGlobalFields(app, i18n.global);\n                }\n                // install built-in components and directive\n                if (__VUE_I18N_FULL_INSTALL__) {\n                    apply(app, i18n, ...options);\n                }\n                // setup mixin for Legacy API\n                if (__VUE_I18N_LEGACY_API__ && __legacyMode) {\n                    app.mixin(defineMixin(__global, __global.__composer, i18n));\n                }\n                // release global scope\n                const unmountApp = app.unmount;\n                app.unmount = () => {\n                    globalReleaseHandler && globalReleaseHandler();\n                    i18n.dispose();\n                    unmountApp();\n                };\n                // setup vue-devtools plugin\n                if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && !false) {\n                    const ret = await enableDevTools(app, i18n);\n                    if (!ret) {\n                        throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);\n                    }\n                    const emitter = createEmitter();\n                    if (__legacyMode) {\n                        const _vueI18n = __global;\n                        _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\n                    }\n                    else {\n                        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                        const _composer = __global;\n                        _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\n                    }\n                    emitter.on('*', addTimelineEvent);\n                }\n            },\n            // global accessor\n            get global() {\n                return __global;\n            },\n            dispose() {\n                globalScope.stop();\n            },\n            // @internal\n            __instances,\n            // @internal\n            __getInstance,\n            // @internal\n            __setInstance,\n            // @internal\n            __deleteInstance\n        };\n        return i18n;\n    }\n}\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction useI18n(options = {}) {\n    const instance = getCurrentInstance();\n    if (instance == null) {\n        throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\n    }\n    if (!instance.isCE &&\n        instance.appContext.app != null &&\n        !instance.appContext.app.__VUE_I18N_SYMBOL__) {\n        throw createI18nError(I18nErrorCodes.NOT_INSTALLED);\n    }\n    const i18n = getI18nInstance(instance);\n    const gl = getGlobalComposer(i18n);\n    const componentOptions = getComponentOptions(instance);\n    const scope = getScope(options, componentOptions);\n    if (__VUE_I18N_LEGACY_API__) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        if (i18n.mode === 'legacy' && !options.__useComponent) {\n            if (!i18n.allowComposition) {\n                throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);\n            }\n            return useI18nForLegacy(instance, scope, gl, options);\n        }\n    }\n    if (scope === 'global') {\n        adjustI18nResources(gl, options, componentOptions);\n        return gl;\n    }\n    if (scope === 'parent') {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        let composer = getComposer(i18n, instance, options.__useComponent);\n        if (composer == null) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));\n            }\n            composer = gl;\n        }\n        return composer;\n    }\n    const i18nInternal = i18n;\n    let composer = i18nInternal.__getInstance(instance);\n    if (composer == null) {\n        const composerOptions = assign({}, options);\n        if ('__i18n' in componentOptions) {\n            composerOptions.__i18n = componentOptions.__i18n;\n        }\n        if (gl) {\n            composerOptions.__root = gl;\n        }\n        composer = createComposer(composerOptions);\n        if (i18nInternal.__composerExtend) {\n            composer[DisposeSymbol] =\n                i18nInternal.__composerExtend(composer);\n        }\n        setupLifeCycle(i18nInternal, instance, composer);\n        i18nInternal.__setInstance(instance, composer);\n    }\n    return composer;\n}\n/**\n * Cast to VueI18n legacy compatible type\n *\n * @remarks\n * This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge).\n *\n * The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment.\n *\n * @param i18n - An instance of {@link I18n}\n * @returns A i18n instance which is casted to {@link VueI18n} type\n *\n * @VueI18nTip\n * :new: provided by **vue-i18n-bridge only**\n *\n * @VueI18nGeneral\n */\n/* #__NO_SIDE_EFFECTS__ */\nconst castToVueI18n = (i18n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => {\n    if (!(__VUE_I18N_BRIDGE__ in i18n)) {\n        throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);\n    }\n    return i18n;\n};\nfunction createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any\n) {\n    const scope = effectScope();\n    {\n        const obj = __VUE_I18N_LEGACY_API__ && legacyMode\n            ? scope.run(() => createVueI18n(options))\n            : scope.run(() => createComposer(options));\n        if (obj == null) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        return [scope, obj];\n    }\n}\nfunction getI18nInstance(instance) {\n    {\n        const i18n = inject(!instance.isCE\n            ? instance.appContext.app.__VUE_I18N_SYMBOL__\n            : I18nInjectionKey);\n        /* istanbul ignore if */\n        if (!i18n) {\n            throw createI18nError(!instance.isCE\n                ? I18nErrorCodes.UNEXPECTED_ERROR\n                : I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE);\n        }\n        return i18n;\n    }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScope(options, componentOptions) {\n    // prettier-ignore\n    return isEmptyObject(options)\n        ? ('__i18n' in componentOptions)\n            ? 'local'\n            : 'global'\n        : !options.useScope\n            ? 'local'\n            : options.useScope;\n}\nfunction getGlobalComposer(i18n) {\n    // prettier-ignore\n    return i18n.mode === 'composition'\n            ? i18n.global\n            : i18n.global.__composer\n        ;\n}\nfunction getComposer(i18n, target, useComponent = false) {\n    let composer = null;\n    const root = target.root;\n    let current = getParentComponentInstance(target, useComponent);\n    while (current != null) {\n        const i18nInternal = i18n;\n        if (i18n.mode === 'composition') {\n            composer = i18nInternal.__getInstance(current);\n        }\n        else {\n            if (__VUE_I18N_LEGACY_API__) {\n                const vueI18n = i18nInternal.__getInstance(current);\n                if (vueI18n != null) {\n                    composer = vueI18n\n                        .__composer;\n                    if (useComponent &&\n                        composer &&\n                        !composer[InejctWithOptionSymbol] // eslint-disable-line @typescript-eslint/no-explicit-any\n                    ) {\n                        composer = null;\n                    }\n                }\n            }\n        }\n        if (composer != null) {\n            break;\n        }\n        if (root === current) {\n            break;\n        }\n        current = current.parent;\n    }\n    return composer;\n}\nfunction getParentComponentInstance(target, useComponent = false) {\n    if (target == null) {\n        return null;\n    }\n    {\n        // if `useComponent: true` will be specified, we get lexical scope owner instance for use-case slots\n        return !useComponent\n            ? target.parent\n            : target.vnode.ctx || target.parent; // eslint-disable-line @typescript-eslint/no-explicit-any\n    }\n}\nfunction setupLifeCycle(i18n, target, composer) {\n    let emitter = null;\n    {\n        onMounted(() => {\n            // inject composer instance to DOM for intlify-devtools\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                !false &&\n                target.vnode.el) {\n                target.vnode.el.__VUE_I18N__ = composer;\n                emitter = createEmitter();\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                const _composer = composer;\n                _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\n                emitter.on('*', addTimelineEvent);\n            }\n        }, target);\n        onUnmounted(() => {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            const _composer = composer;\n            // remove composer instance from DOM for intlify-devtools\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                !false &&\n                target.vnode.el &&\n                target.vnode.el.__VUE_I18N__) {\n                emitter && emitter.off('*', addTimelineEvent);\n                _composer[DisableEmitter] && _composer[DisableEmitter]();\n                delete target.vnode.el.__VUE_I18N__;\n            }\n            i18n.__deleteInstance(target);\n            // dispose extended resources\n            const dispose = _composer[DisposeSymbol];\n            if (dispose) {\n                dispose();\n                delete _composer[DisposeSymbol];\n            }\n        }, target);\n    }\n}\nfunction useI18nForLegacy(instance, scope, root, options = {} // eslint-disable-line @typescript-eslint/no-explicit-any\n) {\n    const isLocalScope = scope === 'local';\n    const _composer = shallowRef(null);\n    if (isLocalScope &&\n        instance.proxy &&\n        !(instance.proxy.$options.i18n || instance.proxy.$options.__i18n)) {\n        throw createI18nError(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);\n    }\n    const _inheritLocale = isBoolean(options.inheritLocale)\n        ? options.inheritLocale\n        : !isString(options.locale);\n    const _locale = ref(\n    // prettier-ignore\n    !isLocalScope || _inheritLocale\n        ? root.locale.value\n        : isString(options.locale)\n            ? options.locale\n            : DEFAULT_LOCALE);\n    const _fallbackLocale = ref(\n    // prettier-ignore\n    !isLocalScope || _inheritLocale\n        ? root.fallbackLocale.value\n        : isString(options.fallbackLocale) ||\n            isArray(options.fallbackLocale) ||\n            isPlainObject(options.fallbackLocale) ||\n            options.fallbackLocale === false\n            ? options.fallbackLocale\n            : _locale.value);\n    const _messages = ref(getLocaleMessages(_locale.value, options));\n    // prettier-ignore\n    const _datetimeFormats = ref(isPlainObject(options.datetimeFormats)\n        ? options.datetimeFormats\n        : { [_locale.value]: {} });\n    // prettier-ignore\n    const _numberFormats = ref(isPlainObject(options.numberFormats)\n        ? options.numberFormats\n        : { [_locale.value]: {} });\n    // prettier-ignore\n    const _missingWarn = isLocalScope\n        ? root.missingWarn\n        : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n            ? options.missingWarn\n            : true;\n    // prettier-ignore\n    const _fallbackWarn = isLocalScope\n        ? root.fallbackWarn\n        : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n            ? options.fallbackWarn\n            : true;\n    // prettier-ignore\n    const _fallbackRoot = isLocalScope\n        ? root.fallbackRoot\n        : isBoolean(options.fallbackRoot)\n            ? options.fallbackRoot\n            : true;\n    // configure fall back to root\n    const _fallbackFormat = !!options.fallbackFormat;\n    // runtime missing\n    const _missing = isFunction(options.missing) ? options.missing : null;\n    // postTranslation handler\n    const _postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : null;\n    // prettier-ignore\n    const _warnHtmlMessage = isLocalScope\n        ? root.warnHtmlMessage\n        : isBoolean(options.warnHtmlMessage)\n            ? options.warnHtmlMessage\n            : true;\n    const _escapeParameter = !!options.escapeParameter;\n    // prettier-ignore\n    const _modifiers = isLocalScope\n        ? root.modifiers\n        : isPlainObject(options.modifiers)\n            ? options.modifiers\n            : {};\n    // pluralRules\n    const _pluralRules = options.pluralRules || (isLocalScope && root.pluralRules);\n    // track reactivity\n    function trackReactivityValues() {\n        return [\n            _locale.value,\n            _fallbackLocale.value,\n            _messages.value,\n            _datetimeFormats.value,\n            _numberFormats.value\n        ];\n    }\n    // locale\n    const locale = computed({\n        get: () => {\n            return _composer.value ? _composer.value.locale.value : _locale.value;\n        },\n        set: val => {\n            if (_composer.value) {\n                _composer.value.locale.value = val;\n            }\n            _locale.value = val;\n        }\n    });\n    // fallbackLocale\n    const fallbackLocale = computed({\n        get: () => {\n            return _composer.value\n                ? _composer.value.fallbackLocale.value\n                : _fallbackLocale.value;\n        },\n        set: val => {\n            if (_composer.value) {\n                _composer.value.fallbackLocale.value = val;\n            }\n            _fallbackLocale.value = val;\n        }\n    });\n    // messages\n    const messages = computed(() => {\n        if (_composer.value) {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            return _composer.value.messages.value;\n        }\n        else {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            return _messages.value;\n        }\n    });\n    const datetimeFormats = computed(() => _datetimeFormats.value);\n    const numberFormats = computed(() => _numberFormats.value);\n    function getPostTranslationHandler() {\n        return _composer.value\n            ? _composer.value.getPostTranslationHandler()\n            : _postTranslation;\n    }\n    function setPostTranslationHandler(handler) {\n        if (_composer.value) {\n            _composer.value.setPostTranslationHandler(handler);\n        }\n    }\n    function getMissingHandler() {\n        return _composer.value ? _composer.value.getMissingHandler() : _missing;\n    }\n    function setMissingHandler(handler) {\n        if (_composer.value) {\n            _composer.value.setMissingHandler(handler);\n        }\n    }\n    function warpWithDeps(fn) {\n        trackReactivityValues();\n        return fn();\n    }\n    function t(...args) {\n        return _composer.value\n            ? warpWithDeps(() => Reflect.apply(_composer.value.t, null, [...args]))\n            : warpWithDeps(() => '');\n    }\n    function rt(...args) {\n        return _composer.value\n            ? Reflect.apply(_composer.value.rt, null, [...args])\n            : '';\n    }\n    function d(...args) {\n        return _composer.value\n            ? warpWithDeps(() => Reflect.apply(_composer.value.d, null, [...args]))\n            : warpWithDeps(() => '');\n    }\n    function n(...args) {\n        return _composer.value\n            ? warpWithDeps(() => Reflect.apply(_composer.value.n, null, [...args]))\n            : warpWithDeps(() => '');\n    }\n    function tm(key) {\n        return _composer.value ? _composer.value.tm(key) : {};\n    }\n    function te(key, locale) {\n        return _composer.value ? _composer.value.te(key, locale) : false;\n    }\n    function getLocaleMessage(locale) {\n        return _composer.value ? _composer.value.getLocaleMessage(locale) : {};\n    }\n    function setLocaleMessage(locale, message) {\n        if (_composer.value) {\n            _composer.value.setLocaleMessage(locale, message);\n            _messages.value[locale] = message;\n        }\n    }\n    function mergeLocaleMessage(locale, message) {\n        if (_composer.value) {\n            _composer.value.mergeLocaleMessage(locale, message);\n        }\n    }\n    function getDateTimeFormat(locale) {\n        return _composer.value ? _composer.value.getDateTimeFormat(locale) : {};\n    }\n    function setDateTimeFormat(locale, format) {\n        if (_composer.value) {\n            _composer.value.setDateTimeFormat(locale, format);\n            _datetimeFormats.value[locale] = format;\n        }\n    }\n    function mergeDateTimeFormat(locale, format) {\n        if (_composer.value) {\n            _composer.value.mergeDateTimeFormat(locale, format);\n        }\n    }\n    function getNumberFormat(locale) {\n        return _composer.value ? _composer.value.getNumberFormat(locale) : {};\n    }\n    function setNumberFormat(locale, format) {\n        if (_composer.value) {\n            _composer.value.setNumberFormat(locale, format);\n            _numberFormats.value[locale] = format;\n        }\n    }\n    function mergeNumberFormat(locale, format) {\n        if (_composer.value) {\n            _composer.value.mergeNumberFormat(locale, format);\n        }\n    }\n    const wrapper = {\n        get id() {\n            return _composer.value ? _composer.value.id : -1;\n        },\n        locale,\n        fallbackLocale,\n        messages,\n        datetimeFormats,\n        numberFormats,\n        get inheritLocale() {\n            return _composer.value ? _composer.value.inheritLocale : _inheritLocale;\n        },\n        set inheritLocale(val) {\n            if (_composer.value) {\n                _composer.value.inheritLocale = val;\n            }\n        },\n        get availableLocales() {\n            return _composer.value\n                ? _composer.value.availableLocales\n                : Object.keys(_messages.value);\n        },\n        get modifiers() {\n            return (_composer.value ? _composer.value.modifiers : _modifiers);\n        },\n        get pluralRules() {\n            return (_composer.value ? _composer.value.pluralRules : _pluralRules);\n        },\n        get isGlobal() {\n            return _composer.value ? _composer.value.isGlobal : false;\n        },\n        get missingWarn() {\n            return _composer.value ? _composer.value.missingWarn : _missingWarn;\n        },\n        set missingWarn(val) {\n            if (_composer.value) {\n                _composer.value.missingWarn = val;\n            }\n        },\n        get fallbackWarn() {\n            return _composer.value ? _composer.value.fallbackWarn : _fallbackWarn;\n        },\n        set fallbackWarn(val) {\n            if (_composer.value) {\n                _composer.value.missingWarn = val;\n            }\n        },\n        get fallbackRoot() {\n            return _composer.value ? _composer.value.fallbackRoot : _fallbackRoot;\n        },\n        set fallbackRoot(val) {\n            if (_composer.value) {\n                _composer.value.fallbackRoot = val;\n            }\n        },\n        get fallbackFormat() {\n            return _composer.value ? _composer.value.fallbackFormat : _fallbackFormat;\n        },\n        set fallbackFormat(val) {\n            if (_composer.value) {\n                _composer.value.fallbackFormat = val;\n            }\n        },\n        get warnHtmlMessage() {\n            return _composer.value\n                ? _composer.value.warnHtmlMessage\n                : _warnHtmlMessage;\n        },\n        set warnHtmlMessage(val) {\n            if (_composer.value) {\n                _composer.value.warnHtmlMessage = val;\n            }\n        },\n        get escapeParameter() {\n            return _composer.value\n                ? _composer.value.escapeParameter\n                : _escapeParameter;\n        },\n        set escapeParameter(val) {\n            if (_composer.value) {\n                _composer.value.escapeParameter = val;\n            }\n        },\n        t,\n        getPostTranslationHandler,\n        setPostTranslationHandler,\n        getMissingHandler,\n        setMissingHandler,\n        rt,\n        d,\n        n,\n        tm,\n        te,\n        getLocaleMessage,\n        setLocaleMessage,\n        mergeLocaleMessage,\n        getDateTimeFormat,\n        setDateTimeFormat,\n        mergeDateTimeFormat,\n        getNumberFormat,\n        setNumberFormat,\n        mergeNumberFormat\n    };\n    function sync(composer) {\n        composer.locale.value = _locale.value;\n        composer.fallbackLocale.value = _fallbackLocale.value;\n        Object.keys(_messages.value).forEach(locale => {\n            composer.mergeLocaleMessage(locale, _messages.value[locale]);\n        });\n        Object.keys(_datetimeFormats.value).forEach(locale => {\n            composer.mergeDateTimeFormat(locale, _datetimeFormats.value[locale]);\n        });\n        Object.keys(_numberFormats.value).forEach(locale => {\n            composer.mergeNumberFormat(locale, _numberFormats.value[locale]);\n        });\n        composer.escapeParameter = _escapeParameter;\n        composer.fallbackFormat = _fallbackFormat;\n        composer.fallbackRoot = _fallbackRoot;\n        composer.fallbackWarn = _fallbackWarn;\n        composer.missingWarn = _missingWarn;\n        composer.warnHtmlMessage = _warnHtmlMessage;\n    }\n    onBeforeMount(() => {\n        if (instance.proxy == null || instance.proxy.$i18n == null) {\n            throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);\n        }\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const composer = (_composer.value = instance.proxy.$i18n\n            .__composer);\n        if (scope === 'global') {\n            _locale.value = composer.locale.value;\n            _fallbackLocale.value = composer.fallbackLocale.value;\n            _messages.value = composer.messages.value;\n            _datetimeFormats.value = composer.datetimeFormats.value;\n            _numberFormats.value = composer.numberFormats.value;\n        }\n        else if (isLocalScope) {\n            sync(composer);\n        }\n    });\n    return wrapper;\n}\nconst globalExportProps = [\n    'locale',\n    'fallbackLocale',\n    'availableLocales'\n];\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm', 'te']\n    ;\nfunction injectGlobalFields(app, composer) {\n    const i18n = Object.create(null);\n    globalExportProps.forEach(prop => {\n        const desc = Object.getOwnPropertyDescriptor(composer, prop);\n        if (!desc) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        const wrap = isRef(desc.value) // check computed props\n            ? {\n                get() {\n                    return desc.value.value;\n                },\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                set(val) {\n                    desc.value.value = val;\n                }\n            }\n            : {\n                get() {\n                    return desc.get && desc.get();\n                }\n            };\n        Object.defineProperty(i18n, prop, wrap);\n    });\n    app.config.globalProperties.$i18n = i18n;\n    globalExportMethods.forEach(method => {\n        const desc = Object.getOwnPropertyDescriptor(composer, method);\n        if (!desc || !desc.value) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\n    });\n    const dispose = () => {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        delete app.config.globalProperties.$i18n;\n        globalExportMethods.forEach(method => {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            delete app.config.globalProperties[`$${method}`];\n        });\n    };\n    return dispose;\n}\n\n{\n    initFeatureFlags();\n}\n// register message compiler at vue-i18n\nif (__INTLIFY_JIT_COMPILATION__) {\n    registerMessageCompiler(compile);\n}\nelse {\n    registerMessageCompiler(compileToFunction);\n}\n// register message resolver at vue-i18n\nregisterMessageResolver(resolveValue);\n// register fallback locale at vue-i18n\nregisterLocaleFallbacker(fallbackWithLocaleChain);\n// NOTE: experimental !!\nif ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n    const target = getGlobalThis();\n    target.__INTLIFY__ = true;\n    setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);\n}\nif ((process.env.NODE_ENV !== 'production')) ;\n\nexport { DatetimeFormat, I18nD, I18nInjectionKey, I18nN, I18nT, NumberFormat, Translation, VERSION, castToVueI18n, createI18n, useI18n, vTDirective };\n","import { AddToCartFormProps } from \"../components/addToCartForm/addToCartForm.vue\";\r\n\r\n/**\r\n * A utility class for mapping HTML element dataset attribute string values to typed props.\r\n */\r\nexport default class PropsMapper {\r\n    static addToCartFormProps = (el: HTMLElement): AddToCartFormProps => {\r\n        return {\r\n            matrixSizes: JSON.parse(el.dataset.matrixSizesJson || \"{}\"),\r\n            regularSizes: el.dataset.regularSizesJson\r\n                ? JSON.parse(el.dataset.regularSizesJson)\r\n                : {},\r\n            shopId: el.dataset.shopId || \"\",\r\n            isSizeGuide: el.dataset.isSizeGuide === \"True\",\r\n            isProductInStock: el.dataset.isProductInStock === \"True\",\r\n            productAvailableInStore:\r\n                el.dataset.productAvailableInStore === \"True\",\r\n            displayName: el.dataset.displayName || \"\",\r\n            itemColor: el.dataset.itemColor || \"\",\r\n            itemMetaColor: el.dataset.itemMetaColor || \"\",\r\n            cartStatusImage: el.dataset.cartStatusImage || \"\",\r\n            checkoutLink: el.dataset.checkoutLink || \"\",\r\n            esalesKey: el.dataset.esalesKey || \"\",\r\n            showAvailability: true,\r\n            showInventoryNotification: true,\r\n            categoryName: el.dataset.categoryName || \"\",\r\n        };\r\n    };\r\n}\r\n","import { createApp } from \"vue\";\r\nimport QuickSearch from \"./apps/views/quickSearch/quickSearch.vue\";\r\nimport SearchPage from \"./apps/views/searchPage/searchPage.vue\";\r\nimport searchPageRouter from \"./apps/views/searchPage/searchPage.router\";\r\nimport CategoryPage from \"./apps/views/categoryPage/categoryPage.vue\";\r\nimport categoryPageRouter from \"./apps/views/categoryPage/categoryPage.router\";\r\nimport ProductsModule from \"./apps/views/productsModule/productsModule.vue\";\r\nimport CartStatus from \"./apps/views/cartStatus/cartStatus.vue\";\r\nimport MiniCart from \"./apps/views/miniCart/miniCart.vue\";\r\nimport CheckoutPage from \"./apps/views/checkoutPage/checkoutPage.vue\";\r\nimport Root from \"./apps/root.vue\";\r\nimport LoyaltyDiscount from \"./apps/components/loyaltyDiscount/loyaltyDiscount.vue\";\r\nimport ImageZoom from \"./apps/views/imageZoom/imageZoom.vue\";\r\nimport { createI18n } from \"vue-i18n\"; // Assuming init18n is a wrapper around vue-i18n\r\nimport { createPinia } from \"pinia\";\r\nimport addToCartForm from \"./apps/components/addToCartForm/addToCartForm.vue\";\r\nimport PropsMapper from \"./apps/utils/propsMapper\";\r\n\r\nconst app = createApp(Root);\r\nconst pinia = createPinia();\r\n\r\nexport default {\r\n    init() {\r\n        const quickSearchEl = document.querySelector(\r\n            \"#app-quick-search\",\r\n        ) as HTMLElement;\r\n        const searchPageEl = document.querySelector(\r\n            \"#app-search-page\",\r\n        ) as HTMLElement;\r\n        const categoryPageEl = document.querySelector(\r\n            \"#app-category-page\",\r\n        ) as HTMLElement;\r\n        const productsModuleEls = document.querySelectorAll(\r\n            \".app-products-module\",\r\n        ) as NodeListOf<HTMLElement>;\r\n        const cartStatusEl = document.querySelector(\r\n            \"#app-cart-status\",\r\n        ) as HTMLElement;\r\n        const miniCartEl = document.querySelector(\r\n            \"#app-minicart\",\r\n        ) as HTMLElement;\r\n        const loyaltyDiscountBlockEls = document.querySelectorAll(\r\n            \".discount-block\",\r\n        ) as NodeListOf<HTMLElement>;\r\n        const CheckoutPageEl = document.querySelector(\r\n            \"#checkout-page\",\r\n        ) as HTMLElement;\r\n        const imageZoomEl = document.querySelector(\r\n            \"#image-zoom\",\r\n        ) as HTMLElement;\r\n        const addToCartFormEl = document.querySelector(\r\n            \"#add-to-cart-form\",\r\n        ) as HTMLElement;\r\n\r\n        return [\r\n            // Init quickSearch\r\n            quickSearchEl && initApp(quickSearchEl, QuickSearch),\r\n            // Init searchPage\r\n            searchPageEl &&\r\n                initApp(\r\n                    searchPageEl,\r\n                    SearchPage,\r\n                    searchPageRouter(searchPageEl.dataset.baseUrlPath),\r\n                ),\r\n            // Init categoryPage\r\n            categoryPageEl &&\r\n                initApp(\r\n                    categoryPageEl,\r\n                    CategoryPage,\r\n                    categoryPageRouter(categoryPageEl.dataset.baseUrlPath),\r\n                ),\r\n            // Init productsModules\r\n            [].forEach.call(productsModuleEls, (el) => {\r\n                initApp(el, ProductsModule, null);\r\n            }),\r\n            // Minicart el\r\n            miniCartEl && initApp(miniCartEl, MiniCart, null),\r\n            // Cart status el\r\n            cartStatusEl && initApp(cartStatusEl, CartStatus, null),\r\n            // image zoom el\r\n            imageZoomEl && initApp(imageZoomEl, ImageZoom, null),\r\n            // Init discount block els\r\n            discountBlockInit(loyaltyDiscountBlockEls),\r\n            // Init shopping cart\r\n            CheckoutPageEl && initApp(CheckoutPageEl, CheckoutPage),\r\n            // Init add to cart form\r\n            addToCartFormEl && initApp(addToCartFormEl, addToCartForm, null, PropsMapper.addToCartFormProps),\r\n        ];\r\n    },\r\n};\r\n\r\n/**\r\n * Init app\r\n */\r\nfunction initApp(el, app, router?, propsMapper?) {\r\n    const i18n = init18n(app, el);\r\n\r\n    const props = propsMapper ? propsMapper(el) : {};\r\n\r\n    const config: any = {\r\n        ...Root,\r\n        i18n,\r\n        components: {\r\n            App: app,\r\n        },\r\n        data() {\r\n            return {\r\n                attributes: propsMapper ? props : { ...el.dataset },\r\n                props,\r\n            };\r\n        },\r\n    };\r\n\r\n    const vueApp = createApp({\r\n        ...config,\r\n        template: \"<App />\",\r\n    });\r\n\r\n    if (router) {\r\n        vueApp.use(router);\r\n    }\r\n\r\n    // vueApp.config.performance = true;\r\n    vueApp.use(i18n);\r\n    vueApp.use(pinia);\r\n    vueApp.mount(el);\r\n}\r\n\r\n/**\r\n * Gets translation strings from dataset attributes prefixed with 'translation_'\r\n *\r\n * Example:\r\n *\r\n * translation_close-button yields $t('closeButton')\r\n */\r\nfunction init18n(app, el) {\r\n    const translations = {};\r\n\r\n    Object.keys(el.dataset).forEach((key) => {\r\n        if (key.indexOf(\"translation_\") !== -1) {\r\n            const newKey = key.split(\"translation_\")[1];\r\n            translations[newKey] = el.dataset[key];\r\n        }\r\n    });\r\n\r\n    return createI18n({\r\n        locale: \"no\",\r\n        messages: {\r\n            no: translations,\r\n        },\r\n    });\r\n}\r\n\r\n/**\r\n * Custom init for discountBlocks. Listener required because the viewModel is occasionally rerendered without a page reload through ajax actionlinks.\r\n */\r\nfunction discountBlockInit(loyaltyDiscountBlockEls: NodeListOf<HTMLElement>) {\r\n    [].forEach.call(loyaltyDiscountBlockEls, (el) => {\r\n        initApp(el, LoyaltyDiscount, null);\r\n    });\r\n\r\n    const ajaxContent = document.getElementById(\"ajax-content\");\r\n    if (!ajaxContent) return;\r\n\r\n    const observer = new MutationObserver((mutationList, observer) => {\r\n        mutationList.forEach((mutation) => {\r\n            if (mutation.type == \"childList\") {\r\n                const loyaltyDiscountBlockEls = document.querySelectorAll(\r\n                    \".discount-block\",\r\n                ) as NodeListOf<HTMLElement>;\r\n                [].forEach.call(loyaltyDiscountBlockEls, (el) => {\r\n                    initApp(el, LoyaltyDiscount, null);\r\n                });\r\n            }\r\n        });\r\n    });\r\n\r\n    const config = { childList: true, subtree: false };\r\n    observer.observe(ajaxContent, config);\r\n}\r\n","export default class HeaderBanner {\r\n    private SESSIONSTORAGE_PREFIX = 'headerbanner-hidden-';\r\n\r\n    private banner: HTMLElement;\r\n    private dismissButton: HTMLButtonElement | null;\r\n    private id: string | undefined;\r\n    private hidden: boolean;\r\n\r\n    constructor(element) {\r\n        this.banner = element;\r\n        this.init();\r\n    }\r\n    \r\n    init = () => {\r\n        this.dismissButton = this.banner.querySelector('button');\r\n        this.id = this.banner.dataset.id;\r\n        this.hidden = this.getHiddenFromSessionStorage();\r\n        this.initDismissButton();\r\n        this.updateDisplayValue();\r\n    };\r\n    \r\n    private initDismissButton = () => {\r\n        this.dismissButton?.addEventListener('click', async (e) => {\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n            this.dismissBanner();\r\n        });\r\n    };\r\n\r\n    private updateDisplayValue = () => {\r\n        if (this.hidden && !this.banner.classList.contains('is-hidden')) {\r\n            this.banner.classList.add('is-hidden');\r\n        }    \r\n    };\r\n\r\n    private dismissBanner = () => {\r\n        this.hidden = true;\r\n        this.updateDisplayValue();\r\n        this.setHiddenInSessionStorage();\r\n    };\r\n    \r\n    private getHiddenFromSessionStorage = () => {\r\n        return sessionStorage.getItem(this.sessionStorageKey()) === 'true';\r\n    };\r\n    \r\n    private setHiddenInSessionStorage = () =>  {\r\n        sessionStorage.setItem(this.sessionStorageKey(), 'true');\r\n    };\r\n\r\n    private sessionStorageKey = () => {\r\n        return this.SESSIONSTORAGE_PREFIX + this.id;\r\n    };\r\n}\r\n","import { z } from \"zod\";\r\nimport {\r\n    FEEDBACK_TEXT,\r\n    SupportedFeedbackTextLocales,\r\n} from \"../../apps/utils/validationHelpers\";\r\n\r\nexport const NewsletterSignupSchema = (\r\n    locale: SupportedFeedbackTextLocales = \"no\",\r\n) => {\r\n    const feedback = FEEDBACK_TEXT(locale);\r\n\r\n    return z.object({\r\n        email: z\r\n            .string()\r\n            .trim()\r\n            .toLowerCase()\r\n            .min(1, { message: feedback.REQUIRED })\r\n            .email({ message: feedback.INVALID }),\r\n        birthday: z.date({\r\n            errorMap: (issue, { defaultError }) => ({\r\n                message:\r\n                    issue.code === \"invalid_type\"\r\n                        ? feedback.REQUIRED\r\n                        : defaultError,\r\n            }),\r\n        }),\r\n        gender: z.string().min(1, { message: feedback.REQUIRED }),\r\n        acceptsTerms: z.boolean().refine((value) => value === true, {\r\n            message: feedback.CONSENT_REQUIRED,\r\n        }),\r\n    });\r\n};\r\n","import { FEEDBACK_TEXT } from \"../global/apps/utils/validationHelpers\";\r\nimport { sentenceCase } from \"../../../helpers/checkoutHelpers\";\r\nimport { NewsletterSignupSchema } from \"./newsletter_signup_form_schema\";\r\n\r\nexport default class NewsletterSignupForm {\r\n    private SIGNUP_ENDPOINT = \"/api/newsletter/register\";\r\n    private SUCCESSFUL_SIGNUP_TEXT: string;\r\n\r\n    private form: HTMLFormElement;\r\n    private fieldset: HTMLElement;\r\n    private submitButton: HTMLElement;\r\n    private submitFeedback: HTMLElement;\r\n    private genericError: string;\r\n\r\n    private fields: {\r\n        [key: string]: { error: HTMLInputElement; input: HTMLInputElement };\r\n    };\r\n\r\n    constructor(element) {\r\n        this.SUCCESSFUL_SIGNUP_TEXT = element.dataset.successfulSubmitMessage;\r\n\r\n        this.form = element.querySelector(\"form\");\r\n        this.fieldset = element.querySelector(\"fieldset\");\r\n        this.submitButton = element.querySelector('button[type=\"submit\"]');\r\n        this.submitFeedback = element.querySelector(\r\n            \".newsletter-block__submit-feedback\",\r\n        );\r\n        this.genericError = element.dataset.failedSubmitMessage;\r\n\r\n        this.fields = {\r\n            email: {\r\n                error: element.querySelector(\".newsletter-block__email-error\"),\r\n                input: element.querySelector(\"input[name='email']\"),\r\n            },\r\n            gender: {\r\n                error: element.querySelector(\".newsletter-block__gender-error\"),\r\n                input: element.querySelector(\"select[name='gender']\"),\r\n            },\r\n            birthday: {\r\n                error: element.querySelector(\r\n                    \".newsletter-block__birthday-error\",\r\n                ),\r\n                input: element.querySelector(\"input[name='birthday']\"),\r\n            },\r\n            acceptsTerms: {\r\n                error: element.querySelector(\r\n                    \".newsletter-block__consent-error\",\r\n                ),\r\n                input: element.querySelector(\"input[name='acceptsTerms']\"),\r\n            },\r\n        };\r\n\r\n        this.initSubmit();\r\n    }\r\n\r\n    init = () => {\r\n        this.initSubmit();\r\n    };\r\n\r\n    /**\r\n     * Initializes the submit event listener for the newsletter signup form.\r\n     * When the form is submitted, it prevents the default form submission behavior,\r\n     * disables the form fields, calls the submit method, and handles the success response.\r\n     */\r\n    private initSubmit = () => {\r\n        this.form?.addEventListener(\"submit\", async (e) => {\r\n            if (!this.form) return;\r\n            e.preventDefault();\r\n\r\n            this.submitBegin();\r\n            const success = await this.submit();\r\n            this.submitComplete();\r\n\r\n            if (!success) return;\r\n\r\n            this.setSubmitFeedback(this.SUCCESSFUL_SIGNUP_TEXT);\r\n        });\r\n        return;\r\n    };\r\n\r\n    /**\r\n     * Submits the newsletter signup form.\r\n     * Builds a body object from the form fields, validates the body against the schema.\r\n     * If the schema validation fails, it handles the input errors and returns false.\r\n     * If the schema validation passes, it clears the input errors, sets the submit feedback to an empty string,\r\n     * and sends a POST request to the signup endpoint with the body object.\r\n     *\r\n     * @returns {Promise<boolean>} A promise that resolves to a boolean indicating whether the form submission was successful.\r\n     */\r\n    private submit = async () => {\r\n        if (!this.form) return;\r\n\r\n        const body = {\r\n            email: this.fields.email.input?.value,\r\n            gender: this.fields.gender?.input.value,\r\n            birthday: this.fields.birthday?.input.value\r\n                ? new Date(this.fields.birthday.input.value)\r\n                : null,\r\n            acceptsTerms: this.fields.acceptsTerms?.input.checked,\r\n        };\r\n\r\n        const newsletterSignupSchema = NewsletterSignupSchema(\"en\");\r\n        const validationResult = newsletterSignupSchema.safeParse(body);\r\n\r\n        if (!validationResult.success) {\r\n            this.handleInputErrors(validationResult.error);\r\n            return false;\r\n        }\r\n\r\n        this.clearInputErrors();\r\n\r\n        try {\r\n            const res = await fetch(this.SIGNUP_ENDPOINT, {\r\n                method: \"POST\",\r\n                headers: {\r\n                    \"Content-Type\": \"application/json\",\r\n                },\r\n                body: JSON.stringify(body),\r\n            });\r\n\r\n            if (!res.ok) {\r\n                this.setSubmitFeedback(this.genericError);\r\n            }\r\n\r\n            return res.ok;\r\n        } catch (error) {\r\n            this.setSubmitFeedback(this.genericError);\r\n        }\r\n    };\r\n\r\n    private setSubmitFeedback = (value) => {\r\n        this.submitFeedback.innerHTML = value;\r\n    };\r\n\r\n    /**\r\n     * Handles input errors by updating the corresponding fields with error messages and applying error styles.\r\n     *\r\n     * @param errors - The list of errors to handle.\r\n     */\r\n    private handleInputErrors = (errors) => {\r\n        this.clearInputErrors();\r\n\r\n        errors.errors.forEach((error) => {\r\n            const fieldWithError = this.fields[error.path[0]];\r\n            if (fieldWithError) {\r\n                const errorMessageFormatted = this.formatErrorMessage(error);\r\n\r\n                fieldWithError.error.innerHTML = errorMessageFormatted;\r\n                fieldWithError.input.classList.add(\"error\");\r\n            }\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Formats an error message based on the provided error object.\r\n     * If the error path is \"consents\", it returns the error without a path prefix.\r\n     *\r\n     * @param error - The error object containing the path and message.\r\n     * @returns The formatted error message.\r\n     */\r\n    private formatErrorMessage = (error: {\r\n        path: string[];\r\n        message: string;\r\n    }) => {\r\n        const includePathInErrorMessage = error.path[0] === \"consents\";\r\n\r\n        const errorMessage = includePathInErrorMessage\r\n            ? error.message\r\n            : `${error.path} ${error.message}`;\r\n\r\n        return sentenceCase(errorMessage);\r\n    };\r\n\r\n    /**\r\n     * Clears the input errors and resets the form fields.\r\n     */\r\n    private clearInputErrors = () => {\r\n        Object.values(this.fields).forEach(({ error, input }) => {\r\n            error.innerHTML = \"\";\r\n            input.classList.remove(\"error\");\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Handles the beginning of form submission.\r\n     * Disables the form fieldset, adds an animation class to the submit button, and disables the submit button.\r\n     */\r\n    private submitBegin = () => {\r\n        this.fieldset?.setAttribute(\"disabled\", \"disabled\");\r\n        this.submitButton?.classList.add(\"is-animating\");\r\n        this.submitButton?.setAttribute(\"disabled\", \"disabled\");\r\n    };\r\n\r\n    /**\r\n     * Handles the completion of form submission.\r\n     * Enables the fieldset, removes animation class from the submit button, and enables the submit button.\r\n     */\r\n    private submitComplete = () => {\r\n        this.fieldset?.removeAttribute(\"disabled\");\r\n        this.submitButton?.classList.remove(\"is-animating\");\r\n        this.submitButton?.removeAttribute(\"disabled\");\r\n    };\r\n}\r\n","export default class HenryHeroBlockVideo {\r\n    private USE_MOBILE_VIDEO_SOURCE_TRESHOLD = 768 as const;\r\n    private FIRST_FRAME_IDENTIFIER = \"#t=0.1\" as const;\r\n\r\n    private videoElement?: HTMLVideoElement;\r\n    private videoSourceDesktop?: string;\r\n    private videoSourceMobile?: string;\r\n\r\n    constructor(element) {\r\n        this.videoElement = element;\r\n        if (!this.videoElement) return;\r\n\r\n        this.videoSourceDesktop = this.videoElement.dataset.source;\r\n        this.videoSourceMobile = this.videoElement.dataset.sourceMobile;\r\n        this.init();\r\n    }\r\n\r\n    /**\r\n     * Initializes the hero block.\r\n     *\r\n     * If both `videoSourceDesktop` and `videoSourceMobile` are not provided, or if `videoElement` is not available,\r\n     * the method will return early without performing any initialization.\r\n     *\r\n     * The `videoElement` source will be set to `videoSourceDesktop` if available, otherwise to `videoSourceMobile`.\r\n     * If neither `videoSourceDesktop` nor `videoSourceMobile` are available, the `videoElement` source will be set to an empty string.\r\n     *\r\n     * The method also initializes the resize observer.\r\n     */\r\n    init = () => {\r\n        if (\r\n            (!this.videoSourceDesktop && !this.videoSourceMobile) ||\r\n            !this.videoElement\r\n        )\r\n            return;\r\n\r\n        this.videoElement.src =\r\n            this.videoSourceDesktop ?? this.videoSourceMobile ?? \"\";\r\n        this.initSourceElements();\r\n        this.initPoster();\r\n        this.initResizeObserver();\r\n        this.videoElement.play();\r\n    };\r\n\r\n    /**\r\n     * Initializes the source elements for the video.\r\n     */\r\n    private initSourceElements = () => {\r\n        if (this.videoSourceDesktop) {\r\n            this.createSourceElement(this.videoSourceDesktop);\r\n        }\r\n\r\n        if (this.videoSourceMobile && !this.videoSourceDesktop) {\r\n            this.createSourceElement(this.videoSourceMobile);\r\n        }\r\n    };\r\n\r\n    private initPoster = () => {\r\n        if (!this.videoElement) return;\r\n\r\n        this.videoElement.poster = (this.videoSourceDesktop ?? this.videoSourceMobile) + this.FIRST_FRAME_IDENTIFIER;\r\n    }\r\n\r\n    /**\r\n     * Creates a source element for the video with the specified video source.\r\n     * @param videoSource - The URL of the video source.\r\n     */\r\n    private createSourceElement = (videoSource: string) => {\r\n        if (!videoSource) return;\r\n\r\n        const sourceElement = document.createElement(\"source\");\r\n        sourceElement.src = videoSource;\r\n\r\n        const mimeType = this.getValidMimeTypeFromFileExtension(videoSource);\r\n        if (mimeType) {\r\n            sourceElement.type = mimeType;\r\n        }\r\n\r\n        this.videoElement?.appendChild(sourceElement);\r\n        this.videoElement?.load();\r\n    };\r\n\r\n    /**\r\n     * Initializes the resize observer and sets up the event listener for the 'resize' event.\r\n     * It also calls the `handleResize` method once initially to check the current viewport size.\r\n     */\r\n    private initResizeObserver = () => {\r\n        window.addEventListener(\"resize\", this.handleResize);\r\n        this.handleResize();\r\n    };\r\n\r\n    /**\r\n     * Handles the resize event and updates the video source based on the window width.\r\n     */\r\n    private handleResize = () => {\r\n        if (!this.videoElement) return;\r\n        const shouldUseMobileSource =\r\n            window.innerWidth < this.USE_MOBILE_VIDEO_SOURCE_TRESHOLD;\r\n\r\n        if (\r\n            shouldUseMobileSource &&\r\n            this.videoElement.src !== this.videoSourceMobile &&\r\n            this.videoSourceMobile\r\n        ) {\r\n            this.videoElement.src = this.videoSourceMobile;\r\n        }\r\n\r\n        if (\r\n            !shouldUseMobileSource &&\r\n            this.videoElement.src !== this.videoSourceDesktop &&\r\n            this.videoSourceDesktop\r\n        ) {\r\n            this.videoElement.src = this.videoSourceDesktop;\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Retrieves the valid MIME type based on the file extension.\r\n     * Valid in this context means that the MIME type is supported by the HTML5 video element.\r\n     * \r\n     * @param {string} filename - The name of the file.\r\n     * @returns {string} The valid MIME type for the given file extension or an empty string if the MIME type is not supported or not found for the filename.\r\n     */\r\n    private getValidMimeTypeFromFileExtension = (filename) => {\r\n        const extension = filename.split(\".\").pop();\r\n        switch (extension) {\r\n            case \"mp4\":\r\n                return \"video/mp4\";\r\n            case \"webm\":\r\n                return \"video/webm\";\r\n            case \"ogg\":\r\n                return \"video/ogg\";\r\n            default:\r\n                return \"\";\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Removes the event listener for the 'resize' event if the hero block is destroyed.\r\n     */\r\n    destroy = () => {\r\n        window.removeEventListener(\"resize\", this.handleResize);\r\n    };\r\n}\r\n","export default class EpiserverUploadReload {\r\n    private RELOAD_IDENTIFIER = \"excelfile-uploaded-A71CC701-ED69-4BDA-A450-353B7F1655E2\";\r\n    private element: HTMLElement;\r\n    private observer: MutationObserver;\r\n\r\n    constructor(element: HTMLElement) {\r\n        this.element = element;\r\n        this.init();\r\n    }\r\n\r\n    private init() {\r\n        this.setupMutationObserver();\r\n    }\r\n\r\n    private setupMutationObserver() {\r\n        const callback: MutationCallback = (mutationsList, _) => {\r\n            for (const mutation of mutationsList) {\r\n                if (mutation.type === 'childList') {\r\n                    for (const addedNode of Array.from(mutation.addedNodes)) {\r\n                        if ((addedNode as HTMLElement)?.innerHTML === this.RELOAD_IDENTIFIER) {\r\n                            location.reload();\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        };\r\n\r\n        this.observer = new MutationObserver(callback);\r\n        this.observer.observe(this.element, {\r\n            childList: true, // Observe direct children\r\n            subtree: true,  // Observe all descendants\r\n        });\r\n    }\r\n}","declare global {\r\n    interface Window {\r\n        porterbuddy: {\r\n            token: string;\r\n            view: string;\r\n        };\r\n    }\r\n}\r\n\r\nexport default function showPorterbuddyWidget() {\r\n    const porterbuddyWidget = document.querySelector('#porterbuddy-widget') as HTMLElement;\r\n    const addToCartFormComponent = document.querySelector('.add-to-cart-form-component');\r\n    if (porterbuddyWidget && addToCartFormComponent) {\r\n        window.porterbuddy = {\r\n            token: porterbuddyWidget.dataset.pbToken ?? '',\r\n            view: porterbuddyWidget.dataset.pbView || '',\r\n        };\r\n    }\r\n}","import { lazy } from \"../apps/mixins/lazy\";\r\nimport GtmService from \"../apps/services/gtm.service\";\r\n\r\nexport default class PromotionTracking {\r\n    private root: HTMLElement;\r\n    private name: string;\r\n    private id: string;\r\n    private links: HTMLCollectionOf<HTMLAnchorElement>;\r\n\r\n    constructor(element: HTMLElement) {\r\n        this.root = element;\r\n        this.name = element.dataset.name || '';\r\n        this.id = element.dataset.id || '';\r\n        this.init();\r\n    }\r\n    \r\n    init = () => {\r\n        this.links = this.root.getElementsByTagName('a');\r\n        this.setupViewPromotionTracking();\r\n        this.setupSelectPromotionTracking();\r\n    };\r\n\r\n    private setupViewPromotionTracking = () => {\r\n        lazy(() => this.ViewPromotion(), this.root, true);\r\n    }\r\n\r\n    private setupSelectPromotionTracking = () => {\r\n        Array.from(this.links)?.forEach((link) => {\r\n            link.addEventListener('click', () => this.SelectPromotion(link));\r\n        });\r\n    }\r\n\r\n    private ViewPromotion = () => {\r\n        GtmService.pushViewPromotionEvent(\r\n            this.id,\r\n            this.name,\r\n            false,\r\n            this.name,\r\n            this.name\r\n        );\r\n    }\r\n    \r\n    private SelectPromotion = (link: HTMLAnchorElement) => {\r\n        GtmService.pushSelectPromotionEvent(\r\n            this.id,\r\n            this.name,\r\n            false,\r\n            link.href,\r\n            this.name,\r\n            this.name\r\n        );\r\n    }\r\n}","import { lazy } from \"../apps/mixins/lazy\";\r\n\r\nexport default class VideoBlock {\r\n    private USE_MOBILE_VIDEO_SOURCE_TRESHOLD = 768 as const;\r\n\r\n    private videoElement?: HTMLVideoElement;\r\n    private modelData: VideoBlockModel;\r\n\r\n    constructor(element: HTMLVideoElement) {\r\n        this.videoElement = element;\r\n\r\n        if (!this.videoElement) return;\r\n\r\n        const modelData = this.videoElement.dataset.modelData;\r\n\r\n        if (!modelData) return;\r\n\r\n        this.modelData = JSON.parse(modelData) as VideoBlockModel;\r\n        this.init();\r\n    }\r\n\r\n    /**\r\n     * Initializes the video block with a poster and the resize observer.\r\n     */\r\n    init = () => {\r\n        if (!this.videoElement) return;\r\n        this.initPoster();\r\n        lazy(this.initVideoElement, this.videoElement, true);\r\n        this.initResizeObserver();\r\n    };\r\n\r\n    /**\r\n     * targetSource is set based on browser width and presence of relevant source\r\n     */\r\n    get targetSource() {\r\n        const shoulUseMobileSource =\r\n            window.innerWidth < this.USE_MOBILE_VIDEO_SOURCE_TRESHOLD;\r\n\r\n        return shoulUseMobileSource && this.modelData.videoSourceMobile\r\n            ? this.modelData.videoSourceMobile\r\n            : this.modelData.videoSourceDesktop || \"\";\r\n    }\r\n\r\n    private getPathName = (url: string) => new URL(url).pathname;\r\n\r\n    /**\r\n     * Safe handling of triggering play of video, with a fallback of providing\r\n     * controls if video cannot autoplay\r\n     */\r\n    private play = async () => {\r\n        if (!this.videoElement) return;\r\n        const videoElement = this.videoElement;\r\n\r\n        const playVideo = async () => {\r\n            try {\r\n                await videoElement.play();\r\n            } catch (error) {\r\n                console.error(\"Error playing video:\", error);\r\n                videoElement.controls = true;\r\n            }\r\n        };\r\n\r\n        if (this.videoElement.readyState >= 3) {\r\n            await playVideo();\r\n        } else {\r\n            this.videoElement.addEventListener(\"loadedmetadata\", playVideo, {\r\n                once: true,\r\n            });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Sets and loads the video source, configures the elements based on model\r\n     * properties and handles autoplay\r\n     */\r\n    private initVideoElement = () => {\r\n        if (!this.videoElement) return;\r\n\r\n        //Only set src if it's not already set by initPoster\r\n        if (!this.videoElement.src) {\r\n            this.videoElement.src = this.targetSource;\r\n        }\r\n\r\n        this.videoElement.controls = !!this.modelData.controls;\r\n        this.videoElement.loop = !!this.modelData.loop;\r\n\r\n        if (this.modelData.autoplay) {\r\n            this.videoElement.muted = true;\r\n            this.play();\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Sets the first frame of the video\r\n     */\r\n    private initPoster = () => {\r\n        if (!this.videoElement) return;\r\n\r\n        const videoElement = this.videoElement;\r\n        videoElement.src = this.targetSource + \"#t=0.1\";\r\n    };\r\n\r\n    /**\r\n     * Initializes the resize observer and sets up the event listener for the 'resize' event.\r\n     * It also calls the `handleResize` method once initially to check the current viewport size.\r\n     */\r\n    private initResizeObserver = () => {\r\n        window.addEventListener(\"resize\", this.handleResize);\r\n        this.handleResize();\r\n    };\r\n\r\n    /**\r\n     * Handles the resize event and updates the video source if the target source has changed.\r\n     */\r\n    private handleResize = () => {\r\n        if (!this.videoElement || !this.videoElement.src) return;\r\n\r\n        if (this.getPathName(this.videoElement.src) !== this.targetSource) {\r\n            this.videoElement.src = this.targetSource;\r\n            this.videoElement.load();\r\n            this.play();\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Removes the event listener for the 'resize' event if the hero block is destroyed.\r\n     */\r\n    destroy = () => {\r\n        window.removeEventListener(\"resize\", this.handleResize);\r\n    };\r\n}\r\n\r\ninterface VideoBlockModel {\r\n    autoplay: boolean;\r\n    loop: boolean;\r\n    controls: boolean;\r\n    videoSourceDesktop?: string;\r\n    videoSourceMobile?: string;\r\n}\r\n","export default class ProductCarousel {\r\n    private root: HTMLFormElement | null;\r\n    private membersDiscountText: string | undefined;\r\n    private discountText: string | undefined;\r\n\r\n    constructor(element) {\r\n        this.root = element;\r\n        this.membersDiscountText = this.root?.dataset.membersDiscountText;\r\n        this.discountText = this.root?.dataset.discountText;\r\n        this.init();\r\n    }\r\n\r\n    init = () => {\r\n        this.initProductCarousel();\r\n        this.initDiscountTexts();\r\n    };\r\n\r\n    private initProductCarousel = () => {\r\n        if (!this.root) return;\r\n\r\n        if ($('._js_product-carousel').length) {\r\n            $('._js_product-carousel').slick({\r\n                dots: true,\r\n                slidesToShow: 1,\r\n                slidesToScroll: 1,\r\n                adaptiveHeight: true,\r\n                adaptiveWidth: true,\r\n                infinite: true,\r\n            });\r\n        }\r\n    };\r\n\r\n    private initDiscountTexts = () => {\r\n        if (!this.root || (!this.membersDiscountText && !this.discountText)) return;\r\n\r\n        const labelContainer = document.createElement('div');\r\n        labelContainer.className = 'label__container';\r\n\r\n        if (this.membersDiscountText) {\r\n            const memberDiscountLabel = document.createElement('span');\r\n            memberDiscountLabel.className = 'label A label--amountdiscount';\r\n            memberDiscountLabel.textContent = this.membersDiscountText;\r\n            labelContainer.appendChild(memberDiscountLabel);\r\n        }\r\n\r\n        if (this.discountText) {\r\n            const discountLabel = document.createElement('span');\r\n            discountLabel.className = 'label B label--amountdiscount';\r\n            discountLabel.textContent = this.discountText;\r\n            labelContainer.appendChild(discountLabel);\r\n        }\r\n\r\n        this.root.appendChild(labelContainer);\r\n    };\r\n}\r\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.Splitting = factory());\n}(this, (function () { 'use strict';\n\nvar root = document;\nvar createText = root.createTextNode.bind(root);\n\n/**\n * # setProperty\n * Apply a CSS var\n * @param {HTMLElement} el\n * @param {string} varName \n * @param {string|number} value \n */\nfunction setProperty(el, varName, value) {\n    el.style.setProperty(varName, value);\n} \n\n/**\n * \n * @param {!HTMLElement} el \n * @param {!HTMLElement} child \n */\nfunction appendChild(el, child) {\n  return el.appendChild(child);\n}\n\n/**\n * \n * @param {!HTMLElement} parent \n * @param {string} key \n * @param {string} text \n * @param {boolean} whitespace \n */\nfunction createElement(parent, key, text, whitespace) {\n  var el = root.createElement('span');\n  key && (el.className = key); \n  if (text) { \n      !whitespace && el.setAttribute(\"data-\" + key, text);\n      el.textContent = text; \n  }\n  return (parent && appendChild(parent, el)) || el;\n}\n\n/**\n * \n * @param {!HTMLElement} el \n * @param {string} key \n */\nfunction getData(el, key) {\n  return el.getAttribute(\"data-\" + key)\n}\n\n/**\n * \n * @param {import('../types').Target} e \n * @param {!HTMLElement} parent\n * @returns {!Array<!HTMLElement>}\n */\nfunction $(e, parent) {\n    return !e || e.length == 0\n        ? // null or empty string returns empty array\n          []\n        : e.nodeName\n            ? // a single element is wrapped in an array\n              [e]\n            : // selector and NodeList are converted to Element[]\n              [].slice.call(e[0].nodeName ? e : (parent || root).querySelectorAll(e));\n}\n\n/**\n * Creates and fills an array with the value provided\n * @param {number} len\n * @param {() => T} valueProvider\n * @return {T}\n * @template T\n */\nfunction Array2D(len) {\n    var a = [];\n    for (; len--; ) {\n        a[len] = [];\n    }\n    return a;\n}\n\n/**\n * A for loop wrapper used to reduce js minified size.\n * @param {!Array<T>} items \n * @param {function(T):void} consumer\n * @template T\n */\nfunction each(items, consumer) {\n    items && items.some(consumer);\n}\n\n/**\n * @param {T} obj \n * @return {function(string):*}\n * @template T\n */\nfunction selectFrom(obj) {\n    return function (key) {\n        return obj[key];\n    }\n}\n\n/**\n * # Splitting.index\n * Index split elements and add them to a Splitting instance.\n *\n * @param {HTMLElement} element\n * @param {string} key \n * @param {!Array<!HTMLElement> | !Array<!Array<!HTMLElement>>} items \n */\nfunction index(element, key, items) {\n    var prefix = '--' + key;\n    var cssVar = prefix + \"-index\";\n\n    each(items, function (items, i) {\n        if (Array.isArray(items)) {\n            each(items, function(item) {\n                setProperty(item, cssVar, i);\n            });\n        } else {\n            setProperty(items, cssVar, i);\n        }\n    });\n\n    setProperty(element, prefix + \"-total\", items.length);\n}\n\n/**\n * @type {Record<string, import('./types').ISplittingPlugin>}\n */\nvar plugins = {};\n\n/**\n * @param {string} by\n * @param {string} parent\n * @param {!Array<string>} deps\n * @return {!Array<string>}\n */\nfunction resolvePlugins(by, parent, deps) {\n    // skip if already visited this dependency\n    var index = deps.indexOf(by);\n    if (index == -1) {\n        // if new to dependency array, add to the beginning\n        deps.unshift(by);\n\n        // recursively call this function for all dependencies\n        var plugin = plugins[by];\n        if (!plugin) {\n            throw new Error(\"plugin not loaded: \" + by);\n        }\n        each(plugin.depends, function(p) {\n            resolvePlugins(p, by, deps);\n        });\n    } else {\n        // if this dependency was added already move to the left of\n        // the parent dependency so it gets loaded in order\n        var indexOfParent = deps.indexOf(parent);\n        deps.splice(index, 1);\n        deps.splice(indexOfParent, 0, by);\n    }\n    return deps;\n}\n\n/**\n * Internal utility for creating plugins... essentially to reduce\n * the size of the library\n * @param {string} by \n * @param {string} key \n * @param {string[]} depends \n * @param {Function} split \n * @returns {import('./types').ISplittingPlugin}\n */\nfunction createPlugin(by, depends, key, split) {\n    return {\n        by: by,\n        depends: depends,\n        key: key,\n        split: split\n    }\n}\n\n/**\n *\n * @param {string} by\n * @returns {import('./types').ISplittingPlugin[]}\n */\nfunction resolve(by) {\n    return resolvePlugins(by, 0, []).map(selectFrom(plugins));\n}\n\n/**\n * Adds a new plugin to splitting\n * @param {import('./types').ISplittingPlugin} opts\n */\nfunction add(opts) {\n    plugins[opts.by] = opts;\n}\n\n/**\n * # Splitting.split\n * Split an element's textContent into individual elements\n * @param {!HTMLElement} el  Element to split\n * @param {string} key \n * @param {string} splitOn \n * @param {boolean} includePrevious \n * @param {boolean} preserveWhitespace\n * @return {!Array<!HTMLElement>}\n */\nfunction splitText(el, key, splitOn, includePrevious, preserveWhitespace) {\n    // Combine any strange text nodes or empty whitespace.\n    el.normalize();\n\n    // Use fragment to prevent unnecessary DOM thrashing.\n    var elements = [];\n    var F = document.createDocumentFragment();\n\n    if (includePrevious) {\n        elements.push(el.previousSibling);\n    }\n\n    var allElements = [];\n    $(el.childNodes).some(function(next) {\n        if (next.tagName && !next.hasChildNodes()) {\n            // keep elements without child nodes (no text and no children)\n            allElements.push(next);\n            return;\n        }\n        // Recursively run through child nodes\n        if (next.childNodes && next.childNodes.length) {\n            allElements.push(next);\n            elements.push.apply(elements, splitText(next, key, splitOn, includePrevious, preserveWhitespace));\n            return;\n        }\n\n        // Get the text to split, trimming out the whitespace\n        /** @type {string} */\n        var wholeText = next.wholeText || '';\n        var contents = wholeText.trim();\n\n        // If there's no text left after trimming whitespace, continue the loop\n        if (contents.length) {\n            // insert leading space if there was one\n            if (wholeText[0] === ' ') {\n                allElements.push(createText(' '));\n            }\n            // Concatenate the split text children back into the full array\n            var useSegmenter = splitOn === \"\" && typeof Intl.Segmenter === \"function\";\n            each(useSegmenter ? Array.from(new Intl.Segmenter().segment(contents)).map(function(x){return x.segment}) : contents.split(splitOn), function (splitText, i) {\n                if (i && preserveWhitespace) {\n                    allElements.push(createElement(F, \"whitespace\", \" \", preserveWhitespace));\n                }\n                var splitEl = createElement(F, key, splitText);\n                elements.push(splitEl);\n                allElements.push(splitEl);\n            }); \n            // insert trailing space if there was one\n            if (wholeText[wholeText.length - 1] === ' ') {\n                allElements.push(createText(' '));\n            }\n        }\n    });\n\n    each(allElements, function(el) {\n        appendChild(F, el);\n    });\n\n    // Clear out the existing element\n    el.innerHTML = \"\";\n    appendChild(el, F);\n    return elements;\n}\n\n/** an empty value */\nvar _ = 0;\n\nfunction copy(dest, src) {\n    for (var k in src) {\n        dest[k] = src[k];\n    }\n    return dest;\n}\n\nvar WORDS = 'words';\n\nvar wordPlugin = createPlugin(\n    /* by= */ WORDS,\n    /* depends= */ _,\n    /* key= */ 'word', \n    /* split= */ function(el) {\n        return splitText(el, 'word', /\\s+/, 0, 1)\n    }\n);\n\nvar CHARS = \"chars\";\n\nvar charPlugin = createPlugin(\n    /* by= */ CHARS,\n    /* depends= */ [WORDS],\n    /* key= */ \"char\", \n    /* split= */ function(el, options, ctx) {\n        var results = [];\n\n        each(ctx[WORDS], function(word, i) {\n            results.push.apply(results, splitText(word, \"char\", \"\", options.whitespace && i));\n        });\n\n        return results;\n    }\n);\n\n/**\n * # Splitting\n * \n * @param {import('./types').ISplittingOptions} opts\n * @return {!Array<*>}\n */\nfunction Splitting (opts) {\n  opts = opts || {};\n  var key = opts.key;\n\n  return $(opts.target || '[data-splitting]').map(function(el) {\n    var ctx = el['🍌'];  \n    if (!opts.force && ctx) {\n      return ctx;\n    }\n\n    ctx = el['🍌'] = { el: el };\n    var by = opts.by || getData(el, 'splitting');\n    if (!by || by == 'true') {\n      by = CHARS;\n    }\n    var items = resolve(by);\n    var opts2 = copy({}, opts);\n    each(items, function(plugin) {\n      if (plugin.split) {\n        var pluginBy = plugin.by;\n        var key2 = (key ? '-' + key : '') + plugin.key;\n        var results = plugin.split(el, opts2, ctx);\n        key2 && index(el, key2, results);\n        ctx[pluginBy] = results;\n        el.classList.add(pluginBy);\n      } \n    });\n\n    el.classList.add('splitting');\n    return ctx;\n  })\n}\n\n/**\n * # Splitting.html\n * \n * @param {import('./types').ISplittingOptions} opts\n */\nfunction html(opts) {\n  opts = opts || {};\n  var parent = opts.target =  createElement();\n  parent.innerHTML = opts.content;\n  Splitting(opts);\n  return parent.outerHTML\n}\n\nSplitting.html = html;\nSplitting.add = add;\n\n/**\n * Detects the grid by measuring which elements align to a side of it.\n * @param {!HTMLElement} el \n * @param {import('../core/types').ISplittingOptions} options\n * @param {*} side \n */\nfunction detectGrid(el, options, side) {\n    var items = $(options.matching || el.children, el);\n    var c = {};\n\n    each(items, function(w) {\n        var val = Math.round(w[side]);\n        (c[val] || (c[val] = [])).push(w);\n    });\n\n    return Object.keys(c).map(Number).sort(byNumber).map(selectFrom(c));\n}\n\n/**\n * Sorting function for numbers.\n * @param {number} a \n * @param {number} b\n * @return {number} \n */\nfunction byNumber(a, b) {\n    return a - b;\n}\n\nvar linePlugin = createPlugin(\n    /* by= */ 'lines',\n    /* depends= */ [WORDS],\n    /* key= */ 'line',\n    /* split= */ function(el, options, ctx) {\n      return detectGrid(el, { matching: ctx[WORDS] }, 'offsetTop')\n    }\n);\n\nvar itemPlugin = createPlugin(\n    /* by= */ 'items',\n    /* depends= */ _,\n    /* key= */ 'item', \n    /* split= */ function(el, options) {\n        return $(options.matching || el.children, el)\n    }\n);\n\nvar rowPlugin = createPlugin(\n    /* by= */ 'rows',\n    /* depends= */ _,\n    /* key= */ 'row', \n    /* split= */ function(el, options) {\n        return detectGrid(el, options, \"offsetTop\");\n    }\n);\n\nvar columnPlugin = createPlugin(\n    /* by= */ 'cols',\n    /* depends= */ _,\n    /* key= */ \"col\", \n    /* split= */ function(el, options) {\n        return detectGrid(el, options, \"offsetLeft\");\n    }\n);\n\nvar gridPlugin = createPlugin(\n    /* by= */ 'grid',\n    /* depends= */ ['rows', 'cols']\n);\n\nvar LAYOUT = \"layout\";\n\nvar layoutPlugin = createPlugin(\n    /* by= */ LAYOUT,\n    /* depends= */ _,\n    /* key= */ _,\n    /* split= */ function(el, opts) {\n        // detect and set options\n        var rows =  opts.rows = +(opts.rows || getData(el, 'rows') || 1);\n        var columns = opts.columns = +(opts.columns || getData(el, 'columns') || 1);\n\n        // Seek out the first <img> if the value is true \n        opts.image = opts.image || getData(el, 'image') || el.currentSrc || el.src;\n        if (opts.image) {\n            var img = $(\"img\", el)[0];\n            opts.image = img && (img.currentSrc || img.src);\n        }\n\n        // add optional image to background\n        if (opts.image) {\n            setProperty(el, \"background-image\", \"url(\" + opts.image + \")\");\n        }\n\n        var totalCells = rows * columns;\n        var elements = [];\n\n        var container = createElement(_, \"cell-grid\");\n        while (totalCells--) {\n            // Create a span\n            var cell = createElement(container, \"cell\");\n            createElement(cell, \"cell-inner\");\n            elements.push(cell);\n        }\n\n        // Append elements back into the parent\n        appendChild(el, container);\n\n        return elements;\n    }\n);\n\nvar cellRowPlugin = createPlugin(\n    /* by= */ \"cellRows\",\n    /* depends= */ [LAYOUT],\n    /* key= */ \"row\",\n    /* split= */ function(el, opts, ctx) {\n        var rowCount = opts.rows;\n        var result = Array2D(rowCount);\n\n        each(ctx[LAYOUT], function(cell, i, src) {\n            result[Math.floor(i / (src.length / rowCount))].push(cell);\n        });\n\n        return result;\n    }\n);\n\nvar cellColumnPlugin = createPlugin(\n    /* by= */ \"cellColumns\",\n    /* depends= */ [LAYOUT],\n    /* key= */ \"col\",\n    /* split= */ function(el, opts, ctx) {\n        var columnCount = opts.columns;\n        var result = Array2D(columnCount);\n\n        each(ctx[LAYOUT], function(cell, i) {\n            result[i % columnCount].push(cell);\n        });\n\n        return result;\n    }\n);\n\nvar cellPlugin = createPlugin(\n    /* by= */ \"cells\",\n    /* depends= */ ['cellRows', 'cellColumns'],\n    /* key= */ \"cell\", \n    /* split= */ function(el, opt, ctx) { \n        // re-index the layout as the cells\n        return ctx[LAYOUT];\n    }\n);\n\n// install plugins\n// word/char plugins\nadd(wordPlugin);\nadd(charPlugin);\nadd(linePlugin);\n// grid plugins\nadd(itemPlugin);\nadd(rowPlugin);\nadd(columnPlugin);\nadd(gridPlugin);\n// cell-layout plugins\nadd(layoutPlugin);\nadd(cellRowPlugin);\nadd(cellColumnPlugin);\nadd(cellPlugin);\n\nreturn Splitting;\n\n})));\n","/**\r\n * Represents a TopBand component that detects scroll direction.\r\n * It hides the element when scrolling down and shows it when scrolling up.\r\n */\r\nexport default class TopBand {\r\n    private element: HTMLElement;\r\n    private parentElement: HTMLElement;\r\n    private lastScrollY: number;\r\n    private collapseDuration: string;\r\n\r\n    constructor(element: HTMLElement) {\r\n        if (element.dataset.siteId !== \"Decades\") return;\r\n\r\n        this.element = element;\r\n        this.parentElement = element.parentElement as HTMLElement;\r\n        this.collapseDuration = getComputedStyle(document.documentElement).getPropertyValue('--collapse-duration').trim();\r\n        this.lastScrollY = window.scrollY;\r\n        this.initScrollListener();\r\n    }\r\n\r\n    /**\r\n     * Initializes a scroll event listener to monitor the scroll direction.\r\n     * The listener will call the `detectScrollDirection` method when the window is scrolled.\r\n     */\r\n    private initScrollListener() {\r\n        window.addEventListener('scroll', this.detectScrollDirection);\r\n    }\r\n\r\n    /**\r\n     * Detects the scroll direction and triggers the onScrollDirectionChange method if the scroll position has changed.\r\n     */\r\n    private detectScrollDirection = () => {\r\n        const currentScrollY = window.scrollY;\r\n\r\n        if (currentScrollY !== this.lastScrollY) {\r\n            this.onScrollPositionChange(currentScrollY);\r\n            this.lastScrollY = currentScrollY;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Handles the scroll event by adding or removing the is-hidden class based on the scroll position.\r\n     * @param currentScrollY - The current vertical scroll position.\r\n     */\r\n    private onScrollPositionChange(currentScrollY: number) {\r\n        if (currentScrollY > 0) {\r\n            this.handleScrollDown();\r\n        } else {\r\n            this.handleScrollUp();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Hides the element when scrolling down or when the scroll position is not at the top.\r\n     */\r\n    private handleScrollDown() {\r\n        this.parentElement.classList.add('collapsed');\r\n        setTimeout(() => {\r\n            this.element.setAttribute('aria-hidden', 'false');\r\n            this.setTabIndexes(-1);\r\n\r\n        }, parseFloat(this.collapseDuration) * 1000);\r\n    }\r\n\r\n    /**\r\n     * Shows the element when scrolling up or when the scroll position is at the top.\r\n     */\r\n    private handleScrollUp() {\r\n        this.parentElement.classList.remove('collapsed');\r\n        this.setTabIndexes(0);\r\n        this.element.setAttribute('aria-hidden', 'false');\r\n    }\r\n\r\n    /**\r\n     * Sets the tabindex attribute on all links within the element.\r\n     * @param value - The value to set for the tabindex attribute.\r\n     */\r\n    private setTabIndexes(value: number) {\r\n        const links = this.element.querySelectorAll('a');\r\n        links.forEach(link => {\r\n            link.setAttribute('tabindex', value.toString());\r\n        });\r\n    }\r\n}","import $ from \"jquery\";\r\nwindow.$ = window.jQuery = $;\r\n\r\nimport \"../Scripts/site.js\";\r\nimport \"../Scripts/global/common/jquery.unobtrusive-ajax.js\";\r\nimport \"lazysizes\";\r\nimport Mount from \"./helpers/mount\";\r\n\r\nimport { loginSessionInit } from \"./global/modules/loginSession\";\r\nimport { oauthFunctions } from \"./global/modules/oauth_wp\";\r\nimport { googleLoginFunctions } from \"./global/modules/google_wp\";\r\nimport * as bambuser from \"./global/modules/bambuser_wp\";\r\nimport Menu from \"./global/modules/menus_wp\";\r\nimport * as captcha from \"./global/modules/captcha_wp\";\r\nimport { checkoutFunctions, initCheckout } from \"./global/modules/checkout_wp\";\r\nimport * as customerClub from \"./global/modules/customerclub_wp\";\r\nimport * as customerService from \"./global/modules/customerservice\";\r\nimport * as delivery from \"./global/modules/delivery_wp\";\r\nimport * as inventory from \"./global/modules/inventory_wp\";\r\nimport { updateFavorites, initFavorites } from \"./global/modules/favorite_wp\";\r\nimport * as filter from \"./global/modules/filter_wp\";\r\nimport { initForms } from \"./global/modules/forms_wp\";\r\nimport * as gtmdata from \"./global/modules/gtmdata_wp\";\r\nimport * as jeansguide from \"./global/modules/jeansguide_wp\";\r\nimport { initToggle } from \"./global/modules/toggler_wp\";\r\nimport Mypage, { myPageFunctions } from \"./global/modules/mypage_wp\";\r\nimport * as popup from \"./global/modules/popup_wp\";\r\nimport Product from \"./global/modules/product_wp\";\r\nimport * as promotions from \"./global/modules/promotions_wp\";\r\nimport Quantity from \"./global/modules/quantity_wp\";\r\nimport Quicksearch from \"./global/modules/quicksearch_wp\";\r\nimport * as slickslide from \"./global/modules/slickslide_wp\";\r\nimport * as videoStructuredData from \"./global/modules/structured-video-data_wp\";\r\nimport * as tabs from \"./global/modules/tabs_wp\";\r\nimport * as teaserblock from \"./global/modules/teaserblock_wp\";\r\nimport * as video from \"./global/modules/video_wp\";\r\nimport VimeoBlock from \"./global/modules/vimeo-block_wp\";\r\nimport * as afterpay from \"./global/modules/afterpay_wp\";\r\nimport Chat from \"./global/modules/chat_wp\";\r\nimport apps from \"./global/apps.ts\";\r\nimport DeleteProfile from \"./global/modules/mypage_delete_profile\";\r\nimport ResetPassword from \"./global/modules/mypage_reset_password\";\r\nimport ChangeLoyaltyEmail from \"./global/modules/mypage_change_loyalty_email\";\r\nimport HeaderBanner from \"./global/modules/header_banner\";\r\nimport NewsletterSignupForm from \"./global/modules/newsletter_signup_form/newsletter_signup_form\";\r\nimport HeroBlockHenryVideo from \"./global/modules/henry_hero_block_video\";\r\nimport EpiserverUploadReload from \"./global/modules/episerver_upload_reload.ts\";\r\nimport showPorterBuddyWidget from \"./global/modules/porterbuddy-widget.ts\";\r\nimport PromotionTracking from \"./global/modules/content_performance_tracking\";\r\nimport VideoBlock from \"./global/modules/video_block.ts\";\r\nimport ProductCarousel from \"./global/modules/product_carousel.ts\";\r\nimport splitting from \"splitting\";\r\nimport TopBand from \"./global/modules/top-band.ts\";\r\n\r\nwindow.voice = {};\r\n\r\nwindow.voice.loginSession = loginSessionInit;\r\nloginSessionInit();\r\nshowPorterBuddyWidget();\r\nbambuser.init();\r\nMount(\"_js-nav-main\", Menu);\r\ncustomerClub.init();\r\ncustomerService.init();\r\nfilter.init();\r\nwindow.voice.initForms = initForms;\r\ninitForms();\r\ngtmdata.init();\r\njeansguide.init();\r\ninventory.init();\r\nwindow.voice.oauth = oauthFunctions;\r\nwindow.voice.googleLogin = googleLoginFunctions;\r\nMount(\"layout-mypage\", Mypage);\r\nwindow.voice.mypage = myPageFunctions;\r\npopup.init();\r\npromotions.init();\r\nMount(\"page-actions__search\", Quicksearch);\r\nteaserblock.init();\r\nvideo.init();\r\nMount(\"_js-vimeo-block\", VimeoBlock);\r\nvideoStructuredData.init();\r\ninitFavorites();\r\nafterpay.init();\r\nMount(\"_js-openchat\", Chat);\r\nwindow.voice.updateFavorites = updateFavorites;\r\nwindow.voice.initToggle = initToggle;\r\ninitToggle();\r\nsplitting({target: \"._js-splitting\"});\r\n\r\nMount(\"_js-mypage-delete-profile\", DeleteProfile);\r\nMount(\"_js-mypage-reset-password\", ResetPassword);\r\nMount(\"_js-change-loyalty-club-email\", ChangeLoyaltyEmail);\r\nMount(\"_js-newsletter-signup\", NewsletterSignupForm);\r\nMount(\"header-banner\", HeaderBanner);\r\nMount(\"_js-hero-block-henry-video\", HeroBlockHenryVideo);\r\nMount(\"html\", EpiserverUploadReload);\r\nMount(\"_js_promotion-tracking\", PromotionTracking);\r\nMount(\"_js-video-block\", VideoBlock);\r\nMount(\"_js-top-band\", TopBand);\r\nMount(\"_js_product-carousel\", ProductCarousel);\r\nMount(\"_js-video-block\", VideoBlock);\r\n\r\n//Kan nok inkluderes kun på /sok?\r\ntabs.init();\r\n//Kan nok inkluderes kun på /handlekurv\r\nMount(\"_js-checkout\", Quantity);\r\n\r\n//Kan nok inkluderes kun på produktsider\r\nslickslide.init();\r\nMount(\"_js-product-index\", Product);\r\n\r\n//Kan nok inkluderes kun i checkout views\r\ninitCheckout();\r\n\r\n//Kan nok inkluderes kun i delivery-steg\r\ndelivery.init();\r\n\r\nwindow.voice.captcha = captcha.init;\r\n\r\n//Kan nok inkluderes kun i checkout views\r\nwindow.voice.checkout = checkoutFunctions;\r\n\r\nwindow.voice.pinterest = () => {\r\n    return {\r\n        share: () => {\r\n            window.PinUtils.pinAny();\r\n        },\r\n    };\r\n};\r\n\r\napps.init();\r\n\r\n//Remove no-js class from body. This was being done with modernizr before,\r\n//but not much else of modernizr was being used.\r\ndocument.onreadystatechange = function () {\r\n    if (document.readyState === \"complete\") {\r\n        document.documentElement.classList.remove(\"no-js\");\r\n        document.documentElement.classList.add(\"js\");\r\n    }\r\n\r\n    //Load partial contents\r\n    $(\".partialContents\").each(function (index, item) {\r\n        const url = $(item).data(\"url\");\r\n        if (url && url.length > 0) {\r\n            $(item).load(url);\r\n        }\r\n    });\r\n};\r\n"],"names":["global","factory","module","w","this","window","noGlobal","arr","getProto","slice","flat","array","push","indexOf","class2type","toString","hasOwn","fnToString","ObjectFunctionString","support","isFunction","obj","isWindow","document","preservedScriptAttributes","DOMEval","code","node","doc","i","val","script","toType","version","jQuery","selector","context","num","elems","ret","callback","elem","_elem","len","j","options","name","src","copy","copyIsArray","clone","target","length","deep","msg","proto","Ctor","isArrayLike","results","first","second","invert","callbackInverse","matches","callbackExpect","arg","value","_i","type","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","expando","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","rcssescape","fcssescape","ch","asCodePoint","unloadHandler","inDisabledFieldset","addCombinator","e","els","seed","m","nid","match","groups","newSelector","newContext","nodeType","testContext","toSelector","qsaError","keys","cache","key","markFunction","fn","assert","el","addHandle","attrs","handler","siblingCheck","cur","diff","createInputPseudo","createButtonPseudo","createDisabledPseudo","disabled","createPositionalPseudo","argument","matchIndexes","namespace","hasCompare","subWindow","id","attrId","tag","tmp","className","input","adown","bup","compare","aup","ap","bp","expr","elements","sel","duplicates","excess","unquoted","nodeNameSelector","nodeName","pattern","operator","check","result","what","_argument","last","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","dir","parent","useCache","pseudo","args","idx","matched","matcher","unmatched","text","lang","elemLang","hash","attr","_matchIndexes","setFilters","parseOnly","tokens","soFar","preFilters","cached","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","map","filter","newUnmatched","mapped","setMatcher","preFilter","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","find","compiled","_name","until","truncate","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","not","self","rootjQuery","init","root","rparentsprev","guaranteedUnique","targets","l","selectors","sibling","rnothtmlwhite","createOptions","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","add","index","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","func","tuples","state","promise","deferred","fns","newDefer","tuple","returned","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","then","process","stateString","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","error","stack","readyList","wait","completed","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","data","prop","dataPriv","dataUser","rbrace","rmultiDash","getData","dataAttr","startLength","hooks","next","setter","count","defer","pnum","rcssNum","cssExpand","documentElement","isAttached","composed","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","initialInUnit","defaultDisplayMap","getDefaultDisplay","display","showHide","show","values","rcheckableType","rtagName","rscriptType","fragment","div","wrapMap","getAll","setGlobalEval","refElements","buildFragment","scripts","selection","ignored","wrap","attached","nodes","rtypenamespace","returnTrue","returnFalse","expectSync","safeActiveElement","err","on","types","one","origFn","event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","mappedTypes","origCount","nativeEvent","handlerQueue","matchedHandlers","matchedSelectors","delegateCount","hook","originalEvent","leverageNative","notAsync","saved","handle","props","delegateType","orig","fix","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","content","disableScript","restoreScript","cloneCopyEvent","dest","pdataOld","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","remove","keepData","html","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","original","insert","rnumnonpx","getStyles","view","swap","old","rboxStyle","computeStyleTests","container","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","reliableTrDimensionsVal","table","tr","trChild","trStyle","curCSS","computed","width","minWidth","maxWidth","style","addGetHookIf","conditionFn","hookFn","cssPrefixes","emptyStyle","vendorProps","vendorPropName","capName","finalPropName","final","rdisplayswap","rcustomProp","cssShow","cssNormalTransform","setPositiveNumber","subtract","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","getWidthOrHeight","boxSizingNeeded","valueIsBorderBox","offsetProp","origName","isCustomProp","scrollboxSizeBuggy","prefix","suffix","expanded","parts","Tween","end","easing","percent","eased","p","fxNow","inProgress","rfxtypes","rrun","schedule","createFxNow","genFx","includeWidth","which","createTween","animation","Animation","defaultPrefilter","opts","toggle","oldfire","propTween","restoreDisplay","isBox","anim","hidden","dataShow","propFilter","specialEasing","properties","stopped","tick","currentTime","gotoEnd","prepend","speed","opt","to","empty","optall","doAnimation","clearQueue","stopQueue","stop","dequeue","timers","cssFn","timer","time","timeout","boolHook","attrHandle","nType","attrNames","getter","lowercaseName","rfocusable","rclickable","tabindex","stripAndCollapse","getClass","classesToArray","classes","curValue","clazz","finalValue","stateVal","isValidValue","classNames","rreturn","option","max","optionSet","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","attaches","location","nonce","rquery","parserErrorElem","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","s","valueOrFunction","r20","rhash","rantiCache","rheaders","rlocalProtocol","rnoContent","rprotocol","prefilters","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspected","seekingTransport","inspect","selected","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxHandleResponses","responses","ct","finalDataType","firstDataType","contents","ajaxConvert","response","isSuccess","conv2","current","conv","prev","converters","settings","url","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","statusText","finalText","status","nativeStatusText","headers","success","modified","htmlIsFunction","xhrSuccessStatus","xhrSupported","errorCallback","complete","xhr","evt","oldCallbacks","rjsonp","originalSettings","callbackName","overwritten","responseContainer","jsonProp","body","keepScripts","parsed","params","off","responseText","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","position","curElem","rect","win","offsetParent","offset","parentOffset","top","defaultExtra","funcName","margin","fnOver","fnOut","proxy","hold","_jQuery","_$","$","data_click","data_validation","getFunction","argNames","isMethodProxySafe","asyncOnBeforeSend","asyncOnSuccess","element","contentType","mode","update","asyncRequest","confirm","loading","duration","validate","form","validationInfo","$target","clickInfo","lazySizes","Date","lazysizes","lazySizesCfg","lazySizesDefaults","supportPicture","_addEventListener","_getAttribute","addEventListener","setTimeout","requestAnimationFrame","requestIdleCallback","regPicture","loadEvents","regClassCache","forEach","hasClass","ele","cls","addClass","removeClass","reg","addRemoveLoadEvents","dom","action","triggerEvent","detail","noBubbles","noCancelable","updatePolyfill","full","polyfill","getCSS","getWidth","rAF","running","waiting","firstFns","secondFns","run","runFns","rafBatch","rAFIt","throttle","lastTime","gDelay","rICTimeout","idleCallback","isPriority","delay","debounce","timestamp","later","loader","preloadElems","isCompleted","resetPreloadingTimer","loadMode","started","eLvW","elvH","eLtop","eLleft","eLright","eLbottom","isBodyHidden","regImg","regIframe","supportScroll","shrinkExpand","currentExpand","isLoading","lowRuns","resetPreloading","isVisible","isNestedVisible","elemExpand","outerRect","visible","checkElements","eLlen","autoLoadElem","loadedSomething","elemNegativeExpand","elemExpandVal","beforeExpandVal","defaultExpand","preloadExpand","hFac","lazyloadElems","unveilElement","throttledCheckElements","switchLoadingClass","rafSwitchLoadingClass","rafedSwitchLoadingClass","changeIframeSrc","handleSources","source","customMedia","sourceSrcset","lazyUnveil","isAuto","sizes","isImg","srcset","isPicture","firesLoad","isLoaded","autoSizer","afterScroll","altLoadmodeScrollListner","onload","loadingElements","img","autosizesElems","sizeElement","sources","getSizeElement","updateElementsSizes","debouncedUpdateElementsSizes","Mount","Module","loginSession","login","loginFinished","phoneNumberInput","storedPage","storedPhoneNumber","pnr","loginSessionInit","oauthFunctions","loginUrl","idToken","regUrl","email","createUrl","firstName","lastName","locale","decoder","decodeBase64","encoded","binary","bytes","decode","_a","JOSEError","message","JWTInvalid","isObjectLike","isObject","base64url.decode","decodeJwt","jwt","payload","decoded","base64url","_b","googleLoginUrls","googleLoginFunctions","urls","googleUser","profile","runtime","exports","Op","defineProperty","desc","undefined","$Symbol","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","NativeIteratorPrototype","Gp","defineIteratorMethods","prototype","genFun","ctor","AsyncIterator","PromiseImpl","invoke","record","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","iter","doneResult","delegate","delegateResult","maybeInvokeDelegate","methodName","info","pushTryEntry","locs","entry","resetTryEntry","iterable","iteratorMethod","skipTempReset","rootEntry","rootRecord","exception","loc","caught","hasCatch","hasFinally","finallyEntry","afterLoc","finallyLoc","tryLoc","thrown","resultName","nextLoc","accidentalStrictMode","bambuser","bambuserTrigger","scriptNode","bambuserShowId","bambuserLocale","bambuserCurrency","bambuserCartUrl","getProducts","products","addToCart","quantity","_context2","updateCartItem","_context3","isCartEmpty","_context4","player","epiProducts","_ref","sku","bambuserId","epiProduct","productFactory","productDetailFactory","variationFactory","variation","sizeFactory","size","priceFactory","addedItem","updatedItem","item","selectAll","selectOne","updateIndicator","indicator","makeParentIndicator","template","globalHeader","Menu","header","headerContentElement","headerHeight","onLoad","menuTrigger","menuToExpand","menuToExpandContainer","expander","menuElement","captcha","refreshUrl","axios","checkoutFunctions","formTarget","inputs","scrollToTarget","initCheckout","phoneLookupNoHit","phoneLookupHit","addPassword","selectPassword","repeatPassword","originalpassword","toggled","afterPayNumber","paymentOption","afterPayOption","orderForm","payButton","customerClub","button","lipScoreToggleButton","expand","customerservice","navigation","navigationElements","initPostNordMap","myLatLng","adrsLength","bounds","markers","setInfoWindow","currentName","currentLat","currentLng","currentAddress","currentStore","postNordBox","currentSymbol","infowindow","marker","hideAllInfoWindows","currentDelivery","formatPriceRange","minPrice","maxPrice","formatPrice","price","formattedPrice","splitFormattedPrice","formatWithoutRounding","formatPriceWithDash","integerPart","decimalPart","hasModifiedPrice","product","computePrice","computeNewPrice","computeOldPrice","priceAsNumber","oldPriceAsNumber","computeRebate","moreDeliveryPoints","moreChoices","deliveryPoints","deliveryPointMain","shipmentPlace","sumDelivery","sumCost","sumItems","initialSumItems","pbWrapper","ajax","voiceDelivery","deliveryWindows","valid","delivery","$porterRadioBtn","point","porterbuddyWidget","porterBuddyInput","comment","leaveAtDoorstep","callbacks","porterbuddyInitTrigger","timeTable","currentLocation","pushShippingOption","deliveryMap","openingHours","summaryPrice","newPrice","place","newSumCost","formatNumber","intialSumItemsNumber","intialSumItemsNumberFormatted","shippingPriceFloat","shippingPriceFloatFormatted","elementId","isCurrent","isIt","currentShipmentPrice","inputControl","showInventoryNotificationSubscriptionButton","hasAnySoldOutSizes","postNotificationRequest","emailAddressInput","selectedSizeInput","inventoryNotification","inventoryNotificationSuccess","inventoryNotificationData","notifyInventory","inventory","notificationLabel","notificationButton","notificationButtonContainer","notificationEmail","currentSelectedSize","notificationTriggers","emailAddress","vueInventory","ids","variationId","markFavorites","teaser","loveButton","filterArrays","favorites","hits","getFavorites","toggleFavorite","productCode","updateFavoritesCount","addToFavoritesBegin","favoriteCart","miniCartAmount","favorite","favoriteToggles","initFavorites","updateFavorites","trigger","uniqueID","c","categoryElement","toggledFilter","forms","requiredElement","label","targetFormId","targetForm","setupDeliveryMoreChoices","deliveryMoreChoicesContainer","inputPostalCode","inputCity","submitButton","feedback","initForms","trackPageView","pathRoot","virtualPath","trackData","trackEvent","labelSelector","trackSlideChange","resultObject","changeSlide","step","findColumnOrRow","me","logResult","currentArray","displayElement","filterJeansList2D","tMe","tJeans","bMe","bJeans","rowArray","colArray","rowNumber","colNumber","hit","filteredPants","jeansguide","prodId","targetSlide","stepContent","fieldsetInvalid","fieldsetValid","toggleElement","isToggled","elementToToggle","_c","toggler","controlsWhat","controlsElement","toggledNested","vueComponentToggler","initToggle","DeleteProfile","formData","request","_d","_e","ResetPassword","ChangeLoyaltyEmail","res","_f","_g","EditProfile","myPageFunctions","consentSave","saveStatus","handleConsentForm","emailConsent","smsConsent","checkSelections","node1","node2","Mypage","ajaxContent","observer","mutationList","mutation","config","popup","$popup","popupCount","popupName","popupFrequency","popupTrigger","sessionCookieName","sustainedCookieName","popupCookieVal","sustainedPopupCookieVal","getCookie","setCookie","bubbleEvent","eventType","Product","reviewContent","noReviewsElement","reviewCountElement","reviewCount","reviewListCount","lipScoreAccordion","extendedDetailsAccordion","promotions","Quantity","inputElement","oldValue","newVal","Quicksearch","quicksearchInput","require$$0","Slick","instanceUid","dataSettings","slider","markup","addBefore","targetHeight","targetLeft","animProps","now","asNavFor","slide","transition","slideTo","dot","newSlides","numOfSlides","originalSlides","slidesPerSection","row","forceUpdate","breakpoint","targetBreakpoint","respondToWidth","triggerBreakpoint","sliderWidth","windowWidth","dontAnimate","indexOffset","slideOffset","unevenOffset","navigables","prevNavigable","refresh","slideIndex","$sf","breakPoint","counter","pagerQty","verticalHeight","verticalOffset","coef","indexes","slidesTraversed","swipedSlide","swipeTarget","centerOffset","slideOuterWidth","slideRightBoundary","creation","loadRange","cloneRange","rangeStart","rangeEnd","loadImages","imagesScope","image","imageSource","imageSrcSet","imageSizes","imageToLoad","prevSlide","nextSlide","$slides","tryCount","$imgsToLoad","initializing","currentSlide","lastVisibleIndex","currentBreakpoint","responsiveSettings","removeBefore","removeAll","positionProps","x","y","bodyStyle","allSlides","remainder","evenCoef","infiniteCount","targetElement","sync","animSlide","oldSlide","slideLeft","navTarget","xDist","yDist","r","swipeAngle","slideCount","direction","swipeDirection","swipeLength","positionOffset","touches","verticalSwipeLength","fromBreakpoint","SELECTORS","slickslide","replaceLargeImage","thumbnailItems","currentSideItemIndex","currentItemToDisplay","sideGalleryItems","runMainImageAnimation","removePreviousActiveSidePanel","showcasedItem","windowSize","mainGallery","showcasedItemLargeImage","amountOfItems","videoid","structuredVideoData","tabs","contentTabs","contentPanels","resizedFinished","teaserblock","mq","checkMq","scaleVideo","height","controlvideo","videoElement","controls","video","playerLarge","videoPresent","fullVideoPresent","reason","vidId","vid","vimeoBlock","videoId","autostart","background","mute","afterpayFunctions","active","afterpayElements","afterpayElementsInputs","currentAfterpayElement","currentAfterpayElementInputs","afterpayElement","afterpayElementInput","currentAfterpayElementInput","optionInvoice","optionInstallment","afterpayStatus","Chat","chatActive","zenid","load","scriptURL","makeMap","str","expectsLowerCase","set","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","isOn","isModelListener","extend","hasOwnProperty","isArray","isMap","toTypeString","isSet","isDate","isString","isSymbol","isPromise","objectToString","toRawType","isPlainObject","isIntegerKey","isReservedProp","cacheStringFunction","camelizeRE","camelize","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","invokeArrayFns","def","writable","looseToNumber","toNumber","_globalThis","getGlobalThis","normalizeStyle","normalized","parseStringStyle","listDelimiterRE","propertyDelimiterRE","styleCommentRE","cssText","normalizeClass","normalizeProps","klass","specialBooleanAttrs","isSpecialBooleanAttr","includeBooleanAttr","looseCompareArrays","equal","looseEqual","aValidType","bValidType","aKeysCount","bKeysCount","aHasKey","bHasKey","looseIndexOf","isRef","toDisplayString","replacer","entries","val2","stringifySymbol","activeEffectScope","EffectScope","detached","currentEffectScope","fromParent","effectScope","recordEffectScope","effect","scope","getCurrentScope","onScopeDispose","activeEffect","ReactiveEffect","scheduler","pauseTracking","dep","triggerComputed","resetTracking","lastShouldTrack","shouldTrack","lastEffect","preCleanupEffect","postCleanupEffect","effect2","cleanupDepEffect","trackId","pauseScheduleStack","trackStack","pauseScheduling","resetScheduling","queueEffectSchedulers","trackEffect","debuggerEventExtraInfo","oldDep","triggerEffects","dirtyLevel","tracking","createDep","cleanup","targetMap","ITERATE_KEY","MAP_KEY_ITERATE_KEY","track","depsMap","newValue","oldTarget","deps","newLength","key2","getDepFromReactive","isNonTrackableKeys","builtInSymbols","arrayInstrumentations","createArrayInstrumentations","instrumentations","toRaw","BaseReactiveHandler","_isReadonly","_isShallow","receiver","isReadonly2","isShallow2","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","targetIsArray","readonly","reactive","MutableReactiveHandler","isOldValueReadonly","isReadonly","isShallow","hadKey","ReadonlyReactiveHandler","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","toShallow","get","rawTarget","rawKey","has2","toReadonly","toReactive","has","get2","deleteEntry","clear","hadItems","createForEach","thisArg","observed","createIterableMethod","targetIsMap","isPair","isKeyOnly","innerIterator","createReadonlyMethod","createInstrumentations","mutableInstrumentations2","shallowInstrumentations2","readonlyInstrumentations2","shallowReadonlyInstrumentations2","mutableInstrumentations","readonlyInstrumentations","shallowInstrumentations","shallowReadonlyInstrumentations","createInstrumentationGetter","shallow","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","isReactive","isProxy","markRaw","ComputedRefImpl","_setter","isSSR","triggerRefValue","trackRefValue","getterOrOptions","debugOptions","onlyGetter","ref2","oldVal","ref","createRef","shallowRef","rawValue","RefImpl","__v_isShallow","useDirectValue","unref","shallowUnwrapHandlers","proxyRefs","objectWithRefs","toRefs","propertyToRef","ObjectRefImpl","_object","_defaultValue","defaultValue","callWithErrorHandling","instance","handleError","callWithAsyncErrorHandling","throwInDev","contextVNode","exposedInstance","errorInfo","errorCapturedHooks","appErrorHandler","logError","isFlushing","isFlushPending","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","findInsertionIndex","middle","middleJob","middleJobId","getId","queueJob","job","queueFlush","flushJobs","invalidateJob","queuePostFlushCb","cb","flushPreFlushCbs","seen","flushPostFlushCbs","deduped","comparator","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","withDirectives","vnode","directives","getComponentPublicInstance","bindings","modifiers","traverse","invokeDirectiveHook","prevVNode","oldBindings","binding","leaveCbKey","enterCbKey","useTransitionState","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransitionPropsValidators","recursiveGetSubtree","subTree","BaseTransitionImpl","slots","getCurrentInstance","children","getTransitionRawChildren","child","Comment","rawProps","emptyPlaceholder","innerChild","getKeepAliveChild","enterHooks","resolveTransitionHooks","setTransitionHooks","oldChild","oldInnerChild","isSameVNodeType","leavingHooks","earlyRemove","delayedLeave","leavingVNodesCache","getLeavingNodesForType","BaseTransition","leavingVNodes","postClone","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","callHook","callAsyncHook","hook2","leavingVNode","afterHook","cancelHook","called","cancelled","vnode2","hooks2","isKeepAlive","cloneVNode","shapeFlag","keepComment","parentKey","keyedFragmentCount","Fragment","defineComponent","extraOptions","isAsyncWrapper","onActivated","registerKeepAliveHook","onDeactivated","currentInstance","wrappedHook","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","reset","setCurrentInstance","createHook","lifecycle","isInSSRComponentSetup","onBeforeMount","onBeforeUpdate","onUpdated","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","COMPONENTS","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","component","warnMissing","Component","selfName","getComponentName","registry","renderList","renderItem","renderSlot","fallback","noSlotted","createVNode","slot","openBlock","validSlotContent","ensureValidVNode","rendered","createBlock","vnodes","isVNode","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","instanceWatch","hasSetupBinding","PublicInstanceProxyHandlers","setupState","accessCache","appContext","normalizedProps","shouldCacheAccess","publicGetter","cssModule","globalProperties","propsOptions","descriptor","normalizePropsOrEmits","applyOptions","publicThis","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","render","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","inheritAttrs","components","filters","resolveInjections","methodHandler","createWatcher","provides","provide","registerLifecycleHook","register","_hook","exposed","checkDuplicateProperties","normalizeInject","inject","h","createPathGetter","watch","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","mergeOptions","from","strats","asMixin","strat","internalOptionMergeStrats","mergeDataFn","mergeEmitsOrPropsOptions","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","createAppContext","uid$1","createAppAPI","hydrate","rootComponent","rootProps","installedPlugins","isMounted","app","plugin","mixin","directive","rootContainer","isHydrate","lastApp","currentApp","parentProvides","treatDefaultAsFactory","hasInjectionContext","internalObjectProto","createInternalObject","isInternalObject","initProps","isStateful","setFullProps","updateProps","rawPrevProps","optimized","patchFlag","rawCurrentProps","hasAttrsChanged","propsToUpdate","isEmitListener","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","mixinPropsCache","normalizePropsOptions","comp","hasExtends","extendProps","raw2","normalizedKey","validatePropName","propType","shouldCast","shouldCastTrue","typeName","isInternalKey","normalizeSlotValue","normalizeVNode","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","normalizeVNodeSlots","assignSlots","initSlots","updateSlots","needDeletionCheck","deletionComparisonTarget","setRef","rawRef","oldRawRef","parentSuspense","isUnmount","refValue","oldRef","refs","_isString","_isRef","doSet","existing","queuePostRenderEffect","TeleportEndKey","isTeleport","queueEffectWithSuspense","createRenderer","baseCreateRenderer","createHydrationFns","hostInsert","hostRemove","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostInsertStaticContent","patch","n1","n2","anchor","parentComponent","slotScopeIds","getNextHostNode","unmount","Text","processText","processCommentNode","Static","mountStaticNode","processFragment","processElement","processComponent","internals","moveStaticNode","nextSibling","removeStaticNode","mountElement","patchElement","vnodeHook","dirs","mountChildren","resolveChildrenNamespace","setScopeId","invokeVNodeHook","needCallTransitionHooks","needTransition","scopeId","parentVNode","cloneIfMounted","dynamicChildren","oldProps","newProps","toggleRecurse","patchBlockChildren","patchChildren","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","traverseStaticChildren","mountComponent","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","placeholder","shouldUpdateComponent","updateComponentPreRender","componentUpdateFn","bu","u","nonHydratedAsyncRoot","locateNonHydratedAsyncRoot","originNext","nextTree","renderComponentRoot","prevTree","updateHOCHostEl","bm","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","nextVNode","prevProps","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","unmountChildren","oldLength","commonLength","nextChild","parentAnchor","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","patched","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","move","moveType","leave","delayLeave","afterLeave","remove2","performLeave","doRemove","cacheIndex","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","um","invalidateMount","teleportEnd","currentNamespace","allowed","ch1","ch2","arrI","subComponent","ssrContextKey","useSSRContext","INITIAL_WATCHER_VALUE","doWatch","immediate","flush","once","onTrack","onTrigger","_cb","unwatch","reactiveGetter","source2","forceTrigger","isMultiSource","onCleanup","baseGetter","ssrCleanup","path","segments","getModelModifiers","modelName","emit","rawArgs","handlerName","onceHandler","normalizeEmitsOptions","extendEmits","normalizedFromExtend","withProxy","renderCache","fallthroughAttrs","proxyToUse","thisProxy","render2","getFunctionalFallthrough","blockStack","filterModelListeners","prevChildren","nextProps","nextChildren","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","isSuspense","suspense","currentBlock","disableTracking","closeBlock","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","extraProps","mergeRef","cloneTransition","mergedProps","mergeProps","createTextVNode","createStaticVNode","numberOfNodes","createCommentVNode","asBlock","slotFlag","toMerge","incoming","emptyAppContext","uid","internalSetCurrentInstance","setInSSRSetupState","g","registerGlobalSetter","setters","unsetCurrentInstance","setupResult","setupStatefulComponent","setup","setupContext","createSetupContext","resolvedResult","handleSetupResult","finishComponentSetup","skipOptions","isCustomElement","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","attrsProxyHandlers","includeInferred","computed$1","propsOrChildren","svgNS","mathmlNS","templateContainer","nodeOps","is","before","wrapper","TRANSITION","ANIMATION","vtcKey","Transition","resolveTransitionProps","DOMTransitionPropsValidators","h2","hasExplicitCallback","baseProps","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","normalizeDuration","enterDuration","leaveDuration","finishEnter","isAppear","removeTransitionClass","finishLeave","makeEnterHook","nextFrame","addTransitionClass","whenTransitionEnds","forceReflow","NumberOf","_vtc","endId","expectedType","explicitTimeout","resolveIfNotStale","propCount","getTransitionInfo","endEvent","ended","onEnd","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","delays","d","toMs","patchClass","isSVG","transitionClasses","vShowOriginalDisplay","vShowHidden","vShow","setDisplay","CSS_VAR_TEXT","displayRE","patchStyle","isCssString","hasControlledDisplay","prevStyle","setStyle","cssVarText","importantRE","prefixed","autoPrefix","prefixes","prefixCache","rawName","xlinkNS","patchAttr","isBoolean","patchDOMProp","needRemove","removeEventListener","veiKey","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","cachedNow","getNow","initialValue","patchStopImmediatePropagation","originalStop","isNativeOn","patchProp","shouldSetAsProp","getModelAssigner","onCompositionStart","onCompositionEnd","assignKey","vModelText","lazy","trim","number","castToNumber","domValue","elValue","vModelCheckbox","modelValue","elementValue","getValue","checked","assign","found","filtered","getCheckboxValue","setChecked","vModelRadio","systemModifiers","modifierGuards","withModifiers","cacheKey","guard","keyNames","withKeys","eventKey","k","rendererOptions","renderer","ensureRenderer","createApp","mount","containerOrSelector","normalizeContainer","resolveRootNamespace","__props","href","IconSizes","IconTypes","isBrowser","isESModule","applyToParams","newParams","noop","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","query","searchString","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","isSameRouteLocation","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","fromSegments","toSegments","lastToSegment","toPosition","segment","START_LOCATION_NORMALIZED","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","beforeUnloadListener","history","destroy","buildState","back","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","score","segmentScores","tokenIndex","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","stringify","avoidDuplicatedSlash","param","compareScoreArray","comparePathParserScore","aScore","bScore","isLastScoreNegative","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parser","createRouterMatcher","routes","globalOptions","matcherMap","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","isMatchable","insertMatcher","matcherRef","getRoutes","paramsFromLocation","parentMatcher","mergeMetaFields","clearRoutes","normalizeRecordProps","propsObject","meta","defaults","partialOptions","lower","upper","mid","insertionAncestor","getInsertionAncestor","ancestor","searchParams","searchParam","eqPos","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","guardToPromiseFn","runWithContext","enterCallbackArray","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","isRouteComponent","componentPromise","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","RouterLinkImpl","link","elClass","getLinkClass","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","injectedRoute","routeToDisplay","injectedDepth","initialDepth","matchedRoute","matchedRouteRef","viewRef","oldInstance","oldName","ViewComponent","routePropsOption","routeProps","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","isReady","scrollBehavior","reactiveRoute","unmountApp","recordFrom","recordTo","useRouter","useRoute","CONTENT_LIST_ARTICLES","CONTENT_LIST_STORES","FacetTypes","TOUCHPOINT_DESKTOP","TOUCHPOINT_MOBILE","SearchService$1","ticket","hasBeacon","cancelTokenSource","searchQuery","searchFacets","sort","pageSize","page","preview","limit","getSearchQuery","pageId","contentLinkId","apiUrl","listPath","baseUrlPath","productId","facetId","facetValues","NotifyClick","SearchService","notifyClick","getSuggestionUrl","searchPageUrl","q","getTotalHitsUrl","__emit","hasRouter","suggestionUrl","formattedSuggestion","hq","click","getSelectedValuesFromFacet","facet","sizeType","format","getSelectedValueIdsFromFacet","facetValue","getCustomApptusValue","customObject","property","computePromotion","smallLabel","labelText","computeMemberPromotion","promotion","oldPrice","CANCEL_AUTOCOMPLETE_REQUEST","inputQuery","autocompleteResult","__expose","totalHitsUrl","articles","getContentItems","stores","hasAnyHits","autocomplete","clickSearch","addLeadingSlashIfNeeded","cancelRequest","clickTotalHits","change","localCancelTokenSource","clickSuggestion","searchResult","contentListId","contentList","isExpanded","quickSearch","searchContainer","setIsExpanded","clickOpen","clickClose","expandedState","_sfc_main$S","formatMatrixSizeLabel","wText","lText","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","_hoisted_1","_openBlock","_createElementBlock","_Fragment","_renderList","isSelected","$event","_withKeys","formatLabel","_hoisted_2","_createCommentVNode","_sfc_main$R","getValuesForGroups","getValuesNotInGroup","groupKeys","groupKey","notInGroup","group","_toDisplayString","_hoisted_3","selectedValues","initialSelectedValues","labelId","filterId","clickToggle","clickUseFilter","selectValue","isCurrentlySelected","selectedValue","isSuitFormat","isMatrixFormat","initialSelectedValue","routerQueryParam","desktopChange","mobileChange","clickUseSort","CLOSED","SORT","upsertFacet","updateSort","useFilter","esc","pills","getLabel","facetValueId","formatSuitSizeLabel","pushDataToGtm","pushData","getProductClickEvent","userId","department","category","brand","rebate","metaColor","title","stock","getCategoryImpressionsEvent","store","productGroups","productGroup","getFilterImpressionsEvent","listName","_sfc_main$M","_createElementVNode","lazyLoadFallback","altText","_normalizeClass","_hoisted_4","validateRegularSizeSelection","productPageStore","validatePantsSizeSelection","validateSuitSizeSelection","sizeSelected","widthSelected","lengthSelected","validateSizeSelection","sizePickerType","formatZeroSize","formatSockSize","formatRegularSize","regex","formatPantsSize","formatSuitSize","isRegularSizePicker","sizeNumber","formatSize","zeroSize","sockSize","regularSize","pantsSize","suitSize","isSuitSize","isVue2","activePinia","setActivePinia","pinia","piniaSymbol","o","MutationType","createPinia","_p","toBeInstalled","addSubscription","subscriptions","removeSubscription","triggerSubscriptions","fallbackRunWithContext","ACTION_MARKER","ACTION_NAME","mergeReactiveObjects","patchToApply","subPatch","targetValue","skipHydrateSymbol","shouldHydrate","isComputed","createOptionsStore","hot","actions","getters","initialState","localState","computedGetters","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","actionSubscriptions","debuggerEvents","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","$reset","newState","$state","$dispose","wrappedAction","afterCallbackList","onErrorCallbackList","after","onError","partialStore","stopWatcher","setupStore","actionValue","extender","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","FavoriteService","useFavoritesStore","productKey","epiProductCode","util","assertIs","_arg","assertNever","_x","items","validKeys","checker","joinValues","separator","objectUtil","ZodParsedType","getParsedType","ZodIssueCode","quotelessJson","ZodError","issues","sub","subs","actualProto","_mapper","mapper","issue","fieldErrors","processError","curr","formErrors","errorMap","overrideErrorMap","setErrorMap","getErrorMap","makeIssue","errorMaps","issueData","fullIssue","errorMessage","maps","EMPTY_PATH","addIssueToContext","ParseStatus","arrayValue","INVALID","pairs","syncPairs","pair","finalObject","DIRTY","OK","isAborted","isDirty","isValid","isAsync","errorUtil","ParseInputLazyPath","handleResult","processCreateParams","invalid_type_error","required_error","description","iss","ZodType","maybeAsyncResult","getIssueProperties","setError","refinementData","refinement","ZodEffects","ZodFirstPartyTypeKind","ZodOptional","ZodNullable","ZodArray","ZodPromise","ZodUnion","ZodIntersection","transform","defaultValueFunc","ZodDefault","ZodBranded","catchValueFunc","ZodCatch","This","ZodPipeline","ZodReadonly","cuidRegex","cuid2Regex","ulidRegex","uuidRegex","emailRegex","_emojiRegex","emojiRegex","ipv4Regex","ipv6Regex","datetimeRegex","isValidIP","ip","ZodString","tooBig","tooSmall","validation","minLength","maxLength","min","floatSafeRemainder","valDecCount","stepDecCount","decCount","valInt","stepInt","ZodNumber","kind","inclusive","ZodBigInt","ZodBoolean","ZodDate","minDate","maxDate","ZodSymbol","ZodUndefined","ZodNull","ZodAny","ZodUnknown","ZodNever","ZodVoid","schema","deepPartialify","ZodObject","newShape","fieldSchema","ZodTuple","shape","shapeKeys","extraKeys","keyValidator","unknownKeys","catchall","defaultError","augmentation","merging","mask","newField","createZodEnum","handleResults","unionErrors","childCtx","dirty","getDiscriminator","ZodLazy","ZodLiteral","ZodEnum","ZodNativeEnum","ZodDiscriminatedUnion","discriminator","discriminatorValue","optionsMap","discriminatorValues","mergeValues","aType","bType","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","handleParsed","parsedLeft","parsedRight","left","right","itemIndex","rest","schemas","ZodRecord","keyType","valueType","third","ZodMap","finalMap","ZodSet","finalizeSet","parsedSet","minSize","maxSize","ZodFunction","makeArgsIssue","makeReturnsIssue","returns","parsedArgs","parsedReturns","returnType","expectedValues","enumValues","nativeEnumValues","promisified","checkCtx","processed","executeRefinement","acc","preprocess","newCtx","ZodNaN","BRAND","inResult","custom","fatal","_fatal","p2","late","instanceOfType","stringType","numberType","nanType","bigIntType","booleanType","dateType","symbolType","undefinedType","nullType","anyType","unknownType","neverType","voidType","arrayType","objectType","strictObjectType","unionType","discriminatedUnionType","intersectionType","tupleType","recordType","mapType","setType","functionType","lazyType","literalType","enumType","nativeEnumType","promiseType","effectsType","optionalType","nullableType","preprocessType","pipelineType","ostring","onumber","oboolean","coerce","NEVER","z","ItemSchema","EcommerceEventModelSchema","GoogleAnalytics4EventModelSchema","handleGtmTracking","dataLayerObject","API_URL","Log","logmessage","LogErrorResponse","endpointUrl","Ga4Events","_GtmService","eventName","lineItem","extraEcommerceObjectProperties","itemListId","itemListName","isUserAuthenticated","searchResultRecommendList","upsellAlgorithm","productIndex","itemId","itemName","creativeName","creativeSlot","linkHref","lineItemCode","validatedData","algorithm","promotionId","promotionName","promotionDestination","productGroupIndex","categories","GtmService","tryOnScopeDispose","toValue","isClient","createFilterWrapper","bypassFilter","pausableFilter","extendFilter","pause","resume","eventFilter","getLifeCycleTarget","watchWithFilter","watchPausable","tryOnMounted","unrefElement","elRef","plain","defaultWindow","useEventListener","cleanups","options2","stopWatch","optionsClone","_global","globalKey","getHandlers","getSSRHandler","guessSerializerType","rawInit","StorageSerializers","customStorageEventName","useStorage","storage","listenToStorageChanges","writeDefaults","mergeDefaults","initOnMounted","_a2","serializer","pauseWatch","resumeWatch","pausableWatch","write","updateFromCustomEvent","dispatchWriteEvent","serialized","read","useLocalStorage","useProductPageStore","color","suitLengths","lengths","skuDetailsArray","skuDetails","suitWidths","widths","suitSizes","displayWidthNotSelectedError","displayLengthNotSelectedError","displaySizeNotSelectedError","inStockSuitLengths","inStockSuitLengthsSet","inStockSuitWidths","inStockSuitWidthsSet","inStockSuitSizes","inStockSuitSizesSet","soldOutSizes","getSkuCode","skuCode","getInventoryCount","inventoryCount","getAvailableSizes","suitWidth","suitLength","availableSizes","getAvailableLengths","availableLengths","getAvailableWidths","availableWidths","getAvailableLengthsAndWidths","getAvailableLengthsAndSizes","getAvailableWidthsAndSizes","translateWidth","translateLength","selectedSuitSize","selectedSuitWidth","selectedSuitLength","autoSelectSingleOption","newSize","newWidth","tempAvailableWidths","tempAvailableLengths","tempAvailableSizes","pantsLengths","pantsWidths","widthsArray","sizeOrder","inStockPantsLengths","inStockpantsLengthsSet","inStockPantsWidths","inStockpantsWidthsSet","pantsWidth","pantsLength","selectedPantsWidth","selectedPantsLength","selectedRegularSize","handleSizeChange","isOneSize","regularSizes","sizesArray","inStockRegularSizes","inStockRegularSizesSet","isWideSize","useLazy","callBack","onlyOnce","lazyObserver","hasIntersected","shouldCallCallback","favoritesStore","sliderRef","parentRef","resizeTimeout","initializeSlider","destroySlider","handleIntersection","newList","_UpsellService","endpoint","queryParams","queryString","UpsellService","disconnect","useUpsell","fetcher","lazyLoad","rootElement","upsellModel","fetch","ok","useProductPageUpsell","categoryName","useListPathUpsell","useCartStatusUpsell","variantKey","useCartPageUpsell","variantKeys","dialogElement","handleClickClose","handleClickOutsideDialog","formatCurrency","currency","CheckoutStages","CheckoutSteps","VerificationSteps","useCheckoutStateStore","stage","useShoppingCartStore","cart","ksps","discount","lineItems","lineItemEan","errors","checkoutState","li","USER_FEEDBACK","API_ERROR_MESSAGES","API_ERROR_NAMES","assertString","_typeof","invalidType","toDate","_assertString","_interopRequireDefault","date","alpha_1","alpha","alphanumeric","decimal","englishLocales","arabicLocales","_locale","farsiLocales","_locale2","_i2","bengaliLocales","_locale3","_i3","dotDecimal","commaDecimal","_i4","_i5","isFloat_1","isFloat","_alpha","require$$1","float","toFloat","_isFloat","toInt","radix","toBoolean","strict","equals","comparison","merge","_toString","_merge","require$$2","defaulContainsOptions","isByteLength","isFQDN","default_fqdn_options","tld","part","isIP","IPv4SegmentFormat","IPv4AddressFormat","IPv4AddressRegExp","IPv6SegmentFormat","IPv6AddressRegExp","isEmail","_isByteLength","_isFQDN","_isIP","require$$3","require$$4","default_email_options","splitNameAddress","emailUserPart","gmailUserPart","quotedEmailUser","emailUserUtf8Part","quotedEmailUserUtf8","defaultMaxEmailLength","validateDisplayName","display_name","display_name_without_quotes","contains_illegal","all_start_with_back_slash","display_email","domain","lower_domain","user","username","_user_parts","noBracketdomain","user_parts","isURL","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","minLen","_arrayLikeToArray","arr2","f","default_url_options","wrapped_ipv6","isRegExp","checkHost","host","protocol","auth","hostname","port","port_str","split","ipv6","_auth$split","_auth$split2","password","ipv6_match","isMACAddress","macAddress48","macAddress48NoSeparators","macAddress48WithDots","macAddress64","macAddress64NoSeparators","macAddress64WithDots","isIPRange","subnetMaybe","v4Subnet","v6Subnet","expectedSubnet","_createForOfIteratorHelper","allowArrayLike","it","F","normalCompletion","didErr","_e2","default_date_options","isValidFormat","zip","zippedArr","formatDelimiter","delimiter","dateDelimiter","dateAndFormat","dateObj","_iterator","_step","_step$value","dateWord","formatWord","fullYear","parsedYear","currentYearLastTwoDigits","month","day","isTime","default_time_options","formats","defaultOptions","strictBooleans","looseBooleans","isLocale","extlang","language","region","variant","singleton","extension","privateuse","irregular","regular","grandfathered","langtag","languageTagRegex","isAbaRouting","isRoutingReg","checkSumVal","isAlpha_1","isAlpha","_str","ignore","isAlphanumeric_1","isAlphanumeric","isNumeric","numericNoSymbols","isPassportNumber","passportRegexByCountryCode","countryCode","normalizedStr","isInt","int","intLeadingZeroes","minCheckPassed","maxCheckPassed","ltCheckPassed","gtCheckPassed","isPort","_isInt","isLowercase","isUppercase","isIMEI","imeiRegexWithoutHypens","imeiRegexWithHypens","imeiRegex","sum","mul","digit","tp","chk","isAscii","ascii","isFullWidth_1","isFullWidth","fullWidth","isHalfWidth_1","isHalfWidth","halfWidth","isVariableWidth","_isFullWidth","_isHalfWidth","isMultibyte","multibyte","multilineRegexp","flags","regexpAsStringLiteral","isSemVer","_multilineRegex","semanticVersioningRegex","isSurrogatePair","surrogatePair","includes","arrVal","isDecimal","_includes","decimalRegExp","regExp","default_decimal_options","blacklist","isHexadecimal","hexadecimal","isOctal","octal","isDivisibleBy","_toFloat","isHexColor","hexcolor","isRgbColor","rgbColor","rgbaColor","rgbColorPercent","rgbaColorPercent","includePercentValues","isHSL","hslComma","hslSpace","strippedStr","isISRC","isrc","isIBAN_1","isIBAN","ibanRegexThroughCountryCode","hasOnlyValidCountryCodes","countryCodeArray","countryCodeArrayFilteredWithObjectIbanCode","hasValidIbanFormat","isoCountryCode","isoCountryCodeInIbanRegexCodeObject","isoCountryCodeInWhiteList","isoCountryCodeInBlackList","hasValidIbanChecksum","rearranged","alphaCapsReplacedWithDigits","isISO31661Alpha2_1","isISO31661Alpha2","validISO31661Alpha2CountriesCodes","isBIC","_isISO31661Alpha","isBICReg","isMD5","md5","isHash","isBase64","notBase64","urlSafeBase64","defaultBase64Options","firstPaddingChar","isJWT","_isBase","dotSplit","currElem","isJSON","default_json_options","primitives","isEmpty","default_is_empty_options","isLength","presentationSequences","surrogatePairs","isUUID","uuid","isMongoId","_isHexadecimal","isAfter","_toDate","comparisonDate","isBefore","isIn","isLuhnNumber","sanitized","tmpNum","shouldDouble","isCreditCard","_isLuhnNumber","cards","allCards","tmpCardsArray","cardProvider","card","provider","isIdentityCard","validators","weightOfDigits","digits","modulo","lastDigit","DNI","charsValue","controlDigits","checkDigits","idAsNumber","checkDigit","invertedArray","lastNumber","k1","k2","old_nic","new_nic","incNum","NIN","provincesAndCities","powers","parityBit","checkAddressCode","addressCode","checkBirthDayCode","birDayCode","yyyy","mm","dd","xdata","getParityBit","idCardNo","id17","power","mod","checkParityBit","check15IdCardNo","check18IdCardNo","checkIdCardNo","regexHKID","regexIsDigit","convertedChar","checkSumConverted","ALPHABET_CODES","validator","isEAN","LENGTH_EAN_8","LENGTH_EAN_14","validEanRegex","getPositionWeightThroughLengthAndIndex","calculateCheckDigit","ean","checksum","partialSum","actualCheckDigit","isISIN","isin","double","lo","hi","_arr","_digit","isISBN","possibleIsbn10","possibleIsbn13","factor","isbn","sanitizedIsbn","isISSN","issn","testIssn","algorithms","iso7064Check","luhnCheck","reverseMultiplyAndSum","verhoeffCheck","checkvalue","total","d_table","p_table","str_copy","isTaxID","_interopRequireWildcard","_isDate","_getRequireWildcardCache","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","bgBgCheck","tin","century_year","multip_lookup","isCanadianSIN","digitsArray","even","csCzCheck","full_year","checkdigit","deAtCheck","deDeCheck","occurences","trip_locations","recurrent","dkDkCheck","year","century_digit","weight","elCyCheck","elGrCheck","enIeCheck","enUsCampusPrefix","enUsGetPrefixes","enUsCheck","esArCheck","accum","verif","esEsCheck","chars","lead_replace","lookup","etEeCheck","fiFiCheck","century_symbol","letters_lookup","frBeCheck","checkdigits","frFrCheck","frLuCheck","hrHrCheck","huHuCheck","itItNameCheck","vowelflag","xflag","itItCheck","number_locations","number_replace","_number_locations","month_replace","char_to_int","odd_convert","_i6","_char_to_int","multiplier","lvLvCheck","mtMtCheck","first_part","second_part","nlNlCheck","plPlCheck","_checksum","_i7","ptBrCheck","_sum","_i8","identifiers","verificators","pos","_i9","_i10","ptPtCheck","roRoCheck","multipliers","skSkCheck","slSiCheck","svSeCheck","tin_copy","current_year","current_century","ukUaCheck","taxIdFormat","taxIdCheck","allsymbols","sanitizeRegexes","strcopy","isMobilePhone_1","isMobilePhone","phones","phone","isEthereumAddress","eth","isCurrency","currencyRegex","decimal_digits","symbol","negative","whole_dollar_amount_without_sep","whole_dollar_amount_with_sep","valid_whole_dollar_amounts","whole_dollar_amount","decimal_amount","default_currency_options","isBtcAddress","bech32","base58","isISO6346_1","isISO6346","isISO6346Str","isDigit","convertedCode","letterCode","checkSumDigit","isISO6391","isISO6391Set","isISO8601","iso8601","iso8601StrictSeparator","isValidDate","ordinalMatch","oYear","oDay","monthString","dayString","isRFC3339","dateFullYear","dateMonth","dateMDay","timeHour","timeMinute","timeSecond","timeSecFrac","timeNumOffset","timeOffset","partialTime","fullDate","fullTime","rfc3339","isISO31661Alpha3","validISO31661Alpha3CountriesCodes","isISO4217_1","isISO4217","validISO4217CurrencyCodes","isBase32","base32","crockfordBase32","defaultBase32Options","isBase58","base58Reg","isDataURI","validMediaType","validAttribute","validData","schemeAndMediaType","mediaType","isMagnetURI","magnetURIComponent","strIndex","ltrim","_rtrim","_ltrim","isMailtoURI","_trim","_isEmail","parseMailtoQueryString","allowedParams","isParseFailed","_q$split","_q$split2","_url$replace$split","_url$replace$split2","_url$replace$split2$","isMimeType","mimeTypeSimple","mimeTypeText","mimeTypeMultipart","isLatLong","lat","long","latDMS","longDMS","defaultLatLongOptions","isPostalCode_1","isPostalCode","threeDigit","fourDigit","fiveDigit","sixDigit","patterns","unescape","stripLow","_blacklist","keep_new_lines","whitelist","isWhitelisted","normalizeEmail","default_normalize_email_options","icloud_domains","outlookdotcom_domains","yahoo_domains","yandex_domains","dotsReplacer","raw_parts","isSlug","charsetRegex","isLicensePlate","isStrongPassword","upperCaseRegex","lowerCaseRegex","numberRegex","symbolRegex","countChars","curVal","analyzePassword","charMap","analysis","scorePassword","scoringOptions","points","isVAT_1","isVAT","AU","weights","ABN","CH","hasValidCheckNumber","calculatedCheckNumber","PT","vatMatchers","_toInt","_toBoolean","_equals","_contains","require$$5","_matches","require$$6","require$$7","_isURL","require$$8","_isMACAddress","require$$9","require$$10","_isIPRange","require$$11","require$$12","require$$13","_isTime","require$$14","_isBoolean","require$$15","_isLocale","require$$16","_isAbaRouting","require$$17","_isAlpha","require$$18","_isAlphanumeric","require$$19","_isNumeric","require$$20","_isPassportNumber","require$$21","_isPort","require$$22","_isLowercase","require$$23","_isUppercase","require$$24","_isIMEI","require$$25","_isAscii","require$$26","require$$27","require$$28","_isVariableWidth","require$$29","_isMultibyte","require$$30","_isSemVer","require$$31","_isSurrogatePair","require$$32","require$$33","require$$34","_isDecimal","require$$35","require$$36","_isOctal","require$$37","_isDivisibleBy","require$$38","_isHexColor","require$$39","_isRgbColor","require$$40","_isHSL","require$$41","_isISRC","require$$42","_isIBAN","require$$43","_isBIC","require$$44","_isMD","require$$45","_isHash","require$$46","_isJWT","require$$47","_isJSON","require$$48","_isEmpty","require$$49","_isLength","require$$50","require$$51","_isUUID","require$$52","_isMongoId","require$$53","_isAfter","require$$54","_isBefore","require$$55","_isIn","require$$56","require$$57","_isCreditCard","require$$58","_isIdentityCard","require$$59","_isEAN","require$$60","_isISIN","require$$61","_isISBN","require$$62","_isISSN","require$$63","_isTaxID","require$$64","_isMobilePhone","require$$65","_isEthereumAddress","require$$66","_isCurrency","require$$67","_isBtcAddress","require$$68","_isISO","require$$69","_isISO2","require$$70","_isISO3","require$$71","_isRFC","require$$72","require$$73","_isISO31661Alpha2","require$$74","_isISO4","require$$75","require$$76","_isBase2","require$$77","_isBase3","require$$78","_isDataURI","require$$79","_isMagnetURI","require$$80","_isMailtoURI","require$$81","_isMimeType","require$$82","_isLatLong","require$$83","_isPostalCode","require$$84","require$$85","require$$86","require$$87","_escape","require$$88","_unescape","require$$89","_stripLow","require$$90","_whitelist","require$$91","require$$92","_isWhitelisted","require$$93","_normalizeEmail","require$$94","_isSlug","require$$95","_isLicensePlate","require$$96","_isStrongPassword","require$$97","_isVAT","require$$98","MAX_FULLNAME_LENGTH","ALLOWED_SPECIAL_CHARACTERS","FEEDBACK_TEXTS","FEEDBACK_TEXT","validationHelper","phoneNumber","postalCode","customerInformation","AddressModelSchema","fieldType","MoneySchema","z.object","z.number","z.string","emailSchema","firstNameSchema","z.ZodIssueCode","lastNameSchema","phoneNumberSchema","addressSchema","postalCodeSchema","citySchema","PaymentMethodPreviewSchema","LineItemSchema","CartSchema","z.array","z.record","z.boolean","BaseAddressModelSchema","AddressModelWithoutAnalyticsSchema","PlaceholderAddressModelSchema","z.custom","GetCartResponseModelSchema","UpdateProductQuantityResponseModelSchema","addProductToCart","getCart","updateProductQuantity","isAdditive","signal","removeProductFromCart","addDiscountCode","discountCode","removeDiscountCode","updateCustomer","addressModel","_ShoppingCartService","isQuickAdd","shoppingCartStore","checkoutEventModel","errorValue","ShoppingCartService","formSubmitted","SizePickerTypes","firstSize","sizeName","fewItemsLeftThreshold","sizePickerRegularProps","sizePickerPantsProps","sizePickerSuitProps","validateSelection","checkStockStatus","treshold","getAddToCartRecs","submitForm","checkoutLineItems","mapVariantToSkuDetails","mapProductsToAddToCartFormProps","productVariants","isMatrixSize","addToCartCallback","matrixSizesProp","regularSizesProp","groupedByWidth","mappedDetails","_h","_j","isLoginActive","hoverColor","favoriteStore","quickAddDialogElement","isDialogVisible","dialogKey","mediaQueryMax","mediaQueryMin","openQuickAddDialog","closeQuickAddDialog","handleBreakpointChange","addToCartFormProps","isFavorite","memberPromotion","colors","colorList","productImage","_l","_k","getFallbackImage","getImageSources","colorsDisplayCount","colorVariationsToDisplay","remainingColorVariations","gtmStockStatus","isInStock","variantsInStock","fallbackImage","imageSources","trackingAsString","loginModalEl","hideLogin","clickLink","middleClickLink","rightClickLink","clickFavorite","displayLogin","mouseOverColor","mouseOutColor","isLast","rowStyle","layoutClass","leftOrRightClass","imageContainerElement","maxCharacters","showFacets","isSmallScreen","headingLevelWithDefault","truncatedText","focusedElement","focusedElementWrapper","handleResize","smallScreenMediaQuery","toggleReadMore","clickNextPage","_sfc_main$B","ResponsiveImage","contentImage","_resolveComponent","article","_withModifiers","_createBlock","_component_ResponsiveImage","_hoisted_5","_sfc_main$A","Article","$t","_createTextVNode","_sfc_main$z","pNr","_hoisted_6","_hoisted_7","_hoisted_9","address","getPhoneHref","_hoisted_8","_hoisted_10","_sfc_main$y","Store","_component_Store","SearchPageRoutes","Products","Articles","Stores","searchPageRouter","routerPush","routerReplace","_sfc_main","Icon","_component_Icon","FACET_PREFIX","FACET_DELIMITER","CANCEL_SEARCH_REQUEST","INITIAL_SEARCH","searchCategory","searchError","isQuickSearchResultsHidden","nProducts","displayProductsRadio","nArticles","nStores","getContentList","pageSizeNumber","thereAreMorePages","hideFavorites","isPreview","toPath","toQuery","toName","fromPath","fromQuery","fromName","showQuickSearch","isInitialSearch","getSearchQueryFromRoute","getSearchCategoryFromRoute","getSearchFacetsFromRoute","getSortFromRoute","getPageFromRoute","getPreviewFromRoute","defaultRouteName","getDefaultRouteNameFromSearchResult","changeCategory","applyFilter","newSort","currentRouterQuery","newRouterQuery","nextPage","clickExitPreview","$route","articlesContentList","storesContentList","categoryResult","categoryBlocks","subcategories","isHeadingAlreadyOnPage","toHash","fromHash","ApplyFilter","CategoryPage","categoryPageRouter","refreshCartState","parents","coords","animations","intersections","intervals","debounces","enabled","scrollX","scrollY","TGT","DEL","NEW","handleMutations","mutations","getElements","animate","handleResizes","updateAllPos","updatePos","observePosition","oldObserver","invocations","getCoords","offsetWidth","offsetHeight","rootMargin","px","optionsOrPlugin","getOptions","isPlugin","currentAnimation","lowPriority","poll","resize","preExisting","remain","getScrollOffset","getTransitionSizes","oldCoords","newCoords","widthFrom","heightFrom","widthTo","heightTo","paddingY","paddingX","getTarget","isEnabled","getPluginTuple","pluginReturn","pluginOrOptions","deltaX","deltaY","keyframes","cleanUp","finalX","finalY","deletePosition","adjustScroll","styleReset","scrollDeltaX","scrollDeltaY","scrollBefore","lastHeight","lastWidth","startScroll","smoothScroll","parentStyles","parentCoords","autoAnimate","DeliveryMethods","AfterpayMethods","validPaymentImageIds","qualifiesForFreeShipping","freeShippingActive","freeShippingLimit","subTotal","amountNeededToQualifyForFreeShipping","deliveryWindowTimeStamp","hours","minutes","formatDay","isToday","today","formatDeliveryLocationAddress","LogoNameForDeliveryMethod","deliveryMethod","logoNameForPaymentMethod","imageId","paymentClass","hasAfterpayInstallmentInfo","paymentMethod","hasAfterpayMethods","getPaymentBody","personIdentifier","selectedAfterPayInstallmentOption","selectedAfterPayInstallmentPlan","setInformationErrors","informationErrors","clearErrors","errorObject","hasDeliveryLocations","hasDeliveryWindows","sentenceCase","toGoogleAnalyticsEventName","checkoutStep","getCustomerInformation","useCustomerInformationStore","field","fields","retrieving","getCityFromPostalCode","city","useDeliveryInformationStore","deliveryLocation","deliveryWindow","PriceSchema","PickupWindowSchema","DeliveryWindowSchema","UpdateDeliveryRequestDtoSchema","DeliveryLocationSchema","DeliveryMethodSchema","DeliveryModelSchema","createAddDeliveryMethodRequestDtoSchema","selectedDeliveryMethod","GetDeliveryInformationResponseModelSchema","SetDeliveryOptionResponseModelSchema","getDeliveryInformation","getDeliveryLocations","shippingMethodName","setDeliveryOption","deliveryMethodId","SelectListGroupSchema","SelectListItemSchema","AfterPayTermsInfoSchema","AfterPayInstallmentInfoSchema","AfterPayInstallmentViewModelSchema","AfterPayAccountInfoSchema","AfterPayViewModelSchema","CheckoutOptionViewModelSchema","PaymentMethodViewModelSchema","PersonIdentifierSchema","AddPaymentMethodRequestDtoSchema","UpdatedCartLineItemDtoSchema","ValidatedCartResultDtoSchema","SelectPaymentResultDtoSchema","createAddPaymentMethodRequestDtoSchema","selectedPaymentMethod","PaymentMethodsDtoSchema","GetPaymentMethodsResponseModelSchema","getPaymentMethods","setPaymentMethod","paymentId","addPaymentMethodRequestDto","usePaymentInformationStore","paymentMethods","afterPayInstallmentPlan","showCartContentChangedPaymentError","selectedKey","getKeyByValue","verificationIsNeeded","customerInformationStore","customerData","apiGetCustomerInformation","stepCompleted","checkoutStateStore","submitCustomerInformationForm","submitDeliveryInformationForm","submitPaymentInformationForm","validationResult","matchingCityResult","apiUpdateCustomer","setSubmittedCustomerInformation","deliveryInformationStore","requestBody","setDeliveryInformationErrors","apiUpdateDelivery","paymentInformationStore","apiSetPaymentMethod","bodyValidationResult","responseValidationResult","priorStepsCompleted","toStep","goToCheckoutStep","okToProceed","apiGetDeliveryInformation","apiGetPaymentMethods","tryToFinalizeOrder","apiGetShoppingCart","goToCheckoutStage","goToCheckoutStageAfterLogin","TryGetCityMatchingPostalCode","totalList","freeShipping","shippingCallToActionText","remainingAmount","handleGoToCheckout","CheckoutService.goToCheckoutStage","discountsList","discountCodeInputRef","handleDiscountInput","handleAddDiscountCode","handleRemoveDiscountCode","abortController","localQuantity","newQuantity","listPriceTotal","discountedPriceTotal","discountActive","validQuantity","increaseQuantity","decreaseQuantity","removeProduct","MOBILE_UPSELL_DISPLAY_TRESHOLD","INITIAL_LINE_ITEM_COUNT","MAX_CART_SIZE","inStockListElement","outOfStockListElement","mobileUpsellVisible","lineItemsInStock","currentCartSize","cartIsFull","topText","baseText","handleResetDiscountError","errorFiltered","retrievingCity","CheckoutService.goToCheckoutStep","handleBlur","errorMessages","handlePostalPlaceBlur","CheckoutService.TryGetCityMatchingPostalCode","handlePostalCodeInput","INITIAL_AMOUNT_VISIBLE","containerElement","visibleWindowsAmount","remainingHiddenWindows","visibleWindows","handleLoadMoreClick","handleDeliveryWindowClick","selectedIndex","comboElement","listboxElement","comboboxOpen","randomizedId","comboContainerElement","optionElements","activeIndex","SelectActions","getActionFromKey","menuOpen","altKey","ctrlKey","metaKey","getUpdatedIndex","currentIndex","maxIndex","updateMenuState","open","callFocus","isElementInView","bounding","isScrollable","maintainScrollVisibility","activeElement","scrollParent","offsetTop","parentOffsetHeight","scrollTop","isAbove","isBelow","onComboBlur","selectOption","onComboClick","onComboKeyDown","onOptionChange","onOptionClick","previousSearchQuery","selectedDeliveryLocation","comboboxOptions","searchInput","handleSearchInput","resetInput","handleSelectComboOption","deliveryAddress","postalCodeCity","selectedLocation","apiGetDeliveryLocations","comboBoxMapping","isSearchboxVisible","setDeliveryLocationById","toggleSearchboxVisibility","handleSetDeliveryMethod","displayDeliveryMethod","dialog","closeDialog","getHref","getOrigin","submitContainerElement","finalizePaymentErrorElement","handleSetPaymentOption","handlePersonIdentifierBlur","handleSetSelectedAfterpayMethod","listItem","setSelectedAfterpayInstallmentPlanByValue","OFFSET_TO_SHOW_PREVIOUSLY_COMPLETED_STEP","stepElements","newActiveStep","oldActiveStep","scrollToStep","stepElement","displayEditButton","buttonHeading","numberIndicator","handleClick","goToShoppingCart","accordion","icon","expandedAttribute","deliveryInformationStoreRef","steps","completedSteps","CheckoutService.submitDeliveryInformationForm","itemCountFormatted","subTotalFormatted","verificationSchema","resetPasswordEmailVerificationSchema","base64Js","byteLength","toByteArray","fromByteArray","revLookup","Arr","getLens","b64","validLen","placeHoldersLen","lens","_byteLength","curByte","tripletToBase64","encodeChunk","uint8","output","extraBytes","maxChunkLength","len2","ieee754","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","rt","base64","customInspectSymbol","Buffer","SlowBuffer","K_MAX_LENGTH","typedArraySupport","createBuffer","buf","encodingOrOffset","allocUnsafe","fromString","fromArrayView","isInstance","fromArrayBuffer","valueOf","fromObject","assertSize","alloc","fill","encoding","actual","fromArrayLike","arrayView","byteOffset","numberIsNaN","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","foundIndex","hexWrite","strLen","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","out","hexSliceLookupTable","newBuf","checkOffset","ext","noAssert","defineBigIntMethod","validateNumber","boundsError","checkInt","maxBytes","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","writeDouble","targetStart","E","sym","getMessage","Base","range","received","addNumericalSeparator","checkBounds","INVALID_BASE64_RE","base64clean","units","leadSurrogate","byteArray","dst","alphabet","i16","BufferBigIntNotDefined","credentials","resetPassword","fieldsetElement","verificationError","positiveFeedback","verificationInformationErrorsElement","verificationInformationErrors","currentVerificationStep","clearLoginInformationError","clearPositiveFeedback","apiLogin","apiResetPassword","successfulApiLogin","newCart","getItemsAddedFromVerification","CheckoutService.goToCheckoutStageAfterLogin","itemsBeforeVerification","itemsAfterVerification","newItem","existingItem","handleProceedAsGuest","handleProceedWithLogin","handleBackToVerification","handleResetPassword","initShoppingCart","_component_App","_normalizeProps","_guardReactiveProps","showDialog","SELECTED_THUMBNAIL_CLASS","OVERFLOW_HIDDEN_CLASS","INTERSECTION_THRESHOLD","SCROLL_LOGICAL_POSITION","ON_MOUNTED_SCROLL_BEHAVIOR","AFTER_MOUNTED_SCROLL_BEHAVIOR","FIRST_VIDEO_FRAME_PARAMETER","imageDtos","imageThumbnails","videoThumbnail","imageElements","intersectionObserver","addIntersectionObservers","handleIntersect","removeIntersectionObservers","intersectImage","imageDto","selectImageThumbnail","selectVideoThumbnail","preventBackgroundScroll","scrollToVideo","scrollToImage","handleClose","preventScroll","handleImageThumbnailClick","handleVideoThumbnailClick","imageElement","thumbnail","selectedThumbnail","imageThumbnail","resetImageThumbnails","resetVideoThumbnail","inBrowser","makeSymbol","shareable","generateFormatCacheKey","friendlyJSONstringify","json","isNumber","isEmptyObject","escapeHtml","rawText","join","incrementer","warn","isNotObjectOrIsArray","deepCopy","des","createPosition","line","column","createLocation","RE_ARGS","CompileWarnCodes","warnMessages","createCompileWarn","CompileErrorCodes","createCompileError","messages","defaultOnError","CHAR_SP","CHAR_CR","CHAR_LF","CHAR_LS","CHAR_PS","createScanner","_buf","_index","_line","_column","_peekOffset","isCRLF","isLF","isPS","isLS","isLineEnd","peekOffset","charAt","currentChar","currentPeek","peek","resetPeek","skipToPeek","EOF","DOT","LITERAL_DELIMITER","ERROR_DOMAIN$3","createTokenizer","_scnr","currentOffset","currentPosition","_initLoc","_initOffset","emitError","getToken","getEndToken","eat","scnr","peekSpaces","skipSpaces","isIdentifierStart","cc","isNumberStart","isNamedIdentifierStart","currentType","isListIdentifierStart","isLiteralStart","isLinkedDotStart","isLinkedModifierStart","isLinkedDelimiterStart","isLinkedReferStart","isTextStart","isPluralStart","detectModuloStart","spaces","hasSpace","detectModulo","takeChar","isIdentifier","takeIdentifierChar","isNamedIdentifier","takeNamedIdentifierChar","takeDigit","isHexDigit","takeHexDigit","getDigits","readModulo","readText","readNamedIdentifier","readListIdentifier","isLiteral","readLiteral","literal","readEscapeSequence","readUnicodeEscapeSequence","unicode","sequence","isInvalidIdentifier","readInvalidIdentifier","readLinkedModifier","readLinkedRefer","readPlural","plural","readTokenInPlaceholder","readTokenInLinked","validNamedIdentifier","validListIdentifier","validLiteral","readToken","isModulo","nextToken","startLoc","endLoc","ERROR_DOMAIN$2","KNOWN_ESCAPES","fromEscapeSequence","codePoint4","codePoint6","createParser","onWarn","tokenzer","emitWarn","startNode","endNode","parseText","tokenizer","parseList","parseNamed","parseLiteral","parseLinkedModifier","getTokenCaption","parseLinkedKey","parseLinked","linkedNode","nextContext","emptyLinkedKeyNode","parseMessage","startOffset","endOffset","parsePlural","msgNode","hasEmptyMessage","parseResource","createTransformer","ast","traverseNodes","transformer","traverseNode","optimize","optimizeMessageNode","ERROR_DOMAIN$1","minify","resource","cases","valueNode","linked","named","ERROR_DOMAIN","createCodeGenerator","sourceMap","filename","breakLineCode","_needIndent","_newline","withBreakLine","_breakLineCode","indent","withNewLine","level","deindent","newline","generateLinkedNode","helper","generateNode","generateMessageNode","needIndent","generatePluralNode","generateResource","generate","helpers","baseCompile","assignedOptions","jit","enalbeMinify","enambeOptimize","initFeatureFlags","pathStateMachine","literalValueRE","exp","stripQuotes","getPathCharType","formatSubPath","trimmed","subPathDepth","newChar","typeMap","maybeUnescapeQuote","nextChar","resolveWithKeyValue","resolveValue","DEFAULT_MODIFIER","DEFAULT_MESSAGE","DEFAULT_MESSAGE_DATA_TYPE","DEFAULT_NORMALIZE","DEFAULT_INTERPOLATE","pluralDefault","choice","choicesLength","getPluralIndex","normalizeNamed","pluralIndex","createMessageContext","pluralRule","orgPluralRule","_list","_named","_modifier","normalize","interpolate","arg1","arg2","modifier","devtools","setDevToolsHook","initI18nDevTools","i18n","translateDevTools","createDevToolsHook","payloads","code$1","inc$1","CoreWarnCodes","inc","CoreErrorCodes","createCoreError","getLocale","resolveLocale","_resolveLocale","fallbackWithSimple","fallbackWithLocaleChain","startLocale","DEFAULT_LOCALE","chain","block","appendBlockToChain","blocks","follow","appendLocaleToChain","appendItemToChain","VERSION","NOT_REOSLVED","MISSING_RESOLVE_VALUE","getDefaultLinkedModifiers","_compiler","registerMessageCompiler","compiler","_resolver","registerMessageResolver","resolver","_fallbacker","registerLocaleFallbacker","fallbacker","_additionalMeta","setAdditionalMeta","getAdditionalMeta","_fallbackContext","setFallbackContext","getFallbackContext","_cid","createCoreContext","fallbackLocale","datetimeFormats","numberFormats","pluralRules","missing","missingWarn","fallbackWarn","fallbackFormat","unresolving","postTranslation","processor","warnHtmlMessage","escapeParameter","messageCompiler","messageResolver","localeFallbacker","fallbackContext","internalOptions","__datetimeFormatters","__numberFormatters","__meta","handleMissing","updateFallbackLocale","isAlmostSameLocale","compareLocale","isImplicitFallback","targetLocale","locales","formatParts","formatMessageParts","_static","acm","formatMessagePart","linkedKey","linkedModifier","defaultOnCacheKey","compileCache","isMessageAST","detectError","baseCompile$1","compileToFunction","NOOP_MESSAGE_FUNCTION","isMessageFunction","translate","parseTranslateArgs","resolvedMessage","defaultMsgOrKey","enableDefaultMsg","escapeParams","formatScope","resolveMessageFormat","cacheBaseKey","occurred","compileMessageFormat","ctxOptions","getMessageContextOptions","msgContext","messaged","evaluateMessage","missingRet","getCompileContext","msgCtx","arg3","datetime","overrides","parseDateTimeArgs","datetimeFormat","formatter","DATETIME_FORMAT_OPTIONS_KEYS","arg4","dateTime","clearDateTimeFormat","parseNumberArgs","numberFormat","NUMBER_FORMAT_OPTIONS_KEYS","clearNumberFormat","I18nErrorCodes","createI18nError","TranslateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","InejctWithOptionSymbol","DisposeSymbol","handleFlatJson","subKeys","lastIndex","currentObj","hasStringValue","getLocaleMessages","__i18n","flatJson","getComponentOptions","adjustI18nResources","gl","componentOptions","createTextNode","DEVTOOLS_META","NOOP_RETURN_ARRAY","NOOP_RETURN_FALSE","composerID","defineCoreMissingHandler","getMetaInfo","createComposer","VueI18nLegacy","__root","__injectWithOption","_isGlobal","translateExistCompatible","_inheritLocale","_fallbackLocale","_messages","_datetimeFormats","_numberFormats","_missingWarn","_fallbackWarn","_fallbackRoot","_fallbackFormat","_missing","_runtimeMissing","_postTranslation","_warnHtmlMessage","_escapeParameter","_modifiers","_pluralRules","trackReactivityValues","getPostTranslationHandler","setPostTranslationHandler","getMissingHandler","setMissingHandler","wrapWithDeps","argumentParser","warnType","fallbackSuccess","fallbackFail","successCondition","translateVNode","numberParts","datetimeParts","setPluralRules","rules","te","getLocaleMessage","resolveMessages","targetLocaleMessages","messageValue","tm","setLocaleMessage","_message","mergeLocaleMessage","getDateTimeFormat","setDateTimeFormat","mergeDateTimeFormat","getNumberFormat","setNumberFormat","mergeNumberFormat","composer","convertComposerOptions","fallbackRoot","pluralizationRules","inheritLocale","sharedMessages","createVueI18n","__extender","vueI18n","baseFormatProps","getInterpolateArg","getFragmentableTag","TranslationImpl","useI18n","assignedAttrs","Translation","renderFormatter","slotKeys","partFormatter","NumberFormatImpl","NumberFormat","DatetimeFormatImpl","DatetimeFormat","getComposer$2","i18nInternal","vTDirective","_process","parsedValue","parseValue","makeParams","textContent","apply","pluginOptions","useI18nComponentName","defineMixin","vuei18n","optionsI18n","mergeToGlobal","_vueI18n","I18nInjectionKey","createI18n","__legacyMode","__globalInjection","__allowComposition","__instances","globalScope","__global","createGlobal","__getInstance","__setInstance","__deleteInstance","globalReleaseHandler","injectGlobalFields","getI18nInstance","getGlobalComposer","getScope","useI18nForLegacy","getComposer","composerOptions","setupLifeCycle","legacyMode","useComponent","getParentComponentInstance","_composer","dispose","isLocalScope","warpWithDeps","globalExportProps","globalExportMethods","_PropsMapper","PropsMapper","Root","apps","quickSearchEl","searchPageEl","categoryPageEl","productsModuleEls","cartStatusEl","miniCartEl","loyaltyDiscountBlockEls","CheckoutPageEl","imageZoomEl","addToCartFormEl","initApp","QuickSearch","SearchPage","ProductsModule","MiniCart","CartStatus","ImageZoom","discountBlockInit","CheckoutPage","addToCartForm","propsMapper","init18n","vueApp","translations","newKey","LoyaltyDiscount","HeaderBanner","NewsletterSignupSchema","NewsletterSignupForm","fieldWithError","errorMessageFormatted","HenryHeroBlockVideo","videoSource","sourceElement","mimeType","shouldUseMobileSource","EpiserverUploadReload","mutationsList","addedNode","showPorterbuddyWidget","addToCartFormComponent","PromotionTracking","VideoBlock","playVideo","modelData","ProductCarousel","labelContainer","memberDiscountLabel","discountLabel","createText","setProperty","varName","appendChild","createElement","Array2D","each","consumer","selectFrom","cssVar","plugins","resolvePlugins","by","indexOfParent","createPlugin","depends","splitText","splitOn","includePrevious","preserveWhitespace","allElements","wholeText","useSegmenter","splitEl","WORDS","wordPlugin","CHARS","charPlugin","word","Splitting","opts2","pluginBy","detectGrid","side","byNumber","linePlugin","itemPlugin","rowPlugin","columnPlugin","gridPlugin","LAYOUT","layoutPlugin","rows","columns","totalCells","cell","cellRowPlugin","rowCount","cellColumnPlugin","columnCount","cellPlugin","TopBand","currentScrollY","showPorterBuddyWidget","bambuser.init","customerClub.init","customerService.init","filter.init","gtmdata.init","jeansguide.init","inventory.init","popup.init","promotions.init","teaserblock.init","video.init","VimeoBlock","videoStructuredData.init","afterpay.init","splitting","HeroBlockHenryVideo","tabs.init","slickslide.init","delivery.init","captcha.init"],"mappings":";;;;;;;;;;;;iBAaE,SAAUA,EAAQC,EAAU,CAa5BC,EAAA,QAAiBF,EAAO,SACvBC,EAASD,EAAQ,EAAM,EACvB,SAAUG,EAAI,CACb,GAAK,CAACA,EAAE,SACP,MAAM,IAAI,MAAO,4CAElB,OAAOF,EAASE,EACpB,CAMA,GAAK,OAAO,OAAW,IAAc,OAASC,GAAM,SAAUC,EAAQC,EAAW,CAQjF,IAAIC,EAAM,CAAA,EAENC,EAAW,OAAO,eAElBC,EAAQF,EAAI,MAEZG,EAAOH,EAAI,KAAO,SAAUI,EAAQ,CACvC,OAAOJ,EAAI,KAAK,KAAMI,CAAK,CAC3B,EAAG,SAAUA,EAAQ,CACrB,OAAOJ,EAAI,OAAO,MAAO,CAAE,EAAEI,CAAK,CACnC,EAGIC,EAAOL,EAAI,KAEXM,EAAUN,EAAI,QAEdO,EAAa,CAAA,EAEbC,EAAWD,EAAW,SAEtBE,EAASF,EAAW,eAEpBG,EAAaD,EAAO,SAEpBE,EAAuBD,EAAW,KAAM,MAAM,EAE9CE,EAAU,CAAA,EAEVC,EAAa,SAAqBC,EAAM,CAS1C,OAAO,OAAOA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AAM,eAAgB6Z,EAAQ,EAG9B0sI,KACAvmJ,GAAM,oBAAqBoZ,EAAO,EAGlC1O,KAGA87I,KAEA,OAAO,MAAM,QAAUC,GAGvB,OAAO,MAAM,SAAWn8I,GAExB,OAAO,MAAM,UAAY,KACd,CACH,MAAO,IAAM,CACT,OAAO,SAAS,QACnB,CACT,GAGAw0I,GAAK,KAAI,EAIT,SAAS,mBAAqB,UAAY,CAClC,SAAS,aAAe,aACxB,SAAS,gBAAgB,UAAU,OAAO,OAAO,EACjD,SAAS,gBAAgB,UAAU,IAAI,IAAI,GAI/C3nJ,GAAE,kBAAkB,EAAE,KAAK,SAAU1b,EAAOwtB,EAAM,CAC9C,MAAMjW,EAAMmE,GAAE8R,CAAI,EAAE,KAAK,KAAK,EAC1BjW,GAAOA,EAAI,OAAS,GACpBmE,GAAE8R,CAAI,EAAE,KAAKjW,CAAG,CAE5B,CAAK,CACL","x_google_ignoreList":[0,2,6,7,8,9,10,11,13,41,50,51,52,53,56,79,80,83,89,90,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,239,273,274,275,282,283,284,285,297]}