{"version":3,"file":"app.js","sources":["../../../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","../../../node_modules/vue/dist/vue.runtime.esm-bundler.js","../../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../../node_modules/@vue/devtools-api/lib/esm/env.js","../../../node_modules/@vue/devtools-api/lib/esm/const.js","../../../node_modules/@vue/devtools-api/lib/esm/time.js","../../../node_modules/@vue/devtools-api/lib/esm/proxy.js","../../../node_modules/@vue/devtools-api/lib/esm/index.js","../../../node_modules/pinia/dist/pinia.mjs","../../../node_modules/primevue/utils/utils.esm.js","../../../node_modules/primevue/api/api.esm.js","../../../node_modules/primevue/config/config.esm.js","../../../node_modules/primevue/dynamicdialogeventbus/dynamicdialogeventbus.esm.js","../../../node_modules/primevue/usedialog/usedialog.esm.js","../../../node_modules/primevue/dialogservice/dialogservice.esm.js","../../../src/shared/utils/vue.ts","../../../src/data/util/Signal.ts","../../../src/data/Data.ts","../../../src/data/dao/offline/OfflineStorage.ts","../../../src/data/model/Enums.ts","../../../src/data/util/Config.ts","../../../src/data/services/AuthTokenService.ts","../../../src/data/services/CurrentAppService.ts","../../../src/data/services/CurrentIdentityService.ts","../../../src/data/services/CurrentLocationService.ts","../../../node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/uuid/dist/esm-browser/native.js","../../../node_modules/uuid/dist/esm-browser/v4.js","../../../src/data/services/UserSessionService.ts","../../../src/data/util/Misc.ts","../../../src/data/util/DateTime.ts","../../../src/shared/errors/RequestAbortError.ts","../../../src/data/dao/service/BaseServiceDao.ts","../../../src/data/dao/service/VoucherDao.ts","../../../node_modules/js-cookie/dist/js.cookie.mjs","../../../src/shared/utils/serialization.ts","../../../src/data/dao/offline/CookieCache.ts","../../../src/data/dao/service/LogsDao.ts","../../../src/data/util/Logging.ts","../../../src/shared/logging/errors.ts","../../../src/data/dao/offline/Html5LocalCache.ts","../../../src/data/dao/offline/FallbackCookieCache.ts","../../../src/data/dao/service/AuditDao.ts","../../../src/data/dao/service/AuthenticationDao.ts","../../../src/data/dao/service/BookingDao.ts","../../../src/shared/utils/format.ts","../../../src/data/util/Format.ts","../../../src/data/dao/service/PlanningDao.ts","../../../src/data/dao/service/RoomDao.ts","../../../src/data/dao/service/CatalogDao.ts","../../../src/data/dao/service/SystemDao.ts","../../../src/data/dao/service/TableDao.ts","../../../src/data/dao/service/UserDao.ts","../../../src/data/dao/service/LocationDao.ts","../../../src/data/dao/service/OrderDao.ts","../../../src/data/dao/service/CustomerDao.ts","../../../src/data/dao/service/DashboardDao.ts","../../../src/data/dao/service/DocumentDao.ts","../../../src/data/dao/service/FeedbackDao.ts","../../../src/data/dao/service/LogDao.ts","../../../src/data/dao/service/NotificationDao.ts","../../../src/data/dao/service/OperatorDao.ts","../../../src/data/dao/service/PrintDao.ts","../../../src/data/dao/service/ProfileDao.ts","../../../src/data/dao/service/SubscriptionDao.ts","../../../src/data/dao/service/SupportDao.ts","../../../src/data/dao/DaoServicesList.ts","../../../src/data/dao/Factory.ts","../../../src/shared/ui/FloatLabel.ts","../../../src/shared/ui/Ripple.ts","../../../src/shared/localization/language.ts","../../../src/app/localization/Trans.ts","../../../src/app/elements/PasswordInput.ts","../../../src/app/ui/Popup.ts","../../../src/app/PasswordReset.ts","../../../node_modules/@firebase/util/dist/index.esm2017.js","../../../node_modules/@firebase/component/dist/esm/index.esm2017.js","../../../node_modules/@firebase/logger/dist/esm/index.esm2017.js","../../../node_modules/idb/build/wrap-idb-value.js","../../../node_modules/idb/build/index.js","../../../node_modules/@firebase/app/dist/esm/index.esm2017.js","../../../node_modules/firebase/app/dist/esm/index.esm.js","../../../node_modules/@firebase/installations/dist/esm/index.esm2017.js","../../../node_modules/@firebase/messaging/dist/esm/index.esm2017.js","../../../src/data/util/OrderHelper.ts","../../../src/shared/logging/informations.ts","../../../src/shared/services/WindowFocusMonitor.ts","../../../src/shared/ui/Image.ts","../../../node_modules/@microsoft/signalr/dist/esm/Errors.js","../../../node_modules/@microsoft/signalr/dist/esm/HttpClient.js","../../../node_modules/@microsoft/signalr/dist/esm/ILogger.js","../../../node_modules/@microsoft/signalr/dist/esm/Loggers.js","../../../node_modules/@microsoft/signalr/dist/esm/Utils.js","../../../node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js","../../../node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js","../../../node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js","../../../node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js","../../../node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js","../../../node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js","../../../node_modules/@microsoft/signalr/dist/esm/Subject.js","../../../node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js","../../../node_modules/@microsoft/signalr/dist/esm/HubConnection.js","../../../node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js","../../../node_modules/@microsoft/signalr/dist/esm/HeaderNames.js","../../../node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js","../../../node_modules/@microsoft/signalr/dist/esm/ITransport.js","../../../node_modules/@microsoft/signalr/dist/esm/AbortController.js","../../../node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js","../../../node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js","../../../node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js","../../../node_modules/@microsoft/signalr/dist/esm/HttpConnection.js","../../../node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js","../../../node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js","../../../src/shared/localization/translations.ts","../../../src/components/websocket/ConnectionState.ts","../../../src/data/events/dataEvents.ts","../../../src/data/dao/socket/OperatorSocket.ts","../../../src/data/dao/socket/AppSocket.ts","../../../src/shared/utils/androidNativeUtils.ts","../../../src/app/events/appEvents.ts","../../../src/app/popups/SessionExpiredPopup.ts","../../../node_modules/hammerjs/hammer.js","../../../src/shared/ui/Helper.ts","../../../src/app/popover/BasePopover.ts","../../../src/app/popover/TableInfoPopover.ts","../../../src/app/popover/TableSelectionPopover.ts","../../../src/app/services/Allocation.ts","../../../src/data/util/JavascriptLoader.ts","../../../src/app/App.ts","../../../src/app/elements/StripeCardForm.ts","../../../src/app/ui/Helper.ts","../../../node_modules/@tweenjs/tween.js/dist/tween.esm.js","../../../src/app/ui/MomentumScroller.ts","../../../src/app/elements/PaymentMethodSelector.ts","../../../src/app/services/userCreditCardsService.ts","../../../src/app/services/windowHistoryService.ts","../../../src/app/util/PushNotificationsHelper.ts","../../../src/app/context/AppContext.ts","../../../node_modules/fingerprintjs2/fingerprint2.js","../../../src/shared/services/DeviceFingerprintProvider.ts","../../../src/shared/utils/mappers.ts","../../../src/app/ui/ExternalLogin.ts","../../../src/app/context/Identity.ts","../../../src/data/services/PaymentService.ts","../../../src/app/context/PayContext.ts","../../../src/app/controller/BaseController.ts","../../../src/app/util/CustomerFulfillmentHelper.ts","../../../src/app/elements/PendingFulfillmentButton.ts","../../../src/app/elements/RealtimeFulfillmentList.ts","../../../src/app/ui/LocationAddressPopup.ts","../../../src/app/util/DateTimeUtils.ts","../../../src/app/popover/FulfillmentPopover.ts","../../../src/app/services/AppCurrentAppService.ts","../../../src/app/services/AppCurrentIdentityService.ts","../../../src/app/services/AppCurrentLocationService.ts","../../../src/app/services/colors.ts","../../../src/app/ui/AddToHomeScreenPopup.ts","../../../src/app/ui/FulfillmentPushNotificationPopup.ts","../../../src/app/ui/Interactor.ts","../../../src/app/ui/NotificattionPermissionPopup.ts","../../../src/app/ui/Preloader.ts","../../../src/app/util/FirebaseHelper.ts","../../../node_modules/jsqr/dist/jsQR.js","../../../src/components/dialog/Overlay.ts","../../../src/app/ui/QrPermalinkCodeScanner.ts","../../../src/data/util/Validation.ts","../../../src/app/elements/EmailInput.ts","../../../src/app/popover/SigninPopover.ts","../../../src/app/elements/DateInput.ts","../../../node_modules/intl-tel-input/build/js/intlTelInput.js","../../../node_modules/intl-tel-input/index.js","../../../src/app/elements/PhoneNumberInput.ts","../../../src/app/popover/SignupPopover.ts","../../../src/app/ui/UserMenu.ts","../../../src/app/controller/AllocationController.ts","../../../src/app/elements/StarRating.ts","../../../src/app/controller/AppRateController.ts","../../../src/app/elements/PayButton.ts","../../../src/app/ui/LineItem.ts","../../../src/app/ui/PaidLineItem.ts","../../../src/app/ui/PullToRefresh.ts","../../../src/app/ui/OrderSummary.ts","../../../src/app/ui/ServicesIcon.ts","../../../src/app/controller/BillController.ts","../../../src/data/util/String.ts","../../../src/app/popover/MinimumAgePopover.ts","../../../src/app/controller/CartController.ts","../../../node_modules/compressorjs/dist/compressor.esm.js","../../../src/app/services/userCovidCerificateService.ts","../../../src/app/elements/CovidCertEncrypter.ts","../../../src/app/elements/CovidDataCompletion.ts","../../../src/app/popover/CovidSignupPopover.ts","../../../src/app/controller/CovidController.ts","../../../src/app/controller/CreditCardController.ts","../../../src/app/controller/DocumentsController.ts","../../../src/components/dialog/PopupContent.vue","../../../src/components/dialog/Popup.ts","../../../src/components/composables/rippleEffect.ts","../../../src/components/elements/VButton.vue","../../../src/components/payment/PrintBillPaymentReceiptButton.vue","../../../src/components/payment/PrintOrderPaymentReceiptButton.vue","../../../src/components/payment/SendBillPaymentReceiptButton.vue","../../../src/components/payment/SendOrderPaymentReceiptButton.vue","../../../src/components/payment/ReceiptActionButtons.vue","../../../src/components/payment/AppReceiptActionButtons.vue","../../../src/shared/utils/PaymentMethodUtil.ts","../../../src/components/elements/EmailInput.vue","../../../src/components/payment/BillPaymentReceiptPopover.vue","../../../src/app/popover/VueContentPopover.ts","../../../src/app/popover/SendPaymentReceiptPopover.ts","../../../src/app/controller/PaymentReceiptController.ts","../../../src/components/payment/OrderPaymentReceiptPopover.vue","../../../src/app/popover/SendOrderPrintReceiptPopover.ts","../../../src/app/controller/ReceiptController.ts","../../../src/app/elements/Toggle.ts","../../../src/app/components/payment/orderReceived/LocationSummary.vue","../../../src/app/components/payment/orderReceived/OrderReceivedHeader.vue","../../../src/app/components/payment/PaymentMethodIcon.vue","../../../src/app/components/payment/PaymentMethodIcons.vue","../../../src/app/components/payment/orderReceived/PaymentSummary.vue","../../../src/app/components/payment/orderReceived/PreorderPickupTimeSummary.vue","../../../src/app/components/payment/orderReceived/UseCaseSummary.vue","../../../src/app/components/payment/OrderReceivedPopover.vue","../../../src/app/popover/OrderReceivedPopover.ts","../../../src/app/components/payment/paymentReceived/PaymentReceivedHeader.vue","../../../src/app/components/payment/PaymentReceivedPopover.vue","../../../src/app/popover/PaymentReceivedPopover.ts","../../../src/app/popover/TextPopover.ts","../../../src/app/controller/DoneController.ts","../../../src/app/controller/HelpController.ts","../../../src/app/controller/OpenBillsController.ts","../../../src/app/elements/CategorySlider.ts","../../../node_modules/primevue/usestyle/usestyle.esm.js","../../../node_modules/primevue/base/style/basestyle.esm.js","../../../node_modules/primevue/badge/style/badgestyle.esm.js","../../../node_modules/primevue/basecomponent/basecomponent.esm.js","../../../node_modules/primevue/badge/badge.esm.js","../../../node_modules/primevue/baseicon/style/baseiconstyle.esm.js","../../../node_modules/primevue/baseicon/baseicon.esm.js","../../../node_modules/primevue/icons/spinner/index.esm.js","../../../node_modules/primevue/basedirective/basedirective.esm.js","../../../node_modules/primevue/ripple/style/ripplestyle.esm.js","../../../node_modules/primevue/ripple/ripple.esm.js","../../../node_modules/primevue/button/style/buttonstyle.esm.js","../../../node_modules/primevue/button/button.esm.js","../../../node_modules/primevue/icons/angledown/index.esm.js","../../../node_modules/primevue/icons/angleup/index.esm.js","../../../node_modules/primevue/inputtext/style/inputtextstyle.esm.js","../../../node_modules/primevue/inputtext/inputtext.esm.js","../../../node_modules/primevue/inputnumber/style/inputnumberstyle.esm.js","../../../node_modules/primevue/inputnumber/inputnumber.esm.js","../../../src/components/elements/CurrencyInput.vue","../../../src/app/elements/OptionGroup.ts","../../../src/app/elements/QuantityInput.ts","../../../src/app/popover/AddToCardPopover.ts","../../../src/app/controller/OrderController.ts","../../../src/app/controller/OrderHistoryController.ts","../../../src/components/vouchers/QrVoucherCodeScanner.ts","../../../src/components/vouchers/VoucherInput.vue","../../../src/components/vouchers/ApplyDiscountSection.vue","../../../src/app/elements/NumberInput.ts","../../../src/app/elements/QuickPaymentMethodSelector.ts","../../../src/app/elements/Slider.ts","../../../src/app/controller/PayController.ts","../../../src/app/controller/PaymentHistoryController.ts","../../../src/app/controller/PreorderTimeController.ts","../../../src/app/elements/AvatarInput.ts","../../../src/app/controller/ProfileController.ts","../../../src/app/controller/ReportIssueController.ts","../../../src/app/controller/RoomPlanController.ts","../../../src/app/controller/ServicesController.ts","../../../src/app/services/ControllerManager.ts","../../../src/app/TastierClient.ts","../../../src/app/controller/PayController_new.ts","../../../src/components/language/primevue/de.ts","../../../src/components/language/primevue/en.ts","../../../src/components/language/primevue/fr.ts","../../../src/components/language/primevue/it.ts","../../../src/components/language/primevue/primevueLocale.ts","../../../src/data/stores/tableAllocation.ts","../../../src/data/stores/identity.ts","../../../src/data/dao/socket/composables/appSocket.ts","../../../src/data/model/Bill.ts","../../../src/data/stores/bill.ts","../../../src/app/components/elements/AppButton.vue","../../../src/app/components/bill/RenameBillPopoverForm.vue","../../../src/app/popover/RenameBillPopover.ts","../../../src/data/stores/print.ts","../../../src/data/model/Operator.ts","../../../node_modules/primevue/portal/portal.esm.js","../../../node_modules/primevue/contextmenu/style/contextmenustyle.esm.js","../../../node_modules/primevue/icons/angleright/index.esm.js","../../../node_modules/primevue/contextmenu/contextmenu.esm.js","../../../src/components/tableAllocation/TableAllocationButtonContextMenu.vue","../../../src/components/tableAllocation/TableAllocationInfoButton.vue","../../../src/app/components/TableAllocationInfoButton.vue","../../../src/components/tableAllocation/TableNameLabel.vue","../../../src/app/components/TableNameLabel.vue","../../../src/data/stores/cart.ts","../../../node_modules/primevue/textarea/style/textareastyle.esm.js","../../../node_modules/primevue/textarea/textarea.esm.js","../../../src/components/cart/CartItemCommentEditor.vue","../../../src/app/components/cart/CartItemCommentEditorsContainer.vue","../../../node_modules/tabulator-tables/dist/js/tabulator_esm.js","../../../src/components/bill/OpenBillsList.vue","../../../src/components/layout/ScrollableView.vue","../../../src/app/views/OpenBillsView.vue","../../../src/app/components/TipSlider.vue","../../../src/components/pay/TipAndPayForm.vue","../../../src/components/pay/TipSummaryTable.vue","../../../src/app/views/PayView.vue","../../../node_modules/@vueuse/shared/index.mjs","../../../node_modules/primevue/icons/calendar/index.esm.js","../../../node_modules/primevue/icons/chevrondown/index.esm.js","../../../node_modules/primevue/icons/chevronleft/index.esm.js","../../../node_modules/primevue/icons/chevronright/index.esm.js","../../../node_modules/primevue/icons/chevronup/index.esm.js","../../../node_modules/primevue/overlayeventbus/overlayeventbus.esm.js","../../../node_modules/primevue/calendar/style/calendarstyle.esm.js","../../../node_modules/primevue/calendar/calendar.esm.js","../../../src/components/preorder/OrderDatePicker.vue","../../../node_modules/primevue/icons/filter/index.esm.js","../../../node_modules/primevue/icons/times/index.esm.js","../../../node_modules/primevue/virtualscroller/style/virtualscrollerstyle.esm.js","../../../node_modules/primevue/virtualscroller/virtualscroller.esm.js","../../../node_modules/primevue/dropdown/style/dropdownstyle.esm.js","../../../node_modules/primevue/dropdown/dropdown.esm.js","../../../src/components/preorder/OrderTimeDropdown.vue","../../../src/components/preorder/OrderDateTimeForm.vue","../../../src/components/preorder/PreorderTimeComponent.vue","../../../src/app/views/PreorderTimeView.vue","../../../src/app/views/ZoomableContainer.vue","../../../src/components/roomPlan/ChangeRoomList.vue","../../../src/components/roomPlan/RoomPlanTable.vue","../../../src/components/roomPlan/RoomPlanViewComponent.vue","../../../src/app/views/RoomPlanView.vue","../../../src/app/App.vue","../../../src/app/main.ts"],"sourcesContent":["/**\n* @vue/shared v3.5.13\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) {\n const map = /* @__PURE__ */ Object.create(null);\n for (const key of str.split(\",\")) map[key] = 1;\n return (val) => val in map;\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(\n (str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n }\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(\n (str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n }\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}\nfunction genCacheKey(source, options) {\n return source + JSON.stringify(\n options,\n (_, val) => typeof val === \"function\" ? val.toString() : val\n );\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 \"CACHED\": -1,\n \"-1\": \"CACHED\",\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,Symbol\";\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 if (!styles) return \"\";\n if (isString(styles)) return styles;\n let ret = \"\";\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);\nconst isKnownMathMLAttr = /* @__PURE__ */ makeMap(\n `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`\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 = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\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 getEscapedCssVarName(key, doubleEscape) {\n return key.replace(\n cssVarNameEscapeSymbolsRE,\n (s) => doubleEscape ? s === '\"' ? '\\\\\\\\\\\\\"' : `\\\\\\\\${s}` : `\\\\${s}`\n );\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, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, 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.5.13\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { hasChanged, extend, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, toRawType, capitalize, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, NOOP, remove } 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._isPaused = false;\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 pause() {\n if (this._active) {\n this._isPaused = true;\n let i, l;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].pause();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].pause();\n }\n }\n }\n /**\n * Resumes the effect scope, including all child scopes and effects.\n */\n resume() {\n if (this._active) {\n if (this._isPaused) {\n this._isPaused = false;\n let i, l;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].resume();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].resume();\n }\n }\n }\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 this._active = false;\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n this.effects.length = 0;\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n this.cleanups.length = 0;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n this.scopes.length = 0;\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 }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn, failSilently = false) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeSub;\nconst EffectFlags = {\n \"ACTIVE\": 1,\n \"1\": \"ACTIVE\",\n \"RUNNING\": 2,\n \"2\": \"RUNNING\",\n \"TRACKING\": 4,\n \"4\": \"TRACKING\",\n \"NOTIFIED\": 8,\n \"8\": \"NOTIFIED\",\n \"DIRTY\": 16,\n \"16\": \"DIRTY\",\n \"ALLOW_RECURSE\": 32,\n \"32\": \"ALLOW_RECURSE\",\n \"PAUSED\": 64,\n \"64\": \"PAUSED\"\n};\nconst pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nclass ReactiveEffect {\n constructor(fn) {\n this.fn = fn;\n /**\n * @internal\n */\n this.deps = void 0;\n /**\n * @internal\n */\n this.depsTail = void 0;\n /**\n * @internal\n */\n this.flags = 1 | 4;\n /**\n * @internal\n */\n this.next = void 0;\n /**\n * @internal\n */\n this.cleanup = void 0;\n this.scheduler = void 0;\n if (activeEffectScope && activeEffectScope.active) {\n activeEffectScope.effects.push(this);\n }\n }\n pause() {\n this.flags |= 64;\n }\n resume() {\n if (this.flags & 64) {\n this.flags &= ~64;\n if (pausedQueueEffects.has(this)) {\n pausedQueueEffects.delete(this);\n this.trigger();\n }\n }\n }\n /**\n * @internal\n */\n notify() {\n if (this.flags & 2 && !(this.flags & 32)) {\n return;\n }\n if (!(this.flags & 8)) {\n batch(this);\n }\n }\n run() {\n if (!(this.flags & 1)) {\n return this.fn();\n }\n this.flags |= 2;\n cleanupEffect(this);\n prepareDeps(this);\n const prevEffect = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = this;\n shouldTrack = true;\n try {\n return this.fn();\n } finally {\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub !== this) {\n warn(\n \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n );\n }\n cleanupDeps(this);\n activeSub = prevEffect;\n shouldTrack = prevShouldTrack;\n this.flags &= ~2;\n }\n }\n stop() {\n if (this.flags & 1) {\n for (let link = this.deps; link; link = link.nextDep) {\n removeSub(link);\n }\n this.deps = this.depsTail = void 0;\n cleanupEffect(this);\n this.onStop && this.onStop();\n this.flags &= ~1;\n }\n }\n trigger() {\n if (this.flags & 64) {\n pausedQueueEffects.add(this);\n } else if (this.scheduler) {\n this.scheduler();\n } else {\n this.runIfDirty();\n }\n }\n /**\n * @internal\n */\n runIfDirty() {\n if (isDirty(this)) {\n this.run();\n }\n }\n get dirty() {\n return isDirty(this);\n }\n}\nlet batchDepth = 0;\nlet batchedSub;\nlet batchedComputed;\nfunction batch(sub, isComputed = false) {\n sub.flags |= 8;\n if (isComputed) {\n sub.next = batchedComputed;\n batchedComputed = sub;\n return;\n }\n sub.next = batchedSub;\n batchedSub = sub;\n}\nfunction startBatch() {\n batchDepth++;\n}\nfunction endBatch() {\n if (--batchDepth > 0) {\n return;\n }\n if (batchedComputed) {\n let e = batchedComputed;\n batchedComputed = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= ~8;\n e = next;\n }\n }\n let error;\n while (batchedSub) {\n let e = batchedSub;\n batchedSub = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= ~8;\n if (e.flags & 1) {\n try {\n ;\n e.trigger();\n } catch (err) {\n if (!error) error = err;\n }\n }\n e = next;\n }\n }\n if (error) throw error;\n}\nfunction prepareDeps(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n link.version = -1;\n link.prevActiveLink = link.dep.activeLink;\n link.dep.activeLink = link;\n }\n}\nfunction cleanupDeps(sub) {\n let head;\n let tail = sub.depsTail;\n let link = tail;\n while (link) {\n const prev = link.prevDep;\n if (link.version === -1) {\n if (link === tail) tail = prev;\n removeSub(link);\n removeDep(link);\n } else {\n head = link;\n }\n link.dep.activeLink = link.prevActiveLink;\n link.prevActiveLink = void 0;\n link = prev;\n }\n sub.deps = head;\n sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n return true;\n }\n }\n if (sub._dirty) {\n return true;\n }\n return false;\n}\nfunction refreshComputed(computed) {\n if (computed.flags & 4 && !(computed.flags & 16)) {\n return;\n }\n computed.flags &= ~16;\n if (computed.globalVersion === globalVersion) {\n return;\n }\n computed.globalVersion = globalVersion;\n const dep = computed.dep;\n computed.flags |= 2;\n if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {\n computed.flags &= ~2;\n return;\n }\n const prevSub = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = computed;\n shouldTrack = true;\n try {\n prepareDeps(computed);\n const value = computed.fn(computed._value);\n if (dep.version === 0 || hasChanged(value, computed._value)) {\n computed._value = value;\n dep.version++;\n }\n } catch (err) {\n dep.version++;\n throw err;\n } finally {\n activeSub = prevSub;\n shouldTrack = prevShouldTrack;\n cleanupDeps(computed);\n computed.flags &= ~2;\n }\n}\nfunction removeSub(link, soft = false) {\n const { dep, prevSub, nextSub } = link;\n if (prevSub) {\n prevSub.nextSub = nextSub;\n link.prevSub = void 0;\n }\n if (nextSub) {\n nextSub.prevSub = prevSub;\n link.nextSub = void 0;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && dep.subsHead === link) {\n dep.subsHead = nextSub;\n }\n if (dep.subs === link) {\n dep.subs = prevSub;\n if (!prevSub && dep.computed) {\n dep.computed.flags &= ~4;\n for (let l = dep.computed.deps; l; l = l.nextDep) {\n removeSub(l, true);\n }\n }\n }\n if (!soft && !--dep.sc && dep.map) {\n dep.map.delete(dep.key);\n }\n}\nfunction removeDep(link) {\n const { prevDep, nextDep } = link;\n if (prevDep) {\n prevDep.nextDep = nextDep;\n link.prevDep = void 0;\n }\n if (nextDep) {\n nextDep.prevDep = prevDep;\n link.nextDep = void 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const e = new ReactiveEffect(fn);\n if (options) {\n extend(e, options);\n }\n try {\n e.run();\n } catch (err) {\n e.stop();\n throw err;\n }\n const runner = e.run.bind(e);\n runner.effect = e;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\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 onEffectCleanup(fn, failSilently = false) {\n if (activeSub instanceof ReactiveEffect) {\n activeSub.cleanup = fn;\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onEffectCleanup() was called when there was no active effect to associate with.`\n );\n }\n}\nfunction cleanupEffect(e) {\n const { cleanup } = e;\n e.cleanup = void 0;\n if (cleanup) {\n const prevSub = activeSub;\n activeSub = void 0;\n try {\n cleanup();\n } finally {\n activeSub = prevSub;\n }\n }\n}\n\nlet globalVersion = 0;\nclass Link {\n constructor(sub, dep) {\n this.sub = sub;\n this.dep = dep;\n this.version = dep.version;\n this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n }\n}\nclass Dep {\n constructor(computed) {\n this.computed = computed;\n this.version = 0;\n /**\n * Link between this dep and the current active effect\n */\n this.activeLink = void 0;\n /**\n * Doubly linked list representing the subscribing effects (tail)\n */\n this.subs = void 0;\n /**\n * For object property deps cleanup\n */\n this.map = void 0;\n this.key = void 0;\n /**\n * Subscriber counter\n */\n this.sc = 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.subsHead = void 0;\n }\n }\n track(debugInfo) {\n if (!activeSub || !shouldTrack || activeSub === this.computed) {\n return;\n }\n let link = this.activeLink;\n if (link === void 0 || link.sub !== activeSub) {\n link = this.activeLink = new Link(activeSub, this);\n if (!activeSub.deps) {\n activeSub.deps = activeSub.depsTail = link;\n } else {\n link.prevDep = activeSub.depsTail;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n }\n addSub(link);\n } else if (link.version === -1) {\n link.version = this.version;\n if (link.nextDep) {\n const next = link.nextDep;\n next.prevDep = link.prevDep;\n if (link.prevDep) {\n link.prevDep.nextDep = next;\n }\n link.prevDep = activeSub.depsTail;\n link.nextDep = void 0;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n if (activeSub.deps === link) {\n activeSub.deps = next;\n }\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub.onTrack) {\n activeSub.onTrack(\n extend(\n {\n effect: activeSub\n },\n debugInfo\n )\n );\n }\n return link;\n }\n trigger(debugInfo) {\n this.version++;\n globalVersion++;\n this.notify(debugInfo);\n }\n notify(debugInfo) {\n startBatch();\n try {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n for (let head = this.subsHead; head; head = head.nextSub) {\n if (head.sub.onTrigger && !(head.sub.flags & 8)) {\n head.sub.onTrigger(\n extend(\n {\n effect: head.sub\n },\n debugInfo\n )\n );\n }\n }\n }\n for (let link = this.subs; link; link = link.prevSub) {\n if (link.sub.notify()) {\n ;\n link.sub.dep.notify();\n }\n }\n } finally {\n endBatch();\n }\n }\n}\nfunction addSub(link) {\n link.dep.sc++;\n if (link.sub.flags & 4) {\n const computed = link.dep.computed;\n if (computed && !link.dep.subs) {\n computed.flags |= 4 | 16;\n for (let l = computed.deps; l; l = l.nextDep) {\n addSub(l);\n }\n }\n const currentTail = link.dep.subs;\n if (currentTail !== link) {\n link.prevSub = currentTail;\n if (currentTail) currentTail.nextSub = link;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && link.dep.subsHead === void 0) {\n link.dep.subsHead = link;\n }\n link.dep.subs = link;\n }\n}\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Object iterate\" : \"\"\n);\nconst MAP_KEY_ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Map keys iterate\" : \"\"\n);\nconst ARRAY_ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Array iterate\" : \"\"\n);\nfunction track(target, type, key) {\n if (shouldTrack && activeSub) {\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 = new Dep());\n dep.map = depsMap;\n dep.key = key;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.track({\n target,\n type,\n key\n });\n } else {\n dep.track();\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n globalVersion++;\n return;\n }\n const run = (dep) => {\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.trigger({\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n });\n } else {\n dep.trigger();\n }\n }\n };\n startBatch();\n if (type === \"clear\") {\n depsMap.forEach(run);\n } else {\n const targetIsArray = isArray(target);\n const isArrayIndex = targetIsArray && isIntegerKey(key);\n if (targetIsArray && key === \"length\") {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {\n run(dep);\n }\n });\n } else {\n if (key !== void 0 || depsMap.has(void 0)) {\n run(depsMap.get(key));\n }\n if (isArrayIndex) {\n run(depsMap.get(ARRAY_ITERATE_KEY));\n }\n switch (type) {\n case \"add\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isArrayIndex) {\n run(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n run(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n }\n endBatch();\n}\nfunction getDepFromReactive(object, key) {\n const depMap = targetMap.get(object);\n return depMap && depMap.get(key);\n}\n\nfunction reactiveReadArray(array) {\n const raw = toRaw(array);\n if (raw === array) return raw;\n track(raw, \"iterate\", ARRAY_ITERATE_KEY);\n return isShallow(array) ? raw : raw.map(toReactive);\n}\nfunction shallowReadArray(arr) {\n track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n return arr;\n}\nconst arrayInstrumentations = {\n __proto__: null,\n [Symbol.iterator]() {\n return iterator(this, Symbol.iterator, toReactive);\n },\n concat(...args) {\n return reactiveReadArray(this).concat(\n ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)\n );\n },\n entries() {\n return iterator(this, \"entries\", (value) => {\n value[1] = toReactive(value[1]);\n return value;\n });\n },\n every(fn, thisArg) {\n return apply(this, \"every\", fn, thisArg, void 0, arguments);\n },\n filter(fn, thisArg) {\n return apply(this, \"filter\", fn, thisArg, (v) => v.map(toReactive), arguments);\n },\n find(fn, thisArg) {\n return apply(this, \"find\", fn, thisArg, toReactive, arguments);\n },\n findIndex(fn, thisArg) {\n return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n },\n findLast(fn, thisArg) {\n return apply(this, \"findLast\", fn, thisArg, toReactive, arguments);\n },\n findLastIndex(fn, thisArg) {\n return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n },\n // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n forEach(fn, thisArg) {\n return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n },\n includes(...args) {\n return searchProxy(this, \"includes\", args);\n },\n indexOf(...args) {\n return searchProxy(this, \"indexOf\", args);\n },\n join(separator) {\n return reactiveReadArray(this).join(separator);\n },\n // keys() iterator only reads `length`, no optimisation required\n lastIndexOf(...args) {\n return searchProxy(this, \"lastIndexOf\", args);\n },\n map(fn, thisArg) {\n return apply(this, \"map\", fn, thisArg, void 0, arguments);\n },\n pop() {\n return noTracking(this, \"pop\");\n },\n push(...args) {\n return noTracking(this, \"push\", args);\n },\n reduce(fn, ...args) {\n return reduce(this, \"reduce\", fn, args);\n },\n reduceRight(fn, ...args) {\n return reduce(this, \"reduceRight\", fn, args);\n },\n shift() {\n return noTracking(this, \"shift\");\n },\n // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n some(fn, thisArg) {\n return apply(this, \"some\", fn, thisArg, void 0, arguments);\n },\n splice(...args) {\n return noTracking(this, \"splice\", args);\n },\n toReversed() {\n return reactiveReadArray(this).toReversed();\n },\n toSorted(comparer) {\n return reactiveReadArray(this).toSorted(comparer);\n },\n toSpliced(...args) {\n return reactiveReadArray(this).toSpliced(...args);\n },\n unshift(...args) {\n return noTracking(this, \"unshift\", args);\n },\n values() {\n return iterator(this, \"values\", toReactive);\n }\n};\nfunction iterator(self, method, wrapValue) {\n const arr = shallowReadArray(self);\n const iter = arr[method]();\n if (arr !== self && !isShallow(self)) {\n iter._next = iter.next;\n iter.next = () => {\n const result = iter._next();\n if (result.value) {\n result.value = wrapValue(result.value);\n }\n return result;\n };\n }\n return iter;\n}\nconst arrayProto = Array.prototype;\nfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n const arr = shallowReadArray(self);\n const needsWrap = arr !== self && !isShallow(self);\n const methodFn = arr[method];\n if (methodFn !== arrayProto[method]) {\n const result2 = methodFn.apply(self, args);\n return needsWrap ? toReactive(result2) : result2;\n }\n let wrappedFn = fn;\n if (arr !== self) {\n if (needsWrap) {\n wrappedFn = function(item, index) {\n return fn.call(this, toReactive(item), index, self);\n };\n } else if (fn.length > 2) {\n wrappedFn = function(item, index) {\n return fn.call(this, item, index, self);\n };\n }\n }\n const result = methodFn.call(arr, wrappedFn, thisArg);\n return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self, method, fn, args) {\n const arr = shallowReadArray(self);\n let wrappedFn = fn;\n if (arr !== self) {\n if (!isShallow(self)) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, toReactive(item), index, self);\n };\n } else if (fn.length > 3) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, item, index, self);\n };\n }\n }\n return arr[method](wrappedFn, ...args);\n}\nfunction searchProxy(self, method, args) {\n const arr = toRaw(self);\n track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n const res = arr[method](...args);\n if ((res === -1 || res === false) && isProxy(args[0])) {\n args[0] = toRaw(args[0]);\n return arr[method](...args);\n }\n return res;\n}\nfunction noTracking(self, method, args = []) {\n pauseTracking();\n startBatch();\n const res = toRaw(self)[method].apply(self, args);\n endBatch();\n resetTracking();\n return res;\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);\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 if (key === \"__v_skip\") return target[\"__v_skip\"];\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 let fn;\n if (targetIsArray && (fn = arrayInstrumentations[key])) {\n return fn;\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(\n target,\n key,\n // if this is a proxy wrapping a ref, return methods using the raw ref\n // as receiver so that we don't have to call `toRaw` on the ref in all\n // its class methods\n isRef(target) ? target : receiver\n );\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(\n target,\n key,\n value,\n isRef(target) ? target : receiver\n );\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(true);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\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(readonly, shallow) {\n const instrumentations = {\n get(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has } = getProto(rawTarget);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n if (has.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n },\n get size() {\n const target = this[\"__v_raw\"];\n !readonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n },\n has(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\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 },\n forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n !readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n }\n };\n extend(\n instrumentations,\n readonly ? {\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\")\n } : {\n add(value) {\n if (!shallow && !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 },\n set(key, value) {\n if (!shallow && !isShallow(value) && !isReadonly(value)) {\n value = toRaw(value);\n }\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get.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 },\n delete(key) {\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get ? get.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 },\n 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(\n target,\n \"clear\",\n void 0,\n void 0,\n oldTarget\n );\n }\n return result;\n }\n }\n );\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n instrumentations[method] = createIterableMethod(method, readonly, shallow);\n });\n return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n const instrumentations = createInstrumentations(isReadonly2, shallow);\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, has, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has.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 (!hasOwn(value, \"__v_skip\") && 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\nfunction isRef(r) {\n return r ? r[\"__v_isRef\"] === true : false;\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, isShallow2) {\n this.dep = new Dep();\n this[\"__v_isRef\"] = true;\n this[\"__v_isShallow\"] = false;\n this._rawValue = isShallow2 ? value : toRaw(value);\n this._value = isShallow2 ? value : toReactive(value);\n this[\"__v_isShallow\"] = isShallow2;\n }\n get value() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n });\n } else {\n this.dep.track();\n }\n return this._value;\n }\n set value(newValue) {\n const oldValue = this._rawValue;\n const useDirectValue = this[\"__v_isShallow\"] || isShallow(newValue) || isReadonly(newValue);\n newValue = useDirectValue ? newValue : toRaw(newValue);\n if (hasChanged(newValue, oldValue)) {\n this._rawValue = newValue;\n this._value = useDirectValue ? newValue : toReactive(newValue);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.trigger({\n target: this,\n type: \"set\",\n key: \"value\",\n newValue,\n oldValue\n });\n } else {\n this.dep.trigger();\n }\n }\n }\n}\nfunction triggerRef(ref2) {\n if (ref2.dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n ref2.dep.trigger({\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: ref2._value\n });\n } else {\n ref2.dep.trigger();\n }\n }\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) => key === \"__v_raw\" ? target : 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[\"__v_isRef\"] = true;\n this._value = void 0;\n const dep = this.dep = new Dep();\n const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._value = 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 this._value = void 0;\n }\n get value() {\n const val = this._object[this._key];\n return this._value = 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 this._value = void 0;\n }\n get value() {\n return this._value = 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\nclass ComputedRefImpl {\n constructor(fn, setter, isSSR) {\n this.fn = fn;\n this.setter = setter;\n /**\n * @internal\n */\n this._value = void 0;\n /**\n * @internal\n */\n this.dep = new Dep(this);\n /**\n * @internal\n */\n this.__v_isRef = true;\n // TODO isolatedDeclarations \"__v_isReadonly\"\n // A computed is also a subscriber that tracks other deps\n /**\n * @internal\n */\n this.deps = void 0;\n /**\n * @internal\n */\n this.depsTail = void 0;\n /**\n * @internal\n */\n this.flags = 16;\n /**\n * @internal\n */\n this.globalVersion = globalVersion - 1;\n /**\n * @internal\n */\n this.next = void 0;\n // for backwards compat\n this.effect = this;\n this[\"__v_isReadonly\"] = !setter;\n this.isSSR = isSSR;\n }\n /**\n * @internal\n */\n notify() {\n this.flags |= 16;\n if (!(this.flags & 8) && // avoid infinite self recursion\n activeSub !== this) {\n batch(this, true);\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\")) ;\n }\n get value() {\n const link = !!(process.env.NODE_ENV !== \"production\") ? this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n }) : this.dep.track();\n refreshComputed(this);\n if (link) {\n link.version = this.dep.version;\n }\n return this._value;\n }\n set value(newValue) {\n if (this.setter) {\n this.setter(newValue);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\"Write operation failed: computed value is readonly\");\n }\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n if (isFunction(getterOrOptions)) {\n getter = getterOrOptions;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.onTrack = debugOptions.onTrack;\n cRef.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\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 \"IS_REF\": \"__v_isRef\"\n};\n\nconst WatchErrorCodes = {\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};\nconst INITIAL_WATCHER_VALUE = {};\nconst cleanupMap = /* @__PURE__ */ new WeakMap();\nlet activeWatcher = void 0;\nfunction getCurrentWatcher() {\n return activeWatcher;\n}\nfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n if (owner) {\n let cleanups = cleanupMap.get(owner);\n if (!cleanups) cleanupMap.set(owner, cleanups = []);\n cleanups.push(cleanupFn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onWatcherCleanup() was called when there was no active watcher to associate with.`\n );\n }\n}\nfunction watch(source, cb, options = EMPTY_OBJ) {\n const { immediate, deep, once, scheduler, augmentJob, call } = options;\n const warnInvalidSource = (s) => {\n (options.onWarn || warn)(\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 reactiveGetter = (source2) => {\n if (deep) return source2;\n if (isShallow(source2) || deep === false || deep === 0)\n return traverse(source2, 1);\n return traverse(source2);\n };\n let effect;\n let getter;\n let cleanup;\n let boundCleanup;\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 call ? call(s, 2) : s();\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = call ? () => call(source, 2) : source;\n } else {\n getter = () => {\n if (cleanup) {\n pauseTracking();\n try {\n cleanup();\n } finally {\n resetTracking();\n }\n }\n const currentEffect = activeWatcher;\n activeWatcher = effect;\n try {\n return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n } finally {\n activeWatcher = currentEffect;\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 const depth = deep === true ? Infinity : deep;\n getter = () => traverse(baseGetter(), depth);\n }\n const scope = getCurrentScope();\n const watchHandle = () => {\n effect.stop();\n if (scope && scope.active) {\n remove(scope.effects, effect);\n }\n };\n if (once && cb) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n watchHandle();\n };\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = (immediateFirstRun) => {\n if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {\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))) {\n if (cleanup) {\n cleanup();\n }\n const currentWatcher = activeWatcher;\n activeWatcher = effect;\n try {\n const args = [\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 boundCleanup\n ];\n call ? call(cb, 3, args) : (\n // @ts-expect-error\n cb(...args)\n );\n oldValue = newValue;\n } finally {\n activeWatcher = currentWatcher;\n }\n }\n } else {\n effect.run();\n }\n };\n if (augmentJob) {\n augmentJob(job);\n }\n effect = new ReactiveEffect(getter);\n effect.scheduler = scheduler ? () => scheduler(job, false) : job;\n boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n cleanup = effect.onStop = () => {\n const cleanups = cleanupMap.get(effect);\n if (cleanups) {\n if (call) {\n call(cleanups, 4);\n } else {\n for (const cleanup2 of cleanups) cleanup2();\n }\n cleanupMap.delete(effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = options.onTrack;\n effect.onTrigger = options.onTrigger;\n }\n if (cb) {\n if (immediate) {\n job(true);\n } else {\n oldValue = effect.run();\n }\n } else if (scheduler) {\n scheduler(job.bind(null, true), true);\n } else {\n effect.run();\n }\n watchHandle.pause = effect.pause.bind(effect);\n watchHandle.resume = effect.resume.bind(effect);\n watchHandle.stop = watchHandle;\n return watchHandle;\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\nexport { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch };\n","/**\n* @vue/runtime-core v3.5.13\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, 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 \"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 \"APP_UNMOUNT_CLEANUP\": 16,\n \"16\": \"APP_UNMOUNT_CLEANUP\"\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 [16]: \"app unmount cleanup function\"\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 const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;\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 if (errorHandler) {\n pauseTracking();\n callWithErrorHandling(errorHandler, null, 10, [\n err,\n exposedInstance,\n errorInfo\n ]);\n resetTracking();\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n}\nfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\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 if (throwInProd) {\n throw err;\n } else {\n console.error(err);\n }\n}\n\nconst queue = [];\nlet flushIndex = -1;\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.flags & 2) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!(job.flags & 1)) {\n const jobId = getId(job);\n const lastJob = queue[queue.length - 1];\n if (!lastJob || // fast path when the job id is larger than the tail\n !(job.flags & 2) && jobId >= getId(lastJob)) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(jobId), 0, job);\n }\n job.flags |= 1;\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!currentFlushPromise) {\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (activePostFlushCbs && cb.id === -1) {\n activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n } else if (!(cb.flags & 1)) {\n pendingPostFlushCbs.push(cb);\n cb.flags |= 1;\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\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.flags & 2) {\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 if (cb.flags & 4) {\n cb.flags &= ~1;\n }\n cb();\n if (!(cb.flags & 4)) {\n cb.flags &= ~1;\n }\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.flags & 4) {\n cb.flags &= ~1;\n }\n if (!(cb.flags & 8)) cb();\n cb.flags &= ~1;\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\nfunction flushJobs(seen) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\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.flags & 8)) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n if (job.flags & 4) {\n job.flags &= ~1;\n }\n callWithErrorHandling(\n job,\n job.i,\n job.i ? 15 : 14\n );\n if (!(job.flags & 4)) {\n job.flags &= ~1;\n }\n }\n }\n } finally {\n for (; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job) {\n job.flags &= ~1;\n }\n }\n flushIndex = -1;\n queue.length = 0;\n flushPostFlushCbs(seen);\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n const count = seen.get(fn) || 0;\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 }\n seen.set(fn, count + 1);\n return false;\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.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 queueJob(() => {\n isHmrUpdating = true;\n instance.parent.update();\n isHmrUpdating = false;\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 if (instance.root.ce && instance !== instance.root) {\n instance.root.ce._removeChildStyle(oldComp);\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(\"component:added\" /* COMPONENT_ADDED */);\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(\"perf:start\" /* PERFORMANCE_START */);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\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 TeleportEndKey = Symbol(\"_vte\");\nconst isTeleport = (type) => type.__isTeleport;\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === \"\");\nconst isTeleportDeferred = (props) => props && (props.defer || props.defer === \"\");\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 mount = (container2, anchor2) => {\n if (shapeFlag & 16) {\n if (parentComponent && parentComponent.isCE) {\n parentComponent.ce._teleportTarget = container2;\n }\n mountChildren(\n children,\n container2,\n anchor2,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n };\n const mountToTarget = () => {\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 if (!disabled) {\n mount(target, targetAnchor);\n updateCssVars(n2, false);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && !disabled) {\n warn$1(\n \"Invalid Teleport target on mount:\",\n target,\n `(${typeof target})`\n );\n }\n };\n if (disabled) {\n mount(container, mainAnchor);\n updateCssVars(n2, true);\n }\n if (isTeleportDeferred(n2.props)) {\n queuePostRenderEffect(() => {\n mountToTarget();\n n2.el.__isMounted = true;\n }, parentSuspense);\n } else {\n mountToTarget();\n }\n } else {\n if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {\n queuePostRenderEffect(() => {\n TeleportImpl.process(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n internals\n );\n delete n1.el.__isMounted;\n }, parentSuspense);\n return;\n }\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 updateCssVars(n2, disabled);\n }\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 disabled = isTeleportDisabled(vnode.props);\n const targetNode = target._lpa || target.firstChild;\n if (vnode.shapeFlag & 16) {\n if (disabled) {\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, disabled);\n }\n return vnode.anchor && nextSibling(vnode.anchor);\n}\nconst Teleport = TeleportImpl;\nfunction updateCssVars(vnode, isDisabled) {\n const ctx = vnode.ctx;\n if (ctx && ctx.ut) {\n let node, anchor;\n if (isDisabled) {\n node = vnode.el;\n anchor = vnode.anchor;\n } else {\n node = vnode.targetStart;\n anchor = vnode.targetAnchor;\n }\n while (node && node !== anchor) {\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\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 const child = findNonCommentChild(children);\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 mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getInnerChild$1(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 if (innerChild.type !== Comment) {\n setTransitionHooks(innerChild, enterHooks);\n }\n let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);\n if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {\n let 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.job.flags & 8)) {\n instance.update();\n }\n delete leavingHooks.afterLeave;\n oldInnerChild = void 0;\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 oldInnerChild = void 0;\n };\n enterHooks.delayedLeave = () => {\n delayedLeave();\n delete enterHooks.delayedLeave;\n oldInnerChild = void 0;\n };\n };\n } else {\n oldInnerChild = void 0;\n }\n } else if (oldInnerChild) {\n oldInnerChild = void 0;\n }\n return child;\n };\n }\n};\nfunction findNonCommentChild(children) {\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 \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\")) break;\n }\n }\n }\n return child;\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 getInnerChild$1(vnode) {\n if (!isKeepAlive(vnode)) {\n if (isTeleport(vnode.type) && vnode.children) {\n return findNonCommentChild(vnode.children);\n }\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 vnode.transition = hooks;\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 // #8236: 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\nfunction useId() {\n const i = getCurrentInstance();\n if (i) {\n return (i.appContext.config.idPrefix || \"v\") + \"-\" + i.ids[0] + i.ids[1]++;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `useId() is called when there is no active component instance to be associated with.`\n );\n }\n return \"\";\n}\nfunction markAsyncBoundary(instance) {\n instance.ids = [instance.ids[0] + instance.ids[2]++ + \"-\", 0, 0];\n}\n\nconst knownTemplateRefs = /* @__PURE__ */ new WeakSet();\nfunction useTemplateRef(key) {\n const i = getCurrentInstance();\n const r = shallowRef(null);\n if (i) {\n const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;\n let desc;\n if (!!(process.env.NODE_ENV !== \"production\") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {\n warn$1(`useTemplateRef('${key}') already exists.`);\n } else {\n Object.defineProperty(refs, key, {\n enumerable: true,\n get: () => r.value,\n set: (val) => r.value = val\n });\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `useTemplateRef() is called when there is no active component instance to be associated with.`\n );\n }\n const ret = !!(process.env.NODE_ENV !== \"production\") ? readonly(r) : r;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n knownTemplateRefs.add(ret);\n }\n return ret;\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 if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {\n setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);\n }\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 const rawSetupState = toRaw(setupState);\n const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {\n warn$1(\n `Template ref \"${key}\" used on a non-ref value. It will not work in the production build.`\n );\n }\n if (knownTemplateRefs.has(rawSetupState[key])) {\n return false;\n }\n }\n return hasOwn(rawSetupState, key);\n };\n if (oldRef != null && oldRef !== ref) {\n if (isString(oldRef)) {\n refs[oldRef] = null;\n if (canSetSetupRef(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 ? canSetSetupRef(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 (canSetSetupRef(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 (canSetSetupRef(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\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 (container.nodeType !== 1) return void 0;\n if (isSVGContainer(container)) return \"svg\";\n if (isMathMLContainer(container)) return \"mathml\";\n return void 0;\n};\nconst isComment = (node) => node.nodeType === 8;\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) {\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 || 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 || domType === 3) {\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 ? 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 || 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) && !vnode.type.__asyncResolved) {\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) {\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(\n null,\n // no need check parentSuspense in hydration\n transition\n ) && 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 (!isMismatchAllowed(el, 1 /* CHILDREN */)) {\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 }\n const cur = next;\n next = next.nextSibling;\n remove(cur);\n }\n } else if (shapeFlag & 8) {\n let clientText = vnode.children;\n if (clientText[0] === \"\\n\" && (el.tagName === \"PRE\" || el.tagName === \"TEXTAREA\")) {\n clientText = clientText.slice(1);\n }\n if (el.textContent !== clientText) {\n if (!isMismatchAllowed(el, 0 /* TEXT */)) {\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 }\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 if (i + 1 < l && normalizeVNode(children[i + 1]).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 (!isMismatchAllowed(container, 1 /* CHILDREN */)) {\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 }\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 if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) {\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)` : isComment(node) && node.data === \"[\" ? `(start of fragment)` : ``,\n `\n- expected on client:`,\n vnode.type\n );\n logMismatchError();\n }\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 if (parentComponent) {\n parentComponent.vnode.el = vnode.el;\n updateHOCHostEl(parentComponent, vnode.el);\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 && node.tagName === \"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 = 2 /* CLASS */;\n 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 = 3 /* STYLE */;\n 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 = 4 /* ATTRIBUTE */;\n mismatchKey = key;\n }\n }\n if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {\n const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}=\"${v}\"`;\n const preSegment = `Hydration ${MismatchTypeString[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(\n `--${getEscapedCssVarName(key, false)}`,\n String(cssVars[key])\n );\n }\n }\n if (vnode === root && instance.parent) {\n resolveCssVars(instance.parent, instance.vnode, expectedMap);\n }\n}\nconst allowMismatchAttr = \"data-allow-mismatch\";\nconst MismatchTypeString = {\n [0 /* TEXT */]: \"text\",\n [1 /* CHILDREN */]: \"children\",\n [2 /* CLASS */]: \"class\",\n [3 /* STYLE */]: \"style\",\n [4 /* ATTRIBUTE */]: \"attribute\"\n};\nfunction isMismatchAllowed(el, allowedType) {\n if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) {\n while (el && !el.hasAttribute(allowMismatchAttr)) {\n el = el.parentElement;\n }\n }\n const allowedAttr = el && el.getAttribute(allowMismatchAttr);\n if (allowedAttr == null) {\n return false;\n } else if (allowedAttr === \"\") {\n return true;\n } else {\n const list = allowedAttr.split(\",\");\n if (allowedType === 0 /* TEXT */ && list.includes(\"children\")) {\n return true;\n }\n return allowedAttr.split(\",\").includes(MismatchTypeString[allowedType]);\n }\n}\n\nconst requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));\nconst cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));\nconst hydrateOnIdle = (timeout = 1e4) => (hydrate) => {\n const id = requestIdleCallback(hydrate, { timeout });\n return () => cancelIdleCallback(id);\n};\nfunction elementIsVisibleInViewport(el) {\n const { top, left, bottom, right } = el.getBoundingClientRect();\n const { innerHeight, innerWidth } = window;\n return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);\n}\nconst hydrateOnVisible = (opts) => (hydrate, forEach) => {\n const ob = new IntersectionObserver((entries) => {\n for (const e of entries) {\n if (!e.isIntersecting) continue;\n ob.disconnect();\n hydrate();\n break;\n }\n }, opts);\n forEach((el) => {\n if (!(el instanceof Element)) return;\n if (elementIsVisibleInViewport(el)) {\n hydrate();\n ob.disconnect();\n return false;\n }\n ob.observe(el);\n });\n return () => ob.disconnect();\n};\nconst hydrateOnMediaQuery = (query) => (hydrate) => {\n if (query) {\n const mql = matchMedia(query);\n if (mql.matches) {\n hydrate();\n } else {\n mql.addEventListener(\"change\", hydrate, { once: true });\n return () => mql.removeEventListener(\"change\", hydrate);\n }\n }\n};\nconst hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {\n if (isString(interactions)) interactions = [interactions];\n let hasHydrated = false;\n const doHydrate = (e) => {\n if (!hasHydrated) {\n hasHydrated = true;\n teardown();\n hydrate();\n e.target.dispatchEvent(new e.constructor(e.type, e));\n }\n };\n const teardown = () => {\n forEach((el) => {\n for (const i of interactions) {\n el.removeEventListener(i, doHydrate);\n }\n });\n };\n forEach((el) => {\n for (const i of interactions) {\n el.addEventListener(i, doHydrate, { once: true });\n }\n });\n return teardown;\n};\nfunction forEachElement(node, cb) {\n if (isComment(node) && node.data === \"[\") {\n let depth = 1;\n let next = node.nextSibling;\n while (next) {\n if (next.nodeType === 1) {\n const result = cb(next);\n if (result === false) {\n break;\n }\n } else if (isComment(next)) {\n if (next.data === \"]\") {\n if (--depth === 0) break;\n } else if (next.data === \"[\") {\n depth++;\n }\n }\n next = next.nextSibling;\n }\n } else {\n cb(node);\n }\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 hydrate: hydrateStrategy,\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 __asyncHydrate(el, instance, hydrate) {\n const doHydrate = hydrateStrategy ? () => {\n const teardown = hydrateStrategy(\n hydrate,\n (cb) => forEachElement(el, cb)\n );\n if (teardown) {\n (instance.bum || (instance.bum = [])).push(teardown);\n }\n } : hydrate;\n if (resolvedComp) {\n doHydrate();\n } else {\n load().then(() => !instance.isUnmounted && doHydrate());\n }\n },\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n markAsyncBoundary(instance);\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.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(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 current = 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 vnode.shapeFlag &= ~256;\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 pattern.lastIndex = 0;\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(\n \"bu\"\n);\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\n \"bum\"\n);\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\n \"sp\"\n);\nconst onRenderTriggered = createHook(\"rtg\");\nconst onRenderTracked = createHook(\"rtc\");\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 const sourceIsArray = isArray(source);\n if (sourceIsArray || isString(source)) {\n const sourceIsReactiveArray = sourceIsArray && isReactive(source);\n let needsWrap = false;\n if (sourceIsReactiveArray) {\n needsWrap = !isShallow(source);\n source = shallowReadArray(source);\n }\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(\n needsWrap ? toReactive(source[i]) : source[i],\n i,\n void 0,\n cached && cached[i]\n );\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.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {\n if (name !== \"default\") props.name = name;\n return openBlock(), createBlock(\n Fragment,\n null,\n [createVNode(\"slot\", props, fallback && fallback())],\n 64\n );\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 slotKey = 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;\n const rendered = createBlock(\n Fragment,\n {\n key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${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 $host: (i) => i.ce,\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\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 \n","import { createApp } from \"vue\";\n\nimport { translations } from \"@/shared/localization/translations\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\nimport PopupContent from \"@/components/dialog/PopupContent.vue\";\n\nexport interface IPopupSettings {\n message?: string;\n title?: string;\n confirmHandler?: { () };\n confirmButton?: string;\n cancelButton?: string;\n uniqueId?: string;\n highlightConfirm?: boolean;\n highlightCancel?: boolean;\n confirmBtnOnTheLeft?: boolean;\n containerClass?: string;\n cancelHandler?: { () };\n showConfirmButton?: boolean;\n closePopupOnOverlayClick?: boolean;\n\n component?: any; // Vue component as content\n componentProps?: Record; // Vue component as content props\n}\n\nexport class Popup {\n public $container!: JQuery;\n public $dim!: JQuery;\n public $popup!: JQuery;\n private $btns!: JQuery;\n\n private static popupCounter = 0;\n private popupId: string;\n private popupApp?: any;\n\n private constructor(settings: IPopupSettings, $parent: JQuery) {\n this.popupId = `popup-${Popup.popupCounter++}`;\n this.initializePopup(settings, $parent);\n }\n\n private initializePopup(settings: IPopupSettings, $parent: JQuery) {\n this.$container = $('
').appendTo($parent);\n if (settings.containerClass) {\n this.$container.addClass(settings.containerClass);\n }\n\n this.addDimOverlay(this.$container, $parent, settings.closePopupOnOverlayClick);\n\n // init popup with text\n this.$popup = $(\n `
`\n ).appendTo(this.$container);\n if (settings.title !== undefined) {\n $(`
${settings.title}
`).appendTo(this.$popup);\n }\n\n const $content = $(`
`).appendTo(this.$popup);\n\n if (settings.component) {\n const targetClass = `popup-content-target-${this.popupId}`;\n $(`
`).appendTo($content);\n\n this.popupApp = createApp(PopupContent, {\n component: settings.component,\n componentProps: settings.componentProps,\n targetClass: `.${targetClass}`, // pass unique selector\n });\n\n const mountPoint = $(\"
\").appendTo($content)[0];\n this.popupApp.mount(mountPoint);\n } else {\n $content.html(settings.message ?? \"\");\n }\n\n // init buttons\n const confirmLeftClass = settings.confirmBtnOnTheLeft ? \"confirm-left\" : \"\";\n\n const showConfirmButton = settings.showConfirmButton !== false;\n const showCancelButton = settings.cancelButton !== undefined;\n if (!showConfirmButton && !showCancelButton) return;\n\n this.$btns = $(`
`).appendTo(this.$popup);\n\n if (showCancelButton) {\n this.addCancelButton(\n settings.highlightConfirm,\n settings.cancelButton,\n settings.highlightCancel,\n settings.cancelHandler\n );\n }\n if (showConfirmButton) {\n this.addConfirmButton(settings.confirmHandler, settings.confirmButton, settings.highlightConfirm);\n }\n }\n\n private addDimOverlay($container: JQuery, $parent: JQuery, closePopupOnOverlayClick: boolean | undefined) {\n let $dim = $parent.find(\".popup-overlay:not(.before-close)\");\n if ($dim.length) {\n $dim.stop(true, false);\n this.$container.addClass(\"transparent-container\");\n } else {\n this.$dim = $('
').appendTo($container);\n $dim = this.$dim;\n }\n\n if (closePopupOnOverlayClick) {\n $dim.click(() => {\n if (this.$popup?.length) {\n this.close();\n }\n });\n }\n }\n\n private addCancelButton(\n highlightConfirm?: boolean,\n cancelButton?: string,\n highlightCancel?: boolean,\n cancelHandler?: { () }\n ) {\n const btnClass = highlightCancel === true ? \"orange\" : highlightConfirm === true ? \"\" : \"secondary\";\n const btnText = cancelButton === undefined ? translations.general.cancel : cancelButton;\n\n const $btn = $(``);\n $btn.appendTo(this.$btns);\n\n Ripple.bind($btn);\n $btn.click(() => {\n this.close();\n\n if (cancelHandler) {\n cancelHandler();\n }\n });\n }\n\n private addConfirmButton(confirmHandler?: { () }, confirmButton?: string, highlightConfirm?: boolean) {\n const btnClass = highlightConfirm ? \"orange\" : \"\";\n const btnText = confirmButton === undefined ? translations.general.ok : confirmButton;\n\n const $btn = $(``);\n $btn.appendTo(this.$btns);\n\n Ripple.bind($btn);\n $btn.click(() => {\n this.close();\n\n if (confirmHandler) {\n confirmHandler();\n }\n });\n }\n\n public close() {\n this.$popup.addClass(\"closing\");\n\n this.$popup.delay(600).queue((e) => {\n if (this.popupApp) {\n this.popupApp.unmount();\n }\n this.$popup.remove();\n this.$container.remove();\n e();\n });\n\n //check if dim needs to be removed\n if (!this.$dim) return;\n\n this.$dim.addClass(\"before-close\");\n\n const dim = this.$dim.delay(250).queue((c) => {\n dim.addClass(\"closing\")\n .delay(350)\n .queue((a) => {\n dim.remove();\n a();\n });\n\n c();\n });\n }\n\n public static show(settings: IPopupSettings, parent = $(\".app\")) {\n // check if popup with same uniqueId is already shown\n if (Popup.uniqueIdPopupAlreadyExists(settings.uniqueId, parent)) {\n return;\n }\n\n return new Popup(settings, parent);\n }\n\n private static uniqueIdPopupAlreadyExists(uniqueId: string | undefined, parent: JQuery) {\n return uniqueId !== undefined && parent.find(\".popup-window.\" + uniqueId).length !== 0;\n }\n}\n","import { type Ref, computed, onMounted, ref, watch } from \"vue\";\n\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\ntype RippleEffectConfig = {\n elementRef?: Ref;\n selector?: string;\n disabled?: Ref;\n animationDurationSec?: number;\n};\n\nexport default function useRippleEffect(config: RippleEffectConfig) {\n // define html refs\n const elementRef = config.elementRef || ref(null);\n const selector = config.selector || undefined;\n const disabled = config.disabled || ref(false);\n const animationDurationSec = config.animationDurationSec || 0.6;\n const jQueryElement = computed(() => $(elementRef.value as any));\n let isInitialized = false;\n\n function initialize() {\n Ripple.bind(jQueryElement.value, selector, animationDurationSec);\n isInitialized = true;\n }\n\n // define watch\n watch(\n () => disabled.value,\n (disabled) => {\n if (disabled) {\n Ripple.unbind(jQueryElement.value);\n } else {\n Ripple.bind(jQueryElement.value, selector, animationDurationSec);\n }\n }\n );\n\n // if element is there - initialize\n if (jQueryElement.value.length) {\n initialize();\n }\n\n // define onMounted\n onMounted(() => {\n if (!isInitialized && !disabled.value && jQueryElement.value.length) {\n initialize();\n }\n });\n\n return {\n elementRef,\n };\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n","import type { ICancellationPayment, ICancellationPositionPayment } from \"@/data/model/Cancellation\";\nimport { PaymentState } from \"@/data/model/Enums\";\nimport type { IPayment, IPaymentMethodSplit } from \"@/data/model/Order\";\nimport { Format } from \"@/data/util/Format\";\n\nimport type { PaymentMethodCell } from \"@/operator/controller/PaymentsController\";\n\nexport class PaymentMethodUtil {\n public static generatePaymentMethodDivIcon(unknownText: string, transaction: IPayment): string {\n if (transaction.brand != null && transaction.ccDigits != null) {\n return `
•••• ${transaction.ccDigits}${transaction.region !== undefined ? \" / \" + transaction.region : \"\"}
`;\n } else if (transaction.actualPaymentMethodImagePath != null && transaction.actualPaymentMethodImagePath != \"\") {\n return `
`;\n } else if (\n transaction.provider == null &&\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n return `
`;\n }\n\n // We want to use a fallback for online payment only when they are confirmed\n if (transaction.state == PaymentState.Confirmed) {\n if (transaction.customPaymentMethodImagePath != null && transaction.customPaymentMethodImagePath != \"\") {\n return `
`;\n }\n\n if (\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n return `
`;\n }\n }\n\n return '
' + unknownText + \"
\";\n }\n\n public static generatePaymentMethodSplitDivs(unknownText: string, transactions: IPaymentMethodSplit[]): string[] {\n const container = new Array();\n let voucherIconAppended = false;\n\n for (let i = 0; i < transactions.length; i++) {\n const transaction = transactions[i];\n\n if (transaction.code === \"Voucher\") {\n if (voucherIconAppended) {\n continue;\n } else {\n voucherIconAppended = true;\n }\n }\n\n if (transaction.brand != null && transaction.ccDigits != null) {\n container.push(\n `
•••• ${transaction.ccDigits}${transaction.region !== undefined ? \" / \" + transaction.region : \"\"}
`\n );\n } else if (\n transaction.actualPaymentMethodImagePath != null &&\n transaction.actualPaymentMethodImagePath != \"\"\n ) {\n container.push(\n `
`\n );\n } else if (\n transaction.provider == null &&\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n container.push(\n `
`\n );\n }\n // We want to use a fallback for online payment only when they are confirmed\n else if (transaction.state == PaymentState.Confirmed) {\n if (\n transaction.customPaymentMethodImagePath != null &&\n transaction.customPaymentMethodImagePath != \"\"\n ) {\n container.push(\n `
`\n );\n } else if (\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n container.push(\n `
`\n );\n }\n } else {\n container.push('
' + unknownText + \"
\");\n }\n }\n\n return container;\n }\n\n public static generatePaymentMethodDivIcon3(unknownText: string, transaction: ICancellationPayment): string {\n if (transaction.brand != null && transaction.ccDigits != null) {\n return `
•••• ${transaction.ccDigits}${transaction.region !== undefined ? \" / \" + transaction.region : \"\"}
`;\n } else if (transaction.actualPaymentMethodImagePath != null && transaction.actualPaymentMethodImagePath != \"\") {\n return `
`;\n } else if (\n transaction.provider == null &&\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n return `
`;\n } else if (transaction.customPaymentMethodImagePath != null && transaction.customPaymentMethodImagePath != \"\") {\n return `
`;\n }\n\n return '
' + unknownText + \"
\";\n }\n\n public static generatePaymentMethodDivIcon4(\n unknownText: string,\n transaction: ICancellationPositionPayment\n ): string {\n if (transaction.brand != null && transaction.ccDigits != null) {\n return `
•••• ${transaction.ccDigits}${transaction.region !== undefined ? \" / \" + transaction.region : \"\"}
`;\n } else if (transaction.actualPaymentMethodImagePath != null && transaction.actualPaymentMethodImagePath != \"\") {\n return `
`;\n } else if (\n transaction.provider == null &&\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n return `
`;\n } else if (transaction.customPaymentMethodImagePath != null && transaction.customPaymentMethodImagePath != \"\") {\n return `
`;\n }\n\n return '
' + unknownText + \"
\";\n }\n\n public static generatePaymentMethodDivIcon5(unknownText: string, transaction: PaymentMethodCell): string {\n if (transaction.brand != null && transaction.ccDigits != null) {\n return `
•••• ${transaction.ccDigits}${transaction.region !== undefined ? \" / \" + transaction.region : \"\"}
`;\n } else if (transaction.actualPaymentMethodImagePath != null && transaction.actualPaymentMethodImagePath != \"\") {\n return `
`;\n } else if (\n transaction.provider == null &&\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n return `
`;\n } else if (transaction.customPaymentMethodImagePath != null && transaction.customPaymentMethodImagePath != \"\") {\n return `
`;\n }\n\n // We want to use a fallback for online payment only when they are confirmed\n if (transaction.state == PaymentState.Confirmed) {\n if (\n transaction.predefinedPaymentMethodImagePath != null &&\n transaction.predefinedPaymentMethodImagePath != \"\"\n ) {\n return `
`;\n }\n }\n\n return '
' + unknownText + \"
\";\n }\n}\n","\n\n\n","\n\n\n\n\n","import type { Component } from \"vue\";\n\nimport { createVueComponent } from \"@/shared/utils/vue\";\n\nimport { BasePopover } from \"@/app/popover/BasePopover\";\n\nexport abstract class VueContentPopover extends BasePopover {\n protected componentInfo: any;\n\n constructor(options?: {\n title?: string;\n fullscreen?: boolean;\n uniqueId?: string;\n popoverClass?: string;\n flexHeight?: boolean;\n condensed?: boolean;\n }) {\n super(options?.title, options?.fullscreen, options?.uniqueId, options?.flexHeight, options?.condensed);\n\n if (options?.popoverClass) {\n this.$element.addClass(options.popoverClass);\n }\n }\n\n protected initComponent(component: T, props?: any) {\n this.componentInfo = createVueComponent(component, props ?? {}, this.$body[0]);\n }\n\n protected onShow() {}\n\n protected onHide() {\n this.componentInfo?.vueComponent?.unmount();\n this.destroy();\n }\n\n protected onDestroy() {}\n}\n","import { Popup } from \"@/components/dialog/Popup\";\nimport BillPaymentReceiptPopover from \"@/components/payment/BillPaymentReceiptPopover.vue\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { VueContentPopover } from \"@/app/popover/VueContentPopover\";\n\nexport class SendPaymentReceiptPopover extends VueContentPopover {\n constructor(paymentId: string) {\n super({ popoverClass: \"sendreceipt\", title: trans.receipt.receipt, fullscreen: false });\n\n const props = {\n paymentId: paymentId,\n locationId: TastierClient.context.currentAllocation!.locationId,\n userIsWaiter: TastierClient.identityContext?.isWaiterInCurrentLocation(),\n onSendReceiptSuccess: () => this.hide(),\n onPrintSuccess: () => {\n Popup.show({\n message: trans.receipt.receiptPrinted,\n confirmHandler: () => this.hide(),\n });\n },\n };\n this.initComponent(BillPaymentReceiptPopover, props);\n }\n}\n","import type { ICustomerPayment } from \"@/data/model/CustomerPayment\";\nimport type { ICustomerPaymentItem } from \"@/data/model/CustomerPayment\";\nimport type { IOrderItem } from \"@/data/model/Order\";\nimport { DateTime } from \"@/data/util/DateTime\";\nimport { Format } from \"@/data/util/Format\";\n\nimport { clientLanguage } from \"@/shared/localization/language\";\nimport { translations } from \"@/shared/localization/translations\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\nimport { PaymentMethodUtil } from \"@/shared/utils/PaymentMethodUtil\";\n\nimport { BaseController } from \"@/app/controller/BaseController\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { SendPaymentReceiptPopover } from \"@/app/popover/SendPaymentReceiptPopover\";\n\nexport interface IPaymentReceiptControllerTransitionData {\n payment: ICustomerPayment;\n}\n\nexport class PaymentReceiptController extends BaseController {\n public onGoBack?: { () };\n\n private readonly $scrollable: JQuery;\n\n private currentPayment?: ICustomerPayment;\n\n constructor() {\n super(\"receipt\");\n\n const hdr = $('
' + trans.receipt.payment + \"
\").appendTo(\n this.$view\n );\n Ripple.bind($(''))\n .prependTo(hdr)\n .click((e) => {\n e.preventDefault();\n if (this.onGoBack !== undefined) this.onGoBack();\n });\n\n this.$scrollable = $('
').appendTo(this.$view);\n\n Ripple.bind(\n $('
' + trans.receipt.receipt + \"
\")\n .appendTo(this.$view)\n .click((e) => {\n e.preventDefault();\n this.onSendReceipt();\n })\n );\n }\n\n protected onBecomeVisible(data: IPaymentReceiptControllerTransitionData) {\n this.currentPayment = data.payment;\n this.loadPayment();\n }\n\n protected onBecomeInvisible() {\n this.$view.find(\"> .head > .title\").html(trans.receipt.payment);\n\n this.currentPayment = undefined;\n }\n\n private renderPaymentItem(model: ICustomerPaymentItem): JQuery {\n const item = $('
').data(\"model\", model);\n const head = $('
').appendTo(item);\n\n head.append('
' + model.quantity + \"x
\");\n head.append(\n '
' +\n Format.htmlEscape(Format.translate(model.orderItem.name, clientLanguage())) +\n \"
\"\n );\n head.append(\n '
' +\n (model.orderItem.singlePrice === undefined || model.orderItem.singlePrice === 0\n ? \"\"\n : (model.orderItem.singlePrice * model.quantity).toFixed(2)) +\n \"
\"\n );\n\n this.recursiveAppendOptions(item, model.orderItem, model.quantity);\n\n return item;\n }\n private recursiveAppendOptions($container: JQuery, item: IOrderItem, multiplier: number) {\n if (item.options.length === 0) return;\n\n const subContainer = $('
').appendTo($container);\n\n for (const i in item.options) {\n const optionGroup = item.options[i];\n const groupContainer = $(\n '
' +\n Format.htmlEscape(Format.translate(optionGroup.name, clientLanguage())) +\n \"
\"\n ).appendTo(subContainer);\n const optionsContainer = $('
').appendTo(groupContainer);\n\n for (const ai in optionGroup.items) {\n const optionContainer = $('
').appendTo(optionsContainer);\n const optionHead = $('
').appendTo(optionContainer);\n\n const option = optionGroup.items[ai];\n const nextMultiplier = multiplier * option.quantity;\n\n optionHead.append(\n '
' +\n (option.quantity === 1 ? \"\" : '
' + option.quantity + \"x
\") +\n Format.htmlEscape(Format.translate(option.name, clientLanguage())) +\n \"
\"\n );\n optionHead.append(\n '
' +\n (option.singlePrice === 0 ? \"\" : (nextMultiplier * option.singlePrice).toFixed(2)) +\n \"
\"\n );\n\n this.recursiveAppendOptions(optionContainer, option, nextMultiplier);\n }\n }\n }\n\n private loadPayment() {\n if (this.currentPayment === undefined) return;\n\n this.$scrollable.empty();\n this.$scrollable.append(\n '
' + Format.htmlEscape(this.currentPayment.locationName) + \"
\"\n );\n if (this.currentPayment.confirmDate !== undefined) {\n const confirmDate = this.currentPayment.confirmDate ?? this.currentPayment.created;\n this.$scrollable.append(\n '
' +\n DateTime.toDateString(confirmDate) +\n \", \" +\n DateTime.toTimeString(confirmDate) +\n \"
\"\n );\n }\n\n const items = $('
').appendTo(this.$scrollable);\n\n for (const i in this.currentPayment.paymentItems) {\n this.renderPaymentItem(this.currentPayment.items[i]).appendTo(items);\n }\n\n const total = $('
').appendTo(this.$scrollable);\n const tip = this.currentPayment.tip ?? 0;\n total.append(\n '
' +\n translations.pay.consumption +\n '
CHF
' +\n (this.currentPayment.amount - tip).toFixed(2) +\n \"
\"\n );\n\n if (tip != null && tip !== 0)\n total.append(\n '
' +\n translations.pay.tip +\n '
CHF
' +\n tip.toFixed(2) +\n \"
\"\n );\n\n const paymentMethodDivs = PaymentMethodUtil.generatePaymentMethodSplitDivs(\n \"\",\n this.currentPayment.paymentMethodSplits\n );\n\n total.append(\n '
' +\n trans.receipt.total +\n \"
\" +\n paymentMethodDivs.join(\"\") +\n '
CHF
' +\n this.currentPayment.amount.toFixed(2) +\n \"
\"\n );\n }\n\n private onSendReceipt() {\n if (this.currentPayment === undefined) return;\n\n const popOver = new SendPaymentReceiptPopover(this.currentPayment.id);\n popOver.show();\n }\n}\n","\n\n\n\n\n","import { Popup } from \"@/components/dialog/Popup\";\nimport OrderPaymentReceiptPopover from \"@/components/payment/OrderPaymentReceiptPopover.vue\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { VueContentPopover } from \"@/app/popover/VueContentPopover\";\n\nexport class SendOrderPrintReceiptPopover extends VueContentPopover {\n constructor(orderId: string) {\n super({ popoverClass: \"sendreceipt\", title: trans.receipt.receipt, fullscreen: false });\n\n const props = {\n orderId: orderId,\n locationId: TastierClient.context.currentAllocation!.locationId,\n userIsWaiter: TastierClient.identityContext?.isWaiterInCurrentLocation(),\n onSendReceiptSuccess: () => this.hide(),\n onPrintSuccess: () => {\n Popup.show({\n message: trans.receipt.receiptPrinted,\n confirmHandler: () => this.hide(),\n });\n },\n };\n this.initComponent(OrderPaymentReceiptPopover, props);\n }\n}\n","import { Factory } from \"@/data/dao/Factory\";\nimport { CustomerDao } from \"@/data/dao/service/CustomerDao\";\nimport type { ICustomerOrder } from \"@/data/model/Customer\";\nimport { OrderState } from \"@/data/model/Enums\";\nimport type { IOrderItem } from \"@/data/model/Order\";\nimport { DateTime } from \"@/data/util/DateTime\";\nimport { Format } from \"@/data/util/Format\";\n\nimport { clientLanguage } from \"@/shared/localization/language\";\nimport { translations } from \"@/shared/localization/translations\";\nimport { logError } from \"@/shared/logging/errors\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { BaseController } from \"@/app/controller/BaseController\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { SendOrderPrintReceiptPopover } from \"@/app/popover/SendOrderPrintReceiptPopover\";\nimport { Popup } from \"@/app/ui/Popup\";\n\nexport interface IReceiptControllerTransitionData {\n order: ICustomerOrder;\n}\n\nexport class ReceiptController extends BaseController {\n public onGoBack?: { () };\n\n private $scrollable: JQuery;\n private $sendReceiptBtn: JQuery;\n\n private currentOrder?: ICustomerOrder;\n private abortController: AbortController;\n\n constructor() {\n super(\"receipt\");\n\n this.abortController = new AbortController();\n\n const hdr = $('
' + trans.receipt.title + \"
\").appendTo(\n this.$view\n );\n Ripple.bind($(''))\n .prependTo(hdr)\n .click((e) => {\n e.preventDefault();\n if (this.onGoBack !== undefined) this.onGoBack();\n });\n\n this.$scrollable = $('
').appendTo(this.$view);\n\n this.$sendReceiptBtn = Ripple.bind(\n $('
' + trans.receipt.receipt + \"
\")\n .appendTo(this.$view)\n .click(() => {\n this.onSendReceipt();\n })\n );\n }\n\n protected onBecomeVisible(data: IReceiptControllerTransitionData) {\n this.currentOrder = data.order;\n this.$view\n .find(\"> .head > .title\")\n .html(\n trans.receipt.title +\n \" \" +\n (data.order.dailyOrderIncrement == null ? data.order.orderNumber : data.order.dailyOrderIncrement)\n );\n this.loadOrder();\n }\n\n protected onBecomeInvisible() {\n this.$view.find(\"> .head > .title\").html(trans.receipt.title);\n this.abortController.abort();\n\n this.currentOrder = undefined;\n }\n\n private renderOrderItem(model: IOrderItem): JQuery {\n const item = $('
').data(\"model\", model);\n const head = $('
').appendTo(item);\n\n head.append('
' + model.quantity + \"x
\");\n head.append(\n '
' + Format.htmlEscape(Format.translate(model.name, clientLanguage())) + \"
\"\n );\n head.append(\n '
' +\n (model.singlePrice === 0 ? \"\" : (model.quantity * model.singlePrice).toFixed(2)) +\n \"
\"\n );\n\n this.recursiveAppendOptions(item, model, model.quantity);\n\n if (model.comment) {\n const comment = $('
').appendTo(item);\n comment.append('
' + Format.htmlEscape(model.comment.text) + \"
\");\n\n if (TastierClient.identityContext.isWaiterOrAdmin()) {\n comment.addClass(\"operator-comment\");\n }\n }\n\n return item;\n }\n\n private recursiveAppendOptions($container: JQuery, item: IOrderItem, multiplier: number) {\n if (item.options.length === 0) return;\n\n const subContainer = $('
').appendTo($container);\n\n for (const i in item.options) {\n const optionGroup = item.options[i];\n\n const groupContainer = $(\n '
' +\n Format.htmlEscape(Format.translate(optionGroup.name, clientLanguage())) +\n \"
\"\n ).appendTo(subContainer);\n const optionsContainer = $('
').appendTo(groupContainer);\n\n for (const ai in optionGroup.items) {\n const optionContainer = $('
').appendTo(optionsContainer);\n const optionHead = $('
').appendTo(optionContainer);\n\n const option = optionGroup.items[ai];\n const nextMultiplier = multiplier * option.quantity;\n\n optionHead.append(\n '
' +\n (option.quantity === 1 ? \"\" : '
' + option.quantity + \"x
\") +\n Format.htmlEscape(Format.translate(option.name, clientLanguage())) +\n \"
\"\n );\n optionHead.append(\n '
' +\n (option.singlePrice === 0 ? \"\" : (nextMultiplier * option.singlePrice).toFixed(2)) +\n \"
\"\n );\n\n this.recursiveAppendOptions(optionContainer, option, nextMultiplier);\n }\n }\n }\n\n private async loadOrder() {\n if (this.currentOrder === undefined) return;\n\n this.$scrollable.empty();\n this.$scrollable.append(\n '
' + Format.htmlEscape(this.currentOrder.locationName) + \"
\"\n );\n this.$scrollable.append(\n '
' +\n DateTime.toDateString(this.currentOrder.date) +\n \", \" +\n DateTime.toTimeString(this.currentOrder.date) +\n \"
\"\n );\n const loader = $('
' + trans.receipt.loading + \"
\").appendTo(\n this.$scrollable\n );\n\n try {\n const order = await Factory.getInstance(CustomerDao).getOrder(\n this.currentOrder.id,\n this.abortController.signal\n );\n\n loader.remove();\n\n if (order.payLater || order.state === OrderState.NotPaid || order.consumption <= 0) {\n this.$sendReceiptBtn.hide();\n } else {\n this.$sendReceiptBtn.show();\n }\n\n const items = $('
').appendTo(this.$scrollable);\n\n for (const i in order.items) this.renderOrderItem(order.items[i]).appendTo(items);\n\n const total = $('
').appendTo(this.$scrollable);\n total.append(\n '
' +\n translations.pay.consumption +\n '
CHF
' +\n this.currentOrder!.consumption.toFixed(2) +\n \"
\"\n );\n if (this.currentOrder!.tip !== 0)\n total.append(\n '
' +\n translations.pay.tip +\n '
CHF
' +\n this.currentOrder!.tip.toFixed(2) +\n \"
\"\n );\n\n total.append(\n '
' +\n trans.receipt.total +\n '
CHF
' +\n (this.currentOrder!.consumption + this.currentOrder!.tip).toFixed(2) +\n \"
\"\n );\n } catch (ex) {\n logError(ex);\n loader.remove();\n\n Popup.show(\"Failed to load order.\", () => {\n this.abortController.abort();\n\n if (this.onGoBack !== undefined) this.onGoBack();\n });\n }\n }\n\n private onSendReceipt() {\n if (this.currentOrder === undefined) return;\n\n const popOver = new SendOrderPrintReceiptPopover(this.currentOrder.id);\n popOver.show();\n }\n}\n","export class Toggle {\n private $element: JQuery;\n public onChange?: { () };\n\n constructor() {\n this.$element = $('
');\n this.$element.click((e) => {\n e.preventDefault();\n this.setValue(!this.getValue());\n\n if (this.onChange !== undefined) this.onChange();\n });\n }\n\n public getValue(): boolean {\n return this.$element.hasClass(\"active\");\n }\n\n public setValue(val: boolean): Toggle {\n if (val) this.$element.addClass(\"active\");\n else this.$element.removeClass(\"active\");\n\n return this;\n }\n\n public appendTo($element: JQuery): Toggle {\n this.$element.appendTo($element);\n\n return this;\n }\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { IOrderPaymentConfirmation } from \"@/data/model/Customer\";\nimport type { IOrderUseCase } from \"@/data/model/OrderUseCase\";\nimport type { ITableAllocation } from \"@/data/model/Table\";\n\nimport { logError } from \"@/shared/logging/errors\";\nimport type { VueComponentInstance } from \"@/shared/utils/vue\";\n\nimport { Popup } from \"@/components/dialog/Popup\";\n\nimport OrderReceivedPopoverComponent from \"@/app/components/payment/OrderReceivedPopover.vue\";\nimport { VueContentPopover } from \"@/app/popover/VueContentPopover\";\n\nexport class OrderReceivedPopover extends VueContentPopover {\n public onStartOver?: { () };\n public onReceiptAndMore?: { () };\n\n constructor(options: {\n confirmation: IOrderPaymentConfirmation;\n isWaiterOrAdmin: boolean;\n allocation: ITableAllocation | undefined;\n orderUseCase: IOrderUseCase | undefined;\n showReceiptActionsForOperator: boolean;\n }) {\n super({ popoverClass: \"order-received-popover\", flexHeight: true, condensed: true });\n\n try {\n const props = {\n confirmation: options.confirmation,\n isWaiterOrAdmin: options.isWaiterOrAdmin,\n allocation: options.allocation,\n orderUseCase: options.orderUseCase,\n showReceiptActionsForOperator: options.showReceiptActionsForOperator,\n hide: () => this.hide(),\n updateBodyHeight: () => this.updateBodyHeight(),\n onStartOver: () => {\n if (this.onStartOver) {\n this.onStartOver();\n }\n },\n onReceiptAndMore: () => {\n if (this.onReceiptAndMore) {\n this.onReceiptAndMore();\n }\n },\n };\n this.initComponent(OrderReceivedPopoverComponent, props);\n } catch (ex) {\n logError(ex);\n Popup.show({ message: \"Error showing done popover\" });\n this.hide();\n }\n }\n\n public refreshUseCaseSection() {\n const component = this.componentInfo?.mountedComponent as VueComponentInstance;\n component?.refreshUseCaseSection();\n }\n}\n","\n\n\n\n\n","\n\n\n\n\n","import type { IOrderPaymentConfirmation } from \"@/data/model/Customer\";\n\nimport { logError } from \"@/shared/logging/errors\";\n\nimport { Popup } from \"@/components/dialog/Popup\";\n\nimport PaymentReceivedPopoverComponent from \"@/app/components/payment/PaymentReceivedPopover.vue\";\nimport { VueContentPopover } from \"@/app/popover/VueContentPopover\";\n\nexport class PaymentReceivedPopover extends VueContentPopover {\n public onStartOver?: { () };\n public onReceiptAndMore?: { () };\n\n constructor(options: {\n confirmation: IOrderPaymentConfirmation;\n isWaiterOrAdmin: boolean;\n showReceiptActionsForOperator: boolean;\n }) {\n super({ popoverClass: \"payment-received-popover\", flexHeight: true, condensed: true });\n\n try {\n const props = {\n confirmation: options.confirmation,\n isWaiterOrAdmin: options.isWaiterOrAdmin,\n showReceiptActionsForOperator: options.showReceiptActionsForOperator,\n hide: () => this.hide(),\n updateBodyHeight: () => this.updateBodyHeight(),\n onStartOver: () => {\n if (this.onStartOver) {\n this.onStartOver();\n }\n },\n onReceiptAndMore: () => {\n if (this.onReceiptAndMore) {\n this.onReceiptAndMore();\n }\n },\n };\n this.initComponent(PaymentReceivedPopoverComponent, props);\n } catch (ex) {\n logError(ex);\n Popup.show({ message: \"Error showing done popover\" });\n this.hide();\n }\n }\n}\n","import { trans } from \"@/app/localization/Trans\";\nimport { BasePopover } from \"@/app/popover/BasePopover\";\n\nexport class TextPopover extends BasePopover {\n constructor(inner: JQuery) {\n super(undefined, false);\n\n this.$element.addClass(\"text\");\n\n $('\")\n .appendTo(inner)\n .click(() => {\n this.hide();\n });\n\n this.$body.append(inner);\n }\n\n protected onShow() {}\n\n protected onHide() {\n this.destroy();\n }\n\n protected onDestroy() {}\n\n public static showFor(title: string, text: string, btnHandle?: { () }, hideIfOthersAppear?: boolean) {\n const bd = $('

' + title + \"

\" + text + \"

\");\n const s = new TextPopover(bd);\n\n if (hideIfOthersAppear !== undefined && hideIfOthersAppear === true) s.setHideIfOtherAppears(true);\n\n if (btnHandle !== undefined) s.onClosed = () => btnHandle();\n\n s.show();\n }\n\n public hideExisting() {}\n}\n","import { ref } from \"vue\";\n\nimport { Factory } from \"@/data/dao/Factory\";\nimport type { DaoError } from \"@/data/dao/service/BaseServiceDao\";\nimport { CustomerDao } from \"@/data/dao/service/CustomerDao\";\nimport type { IOrderPaymentConfirmation } from \"@/data/model/Customer\";\nimport { PaymentFor } from \"@/data/model/Enums\";\nimport { shouldShowReceiptActionsForOperator } from \"@/data/services/PaymentService\";\nimport { exceptionTypes } from \"@/data/util/Config\";\nimport { Format } from \"@/data/util/Format\";\n\nimport { translations } from \"@/shared/localization/translations\";\nimport { logError } from \"@/shared/logging/errors\";\nimport { FloatLabel } from \"@/shared/ui/FloatLabel\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\nimport { createVueComponent } from \"@/shared/utils/vue\";\nimport { createEmptyDiv } from \"@/shared/utils/vue\";\n\nimport AppReceiptActionButtons from \"@/components/payment/AppReceiptActionButtons.vue\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { ViewTransition } from \"@/app/controller/BaseController\";\nimport { BaseController } from \"@/app/controller/BaseController\";\nimport {\n type IPaymentReceiptControllerTransitionData,\n PaymentReceiptController,\n} from \"@/app/controller/PaymentReceiptController\";\nimport { type IReceiptControllerTransitionData, ReceiptController } from \"@/app/controller/ReceiptController\";\nimport { EmailInput } from \"@/app/elements/EmailInput\";\nimport { PasswordInput } from \"@/app/elements/PasswordInput\";\nimport { Toggle } from \"@/app/elements/Toggle\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { OrderReceivedPopover } from \"@/app/popover/OrderReceivedPopover\";\nimport { PaymentReceivedPopover } from \"@/app/popover/PaymentReceivedPopover\";\nimport { TextPopover } from \"@/app/popover/TextPopover\";\nimport { Helper } from \"@/app/ui/Helper\";\nimport { Popup } from \"@/app/ui/Popup\";\nimport { UserMenu } from \"@/app/ui/UserMenu\";\n\nexport interface IDoneControllerTransitionData {\n transactionId?: string;\n confirmation?: IOrderPaymentConfirmation;\n}\n\nexport class DoneController extends BaseController {\n public onStartOver!: { () };\n public onPopoverBecameVisible?: { () };\n\n private receiptController?: ReceiptController;\n private paymentReceiptController?: PaymentReceiptController;\n\n private $head?: JQuery;\n private emailInput?: EmailInput;\n private $headLine?: JQuery;\n private $state?: JQuery;\n private $signupForm?: JQuery;\n private $passwordRow?: JQuery;\n private passwordInput?: PasswordInput;\n private $firstNameRow?: JQuery;\n private $firstNameInput?: JQuery;\n private $lastNameRow?: JQuery;\n private $lastNameInput?: JQuery;\n private onlyReceiptToggle?: Toggle;\n private $socialLogins?: JQuery;\n private $disclaimer?: JQuery;\n private $displayOrder?: JQuery;\n private $mainContainer?: JQuery;\n private $onlyReceiptSection?: JQuery; // only receipt section is shown only if payment was not pay later and user is not waiter\n private $paymentState?: JQuery;\n\n private cancelLongpoll = false;\n private transactionId?: string;\n private confirmation?: IOrderPaymentConfirmation;\n public userMenu?: UserMenu;\n private currentOffset = 0;\n private entriesPerPage = 1;\n private wasPayLater?: boolean;\n private emailRef = ref();\n\n private $doneBtn?: JQuery;\n private paymentFor?: PaymentFor;\n\n public $popover?: PaymentReceivedPopover | OrderReceivedPopover;\n\n private customerDao: CustomerDao;\n\n constructor() {\n super(\"done\");\n this.customerDao = Factory.getInstance(CustomerDao);\n }\n\n protected onBecomeVisible(data?: IDoneControllerTransitionData) {\n if (data == null) {\n return;\n }\n\n this.cancelLongpoll = false;\n\n // we provide either transactionId or confirmation\n if (data.transactionId !== undefined) {\n this.transactionId = data.transactionId;\n this.confirmation = undefined;\n this.setValidatingTransaction();\n return;\n }\n\n // we provide confirmation\n const confirmation = data.confirmation!;\n this.transactionId = undefined;\n this.confirmation = confirmation;\n this.wasPayLater = confirmation.isPayLater;\n this.paymentFor = confirmation.paymentFor;\n\n if (confirmation.isConfirmed === true) {\n this.showConfirmationPopover({ confirmation, focusEmailInput: true });\n\n this.setSuccess(confirmation);\n } else if (confirmation.isConfirmed === false) {\n this.setFailed(confirmation.error);\n }\n }\n\n private showConfirmationPopover(options: { confirmation: IOrderPaymentConfirmation; focusEmailInput?: boolean }) {\n // rewrite values to variables before disposing context\n const confirmation = options.confirmation;\n const isWaiterOrAdmin = TastierClient.identityContext.isWaiterOrAdmin();\n const allocation = TastierClient.context.currentAllocation;\n const useCase = Helper.getUseCaseByOrderOrOfferServiceId(options.confirmation.orderServiceId);\n\n const showReceiptActionsForOperator = shouldShowReceiptActionsForOperator({\n confirmation: confirmation,\n isWaiter: isWaiterOrAdmin,\n orderServices: Helper.getAvailableOrderOrOfferServices(),\n paymentServices: Helper.getAvailablePaymentServices(),\n });\n\n // NOTE - this part disposes DoneController and app context, e.g. allocation is refreshed\n // we need to save required values before disposing context\n if (isWaiterOrAdmin && !showReceiptActionsForOperator && !options.confirmation.isPayLater) {\n if (this.onStartOver) {\n this.onStartOver();\n }\n }\n\n setTimeout(() => {\n const popover =\n confirmation.paymentFor === PaymentFor.Bill\n ? new PaymentReceivedPopover({\n confirmation,\n isWaiterOrAdmin,\n showReceiptActionsForOperator,\n })\n : new OrderReceivedPopover({\n confirmation,\n isWaiterOrAdmin,\n allocation,\n orderUseCase: useCase,\n showReceiptActionsForOperator,\n });\n\n popover.onBecameVisible = this.onPopoverBecameVisible;\n popover.onStartOver = this.onStartOver;\n popover.onReceiptAndMore = () => {\n if (options.focusEmailInput && this.userIsWaiter()) {\n this.emailInput!.$input.focus();\n }\n };\n popover.show();\n this.$popover = popover;\n }, 400);\n }\n\n public refreshPopoverUseCaseSection() {\n if (this.$popover != null) {\n const orderReceivedPopover = this.$popover as OrderReceivedPopover;\n orderReceivedPopover.refreshUseCaseSection();\n }\n }\n\n protected onBecomeInvisible() {\n this.cancelLongpoll = true;\n this.wasPayLater = false;\n }\n\n private async setValidatingTransaction() {\n this.$state = $('
').appendTo(this.$view.empty());\n this.$state.append('
');\n this.$state.append(\n '
' +\n trans.done.trxCheckingTitle +\n '
' +\n trans.done.trxCheckingText +\n \"
\"\n );\n\n try {\n const result = await this.longpollTransaction(this.transactionId!);\n this.wasPayLater = result.isPayLater;\n this.paymentFor = result.paymentFor;\n\n if (result.isConfirmed === false) {\n const loader = this.$state!.find(\"> .circleloader\").append(\n '
'\n );\n loader[0].offsetHeight;\n loader.addClass(\"fail\");\n\n this.$state!.find(\"> .sub\").html(\n '
' +\n trans.done.trxDeclinedTitle +\n '
' +\n (result.error !== undefined ? Format.endWithFullstop(result.error) + \" \" : \"\") +\n trans.done.trxDeclinedText +\n \"
\"\n );\n\n this.setFailed(result.error);\n } else {\n const loader = this.$state!.find(\"> .circleloader\").append('
');\n loader[0].offsetHeight;\n loader.addClass(\"success\");\n\n this.$state!.find(\"> .sub\").html('
' + trans.done.trxSuccessTitle + \"
\");\n\n this.showConfirmationPopover({ confirmation: result });\n\n setTimeout(() => {\n this.$state!.fadeOut(400, () => {\n this.setSuccess(result);\n });\n }, 1000);\n }\n } catch (ex) {\n logError(ex);\n const loader = this.$state!.find(\"> .circleloader\").append(\n '
'\n );\n loader[0].offsetHeight;\n loader.addClass(\"fail\");\n\n this.$state!.find(\"> .sub\").html(\n '
' +\n trans.done.trxFailedCheckingTitle +\n '
' +\n trans.done.trxFailedCheckingText +\n \"
\"\n );\n this.setFailed();\n }\n }\n\n private setSuccess(confirmation: IOrderPaymentConfirmation) {\n const profile = TastierClient.identityContext.getProfile()!;\n const isAuthenticated = TastierClient.identityContext.isAuthenticated();\n\n this.confirmation = confirmation;\n this.$mainContainer = $(\"#tastierapp\");\n this.$view.empty();\n this.$head = $(\n '
' +\n (this.wasPayLater ? trans.done.more : trans.done.title) +\n \"
\"\n ).appendTo(this.$view);\n this.userMenu = new UserMenu().appendTo(this.$head);\n const scrollable = $('
').hide().appendTo(this.$view);\n\n this.$headLine = $('
').appendTo(scrollable);\n\n if (isAuthenticated) {\n if (this.wasPayLater) {\n const hasIdentityEmail = TastierClient.identityContext.hasIdentityEmail();\n if (!hasIdentityEmail || !confirmation.sendEmailConfirmationsForUnpaidOrders) {\n this.$headLine.hide();\n }\n } else {\n this.$headLine.text(trans.done.getReceipt);\n }\n } else {\n if (this.wasPayLater) {\n this.$headLine.text(trans.done.signup);\n } else {\n this.$headLine.text(trans.done.onlyReceipt);\n }\n }\n\n this.$signupForm = $('
').appendTo(scrollable);\n const row = $('
').appendTo(this.$signupForm);\n this.emailInput = new EmailInput().appendTo(row);\n this.emailRef.value = this.emailInput.getValue();\n this.renderReceiptActionButtons(confirmation.paymentFor, confirmation.orderId, confirmation.paymentId, row);\n\n this.emailInput.onKeyUp(() => {\n this.checkSignupReceiptState();\n\n const emailVal = this.emailInput!.getValue();\n this.emailRef.value = emailVal;\n });\n\n this.$passwordRow = $('
').appendTo(this.$signupForm);\n this.passwordInput = new PasswordInput(true, false, trans.signin.password).appendTo(this.$passwordRow);\n this.passwordInput.onKeyUp(() => {\n this.checkSignupReceiptState();\n });\n\n this.$firstNameRow = $('
').appendTo(this.$signupForm);\n this.$firstNameInput = $(\n '
'\n )\n .appendTo(this.$firstNameRow)\n .find(\"> input\");\n\n this.$lastNameRow = $('
').appendTo(this.$signupForm);\n this.$lastNameInput = $(\n '
'\n )\n .appendTo(this.$lastNameRow)\n .find(\"> input\");\n\n this.$onlyReceiptSection = $('
' + trans.done.onlyReceipt + \"
\").appendTo(\n this.$signupForm\n );\n\n this.onlyReceiptToggle = new Toggle().appendTo(this.$onlyReceiptSection);\n\n if (!this.wasPayLater) {\n this.onlyReceiptToggle!.onChange = () => this.checkSignupReceiptState();\n this.$onlyReceiptSection.show();\n } else {\n this.$onlyReceiptSection.hide();\n }\n\n this.$socialLogins = $('
').appendTo(scrollable);\n Ripple.bindRippleOut($('
'))\n .appendTo(this.$socialLogins)\n .click((e) => {\n e.preventDefault();\n this.externalAuthAndSend(\"facebook\");\n });\n\n Ripple.bindRippleOut($('
'))\n .appendTo(this.$socialLogins)\n .click((e) => {\n e.preventDefault();\n this.externalAuthAndSend(\"linkedin\");\n });\n\n Ripple.bindRippleOut($('
'))\n .appendTo(this.$socialLogins)\n .click((e) => {\n e.preventDefault();\n this.externalAuthAndSend(\"google\");\n });\n\n this.$disclaimer = $('
' + trans.done.disclaimer + \"
\").appendTo(scrollable);\n this.$displayOrder = $('
').appendTo(scrollable);\n\n if (confirmation.paymentFor !== PaymentFor.Bill) {\n $('
' + trans.done.displayOrderHeadline + \"
\").appendTo(this.$displayOrder);\n\n Ripple.bind(\n $('\").click(() => {\n this.fetchLastOrder();\n })\n ).appendTo(this.$displayOrder);\n } else {\n $('
' + trans.done.displayPaymentHeadline + \"
\").appendTo(this.$displayOrder);\n\n Ripple.bind(\n $('\").click(() => {\n this.fetchCustomerPayment(this.confirmation!.paymentId!);\n })\n ).appendTo(this.$displayOrder);\n }\n\n FloatLabel.bind(this.$signupForm);\n\n const bottom = $('
').hide().appendTo(this.$view);\n this.$paymentState = $('
').appendTo(bottom);\n\n if (!confirmation.isPayLater) {\n this.updatePaymentStateText(confirmation.paymentFor);\n }\n\n this.$doneBtn = Ripple.bind($('
\"\n ).click(() => {\n this.goBackToWelcomeScreen();\n })\n ).appendTo(bottom);\n\n bottom.fadeIn(1500);\n }\n\n private longpollTransaction(transactionId: string): Promise {\n return new Promise((resolve, reject) => {\n let retries = 0;\n\n const checkRecursive = async (transactionId: string) => {\n if (this.cancelLongpoll) return;\n\n try {\n const result = await this.customerDao.checkOrderPaymentConfirmation(transactionId);\n\n if (retries > 50) {\n reject();\n return;\n }\n\n if (result.isConfirmed === undefined) {\n retries++;\n\n const delay = retries <= 1 ? 500 : retries <= 5 ? 2500 : 6000;\n window.setTimeout(() => checkRecursive(transactionId), delay);\n } else {\n resolve(result);\n }\n } catch (ex) {\n logError(ex);\n reject(ex);\n }\n };\n\n checkRecursive(transactionId);\n });\n }\n\n private setInitialState() {\n const profile = TastierClient.identityContext.getProfile()!;\n const isAuthenticated = TastierClient.identityContext.isAuthenticated();\n // if an identity has an email, that means receipts and confirmations are sent automatically\n const hasIdentityEmail = TastierClient.identityContext.hasIdentityEmail();\n const useCase = Helper.getCurrentOrderServiceUseCase();\n const sendEmailConfirmationsForUnpaidOrders = useCase?.sendEmailConfirmationsForUnpaidOrders ?? false;\n const isWaiter = this.userIsWaiter();\n\n if (!this.wasPayLater && isWaiter) {\n this.$doneBtn!.hide();\n } else {\n this.$doneBtn!.show();\n }\n\n this.$displayOrder!.removeClass(\"hidden\");\n if (isAuthenticated || (hasIdentityEmail && !this.wasPayLater)) {\n this.$signupForm!.addClass(\"hidden\");\n this.$socialLogins!.addClass(\"hidden\");\n this.$disclaimer!.addClass(\"hidden\");\n\n if (isWaiter) {\n if (!this.wasPayLater) {\n this.$signupForm!.removeClass(\"hidden\");\n } else {\n this.$headLine!.hide();\n }\n } else {\n if (!this.wasPayLater) {\n this.$headLine!.html(trans.done.weSentReceipt + \" \" + Format.htmlEscape(profile.email));\n } else {\n if (hasIdentityEmail && sendEmailConfirmationsForUnpaidOrders) {\n this.$headLine!.html(\n `
${trans.done.weSentConfirmation} ${Format.htmlEscape(profile.email)}
`\n );\n } else {\n this.$headLine!.hide();\n }\n }\n }\n } else {\n if (hasIdentityEmail && this.wasPayLater && sendEmailConfirmationsForUnpaidOrders) {\n this.$headLine!.html(\n `
${trans.done.weSentConfirmation} ${Format.htmlEscape(profile.email)}
`\n );\n $(`
${this.wasPayLater ? trans.done.signup : trans.done.signupAndReceipt}
`).appendTo(\n this.$headLine!\n );\n } else {\n this.$headLine!.html(this.wasPayLater ? trans.done.signup : trans.done.signupAndReceipt);\n }\n\n if (!this.wasPayLater) {\n $('
')\n .appendTo(this.$headLine!)\n .click(() => {\n TextPopover.showFor(trans.done.signupHintTitle, trans.done.signupHintText);\n });\n }\n\n this.$signupForm!.removeClass(\"hidden\");\n this.$socialLogins!.removeClass(\"hidden\");\n this.$disclaimer!.removeClass(\"hidden\");\n }\n\n this.checkSignupReceiptState();\n }\n\n private checkSignupReceiptState() {\n const isOnlyReceipt = this.onlyReceiptToggle!.getValue();\n const hasEmailVal = this.emailInput!.getValue();\n const isCurrentlyVisible = this.$passwordRow!.is(\":visible\");\n const shouldBeVisible = hasEmailVal !== undefined && !isOnlyReceipt;\n\n const socialsVisible = this.$socialLogins!.is(\":visible\");\n if (socialsVisible && isOnlyReceipt) {\n this.$socialLogins!.stop(true, false).slideUp(\"fast\", \"easeOutExpo\");\n this.$disclaimer!.stop(true, false).slideUp(\"fast\", \"easeOutExpo\");\n } else if (!socialsVisible && !isOnlyReceipt) {\n this.$socialLogins!.stop(true, false).slideDown(\"fast\", \"easeOutExpo\");\n this.$disclaimer!.stop(true, false).slideDown(\"fast\", \"easeOutExpo\");\n }\n\n if (isCurrentlyVisible && !shouldBeVisible) {\n this.$passwordRow!.stop(true, false).slideUp(\"fast\", \"easeOutExpo\");\n this.$firstNameRow!.stop(true, false).slideUp(\"fast\", \"easeOutExpo\");\n this.$lastNameRow!.stop(true, false).slideUp(\"fast\", \"easeOutExpo\");\n } else if (!isCurrentlyVisible && shouldBeVisible) {\n this.$passwordRow!.stop(true, false).slideDown(\"fast\", \"easeOutExpo\");\n this.$firstNameRow!.stop(true, false).slideDown(\"fast\", \"easeOutExpo\");\n this.$lastNameRow!.stop(true, false).slideDown(\"fast\", \"easeOutExpo\");\n }\n\n if (hasEmailVal) {\n this.$displayOrder!.addClass(\"hidden\");\n } else {\n this.$displayOrder!.removeClass(\"hidden\");\n }\n\n this.checkButton();\n }\n\n public checkButton() {\n const email = this.emailInput!.getValue();\n\n const isAuthenticated = TastierClient.identityContext.isAuthenticated();\n const isEmailFilled = email !== undefined;\n const isReceipt = this.onlyReceiptToggle!.getValue();\n const isWaiter = this.userIsWaiter();\n const isPayLater = this.wasPayLater;\n\n const isSignup = !isReceipt && isEmailFilled;\n\n const isEndUserPayImmediatelly = !isAuthenticated && !isPayLater && isReceipt;\n const isEndUserSignup = !isAuthenticated && isSignup;\n\n if (isPayLater && isWaiter && isReceipt) {\n this.emailInput!.$input.hide();\n }\n\n if (isEndUserPayImmediatelly) {\n // done button works as \"Send Receipt\" button\n this.updateDoneButton(this.$doneBtn!, translations.receipt.sendReceipt, () => {\n this.sendReceipt(this.confirmation!);\n });\n const isEnabled = this.emailInput!.isValid();\n this.setDoneButtonEnabled(isEnabled);\n return;\n }\n\n if (isEndUserSignup) {\n // done button works as \"Signup\" button or \"Signup and Send Receipt\" button\n this.updateDoneButton(\n this.$doneBtn!,\n isPayLater ? trans.done.signup : trans.done.signupAndReceiptBtn,\n () => {\n this.signupAndSend();\n }\n );\n const isEnabled = this.emailInput!.isValid() && this.passwordInput!.isValid();\n this.setDoneButtonEnabled(isEnabled);\n return;\n }\n // done button works as \"Continue\" button\n this.updateDoneButton(this.$doneBtn!, trans.done.startOver, () => {\n this.goBackToWelcomeScreen();\n });\n this.setDoneButtonEnabled(true);\n }\n\n private async signupAndSend() {\n if (this.$doneBtn!.hasClass(\"loading\")) return;\n\n const profile = TastierClient.identityContext.getProfile()!;\n const fName =\n this.$firstNameInput!.val().length === 0\n ? profile.firstName === undefined\n ? \"Unknown\"\n : profile.firstName\n : this.$firstNameInput!.val();\n const lName =\n this.$lastNameInput!.val().length === 0\n ? profile.lastName === undefined\n ? \"User\"\n : profile.lastName\n : this.$lastNameInput!.val();\n\n this.emailInput!.setError(false);\n\n try {\n this.setDoneButtonLoading(true);\n await TastierClient.identityContext.signup({\n email: this.emailInput!.getValue(),\n firstName: fName,\n lastName: lName,\n password: this.passwordInput!.getValue(),\n phoneNumber: profile.phoneNumber,\n });\n\n if (this.wasPayLater) {\n this.setDoneButtonLoading(false);\n this.goBackToWelcomeScreen();\n } else {\n await this.sendReceipt(this.confirmation!);\n }\n } catch (ex) {\n logError(ex);\n const e = ex as DaoError;\n if (e.type === exceptionTypes.emailInUseException) {\n this.emailInput!.setError(true);\n Popup.show(trans.signup.emailAlreadyUsed);\n } else {\n Popup.show(trans.done.failedSignup);\n }\n\n this.setDoneButtonLoading(false);\n }\n }\n\n private async externalAuthAndSend(provider: string) {\n const c = this.confirmation; //create scope copy because this will get reset after view is disappeared\n\n try {\n this.setDoneButtonLoading(true);\n await TastierClient.identityContext.authExternal(provider);\n\n if (this.wasPayLater) {\n this.setDoneButtonLoading(false);\n this.goBackToWelcomeScreen();\n } else {\n await this.sendReceipt(c!);\n }\n } catch (ex) {\n logError(ex);\n Popup.show(trans.done.failedSignup);\n this.setDoneButtonLoading(false);\n }\n }\n\n private async sendReceipt(confirmation: IOrderPaymentConfirmation) {\n if (confirmation === undefined || confirmation.isConfirmed !== true) {\n this.goBackToWelcomeScreen();\n return;\n }\n\n switch (confirmation.paymentFor) {\n case PaymentFor.Order:\n await this.sendOrderPaymentReceipt(confirmation, this.emailInput!.getValue());\n break;\n case PaymentFor.Bill:\n await this.sendBillPaymentReceipt(confirmation, this.emailInput!.getValue());\n break;\n }\n }\n\n private async sendOrderPaymentReceipt(confirmation: IOrderPaymentConfirmation, toReceiver?: string) {\n try {\n this.setDoneButtonLoading(true);\n await this.customerDao.sendReceipt(confirmation.orderId!, {\n email: toReceiver!,\n });\n\n Popup.show(translations.receipt.sentReceiptTo.replace(\"{0}\", toReceiver!.toLowerCase()), () => {\n this.goBackToWelcomeScreen();\n });\n } catch (ex) {\n logError(ex);\n Popup.show(translations.receipt.failedSendReceipt);\n } finally {\n this.setDoneButtonLoading(false);\n }\n }\n\n private async sendBillPaymentReceipt(confirmation: IOrderPaymentConfirmation, toReceiver?: string) {\n try {\n this.setDoneButtonLoading(true);\n await this.customerDao.sendBillReceipt(confirmation.paymentId!, {\n email: toReceiver!,\n });\n\n Popup.show(translations.receipt.sentReceiptTo.replace(\"{0}\", toReceiver!.toLowerCase()), () => {\n this.goBackToWelcomeScreen();\n });\n } catch (ex) {\n logError(ex);\n Popup.show(translations.receipt.failedSendReceipt);\n } finally {\n this.setDoneButtonLoading(false);\n }\n }\n\n private async fetchLastOrder() {\n try {\n const c = await this.customerDao.getOrders({\n offset: this.currentOffset,\n limit: this.entriesPerPage,\n });\n\n const totalItems = this.currentOffset + c.items.length;\n if (totalItems !== 0) {\n this.showReceipt({ order: c.items[0] }, ViewTransition.SlideLeft);\n }\n } catch (ex) {\n logError(ex);\n }\n }\n\n private async fetchCustomerPayment(paymentId: string) {\n try {\n const c = await this.customerDao.getCustomerPayment(paymentId);\n this.showBillReceipt({ payment: c }, ViewTransition.SlideLeft);\n } catch (ex) {\n logError(ex);\n }\n }\n\n private showReceipt(data: IReceiptControllerTransitionData, transition?: ViewTransition) {\n if (this.receiptController === undefined) {\n this.receiptController = new ReceiptController();\n this.receiptController.stackTo(this.$mainContainer!);\n }\n\n this.receiptController.onGoBack = () => this.show(ViewTransition.SlideRight);\n this.receiptController.show(transition, data);\n }\n\n private showBillReceipt(data: IPaymentReceiptControllerTransitionData, transition?: ViewTransition) {\n if (this.paymentReceiptController === undefined) {\n this.paymentReceiptController = new PaymentReceiptController();\n this.paymentReceiptController.stackTo(this.$mainContainer!);\n }\n\n this.paymentReceiptController.onGoBack = () => this.show(ViewTransition.SlideRight);\n this.paymentReceiptController.show(transition, data);\n }\n\n private userIsWaiter(): boolean {\n return TastierClient.identityContext?.isWaiterOrAdmin();\n }\n\n private renderReceiptActionButtons(\n paymentFor: PaymentFor,\n orderId: string | undefined,\n paymentId: string | undefined,\n receiptButtonsContainer: JQuery\n ) {\n // receipt action buttons should be shown only if user is waiter and payment was not pay later\n if ((this.userIsWaiter() && !this.wasPayLater) == false) {\n return;\n }\n\n const div = createEmptyDiv();\n const props = {\n paymentFor: paymentFor,\n emailRecipient: this.emailRef,\n orderId: orderId,\n paymentId: paymentId,\n locationId: TastierClient.context.currentAllocation!.locationId,\n userIsWaiter: this.userIsWaiter(),\n isPayLater: this.wasPayLater,\n onSendReceiptSuccess: () => this.goBackToWelcomeScreen(),\n onPrintSuccess: () => this.goBackToWelcomeScreen(),\n };\n createVueComponent(AppReceiptActionButtons, props, div);\n $(div).appendTo(receiptButtonsContainer);\n }\n\n private goBackToWelcomeScreen() {\n if (this.onStartOver) {\n this.onStartOver();\n }\n }\n\n private updateDoneButton(button: JQuery, text: string, clickHandler: () => void) {\n button\n ?.html(text)\n .unbind(\"click.b\")\n .bind(\"click.b\", () => {\n clickHandler();\n });\n }\n\n private setDoneButtonEnabled(enable: boolean) {\n if (enable) {\n // enable with delay\n setTimeout(() => {\n this.$doneBtn!.prop(\"disabled\", false).removeClass(\"disabled\");\n }, 700);\n } else {\n this.$doneBtn!.prop(\"disabled\", true).addClass(\"disabled\");\n }\n }\n\n private setDoneButtonLoading(isLoading: boolean) {\n if (isLoading) {\n this.$doneBtn!.addClass(\"loading\");\n } else {\n this.$doneBtn!.removeClass(\"loading\");\n }\n }\n}\n","import { Ripple } from \"@/shared/ui/Ripple\";\n\nimport { BaseController } from \"@/app/controller/BaseController\";\nimport { trans } from \"@/app/localization/Trans\";\n\nexport class HelpController extends BaseController {\n public onGoBack?: { () };\n public onRate?: { () };\n public onReportIssue?: { () };\n\n constructor() {\n super(\"help\");\n\n const hdr = $('
' + trans.help.helpTitle + \"
\").appendTo(\n this.$view\n );\n Ripple.bind($(''))\n .prependTo(hdr)\n .click((e) => {\n e.preventDefault();\n if (this.onGoBack !== undefined) this.onGoBack();\n });\n\n const scrollable = $('
').appendTo(this.$view);\n scrollable.append(\n '
' + trans.help.helpLead + \"

\" + trans.help.helpText + \"

\"\n );\n\n const subMenu = $('
').appendTo(scrollable);\n $(\n '
' +\n trans.help.rateTastierBtn +\n '
'\n )\n .appendTo(subMenu)\n .click((e) => {\n $(e.currentTarget).addClass(\"selected\");\n if (this.onRate !== undefined) this.onRate();\n });\n\n $(\n '
' +\n trans.help.reportProblemBtn +\n '
'\n )\n .appendTo(subMenu)\n .click((e) => {\n $(e.currentTarget).addClass(\"selected\");\n if (this.onReportIssue !== undefined) this.onReportIssue();\n });\n\n const bottom = $('
').appendTo(this.$view);\n const contact = $('
').appendTo(bottom);\n contact.append('+41 76 784 44 68');\n contact.append(' feedback@tastier.ch');\n\n const links = $('
').appendTo(bottom);\n links.append('Terms & Conditions');\n links.append('');\n links.append(\n 'Privacy Policy'\n );\n }\n\n protected onBecomeVisible() {\n this.$view\n .find(\".navlinks > .navlink.selected\")\n .delay(300)\n .queue(function (this: any, e) {\n $(this).removeClass(\"selected\");\n e();\n });\n }\n\n protected onBecomeInvisible() {}\n}\n","import type { ICustomerPayment } from \"@/data/model/CustomerPayment\";\nimport { Signal } from \"@/data/util/Signal\";\n\nimport { translations } from \"@/shared/localization/translations\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\nimport { BaseController } from \"@/app/controller/BaseController\";\n\nexport class OpenBillsController extends BaseController {\n public onGoBack?: { () };\n public onClick?: { (model: ICustomerPayment) };\n\n private readonly $openBillsList: JQuery;\n\n static onShown = new Signal();\n static onHidden = new Signal();\n\n constructor() {\n super(\"open-bills\");\n\n const hdr = $(`
${translations.openBills.title}
`).appendTo(\n this.$view\n );\n\n Ripple.bind($(''))\n .prependTo(hdr)\n .click((e) => {\n e.preventDefault();\n if (this.onGoBack !== undefined) {\n this.onGoBack();\n }\n });\n\n this.$openBillsList = $('
').appendTo(this.$view);\n }\n\n protected onBecomeInvisible() {\n setTimeout(() => {\n OpenBillsController.onHidden.dispatch();\n }, 500);\n }\n\n protected onBecomeVisible() {\n OpenBillsController.onShown.dispatch();\n }\n}\n","import { Format } from \"@/data/util/Format\";\n\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\nimport { MomentumScroller } from \"@/app/ui/MomentumScroller\";\n\nexport class CategorySlider {\n public onSelected?: { (category: string) };\n\n private $element: JQuery;\n private $slidable: JQuery;\n\n private scroller: MomentumScroller;\n private currentActiveId?: string;\n\n constructor() {\n this.$element = $('
');\n this.$slidable = $('
').appendTo(this.$element);\n\n this.scroller = new MomentumScroller(this.$slidable, {\n axis: \"x\",\n restrictTo: this.$element,\n });\n }\n\n public setCategories(categories: Array<{ id: string; name: string }>): CategorySlider {\n let newWidth = 0;\n\n this.$slidable.empty();\n\n for (const i in categories) {\n const cat = categories[i];\n\n const el = $(\n '
' + Format.htmlEscape(cat.name) + \"
\"\n ).appendTo(this.$slidable);\n Ripple.bind(\n el.click((e) => {\n if (this.scroller.isDragging) {\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n\n const clickedCategory = $(e.currentTarget);\n this.moveSliderToElement(clickedCategory);\n this.onCategoryClicked(clickedCategory);\n })\n );\n\n newWidth += el.outerWidth(true);\n }\n\n const parentWidth = this.$element.width();\n this.$slidable.width(newWidth < parentWidth ? parentWidth : newWidth);\n this.scroller.updateBounds();\n\n // todo: ugly solution to prevent flickering effect after load\n setTimeout(() => {\n this.$slidable.find(\"> .category.initial\").removeClass(\"initial\");\n }, 300);\n\n return this;\n }\n\n public moveToFirst(): CategorySlider {\n this.$slidable.find(\"> .category.active\").removeClass(\"active\");\n const newActive = this.$slidable.children(\".category\").first().addClass(\"initial\").addClass(\"active\");\n if (newActive.length > 0) {\n this.currentActiveId = newActive.attr(\"data-id\");\n this.moveSliderToElement(newActive);\n } else this.currentActiveId = undefined;\n\n // todo: ugly solution to prevent flickering effect after load\n setTimeout(() => {\n this.$slidable.find(\"> .category.initial\").removeClass(\"initial\");\n }, 300);\n\n return this;\n }\n\n public moveScrollTo(id: string): CategorySlider | void {\n if (this.currentActiveId === id) return;\n\n const newActiveCat = this.$slidable.find('> .category[data-id=\"' + id + '\"]');\n if (newActiveCat.length === 0) return;\n\n this.$slidable.find(\"> .category.active\").removeClass(\"active\");\n newActiveCat.addClass(\"active\");\n\n this.currentActiveId = id;\n this.moveSliderToElement(newActiveCat);\n\n return this;\n }\n\n private onCategoryClicked(el: JQuery) {\n const currentActive = this.$slidable.find(\"> .category.active\");\n currentActive.removeClass(\"active\");\n el.addClass(\"active\");\n\n this.currentActiveId = el.attr(\"data-id\");\n if (this.onSelected !== undefined) this.onSelected(el.attr(\"data-id\"));\n }\n\n public appendTo($element: JQuery): CategorySlider {\n this.$element.appendTo($element);\n return this;\n }\n\n private moveSliderToElement(atElement: JQuery) {\n let releasePos =\n atElement.position().left * -1 + parseInt(this.$slidable.css(\"padding-left\").replace(\"px\", \"\"));\n const maxOffset = this.$element.width() - this.$slidable.outerWidth(true);\n\n if (releasePos > 0) releasePos = 0;\n else if (maxOffset > releasePos) releasePos = maxOffset;\n\n this.scroller.scrollTo(releasePos, 0);\n }\n}\n","import { DomHandler } from 'primevue/utils';\nimport { ref, readonly, getCurrentInstance, onMounted, nextTick, watch } from 'vue';\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); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction tryOnMounted(fn) {\n var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (getCurrentInstance()) onMounted(fn);else if (sync) fn();else nextTick(fn);\n}\nvar _id = 0;\nfunction useStyle(css) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var isLoaded = ref(false);\n var cssRef = ref(css);\n var styleRef = ref(null);\n var defaultDocument = DomHandler.isClient() ? window.document : undefined;\n var _options$document = options.document,\n document = _options$document === void 0 ? defaultDocument : _options$document,\n _options$immediate = options.immediate,\n immediate = _options$immediate === void 0 ? true : _options$immediate,\n _options$manual = options.manual,\n manual = _options$manual === void 0 ? false : _options$manual,\n _options$name = options.name,\n name = _options$name === void 0 ? \"style_\".concat(++_id) : _options$name,\n _options$id = options.id,\n id = _options$id === void 0 ? undefined : _options$id,\n _options$media = options.media,\n media = _options$media === void 0 ? undefined : _options$media,\n _options$nonce = options.nonce,\n nonce = _options$nonce === void 0 ? undefined : _options$nonce,\n _options$props = options.props,\n props = _options$props === void 0 ? {} : _options$props;\n var stop = function stop() {};\n\n /* @todo: Improve _options params */\n var load = function load(_css) {\n var _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!document) return;\n var _styleProps = _objectSpread(_objectSpread({}, props), _props);\n var _name = _styleProps.name || name,\n _id = _styleProps.id || id,\n _nonce = _styleProps.nonce || nonce;\n styleRef.value = document.querySelector(\"style[data-primevue-style-id=\\\"\".concat(_name, \"\\\"]\")) || document.getElementById(_id) || document.createElement('style');\n if (!styleRef.value.isConnected) {\n cssRef.value = _css || css;\n DomHandler.setAttributes(styleRef.value, {\n type: 'text/css',\n id: _id,\n media: media,\n nonce: _nonce\n });\n document.head.appendChild(styleRef.value);\n DomHandler.setAttribute(styleRef.value, 'data-primevue-style-id', name);\n DomHandler.setAttributes(styleRef.value, _styleProps);\n }\n if (isLoaded.value) return;\n stop = watch(cssRef, function (value) {\n styleRef.value.textContent = value;\n }, {\n immediate: true\n });\n isLoaded.value = true;\n };\n var unload = function unload() {\n if (!document || !isLoaded.value) return;\n stop();\n DomHandler.isExist(styleRef.value) && document.head.removeChild(styleRef.value);\n isLoaded.value = false;\n };\n if (immediate && !manual) tryOnMounted(load);\n\n /*if (!manual)\n tryOnScopeDispose(unload)*/\n\n return {\n id: id,\n name: name,\n css: cssRef,\n unload: unload,\n load: load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nexport { useStyle };\n","import { useStyle } from 'primevue/usestyle';\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); }\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; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar css = \"\\n.p-hidden-accessible {\\n border: 0;\\n clip: rect(0 0 0 0);\\n height: 1px;\\n margin: -1px;\\n overflow: hidden;\\n padding: 0;\\n position: absolute;\\n width: 1px;\\n}\\n\\n.p-hidden-accessible input,\\n.p-hidden-accessible select {\\n transform: scale(0);\\n}\\n\\n.p-overflow-hidden {\\n overflow: hidden;\\n padding-right: var(--scrollbar-width);\\n}\\n\";\nvar classes = {};\nvar inlineStyles = {};\nvar BaseStyle = {\n name: 'base',\n css: css,\n classes: classes,\n inlineStyles: inlineStyles,\n loadStyle: function loadStyle() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this.css ? useStyle(this.css, _objectSpread({\n name: this.name\n }, options)) : {};\n },\n getStyleSheet: function getStyleSheet() {\n var extendedCSS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.css) {\n var _props = Object.entries(props).reduce(function (acc, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n k = _ref2[0],\n v = _ref2[1];\n return acc.push(\"\".concat(k, \"=\\\"\").concat(v, \"\\\"\")) && acc;\n }, []).join(' ');\n return \"\");\n }\n return '';\n },\n extend: function extend(style) {\n return _objectSpread(_objectSpread({}, this), {}, {\n css: undefined\n }, style);\n }\n};\n\nexport { BaseStyle as default };\n","import BaseStyle from 'primevue/base/style';\nimport { ObjectUtils } from 'primevue/utils';\n\nvar css = \"\\n@layer primevue {\\n .p-badge {\\n display: inline-block;\\n border-radius: 10px;\\n text-align: center;\\n padding: 0 .5rem;\\n }\\n\\n .p-overlay-badge {\\n position: relative;\\n }\\n\\n .p-overlay-badge .p-badge {\\n position: absolute;\\n top: 0;\\n right: 0;\\n transform: translate(50%,-50%);\\n transform-origin: 100% 0;\\n margin: 0;\\n }\\n\\n .p-badge-dot {\\n width: .5rem;\\n min-width: .5rem;\\n height: .5rem;\\n border-radius: 50%;\\n padding: 0;\\n }\\n\\n .p-badge-no-gutter {\\n padding: 0;\\n border-radius: 50%;\\n }\\n}\\n\";\nvar classes = {\n root: function root(_ref) {\n var props = _ref.props,\n instance = _ref.instance;\n return ['p-badge p-component', {\n 'p-badge-no-gutter': ObjectUtils.isNotEmpty(props.value) && String(props.value).length === 1,\n 'p-badge-dot': ObjectUtils.isEmpty(props.value) && !instance.$slots[\"default\"],\n 'p-badge-lg': props.size === 'large',\n 'p-badge-xl': props.size === 'xlarge',\n 'p-badge-info': props.severity === 'info',\n 'p-badge-success': props.severity === 'success',\n 'p-badge-warning': props.severity === 'warning',\n 'p-badge-danger': props.severity === 'danger'\n }];\n }\n};\nvar BadgeStyle = BaseStyle.extend({\n name: 'badge',\n css: css,\n classes: classes\n});\n\nexport { BadgeStyle as default };\n","import BaseStyle from 'primevue/base/style';\nimport { ObjectUtils } from 'primevue/utils';\nimport { mergeProps } from 'vue';\nimport { useStyle } from 'primevue/usestyle';\n\nfunction _typeof$1(o) { \"@babel/helpers - typeof\"; return _typeof$1 = \"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$1(o); }\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey$1(t) { var i = _toPrimitive$1(t, \"string\"); return \"symbol\" == _typeof$1(i) ? i : String(i); }\nfunction _toPrimitive$1(t, r) { if (\"object\" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof$1(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar buttonCSS = \"\\n.p-button {\\n display: inline-flex;\\n cursor: pointer;\\n user-select: none;\\n align-items: center;\\n vertical-align: bottom;\\n text-align: center;\\n overflow: hidden;\\n position: relative;\\n}\\n\\n.p-button-label {\\n flex: 1 1 auto;\\n}\\n\\n.p-button-icon-right {\\n order: 1;\\n}\\n\\n.p-button:disabled {\\n cursor: default;\\n}\\n\\n.p-button-icon-only {\\n justify-content: center;\\n}\\n\\n.p-button-icon-only .p-button-label {\\n visibility: hidden;\\n width: 0;\\n flex: 0 0 auto;\\n}\\n\\n.p-button-vertical {\\n flex-direction: column;\\n}\\n\\n.p-button-icon-bottom {\\n order: 2;\\n}\\n\\n.p-buttonset .p-button {\\n margin: 0;\\n}\\n\\n.p-buttonset .p-button:not(:last-child), .p-buttonset .p-button:not(:last-child):hover {\\n border-right: 0 none;\\n}\\n\\n.p-buttonset .p-button:not(:first-of-type):not(:last-of-type) {\\n border-radius: 0;\\n}\\n\\n.p-buttonset .p-button:first-of-type:not(:only-of-type) {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n\\n.p-buttonset .p-button:last-of-type:not(:only-of-type) {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n.p-buttonset .p-button:focus {\\n position: relative;\\n z-index: 1;\\n}\\n\";\nvar checkboxCSS = \"\\n.p-checkbox {\\n display: inline-flex;\\n cursor: pointer;\\n user-select: none;\\n vertical-align: bottom;\\n position: relative;\\n}\\n\\n.p-checkbox.p-checkbox-disabled {\\n cursor: default;\\n}\\n\\n.p-checkbox-box {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\";\nvar inputTextCSS = \"\\n.p-fluid .p-inputtext {\\n width: 100%;\\n}\\n\\n/* InputGroup */\\n.p-inputgroup {\\n display: flex;\\n align-items: stretch;\\n width: 100%;\\n}\\n\\n.p-inputgroup-addon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.p-inputgroup .p-float-label {\\n display: flex;\\n align-items: stretch;\\n width: 100%;\\n}\\n\\n.p-inputgroup .p-inputtext,\\n.p-fluid .p-inputgroup .p-inputtext,\\n.p-inputgroup .p-inputwrapper,\\n.p-fluid .p-inputgroup .p-input {\\n flex: 1 1 auto;\\n width: 1%;\\n}\\n\\n/* Floating Label */\\n.p-float-label {\\n display: block;\\n position: relative;\\n}\\n\\n.p-float-label label {\\n position: absolute;\\n pointer-events: none;\\n top: 50%;\\n margin-top: -.5rem;\\n transition-property: all;\\n transition-timing-function: ease;\\n line-height: 1;\\n}\\n\\n.p-float-label textarea ~ label {\\n top: 1rem;\\n}\\n\\n.p-float-label input:focus ~ label,\\n.p-float-label input.p-filled ~ label,\\n.p-float-label input:-webkit-autofill ~ label,\\n.p-float-label textarea:focus ~ label,\\n.p-float-label textarea.p-filled ~ label,\\n.p-float-label .p-inputwrapper-focus ~ label,\\n.p-float-label .p-inputwrapper-filled ~ label {\\n top: -.75rem;\\n font-size: 12px;\\n}\\n\\n\\n.p-float-label .p-placeholder,\\n.p-float-label input::placeholder,\\n.p-float-label .p-inputtext::placeholder {\\n opacity: 0;\\n transition-property: all;\\n transition-timing-function: ease;\\n}\\n\\n.p-float-label .p-focus .p-placeholder,\\n.p-float-label input:focus::placeholder,\\n.p-float-label .p-inputtext:focus::placeholder {\\n opacity: 1;\\n transition-property: all;\\n transition-timing-function: ease;\\n}\\n\\n.p-input-icon-left,\\n.p-input-icon-right {\\n position: relative;\\n display: inline-block;\\n}\\n\\n.p-input-icon-left > i,\\n.p-input-icon-left > svg,\\n.p-input-icon-right > i,\\n.p-input-icon-right > svg {\\n position: absolute;\\n top: 50%;\\n margin-top: -.5rem;\\n}\\n\\n.p-fluid .p-input-icon-left,\\n.p-fluid .p-input-icon-right {\\n display: block;\\n width: 100%;\\n}\\n\";\nvar radioButtonCSS = \"\\n.p-radiobutton {\\n position: relative;\\n display: inline-flex;\\n cursor: pointer;\\n user-select: none;\\n vertical-align: bottom;\\n}\\n\\n.p-radiobutton.p-radiobutton-disabled {\\n cursor: default;\\n}\\n\\n.p-radiobutton-box {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.p-radiobutton-icon {\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n transform: translateZ(0) scale(.1);\\n border-radius: 50%;\\n visibility: hidden;\\n}\\n\\n.p-radiobutton-box.p-highlight .p-radiobutton-icon {\\n transform: translateZ(0) scale(1.0, 1.0);\\n visibility: visible;\\n}\\n\";\nvar css = \"\\n@layer primevue {\\n.p-component, .p-component * {\\n box-sizing: border-box;\\n}\\n\\n.p-hidden-space {\\n visibility: hidden;\\n}\\n\\n.p-reset {\\n margin: 0;\\n padding: 0;\\n border: 0;\\n outline: 0;\\n text-decoration: none;\\n font-size: 100%;\\n list-style: none;\\n}\\n\\n.p-disabled, .p-disabled * {\\n cursor: default !important;\\n pointer-events: none;\\n user-select: none;\\n}\\n\\n.p-component-overlay {\\n position: fixed;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.p-unselectable-text {\\n user-select: none;\\n}\\n\\n.p-sr-only {\\n border: 0;\\n clip: rect(1px, 1px, 1px, 1px);\\n clip-path: inset(50%);\\n height: 1px;\\n margin: -1px;\\n overflow: hidden;\\n padding: 0;\\n position: absolute;\\n width: 1px;\\n word-wrap: normal !important;\\n}\\n\\n.p-link {\\n\\ttext-align: left;\\n\\tbackground-color: transparent;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n\\tborder: none;\\n cursor: pointer;\\n user-select: none;\\n}\\n\\n.p-link:disabled {\\n\\tcursor: default;\\n}\\n\\n/* Non vue overlay animations */\\n.p-connected-overlay {\\n opacity: 0;\\n transform: scaleY(0.8);\\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\\n}\\n\\n.p-connected-overlay-visible {\\n opacity: 1;\\n transform: scaleY(1);\\n}\\n\\n.p-connected-overlay-hidden {\\n opacity: 0;\\n transform: scaleY(1);\\n transition: opacity .1s linear;\\n}\\n\\n/* Vue based overlay animations */\\n.p-connected-overlay-enter-from {\\n opacity: 0;\\n transform: scaleY(0.8);\\n}\\n\\n.p-connected-overlay-leave-to {\\n opacity: 0;\\n}\\n\\n.p-connected-overlay-enter-active {\\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\\n}\\n\\n.p-connected-overlay-leave-active {\\n transition: opacity .1s linear;\\n}\\n\\n/* Toggleable Content */\\n.p-toggleable-content-enter-from,\\n.p-toggleable-content-leave-to {\\n max-height: 0;\\n}\\n\\n.p-toggleable-content-enter-to,\\n.p-toggleable-content-leave-from {\\n max-height: 1000px;\\n}\\n\\n.p-toggleable-content-leave-active {\\n overflow: hidden;\\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);\\n}\\n\\n.p-toggleable-content-enter-active {\\n overflow: hidden;\\n transition: max-height 1s ease-in-out;\\n}\\n\".concat(buttonCSS, \"\\n\").concat(checkboxCSS, \"\\n\").concat(inputTextCSS, \"\\n\").concat(radioButtonCSS, \"\\n}\\n\");\nvar BaseComponentStyle = BaseStyle.extend({\n name: 'common',\n css: css,\n loadGlobalStyle: function loadGlobalStyle(globalCSS) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return useStyle(globalCSS, _objectSpread$1({\n name: 'global'\n }, options));\n }\n});\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); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar script = {\n name: 'BaseComponent',\n props: {\n pt: {\n type: Object,\n \"default\": undefined\n },\n ptOptions: {\n type: Object,\n \"default\": undefined\n },\n unstyled: {\n type: Boolean,\n \"default\": undefined\n }\n },\n inject: {\n $parentInstance: {\n \"default\": undefined\n }\n },\n watch: {\n isUnstyled: {\n immediate: true,\n handler: function handler(newValue) {\n if (!newValue) {\n var _this$$config, _this$$config2;\n BaseComponentStyle.loadStyle({\n nonce: (_this$$config = this.$config) === null || _this$$config === void 0 || (_this$$config = _this$$config.csp) === null || _this$$config === void 0 ? void 0 : _this$$config.nonce\n });\n this.$options.style && this.$style.loadStyle({\n nonce: (_this$$config2 = this.$config) === null || _this$$config2 === void 0 || (_this$$config2 = _this$$config2.csp) === null || _this$$config2 === void 0 ? void 0 : _this$$config2.nonce\n });\n }\n }\n }\n },\n beforeCreate: function beforeCreate() {\n var _this$pt, _this$pt2, _this$pt3, _ref, _ref$onBeforeCreate, _this$$config3, _this$$primevue, _this$$primevue2, _this$$primevue3, _ref2, _ref2$onBeforeCreate;\n var _usept = (_this$pt = this.pt) === null || _this$pt === void 0 ? void 0 : _this$pt['_usept'];\n var originalValue = _usept ? (_this$pt2 = this.pt) === null || _this$pt2 === void 0 || (_this$pt2 = _this$pt2.originalValue) === null || _this$pt2 === void 0 ? void 0 : _this$pt2[this.$.type.name] : undefined;\n var value = _usept ? (_this$pt3 = this.pt) === null || _this$pt3 === void 0 || (_this$pt3 = _this$pt3.value) === null || _this$pt3 === void 0 ? void 0 : _this$pt3[this.$.type.name] : this.pt;\n (_ref = value || originalValue) === null || _ref === void 0 || (_ref = _ref.hooks) === null || _ref === void 0 || (_ref$onBeforeCreate = _ref['onBeforeCreate']) === null || _ref$onBeforeCreate === void 0 || _ref$onBeforeCreate.call(_ref);\n var _useptInConfig = (_this$$config3 = this.$config) === null || _this$$config3 === void 0 || (_this$$config3 = _this$$config3.pt) === null || _this$$config3 === void 0 ? void 0 : _this$$config3['_usept'];\n var originalValueInConfig = _useptInConfig ? (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.pt) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.originalValue : undefined;\n var valueInConfig = _useptInConfig ? (_this$$primevue2 = this.$primevue) === null || _this$$primevue2 === void 0 || (_this$$primevue2 = _this$$primevue2.config) === null || _this$$primevue2 === void 0 || (_this$$primevue2 = _this$$primevue2.pt) === null || _this$$primevue2 === void 0 ? void 0 : _this$$primevue2.value : (_this$$primevue3 = this.$primevue) === null || _this$$primevue3 === void 0 || (_this$$primevue3 = _this$$primevue3.config) === null || _this$$primevue3 === void 0 ? void 0 : _this$$primevue3.pt;\n (_ref2 = valueInConfig || originalValueInConfig) === null || _ref2 === void 0 || (_ref2 = _ref2[this.$.type.name]) === null || _ref2 === void 0 || (_ref2 = _ref2.hooks) === null || _ref2 === void 0 || (_ref2$onBeforeCreate = _ref2['onBeforeCreate']) === null || _ref2$onBeforeCreate === void 0 || _ref2$onBeforeCreate.call(_ref2);\n },\n created: function created() {\n this._hook('onCreated');\n },\n beforeMount: function beforeMount() {\n var _this$$config4;\n BaseStyle.loadStyle({\n nonce: (_this$$config4 = this.$config) === null || _this$$config4 === void 0 || (_this$$config4 = _this$$config4.csp) === null || _this$$config4 === void 0 ? void 0 : _this$$config4.nonce\n });\n this._loadGlobalStyles();\n this._hook('onBeforeMount');\n },\n mounted: function mounted() {\n this._hook('onMounted');\n },\n beforeUpdate: function beforeUpdate() {\n this._hook('onBeforeUpdate');\n },\n updated: function updated() {\n this._hook('onUpdated');\n },\n beforeUnmount: function beforeUnmount() {\n this._hook('onBeforeUnmount');\n },\n unmounted: function unmounted() {\n this._hook('onUnmounted');\n },\n methods: {\n _hook: function _hook(hookName) {\n if (!this.$options.hostName) {\n var selfHook = this._usePT(this._getPT(this.pt, this.$.type.name), this._getOptionValue, \"hooks.\".concat(hookName));\n var defaultHook = this._useDefaultPT(this._getOptionValue, \"hooks.\".concat(hookName));\n selfHook === null || selfHook === void 0 || selfHook();\n defaultHook === null || defaultHook === void 0 || defaultHook();\n }\n },\n _loadGlobalStyles: function _loadGlobalStyles() {\n var _this$$config5;\n /*\n * @todo Add self custom css support;\n * \n *\n * const selfCSS = this._getPTClassValue(this.pt, 'css', this.$params);\n * const defaultCSS = this._getPTClassValue(this.defaultPT, 'css', this.$params);\n * const mergedCSS = mergeProps(selfCSS, defaultCSS);\n * ObjectUtils.isNotEmpty(mergedCSS?.class) && this.$css.loadCustomStyle(mergedCSS?.class);\n */\n\n var globalCSS = this._useGlobalPT(this._getOptionValue, 'global.css', this.$params);\n ObjectUtils.isNotEmpty(globalCSS) && BaseComponentStyle.loadGlobalStyle(globalCSS, {\n nonce: (_this$$config5 = this.$config) === null || _this$$config5 === void 0 || (_this$$config5 = _this$$config5.csp) === null || _this$$config5 === void 0 ? void 0 : _this$$config5.nonce\n });\n },\n _getHostInstance: function _getHostInstance(instance) {\n return instance ? this.$options.hostName ? instance.$.type.name === this.$options.hostName ? instance : this._getHostInstance(instance.$parentInstance) : instance.$parentInstance : undefined;\n },\n _getPropValue: function _getPropValue(name) {\n var _this$_getHostInstanc;\n return this[name] || ((_this$_getHostInstanc = this._getHostInstance(this)) === null || _this$_getHostInstanc === void 0 ? void 0 : _this$_getHostInstanc[name]);\n },\n _getOptionValue: function _getOptionValue(options) {\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var fKeys = ObjectUtils.toFlatCase(key).split('.');\n var fKey = fKeys.shift();\n return fKey ? ObjectUtils.isObject(options) ? this._getOptionValue(ObjectUtils.getItemValue(options[Object.keys(options).find(function (k) {\n return ObjectUtils.toFlatCase(k) === fKey;\n }) || ''], params), fKeys.join('.'), params) : undefined : ObjectUtils.getItemValue(options, params);\n },\n _getPTValue: function _getPTValue() {\n var _this$$config6;\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var searchInDefaultPT = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var datasetPrefix = 'data-pc-';\n var searchOut = /./g.test(key) && !!params[key.split('.')[0]];\n var _ref3 = this._getPropValue('ptOptions') || ((_this$$config6 = this.$config) === null || _this$$config6 === void 0 ? void 0 : _this$$config6.ptOptions) || {},\n _ref3$mergeSections = _ref3.mergeSections,\n mergeSections = _ref3$mergeSections === void 0 ? true : _ref3$mergeSections,\n _ref3$mergeProps = _ref3.mergeProps,\n useMergeProps = _ref3$mergeProps === void 0 ? false : _ref3$mergeProps;\n var global = searchInDefaultPT ? searchOut ? this._useGlobalPT(this._getPTClassValue, key, params) : this._useDefaultPT(this._getPTClassValue, key, params) : undefined;\n var self = searchOut ? undefined : this._usePT(this._getPT(obj, this.$name), this._getPTClassValue, key, _objectSpread(_objectSpread({}, params), {}, {\n global: global || {}\n }));\n var datasets = key !== 'transition' && _objectSpread(_objectSpread({}, key === 'root' && _defineProperty({}, \"\".concat(datasetPrefix, \"name\"), ObjectUtils.toFlatCase(this.$.type.name))), {}, _defineProperty({}, \"\".concat(datasetPrefix, \"section\"), ObjectUtils.toFlatCase(key)));\n return mergeSections || !mergeSections && self ? useMergeProps ? mergeProps(global, self, datasets) : _objectSpread(_objectSpread(_objectSpread({}, global), self), datasets) : _objectSpread(_objectSpread({}, self), datasets);\n },\n _getPTClassValue: function _getPTClassValue() {\n var value = this._getOptionValue.apply(this, arguments);\n return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? {\n \"class\": value\n } : value;\n },\n _getPT: function _getPT(pt) {\n var _this = this;\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var getValue = function getValue(value) {\n var _ref5;\n var checkSameKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var computedValue = callback ? callback(value) : value;\n var _key = ObjectUtils.toFlatCase(key);\n var _cKey = ObjectUtils.toFlatCase(_this.$name);\n return (_ref5 = checkSameKey ? _key !== _cKey ? computedValue === null || computedValue === void 0 ? void 0 : computedValue[_key] : undefined : computedValue === null || computedValue === void 0 ? void 0 : computedValue[_key]) !== null && _ref5 !== void 0 ? _ref5 : computedValue;\n };\n return pt !== null && pt !== void 0 && pt.hasOwnProperty('_usept') ? {\n _usept: pt['_usept'],\n originalValue: getValue(pt.originalValue),\n value: getValue(pt.value)\n } : getValue(pt, true);\n },\n _usePT: function _usePT(pt, callback, key, params) {\n var fn = function fn(value) {\n return callback(value, key, params);\n };\n if (pt !== null && pt !== void 0 && pt.hasOwnProperty('_usept')) {\n var _this$$config7;\n var _ref6 = pt['_usept'] || ((_this$$config7 = this.$config) === null || _this$$config7 === void 0 ? void 0 : _this$$config7.ptOptions) || {},\n _ref6$mergeSections = _ref6.mergeSections,\n mergeSections = _ref6$mergeSections === void 0 ? true : _ref6$mergeSections,\n _ref6$mergeProps = _ref6.mergeProps,\n useMergeProps = _ref6$mergeProps === void 0 ? false : _ref6$mergeProps;\n var originalValue = fn(pt.originalValue);\n var value = fn(pt.value);\n if (originalValue === undefined && value === undefined) return undefined;else if (ObjectUtils.isString(value)) return value;else if (ObjectUtils.isString(originalValue)) return originalValue;\n return mergeSections || !mergeSections && value ? useMergeProps ? mergeProps(originalValue, value) : _objectSpread(_objectSpread({}, originalValue), value) : value;\n }\n return fn(pt);\n },\n _useGlobalPT: function _useGlobalPT(callback, key, params) {\n return this._usePT(this.globalPT, callback, key, params);\n },\n _useDefaultPT: function _useDefaultPT(callback, key, params) {\n return this._usePT(this.defaultPT, callback, key, params);\n },\n ptm: function ptm() {\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this._getPTValue(this.pt, key, _objectSpread(_objectSpread({}, this.$params), params));\n },\n ptmo: function ptmo() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return this._getPTValue(obj, key, _objectSpread({\n instance: this\n }, params), false);\n },\n cx: function cx() {\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return !this.isUnstyled ? this._getOptionValue(this.$style.classes, key, _objectSpread(_objectSpread({}, this.$params), params)) : undefined;\n },\n sx: function sx() {\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var when = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (when) {\n var self = this._getOptionValue(this.$style.inlineStyles, key, _objectSpread(_objectSpread({}, this.$params), params));\n var base = this._getOptionValue(BaseComponentStyle.inlineStyles, key, _objectSpread(_objectSpread({}, this.$params), params));\n return [base, self];\n }\n return undefined;\n }\n },\n computed: {\n globalPT: function globalPT() {\n var _this$$config8,\n _this2 = this;\n return this._getPT((_this$$config8 = this.$config) === null || _this$$config8 === void 0 ? void 0 : _this$$config8.pt, undefined, function (value) {\n return ObjectUtils.getItemValue(value, {\n instance: _this2\n });\n });\n },\n defaultPT: function defaultPT() {\n var _this$$config9,\n _this3 = this;\n return this._getPT((_this$$config9 = this.$config) === null || _this$$config9 === void 0 ? void 0 : _this$$config9.pt, undefined, function (value) {\n return _this3._getOptionValue(value, _this3.$name, _objectSpread({}, _this3.$params)) || ObjectUtils.getItemValue(value, _objectSpread({}, _this3.$params));\n });\n },\n isUnstyled: function isUnstyled() {\n var _this$$config10;\n return this.unstyled !== undefined ? this.unstyled : (_this$$config10 = this.$config) === null || _this$$config10 === void 0 ? void 0 : _this$$config10.unstyled;\n },\n $params: function $params() {\n var parentInstance = this.$parentInstance || this.$parent;\n return {\n instance: this,\n props: this.$props,\n state: this.$data,\n attrs: this.$attrs,\n parent: {\n instance: parentInstance,\n props: parentInstance === null || parentInstance === void 0 ? void 0 : parentInstance.$props,\n state: parentInstance === null || parentInstance === void 0 ? void 0 : parentInstance.$data,\n attrs: parentInstance === null || parentInstance === void 0 ? void 0 : parentInstance.$attrs\n },\n /* @deprecated since v3.43.0. Use the `parent.instance` instead of the `parentInstance`.*/\n parentInstance: parentInstance\n };\n },\n $style: function $style() {\n return _objectSpread(_objectSpread({\n classes: undefined,\n inlineStyles: undefined,\n loadStyle: function loadStyle() {},\n loadCustomStyle: function loadCustomStyle() {}\n }, (this._getHostInstance(this) || {}).$style), this.$options.style);\n },\n $config: function $config() {\n var _this$$primevue4;\n return (_this$$primevue4 = this.$primevue) === null || _this$$primevue4 === void 0 ? void 0 : _this$$primevue4.config;\n },\n $name: function $name() {\n return this.$options.hostName || this.$.type.name;\n }\n }\n};\n\nexport { script as default };\n","import BadgeStyle from 'primevue/badge/style';\nimport BaseComponent from 'primevue/basecomponent';\nimport { openBlock, createElementBlock, mergeProps, renderSlot, createTextVNode, toDisplayString } from 'vue';\n\nvar script$1 = {\n name: 'BaseBadge',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": null\n },\n severity: {\n type: String,\n \"default\": null\n },\n size: {\n type: String,\n \"default\": null\n }\n },\n style: BadgeStyle,\n provide: function provide() {\n return {\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Badge',\n \"extends\": script$1\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptm('root'), {\n \"data-pc-name\": \"badge\"\n }), [renderSlot(_ctx.$slots, \"default\", {}, function () {\n return [createTextVNode(toDisplayString(_ctx.value), 1)];\n })], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n","import BaseStyle from 'primevue/base/style';\n\nvar css = \"\\n.p-icon {\\n display: inline-block;\\n}\\n\\n.p-icon-spin {\\n -webkit-animation: p-icon-spin 2s infinite linear;\\n animation: p-icon-spin 2s infinite linear;\\n}\\n\\n@-webkit-keyframes p-icon-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(359deg);\\n transform: rotate(359deg);\\n }\\n}\\n\\n@keyframes p-icon-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(359deg);\\n transform: rotate(359deg);\\n }\\n}\\n\";\nvar BaseIconStyle = BaseStyle.extend({\n name: 'baseicon',\n css: css\n});\n\nexport { BaseIconStyle as default };\n","import BaseComponent from 'primevue/basecomponent';\nimport BaseIconStyle from 'primevue/baseicon/style';\nimport { ObjectUtils } from 'primevue/utils';\n\nvar script = {\n name: 'BaseIcon',\n \"extends\": BaseComponent,\n props: {\n label: {\n type: String,\n \"default\": undefined\n },\n spin: {\n type: Boolean,\n \"default\": false\n }\n },\n style: BaseIconStyle,\n beforeMount: function beforeMount() {\n var _this$$config;\n BaseIconStyle.loadStyle({\n nonce: (_this$$config = this.$config) === null || _this$$config === void 0 || (_this$$config = _this$$config.csp) === null || _this$$config === void 0 ? void 0 : _this$$config.nonce\n });\n },\n methods: {\n pti: function pti() {\n var isLabelEmpty = ObjectUtils.isEmpty(this.label);\n return {\n \"class\": ['p-icon', {\n 'p-icon-spin': this.spin\n }],\n role: !isLabelEmpty ? 'img' : undefined,\n 'aria-label': !isLabelEmpty ? this.label : undefined,\n 'aria-hidden': isLabelEmpty\n };\n }\n },\n computed: {\n $config: function $config() {\n var _this$$primevue;\n return (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.config;\n }\n }\n};\n\nexport { script as default };\n","import BaseIcon from 'primevue/baseicon';\nimport { UniqueComponentId } from 'primevue/utils';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'SpinnerIcon',\n \"extends\": BaseIcon,\n computed: {\n pathId: function pathId() {\n return \"pv_icon_clip_\".concat(UniqueComponentId());\n }\n }\n};\n\nvar _hoisted_1 = [\"clipPath\"];\nvar _hoisted_2 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_3 = [_hoisted_2];\nvar _hoisted_4 = [\"id\"];\nvar _hoisted_5 = /*#__PURE__*/createElementVNode(\"rect\", {\n width: \"14\",\n height: \"14\",\n fill: \"white\"\n}, null, -1);\nvar _hoisted_6 = [_hoisted_5];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), [createElementVNode(\"g\", {\n clipPath: \"url(#\".concat($options.pathId, \")\")\n }, _hoisted_3, 8, _hoisted_1), createElementVNode(\"defs\", null, [createElementVNode(\"clipPath\", {\n id: \"\".concat($options.pathId)\n }, _hoisted_6, 8, _hoisted_4)])], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n","import BaseStyle from 'primevue/base/style';\nimport { ObjectUtils } from 'primevue/utils';\nimport { mergeProps } from 'vue';\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); }\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; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar BaseDirective = {\n _getMeta: function _getMeta() {\n return [ObjectUtils.isObject(arguments.length <= 0 ? undefined : arguments[0]) ? undefined : arguments.length <= 0 ? undefined : arguments[0], ObjectUtils.getItemValue(ObjectUtils.isObject(arguments.length <= 0 ? undefined : arguments[0]) ? arguments.length <= 0 ? undefined : arguments[0] : arguments.length <= 1 ? undefined : arguments[1])];\n },\n _getConfig: function _getConfig(binding, vnode) {\n var _ref, _binding$instance, _vnode$ctx;\n return (_ref = (binding === null || binding === void 0 || (_binding$instance = binding.instance) === null || _binding$instance === void 0 ? void 0 : _binding$instance.$primevue) || (vnode === null || vnode === void 0 || (_vnode$ctx = vnode.ctx) === null || _vnode$ctx === void 0 || (_vnode$ctx = _vnode$ctx.appContext) === null || _vnode$ctx === void 0 || (_vnode$ctx = _vnode$ctx.config) === null || _vnode$ctx === void 0 || (_vnode$ctx = _vnode$ctx.globalProperties) === null || _vnode$ctx === void 0 ? void 0 : _vnode$ctx.$primevue)) === null || _ref === void 0 ? void 0 : _ref.config;\n },\n _getOptionValue: function _getOptionValue(options) {\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var fKeys = ObjectUtils.toFlatCase(key).split('.');\n var fKey = fKeys.shift();\n return fKey ? ObjectUtils.isObject(options) ? BaseDirective._getOptionValue(ObjectUtils.getItemValue(options[Object.keys(options).find(function (k) {\n return ObjectUtils.toFlatCase(k) === fKey;\n }) || ''], params), fKeys.join('.'), params) : undefined : ObjectUtils.getItemValue(options, params);\n },\n _getPTValue: function _getPTValue() {\n var _instance$binding, _instance$$config;\n var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n var params = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var searchInDefaultPT = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var getValue = function getValue() {\n var value = BaseDirective._getOptionValue.apply(BaseDirective, arguments);\n return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? {\n \"class\": value\n } : value;\n };\n var datasetPrefix = 'data-pc-';\n var _ref2 = ((_instance$binding = instance.binding) === null || _instance$binding === void 0 || (_instance$binding = _instance$binding.value) === null || _instance$binding === void 0 ? void 0 : _instance$binding.ptOptions) || ((_instance$$config = instance.$config) === null || _instance$$config === void 0 ? void 0 : _instance$$config.ptOptions) || {},\n _ref2$mergeSections = _ref2.mergeSections,\n mergeSections = _ref2$mergeSections === void 0 ? true : _ref2$mergeSections,\n _ref2$mergeProps = _ref2.mergeProps,\n useMergeProps = _ref2$mergeProps === void 0 ? false : _ref2$mergeProps;\n var global = searchInDefaultPT ? BaseDirective._useDefaultPT(instance, instance.defaultPT(), getValue, key, params) : undefined;\n var self = BaseDirective._usePT(instance, BaseDirective._getPT(obj, instance.$name), getValue, key, _objectSpread(_objectSpread({}, params), {}, {\n global: global || {}\n }));\n var datasets = _objectSpread(_objectSpread({}, key === 'root' && _defineProperty({}, \"\".concat(datasetPrefix, \"name\"), ObjectUtils.toFlatCase(instance.$name))), {}, _defineProperty({}, \"\".concat(datasetPrefix, \"section\"), ObjectUtils.toFlatCase(key)));\n return mergeSections || !mergeSections && self ? useMergeProps ? mergeProps(global, self, datasets) : _objectSpread(_objectSpread(_objectSpread({}, global), self), datasets) : _objectSpread(_objectSpread({}, self), datasets);\n },\n _getPT: function _getPT(pt) {\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var getValue = function getValue(value) {\n var _computedValue$_key;\n var computedValue = callback ? callback(value) : value;\n var _key = ObjectUtils.toFlatCase(key);\n return (_computedValue$_key = computedValue === null || computedValue === void 0 ? void 0 : computedValue[_key]) !== null && _computedValue$_key !== void 0 ? _computedValue$_key : computedValue;\n };\n return pt !== null && pt !== void 0 && pt.hasOwnProperty('_usept') ? {\n _usept: pt['_usept'],\n originalValue: getValue(pt.originalValue),\n value: getValue(pt.value)\n } : getValue(pt);\n },\n _usePT: function _usePT() {\n var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var pt = arguments.length > 1 ? arguments[1] : undefined;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var key = arguments.length > 3 ? arguments[3] : undefined;\n var params = arguments.length > 4 ? arguments[4] : undefined;\n var fn = function fn(value) {\n return callback(value, key, params);\n };\n if (pt !== null && pt !== void 0 && pt.hasOwnProperty('_usept')) {\n var _instance$$config2;\n var _ref4 = pt['_usept'] || ((_instance$$config2 = instance.$config) === null || _instance$$config2 === void 0 ? void 0 : _instance$$config2.ptOptions) || {},\n _ref4$mergeSections = _ref4.mergeSections,\n mergeSections = _ref4$mergeSections === void 0 ? true : _ref4$mergeSections,\n _ref4$mergeProps = _ref4.mergeProps,\n useMergeProps = _ref4$mergeProps === void 0 ? false : _ref4$mergeProps;\n var originalValue = fn(pt.originalValue);\n var value = fn(pt.value);\n if (originalValue === undefined && value === undefined) return undefined;else if (ObjectUtils.isString(value)) return value;else if (ObjectUtils.isString(originalValue)) return originalValue;\n return mergeSections || !mergeSections && value ? useMergeProps ? mergeProps(originalValue, value) : _objectSpread(_objectSpread({}, originalValue), value) : value;\n }\n return fn(pt);\n },\n _useDefaultPT: function _useDefaultPT() {\n var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaultPT = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var key = arguments.length > 3 ? arguments[3] : undefined;\n var params = arguments.length > 4 ? arguments[4] : undefined;\n return BaseDirective._usePT(instance, defaultPT, callback, key, params);\n },\n _hook: function _hook(directiveName, hookName, el, binding, vnode, prevVnode) {\n var _binding$value, _config$pt;\n var name = \"on\".concat(ObjectUtils.toCapitalCase(hookName));\n var config = BaseDirective._getConfig(binding, vnode);\n var instance = el === null || el === void 0 ? void 0 : el.$instance;\n var selfHook = BaseDirective._usePT(instance, BaseDirective._getPT(binding === null || binding === void 0 || (_binding$value = binding.value) === null || _binding$value === void 0 ? void 0 : _binding$value.pt, directiveName), BaseDirective._getOptionValue, \"hooks.\".concat(name));\n var defaultHook = BaseDirective._useDefaultPT(instance, config === null || config === void 0 || (_config$pt = config.pt) === null || _config$pt === void 0 || (_config$pt = _config$pt.directives) === null || _config$pt === void 0 ? void 0 : _config$pt[directiveName], BaseDirective._getOptionValue, \"hooks.\".concat(name));\n var options = {\n el: el,\n binding: binding,\n vnode: vnode,\n prevVnode: prevVnode\n };\n selfHook === null || selfHook === void 0 || selfHook(instance, options);\n defaultHook === null || defaultHook === void 0 || defaultHook(instance, options);\n },\n _extend: function _extend(name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var handleHook = function handleHook(hook, el, binding, vnode, prevVnode) {\n var _el$$instance$hook, _el$$instance7;\n el._$instances = el._$instances || {};\n var config = BaseDirective._getConfig(binding, vnode);\n var $prevInstance = el._$instances[name] || {};\n var $options = ObjectUtils.isEmpty($prevInstance) ? _objectSpread(_objectSpread({}, options), options === null || options === void 0 ? void 0 : options.methods) : {};\n el._$instances[name] = _objectSpread(_objectSpread({}, $prevInstance), {}, {\n /* new instance variables to pass in directive methods */\n $name: name,\n $host: el,\n $binding: binding,\n $modifiers: binding === null || binding === void 0 ? void 0 : binding.modifiers,\n $value: binding === null || binding === void 0 ? void 0 : binding.value,\n $el: $prevInstance['$el'] || el || undefined,\n $style: _objectSpread({\n classes: undefined,\n inlineStyles: undefined,\n loadStyle: function loadStyle() {}\n }, options === null || options === void 0 ? void 0 : options.style),\n $config: config,\n /* computed instance variables */\n defaultPT: function defaultPT() {\n return BaseDirective._getPT(config === null || config === void 0 ? void 0 : config.pt, undefined, function (value) {\n var _value$directives;\n return value === null || value === void 0 || (_value$directives = value.directives) === null || _value$directives === void 0 ? void 0 : _value$directives[name];\n });\n },\n isUnstyled: function isUnstyled() {\n var _el$$instance, _el$$instance2;\n return ((_el$$instance = el.$instance) === null || _el$$instance === void 0 || (_el$$instance = _el$$instance.$binding) === null || _el$$instance === void 0 || (_el$$instance = _el$$instance.value) === null || _el$$instance === void 0 ? void 0 : _el$$instance.unstyled) !== undefined ? (_el$$instance2 = el.$instance) === null || _el$$instance2 === void 0 || (_el$$instance2 = _el$$instance2.$binding) === null || _el$$instance2 === void 0 || (_el$$instance2 = _el$$instance2.value) === null || _el$$instance2 === void 0 ? void 0 : _el$$instance2.unstyled : config === null || config === void 0 ? void 0 : config.unstyled;\n },\n /* instance's methods */\n ptm: function ptm() {\n var _el$$instance3;\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return BaseDirective._getPTValue(el.$instance, (_el$$instance3 = el.$instance) === null || _el$$instance3 === void 0 || (_el$$instance3 = _el$$instance3.$binding) === null || _el$$instance3 === void 0 || (_el$$instance3 = _el$$instance3.value) === null || _el$$instance3 === void 0 ? void 0 : _el$$instance3.pt, key, _objectSpread({}, params));\n },\n ptmo: function ptmo() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return BaseDirective._getPTValue(el.$instance, obj, key, params, false);\n },\n cx: function cx() {\n var _el$$instance4, _el$$instance5;\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return !((_el$$instance4 = el.$instance) !== null && _el$$instance4 !== void 0 && _el$$instance4.isUnstyled()) ? BaseDirective._getOptionValue((_el$$instance5 = el.$instance) === null || _el$$instance5 === void 0 || (_el$$instance5 = _el$$instance5.$style) === null || _el$$instance5 === void 0 ? void 0 : _el$$instance5.classes, key, _objectSpread({}, params)) : undefined;\n },\n sx: function sx() {\n var _el$$instance6;\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var when = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return when ? BaseDirective._getOptionValue((_el$$instance6 = el.$instance) === null || _el$$instance6 === void 0 || (_el$$instance6 = _el$$instance6.$style) === null || _el$$instance6 === void 0 ? void 0 : _el$$instance6.inlineStyles, key, _objectSpread({}, params)) : undefined;\n }\n }, $options);\n el.$instance = el._$instances[name]; // pass instance data to hooks\n (_el$$instance$hook = (_el$$instance7 = el.$instance)[hook]) === null || _el$$instance$hook === void 0 || _el$$instance$hook.call(_el$$instance7, el, binding, vnode, prevVnode); // handle hook in directive implementation\n BaseDirective._hook(name, hook, el, binding, vnode, prevVnode); // handle hooks during directive uses (global and self-definition)\n };\n return {\n created: function created(el, binding, vnode, prevVnode) {\n handleHook('created', el, binding, vnode, prevVnode);\n },\n beforeMount: function beforeMount(el, binding, vnode, prevVnode) {\n var _config$csp, _el$$instance8, _el$$instance9, _config$csp2;\n var config = BaseDirective._getConfig(binding, vnode);\n BaseStyle.loadStyle(undefined, {\n nonce: config === null || config === void 0 || (_config$csp = config.csp) === null || _config$csp === void 0 ? void 0 : _config$csp.nonce\n });\n !((_el$$instance8 = el.$instance) !== null && _el$$instance8 !== void 0 && _el$$instance8.isUnstyled()) && ((_el$$instance9 = el.$instance) === null || _el$$instance9 === void 0 || (_el$$instance9 = _el$$instance9.$style) === null || _el$$instance9 === void 0 ? void 0 : _el$$instance9.loadStyle(undefined, {\n nonce: config === null || config === void 0 || (_config$csp2 = config.csp) === null || _config$csp2 === void 0 ? void 0 : _config$csp2.nonce\n }));\n handleHook('beforeMount', el, binding, vnode, prevVnode);\n },\n mounted: function mounted(el, binding, vnode, prevVnode) {\n handleHook('mounted', el, binding, vnode, prevVnode);\n },\n beforeUpdate: function beforeUpdate(el, binding, vnode, prevVnode) {\n handleHook('beforeUpdate', el, binding, vnode, prevVnode);\n },\n updated: function updated(el, binding, vnode, prevVnode) {\n handleHook('updated', el, binding, vnode, prevVnode);\n },\n beforeUnmount: function beforeUnmount(el, binding, vnode, prevVnode) {\n handleHook('beforeUnmount', el, binding, vnode, prevVnode);\n },\n unmounted: function unmounted(el, binding, vnode, prevVnode) {\n handleHook('unmounted', el, binding, vnode, prevVnode);\n }\n };\n },\n extend: function extend() {\n var _BaseDirective$_getMe = BaseDirective._getMeta.apply(BaseDirective, arguments),\n _BaseDirective$_getMe2 = _slicedToArray(_BaseDirective$_getMe, 2),\n name = _BaseDirective$_getMe2[0],\n options = _BaseDirective$_getMe2[1];\n return _objectSpread({\n extend: function extend() {\n var _BaseDirective$_getMe3 = BaseDirective._getMeta.apply(BaseDirective, arguments),\n _BaseDirective$_getMe4 = _slicedToArray(_BaseDirective$_getMe3, 2),\n _name = _BaseDirective$_getMe4[0],\n _options = _BaseDirective$_getMe4[1];\n return BaseDirective.extend(_name, _objectSpread(_objectSpread(_objectSpread({}, options), options === null || options === void 0 ? void 0 : options.methods), _options));\n }\n }, BaseDirective._extend(name, options));\n }\n};\n\nexport { BaseDirective as default };\n","import BaseStyle from 'primevue/base/style';\n\nvar css = \"\\n@keyframes ripple {\\n 100% {\\n opacity: 0;\\n transform: scale(2.5);\\n }\\n}\\n\\n@layer primevue {\\n .p-ripple {\\n overflow: hidden;\\n position: relative;\\n }\\n\\n .p-ink {\\n display: block;\\n position: absolute;\\n background: rgba(255, 255, 255, 0.5);\\n border-radius: 100%;\\n transform: scale(0);\\n pointer-events: none;\\n }\\n\\n .p-ink-active {\\n animation: ripple 0.4s linear;\\n }\\n\\n .p-ripple-disabled .p-ink {\\n display: none !important;\\n }\\n}\\n\";\nvar classes = {\n root: 'p-ink'\n};\nvar RippleStyle = BaseStyle.extend({\n name: 'ripple',\n css: css,\n classes: classes\n});\n\nexport { RippleStyle as default };\n","import { DomHandler } from 'primevue/utils';\nimport BaseDirective from 'primevue/basedirective';\nimport RippleStyle from 'primevue/ripple/style';\n\nvar BaseRipple = BaseDirective.extend({\n style: RippleStyle\n});\n\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; }\nvar Ripple = BaseRipple.extend('ripple', {\n mounted: function mounted(el) {\n var _el$$instance;\n var config = el === null || el === void 0 || (_el$$instance = el.$instance) === null || _el$$instance === void 0 ? void 0 : _el$$instance.$config;\n if (config && config.ripple) {\n this.create(el);\n this.bindEvents(el);\n el.setAttribute('data-pd-ripple', true);\n }\n },\n unmounted: function unmounted(el) {\n this.remove(el);\n },\n timeout: undefined,\n methods: {\n bindEvents: function bindEvents(el) {\n el.addEventListener('mousedown', this.onMouseDown.bind(this));\n },\n unbindEvents: function unbindEvents(el) {\n el.removeEventListener('mousedown', this.onMouseDown.bind(this));\n },\n create: function create(el) {\n var ink = DomHandler.createElement('span', {\n role: 'presentation',\n 'aria-hidden': true,\n 'data-p-ink': true,\n 'data-p-ink-active': false,\n \"class\": !this.isUnstyled() && this.cx('root'),\n onAnimationEnd: this.onAnimationEnd.bind(this),\n 'p-bind': this.ptm('root')\n });\n el.appendChild(ink);\n this.$el = ink;\n },\n remove: function remove(el) {\n var ink = this.getInk(el);\n if (ink) {\n this.unbindEvents(el);\n ink.removeEventListener('animationend', this.onAnimationEnd);\n ink.remove();\n }\n },\n onMouseDown: function onMouseDown(event) {\n var _this = this;\n var target = event.currentTarget;\n var ink = this.getInk(target);\n if (!ink || getComputedStyle(ink, null).display === 'none') {\n return;\n }\n !this.isUnstyled() && DomHandler.removeClass(ink, 'p-ink-active');\n ink.setAttribute('data-p-ink-active', 'false');\n if (!DomHandler.getHeight(ink) && !DomHandler.getWidth(ink)) {\n var d = Math.max(DomHandler.getOuterWidth(target), DomHandler.getOuterHeight(target));\n ink.style.height = d + 'px';\n ink.style.width = d + 'px';\n }\n var offset = DomHandler.getOffset(target);\n var x = event.pageX - offset.left + document.body.scrollTop - DomHandler.getWidth(ink) / 2;\n var y = event.pageY - offset.top + document.body.scrollLeft - DomHandler.getHeight(ink) / 2;\n ink.style.top = y + 'px';\n ink.style.left = x + 'px';\n !this.isUnstyled() && DomHandler.addClass(ink, 'p-ink-active');\n ink.setAttribute('data-p-ink-active', 'true');\n this.timeout = setTimeout(function () {\n if (ink) {\n !_this.isUnstyled() && DomHandler.removeClass(ink, 'p-ink-active');\n ink.setAttribute('data-p-ink-active', 'false');\n }\n }, 401);\n },\n onAnimationEnd: function onAnimationEnd(event) {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n !this.isUnstyled() && DomHandler.removeClass(event.currentTarget, 'p-ink-active');\n event.currentTarget.setAttribute('data-p-ink-active', 'false');\n },\n getInk: function getInk(el) {\n return el && el.children ? _toConsumableArray(el.children).find(function (child) {\n return DomHandler.getAttribute(child, 'data-pc-name') === 'ripple';\n }) : undefined;\n }\n }\n});\n\nexport { Ripple as default };\n","import BaseStyle from 'primevue/base/style';\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); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance,\n props = _ref.props;\n return ['p-button p-component', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({\n 'p-button-icon-only': instance.hasIcon && !props.label && !props.badge,\n 'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label,\n 'p-disabled': instance.$attrs.disabled || instance.$attrs.disabled === '' || props.loading,\n 'p-button-loading': props.loading,\n 'p-button-loading-label-only': props.loading && !instance.hasIcon && props.label,\n 'p-button-link': props.link\n }, \"p-button-\".concat(props.severity), props.severity), 'p-button-raised', props.raised), 'p-button-rounded', props.rounded), 'p-button-text', props.text), 'p-button-outlined', props.outlined), 'p-button-sm', props.size === 'small'), 'p-button-lg', props.size === 'large'), 'p-button-plain', props.plain)];\n },\n loadingIcon: 'p-button-loading-icon pi-spin',\n icon: function icon(_ref3) {\n var props = _ref3.props;\n return ['p-button-icon', {\n 'p-button-icon-left': props.iconPos === 'left' && props.label,\n 'p-button-icon-right': props.iconPos === 'right' && props.label,\n 'p-button-icon-top': props.iconPos === 'top' && props.label,\n 'p-button-icon-bottom': props.iconPos === 'bottom' && props.label\n }];\n },\n label: 'p-button-label'\n};\nvar ButtonStyle = BaseStyle.extend({\n name: 'button',\n classes: classes\n});\n\nexport { ButtonStyle as default };\n","import Badge from 'primevue/badge';\nimport SpinnerIcon from 'primevue/icons/spinner';\nimport Ripple from 'primevue/ripple';\nimport BaseComponent from 'primevue/basecomponent';\nimport ButtonStyle from 'primevue/button/style';\nimport { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, createBlock, createCommentVNode, createElementVNode, toDisplayString } from 'vue';\n\nvar script$1 = {\n name: 'BaseButton',\n \"extends\": BaseComponent,\n props: {\n label: {\n type: String,\n \"default\": null\n },\n icon: {\n type: String,\n \"default\": null\n },\n iconPos: {\n type: String,\n \"default\": 'left'\n },\n iconClass: {\n type: String,\n \"default\": null\n },\n badge: {\n type: String,\n \"default\": null\n },\n badgeClass: {\n type: String,\n \"default\": null\n },\n badgeSeverity: {\n type: String,\n \"default\": null\n },\n loading: {\n type: Boolean,\n \"default\": false\n },\n loadingIcon: {\n type: String,\n \"default\": undefined\n },\n link: {\n type: Boolean,\n \"default\": false\n },\n severity: {\n type: String,\n \"default\": null\n },\n raised: {\n type: Boolean,\n \"default\": false\n },\n rounded: {\n type: Boolean,\n \"default\": false\n },\n text: {\n type: Boolean,\n \"default\": false\n },\n outlined: {\n type: Boolean,\n \"default\": false\n },\n size: {\n type: String,\n \"default\": null\n },\n plain: {\n type: Boolean,\n \"default\": false\n }\n },\n style: ButtonStyle,\n provide: function provide() {\n return {\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Button',\n \"extends\": script$1,\n methods: {\n getPTOptions: function getPTOptions(key) {\n return this.ptm(key, {\n context: {\n disabled: this.disabled\n }\n });\n }\n },\n computed: {\n disabled: function disabled() {\n return this.$attrs.disabled || this.$attrs.disabled === '' || this.loading;\n },\n defaultAriaLabel: function defaultAriaLabel() {\n return this.label ? this.label + (this.badge ? ' ' + this.badge : '') : this.$attrs.ariaLabel;\n },\n hasIcon: function hasIcon() {\n return this.icon || this.$slots.icon;\n }\n },\n components: {\n SpinnerIcon: SpinnerIcon,\n Badge: Badge\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1 = [\"aria-label\", \"disabled\", \"data-pc-severity\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_SpinnerIcon = resolveComponent(\"SpinnerIcon\");\n var _component_Badge = resolveComponent(\"Badge\");\n var _directive_ripple = resolveDirective(\"ripple\");\n return withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n \"class\": _ctx.cx('root'),\n type: \"button\",\n \"aria-label\": $options.defaultAriaLabel,\n disabled: $options.disabled\n }, $options.getPTOptions('root'), {\n \"data-pc-name\": \"button\",\n \"data-pc-severity\": _ctx.severity\n }), [renderSlot(_ctx.$slots, \"default\", {}, function () {\n return [_ctx.loading ? renderSlot(_ctx.$slots, \"loadingicon\", {\n key: 0,\n \"class\": normalizeClass([_ctx.cx('loadingIcon'), _ctx.cx('icon')])\n }, function () {\n return [_ctx.loadingIcon ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('loadingIcon'), _ctx.cx('icon'), _ctx.loadingIcon]\n }, _ctx.ptm('loadingIcon')), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({\n key: 1,\n \"class\": [_ctx.cx('loadingIcon'), _ctx.cx('icon')],\n spin: \"\"\n }, _ctx.ptm('loadingIcon')), null, 16, [\"class\"]))];\n }) : renderSlot(_ctx.$slots, \"icon\", {\n key: 1,\n \"class\": normalizeClass([_ctx.cx('icon')])\n }, function () {\n return [_ctx.icon ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('icon'), _ctx.icon, _ctx.iconClass]\n }, _ctx.ptm('icon')), null, 16)) : createCommentVNode(\"\", true)];\n }), createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('label')\n }, _ctx.ptm('label')), toDisplayString(_ctx.label || ' '), 17), _ctx.badge ? (openBlock(), createBlock(_component_Badge, mergeProps({\n key: 2,\n value: _ctx.badge,\n \"class\": _ctx.badgeClass,\n severity: _ctx.badgeSeverity,\n unstyled: _ctx.unstyled\n }, _ctx.ptm('badge')), null, 16, [\"value\", \"class\", \"severity\", \"unstyled\"])) : createCommentVNode(\"\", true)];\n })], 16, _hoisted_1)), [[_directive_ripple]]);\n}\n\nscript.render = render;\n\nexport { script as default };\n","import BaseIcon from 'primevue/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'AngleDownIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n","import BaseIcon from 'primevue/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'AngleUpIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n","import BaseStyle from 'primevue/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance,\n props = _ref.props;\n return ['p-inputtext p-component', {\n 'p-filled': instance.filled,\n 'p-inputtext-sm': props.size === 'small',\n 'p-inputtext-lg': props.size === 'large'\n }];\n }\n};\nvar InputTextStyle = BaseStyle.extend({\n name: 'inputtext',\n classes: classes\n});\n\nexport { InputTextStyle as default };\n","import BaseComponent from 'primevue/basecomponent';\nimport InputTextStyle from 'primevue/inputtext/style';\nimport { openBlock, createElementBlock, mergeProps } from 'vue';\n\nvar script$1 = {\n name: 'BaseInputText',\n \"extends\": BaseComponent,\n props: {\n modelValue: null,\n size: {\n type: String,\n \"default\": null\n }\n },\n style: InputTextStyle,\n provide: function provide() {\n return {\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'InputText',\n \"extends\": script$1,\n emits: ['update:modelValue'],\n methods: {\n getPTOptions: function getPTOptions(key) {\n return this.ptm(key, {\n context: {\n filled: this.filled,\n disabled: this.$attrs.disabled || this.$attrs.disabled === ''\n }\n });\n },\n onInput: function onInput(event) {\n this.$emit('update:modelValue', event.target.value);\n }\n },\n computed: {\n filled: function filled() {\n return this.modelValue != null && this.modelValue.toString().length > 0;\n }\n }\n};\n\nvar _hoisted_1 = [\"value\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"input\", mergeProps({\n \"class\": _ctx.cx('root'),\n value: _ctx.modelValue,\n onInput: _cache[0] || (_cache[0] = function () {\n return $options.onInput && $options.onInput.apply($options, arguments);\n })\n }, $options.getPTOptions('root'), {\n \"data-pc-name\": \"inputtext\"\n }), null, 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n","import BaseStyle from 'primevue/base/style';\n\nvar css = \"\\n@layer primevue {\\n .p-inputnumber {\\n display: inline-flex;\\n }\\n\\n .p-inputnumber-button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex: 0 0 auto;\\n }\\n\\n .p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,\\n .p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label {\\n display: none;\\n }\\n\\n .p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-bottom-right-radius: 0;\\n padding: 0;\\n }\\n\\n .p-inputnumber-buttons-stacked .p-inputnumber-input {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n }\\n\\n .p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down {\\n border-top-left-radius: 0;\\n border-top-right-radius: 0;\\n border-bottom-left-radius: 0;\\n padding: 0;\\n }\\n\\n .p-inputnumber-buttons-stacked .p-inputnumber-button-group {\\n display: flex;\\n flex-direction: column;\\n }\\n\\n .p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\\n flex: 1 1 auto;\\n }\\n\\n .p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\\n order: 3;\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n }\\n\\n .p-inputnumber-buttons-horizontal .p-inputnumber-input {\\n order: 2;\\n border-radius: 0;\\n }\\n\\n .p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\\n order: 1;\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n }\\n\\n .p-inputnumber-buttons-vertical {\\n flex-direction: column;\\n }\\n\\n .p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\\n order: 1;\\n border-bottom-left-radius: 0;\\n border-bottom-right-radius: 0;\\n width: 100%;\\n }\\n\\n .p-inputnumber-buttons-vertical .p-inputnumber-input {\\n order: 2;\\n border-radius: 0;\\n text-align: center;\\n }\\n\\n .p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\\n order: 3;\\n border-top-left-radius: 0;\\n border-top-right-radius: 0;\\n width: 100%;\\n }\\n\\n .p-inputnumber-input {\\n flex: 1 1 auto;\\n }\\n\\n .p-fluid .p-inputnumber {\\n width: 100%;\\n }\\n\\n .p-fluid .p-inputnumber .p-inputnumber-input {\\n width: 1%;\\n }\\n\\n .p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input {\\n width: 100%;\\n }\\n}\\n\";\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance,\n props = _ref.props;\n return ['p-inputnumber p-component p-inputwrapper', {\n 'p-inputwrapper-filled': instance.filled || props.allowEmpty === false,\n 'p-inputwrapper-focus': instance.focused,\n 'p-inputnumber-buttons-stacked': props.showButtons && props.buttonLayout === 'stacked',\n 'p-inputnumber-buttons-horizontal': props.showButtons && props.buttonLayout === 'horizontal',\n 'p-inputnumber-buttons-vertical': props.showButtons && props.buttonLayout === 'vertical'\n }];\n },\n input: 'p-inputnumber-input',\n buttonGroup: 'p-inputnumber-button-group',\n incrementButton: function incrementButton(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-inputnumber-button p-inputnumber-button-up', {\n 'p-disabled': props.showButtons && props.max !== null && instance.maxBoundry()\n }];\n },\n decrementButton: function decrementButton(_ref3) {\n var instance = _ref3.instance,\n props = _ref3.props;\n return ['p-inputnumber-button p-inputnumber-button-down', {\n 'p-disabled': props.showButtons && props.min !== null && instance.minBoundry()\n }];\n }\n};\nvar InputNumberStyle = BaseStyle.extend({\n name: 'inputnumber',\n css: css,\n classes: classes\n});\n\nexport { InputNumberStyle as default };\n","import Button from 'primevue/button';\nimport AngleDownIcon from 'primevue/icons/angledown';\nimport AngleUpIcon from 'primevue/icons/angleup';\nimport InputText from 'primevue/inputtext';\nimport { DomHandler } from 'primevue/utils';\nimport BaseComponent from 'primevue/basecomponent';\nimport InputNumberStyle from 'primevue/inputnumber/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, toHandlers, withCtx, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseInputNumber',\n \"extends\": BaseComponent,\n props: {\n modelValue: {\n type: Number,\n \"default\": null\n },\n format: {\n type: Boolean,\n \"default\": true\n },\n showButtons: {\n type: Boolean,\n \"default\": false\n },\n buttonLayout: {\n type: String,\n \"default\": 'stacked'\n },\n incrementButtonClass: {\n type: String,\n \"default\": null\n },\n decrementButtonClass: {\n type: String,\n \"default\": null\n },\n incrementButtonIcon: {\n type: String,\n \"default\": undefined\n },\n decrementButtonIcon: {\n type: String,\n \"default\": undefined\n },\n locale: {\n type: String,\n \"default\": undefined\n },\n localeMatcher: {\n type: String,\n \"default\": undefined\n },\n mode: {\n type: String,\n \"default\": 'decimal'\n },\n prefix: {\n type: String,\n \"default\": null\n },\n suffix: {\n type: String,\n \"default\": null\n },\n currency: {\n type: String,\n \"default\": undefined\n },\n currencyDisplay: {\n type: String,\n \"default\": undefined\n },\n useGrouping: {\n type: Boolean,\n \"default\": true\n },\n minFractionDigits: {\n type: Number,\n \"default\": undefined\n },\n maxFractionDigits: {\n type: Number,\n \"default\": undefined\n },\n min: {\n type: Number,\n \"default\": null\n },\n max: {\n type: Number,\n \"default\": null\n },\n step: {\n type: Number,\n \"default\": 1\n },\n allowEmpty: {\n type: Boolean,\n \"default\": true\n },\n highlightOnFocus: {\n type: Boolean,\n \"default\": false\n },\n readonly: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n placeholder: {\n type: String,\n \"default\": null\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n inputProps: {\n type: null,\n \"default\": null\n },\n incrementButtonProps: {\n type: null,\n \"default\": null\n },\n decrementButtonProps: {\n type: null,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: InputNumberStyle,\n provide: function provide() {\n return {\n $parentInstance: this\n };\n }\n};\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); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\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; }\nvar script = {\n name: 'InputNumber',\n \"extends\": script$1,\n emits: ['update:modelValue', 'input', 'focus', 'blur'],\n numberFormat: null,\n _numeral: null,\n _decimal: null,\n _group: null,\n _minusSign: null,\n _currency: null,\n _suffix: null,\n _prefix: null,\n _index: null,\n groupChar: '',\n isSpecialChar: null,\n prefixChar: null,\n suffixChar: null,\n timer: null,\n data: function data() {\n return {\n d_modelValue: this.modelValue,\n focused: false\n };\n },\n watch: {\n modelValue: function modelValue(newValue) {\n this.d_modelValue = newValue;\n },\n locale: function locale(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n localeMatcher: function localeMatcher(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n mode: function mode(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n currency: function currency(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n currencyDisplay: function currencyDisplay(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n useGrouping: function useGrouping(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n minFractionDigits: function minFractionDigits(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n maxFractionDigits: function maxFractionDigits(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n suffix: function suffix(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n prefix: function prefix(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n }\n },\n created: function created() {\n this.constructParser();\n },\n methods: {\n getOptions: function getOptions() {\n return {\n localeMatcher: this.localeMatcher,\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n useGrouping: this.useGrouping,\n minimumFractionDigits: this.minFractionDigits,\n maximumFractionDigits: this.maxFractionDigits\n };\n },\n constructParser: function constructParser() {\n this.numberFormat = new Intl.NumberFormat(this.locale, this.getOptions());\n var numerals = _toConsumableArray(new Intl.NumberFormat(this.locale, {\n useGrouping: false\n }).format(9876543210)).reverse();\n var index = new Map(numerals.map(function (d, i) {\n return [d, i];\n }));\n this._numeral = new RegExp(\"[\".concat(numerals.join(''), \"]\"), 'g');\n this._group = this.getGroupingExpression();\n this._minusSign = this.getMinusSignExpression();\n this._currency = this.getCurrencyExpression();\n this._decimal = this.getDecimalExpression();\n this._suffix = this.getSuffixExpression();\n this._prefix = this.getPrefixExpression();\n this._index = function (d) {\n return index.get(d);\n };\n },\n updateConstructParser: function updateConstructParser(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.constructParser();\n }\n },\n escapeRegExp: function escapeRegExp(text) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n },\n getDecimalExpression: function getDecimalExpression() {\n var formatter = new Intl.NumberFormat(this.locale, _objectSpread(_objectSpread({}, this.getOptions()), {}, {\n useGrouping: false\n }));\n return new RegExp(\"[\".concat(formatter.format(1.1).replace(this._currency, '').trim().replace(this._numeral, ''), \"]\"), 'g');\n },\n getGroupingExpression: function getGroupingExpression() {\n var formatter = new Intl.NumberFormat(this.locale, {\n useGrouping: true\n });\n this.groupChar = formatter.format(1000000).trim().replace(this._numeral, '').charAt(0);\n return new RegExp(\"[\".concat(this.groupChar, \"]\"), 'g');\n },\n getMinusSignExpression: function getMinusSignExpression() {\n var formatter = new Intl.NumberFormat(this.locale, {\n useGrouping: false\n });\n return new RegExp(\"[\".concat(formatter.format(-1).trim().replace(this._numeral, ''), \"]\"), 'g');\n },\n getCurrencyExpression: function getCurrencyExpression() {\n if (this.currency) {\n var formatter = new Intl.NumberFormat(this.locale, {\n style: 'currency',\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n minimumFractionDigits: 0,\n maximumFractionDigits: 0\n });\n return new RegExp(\"[\".concat(formatter.format(1).replace(/\\s/g, '').replace(this._numeral, '').replace(this._group, ''), \"]\"), 'g');\n }\n return new RegExp(\"[]\", 'g');\n },\n getPrefixExpression: function getPrefixExpression() {\n if (this.prefix) {\n this.prefixChar = this.prefix;\n } else {\n var formatter = new Intl.NumberFormat(this.locale, {\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay\n });\n this.prefixChar = formatter.format(1).split('1')[0];\n }\n return new RegExp(\"\".concat(this.escapeRegExp(this.prefixChar || '')), 'g');\n },\n getSuffixExpression: function getSuffixExpression() {\n if (this.suffix) {\n this.suffixChar = this.suffix;\n } else {\n var formatter = new Intl.NumberFormat(this.locale, {\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n minimumFractionDigits: 0,\n maximumFractionDigits: 0\n });\n this.suffixChar = formatter.format(1).split('1')[1];\n }\n return new RegExp(\"\".concat(this.escapeRegExp(this.suffixChar || '')), 'g');\n },\n formatValue: function formatValue(value) {\n if (value != null) {\n if (value === '-') {\n // Minus sign\n return value;\n }\n if (this.format) {\n var formatter = new Intl.NumberFormat(this.locale, this.getOptions());\n var formattedValue = formatter.format(value);\n if (this.prefix) {\n formattedValue = this.prefix + formattedValue;\n }\n if (this.suffix) {\n formattedValue = formattedValue + this.suffix;\n }\n return formattedValue;\n }\n return value.toString();\n }\n return '';\n },\n parseValue: function parseValue(text) {\n var filteredText = text.replace(this._suffix, '').replace(this._prefix, '').trim().replace(/\\s/g, '').replace(this._currency, '').replace(this._group, '').replace(this._minusSign, '-').replace(this._decimal, '.').replace(this._numeral, this._index);\n if (filteredText) {\n if (filteredText === '-')\n // Minus sign\n return filteredText;\n var parsedValue = +filteredText;\n return isNaN(parsedValue) ? null : parsedValue;\n }\n return null;\n },\n repeat: function repeat(event, interval, dir) {\n var _this = this;\n if (this.readonly) {\n return;\n }\n var i = interval || 500;\n this.clearTimer();\n this.timer = setTimeout(function () {\n _this.repeat(event, 40, dir);\n }, i);\n this.spin(event, dir);\n },\n spin: function spin(event, dir) {\n if (this.$refs.input) {\n var step = this.step * dir;\n var currentValue = this.parseValue(this.$refs.input.$el.value) || 0;\n var newValue = this.validateValue(currentValue + step);\n this.updateInput(newValue, null, 'spin');\n this.updateModel(event, newValue);\n this.handleOnInput(event, currentValue, newValue);\n }\n },\n onUpButtonMouseDown: function onUpButtonMouseDown(event) {\n if (!this.disabled) {\n this.$refs.input.$el.focus();\n this.repeat(event, null, 1);\n event.preventDefault();\n }\n },\n onUpButtonMouseUp: function onUpButtonMouseUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onUpButtonMouseLeave: function onUpButtonMouseLeave() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onUpButtonKeyUp: function onUpButtonKeyUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onUpButtonKeyDown: function onUpButtonKeyDown(event) {\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.repeat(event, null, 1);\n }\n },\n onDownButtonMouseDown: function onDownButtonMouseDown(event) {\n if (!this.disabled) {\n this.$refs.input.$el.focus();\n this.repeat(event, null, -1);\n event.preventDefault();\n }\n },\n onDownButtonMouseUp: function onDownButtonMouseUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onDownButtonMouseLeave: function onDownButtonMouseLeave() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onDownButtonKeyUp: function onDownButtonKeyUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onDownButtonKeyDown: function onDownButtonKeyDown(event) {\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.repeat(event, null, -1);\n }\n },\n onUserInput: function onUserInput() {\n if (this.isSpecialChar) {\n this.$refs.input.$el.value = this.lastValue;\n }\n this.isSpecialChar = false;\n },\n onInputKeyDown: function onInputKeyDown(event) {\n if (this.readonly) {\n return;\n }\n this.lastValue = event.target.value;\n if (event.shiftKey || event.altKey) {\n this.isSpecialChar = true;\n return;\n }\n var selectionStart = event.target.selectionStart;\n var selectionEnd = event.target.selectionEnd;\n var inputValue = event.target.value;\n var newValueStr = null;\n if (event.altKey) {\n event.preventDefault();\n }\n switch (event.code) {\n case 'ArrowUp':\n this.spin(event, 1);\n event.preventDefault();\n break;\n case 'ArrowDown':\n this.spin(event, -1);\n event.preventDefault();\n break;\n case 'ArrowLeft':\n if (!this.isNumeralChar(inputValue.charAt(selectionStart - 1))) {\n event.preventDefault();\n }\n break;\n case 'ArrowRight':\n if (!this.isNumeralChar(inputValue.charAt(selectionStart))) {\n event.preventDefault();\n }\n break;\n case 'Tab':\n case 'Enter':\n case 'NumpadEnter':\n newValueStr = this.validateValue(this.parseValue(inputValue));\n this.$refs.input.$el.value = this.formatValue(newValueStr);\n this.$refs.input.$el.setAttribute('aria-valuenow', newValueStr);\n this.updateModel(event, newValueStr);\n break;\n case 'Backspace':\n {\n event.preventDefault();\n if (selectionStart === selectionEnd) {\n var deleteChar = inputValue.charAt(selectionStart - 1);\n var _this$getDecimalCharI = this.getDecimalCharIndexes(inputValue),\n decimalCharIndex = _this$getDecimalCharI.decimalCharIndex,\n decimalCharIndexWithoutPrefix = _this$getDecimalCharI.decimalCharIndexWithoutPrefix;\n if (this.isNumeralChar(deleteChar)) {\n var decimalLength = this.getDecimalLength(inputValue);\n if (this._group.test(deleteChar)) {\n this._group.lastIndex = 0;\n newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);\n } else if (this._decimal.test(deleteChar)) {\n this._decimal.lastIndex = 0;\n if (decimalLength) {\n this.$refs.input.$el.setSelectionRange(selectionStart - 1, selectionStart - 1);\n } else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n } else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n var insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < decimalLength ? '' : '0';\n newValueStr = inputValue.slice(0, selectionStart - 1) + insertedText + inputValue.slice(selectionStart);\n } else if (decimalCharIndexWithoutPrefix === 1) {\n newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);\n newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';\n } else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n }\n this.updateValue(event, newValueStr, null, 'delete-single');\n } else {\n newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, null, 'delete-range');\n }\n break;\n }\n case 'Delete':\n event.preventDefault();\n if (selectionStart === selectionEnd) {\n var _deleteChar = inputValue.charAt(selectionStart);\n var _this$getDecimalCharI2 = this.getDecimalCharIndexes(inputValue),\n _decimalCharIndex = _this$getDecimalCharI2.decimalCharIndex,\n _decimalCharIndexWithoutPrefix = _this$getDecimalCharI2.decimalCharIndexWithoutPrefix;\n if (this.isNumeralChar(_deleteChar)) {\n var _decimalLength = this.getDecimalLength(inputValue);\n if (this._group.test(_deleteChar)) {\n this._group.lastIndex = 0;\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);\n } else if (this._decimal.test(_deleteChar)) {\n this._decimal.lastIndex = 0;\n if (_decimalLength) {\n this.$refs.input.$el.setSelectionRange(selectionStart + 1, selectionStart + 1);\n } else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n } else if (_decimalCharIndex > 0 && selectionStart > _decimalCharIndex) {\n var _insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < _decimalLength ? '' : '0';\n newValueStr = inputValue.slice(0, selectionStart) + _insertedText + inputValue.slice(selectionStart + 1);\n } else if (_decimalCharIndexWithoutPrefix === 1) {\n newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);\n newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';\n } else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n }\n this.updateValue(event, newValueStr, null, 'delete-back-single');\n } else {\n newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, null, 'delete-range');\n }\n break;\n case 'Home':\n if (this.min) {\n this.updateModel(event, this.min);\n event.preventDefault();\n }\n break;\n case 'End':\n if (this.max) {\n this.updateModel(event, this.max);\n event.preventDefault();\n }\n break;\n }\n },\n onInputKeyPress: function onInputKeyPress(event) {\n if (this.readonly) {\n return;\n }\n event.preventDefault();\n var code = event.which || event.keyCode;\n var _char = String.fromCharCode(code);\n var isDecimalSign = this.isDecimalSign(_char);\n var isMinusSign = this.isMinusSign(_char);\n if (48 <= code && code <= 57 || isMinusSign || isDecimalSign) {\n this.insert(event, _char, {\n isDecimalSign: isDecimalSign,\n isMinusSign: isMinusSign\n });\n }\n },\n onPaste: function onPaste(event) {\n event.preventDefault();\n var data = (event.clipboardData || window['clipboardData']).getData('Text');\n if (data) {\n var filteredData = this.parseValue(data);\n if (filteredData != null) {\n this.insert(event, filteredData.toString());\n }\n }\n },\n allowMinusSign: function allowMinusSign() {\n return this.min === null || this.min < 0;\n },\n isMinusSign: function isMinusSign(_char2) {\n if (this._minusSign.test(_char2) || _char2 === '-') {\n this._minusSign.lastIndex = 0;\n return true;\n }\n return false;\n },\n isDecimalSign: function isDecimalSign(_char3) {\n if (this._decimal.test(_char3)) {\n this._decimal.lastIndex = 0;\n return true;\n }\n return false;\n },\n isDecimalMode: function isDecimalMode() {\n return this.mode === 'decimal';\n },\n getDecimalCharIndexes: function getDecimalCharIndexes(val) {\n var decimalCharIndex = val.search(this._decimal);\n this._decimal.lastIndex = 0;\n var filteredVal = val.replace(this._prefix, '').trim().replace(/\\s/g, '').replace(this._currency, '');\n var decimalCharIndexWithoutPrefix = filteredVal.search(this._decimal);\n this._decimal.lastIndex = 0;\n return {\n decimalCharIndex: decimalCharIndex,\n decimalCharIndexWithoutPrefix: decimalCharIndexWithoutPrefix\n };\n },\n getCharIndexes: function getCharIndexes(val) {\n var decimalCharIndex = val.search(this._decimal);\n this._decimal.lastIndex = 0;\n var minusCharIndex = val.search(this._minusSign);\n this._minusSign.lastIndex = 0;\n var suffixCharIndex = val.search(this._suffix);\n this._suffix.lastIndex = 0;\n var currencyCharIndex = val.search(this._currency);\n this._currency.lastIndex = 0;\n return {\n decimalCharIndex: decimalCharIndex,\n minusCharIndex: minusCharIndex,\n suffixCharIndex: suffixCharIndex,\n currencyCharIndex: currencyCharIndex\n };\n },\n insert: function insert(event, text) {\n var sign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n isDecimalSign: false,\n isMinusSign: false\n };\n var minusCharIndexOnText = text.search(this._minusSign);\n this._minusSign.lastIndex = 0;\n if (!this.allowMinusSign() && minusCharIndexOnText !== -1) {\n return;\n }\n var selectionStart = this.$refs.input.$el.selectionStart;\n var selectionEnd = this.$refs.input.$el.selectionEnd;\n var inputValue = this.$refs.input.$el.value.trim();\n var _this$getCharIndexes = this.getCharIndexes(inputValue),\n decimalCharIndex = _this$getCharIndexes.decimalCharIndex,\n minusCharIndex = _this$getCharIndexes.minusCharIndex,\n suffixCharIndex = _this$getCharIndexes.suffixCharIndex,\n currencyCharIndex = _this$getCharIndexes.currencyCharIndex;\n var newValueStr;\n if (sign.isMinusSign) {\n if (selectionStart === 0) {\n newValueStr = inputValue;\n if (minusCharIndex === -1 || selectionEnd !== 0) {\n newValueStr = this.insertText(inputValue, text, 0, selectionEnd);\n }\n this.updateValue(event, newValueStr, text, 'insert');\n }\n } else if (sign.isDecimalSign) {\n if (decimalCharIndex > 0 && selectionStart === decimalCharIndex) {\n this.updateValue(event, inputValue, text, 'insert');\n } else if (decimalCharIndex > selectionStart && decimalCharIndex < selectionEnd) {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, 'insert');\n } else if (decimalCharIndex === -1 && this.maxFractionDigits) {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, 'insert');\n }\n } else {\n var maxFractionDigits = this.numberFormat.resolvedOptions().maximumFractionDigits;\n var operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';\n if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n if (selectionStart + text.length - (decimalCharIndex + 1) <= maxFractionDigits) {\n var charIndex = currencyCharIndex >= selectionStart ? currencyCharIndex - 1 : suffixCharIndex >= selectionStart ? suffixCharIndex : inputValue.length;\n newValueStr = inputValue.slice(0, selectionStart) + text + inputValue.slice(selectionStart + text.length, charIndex) + inputValue.slice(charIndex);\n this.updateValue(event, newValueStr, text, operation);\n }\n } else {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, operation);\n }\n }\n },\n insertText: function insertText(value, text, start, end) {\n var textSplit = text === '.' ? text : text.split('.');\n if (textSplit.length === 2) {\n var decimalCharIndex = value.slice(start, end).search(this._decimal);\n this._decimal.lastIndex = 0;\n return decimalCharIndex > 0 ? value.slice(0, start) + this.formatValue(text) + value.slice(end) : value || this.formatValue(text);\n } else if (end - start === value.length) {\n return this.formatValue(text);\n } else if (start === 0) {\n return text + value.slice(end);\n } else if (end === value.length) {\n return value.slice(0, start) + text;\n } else {\n return value.slice(0, start) + text + value.slice(end);\n }\n },\n deleteRange: function deleteRange(value, start, end) {\n var newValueStr;\n if (end - start === value.length) newValueStr = '';else if (start === 0) newValueStr = value.slice(end);else if (end === value.length) newValueStr = value.slice(0, start);else newValueStr = value.slice(0, start) + value.slice(end);\n return newValueStr;\n },\n initCursor: function initCursor() {\n var selectionStart = this.$refs.input.$el.selectionStart;\n var inputValue = this.$refs.input.$el.value;\n var valueLength = inputValue.length;\n var index = null;\n\n // remove prefix\n var prefixLength = (this.prefixChar || '').length;\n inputValue = inputValue.replace(this._prefix, '');\n selectionStart = selectionStart - prefixLength;\n var _char4 = inputValue.charAt(selectionStart);\n if (this.isNumeralChar(_char4)) {\n return selectionStart + prefixLength;\n }\n\n //left\n var i = selectionStart - 1;\n while (i >= 0) {\n _char4 = inputValue.charAt(i);\n if (this.isNumeralChar(_char4)) {\n index = i + prefixLength;\n break;\n } else {\n i--;\n }\n }\n if (index !== null) {\n this.$refs.input.$el.setSelectionRange(index + 1, index + 1);\n } else {\n i = selectionStart;\n while (i < valueLength) {\n _char4 = inputValue.charAt(i);\n if (this.isNumeralChar(_char4)) {\n index = i + prefixLength;\n break;\n } else {\n i++;\n }\n }\n if (index !== null) {\n this.$refs.input.$el.setSelectionRange(index, index);\n }\n }\n return index || 0;\n },\n onInputClick: function onInputClick() {\n var currentValue = this.$refs.input.$el.value;\n if (!this.readonly && currentValue !== DomHandler.getSelection()) {\n this.initCursor();\n }\n },\n isNumeralChar: function isNumeralChar(_char5) {\n if (_char5.length === 1 && (this._numeral.test(_char5) || this._decimal.test(_char5) || this._group.test(_char5) || this._minusSign.test(_char5))) {\n this.resetRegex();\n return true;\n }\n return false;\n },\n resetRegex: function resetRegex() {\n this._numeral.lastIndex = 0;\n this._decimal.lastIndex = 0;\n this._group.lastIndex = 0;\n this._minusSign.lastIndex = 0;\n },\n updateValue: function updateValue(event, valueStr, insertedValueStr, operation) {\n var currentValue = this.$refs.input.$el.value;\n var newValue = null;\n if (valueStr != null) {\n newValue = this.parseValue(valueStr);\n newValue = !newValue && !this.allowEmpty ? 0 : newValue;\n this.updateInput(newValue, insertedValueStr, operation, valueStr);\n this.handleOnInput(event, currentValue, newValue);\n }\n },\n handleOnInput: function handleOnInput(event, currentValue, newValue) {\n if (this.isValueChanged(currentValue, newValue)) {\n this.$emit('input', {\n originalEvent: event,\n value: newValue,\n formattedValue: currentValue\n });\n }\n },\n isValueChanged: function isValueChanged(currentValue, newValue) {\n if (newValue === null && currentValue !== null) {\n return true;\n }\n if (newValue != null) {\n var parsedCurrentValue = typeof currentValue === 'string' ? this.parseValue(currentValue) : currentValue;\n return newValue !== parsedCurrentValue;\n }\n return false;\n },\n validateValue: function validateValue(value) {\n if (value === '-' || value == null) {\n return null;\n }\n if (this.min != null && value < this.min) {\n return this.min;\n }\n if (this.max != null && value > this.max) {\n return this.max;\n }\n return value;\n },\n updateInput: function updateInput(value, insertedValueStr, operation, valueStr) {\n insertedValueStr = insertedValueStr || '';\n var inputValue = this.$refs.input.$el.value;\n var newValue = this.formatValue(value);\n var currentLength = inputValue.length;\n if (newValue !== valueStr) {\n newValue = this.concatValues(newValue, valueStr);\n }\n if (currentLength === 0) {\n this.$refs.input.$el.value = newValue;\n this.$refs.input.$el.setSelectionRange(0, 0);\n var index = this.initCursor();\n var selectionEnd = index + insertedValueStr.length;\n this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);\n } else {\n var selectionStart = this.$refs.input.$el.selectionStart;\n var _selectionEnd = this.$refs.input.$el.selectionEnd;\n this.$refs.input.$el.value = newValue;\n var newLength = newValue.length;\n if (operation === 'range-insert') {\n var startValue = this.parseValue((inputValue || '').slice(0, selectionStart));\n var startValueStr = startValue !== null ? startValue.toString() : '';\n var startExpr = startValueStr.split('').join(\"(\".concat(this.groupChar, \")?\"));\n var sRegex = new RegExp(startExpr, 'g');\n sRegex.test(newValue);\n var tExpr = insertedValueStr.split('').join(\"(\".concat(this.groupChar, \")?\"));\n var tRegex = new RegExp(tExpr, 'g');\n tRegex.test(newValue.slice(sRegex.lastIndex));\n _selectionEnd = sRegex.lastIndex + tRegex.lastIndex;\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n } else if (newLength === currentLength) {\n if (operation === 'insert' || operation === 'delete-back-single') this.$refs.input.$el.setSelectionRange(_selectionEnd + 1, _selectionEnd + 1);else if (operation === 'delete-single') this.$refs.input.$el.setSelectionRange(_selectionEnd - 1, _selectionEnd - 1);else if (operation === 'delete-range' || operation === 'spin') this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n } else if (operation === 'delete-back-single') {\n var prevChar = inputValue.charAt(_selectionEnd - 1);\n var nextChar = inputValue.charAt(_selectionEnd);\n var diff = currentLength - newLength;\n var isGroupChar = this._group.test(nextChar);\n if (isGroupChar && diff === 1) {\n _selectionEnd += 1;\n } else if (!isGroupChar && this.isNumeralChar(prevChar)) {\n _selectionEnd += -1 * diff + 1;\n }\n this._group.lastIndex = 0;\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n } else if (inputValue === '-' && operation === 'insert') {\n this.$refs.input.$el.setSelectionRange(0, 0);\n var _index = this.initCursor();\n var _selectionEnd2 = _index + insertedValueStr.length + 1;\n this.$refs.input.$el.setSelectionRange(_selectionEnd2, _selectionEnd2);\n } else {\n _selectionEnd = _selectionEnd + (newLength - currentLength);\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n }\n }\n this.$refs.input.$el.setAttribute('aria-valuenow', value);\n },\n concatValues: function concatValues(val1, val2) {\n if (val1 && val2) {\n var decimalCharIndex = val2.search(this._decimal);\n this._decimal.lastIndex = 0;\n if (this.suffixChar) {\n return decimalCharIndex !== -1 ? val1.replace(this.suffixChar, '').split(this._decimal)[0] + val2.replace(this.suffixChar, '').slice(decimalCharIndex) + this.suffixChar : val1;\n } else {\n return decimalCharIndex !== -1 ? val1.split(this._decimal)[0] + val2.slice(decimalCharIndex) : val1;\n }\n }\n return val1;\n },\n getDecimalLength: function getDecimalLength(value) {\n if (value) {\n var valueSplit = value.split(this._decimal);\n if (valueSplit.length === 2) {\n return valueSplit[1].replace(this._suffix, '').trim().replace(/\\s/g, '').replace(this._currency, '').length;\n }\n }\n return 0;\n },\n updateModel: function updateModel(event, value) {\n this.d_modelValue = value;\n this.$emit('update:modelValue', value);\n },\n onInputFocus: function onInputFocus(event) {\n this.focused = true;\n if (!this.disabled && !this.readonly && this.$refs.input.$el.value !== DomHandler.getSelection() && this.highlightOnFocus) {\n event.target.select();\n }\n this.$emit('focus', event);\n },\n onInputBlur: function onInputBlur(event) {\n this.focused = false;\n var input = event.target;\n var newValue = this.validateValue(this.parseValue(input.value));\n this.$emit('blur', {\n originalEvent: event,\n value: input.value\n });\n input.value = this.formatValue(newValue);\n input.setAttribute('aria-valuenow', newValue);\n this.updateModel(event, newValue);\n },\n clearTimer: function clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n },\n maxBoundry: function maxBoundry() {\n return this.d_modelValue >= this.max;\n },\n minBoundry: function minBoundry() {\n return this.d_modelValue <= this.min;\n }\n },\n computed: {\n filled: function filled() {\n return this.modelValue != null && this.modelValue.toString().length > 0;\n },\n upButtonListeners: function upButtonListeners() {\n var _this2 = this;\n return {\n mousedown: function mousedown(event) {\n return _this2.onUpButtonMouseDown(event);\n },\n mouseup: function mouseup(event) {\n return _this2.onUpButtonMouseUp(event);\n },\n mouseleave: function mouseleave(event) {\n return _this2.onUpButtonMouseLeave(event);\n },\n keydown: function keydown(event) {\n return _this2.onUpButtonKeyDown(event);\n },\n keyup: function keyup(event) {\n return _this2.onUpButtonKeyUp(event);\n }\n };\n },\n downButtonListeners: function downButtonListeners() {\n var _this3 = this;\n return {\n mousedown: function mousedown(event) {\n return _this3.onDownButtonMouseDown(event);\n },\n mouseup: function mouseup(event) {\n return _this3.onDownButtonMouseUp(event);\n },\n mouseleave: function mouseleave(event) {\n return _this3.onDownButtonMouseLeave(event);\n },\n keydown: function keydown(event) {\n return _this3.onDownButtonKeyDown(event);\n },\n keyup: function keyup(event) {\n return _this3.onDownButtonKeyUp(event);\n }\n };\n },\n formattedValue: function formattedValue() {\n var val = !this.modelValue && !this.allowEmpty ? 0 : this.modelValue;\n return this.formatValue(val);\n },\n getFormatter: function getFormatter() {\n return this.numberFormat;\n }\n },\n components: {\n INInputText: InputText,\n INButton: Button,\n AngleUpIcon: AngleUpIcon,\n AngleDownIcon: AngleDownIcon\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_INInputText = resolveComponent(\"INInputText\");\n var _component_INButton = resolveComponent(\"INButton\");\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptm('root'), {\n \"data-pc-name\": \"inputnumber\"\n }), [createVNode(_component_INInputText, mergeProps({\n ref: \"input\",\n id: _ctx.inputId,\n role: \"spinbutton\",\n \"class\": [_ctx.cx('input'), _ctx.inputClass],\n style: _ctx.inputStyle,\n value: $options.formattedValue,\n \"aria-valuemin\": _ctx.min,\n \"aria-valuemax\": _ctx.max,\n \"aria-valuenow\": _ctx.modelValue,\n disabled: _ctx.disabled,\n readonly: _ctx.readonly,\n placeholder: _ctx.placeholder,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n onInput: $options.onUserInput,\n onKeydown: $options.onInputKeyDown,\n onKeypress: $options.onInputKeyPress,\n onPaste: $options.onPaste,\n onClick: $options.onInputClick,\n onFocus: $options.onInputFocus,\n onBlur: $options.onInputBlur\n }, _ctx.inputProps, {\n pt: _ctx.ptm('input'),\n unstyled: _ctx.unstyled,\n \"data-pc-section\": \"input\"\n }), null, 16, [\"id\", \"class\", \"style\", \"value\", \"aria-valuemin\", \"aria-valuemax\", \"aria-valuenow\", \"disabled\", \"readonly\", \"placeholder\", \"aria-labelledby\", \"aria-label\", \"onInput\", \"onKeydown\", \"onKeypress\", \"onPaste\", \"onClick\", \"onFocus\", \"onBlur\", \"pt\", \"unstyled\"]), _ctx.showButtons && _ctx.buttonLayout === 'stacked' ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('buttonGroup')\n }, _ctx.ptm('buttonGroup')), [createVNode(_component_INButton, mergeProps({\n \"class\": [_ctx.cx('incrementButton'), _ctx.incrementButtonClass]\n }, toHandlers($options.upButtonListeners), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\"\n }, _ctx.incrementButtonProps, {\n pt: _ctx.ptm('incrementButton'),\n unstyled: _ctx.unstyled,\n \"data-pc-section\": \"incrementbutton\"\n }), {\n icon: withCtx(function () {\n return [renderSlot(_ctx.$slots, \"incrementbuttonicon\", {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementButtonIcon ? 'span' : 'AngleUpIcon'), mergeProps({\n \"class\": _ctx.incrementButtonIcon\n }, _ctx.ptm('incrementButton')['icon'], {\n \"data-pc-section\": \"incrementbuttonicon\"\n }), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"class\", \"disabled\", \"pt\", \"unstyled\"]), createVNode(_component_INButton, mergeProps({\n \"class\": [_ctx.cx('decrementButton'), _ctx.decrementButtonClass]\n }, toHandlers($options.downButtonListeners), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\"\n }, _ctx.decrementButtonProps, {\n pt: _ctx.ptm('decrementButton'),\n unstyled: _ctx.unstyled,\n \"data-pc-section\": \"decrementbutton\"\n }), {\n icon: withCtx(function () {\n return [renderSlot(_ctx.$slots, \"decrementbuttonicon\", {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementButtonIcon ? 'span' : 'AngleDownIcon'), mergeProps({\n \"class\": _ctx.decrementButtonIcon\n }, _ctx.ptm('decrementButton')['icon'], {\n \"data-pc-section\": \"decrementbuttonicon\"\n }), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"class\", \"disabled\", \"pt\", \"unstyled\"])], 16)) : createCommentVNode(\"\", true), _ctx.showButtons && _ctx.buttonLayout !== 'stacked' ? (openBlock(), createBlock(_component_INButton, mergeProps({\n key: 1,\n \"class\": [_ctx.cx('incrementButton'), _ctx.incrementButtonClass]\n }, toHandlers($options.upButtonListeners), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\"\n }, _ctx.incrementButtonProps, {\n pt: _ctx.ptm('incrementButton'),\n unstyled: _ctx.unstyled,\n \"data-pc-section\": \"incrementbutton\"\n }), {\n icon: withCtx(function () {\n return [renderSlot(_ctx.$slots, \"incrementbuttonicon\", {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementButtonIcon ? 'span' : 'AngleUpIcon'), mergeProps({\n \"class\": _ctx.incrementButtonIcon\n }, _ctx.ptm('incrementButton')['icon'], {\n \"data-pc-section\": \"incrementbuttonicon\"\n }), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"class\", \"disabled\", \"pt\", \"unstyled\"])) : createCommentVNode(\"\", true), _ctx.showButtons && _ctx.buttonLayout !== 'stacked' ? (openBlock(), createBlock(_component_INButton, mergeProps({\n key: 2,\n \"class\": [_ctx.cx('decrementButton'), _ctx.decrementButtonClass]\n }, toHandlers($options.downButtonListeners), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\"\n }, _ctx.decrementButtonProps, {\n pt: _ctx.ptm('decrementButton'),\n unstyled: _ctx.unstyled,\n \"data-pc-section\": \"decrementbutton\"\n }), {\n icon: withCtx(function () {\n return [renderSlot(_ctx.$slots, \"decrementbuttonicon\", {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementButtonIcon ? 'span' : 'AngleDownIcon'), mergeProps({\n \"class\": _ctx.decrementButtonIcon\n }, _ctx.ptm('decrementButton')['icon'], {\n \"data-pc-section\": \"decrementbuttonicon\"\n }), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"class\", \"disabled\", \"pt\", \"unstyled\"])) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n","\n\n\n\n\n","import type { IArticleWithOptions } from \"@/data/commands/customer/AddArticleToCartCmd\";\nimport type { ICustomerOptionGroup, ICustomerOptionGroupOption } from \"@/data/model/Customer\";\nimport { Format } from \"@/data/util/Format\";\n\nimport { clientLanguage } from \"@/shared/localization/language\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\nimport { trans } from \"@/app/localization/Trans\";\nimport { Helper } from \"@/app/ui/Helper\";\n\nexport class OptionGroup {\n public onChange?: { () };\n private model: ICustomerOptionGroup;\n private $element: JQuery;\n private $options: JQuery;\n\n private hasQuantity: boolean;\n private isRadio: boolean;\n private showPlusOnPrices = true;\n\n private subGroups: Array;\n\n constructor(optionGroup: ICustomerOptionGroup, showPlusOnPrices: boolean) {\n this.model = optionGroup;\n\n this.showPlusOnPrices = showPlusOnPrices;\n\n this.$element = $('
').data(\"ctrl\", this);\n if (optionGroup.options.length === 0) this.$element.hide();\n\n this.$element.append(\n '
' + Format.htmlEscape(Format.translate(optionGroup.name, clientLanguage())) + \"
\"\n );\n\n if (optionGroup.maxOptions !== undefined && optionGroup.maxOptions > optionGroup.options.length)\n optionGroup.maxOptions = optionGroup.options.length;\n\n const q1 =\n optionGroup.minOptions === undefined || optionGroup.minOptions === 0 ? undefined : optionGroup.minOptions;\n\n let instructionText = \"\";\n if (\n q1 === undefined &&\n (optionGroup.maxOptions === undefined ||\n optionGroup.maxOptions === 1 ||\n optionGroup.maxOptions === optionGroup.options.length)\n )\n instructionText += trans.addToCartPopover.optional + \".\";\n else if (q1 !== undefined && optionGroup.minOptions === optionGroup.maxOptions)\n instructionText +=\n trans.addToCartPopover.chooseExact\n .replace(\"{0}\", q1 as any)\n .replace(\"{1}\", q1 > 1 ? trans.addToCartPopover.optionPlur : trans.addToCartPopover.optionSing) +\n \".\";\n else if (optionGroup.maxOptions === undefined && q1 !== undefined)\n instructionText +=\n trans.addToCartPopover.chooseMin\n .replace(\"{0}\", q1 as any)\n .replace(\"{1}\", q1 > 1 ? trans.addToCartPopover.optionPlur : trans.addToCartPopover.optionSing) +\n \".\";\n else if (optionGroup.maxOptions !== undefined && q1 === undefined)\n instructionText +=\n trans.addToCartPopover.chooseUpTo\n .replace(\"{0}\", optionGroup.maxOptions as any)\n .replace(\n \"{1}\",\n optionGroup.maxOptions > 1\n ? trans.addToCartPopover.optionPlur\n : trans.addToCartPopover.optionSing\n ) + \".\";\n else if (optionGroup.maxOptions !== undefined && q1 !== undefined)\n instructionText +=\n trans.addToCartPopover.chooseBetween\n .replace(\"{0}\", q1 as any)\n .replace(\"{1}\", optionGroup.maxOptions as any) + \".\";\n\n if (\n optionGroup.maxSum !== undefined &&\n optionGroup.maxSum > 1 &&\n optionGroup.options.length > 1 &&\n (optionGroup.maxOptions === undefined || optionGroup.maxOptions > 1) &&\n (optionGroup.maxPerOption === undefined || optionGroup.maxPerOption > 1)\n ) {\n instructionText +=\n \" \" + trans.addToCartPopover.upToTotalItems.replace(\"{0}\", optionGroup.maxSum as any) + \".\";\n }\n\n if (instructionText.length !== 0) instructionText = instructionText.substring(0, instructionText.length - 1);\n\n this.$element.append('
' + instructionText + \"
\");\n\n this.$options = $('
').appendTo(this.$element);\n\n this.isRadio = optionGroup.minOptions === 1 && optionGroup.maxOptions === 1;\n this.hasQuantity = optionGroup.maxPerOption !== 1;\n\n this.subGroups = new Array();\n this.renderOptions();\n }\n\n public getValue(): Array {\n const options = new Array();\n\n // get selected options\n this.$options.find(\"> .option.selected\").each((i, e) => {\n const opt: ICustomerOptionGroupOption = $(e).data(\"model\");\n const qty = this.hasQuantity ? $(e).data(\"qty\") : 1;\n const entry: IArticleWithOptions = {\n quantity: qty,\n articleId: opt.articleId,\n optionGroupId: this.model.optionGroupId,\n options: [],\n };\n\n $(e)\n .find(\"> .subgroups > .optiongroup\")\n .each((i, e) => {\n const ctrl: OptionGroup = $(e).data(\"ctrl\");\n entry.options.push(...ctrl.getValue());\n });\n\n options.push(entry);\n });\n\n return options;\n }\n\n private renderOptions() {\n for (const i in this.model.options) {\n const opt = this.model.options[i];\n\n const optionRow = $('
').data(\"model\", opt).appendTo(this.$options);\n const inner = $('
').appendTo(optionRow);\n\n Ripple.bindRippleOut(\n inner.click((e) => {\n const target = $(e.currentTarget).parent();\n if (target.hasClass(\"disabled\")) {\n e.stopPropagation();\n return;\n }\n\n this.onClickOption(target);\n }),\n \"> .radiobox, > .checkbox\"\n );\n\n if (this.isRadio) {\n inner.append('
');\n } else {\n inner.append('
');\n }\n\n inner.append(\n '
' + Format.htmlEscape(Format.translate(opt.name, clientLanguage())) + \"
\"\n );\n\n if (this.hasQuantity) {\n optionRow.data(\"qty\", 0);\n const qtyInput = $('
').appendTo(inner);\n\n // if minQuantity = maxQuantity, then hide increase/decrease btns; if minQuantity is not provided we assume minQuantity = 1\n if (opt.minQuantity ?? 1 == opt.maxQuantity) {\n qtyInput.addClass(\"hidden\");\n }\n\n $('
')\n .appendTo(qtyInput)\n .click((e) => {\n e.stopPropagation();\n const tar = $(e.currentTarget);\n if (tar.hasClass(\"disabled\")) return;\n\n this.decreaseOptionQuantity(tar.parent().parent().parent());\n });\n\n $('
')\n .appendTo(qtyInput)\n .click((e) => {\n e.stopPropagation();\n const tar = $(e.currentTarget);\n if (tar.hasClass(\"disabled\")) return;\n\n this.increaseOptionQuantity(tar.parent().parent().parent());\n });\n }\n\n const p = Helper.formatPrice(opt);\n $('
' + (p === \"\" ? \"\" : (this.showPlusOnPrices ? \"+\" : \"\") + p) + \"
\")\n .appendTo(inner)\n .click((e) => {\n e.preventDefault();\n e.stopPropagation();\n });\n\n if (opt.preselected) {\n this.selectOption(optionRow, this.hasQuantity);\n } else {\n this.deselectOption(optionRow, this.hasQuantity);\n }\n }\n\n this.applyDisableRule();\n }\n\n private onClickOption($option: JQuery) {\n if (this.isRadio) {\n if ($option.hasClass(\"selected\")) return;\n\n this.selectOption($option);\n } else {\n if ($option.hasClass(\"selected\")) this.deselectOption($option);\n else this.selectOption($option);\n }\n\n this.applyDisableRule();\n\n if (this.onChange !== undefined) this.onChange();\n }\n\n private selectOption($option: JQuery, updateQty?: boolean) {\n if (updateQty === undefined) updateQty = true;\n\n const optionModel: ICustomerOptionGroupOption = $option.data(\"model\");\n const initialQuantity = optionModel.minQuantity !== undefined ? optionModel.minQuantity : 1;\n if (this.isRadio) {\n const oldSelected = this.$options.find(\"> .selected\");\n if (!oldSelected.is($option)) {\n this.deselectOption(oldSelected);\n $option.addClass(\"selected\");\n\n if (updateQty && this.hasQuantity) this.setOptionQuantity($option, initialQuantity);\n\n const sub: ICustomerOptionGroupOption = $option.data(\"model\");\n if (sub.optionGroups.length !== 0)\n this.addSubGroupsToOption($option, sub.optionGroups, sub.price !== undefined && sub.price !== 0);\n }\n } else {\n if (!$option.hasClass(\"selected\")) {\n $option.addClass(\"selected\");\n\n if (updateQty && this.hasQuantity) this.setOptionQuantity($option, initialQuantity);\n\n const sub: ICustomerOptionGroupOption = $option.data(\"model\");\n if (sub.optionGroups.length !== 0)\n this.addSubGroupsToOption($option, sub.optionGroups, sub.price !== undefined && sub.price !== 0);\n }\n }\n }\n\n private deselectOption($option: JQuery, updateQty?: boolean) {\n if (updateQty === undefined) updateQty = true;\n\n if ($option.hasClass(\"selected\")) {\n $option.removeClass(\"selected\");\n\n if (updateQty && this.hasQuantity) this.setOptionQuantity($option, 0);\n\n const sub: ICustomerOptionGroupOption = $option.data(\"model\");\n if (sub.optionGroups.length !== 0) this.removeSubGroupsFromOption($option);\n }\n }\n\n private decreaseOptionQuantity($option: JQuery) {\n if (!this.hasQuantity) return;\n\n const currentQty: number = $option.data(\"qty\");\n const newQty = currentQty - 1;\n if (newQty < 0) return;\n\n this.setOptionQuantity($option, newQty);\n if (newQty === 0) this.deselectOption($option, false);\n\n this.applyDisableRule();\n\n if (this.onChange !== undefined) this.onChange();\n }\n\n private increaseOptionQuantity($option: JQuery) {\n if (!this.hasQuantity) return;\n\n const optionModel: ICustomerOptionGroupOption = $option.data(\"model\");\n const currentQty: number = $option.data(\"qty\");\n let newQty = currentQty + 1;\n if (optionModel.minQuantity !== undefined && newQty < optionModel.minQuantity) newQty = optionModel.minQuantity;\n\n if (this.model.maxPerOption !== undefined && newQty > this.model.maxPerOption) return;\n\n this.setOptionQuantity($option, newQty);\n if (currentQty === 0) this.selectOption($option, false);\n\n this.applyDisableRule();\n\n if (this.onChange !== undefined) this.onChange();\n }\n\n private setOptionQuantity($option: JQuery, qty: number) {\n if (!this.hasQuantity) return;\n\n $option.data(\"qty\", qty);\n\n const optionModel: ICustomerOptionGroupOption = $option.data(\"model\");\n if (optionModel.maxQuantity == 1) return;\n\n const quantityContainer = $option.find(\"> .inner > .name > .qty\");\n if (qty === 0) {\n quantityContainer.remove();\n return;\n }\n\n if (quantityContainer.length === 0)\n $option.find(\"> .inner > .name\").prepend('
' + qty + \"x
\");\n else quantityContainer.html(qty + \"x\");\n }\n\n private applyDisableRule() {\n const selectedOptions = this.$options.find(\"> .selected\");\n let totalQuantity = 0;\n\n if (!this.hasQuantity) totalQuantity += selectedOptions.length;\n else {\n selectedOptions.each((i, e) => {\n totalQuantity += $(e).data(\"qty\");\n });\n }\n\n this.$options.find(\"> .option\").each((i, e) => {\n const opt = $(e);\n\n const optIsSelected = opt.hasClass(\"selected\");\n\n let allowNewOption = true;\n if (!this.isRadio) {\n if (this.model.maxSum !== undefined && this.model.maxSum <= totalQuantity) allowNewOption = false;\n\n if (this.model.maxOptions !== undefined && this.model.maxOptions <= selectedOptions.length)\n allowNewOption = false;\n\n if (allowNewOption) opt.removeClass(\"disabled\");\n else if (!optIsSelected) opt.addClass(\"disabled\");\n }\n\n if (this.hasQuantity) {\n const qty: number = opt.data(\"qty\");\n const optionModel: ICustomerOptionGroupOption = opt.data(\"model\");\n const incr = opt.find(\"> .inner > .quantity > .plus\");\n\n let allowIncrease = true;\n if (this.model.maxSum !== undefined && this.model.maxSum <= totalQuantity) allowIncrease = false;\n\n if (this.model.maxPerOption !== undefined && this.model.maxPerOption <= qty) allowIncrease = false;\n\n if (\n this.model.maxPerOption === undefined &&\n optionModel.maxQuantity !== undefined &&\n qty >= optionModel.maxQuantity\n )\n allowIncrease = false;\n\n if (allowIncrease && !allowNewOption && !optIsSelected) allowIncrease = false;\n\n if (allowIncrease) incr.removeClass(\"disabled\");\n else incr.addClass(\"disabled\");\n\n let allowDecrease = true;\n if (!optIsSelected) allowDecrease = false;\n\n const minQuantity = optionModel.minQuantity ?? 1; // if no quantity is provided, min quantity = 1\n if (allowDecrease && qty <= minQuantity) allowDecrease = false;\n\n const decr = opt.find(\"> .inner > .quantity > .minus\");\n if (allowDecrease) decr.removeClass(\"disabled\");\n else decr.addClass(\"disabled\");\n }\n });\n }\n\n private addSubGroupsToOption($option: JQuery, subGroups: Array, showPlusOnPrices: boolean) {\n let subContainer = $option.find(\"> .subgroups\");\n if (subContainer.length === 0) subContainer = $('
').appendTo($option);\n\n for (const i in subGroups) {\n const g = new OptionGroup(subGroups[i], showPlusOnPrices).appendTo(subContainer);\n this.subGroups.push(g);\n g.onChange = () => {\n if (this.onChange !== undefined) this.onChange();\n };\n }\n }\n\n private removeSubGroupsFromOption($option: JQuery) {\n const sg = $option.find(\"> .subgroups\");\n if (sg.length === 0) return;\n\n $option.find(\"> .subgroups > .optiongroup\").each((i, e) => {\n const ctrl: OptionGroup = $(e).data(\"ctrl\");\n const idx = this.subGroups.indexOf(ctrl);\n if (idx !== -1) this.subGroups.splice(idx, 1);\n\n ctrl.destroy();\n });\n\n sg.remove();\n }\n\n public isValid(): boolean {\n if (this.model.minOptions === undefined && this.model.maxOptions === undefined && this.subGroups.length === 0)\n return true;\n\n const selected = this.$options.find(\"> .option.selected\").length;\n if (this.model.minOptions !== undefined && this.model.minOptions > selected) return false;\n\n if (this.model.maxOptions !== undefined && this.model.maxOptions < selected) return false;\n\n for (const i in this.subGroups) {\n if (!this.subGroups[i].isValid()) return false;\n }\n\n return true;\n }\n\n public calculatePrice(): number {\n let price = 0;\n\n this.$options.find(\"> .option.selected\").each((i, e) => {\n let qty = 1;\n if (this.hasQuantity) qty = $(e).data(\"qty\");\n\n const optPrice = Helper.sitePrice($(e).data(\"model\"));\n if (optPrice !== undefined && optPrice !== 0) price += qty * optPrice;\n\n $(e)\n .find(\"> .subgroups > .optiongroup\")\n .each((i, a) => {\n const ctrl: OptionGroup = $(a).data(\"ctrl\");\n price += ctrl.calculatePrice() * qty;\n });\n });\n\n return price;\n }\n\n public destroy() {\n this.$element.remove();\n }\n\n public appendTo($element: JQuery): OptionGroup {\n this.$element.appendTo($element);\n return this;\n }\n}\n","import { Ripple } from \"@/shared/ui/Ripple\";\n\nexport class QuantityInput {\n private $element: JQuery;\n private $value: JQuery;\n private $decreaseBtn: JQuery;\n private $increaseBtn: JQuery;\n\n private currentValue: number = 1;\n\n private min?: number;\n private max?: number;\n\n public onChange?: { () };\n\n constructor(min?: number, max?: number) {\n this.$element = $('
');\n\n this.min = min;\n this.max = max;\n\n this.$decreaseBtn = $('').appendTo(\n this.$element\n );\n Ripple.bind(\n this.$decreaseBtn.click((e) => {\n if ($(e.currentTarget).is(\":disabled\")) return false;\n\n this.currentValue--;\n this.$value.html(this.currentValue + \"\");\n this.checkButtonState();\n\n if (this.onChange !== undefined) this.onChange();\n })\n );\n\n this.$value = $('
' + this.currentValue + \"
\").appendTo(this.$element);\n this.$increaseBtn = $('').appendTo(\n this.$element\n );\n Ripple.bind(\n this.$increaseBtn.click((e) => {\n if ($(e.currentTarget).is(\":disabled\")) return false;\n\n this.currentValue++;\n this.$value.html(this.currentValue + \"\");\n this.checkButtonState();\n\n if (this.onChange !== undefined) this.onChange();\n })\n );\n }\n\n public getValue(): number {\n return this.currentValue;\n }\n\n public setValue(va: number): QuantityInput {\n if (this.min !== undefined && va < this.min) va = this.min;\n\n if (this.max !== undefined && va > this.max) va = this.max;\n\n this.currentValue = va;\n this.$value.html(this.currentValue + \"\");\n this.checkButtonState();\n\n return this;\n }\n\n public setMin(va: number): QuantityInput {\n this.min = va;\n if (this.min !== undefined && this.currentValue < this.min) this.setValue(this.min);\n return this;\n }\n\n public setMax(va: number): QuantityInput {\n this.max = va;\n if (this.max !== undefined && this.max < this.currentValue) this.setValue(this.max);\n return this;\n }\n\n public appendTo($element: JQuery): QuantityInput {\n this.$element.appendTo($element);\n\n return this;\n }\n\n public show() {\n this.$element.removeClass(\"invisible\");\n }\n\n public hide() {\n this.$element.addClass(\"invisible\");\n }\n\n private checkButtonState() {\n this.$decreaseBtn.prop(\"disabled\", this.min !== undefined && this.currentValue <= this.min);\n this.$increaseBtn.prop(\"disabled\", this.max !== undefined && this.currentValue >= this.max);\n }\n}\n","import { type App, type Ref, ref, watch } from \"vue\";\n\nimport { Factory } from \"@/data/dao/Factory\";\nimport { CustomerDao } from \"@/data/dao/service/CustomerDao\";\nimport type { ICustomerArticle } from \"@/data/model/Customer\";\nimport { Format } from \"@/data/util/Format\";\n\nimport { clientLanguage } from \"@/shared/localization/language\";\nimport { logError } from \"@/shared/logging/errors\";\nimport { toMoneyWithSign } from \"@/shared/utils/format\";\nimport { createVueComponent } from \"@/shared/utils/vue\";\n\nimport CurrencyInput from \"@/components/elements/CurrencyInput.vue\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { OptionGroup } from \"@/app/elements/OptionGroup\";\nimport { PayButton } from \"@/app/elements/PayButton\";\nimport { QuantityInput } from \"@/app/elements/QuantityInput\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { BasePopover } from \"@/app/popover/BasePopover\";\nimport { Helper } from \"@/app/ui/Helper\";\nimport { Popup } from \"@/app/ui/Popup\";\n\nexport class AddToCardPopover extends BasePopover {\n private $articleInfo: JQuery;\n private $articleName: JQuery;\n private $price: JQuery;\n private $scrollable: JQuery;\n private $shortDescription: JQuery;\n private $longDescription: JQuery;\n private $optionGroups: JQuery;\n\n private $bottom: JQuery;\n private addBtn: PayButton;\n\n private currentArticle?: ICustomerArticle;\n private quantityInput: QuantityInput;\n private optionGroups: Array;\n\n private $openPriceRow: JQuery;\n private openPriceValue: Ref;\n private openPriceInput: App | null | undefined;\n\n constructor() {\n super(undefined, false);\n\n this.$element.addClass(\"addtocard\");\n\n this.$articleInfo = $('
').appendTo(this.$body);\n this.$articleName = $('
').appendTo(this.$articleInfo);\n this.$price = $('
').appendTo(this.$articleInfo);\n this.$scrollable = $('
').appendTo(this.$body);\n this.$shortDescription = $('
').appendTo(this.$scrollable);\n this.$longDescription = $('
').appendTo(this.$scrollable);\n\n this.$openPriceRow = $(\n `
\n \n
\n
`\n ).appendTo(this.$scrollable);\n\n this.openPriceValue = ref(null as number | null);\n watch(this.openPriceValue, () => {\n this.validateBtnAndUpdatePrice();\n });\n\n this.optionGroups = new Array();\n this.$optionGroups = $('
').appendTo(this.$scrollable);\n\n this.$bottom = $('
').appendTo(this.$body);\n this.quantityInput = new QuantityInput(1).appendTo(this.$bottom);\n this.quantityInput.onChange = () => this.validateBtnAndUpdatePrice();\n\n this.addBtn = new PayButton(trans.general.add).appendTo(this.$bottom);\n this.addBtn.onClick = async () => {\n this.addBtn.setDisabled(trans.addToCartPopover.adding);\n\n const options = [] as any[];\n for (const i in this.optionGroups) options.push(...this.optionGroups[i].getValue());\n\n let openPrice = undefined as number | undefined;\n if (this.currentArticle!.isOpenPriceEnabled) {\n openPrice = this.getOpenPriceInputValue();\n }\n\n try {\n await TastierClient.context.addArticleToCart(\n this.currentArticle!.articleId,\n this.quantityInput.getValue(),\n options,\n openPrice\n );\n this.hide();\n this.addBtn.setDisabled();\n } catch (ex) {\n logError(ex);\n Popup.show(trans.cart.failedToAdd);\n this.validateBtnAndUpdatePrice();\n }\n };\n }\n\n public forArticle(article: ICustomerArticle): AddToCardPopover {\n this.currentArticle = article;\n this.destroyOptionGroups();\n\n this.addBtn.setDisabled();\n this.$articleName.html(Format.htmlEscape(Format.translate(article.name, clientLanguage()))!);\n\n if (article.isOpenPriceEnabled) {\n this.$openPriceRow.show();\n this.$price.html(\"\");\n } else {\n this.$openPriceRow.hide();\n const p = Helper.formatPrice(article);\n this.$price.html(p === \"\" ? \"\" : \"CHF \" + p);\n }\n\n const shortDesc = Format.translate(article.shortDescription, clientLanguage());\n if (shortDesc === undefined) this.$shortDescription.html(\"\").hide();\n else this.$shortDescription.html(Format.htmlEscape(shortDesc)!).show();\n\n const longDesc = Format.translate(article.longDescription, clientLanguage());\n if (longDesc === undefined) this.$longDescription.html(\"\").hide();\n else this.$longDescription.html(Format.htmlEscape(longDesc)!).show();\n\n const articleQuantityCurrentlyInCart = this.getArticleInCartQuantity(article);\n const maxArticleQuantityToAdd = article.maxQuantity! - articleQuantityCurrentlyInCart;\n this.quantityInput.setMin(article.minQuantity ?? 1);\n this.quantityInput.setMax(maxArticleQuantityToAdd);\n this.quantityInput.setValue(1);\n\n if (maxArticleQuantityToAdd == 1) {\n this.quantityInput.hide();\n } else {\n this.quantityInput.show();\n }\n\n if (this.currentArticle.hasOptions) {\n this.setFullScreen(true);\n this.loadOptionGroups(article);\n } else {\n this.setFullScreen(false);\n this.validateBtnAndUpdatePrice();\n }\n\n return this;\n }\n\n protected onShow() {\n if (this.openPriceInput == null) {\n const props = {\n id: \"open-price-input\",\n modelValue: this.openPriceValue,\n };\n const result = createVueComponent(\n CurrencyInput,\n props,\n document.querySelector(\".open-price-input-container\")!\n );\n this.openPriceInput = result.componentApp;\n }\n\n const height = this.$articleName.height();\n if (this.fullscreen) {\n this.$scrollable.removeAttr(\"style\").css({\n top: height + 9,\n });\n } else {\n this.$scrollable.removeAttr(\"style\");\n }\n\n this.updateBodyHeight(false);\n }\n\n protected onHide() {\n this.openPriceValue.value = null;\n this.$scrollable.removeAttr(\"style\");\n }\n\n protected onDestroy() {\n this.destroyOptionGroups();\n }\n\n private destroyOptionGroups() {\n if (this.optionGroups.length === 0) return;\n\n for (const i in this.optionGroups) this.optionGroups[i].destroy();\n\n this.optionGroups = new Array();\n }\n\n private async loadOptionGroups(article: ICustomerArticle) {\n this.$optionGroups.html(\n '
' +\n trans.addToCartPopover.loadingOptions +\n \"
\"\n );\n const useCase = Helper.getCurrentOrderServiceUseCase();\n try {\n if (useCase == null) {\n throw Error(\"Use case is null!\");\n }\n\n const res = await Factory.getInstance(CustomerDao).getOptionsOfArticle(\n article.articleId,\n useCase!.id\n );\n this.$optionGroups.empty();\n\n for (const i in res) {\n const group = new OptionGroup(res[i], article.price !== 0).appendTo(this.$optionGroups);\n group.onChange = () => this.validateBtnAndUpdatePrice();\n this.optionGroups.push(group);\n }\n\n this.validateBtnAndUpdatePrice();\n } catch (ex) {\n logError(ex);\n Popup.show(trans.addToCartPopover.failedLoadingOptions);\n this.validateBtnAndUpdatePrice();\n }\n }\n\n private getOpenPriceInputValue() {\n const value = this.openPriceValue.value;\n if (value == null || isNaN(value)) return 0;\n else return value;\n }\n\n private isCorrectOpenPriceEntered(): boolean {\n const value = this.openPriceValue.value;\n return !(value == null || isNaN(value));\n }\n\n private validateBtnAndUpdatePrice() {\n let isValid = true;\n let singlePrice = this.currentArticle!.isOpenPriceEnabled\n ? this.getOpenPriceInputValue()\n : Helper.sitePrice(this.currentArticle!);\n\n if (this.currentArticle!.isOpenPriceEnabled) {\n if (!this.isCorrectOpenPriceEntered()) {\n isValid = false;\n }\n }\n\n const quantity = this.quantityInput.getValue();\n\n for (const group of this.optionGroups) {\n if (!group.isValid()) isValid = false;\n\n singlePrice += group.calculatePrice();\n }\n\n const totalPrice = singlePrice * quantity;\n this.addBtn.setAmount(toMoneyWithSign(totalPrice));\n\n const articleQuantityCurrentlyInCart = this.getArticleInCartQuantity(this.currentArticle!);\n const maxArticleQuantityToAdd = this.currentArticle!.maxQuantity! - articleQuantityCurrentlyInCart;\n if (maxArticleQuantityToAdd == 0) isValid = false;\n\n if (isValid) this.addBtn.setEnabled();\n else this.addBtn.setDisabled();\n }\n\n private getArticleInCartQuantity(article: ICustomerArticle) {\n const currentOffer = TastierClient.context.currentOffer;\n if (currentOffer === undefined || currentOffer.cart === undefined) return 0;\n\n let totalArticleQuantity = 0;\n for (const item of currentOffer.cart.items) {\n if (item.articleId == article.articleId) {\n totalArticleQuantity += item.quantity;\n }\n }\n\n return totalArticleQuantity;\n }\n}\n","import type { ICustomerArticle, ICustomerCategory } from \"@/data/model/Customer\";\nimport { Format } from \"@/data/util/Format\";\n\nimport { clientLanguage } from \"@/shared/localization/language\";\nimport { DomUtil } from \"@/shared/ui/Helper\";\nimport { Image } from \"@/shared/ui/Image\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\nimport { toMoneyWithSign } from \"@/shared/utils/format\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { BaseController } from \"@/app/controller/BaseController\";\nimport { CategorySlider } from \"@/app/elements/CategorySlider\";\nimport { PayButton } from \"@/app/elements/PayButton\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { AddToCardPopover } from \"@/app/popover/AddToCardPopover\";\nimport { Helper } from \"@/app/ui/Helper\";\nimport { ServicesIcon } from \"@/app/ui/ServicesIcon\";\nimport { UserMenu } from \"@/app/ui/UserMenu\";\n\nexport class OrderController extends BaseController {\n public onContinue?: { () };\n public onGoBack?: { () };\n public onShowServices?: { () };\n\n private readonly $head: JQuery;\n private readonly $title: JQuery;\n\n private $itemList: JQuery;\n private $index: JQuery;\n\n private isScrolled = false;\n private listenToScrollEvents = true;\n\n private categorySlider: CategorySlider;\n private addToCardPopover?: AddToCardPopover;\n\n private $bottom: JQuery;\n private $selectionSum: JQuery;\n private proceedBtn: PayButton;\n\n public userMenu: UserMenu;\n\n private needsOfferReload = true;\n\n constructor() {\n super(\"order\");\n\n this.$head = $('
').appendTo(this.$view);\n this.$title = $('
' + trans.order.title + \"
\").appendTo(this.$head);\n\n new ServicesIcon().appendTo(this.$head).onClick = () => {\n if (this.onShowServices) {\n this.onShowServices();\n }\n };\n\n Ripple.bind($(''))\n .prependTo(this.$head)\n .click((e) => {\n e.preventDefault();\n if (this.onGoBack) {\n this.onGoBack();\n }\n });\n\n this.userMenu = new UserMenu().appendTo(this.$head);\n\n this.$index = $('
').appendTo(this.$view);\n this.$itemList = $('
').appendTo(this.$view);\n Ripple.bind(\n $('
')\n .click(() => {\n this.listenToScrollEvents = false;\n this.categorySlider.moveToFirst();\n\n this.checkScrollCollapse(0);\n DomUtil.scrollTo(this.$itemList, 0, () => {\n this.listenToScrollEvents = true;\n });\n })\n .appendTo(this.$view)\n );\n\n this.categorySlider = new CategorySlider().appendTo(this.$index);\n this.categorySlider.onSelected = (scrollToId) => {\n const cat = this.$itemList.find('> .section[data-id=\"' + scrollToId + '\"]');\n if (cat.length === 0) return;\n\n this.listenToScrollEvents = false;\n const elementPosition = cat.position().top + this.$itemList.scrollTop();\n const paddingOffset = elementPosition > 131 ? 47 : 131;\n const elementOffset = elementPosition - paddingOffset;\n this.checkScrollCollapse(elementOffset);\n\n DomUtil.scrollTo(this.$itemList, elementOffset, () => {\n this.listenToScrollEvents = true;\n });\n };\n\n this.$bottom = $('
').appendTo(this.$view);\n this.$selectionSum = $('
').appendTo(this.$bottom);\n this.proceedBtn = new PayButton(trans.general.continue)\n .setAmount(toMoneyWithSign(0))\n .setDisabled()\n .appendTo(this.$bottom);\n this.proceedBtn.onClick = () => {\n if (this.onContinue !== undefined) this.onContinue();\n };\n\n this.$itemList.scroll(() => {\n this.onScroll();\n });\n\n TastierClient.context.onOfferChanged.add(this.redrawList, this);\n }\n\n protected onBecomeVisible(data?: { isMainNavigation: boolean; hasPreorderTimeStep?: boolean }) {\n TastierClient.context.onCartChanged.add(this.updateCart, this);\n\n const serviceDesignation = Helper.getCurrentServiceDesignation();\n this.$title.text(serviceDesignation === undefined ? trans.order.title : serviceDesignation);\n\n this.updateHeaderButtonsVisibility(data);\n\n //replace this with less overhead\n if (this.needsOfferReload) {\n this.$itemList.html(\n '
' + trans.order.loadingOffer + \"
\"\n );\n TastierClient.context.reloadOffer();\n this.needsOfferReload = false;\n } else {\n this.updateCart();\n }\n\n TastierClient.context.loadFulfillmentsIfNeeded();\n setTimeout(() => {\n this.displayConfirmationPopover();\n }, 500);\n }\n\n updateHeaderButtonsVisibility(\n data: { isMainNavigation: boolean; hasPreorderTimeStep?: boolean | undefined } | undefined\n ) {\n // if no info about service or is coming back from another view - do not change anything\n if (data === undefined || !data.isMainNavigation) return;\n\n const $goHomeButton = this.$head.find(\".go-home-button\");\n const $goBackButton = this.$head.find(\".go-back-button\");\n\n if (data.hasPreorderTimeStep) {\n $goHomeButton.hide();\n $goBackButton.show();\n } else {\n $goBackButton.hide();\n if (Helper.isSingleService()) {\n $goHomeButton.hide();\n } else {\n $goHomeButton.show();\n }\n }\n }\n\n protected onBecomeInvisible() {\n TastierClient.context.onCartChanged.remove(this.updateCart, this);\n }\n\n public reset() {\n this.needsOfferReload = true;\n this.$itemList.empty();\n this.categorySlider.setCategories([]);\n\n if (this.isVisible!) this.onBecomeVisible();\n }\n\n private redrawList() {\n this.$itemList.empty();\n\n if (\n TastierClient.context.currentOffer === undefined ||\n TastierClient.context.currentOffer.entries.length === 0\n ) {\n this.$itemList.append('
' + trans.order.noOffer + \"
\");\n this.categorySlider.setCategories([]);\n this.$itemList.scrollTop(0);\n this.updateCart();\n return;\n }\n\n for (const i in TastierClient.context.currentOffer.entries) {\n this.renderSection(TastierClient.context.currentOffer.entries[i]).appendTo(this.$itemList);\n }\n\n this.categorySlider\n .setCategories(\n TastierClient.context.currentOffer.entries.map((c) => {\n return {\n id: c.categoryId,\n name: Format.translate(c.name, clientLanguage()),\n };\n })\n )\n .moveToFirst();\n\n this.updateCart();\n this.onScroll();\n }\n\n private updateCart() {\n const offer = TastierClient.context.currentOffer;\n let articles = 0;\n\n if (offer !== undefined && offer.cart !== undefined) {\n this.proceedBtn.setAmount(toMoneyWithSign(offer.cart.total));\n if (offer.cart.items.length > 0 && offer.cart.total >= 0) {\n this.proceedBtn.setEnabled();\n } else {\n this.proceedBtn.setDisabled();\n }\n\n for (const i in offer.cart.items) articles += offer.cart.items[i].quantity;\n } else {\n this.proceedBtn.setAmount(toMoneyWithSign(0)).setDisabled();\n }\n\n this.$selectionSum.html(trans.order.itemsSelected.replace(\"{0}\", articles + \"\"));\n this.$itemList.find(\"> .section > .articles > .article\").each((i, e) => {\n const articleEl = $(e);\n const article: ICustomerArticle = articleEl.data(\"model\");\n\n const cartEntries =\n offer === undefined || offer.cart === undefined\n ? []\n : offer.cart.items.filter((c) => c.articleId === article.articleId);\n if (cartEntries.length === 0) {\n if (articleEl.hasClass(\"added\")) {\n articleEl\n .removeClass(\"added\")\n .delay(400)\n .queue((a) => {\n articleEl.find(\"> .name > .qty\").remove();\n a();\n });\n }\n } else {\n let qtyContainer = articleEl.find(\"> .name > .qty\");\n if (qtyContainer.length === 0) {\n qtyContainer = $('
').prependTo(articleEl.find(\"> .name\"));\n qtyContainer[0].offsetHeight;\n }\n\n let sum = 0;\n for (const ci in cartEntries) sum += cartEntries[ci].quantity;\n\n qtyContainer.html(sum + \"x\");\n articleEl.addClass(\"added\");\n }\n });\n }\n\n private renderSection(model: ICustomerCategory): JQuery {\n const section = $('
');\n\n const header = $('
').appendTo(section);\n if (model.imagePath !== undefined) {\n header\n .addClass(\"withimage\")\n .append('
')\n .append('
');\n } else header.addClass(\"nameonly\");\n\n const name = $(\n '

' + Format.htmlEscape(Format.translate(model.name, clientLanguage())) + \"

\"\n ).appendTo(header);\n const desc = Format.translate(model.description, clientLanguage());\n if (desc !== undefined)\n name.addClass(\"twolines\").append('
' + Format.htmlEscape(desc) + \"
\");\n\n const articles = $('
').appendTo(section);\n\n if (model.articles.find((c) => c.imagePath !== undefined) !== undefined) articles.addClass(\"withimage\");\n\n for (const i in model.articles) this.renderArticle(model.articles[i]).appendTo(articles);\n\n return section;\n }\n\n private renderArticle(model: ICustomerArticle): JQuery {\n const article = $('
').data(\"model\", model);\n\n const nameStr = Format.htmlEscape(Format.translate(model.name, clientLanguage()));\n const name = $('

' + nameStr + \"

\").appendTo(article);\n const desc = Format.translate(model.shortDescription, clientLanguage());\n if (desc !== undefined)\n name.addClass(\"twolines\").append('
' + Format.htmlEscape(desc) + \"
\");\n\n if (model.isOpenPriceEnabled === false)\n article.append('
' + Helper.formatPrice(model) + \"
\");\n\n if (model.imagePath !== undefined) {\n article.addClass(\"hasimage\");\n\n const imgElement = $(\n `
\"${nameStr}\"
`\n );\n\n imgElement.click((e) => {\n if (model?.originalImagePath === undefined) return;\n\n e.stopPropagation();\n this.showImage(model.originalImagePath);\n });\n\n article.append(imgElement);\n }\n\n article.append('
');\n\n Ripple.bind(\n article.click((e) => {\n if (this.addToCardPopover === undefined) this.addToCardPopover = new AddToCardPopover();\n\n this.addToCardPopover.forArticle($(e.currentTarget).data(\"model\")).show();\n })\n );\n\n return article;\n }\n\n private checkScrollCollapse(forOffset: number) {\n const shouldCollapse = forOffset > 80 && this.$itemList.height() + 52 < forOffset;\n\n if (!this.isScrolled && shouldCollapse) {\n this.$view.addClass(\"scrolled\");\n this.isScrolled = true;\n } else if (this.isScrolled && !shouldCollapse) {\n this.$view.removeClass(\"scrolled\");\n this.isScrolled = false;\n }\n }\n\n private onScroll() {\n if (!this.listenToScrollEvents) return;\n\n const currentOffset = this.$itemList.scrollTop();\n\n //get section closest to top\n const sections = new Array<{ el: JQuery; offset: number }>();\n this.$itemList.children(\".section\").each((i, e) => {\n const el = $(e);\n const offset = el.position().top;\n if (offset <= (this.isScrolled ? 62 : 131)) sections.push({ el: el, offset: offset });\n });\n\n if (sections.length > 0) {\n const closest = sections.sort((a, b) => Math.abs(a.offset) - Math.abs(b.offset))[0];\n this.categorySlider.moveScrollTo(closest.el.attr(\"data-id\"));\n }\n\n this.checkScrollCollapse(currentOffset);\n }\n\n private displayConfirmationPopover() {\n const fulfillmentBtn = document.querySelector(\".fulfillmentbtn\") as HTMLButtonElement | null;\n const returnFromCart = document.querySelector(\".view.cart.animright\") as HTMLElement | null;\n const orderOverviewPage = document.querySelector(\".view.order.shown\") as HTMLElement | null;\n const returnOrderHistory = document.querySelector(\".view.orderhistory.animright\") as HTMLElement | null;\n const returnOrderHistoryOnDone = document.querySelector(\n \".view.order.fadetransition.shown\"\n ) as HTMLElement | null;\n\n if (\n fulfillmentBtn &&\n orderOverviewPage &&\n !returnFromCart &&\n (!returnOrderHistory || returnOrderHistoryOnDone)\n ) {\n fulfillmentBtn.click();\n }\n }\n\n private async showImage(imagePath: string) {\n // todo: stolen from CovidController - refactor to a shared function\n const parent = $(\".app\");\n\n const dim = $('
').appendTo(parent);\n\n dim[0].offsetHeight;\n dim.addClass(\"shown\");\n\n const pop = $('
').appendTo(parent);\n const s = await Image.preloadImage(imagePath);\n let img: JQuery;\n if (s !== undefined) img = $(s).appendTo(pop);\n else img = $('').appendTo(pop);\n\n pop[0].offsetHeight;\n\n const imgElement = img[0] as HTMLImageElement;\n const imgHeight = (parent.width() / imgElement.width) * imgElement.height;\n pop.css({\n height: imgHeight,\n \"margin-top\": imgHeight / -2,\n });\n\n pop.addClass(\"shown\");\n pop.append('
' + trans.general.close + \"
\");\n\n const hide = () => {\n dim.removeClass(\"shown\");\n pop.removeClass(\"shown\")\n .delay(400)\n .queue((e) => {\n dim.remove();\n pop.remove();\n\n e();\n });\n };\n\n dim.click(() => {\n hide();\n });\n\n pop.click(() => {\n hide();\n });\n }\n}\n","import { Factory } from \"@/data/dao/Factory\";\nimport { CustomerDao } from \"@/data/dao/service/CustomerDao\";\nimport type { ICustomerOrder } from \"@/data/model/Customer\";\nimport { Currency } from \"@/data/model/Enums\";\nimport { DateTime } from \"@/data/util/DateTime\";\nimport { Format } from \"@/data/util/Format\";\nimport { OrderHelper } from \"@/data/util/OrderHelper\";\n\nimport { logError } from \"@/shared/logging/errors\";\nimport { Ripple } from \"@/shared/ui/Ripple\";\n\nimport { TastierClient } from \"@/app/TastierClient\";\nimport { BaseController, ViewTransition } from \"@/app/controller/BaseController\";\nimport { trans } from \"@/app/localization/Trans\";\nimport { FulfillmentPopover } from \"@/app/popover/FulfillmentPopover\";\nimport { Popup } from \"@/app/ui/Popup\";\n\nexport class OrderHistoryController extends BaseController {\n public onGoBack?: { () };\n public onClick?: { (model: ICustomerOrder) };\n\n private readonly $orderList: JQuery;\n private currentOffset = 0;\n private entriesPerPage = 40;\n private isLoading = false;\n\n constructor() {\n super(\"orderhistory\");\n\n const hdr = $('
' + trans.orderHistory.title + \"
\").appendTo(\n this.$view\n );\n Ripple.bind($(''))\n .prependTo(hdr)\n .click((e) => {\n e.preventDefault();\n if (this.onGoBack !== undefined) this.onGoBack();\n });\n\n this.$orderList = $('
').appendTo(this.$view);\n }\n\n protected onBecomeVisible(param?: any, transition?: ViewTransition) {\n TastierClient.context.onFulfillmentsChanged.add(this.checkConfirmButtons, this);\n\n if (transition === undefined || transition === ViewTransition.Fade || transition === ViewTransition.SlideLeft) {\n TastierClient.context.loadFulfillmentsIfNeeded();\n\n this.isLoading = false;\n this.currentOffset = 0;\n this.$orderList.empty().scrollTop(0);\n\n this.fetchOrders();\n }\n\n this.bindLazyLoadScroll();\n }\n\n protected onBecomeInvisible() {\n this.unbindLazyLoadScroll();\n TastierClient.context.onFulfillmentsChanged.remove(this.checkConfirmButtons, this);\n }\n\n private async fetchOrders() {\n if (this.isLoading) return;\n\n this.isLoading = true;\n const loader = $(\n '
' + trans.orderHistory.loadingOrders + \"
\"\n ).appendTo(this.$orderList);\n\n try {\n const c = await Factory.getInstance(CustomerDao).getOrders({\n offset: this.currentOffset,\n limit: this.entriesPerPage,\n });\n loader.remove();\n\n const totalItems = this.currentOffset + c.items.length;\n if (totalItems === 0) {\n this.$orderList.append(\n `
${trans.orderHistory.noOrders}
`\n );\n this.unbindLazyLoadScroll();\n return;\n }\n\n for (const item of c.items) {\n this.appendOrder(item);\n }\n\n this.checkConfirmButtons();\n\n if (!c.hasNext) {\n this.unbindLazyLoadScroll();\n }\n\n this.currentOffset += c.items.length;\n this.isLoading = false;\n } catch (ex) {\n logError(ex);\n Popup.show(\"Failed to load orders.\");\n this.isLoading = false;\n this.unbindLazyLoadScroll();\n }\n }\n\n private bindLazyLoadScroll() {\n this.$orderList.unbind(\"scroll.orderhistory\").bind(\"scroll.orderhistory\", () => {\n const lastE = this.$orderList.children().last();\n if (lastE.length > 0) {\n if (lastE.position().top < this.$orderList.height() + 50) this.fetchOrders();\n }\n });\n }\n\n private unbindLazyLoadScroll() {\n this.$orderList.unbind(\"scroll.orderhistory\");\n }\n\n private checkConfirmButtons() {\n this.$orderList.find(\"> .order\").each((i, e) => {\n const el = $(e);\n const order: ICustomerOrder = el.data(\"model\");\n\n const btn = el.find(\"> .inner > .btn\");\n if (TastierClient.context.currentFulfillments.find((c) => c.orderId == order.id) !== undefined) {\n if (btn.length === 0) {\n Ripple.bind(\n $('
' + trans.orderHistory.confirmation + \"
\")\n .appendTo(el.find(\"> .inner\"))\n .click((e) => {\n e.preventDefault();\n e.stopPropagation();\n\n const clickedOrder: ICustomerOrder = $(e.currentTarget).parent().parent().data(\"model\");\n new FulfillmentPopover({\n orderId: clickedOrder.id,\n orderNumber:\n clickedOrder.dailyOrderIncrement !== undefined\n ? OrderHelper.padDailyIncrement(clickedOrder.dailyOrderIncrement)\n : clickedOrder.orderNumber,\n locationName: clickedOrder.locationName,\n orderTime: clickedOrder.date,\n tableName: clickedOrder.tableName,\n orderServiceId: clickedOrder.orderServiceId,\n orderScheduledFulfillmentDateTime: clickedOrder.scheduledFulfillmentDateTime,\n preorder: clickedOrder.preorder,\n }).show();\n })\n );\n }\n } else {\n if (btn.length !== 0) btn.remove();\n }\n });\n }\n\n private appendOrder(order: ICustomerOrder) {\n const o = $('
').data(\"model\", order).appendTo(this.$orderList);\n const io = $('
').appendTo(o);\n\n if (order.logoPath !== undefined)\n io.append('
\"Logo\"
');\n\n const d = $('
').appendTo(io);\n d.append(\"

\" + Format.htmlEscape(order.locationName) + \"

\");\n d.append(\n '
' +\n DateTime.toDateString(order.date) +\n \", \" +\n DateTime.toTimeString(order.date) +\n \"
\"\n );\n d.append(\n '
' + Format.toMoneyFormat(order.consumption + order.tip, Currency.Chf) + \"
\"\n );\n\n Ripple.bind(\n o.click((e) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (this.onClick !== undefined) this.onClick($(e.currentTarget).data(\"model\"));\n })\n );\n }\n}\n","import jsQR from \"jsqr\";\n\nimport { translations } from \"@/shared/localization/translations\";\nimport { logError } from \"@/shared/logging/errors\";\n\nimport { Overlay } from \"@/components/dialog/Overlay\";\n\nexport class QrVoucherCodeScanner extends Overlay {\n private stream?: MediaStream;\n private player: JQuery;\n private video: HTMLVideoElement;\n private qrDecoderInterval?: number;\n public onCodeDetected?: { (code: string) };\n\n constructor() {\n super();\n\n this.$element.append(\n `
${translations.qrScanner.scanQr}

${translations.qrScanner.pointCameraQr}

`\n );\n const inner = $('
').appendTo(this.$element.addClass(\"qrscanner\"));\n this.player = $('