{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.array.reduce.js","webpack:///./src/views/product-details.vue?5bf9","webpack:///./node_modules/@vueuse/core/index.mjs","webpack:///./node_modules/@microsoft/signalr/dist/esm/ILogger.js","webpack:///./node_modules/@vueuse/shared/index.cjs","webpack:///./src/components/enlarge-images.vue?772c","webpack:///./src/components/enlarge-images.vue?b258","webpack:///./src/components/enlarge-images.vue","webpack:///./node_modules/@microsoft/signalr/dist/esm/HeaderNames.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/Errors.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/ITransport.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HubConnection.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js","webpack:///./src/utils/chathub.ts","webpack:///./src/views/product-details.vue?6a5f","webpack:///./src/views/product-details.vue","webpack:///./node_modules/core-js/internals/engine-is-node.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/Utils.js","webpack:///./src/utils/fb.ts","webpack:///./node_modules/core-js/internals/array-method-is-strict.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/Loggers.js","webpack:///./src/views/product-details.vue?6c0c","webpack:///./node_modules/qrcode.vue/dist/qrcode.vue.browser.js","webpack:///./node_modules/core-js/internals/array-reduce.js"],"names":["$","$reduce","left","arrayMethodIsStrict","CHROME_VERSION","IS_NODE","CHROME_BUG","FORCED","target","proto","forced","reduce","callbackfn","length","arguments","this","undefined","unrefElement","elRef","_a","plain","$el","defaultWindow","window","document","navigator","location","useEventListener","args","event","listener","options","cleanup","stopWatch","el","addEventListener","removeEventListener","immediate","flush","stop","Object","defineProperty","defineProperties","getOwnPropertyDescriptors","getOwnPropertySymbols","prototype","hasOwnProperty","propertyIsEnumerable","_global","globalThis","global","self","globalKey","Map","useMouse","type","touch","resetOnTouchEnds","initialValue","x","y","eventFilter","sourceType","mouseHandler","value","pageX","pageY","clientX","clientY","reset","touchHandler","touches","touch2","mouseHandlerWrapper","touchHandlerWrapper","passive","useMouseInElement","handleOutside","targetRef","body","elementX","elementY","elementPositionX","elementPositionY","elementHeight","elementWidth","isOutside","top","width","height","getBoundingClientRect","pageXOffset","pageYOffset","elX","elY","SwipeDirection","SwipeDirection2","LogLevel","exports","vueDemi","__defProp$9","__defProps$6","__getOwnPropDescs$6","__getOwnPropSymbols$b","__hasOwnProp$b","__propIsEnum$b","__defNormalProp$9","obj","key","enumerable","configurable","writable","__spreadValues$9","a","b","prop","call","__spreadProps$6","computedEager","fn","result","shallowRef","watchEffect","readonly","isClient","isDef","val","assert","condition","infos","console","warn","toString","isBoolean","isFunction","isNumber","isString","isObject","isWindow","now","Date","timestamp","clamp","n","min","max","Math","noop","rand","ceil","floor","random","isIOS","userAgent","test","createFilterWrapper","filter","wrapper","apply","thisArg","bypassFilter","invoke","debounceFilter","ms","timer","maxTimer","duration","unref","maxDuration","maxWait","clearTimeout","setTimeout","throttleFilter","trailing","leading","lastExec","isLeading","clear","elapsed","pausableFilter","extendFilter","isActive","ref","pause","resume","__onlyVue3","name","isVue3","Error","directiveHooks","mounted","updated","unmounted","promiseTimeout","throwOnTimeout","reason","Promise","resolve","reject","identity","arg","createSingletonPromise","_promise","async","_prev","containsProp","props","some","k","increaseWithUnit","delta","match","unit","slice","parseFloat","Number","isNaN","objectPick","keys","omitUndefined","computedWithControl","source","track","trigger","v","dirty","update","watch","get","set","customRef","_track","_trigger","v2","isExtensible","createEventHook","fns","off","index","indexOf","splice","on","push","param","forEach","createGlobalState","stateFactory","state","initialized","scope","effectScope","run","createInjectionState","composable","Symbol","useProvidingState","provide","useInjectedState","inject","tryOnScopeDispose","getCurrentScope","onScopeDispose","createSharedComposable","subscribers","dispose","extendRef","extend","unwrap","entries","isRef","isDefined","logicAnd","computed","every","i","logicNot","logicOr","__defProp$8","__getOwnPropSymbols$a","__hasOwnProp$a","__propIsEnum$a","__defNormalProp$8","__spreadValues$8","makeDestructurable","arr","clone","iterator","next","done","assign","reactify","map","reactifyObject","optionsOrKeys","Array","isArray","includeOwnProperties","getOwnPropertyNames","fromEntries","bind","toReactive","objectRef","reactive","proxy","Proxy","_","p","receiver","Reflect","deleteProperty","has","reactiveComputed","reactiveOmit","flatKeys","flat","toRefs","e","includes","reactivePick","toRef","refAutoReset","defaultValue","afterMs","resetAfter","newValue","useDebounceFn","refDebounced","debounced","updater","refDefault","useThrottleFn","refThrottled","delay","throttled","refWithControl","initial","tracking","triggering","_b","old","onBeforeChange","onChanged","untrackedGet","silentSet","peek","lay","controlledRef","resolveRef","r","resolveUnref","isVue2","syncRef","right","deep","direction","stop1","stop2","syncRefs","targets","__defProp$7","__defProps$5","__getOwnPropDescs$5","__getOwnPropSymbols$9","__hasOwnProp$9","__propIsEnum$9","__defNormalProp$7","__spreadValues$7","__spreadProps$5","copy","newObject","setPrototypeOf","tryOnBeforeMount","sync","getCurrentInstance","onBeforeMount","nextTick","tryOnBeforeUnmount","onBeforeUnmount","tryOnMounted","onMounted","tryOnUnmounted","onUnmounted","until","isNot","toMatch","timeout","watcher","promises","then","finally","race","toBe","v1","toBeTruthy","Boolean","toBeNull","toBeUndefined","toBeNaN","toContains","array","from","changed","changedTimes","count","instance","useCounter","Infinity","inc","dec","REGEX_PARSE","REGEX_FORMAT","formatDate","date","formatStr","years","getFullYear","month","getMonth","days","getDate","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds","day","getDay","matches","YY","String","YYYY","M","MM","padStart","D","DD","H","HH","h","hh","m","mm","s","ss","SSS","d","replace","$1","normalizeDate","NaN","substring","useDateFormat","useIntervalFn","cb","interval","immediateCallback","clean","clearInterval","setInterval","__defProp$6","__getOwnPropSymbols$8","__hasOwnProp$8","__propIsEnum$8","__defNormalProp$6","__spreadValues$6","useInterval","controls","exposeControls","counter","useLastChanged","useTimeoutFn","isPending","start","__defProp$5","__getOwnPropSymbols$7","__hasOwnProp$7","__propIsEnum$7","__defNormalProp$5","__spreadValues$5","useTimeout","ready","useToggle","truthyValue","falsyValue","valueIsRef","innerValue","toggle","watchArray","oldList","Function","newList","onCleanup","oldListRemains","added","found","removed","_2","__getOwnPropSymbols$6","__hasOwnProp$6","__propIsEnum$6","__objRest$5","exclude","watchWithFilter","watchOptions","__getOwnPropSymbols$5","__hasOwnProp$5","__propIsEnum$5","__objRest$4","watchAtMost","current","__defProp$4","__defProps$4","__getOwnPropDescs$4","__getOwnPropSymbols$4","__hasOwnProp$4","__propIsEnum$4","__defNormalProp$4","__spreadValues$4","__spreadProps$4","__objRest$3","watchDebounced","debounce","__defProp$3","__defProps$3","__getOwnPropDescs$3","__getOwnPropSymbols$3","__hasOwnProp$3","__propIsEnum$3","__defNormalProp$3","__spreadValues$3","__spreadProps$3","__objRest$2","watchIgnorable","filteredCb","ignoreUpdates","ignorePrevAsyncUpdates","ignore","disposables","ignoreCounter","syncCounter","syncCounterPrev","watchOnce","__defProp$2","__defProps$2","__getOwnPropDescs$2","__getOwnPropSymbols$2","__hasOwnProp$2","__propIsEnum$2","__defNormalProp$2","__spreadValues$2","__spreadProps$2","__objRest$1","watchPausable","__defProp$1","__defProps$1","__getOwnPropDescs$1","__getOwnPropSymbols$1","__hasOwnProp$1","__propIsEnum$1","__defNormalProp$1","__spreadValues$1","__spreadProps$1","__objRest","watchThrottled","throttle","__defProp","__defProps","__getOwnPropDescs","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","__spreadValues","__spreadProps","watchTriggerable","cleanupFn","onEffect","callback","_cb","oldValue","res","res2","getWatchSources","getOldValue","sources","isReactive","item","getOneWatchSource","whenever","ov","onInvalidate","and","autoResetRef","controlledComputed","createReactiveFn","debouncedRef","debouncedWatch","eagerComputed","ignorableWatch","not","or","pausableWatch","throttledRef","throttledWatch","useDebounce","useThrottle","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_defineComponent","__name","images","default","MainGraph","setup","__props","currIndex","isShow","position","bgPosition","backgroundPositionX","backgroundPositionY","_ctx","_cache","_component_icon_picture","_resolveComponent","_component_el_icon","_component_el_image","_component_el_scrollbar","_openBlock","_createElementBlock","_withDirectives","_createElementVNode","style","_normalizeStyle","backgroundImage","_vShow","ref_key","_createVNode","fit","src","error","_withCtx","_Fragment","_renderList","img","_normalizeClass","active","onMouseenter","$event","__exports__","HeaderNames","Authorization","Cookie","HttpTransportType","TransferFormat","TextMessageFormat","output","RecordSeparator","input","messages","split","pop","RecordSeparatorCode","fromCharCode","MessageType","HubConnectionState","Trace","Debug","Information","Warning","Critical","None","myPromise","myTime","_withScopeId","_pushScopeId","_popScopeId","_hoisted_5","_hoisted_6","_imports_0","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_imports_2","_hoisted_23","_imports_3","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_67","_hoisted_68","_hoisted_69","_hoisted_70","_hoisted_71","_hoisted_72","store","useUsersStore","Cities","Token","t","useI18n","Router","useRouter","hrefUrl","href","route","useRoute","GoodsRecommendList","isLadderPrices","ShowCities","Citie","SkuValueQty","CombinationSku","CurrentSku","GroceryList","GroceryQty","NoGoods","Remark","IsBlacklist","PriceRange","buttonRef","popoverRef","onClickOutside","_unref$popperRef","_unref$popperRef$dela","popperRef","delayHide","connection","GoodsItem","parse","GoodsName","Skus","ele","SelectSku","Values","ImgUrl","MasterImg","Price","Qty","OutSkuId","GetGoodsRecommend","sku","Value","_CurrentSku$value","_CurrentSku$value3","SkuValue","_CurrentSku$value2","_CurrentSku$value4","SkuMap","find","MallId","AddGroceryList","RedirectUrl","query","Url","GetProduct","isCheck","isExists","findIndex","SkuTitle","RmbPrice","SkuImgUrl","SkuValueId","QuantityChange","prev","cur","LadderPrices","CheckLadderPrices","DeleteGrocery","GroceryChange","ladder","EndQuantity","StartQuantity","SameParagraph","Imgs","isAdd","MinQuantity","FavoriteLoding","FavoriteId","CustomerFavorite","Id","OutProductId","OutID","ProductUrl","ProductImgUrl","ProductName","Api","CheckFavoriteFavorite","pId","GetCities","setState","province_id","Beyond","TemplatesDetails","CityFreight","ChangeCityFreight","City","_Templates$FreightRul","CityID","CityId","Templates","FreightTemplatesDetails","NoDeliveryCityId","Cid","FreightRules","isTemplates","FreightTemplates","Freight","_item$value","AddCart","SkuValues","data","OutId","PurchasingSiteId","ShopName","CustomerMemo","ProductId","RemarkImg","SellerPId","CategoryId","loading","ElLoading","service","lock","text","background","close","PageIndex","PageSize","IsError","ElMessageBox","confirm","confirmButtonText","cancelButtonText","catch","path","_proxy$$SiteSet","title","$SiteSet","LODA","TypeId","frontCartId","Goods","Update","mallId","outId","pid","_item$value2","SellerInfo","ShopTypeId","sessionStorage","getItem","IsUpdate","SearchChannel","log","_component_el_popover","_component_Star","_component_StarFilled","_component_el_link","_component_el_button","_component_arrow_down_bold","_component_suffix_img","_component_el_input_number","_component_font","_component_el_input","_component_router_link","_component_el_skeleton_item","_component_el_skeleton","_component_CircleCloseFilled","_component_SemiSelect","_component_WarningFilled","_directive_loading","_resolveDirective","_Transition","_item$value3","_item$value4","_CurrentSku$value5","_CurrentSku$value6","_CurrentSku$value7","_CurrentSku$value8","_CurrentSku$value9","_CurrentSku$value10","IsShelves","NotSupportLink","_createCommentVNode","EnlargeImages","_toDisplayString","$t","placement","reference","QrcodeVue","level","onClick","_unref","ShareFacebook","_imports_1","MallLabel","GoogleTranslate","_createBlock","bg","_createTextVNode","Ladder","isLadder","$ccy","DiscountPrice","DiscountRate","CityName","TemplatesDetail","ConditionValue","_unref2","onMouseleave","C","Country","DeliveryCountry","Payments","Payment","PaymentTypeId","PaymentValue","MallName","ExchangeRate","Sku","Index","Name","checkVal","url","modelValue","size","StockQty","onKeyup","onChange","precision","vClickOutside","icon","circle","rows","maxlength","placeholder","color","disabled","ShopLogo","to","shopId","ShopId","ChatResponseRate","ChatResponseSpeed","ProductNum","Evaluation","toFixed","CreatedMonth","GoodsRecommend","CommodityCard","innerHTML","Description","animated","template","isImage","variant","isText","_item$value5","_unref$query","_unref$query2","_item$value6","_item$value7","_item$value8","classof","module","process","VERSION","Arg","values","Platform","isBrowser","isWebWorker","isReactNative","getDataDetail","includeContent","detail","isArrayBuffer","byteLength","formatArrayBuffer","view","Uint8Array","str","num","pad","substr","ArrayBuffer","constructor","sendMessage","logger","transportName","httpClient","content","headers","getUserAgentHeader","logMessageContent","responseType","response","post","withCredentials","statusCode","createLogger","ConsoleLogger","SubjectSubscription","subject","observer","_subject","_observer","observers","cancelCallback","minimumLogLevel","_minLevel","out","logLevel","message","msg","toISOString","info","userAgentHeaderName","isNode","constructUserAgent","getOsName","getRuntime","getRuntimeVersion","version","os","runtime","runtimeVersion","majorAndMinor","platform","versions","node","getErrorString","stack","getGlobalThis","fbJsdk","typeIndex","id","js","fjs","getElementsByTagName","getElementById","createElement","parentNode","insertBefore","fbAsyncInit","FB","init","appId","autoLogAppEvents","xfbml","ui","method","fails","METHOD_NAME","argument","NullLogger","_logLevel","_message","factory","vue","qrcodegen","__assign","SuppressedError","QrCode","errorCorrectionLevel","dataCodewords","msk","modules","MIN_VERSION","MAX_VERSION","RangeError","row","drawFunctionPatterns","allCodewords","addEccAndInterleave","drawCodewords","minPenalty","applyMask","drawFormatBits","penalty","getPenaltyScore","mask","encodeText","ecl","segs","QrSegment","makeSegments","encodeSegments","encodeBinary","seg","makeBytes","minVersion","maxVersion","boostEcl","dataUsedBits","dataCapacityBits_1","getNumDataCodewords","usedBits","getTotalBits","_i","Ecc","MEDIUM","QUARTILE","HIGH","newEcl","bb","segs_1","appendBits","mode","modeBits","numChars","numCharCountBits","_c","_d","getData","dataCapacityBits","padByte","getModule","getModules","setFunctionModule","drawFinderPattern","alignPatPos","getAlignmentPatternPositions","numAlign","j","drawAlignmentPattern","drawVersion","formatBits","rem","bits","getBit","dy","dx","dist","abs","xx","yy","isDark","ver","numBlocks","NUM_ERROR_CORRECTION_BLOCKS","ordinal","blockEccLen","ECC_CODEWORDS_PER_BLOCK","rawCodewords","getNumRawDataModules","numShortBlocks","shortBlockLen","blocks","rsDiv","reedSolomonComputeDivisor","dat","ecc","reedSolomonComputeRemainder","concat","_loop_1","block","vert","upward","invert","runColor","runX","runHistory","PENALTY_N1","finderPenaltyAddHistory","finderPenaltyCountPatterns","PENALTY_N3","finderPenaltyTerminateAndCount","runY","PENALTY_N2","dark","sum","total","PENALTY_N4","step","pos","degree","root","reedSolomonMultiply","divisor","_loop_2","factor","shift","coef","data_1","z","core","currentRunColor","currentRunLength","unshift","len","cond","bitData","data_2","Mode","BYTE","makeNumeric","digits","isNumeric","parseInt","NUMERIC","makeAlphanumeric","isAlphanumeric","temp","ALPHANUMERIC_CHARSET","charAt","ALPHANUMERIC","toUtf8ByteArray","makeEci","assignVal","ECI","NUMERIC_REGEX","ALPHANUMERIC_REGEX","segs_2","ccbits","encodeURI","charCodeAt","LOW","numBitsCharCount","KANJI","QR","defaultErrorCorrectLevel","ErrorCorrectLevelMap","L","Q","SUPPORTS_PATH2D","Path2D","addPath","validErrorCorrectLevel","generatePath","margin","ops","cell","join","QRCodeProps","required","validator","l","foreground","QRCodeVueProps","renderAs","as","QRCodeSvg","defineComponent","numCells","fgPath","generate","cells","onUpdated","xmlns","viewBox","fill","QRCodeCanvas","canvasEl","canvas","ctx","getContext","devicePixelRatio","scale","fillStyle","fillRect","rdx","cdx","render","$props","_size","_margin","_level","aCallable","toObject","IndexedObject","lengthOfArrayLike","$TypeError","TypeError","createMethod","IS_RIGHT","that","argumentsLength","memo","O"],"mappings":"kHACA,IAAIA,EAAI,EAAQ,QACZC,EAAU,EAAQ,QAA6BC,KAC/CC,EAAsB,EAAQ,QAC9BC,EAAiB,EAAQ,QACzBC,EAAU,EAAQ,QAIlBC,GAAcD,GAAWD,EAAiB,IAAMA,EAAiB,GACjEG,EAASD,IAAeH,EAAoB,UAIhDH,EAAE,CAAEQ,OAAQ,QAASC,OAAO,EAAMC,OAAQH,GAAU,CAClDI,OAAQ,SAAgBC,GACtB,IAAIC,EAASC,UAAUD,OACvB,OAAOZ,EAAQc,KAAMH,EAAYC,EAAQA,EAAS,EAAIC,UAAU,QAAKE,O,2DCjBzE,W,qCCAA,0FAmFA,SAASC,EAAaC,GACpB,IAAIC,EACJ,MAAMC,EAAQ,mBAAMF,GACpB,OAAoD,OAA5CC,EAAc,MAATC,OAAgB,EAASA,EAAMC,KAAeF,EAAKC,EAGlE,MAAME,EAAgB,cAAWC,YAAS,EAClB,eAAWA,OAAOC,SACjB,eAAWD,OAAOE,UACnB,eAAWF,OAAOG,SAE1C,SAASC,KAAoBC,GAC3B,IAAIpB,EACAqB,EACAC,EACAC,EAOJ,GANI,sBAASH,EAAK,MACfC,EAAOC,EAAUC,GAAWH,EAC7BpB,EAASc,IAERd,EAAQqB,EAAOC,EAAUC,GAAWH,GAElCpB,EACH,OAAO,UACT,IAAIwB,EAAU,UACd,MAAMC,EAAY,mBAAM,IAAMhB,EAAaT,GAAU0B,IACnDF,IACKE,IAELA,EAAGC,iBAAiBN,EAAOC,EAAUC,GACrCC,EAAU,KACRE,EAAGE,oBAAoBP,EAAOC,EAAUC,GACxCC,EAAU,aAEX,CAAEK,WAAW,EAAMC,MAAO,SACvBC,EAAO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9B,GAAa,K","file":"assets/js/chunk-061cd40f.dcd5642f.js","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\nvar FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: FORCED }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);\n }\n});\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./product-details.vue?vue&type=style&index=1&id=165c7b98&scoped=true&lang=scss\"","import { noop, isClient, isString, tryOnScopeDispose, tryOnMounted, promiseTimeout, tryOnBeforeMount, increaseWithUnit, clamp, useTimeoutFn, pausableWatch, createEventHook, isFunction, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, isDef, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, syncRef, objectPick, tryOnUnmounted, isIOS, watchWithFilter, identity } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, shallowRef, onMounted, markRaw, getCurrentScope, readonly, nextTick, isVue2, set, del, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = unref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let event;\n let listener;\n let options;\n if (isString(args[0])) {\n [event, listener, options] = args;\n target = defaultWindow;\n } else {\n [target, event, listener, options] = args;\n }\n if (!target)\n return noop;\n let cleanup = noop;\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (!el)\n return;\n el.addEventListener(event, listener, options);\n cleanup = () => {\n el.removeEventListener(event, listener, options);\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore, capture = true, detectIframe = false } = options;\n if (!window)\n return;\n const shouldListen = ref(true);\n let fallback;\n const listener = (event) => {\n window.clearTimeout(fallback);\n const el = unrefElement(target);\n const composedPath = event.composedPath();\n if (!el || el === event.target || composedPath.includes(el) || !shouldListen.value)\n return;\n if (ignore && ignore.length > 0) {\n if (ignore.some((target2) => {\n const el2 = unrefElement(target2);\n return el2 && (event.target === el2 || composedPath.includes(el2));\n }))\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen.value = !!el && !e.composedPath().includes(el);\n }, { passive: true }),\n useEventListener(window, \"pointerup\", (e) => {\n if (e.button === 0) {\n const path = e.composedPath();\n e.composedPath = () => path;\n fallback = window.setTimeout(() => listener(e), 50);\n }\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n else if (keyFilter)\n return () => true;\n else\n return () => false;\n};\nfunction onKeyStroke(key, handler, options = {}) {\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$j({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$j({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$j({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout = null;\n function clear() {\n if (timeout != null) {\n clearTimeout(timeout);\n timeout = null;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n const { window = defaultWindow } = options;\n const counter = ref(0);\n if (window) {\n useEventListener(window, \"blur\", () => counter.value += 1, true);\n useEventListener(window, \"focus\", () => counter.value += 1, true);\n }\n return computed(() => {\n counter.value;\n return window == null ? void 0 : window.document.activeElement;\n });\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n resetOnExecute = true,\n shallow = true\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n } catch (e) {\n error.value = e;\n onError(e);\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = unref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = navigator && \"getBattery\" in navigator;\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = navigator && \"bluetooth\" in navigator;\n const device = ref(void 0);\n const error = ref(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = Boolean(window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const update = () => {\n if (!isSupported)\n return;\n if (!mediaQuery)\n mediaQuery = window.matchMedia(query);\n matches.value = mediaQuery.matches;\n };\n tryOnBeforeMount(() => {\n update();\n if (!mediaQuery)\n return;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n tryOnScopeDispose(() => {\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n });\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\n\nvar __defProp$i = Object.defineProperty;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greater = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greater(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$i({\n greater,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = window && \"BroadcastChannel\" in window;\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClamp(value, min, max) {\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, unref(min), unref(max));\n },\n set(value2) {\n _value.value = clamp(value2, unref(min), unref(max));\n }\n });\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const events = [\"copy\", \"cut\"];\n const isSupported = Boolean(navigator && \"clipboard\" in navigator);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n }\n if (isSupported && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = unref(source)) {\n if (isSupported && value != null) {\n await navigator.clipboard.writeText(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : Array.isArray(rawInit) ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nfunction useStorage(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(initialValue);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = unref(initialValue);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", update);\n update();\n return data;\n function write(v) {\n try {\n if (v == null)\n storage.removeItem(key);\n else\n storage.setItem(key, serializer.write(v));\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n } finally {\n resumeWatch();\n }\n }\n function update(event) {\n if (event && event.key !== key)\n return;\n data.value = read(event);\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$h({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(\"auto\") : useStorage(storageKey, \"auto\", storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => unref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(unref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const count = ref(0);\n onUpdated(() => {\n count.value += 1;\n });\n onMounted(() => {\n count.value += 1;\n });\n return computed(() => {\n count.value;\n return vm.proxy.$el;\n });\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$g({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnClone = (v) => JSON.parse(JSON.stringify(v));\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : fnClone : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : fnClone : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$f({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$f({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$g.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(b)) {\n if (__propIsEnum$g.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$e({}, options), { eventFilter: filter }));\n return __spreadValues$e({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = Boolean(window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nconst DEVICE_PIXEL_RATIO_SCALES = [\n 1,\n 1.325,\n 1.4,\n 1.5,\n 1.8,\n 2,\n 2.4,\n 2.5,\n 2.75,\n 3,\n 3.5,\n 4\n];\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n if (!window) {\n return {\n pixelRatio: ref(1)\n };\n }\n const pixelRatio = ref(window.devicePixelRatio);\n const handleDevicePixelRatio = () => {\n pixelRatio.value = window.devicePixelRatio;\n };\n useEventListener(window, \"resize\", handleDevicePixelRatio, { passive: true });\n DEVICE_PIXEL_RATIO_SCALES.forEach((dppx) => {\n const mqlMin = useMediaQuery(`screen and (min-resolution: ${dppx}dppx)`);\n const mqlMax = useMediaQuery(`screen and (max-resolution: ${dppx}dppx)`);\n watch([mqlMin, mqlMax], handleDevicePixelRatio);\n });\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = Boolean(navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n let isSupported = false;\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (navigator) {\n isSupported = Boolean(navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n if (isSupported) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = Boolean((_b = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _b.getDisplayMedia);\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const position = ref((_b = options.initialValue) != null ? _b : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (unref(options.preventDefault))\n e.preventDefault();\n if (unref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (unref(options.exact) && e.target !== unref(target))\n return;\n const rect = unref(target).getBoundingClientRect();\n const pos = {\n x: e.pageX - rect.left,\n y: e.pageY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.pageX - pressedDelta.value.x,\n y: e.pageY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(target, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$d({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n if (files.length === 0) {\n onDrop(null);\n return;\n }\n onDrop(files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = window && \"ResizeObserver\" in window;\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let rafId = null;\n function loop() {\n if (!isActive.value || !window)\n return;\n fn();\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y } = options;\n const controls = useRafFn(() => {\n element.value = document.elementFromPoint(unref(x), unref(y));\n });\n return __spreadValues$c({\n element\n }, controls);\n}\n\nfunction useElementHover(el) {\n const isHovered = ref(false);\n useEventListener(el, \"mouseenter\", () => isHovered.value = true);\n useEventListener(el, \"mouseleave\", () => isHovered.value = false);\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n if (!unref(element)) {\n elementIsVisible.value = false;\n } else {\n const rect = unref(element).getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n tryOnMounted(testBounding);\n if (window)\n tryOnMounted(() => useEventListener(unref(scrollTarget) || window, \"scroll\", testBounding, { capture: false, passive: true }));\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = Boolean(typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = isRef(newIcon) ? newIcon : ref(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\",\n formData: \"multipart/form-data\"\n};\nfunction isFetchOptions(obj) {\n return containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction createFetch(config = {}) {\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => config.baseUrl ? joinPaths(unref(config.baseUrl), unref(url)) : unref(url));\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadValues$b(__spreadValues$b({}, options), args[0]);\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$b(__spreadValues$b({}, fetchOptions), args[0]), {\n headers: __spreadValues$b(__spreadValues$b({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1]))\n options = __spreadValues$b(__spreadValues$b({}, options), args[1]);\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$b(__spreadValues$b({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$b(__spreadValues$b({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller)\n controller.abort();\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n controller = void 0;\n if (supportsAbort) {\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$b({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(unref(config.payload)) : unref(config.payload);\n }\n let isCanceled = false;\n const context = { url: unref(url), options: __spreadValues$b(__spreadValues$b({}, defaultFetchOptions), fetchOptions), cancel: () => {\n isCanceled = true;\n } };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$b(__spreadValues$b({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$b(__spreadValues$b({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n watch(() => [\n unref(url),\n unref(options.refetch)\n ], () => unref(options.refetch) && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(() => [\n unref(config.payload),\n unref(options.refetch)\n ], () => unref(options.refetch) && execute(), { deep: true });\n }\n if (!payloadType && unref(payload) && Object.getPrototypeOf(unref(payload)) === Object.prototype)\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$b({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$b({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$b({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$a(__spreadValues$a(__spreadValues$a({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = Boolean(window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$9(__spreadValues$9({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$9(__spreadValues$9({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$9(__spreadValues$9({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed({\n get() {\n return isDef(activeElement.value) && isDef(targetElement.value) && activeElement.value === targetElement.value;\n },\n set(value) {\n var _a, _b;\n if (!value && focused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n if (value && !focused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let isSupported = false;\n let map = functionsMap[0];\n if (!document) {\n isSupported = false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n isSupported = true;\n break;\n }\n }\n }\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = navigator && \"getGamepads\" in navigator;\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator\n } = options;\n const isSupported = navigator && \"geolocation\" in navigator;\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n if (isSupported) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n tryOnScopeDispose(() => {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(unref(options)), void 0, __spreadValues$8({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => unref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n }\n } = options;\n const x = ref(0);\n const y = ref(0);\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n if (element) {\n const onScrollEnd = useDebounceFn((e) => {\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n }, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < x.value;\n directions.right = scrollLeft > x.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0);\n x.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < y.value;\n directions.bottom = scrollTop > y.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0);\n y.value = scrollTop;\n isScrolling.value = true;\n onScrollEnd(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle) : onScrollHandler, eventListenerOptions);\n }\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$7({}, options), {\n offset: __spreadValues$7({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = unref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = window && \"IntersectionObserver\" in window;\n let cleanup = noop;\n const stopWatch = isSupported ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = { toJSON() {\n return {};\n }, current };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (code) {\n if (value)\n current.add(e.code);\n else\n current.delete(e.code);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n if (target) {\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n }\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (unref(source))\n cb(unref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$6(__spreadValues$6({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = unref(target);\n if (!el)\n return;\n const src = unref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = unref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = unref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = unref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = unref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = unref(options.tracks);\n const el = unref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = unref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = unref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = unref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = unref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(unref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => waiting.value = false);\n useEventListener(target, \"ratechange\", () => rate.value = unref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = unref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = unref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => Object.prototype.hasOwnProperty.call(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = typeof performance !== \"undefined\" && \"memory\" in performance;\n if (isSupported) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch) {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = window && \"MutationObserver\" in window;\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = Boolean(navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = Boolean(navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$5({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.ceil(unref(total) / unref(currentPageSize)));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$4({}, toRefs(state)), {\n isInside\n });\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = ref(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!filterEvent(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!filterEvent(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!filterEvent(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = !!(window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${src}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = unref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${src}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(() => unref(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = unref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", preventDefault, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = unref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = _navigator && \"canShare\" in _navigator;\n const share = async (overrideOptions = {}) => {\n if (isSupported) {\n const data = __spreadValues$3(__spreadValues$3({}, unref(shareOptions)), unref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = ref(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = Boolean(SpeechRecognition);\n let recognition;\n if (isSupported) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n var _a, _b;\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = Boolean(synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const voiceInfo = {\n lang: ((_a = options.voice) == null ? void 0 : _a.lang) || \"default\",\n name: ((_b = options.voice) == null ? void 0 : _b.name) || \"\"\n };\n const spokenText = ref(text || \"\");\n const lang = ref(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n options.voice && (utterance2.voice = options.voice);\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n utterance2.lang = unref(lang);\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n if (isSupported) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n voiceInfo,\n utterance,\n error,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = unref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.innerText = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$2({}, options), { eventFilter: filter }));\n return __spreadValues$2({}, history);\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n max,\n updateInterval = 3e4,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER\n } = options;\n const { abs, round } = Math;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n function getTimeago(from, now2) {\n var _a2;\n const diff = +now2 - +from;\n const absDiff = abs(diff);\n if (absDiff < 6e4)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a2 = UNITS.find((i) => i.name === max)) == null ? void 0 : _a2.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const unit of UNITS) {\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n function format(diff, unit) {\n const val = round(abs(diff) / unit.value);\n const past = diff > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n const timeAgo = computed(() => getTimeago(new Date(unref(time)), unref(now.value)));\n if (exposeControls) {\n return __spreadValues$1({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\"\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate }) : useIntervalFn(update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument,\n observe = false,\n titleTemplate = \"%s\"\n } = options;\n const title = ref((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n watch(title, (t, o) => {\n if (isString(t) && t !== o && document)\n document.title = titleTemplate.replace(\"%s\", t);\n }, { immediate: true });\n if (observe && document) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = titleTemplate.replace(\"%s\", document.title);\n }, { childList: true });\n }\n return title;\n}\n\nconst TransitionPresets = {\n linear: identity,\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled)) {\n outputVector.value = sourceVector.value.slice(0);\n } else {\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }\n }, { deep: true });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b, _c;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = Boolean((_c = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _c.getUserMedia);\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const getValue = () => isDef(props[key]) ? props[key] : defaultValue;\n if (passive) {\n const proxy = ref(getValue());\n watch(() => props[key], (v) => proxy.value = v);\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, {\n deep\n });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = typeof navigator !== \"undefined\" && \"vibrate\" in navigator;\n const patternRef = ref(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const containerRef = ref();\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = (containerHeight) => {\n if (typeof itemHeight === \"number\")\n return Math.ceil(containerHeight / itemHeight);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const height = itemHeight(i);\n sum += height;\n if (sum >= containerHeight) {\n capacity = i;\n break;\n }\n }\n return capacity - start;\n };\n const getOffset = (scrollTop) => {\n if (typeof itemHeight === \"number\")\n return Math.floor(scrollTop / itemHeight) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const height = itemHeight(i);\n sum += height;\n if (sum >= scrollTop) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n const calculateRange = () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(element.scrollTop);\n const viewCapacity = getViewCapacity(element.clientHeight);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n const totalHeight = computed(() => {\n if (typeof itemHeight === \"number\")\n return source.value.length * itemHeight;\n return source.value.reduce((sum, _, index) => sum + itemHeight(index), 0);\n });\n const getDistanceTop = (index) => {\n if (typeof itemHeight === \"number\") {\n const height2 = index * itemHeight;\n return height2;\n }\n const height = source.value.slice(0, index).reduce((sum, _, i) => sum + itemHeight(i), 0);\n return height;\n };\n const scrollTo = (index) => {\n if (containerRef.value) {\n containerRef.value.scrollTop = getDistanceTop(index);\n calculateRange();\n }\n };\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n const containerStyle = { overflowY: \"auto\" };\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = navigator && \"wakeLock\" in navigator;\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = !!window && \"Notification\" in window;\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const wsRef = ref();\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n const ws = new WebSocket(url, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n explicitlyClosed = false;\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = \"ping\",\n interval = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => send(message, false), interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (immediate)\n _init();\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n retried = 0;\n _init();\n };\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(url, workerOptions, options = {}) {\n const {\n window = defaultWindow\n } = options;\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n worker.value = new Worker(url, workerOptions);\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.pageXOffset);\n const y = ref(window.pageYOffset);\n useEventListener(\"scroll\", () => {\n x.value = window.pageXOffset;\n y.value = window.pageYOffset;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, computedAsync, computedInject, createFetch, createUnrefFn, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClamp, useClipboard, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerSwipe, usePreferredColorScheme, usePreferredDark, usePreferredLanguages, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSwipe, useTemplateRefsList, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here.\r\n/** Indicates the severity of a log message.\r\n *\r\n * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc.\r\n */\r\nexport var LogLevel;\r\n(function (LogLevel) {\r\n /** Log level for very low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\r\n /** Log level for low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\r\n /** Log level for informational diagnostic messages. */\r\n LogLevel[LogLevel[\"Information\"] = 2] = \"Information\";\r\n /** Log level for diagnostic messages that indicate a non-fatal problem. */\r\n LogLevel[LogLevel[\"Warning\"] = 3] = \"Warning\";\r\n /** Log level for diagnostic messages that indicate a failure in the current operation. */\r\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\r\n /** Log level for diagnostic messages that indicate a failure that will terminate the entire application. */\r\n LogLevel[LogLevel[\"Critical\"] = 5] = \"Critical\";\r\n /** The highest possible log level. Used when configuring logging to indicate that no log messages should be emitted. */\r\n LogLevel[LogLevel[\"None\"] = 6] = \"None\";\r\n})(LogLevel || (LogLevel = {}));\r\n//# sourceMappingURL=ILogger.js.map","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar vueDemi = require('vue-demi');\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = vueDemi.shallowRef();\n vueDemi.watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return vueDemi.readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n filter(() => fn.apply(this, args), { fn, thisArg: this, args });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n const filter = (invoke) => {\n const duration = vueDemi.unref(ms);\n const maxDuration = vueDemi.unref(options.maxWait);\n if (timer)\n clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n clearTimeout(maxTimer);\n maxTimer = null;\n }\n return invoke();\n }\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n clearTimeout(timer);\n maxTimer = null;\n invoke();\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n clearTimeout(maxTimer);\n maxTimer = null;\n invoke();\n }, duration);\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n };\n const filter = (invoke) => {\n const duration = vueDemi.unref(ms);\n const elapsed = Date.now() - lastExec;\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n clear();\n invoke();\n }, duration);\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = vueDemi.ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive, pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (vueDemi.isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nconst directiveHooks = {\n mounted: vueDemi.isVue3 ? \"mounted\" : \"inserted\",\n updated: vueDemi.isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: vueDemi.isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = vueDemi.ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n vueDemi.watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = vueDemi.customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n return {\n off: () => off(fn)\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = vueDemi.effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n vueDemi.provide(key, composable(...args));\n };\n const useInjectedState = () => vueDemi.inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction tryOnScopeDispose(fn) {\n if (vueDemi.getCurrentScope()) {\n vueDemi.onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = vueDemi.effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue3();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (vueDemi.isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return vueDemi.unref(obj);\n return vueDemi.unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return vueDemi.unref(v) != null;\n}\n\nfunction logicAnd(...args) {\n return vueDemi.computed(() => args.every((i) => vueDemi.unref(i)));\n}\n\nfunction logicNot(v) {\n return vueDemi.computed(() => !vueDemi.unref(v));\n}\n\nfunction logicOr(...args) {\n return vueDemi.computed(() => args.some((i) => vueDemi.unref(i)));\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn) {\n return function(...args) {\n return vueDemi.computed(() => fn.apply(this, args.map((i) => vueDemi.unref(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj)) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!vueDemi.isRef(objectRef))\n return vueDemi.reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return vueDemi.unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (vueDemi.isRef(objectRef.value[p]) && !vueDemi.isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return vueDemi.reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(vueDemi.computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return vueDemi.reactive(Object.fromEntries(flatKeys.map((k) => [k, vueDemi.toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return vueDemi.customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, vueDemi.unref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n if (ms <= 0)\n return value;\n const debounced = vueDemi.ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n vueDemi.watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return vueDemi.computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = true, leading = true) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = vueDemi.ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n vueDemi.watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = vueDemi.customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? vueDemi.computed(r) : vueDemi.ref(r);\n}\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : vueDemi.unref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (vueDemi.isVue2) {\n vueDemi.set(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\"\n } = options;\n let stop1, stop2;\n if (direction === \"both\" || direction === \"ltr\") {\n stop1 = vueDemi.watch(left, (newValue) => right.value = newValue, { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n stop2 = vueDemi.watch(right, (newValue) => left.value = newValue, { flush, deep, immediate });\n }\n return () => {\n stop1 == null ? void 0 : stop1();\n stop2 == null ? void 0 : stop2();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return vueDemi.watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!vueDemi.isRef(objectRef))\n return vueDemi.toRefs(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = vueDemi.customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (vueDemi.getCurrentInstance())\n vueDemi.onBeforeMount(fn);\n else if (sync)\n fn();\n else\n vueDemi.nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (vueDemi.getCurrentInstance())\n vueDemi.onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (vueDemi.getCurrentInstance())\n vueDemi.onMounted(fn);\n else if (sync)\n fn();\n else\n vueDemi.nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (vueDemi.getCurrentInstance())\n vueDemi.onUnmounted(fn);\n}\n\nfunction until(r) {\n let isNot = false;\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = vueDemi.watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => vueDemi.unref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!vueDemi.isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = vueDemi.watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => vueDemi.unref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return vueDemi.unref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(vueDemi.unref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(vueDemi.unref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n isNot = !isNot;\n return this;\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n isNot = !isNot;\n return this;\n }\n };\n return instance;\n }\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = vueDemi.ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = val;\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst formatDate = (date, formatStr) => {\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const matches = {\n YY: String(years).slice(-2),\n YYYY: years,\n M: month + 1,\n MM: `${month + 1}`.padStart(2, \"0\"),\n D: String(days),\n DD: `${days}`.padStart(2, \"0\"),\n H: String(hours),\n HH: `${hours}`.padStart(2, \"0\"),\n h: `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: String(minutes),\n mm: `${minutes}`.padStart(2, \"0\"),\n s: String(seconds),\n ss: `${seconds}`.padStart(2, \"0\"),\n SSS: `${milliseconds}`.padStart(3, \"0\"),\n d: day\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]);\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\") {\n return vueDemi.computed(() => formatDate(normalizeDate(vueDemi.unref(date)), vueDemi.unref(formatStr)));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = vueDemi.ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n if (vueDemi.unref(interval) <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, vueDemi.unref(interval));\n }\n if (immediate && isClient)\n resume();\n if (vueDemi.isRef(interval)) {\n const stopWatch = vueDemi.watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true\n } = options;\n const counter = vueDemi.ref(0);\n const controls = useIntervalFn(() => counter.value += 1, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = vueDemi.ref((_a = options.initialValue) != null ? _a : null);\n vueDemi.watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = vueDemi.ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, vueDemi.unref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending,\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false\n } = options;\n const controls = useTimeoutFn(noop, interval, options);\n const ready = vueDemi.computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = vueDemi.isRef(initialValue);\n const innerValue = vueDemi.ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n innerValue.value = value;\n return innerValue.value;\n } else {\n innerValue.value = innerValue.value === vueDemi.unref(truthyValue) ? vueDemi.unref(falsyValue) : vueDemi.unref(truthyValue);\n return innerValue.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [innerValue, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : vueDemi.unref(source)\n ];\n return vueDemi.watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return vueDemi.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = vueDemi.ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= vueDemi.unref(count))\n vueDemi.nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = vueDemi.ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = vueDemi.watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = vueDemi.ref(0);\n const syncCounter = vueDemi.ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(vueDemi.watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(vueDemi.watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = vueDemi.watch(source, (...args) => {\n vueDemi.nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (vueDemi.isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : vueDemi.unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return vueDemi.watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexports.__onlyVue3 = __onlyVue3;\nexports.and = logicAnd;\nexports.assert = assert;\nexports.autoResetRef = refAutoReset;\nexports.bypassFilter = bypassFilter;\nexports.clamp = clamp;\nexports.computedEager = computedEager;\nexports.computedWithControl = computedWithControl;\nexports.containsProp = containsProp;\nexports.controlledComputed = computedWithControl;\nexports.controlledRef = controlledRef;\nexports.createEventHook = createEventHook;\nexports.createFilterWrapper = createFilterWrapper;\nexports.createGlobalState = createGlobalState;\nexports.createInjectionState = createInjectionState;\nexports.createReactiveFn = reactify;\nexports.createSharedComposable = createSharedComposable;\nexports.createSingletonPromise = createSingletonPromise;\nexports.debounceFilter = debounceFilter;\nexports.debouncedRef = refDebounced;\nexports.debouncedWatch = watchDebounced;\nexports.directiveHooks = directiveHooks;\nexports.eagerComputed = computedEager;\nexports.extendRef = extendRef;\nexports.formatDate = formatDate;\nexports.get = get;\nexports.identity = identity;\nexports.ignorableWatch = watchIgnorable;\nexports.increaseWithUnit = increaseWithUnit;\nexports.invoke = invoke;\nexports.isBoolean = isBoolean;\nexports.isClient = isClient;\nexports.isDef = isDef;\nexports.isDefined = isDefined;\nexports.isFunction = isFunction;\nexports.isIOS = isIOS;\nexports.isNumber = isNumber;\nexports.isObject = isObject;\nexports.isString = isString;\nexports.isWindow = isWindow;\nexports.logicAnd = logicAnd;\nexports.logicNot = logicNot;\nexports.logicOr = logicOr;\nexports.makeDestructurable = makeDestructurable;\nexports.noop = noop;\nexports.normalizeDate = normalizeDate;\nexports.not = logicNot;\nexports.now = now;\nexports.objectPick = objectPick;\nexports.or = logicOr;\nexports.pausableFilter = pausableFilter;\nexports.pausableWatch = watchPausable;\nexports.promiseTimeout = promiseTimeout;\nexports.rand = rand;\nexports.reactify = reactify;\nexports.reactifyObject = reactifyObject;\nexports.reactiveComputed = reactiveComputed;\nexports.reactiveOmit = reactiveOmit;\nexports.reactivePick = reactivePick;\nexports.refAutoReset = refAutoReset;\nexports.refDebounced = refDebounced;\nexports.refDefault = refDefault;\nexports.refThrottled = refThrottled;\nexports.refWithControl = refWithControl;\nexports.resolveRef = resolveRef;\nexports.resolveUnref = resolveUnref;\nexports.set = set;\nexports.syncRef = syncRef;\nexports.syncRefs = syncRefs;\nexports.throttleFilter = throttleFilter;\nexports.throttledRef = refThrottled;\nexports.throttledWatch = watchThrottled;\nexports.timestamp = timestamp;\nexports.toReactive = toReactive;\nexports.toRefs = toRefs;\nexports.tryOnBeforeMount = tryOnBeforeMount;\nexports.tryOnBeforeUnmount = tryOnBeforeUnmount;\nexports.tryOnMounted = tryOnMounted;\nexports.tryOnScopeDispose = tryOnScopeDispose;\nexports.tryOnUnmounted = tryOnUnmounted;\nexports.until = until;\nexports.useCounter = useCounter;\nexports.useDateFormat = useDateFormat;\nexports.useDebounce = refDebounced;\nexports.useDebounceFn = useDebounceFn;\nexports.useInterval = useInterval;\nexports.useIntervalFn = useIntervalFn;\nexports.useLastChanged = useLastChanged;\nexports.useThrottle = refThrottled;\nexports.useThrottleFn = useThrottleFn;\nexports.useTimeout = useTimeout;\nexports.useTimeoutFn = useTimeoutFn;\nexports.useToggle = useToggle;\nexports.watchArray = watchArray;\nexports.watchAtMost = watchAtMost;\nexports.watchDebounced = watchDebounced;\nexports.watchIgnorable = watchIgnorable;\nexports.watchOnce = watchOnce;\nexports.watchPausable = watchPausable;\nexports.watchThrottled = watchThrottled;\nexports.watchTriggerable = watchTriggerable;\nexports.watchWithFilter = watchWithFilter;\nexports.whenever = whenever;\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./enlarge-images.vue?vue&type=style&index=0&id=64418a33&scoped=true&lang=scss\"","import { defineComponent as _defineComponent } from 'vue'\nimport { vShow as _vShow, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-64418a33\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"goods-image\" }\nconst _hoisted_2 = { class: \"image-slot\" }\nconst _hoisted_3 = { class: \"small\" }\nconst _hoisted_4 = { class: \"image-slot\" }\n\nimport { ref, watch, reactive } from 'vue'\r\nimport { useMouseInElement } from '@vueuse/core'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'enlarge-images',\n props: {\r\n images: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n MainGraph: {\r\n type: String,\r\n default: () => null,\r\n },\r\n},\n setup(__props) {\n\r\nconst props = __props\r\n\r\nconst currIndex = ref(0)\r\nconst target = ref(null)\r\nconst isShow = ref(false)\r\n// 遮罩层的坐标\r\nconst position = reactive({\r\n left: 0,\r\n top: 0,\r\n})\r\n\r\n// 控制背景图的位置\r\nconst bgPosition = reactive({\r\n backgroundPositionX: 0,\r\n backgroundPositionY: 0,\r\n})\r\n\r\nconst { elementX, elementY, isOutside } = useMouseInElement(target)\r\n// 侦听鼠标移动后信息\r\nwatch([elementX, elementY, isOutside], () => {\r\n // 每次有值发生变化,就读取新的数据即可\r\n isShow.value = !isOutside.value\r\n // 鼠标在图片的区域之外,不需要计算坐标\r\n if (isOutside.value) return\r\n // 水平方向\r\n if (elementX.value < 100) {\r\n // 左边界\r\n position.left = 0\r\n } else if (elementX.value > 300) {\r\n // 右边界\r\n position.left = 200\r\n } else {\r\n // 中间的状态\r\n position.left = elementX.value - 100\r\n }\r\n // 垂直方向\r\n if (elementY.value < 100) {\r\n // 上边界\r\n position.top = 0\r\n } else if (elementY.value > 300) {\r\n // 下边界\r\n position.top = 200\r\n } else {\r\n // 中间的状态\r\n position.top = elementY.value - 100\r\n }\r\n // console.log(elementX.value, elementY.value, isOutside.value)\r\n // 计算预览大图背景的位置\r\n bgPosition.backgroundPositionX = -position.left * 2 + 'px'\r\n bgPosition.backgroundPositionY = -position.top * 2 + 'px'\r\n // 计算左侧遮罩层位置\r\n position.left += 'px'\r\n position.top += 'px'\r\n})\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_icon_picture = _resolveComponent(\"icon-picture\")!\n const _component_el_icon = _resolveComponent(\"el-icon\")!\n const _component_el_image = _resolveComponent(\"el-image\")!\n const _component_el_scrollbar = _resolveComponent(\"el-scrollbar\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"large\",\n style: _normalizeStyle([\r\n {\r\n backgroundImage: `url(${__props.MainGraph ? __props.MainGraph : __props.images[currIndex.value]})`,\r\n },\r\n bgPosition,\r\n ])\n }, null, 4), [\n [_vShow, isShow.value]\n ]),\n _createElementVNode(\"div\", {\n class: \"middle\",\n ref_key: \"target\",\n ref: target\n }, [\n _createVNode(_component_el_image, {\n fit: \"scale-down\",\n class: \"GoodsImage\",\n src: __props.MainGraph ? __props.MainGraph : __props.images[currIndex.value]\n }, {\n error: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_icon_picture)\n ]),\n _: 1\n })\n ])\n ]),\n _: 1\n }, 8, [\"src\"]),\n _withDirectives(_createElementVNode(\"div\", {\n class: \"layer\",\n style: _normalizeStyle([position])\n }, null, 4), [\n [_vShow, isShow.value]\n ])\n ], 512),\n _createVNode(_component_el_scrollbar, null, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.images, (img, i) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"small_box\",\n key: img\n }, [\n _createVNode(_component_el_image, {\n class: _normalizeClass([{ active: i === currIndex.value && !__props.MainGraph }, \"GoodsImage\"]),\n onMouseenter: ($event: any) => {;(currIndex.value = i), (__props.MainGraph = null)},\n fit: \"scale-down\",\n src: img\n }, {\n error: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_icon_picture)\n ]),\n _: 1\n })\n ])\n ]),\n _: 2\n }, 1032, [\"class\", \"onMouseenter\", \"src\"])\n ]))\n }), 128))\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./enlarge-images.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./enlarge-images.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./enlarge-images.vue?vue&type=style&index=0&id=64418a33&scoped=true&lang=scss\"\n\nimport exportComponent from \"F:\\\\store\\\\NewLODAPC\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-64418a33\"]])\n\nexport default __exports__","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nexport class HeaderNames {\r\n}\r\nHeaderNames.Authorization = \"Authorization\";\r\nHeaderNames.Cookie = \"Cookie\";\r\n//# sourceMappingURL=HeaderNames.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Error thrown when an HTTP request fails. */\r\nexport class HttpError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.HttpError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n * @param {number} statusCode The HTTP status code represented by this error.\r\n */\r\n constructor(errorMessage, statusCode) {\r\n const trueProto = new.target.prototype;\r\n super(`${errorMessage}: Status code '${statusCode}'`);\r\n this.statusCode = statusCode;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when a timeout elapses. */\r\nexport class TimeoutError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage = \"A timeout occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when an action is aborted. */\r\nexport class AbortError extends Error {\r\n /** Constructs a new instance of {@link AbortError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage = \"An abort occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport is unsupported by the browser. */\r\n/** @private */\r\nexport class UnsupportedTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.UnsupportedTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'UnsupportedTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport is disabled by the browser. */\r\n/** @private */\r\nexport class DisabledTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.DisabledTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'DisabledTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport cannot be started. */\r\n/** @private */\r\nexport class FailedToStartTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToStartTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'FailedToStartTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the negotiation with the server failed to complete. */\r\n/** @private */\r\nexport class FailedToNegotiateWithServerError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToNegotiateWithServerError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n */\r\n constructor(message) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.errorType = 'FailedToNegotiateWithServerError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when multiple errors have occurred. */\r\n/** @private */\r\nexport class AggregateErrors extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.AggregateErrors}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {Error[]} innerErrors The collection of errors this error is aggregating.\r\n */\r\n constructor(message, innerErrors) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.innerErrors = innerErrors;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n//# sourceMappingURL=Errors.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// This will be treated as a bit flag in the future, so we keep it using power-of-two values.\r\n/** Specifies a specific HTTP transport type. */\r\nexport var HttpTransportType;\r\n(function (HttpTransportType) {\r\n /** Specifies no transport preference. */\r\n HttpTransportType[HttpTransportType[\"None\"] = 0] = \"None\";\r\n /** Specifies the WebSockets transport. */\r\n HttpTransportType[HttpTransportType[\"WebSockets\"] = 1] = \"WebSockets\";\r\n /** Specifies the Server-Sent Events transport. */\r\n HttpTransportType[HttpTransportType[\"ServerSentEvents\"] = 2] = \"ServerSentEvents\";\r\n /** Specifies the Long Polling transport. */\r\n HttpTransportType[HttpTransportType[\"LongPolling\"] = 4] = \"LongPolling\";\r\n})(HttpTransportType || (HttpTransportType = {}));\r\n/** Specifies the transfer format for a connection. */\r\nexport var TransferFormat;\r\n(function (TransferFormat) {\r\n /** Specifies that only text data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Text\"] = 1] = \"Text\";\r\n /** Specifies that binary data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Binary\"] = 2] = \"Binary\";\r\n})(TransferFormat || (TransferFormat = {}));\r\n//# sourceMappingURL=ITransport.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// Not exported from index\r\n/** @private */\r\nexport class TextMessageFormat {\r\n static write(output) {\r\n return `${output}${TextMessageFormat.RecordSeparator}`;\r\n }\r\n static parse(input) {\r\n if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n const messages = input.split(TextMessageFormat.RecordSeparator);\r\n messages.pop();\r\n return messages;\r\n }\r\n}\r\nTextMessageFormat.RecordSeparatorCode = 0x1e;\r\nTextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);\r\n//# sourceMappingURL=TextMessageFormat.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Defines the type of a Hub Message. */\r\nexport var MessageType;\r\n(function (MessageType) {\r\n /** Indicates the message is an Invocation message and implements the {@link @microsoft/signalr.InvocationMessage} interface. */\r\n MessageType[MessageType[\"Invocation\"] = 1] = \"Invocation\";\r\n /** Indicates the message is a StreamItem message and implements the {@link @microsoft/signalr.StreamItemMessage} interface. */\r\n MessageType[MessageType[\"StreamItem\"] = 2] = \"StreamItem\";\r\n /** Indicates the message is a Completion message and implements the {@link @microsoft/signalr.CompletionMessage} interface. */\r\n MessageType[MessageType[\"Completion\"] = 3] = \"Completion\";\r\n /** Indicates the message is a Stream Invocation message and implements the {@link @microsoft/signalr.StreamInvocationMessage} interface. */\r\n MessageType[MessageType[\"StreamInvocation\"] = 4] = \"StreamInvocation\";\r\n /** Indicates the message is a Cancel Invocation message and implements the {@link @microsoft/signalr.CancelInvocationMessage} interface. */\r\n MessageType[MessageType[\"CancelInvocation\"] = 5] = \"CancelInvocation\";\r\n /** Indicates the message is a Ping message and implements the {@link @microsoft/signalr.PingMessage} interface. */\r\n MessageType[MessageType[\"Ping\"] = 6] = \"Ping\";\r\n /** Indicates the message is a Close message and implements the {@link @microsoft/signalr.CloseMessage} interface. */\r\n MessageType[MessageType[\"Close\"] = 7] = \"Close\";\r\n})(MessageType || (MessageType = {}));\r\n//# sourceMappingURL=IHubProtocol.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { HandshakeProtocol } from \"./HandshakeProtocol\";\r\nimport { AbortError } from \"./Errors\";\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { Subject } from \"./Subject\";\r\nimport { Arg, getErrorString, Platform } from \"./Utils\";\r\nconst DEFAULT_TIMEOUT_IN_MS = 30 * 1000;\r\nconst DEFAULT_PING_INTERVAL_IN_MS = 15 * 1000;\r\n/** Describes the current state of the {@link HubConnection} to the server. */\r\nexport var HubConnectionState;\r\n(function (HubConnectionState) {\r\n /** The hub connection is disconnected. */\r\n HubConnectionState[\"Disconnected\"] = \"Disconnected\";\r\n /** The hub connection is connecting. */\r\n HubConnectionState[\"Connecting\"] = \"Connecting\";\r\n /** The hub connection is connected. */\r\n HubConnectionState[\"Connected\"] = \"Connected\";\r\n /** The hub connection is disconnecting. */\r\n HubConnectionState[\"Disconnecting\"] = \"Disconnecting\";\r\n /** The hub connection is reconnecting. */\r\n HubConnectionState[\"Reconnecting\"] = \"Reconnecting\";\r\n})(HubConnectionState || (HubConnectionState = {}));\r\n/** Represents a connection to a SignalR Hub. */\r\nexport class HubConnection {\r\n constructor(connection, logger, protocol, reconnectPolicy) {\r\n this._nextKeepAlive = 0;\r\n this._freezeEventListener = () => {\r\n this._logger.log(LogLevel.Warning, \"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep\");\r\n };\r\n Arg.isRequired(connection, \"connection\");\r\n Arg.isRequired(logger, \"logger\");\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.serverTimeoutInMilliseconds = DEFAULT_TIMEOUT_IN_MS;\r\n this.keepAliveIntervalInMilliseconds = DEFAULT_PING_INTERVAL_IN_MS;\r\n this._logger = logger;\r\n this._protocol = protocol;\r\n this.connection = connection;\r\n this._reconnectPolicy = reconnectPolicy;\r\n this._handshakeProtocol = new HandshakeProtocol();\r\n this.connection.onreceive = (data) => this._processIncomingData(data);\r\n this.connection.onclose = (error) => this._connectionClosed(error);\r\n this._callbacks = {};\r\n this._methods = {};\r\n this._closedCallbacks = [];\r\n this._reconnectingCallbacks = [];\r\n this._reconnectedCallbacks = [];\r\n this._invocationId = 0;\r\n this._receivedHandshakeResponse = false;\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._connectionStarted = false;\r\n this._cachedPingMessage = this._protocol.writeMessage({ type: MessageType.Ping });\r\n }\r\n /** @internal */\r\n // Using a public static factory method means we can have a private constructor and an _internal_\r\n // create method that can be used by HubConnectionBuilder. An \"internal\" constructor would just\r\n // be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a\r\n // public parameter-less constructor.\r\n static create(connection, logger, protocol, reconnectPolicy) {\r\n return new HubConnection(connection, logger, protocol, reconnectPolicy);\r\n }\r\n /** Indicates the state of the {@link HubConnection} to the server. */\r\n get state() {\r\n return this._connectionState;\r\n }\r\n /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either\r\n * in the disconnected state or if the negotiation step was skipped.\r\n */\r\n get connectionId() {\r\n return this.connection ? (this.connection.connectionId || null) : null;\r\n }\r\n /** Indicates the url of the {@link HubConnection} to the server. */\r\n get baseUrl() {\r\n return this.connection.baseUrl || \"\";\r\n }\r\n /**\r\n * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or\r\n * Reconnecting states.\r\n * @param {string} url The url to connect to.\r\n */\r\n set baseUrl(url) {\r\n if (this._connectionState !== HubConnectionState.Disconnected && this._connectionState !== HubConnectionState.Reconnecting) {\r\n throw new Error(\"The HubConnection must be in the Disconnected or Reconnecting state to change the url.\");\r\n }\r\n if (!url) {\r\n throw new Error(\"The HubConnection url must be a valid url.\");\r\n }\r\n this.connection.baseUrl = url;\r\n }\r\n /** Starts the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully established, or rejects with an error.\r\n */\r\n start() {\r\n this._startPromise = this._startWithStateTransitions();\r\n return this._startPromise;\r\n }\r\n async _startWithStateTransitions() {\r\n if (this._connectionState !== HubConnectionState.Disconnected) {\r\n return Promise.reject(new Error(\"Cannot start a HubConnection that is not in the 'Disconnected' state.\"));\r\n }\r\n this._connectionState = HubConnectionState.Connecting;\r\n this._logger.log(LogLevel.Debug, \"Starting HubConnection.\");\r\n try {\r\n await this._startInternal();\r\n if (Platform.isBrowser) {\r\n // Log when the browser freezes the tab so users know why their connection unexpectedly stopped working\r\n window.document.addEventListener(\"freeze\", this._freezeEventListener);\r\n }\r\n this._connectionState = HubConnectionState.Connected;\r\n this._connectionStarted = true;\r\n this._logger.log(LogLevel.Debug, \"HubConnection connected successfully.\");\r\n }\r\n catch (e) {\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._logger.log(LogLevel.Debug, `HubConnection failed to start successfully because of error '${e}'.`);\r\n return Promise.reject(e);\r\n }\r\n }\r\n async _startInternal() {\r\n this._stopDuringStartError = undefined;\r\n this._receivedHandshakeResponse = false;\r\n // Set up the promise before any connection is (re)started otherwise it could race with received messages\r\n const handshakePromise = new Promise((resolve, reject) => {\r\n this._handshakeResolver = resolve;\r\n this._handshakeRejecter = reject;\r\n });\r\n await this.connection.start(this._protocol.transferFormat);\r\n try {\r\n const handshakeRequest = {\r\n protocol: this._protocol.name,\r\n version: this._protocol.version,\r\n };\r\n this._logger.log(LogLevel.Debug, \"Sending handshake request.\");\r\n await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(handshakeRequest));\r\n this._logger.log(LogLevel.Information, `Using HubProtocol '${this._protocol.name}'.`);\r\n // defensively cleanup timeout in case we receive a message from the server before we finish start\r\n this._cleanupTimeout();\r\n this._resetTimeoutPeriod();\r\n this._resetKeepAliveInterval();\r\n await handshakePromise;\r\n // It's important to check the stopDuringStartError instead of just relying on the handshakePromise\r\n // being rejected on close, because this continuation can run after both the handshake completed successfully\r\n // and the connection was closed.\r\n if (this._stopDuringStartError) {\r\n // It's important to throw instead of returning a rejected promise, because we don't want to allow any state\r\n // transitions to occur between now and the calling code observing the exceptions. Returning a rejected promise\r\n // will cause the calling continuation to get scheduled to run later.\r\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\r\n throw this._stopDuringStartError;\r\n }\r\n if (!this.connection.features.inherentKeepAlive) {\r\n await this._sendMessage(this._cachedPingMessage);\r\n }\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Debug, `Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`);\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n // HttpConnection.stop() should not complete until after the onclose callback is invoked.\r\n // This will transition the HubConnection to the disconnected state before HttpConnection.stop() completes.\r\n await this.connection.stop(e);\r\n throw e;\r\n }\r\n }\r\n /** Stops the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully terminated, or rejects with an error.\r\n */\r\n async stop() {\r\n // Capture the start promise before the connection might be restarted in an onclose callback.\r\n const startPromise = this._startPromise;\r\n this._stopPromise = this._stopInternal();\r\n await this._stopPromise;\r\n try {\r\n // Awaiting undefined continues immediately\r\n await startPromise;\r\n }\r\n catch (e) {\r\n // This exception is returned to the user as a rejected Promise from the start method.\r\n }\r\n }\r\n _stopInternal(error) {\r\n if (this._connectionState === HubConnectionState.Disconnected) {\r\n this._logger.log(LogLevel.Debug, `Call to HubConnection.stop(${error}) ignored because it is already in the disconnected state.`);\r\n return Promise.resolve();\r\n }\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnecting state.`);\r\n return this._stopPromise;\r\n }\r\n this._connectionState = HubConnectionState.Disconnecting;\r\n this._logger.log(LogLevel.Debug, \"Stopping HubConnection.\");\r\n if (this._reconnectDelayHandle) {\r\n // We're in a reconnect delay which means the underlying connection is currently already stopped.\r\n // Just clear the handle to stop the reconnect loop (which no one is waiting on thankfully) and\r\n // fire the onclose callbacks.\r\n this._logger.log(LogLevel.Debug, \"Connection stopped during reconnect delay. Done reconnecting.\");\r\n clearTimeout(this._reconnectDelayHandle);\r\n this._reconnectDelayHandle = undefined;\r\n this._completeClose();\r\n return Promise.resolve();\r\n }\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n this._stopDuringStartError = error || new AbortError(\"The connection was stopped before the hub handshake could complete.\");\r\n // HttpConnection.stop() should not complete until after either HttpConnection.start() fails\r\n // or the onclose callback is invoked. The onclose callback will transition the HubConnection\r\n // to the disconnected state if need be before HttpConnection.stop() completes.\r\n return this.connection.stop(error);\r\n }\r\n /** Invokes a streaming hub method on the server using the specified name and arguments.\r\n *\r\n * @typeparam T The type of the items returned by the server.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {IStreamResult} An object that yields results from the server as they are received.\r\n */\r\n stream(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const invocationDescriptor = this._createStreamInvocation(methodName, args, streamIds);\r\n // eslint-disable-next-line prefer-const\r\n let promiseQueue;\r\n const subject = new Subject();\r\n subject.cancelCallback = () => {\r\n const cancelInvocation = this._createCancelInvocation(invocationDescriptor.invocationId);\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n return promiseQueue.then(() => {\r\n return this._sendWithProtocol(cancelInvocation);\r\n });\r\n };\r\n this._callbacks[invocationDescriptor.invocationId] = (invocationEvent, error) => {\r\n if (error) {\r\n subject.error(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n subject.error(new Error(invocationEvent.error));\r\n }\r\n else {\r\n subject.complete();\r\n }\r\n }\r\n else {\r\n subject.next((invocationEvent.item));\r\n }\r\n }\r\n };\r\n promiseQueue = this._sendWithProtocol(invocationDescriptor)\r\n .catch((e) => {\r\n subject.error(e);\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n });\r\n this._launchStreams(streams, promiseQueue);\r\n return subject;\r\n }\r\n _sendMessage(message) {\r\n this._resetKeepAliveInterval();\r\n return this.connection.send(message);\r\n }\r\n /**\r\n * Sends a js object to the server.\r\n * @param message The js object to serialize and send.\r\n */\r\n _sendWithProtocol(message) {\r\n return this._sendMessage(this._protocol.writeMessage(message));\r\n }\r\n /** Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver.\r\n *\r\n * The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still\r\n * be processing the invocation.\r\n *\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves when the invocation has been successfully sent, or rejects with an error.\r\n */\r\n send(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const sendPromise = this._sendWithProtocol(this._createInvocation(methodName, args, true, streamIds));\r\n this._launchStreams(streams, sendPromise);\r\n return sendPromise;\r\n }\r\n /** Invokes a hub method on the server using the specified name and arguments.\r\n *\r\n * The Promise returned by this method resolves when the server indicates it has finished invoking the method. When the promise\r\n * resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of\r\n * resolving the Promise.\r\n *\r\n * @typeparam T The expected return type.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves with the result of the server method (if any), or rejects with an error.\r\n */\r\n invoke(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const invocationDescriptor = this._createInvocation(methodName, args, false, streamIds);\r\n const p = new Promise((resolve, reject) => {\r\n // invocationId will always have a value for a non-blocking invocation\r\n this._callbacks[invocationDescriptor.invocationId] = (invocationEvent, error) => {\r\n if (error) {\r\n reject(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n reject(new Error(invocationEvent.error));\r\n }\r\n else {\r\n resolve(invocationEvent.result);\r\n }\r\n }\r\n else {\r\n reject(new Error(`Unexpected message type: ${invocationEvent.type}`));\r\n }\r\n }\r\n };\r\n const promiseQueue = this._sendWithProtocol(invocationDescriptor)\r\n .catch((e) => {\r\n reject(e);\r\n // invocationId will always have a value for a non-blocking invocation\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n });\r\n this._launchStreams(streams, promiseQueue);\r\n });\r\n return p;\r\n }\r\n on(methodName, newMethod) {\r\n if (!methodName || !newMethod) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n if (!this._methods[methodName]) {\r\n this._methods[methodName] = [];\r\n }\r\n // Preventing adding the same handler multiple times.\r\n if (this._methods[methodName].indexOf(newMethod) !== -1) {\r\n return;\r\n }\r\n this._methods[methodName].push(newMethod);\r\n }\r\n off(methodName, method) {\r\n if (!methodName) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n const handlers = this._methods[methodName];\r\n if (!handlers) {\r\n return;\r\n }\r\n if (method) {\r\n const removeIdx = handlers.indexOf(method);\r\n if (removeIdx !== -1) {\r\n handlers.splice(removeIdx, 1);\r\n if (handlers.length === 0) {\r\n delete this._methods[methodName];\r\n }\r\n }\r\n }\r\n else {\r\n delete this._methods[methodName];\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection is closed.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection is closed. Optionally receives a single argument containing the error that caused the connection to close (if any).\r\n */\r\n onclose(callback) {\r\n if (callback) {\r\n this._closedCallbacks.push(callback);\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection starts reconnecting.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any).\r\n */\r\n onreconnecting(callback) {\r\n if (callback) {\r\n this._reconnectingCallbacks.push(callback);\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection successfully reconnects.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection successfully reconnects.\r\n */\r\n onreconnected(callback) {\r\n if (callback) {\r\n this._reconnectedCallbacks.push(callback);\r\n }\r\n }\r\n _processIncomingData(data) {\r\n this._cleanupTimeout();\r\n if (!this._receivedHandshakeResponse) {\r\n data = this._processHandshakeResponse(data);\r\n this._receivedHandshakeResponse = true;\r\n }\r\n // Data may have all been read when processing handshake response\r\n if (data) {\r\n // Parse the messages\r\n const messages = this._protocol.parseMessages(data, this._logger);\r\n for (const message of messages) {\r\n switch (message.type) {\r\n case MessageType.Invocation:\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._invokeClientMethod(message);\r\n break;\r\n case MessageType.StreamItem:\r\n case MessageType.Completion: {\r\n const callback = this._callbacks[message.invocationId];\r\n if (callback) {\r\n if (message.type === MessageType.Completion) {\r\n delete this._callbacks[message.invocationId];\r\n }\r\n try {\r\n callback(message);\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `Stream callback threw error: ${getErrorString(e)}`);\r\n }\r\n }\r\n break;\r\n }\r\n case MessageType.Ping:\r\n // Don't care about pings\r\n break;\r\n case MessageType.Close: {\r\n this._logger.log(LogLevel.Information, \"Close message received from server.\");\r\n const error = message.error ? new Error(\"Server returned an error on close: \" + message.error) : undefined;\r\n if (message.allowReconnect === true) {\r\n // It feels wrong not to await connection.stop() here, but processIncomingData is called as part of an onreceive callback which is not async,\r\n // this is already the behavior for serverTimeout(), and HttpConnection.Stop() should catch and log all possible exceptions.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.connection.stop(error);\r\n }\r\n else {\r\n // We cannot await stopInternal() here, but subsequent calls to stop() will await this if stopInternal() is still ongoing.\r\n this._stopPromise = this._stopInternal(error);\r\n }\r\n break;\r\n }\r\n default:\r\n this._logger.log(LogLevel.Warning, `Invalid message type: ${message.type}.`);\r\n break;\r\n }\r\n }\r\n }\r\n this._resetTimeoutPeriod();\r\n }\r\n _processHandshakeResponse(data) {\r\n let responseMessage;\r\n let remainingData;\r\n try {\r\n [remainingData, responseMessage] = this._handshakeProtocol.parseHandshakeResponse(data);\r\n }\r\n catch (e) {\r\n const message = \"Error parsing handshake response: \" + e;\r\n this._logger.log(LogLevel.Error, message);\r\n const error = new Error(message);\r\n this._handshakeRejecter(error);\r\n throw error;\r\n }\r\n if (responseMessage.error) {\r\n const message = \"Server returned handshake error: \" + responseMessage.error;\r\n this._logger.log(LogLevel.Error, message);\r\n const error = new Error(message);\r\n this._handshakeRejecter(error);\r\n throw error;\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, \"Server handshake complete.\");\r\n }\r\n this._handshakeResolver();\r\n return remainingData;\r\n }\r\n _resetKeepAliveInterval() {\r\n if (this.connection.features.inherentKeepAlive) {\r\n return;\r\n }\r\n // Set the time we want the next keep alive to be sent\r\n // Timer will be setup on next message receive\r\n this._nextKeepAlive = new Date().getTime() + this.keepAliveIntervalInMilliseconds;\r\n this._cleanupPingTimer();\r\n }\r\n _resetTimeoutPeriod() {\r\n if (!this.connection.features || !this.connection.features.inherentKeepAlive) {\r\n // Set the timeout timer\r\n this._timeoutHandle = setTimeout(() => this.serverTimeout(), this.serverTimeoutInMilliseconds);\r\n // Set keepAlive timer if there isn't one\r\n if (this._pingServerHandle === undefined) {\r\n let nextPing = this._nextKeepAlive - new Date().getTime();\r\n if (nextPing < 0) {\r\n nextPing = 0;\r\n }\r\n // The timer needs to be set from a networking callback to avoid Chrome timer throttling from causing timers to run once a minute\r\n this._pingServerHandle = setTimeout(async () => {\r\n if (this._connectionState === HubConnectionState.Connected) {\r\n try {\r\n await this._sendMessage(this._cachedPingMessage);\r\n }\r\n catch {\r\n // We don't care about the error. It should be seen elsewhere in the client.\r\n // The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering\r\n this._cleanupPingTimer();\r\n }\r\n }\r\n }, nextPing);\r\n }\r\n }\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n serverTimeout() {\r\n // The server hasn't talked to us in a while. It doesn't like us anymore ... :(\r\n // Terminate the connection, but we don't need to wait on the promise. This could trigger reconnecting.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.connection.stop(new Error(\"Server timeout elapsed without receiving a message from the server.\"));\r\n }\r\n async _invokeClientMethod(invocationMessage) {\r\n const methodName = invocationMessage.target.toLowerCase();\r\n const methods = this._methods[methodName];\r\n if (!methods) {\r\n this._logger.log(LogLevel.Warning, `No client method with the name '${methodName}' found.`);\r\n // No handlers provided by client but the server is expecting a response still, so we send an error\r\n if (invocationMessage.invocationId) {\r\n this._logger.log(LogLevel.Warning, `No result given for '${methodName}' method and invocation ID '${invocationMessage.invocationId}'.`);\r\n await this._sendWithProtocol(this._createCompletionMessage(invocationMessage.invocationId, \"Client didn't provide a result.\", null));\r\n }\r\n return;\r\n }\r\n // Avoid issues with handlers removing themselves thus modifying the list while iterating through it\r\n const methodsCopy = methods.slice();\r\n // Server expects a response\r\n const expectsResponse = invocationMessage.invocationId ? true : false;\r\n // We preserve the last result or exception but still call all handlers\r\n let res;\r\n let exception;\r\n let completionMessage;\r\n for (const m of methodsCopy) {\r\n try {\r\n const prevRes = res;\r\n res = await m.apply(this, invocationMessage.arguments);\r\n if (expectsResponse && res && prevRes) {\r\n this._logger.log(LogLevel.Error, `Multiple results provided for '${methodName}'. Sending error to server.`);\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, `Client provided multiple results.`, null);\r\n }\r\n // Ignore exception if we got a result after, the exception will be logged\r\n exception = undefined;\r\n }\r\n catch (e) {\r\n exception = e;\r\n this._logger.log(LogLevel.Error, `A callback for the method '${methodName}' threw error '${e}'.`);\r\n }\r\n }\r\n if (completionMessage) {\r\n await this._sendWithProtocol(completionMessage);\r\n }\r\n else if (expectsResponse) {\r\n // If there is an exception that means either no result was given or a handler after a result threw\r\n if (exception) {\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, `${exception}`, null);\r\n }\r\n else if (res !== undefined) {\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, null, res);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Warning, `No result given for '${methodName}' method and invocation ID '${invocationMessage.invocationId}'.`);\r\n // Client didn't provide a result or throw from a handler, server expects a response so we send an error\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, \"Client didn't provide a result.\", null);\r\n }\r\n await this._sendWithProtocol(completionMessage);\r\n }\r\n else {\r\n if (res) {\r\n this._logger.log(LogLevel.Error, `Result given for '${methodName}' method but server is not expecting a result.`);\r\n }\r\n }\r\n }\r\n _connectionClosed(error) {\r\n this._logger.log(LogLevel.Debug, `HubConnection.connectionClosed(${error}) called while in state ${this._connectionState}.`);\r\n // Triggering this.handshakeRejecter is insufficient because it could already be resolved without the continuation having run yet.\r\n this._stopDuringStartError = this._stopDuringStartError || error || new AbortError(\"The underlying connection was closed before the hub handshake could complete.\");\r\n // If the handshake is in progress, start will be waiting for the handshake promise, so we complete it.\r\n // If it has already completed, this should just noop.\r\n if (this._handshakeResolver) {\r\n this._handshakeResolver();\r\n }\r\n this._cancelCallbacksWithError(error || new Error(\"Invocation canceled due to the underlying connection being closed.\"));\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._completeClose(error);\r\n }\r\n else if (this._connectionState === HubConnectionState.Connected && this._reconnectPolicy) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._reconnect(error);\r\n }\r\n else if (this._connectionState === HubConnectionState.Connected) {\r\n this._completeClose(error);\r\n }\r\n // If none of the above if conditions were true were called the HubConnection must be in either:\r\n // 1. The Connecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail it.\r\n // 2. The Reconnecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail the current reconnect attempt\r\n // and potentially continue the reconnect() loop.\r\n // 3. The Disconnected state in which case we're already done.\r\n }\r\n _completeClose(error) {\r\n if (this._connectionStarted) {\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._connectionStarted = false;\r\n if (Platform.isBrowser) {\r\n window.document.removeEventListener(\"freeze\", this._freezeEventListener);\r\n }\r\n try {\r\n this._closedCallbacks.forEach((c) => c.apply(this, [error]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onclose callback called with error '${error}' threw error '${e}'.`);\r\n }\r\n }\r\n }\r\n async _reconnect(error) {\r\n const reconnectStartTime = Date.now();\r\n let previousReconnectAttempts = 0;\r\n let retryError = error !== undefined ? error : new Error(\"Attempting to reconnect due to a unknown error.\");\r\n let nextRetryDelay = this._getNextRetryDelay(previousReconnectAttempts++, 0, retryError);\r\n if (nextRetryDelay === null) {\r\n this._logger.log(LogLevel.Debug, \"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt.\");\r\n this._completeClose(error);\r\n return;\r\n }\r\n this._connectionState = HubConnectionState.Reconnecting;\r\n if (error) {\r\n this._logger.log(LogLevel.Information, `Connection reconnecting because of error '${error}'.`);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Information, \"Connection reconnecting.\");\r\n }\r\n if (this._reconnectingCallbacks.length !== 0) {\r\n try {\r\n this._reconnectingCallbacks.forEach((c) => c.apply(this, [error]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onreconnecting callback called with error '${error}' threw error '${e}'.`);\r\n }\r\n // Exit early if an onreconnecting callback called connection.stop().\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, \"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.\");\r\n return;\r\n }\r\n }\r\n while (nextRetryDelay !== null) {\r\n this._logger.log(LogLevel.Information, `Reconnect attempt number ${previousReconnectAttempts} will start in ${nextRetryDelay} ms.`);\r\n await new Promise((resolve) => {\r\n this._reconnectDelayHandle = setTimeout(resolve, nextRetryDelay);\r\n });\r\n this._reconnectDelayHandle = undefined;\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, \"Connection left the reconnecting state during reconnect delay. Done reconnecting.\");\r\n return;\r\n }\r\n try {\r\n await this._startInternal();\r\n this._connectionState = HubConnectionState.Connected;\r\n this._logger.log(LogLevel.Information, \"HubConnection reconnected successfully.\");\r\n if (this._reconnectedCallbacks.length !== 0) {\r\n try {\r\n this._reconnectedCallbacks.forEach((c) => c.apply(this, [this.connection.connectionId]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`);\r\n }\r\n }\r\n return;\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Information, `Reconnect attempt failed because of error '${e}'.`);\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, `Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`);\r\n // The TypeScript compiler thinks that connectionState must be Connected here. The TypeScript compiler is wrong.\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._completeClose();\r\n }\r\n return;\r\n }\r\n retryError = e instanceof Error ? e : new Error(e.toString());\r\n nextRetryDelay = this._getNextRetryDelay(previousReconnectAttempts++, Date.now() - reconnectStartTime, retryError);\r\n }\r\n }\r\n this._logger.log(LogLevel.Information, `Reconnect retries have been exhausted after ${Date.now() - reconnectStartTime} ms and ${previousReconnectAttempts} failed attempts. Connection disconnecting.`);\r\n this._completeClose();\r\n }\r\n _getNextRetryDelay(previousRetryCount, elapsedMilliseconds, retryReason) {\r\n try {\r\n return this._reconnectPolicy.nextRetryDelayInMilliseconds({\r\n elapsedMilliseconds,\r\n previousRetryCount,\r\n retryReason,\r\n });\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `IRetryPolicy.nextRetryDelayInMilliseconds(${previousRetryCount}, ${elapsedMilliseconds}) threw error '${e}'.`);\r\n return null;\r\n }\r\n }\r\n _cancelCallbacksWithError(error) {\r\n const callbacks = this._callbacks;\r\n this._callbacks = {};\r\n Object.keys(callbacks)\r\n .forEach((key) => {\r\n const callback = callbacks[key];\r\n try {\r\n callback(null, error);\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `Stream 'error' callback called with '${error}' threw error: ${getErrorString(e)}`);\r\n }\r\n });\r\n }\r\n _cleanupPingTimer() {\r\n if (this._pingServerHandle) {\r\n clearTimeout(this._pingServerHandle);\r\n this._pingServerHandle = undefined;\r\n }\r\n }\r\n _cleanupTimeout() {\r\n if (this._timeoutHandle) {\r\n clearTimeout(this._timeoutHandle);\r\n }\r\n }\r\n _createInvocation(methodName, args, nonblocking, streamIds) {\r\n if (nonblocking) {\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n }\r\n else {\r\n const invocationId = this._invocationId;\r\n this._invocationId++;\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n }\r\n }\r\n _launchStreams(streams, promiseQueue) {\r\n if (streams.length === 0) {\r\n return;\r\n }\r\n // Synchronize stream data so they arrive in-order on the server\r\n if (!promiseQueue) {\r\n promiseQueue = Promise.resolve();\r\n }\r\n // We want to iterate over the keys, since the keys are the stream ids\r\n // eslint-disable-next-line guard-for-in\r\n for (const streamId in streams) {\r\n streams[streamId].subscribe({\r\n complete: () => {\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createCompletionMessage(streamId)));\r\n },\r\n error: (err) => {\r\n let message;\r\n if (err instanceof Error) {\r\n message = err.message;\r\n }\r\n else if (err && err.toString) {\r\n message = err.toString();\r\n }\r\n else {\r\n message = \"Unknown error\";\r\n }\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createCompletionMessage(streamId, message)));\r\n },\r\n next: (item) => {\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createStreamItemMessage(streamId, item)));\r\n },\r\n });\r\n }\r\n }\r\n _replaceStreamingParams(args) {\r\n const streams = [];\r\n const streamIds = [];\r\n for (let i = 0; i < args.length; i++) {\r\n const argument = args[i];\r\n if (this._isObservable(argument)) {\r\n const streamId = this._invocationId;\r\n this._invocationId++;\r\n // Store the stream for later use\r\n streams[streamId] = argument;\r\n streamIds.push(streamId.toString());\r\n // remove stream from args\r\n args.splice(i, 1);\r\n }\r\n }\r\n return [streams, streamIds];\r\n }\r\n _isObservable(arg) {\r\n // This allows other stream implementations to just work (like rxjs)\r\n return arg && arg.subscribe && typeof arg.subscribe === \"function\";\r\n }\r\n _createStreamInvocation(methodName, args, streamIds) {\r\n const invocationId = this._invocationId;\r\n this._invocationId++;\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n }\r\n }\r\n _createCancelInvocation(id) {\r\n return {\r\n invocationId: id,\r\n type: MessageType.CancelInvocation,\r\n };\r\n }\r\n _createStreamItemMessage(id, item) {\r\n return {\r\n invocationId: id,\r\n item,\r\n type: MessageType.StreamItem,\r\n };\r\n }\r\n _createCompletionMessage(id, error, result) {\r\n if (error) {\r\n return {\r\n error,\r\n invocationId: id,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n return {\r\n invocationId: id,\r\n result,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n}\r\n//# sourceMappingURL=HubConnection.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { DefaultReconnectPolicy } from \"./DefaultReconnectPolicy\";\r\nimport { HttpConnection } from \"./HttpConnection\";\r\nimport { HubConnection } from \"./HubConnection\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { JsonHubProtocol } from \"./JsonHubProtocol\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { Arg, ConsoleLogger } from \"./Utils\";\r\nconst LogLevelNameMapping = {\r\n trace: LogLevel.Trace,\r\n debug: LogLevel.Debug,\r\n info: LogLevel.Information,\r\n information: LogLevel.Information,\r\n warn: LogLevel.Warning,\r\n warning: LogLevel.Warning,\r\n error: LogLevel.Error,\r\n critical: LogLevel.Critical,\r\n none: LogLevel.None,\r\n};\r\nfunction parseLogLevel(name) {\r\n // Case-insensitive matching via lower-casing\r\n // Yes, I know case-folding is a complicated problem in Unicode, but we only support\r\n // the ASCII strings defined in LogLevelNameMapping anyway, so it's fine -anurse.\r\n const mapping = LogLevelNameMapping[name.toLowerCase()];\r\n if (typeof mapping !== \"undefined\") {\r\n return mapping;\r\n }\r\n else {\r\n throw new Error(`Unknown log level: ${name}`);\r\n }\r\n}\r\n/** A builder for configuring {@link @microsoft/signalr.HubConnection} instances. */\r\nexport class HubConnectionBuilder {\r\n configureLogging(logging) {\r\n Arg.isRequired(logging, \"logging\");\r\n if (isLogger(logging)) {\r\n this.logger = logging;\r\n }\r\n else if (typeof logging === \"string\") {\r\n const logLevel = parseLogLevel(logging);\r\n this.logger = new ConsoleLogger(logLevel);\r\n }\r\n else {\r\n this.logger = new ConsoleLogger(logging);\r\n }\r\n return this;\r\n }\r\n withUrl(url, transportTypeOrOptions) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isNotEmpty(url, \"url\");\r\n this.url = url;\r\n // Flow-typing knows where it's at. Since HttpTransportType is a number and IHttpConnectionOptions is guaranteed\r\n // to be an object, we know (as does TypeScript) this comparison is all we need to figure out which overload was called.\r\n if (typeof transportTypeOrOptions === \"object\") {\r\n this.httpConnectionOptions = { ...this.httpConnectionOptions, ...transportTypeOrOptions };\r\n }\r\n else {\r\n this.httpConnectionOptions = {\r\n ...this.httpConnectionOptions,\r\n transport: transportTypeOrOptions,\r\n };\r\n }\r\n return this;\r\n }\r\n /** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol.\r\n *\r\n * @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use.\r\n */\r\n withHubProtocol(protocol) {\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.protocol = protocol;\r\n return this;\r\n }\r\n withAutomaticReconnect(retryDelaysOrReconnectPolicy) {\r\n if (this.reconnectPolicy) {\r\n throw new Error(\"A reconnectPolicy has already been set.\");\r\n }\r\n if (!retryDelaysOrReconnectPolicy) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy();\r\n }\r\n else if (Array.isArray(retryDelaysOrReconnectPolicy)) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy(retryDelaysOrReconnectPolicy);\r\n }\r\n else {\r\n this.reconnectPolicy = retryDelaysOrReconnectPolicy;\r\n }\r\n return this;\r\n }\r\n /** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder.\r\n *\r\n * @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}.\r\n */\r\n build() {\r\n // If httpConnectionOptions has a logger, use it. Otherwise, override it with the one\r\n // provided to configureLogger\r\n const httpConnectionOptions = this.httpConnectionOptions || {};\r\n // If it's 'null', the user **explicitly** asked for null, don't mess with it.\r\n if (httpConnectionOptions.logger === undefined) {\r\n // If our logger is undefined or null, that's OK, the HttpConnection constructor will handle it.\r\n httpConnectionOptions.logger = this.logger;\r\n }\r\n // Now create the connection\r\n if (!this.url) {\r\n throw new Error(\"The 'HubConnectionBuilder.withUrl' method must be called before building the connection.\");\r\n }\r\n const connection = new HttpConnection(this.url, httpConnectionOptions);\r\n return HubConnection.create(connection, this.logger || NullLogger.instance, this.protocol || new JsonHubProtocol(), this.reconnectPolicy);\r\n }\r\n}\r\nfunction isLogger(logger) {\r\n return logger.log !== undefined;\r\n}\r\n//# sourceMappingURL=HubConnectionBuilder.js.map","import * as SignalR from '@microsoft/signalr'\r\n\r\nexport function myPromise() {\r\n const myTime: number = 1\r\n return new Promise((resolve, reject) => {\r\n setTimeout(() => {\r\n resolve(myTime)\r\n }, 1000)\r\n })\r\n}\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, vShow as _vShow, withDirectives as _withDirectives, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, Transition as _Transition, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\nimport _imports_0 from '../assets/imgs/weixin.png'\nimport _imports_1 from '../assets/imgs/facebook.png'\nimport _imports_2 from '../assets/imgs/zh-cn.png'\nimport _imports_3 from '../assets/imgs/km.png'\n\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-165c7b98\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"container\"\n}\nconst _hoisted_2 = { class: \"subject\" }\nconst _hoisted_3 = { class: \"Exhibition\" }\nconst _hoisted_4 = { class: \"Favorite\" }\nconst _hoisted_5 = { class: \"Share\" }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", { src: _imports_0 }, null, -1))\nconst _hoisted_7 = { class: \"weixinQr\" }\nconst _hoisted_8 = { class: \"details\" }\nconst _hoisted_9 = { class: \"GoodsName\" }\nconst _hoisted_10 = {\n key: 1,\n class: \"Ladder\"\n}\nconst _hoisted_11 = { key: 0 }\nconst _hoisted_12 = { key: 1 }\nconst _hoisted_13 = { class: \"MallPrice\" }\nconst _hoisted_14 = { key: 0 }\nconst _hoisted_15 = {\n key: 1,\n class: \"itemPrice\"\n}\nconst _hoisted_16 = { key: 2 }\nconst _hoisted_17 = {\n key: 2,\n class: \"Citie SkuMargin\"\n}\nconst _hoisted_18 = { class: \"SkuTitle\" }\nconst _hoisted_19 = [\"onClick\"]\nconst _hoisted_20 = {\n key: 3,\n class: \"Freight SkuMargin\"\n}\nconst _hoisted_21 = { class: \"SkuTitle\" }\nconst _hoisted_22 = {\n key: 0,\n style: {\"width\":\"30px\",\"height\":\"30px\"},\n src: _imports_2\n}\nconst _hoisted_23 = {\n key: 1,\n style: {\"width\":\"30px\",\"height\":\"30px\"},\n src: _imports_3\n}\nconst _hoisted_24 = {\n key: 4,\n class: \"Freight SkuMargin\"\n}\nconst _hoisted_25 = { class: \"SkuTitle\" }\nconst _hoisted_26 = {\n key: 5,\n class: \"Freight SkuMargin\"\n}\nconst _hoisted_27 = { class: \"SkuTitle\" }\nconst _hoisted_28 = {\n key: 6,\n class: \"Freight SkuMargin\"\n}\nconst _hoisted_29 = { class: \"SkuTitle\" }\nconst _hoisted_30 = {\n key: 7,\n class: \"MallName SkuMargin\"\n}\nconst _hoisted_31 = { class: \"SkuTitle\" }\nconst _hoisted_32 = { class: \"ExchangeRate\" }\nconst _hoisted_33 = { class: \"SkuTitle\" }\nconst _hoisted_34 = { class: \"Values\" }\nconst _hoisted_35 = [\"onClick\"]\nconst _hoisted_36 = {\n key: 8,\n class: \"Sku SkuValueQty\"\n}\nconst _hoisted_37 = { class: \"SkuTitle\" }\nconst _hoisted_38 = {\n key: 0,\n class: \"StockQty\"\n}\nconst _hoisted_39 = {\n key: 1,\n class: \"StockQty\"\n}\nconst _hoisted_40 = { class: \"Sku\" }\nconst _hoisted_41 = { class: \"SkuTitle\" }\nconst _hoisted_42 = { class: \"Total\" }\nconst _hoisted_43 = { class: \"TotalPrice\" }\nconst _hoisted_44 = {\n key: 0,\n class: \"TotalNumber\"\n}\nconst _hoisted_45 = { class: \"skus\" }\nconst _hoisted_46 = { class: \"skusTitle\" }\nconst _hoisted_47 = {\n key: 9,\n class: \"Sku\"\n}\nconst _hoisted_48 = { class: \"SkuTitle\" }\nconst _hoisted_49 = { class: \"ProductButton SkuMargin\" }\nconst _hoisted_50 = {\n key: 0,\n class: \"Shop\"\n}\nconst _hoisted_51 = { class: \"ShopC\" }\nconst _hoisted_52 = { class: \"ShopName\" }\nconst _hoisted_53 = { class: \"ShopButton\" }\nconst _hoisted_54 = { class: \"SellerInfo\" }\nconst _hoisted_55 = { class: \"bt\" }\nconst _hoisted_56 = { class: \"GoodsRecommendList\" }\nconst _hoisted_57 = { class: \"GoodsRecommendTitle\" }\nconst _hoisted_58 = [\"innerHTML\"]\nconst _hoisted_59 = {\n key: 0,\n class: \"container isLoading\"\n}\nconst _hoisted_60 = { class: \"ProducHead\" }\nconst _hoisted_61 = { class: \"ProductImg\" }\nconst _hoisted_62 = { class: \"ProductName\" }\nconst _hoisted_63 = { class: \"ProducBody\" }\nconst _hoisted_64 = { class: \"ProductName\" }\nconst _hoisted_65 = {\n key: 0,\n class: \"container isShelves\"\n}\nconst _hoisted_66 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_67 = {\n key: 0,\n class: \"container isShelves\"\n}\nconst _hoisted_68 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_69 = { key: 0 }\nconst _hoisted_70 = {\n key: 0,\n class: \"IsBlacklist\"\n}\nconst _hoisted_71 = {\n key: 0,\n class: \"container isShelves\"\n}\nconst _hoisted_72 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport {\r\n ref,\r\n onMounted,\r\n unref,\r\n toRefs,\r\n watch,\r\n getCurrentInstance,\r\n onUnmounted,\r\n} from 'vue'\r\nimport { useRoute, useRouter } from 'vue-router'\r\nimport { useI18n } from 'vue-i18n'\r\nimport { ElMessageBox, ElMessage, ElLoading } from 'element-plus'\r\nimport { ClickOutside as vClickOutside } from 'element-plus'\r\nimport * as Api from '@/utils/api'\r\nimport { toWechat } from '@/utils/share'\r\nimport CommodityCard from '@/components/CommodityCard.vue'\r\nimport EnlargeImages from '@/components/enlarge-images.vue'\r\nimport MallLabel from '@/components/mall_label.vue'\r\nimport QrcodeVue from 'qrcode.vue'\r\nimport { ShareFacebook } from '@/utils/fb'\r\nimport { useUsersStore } from '@/pinia'\r\nimport * as SignalR from '@microsoft/signalr'\r\nimport { myPromise } from '@/utils/chathub'\r\nimport GoogleTranslate from '@/components/GoogleTranslate.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'product-details',\n setup(__props) {\n\r\nconst { proxy } = getCurrentInstance()\r\nconst store = useUsersStore()\r\nconst { Cities, Token } = toRefs(store)\r\n\r\nconst { t } = useI18n()\r\nconst Router = useRouter()\r\n\r\nconst hrefUrl = ref(location.href)\r\n\r\nconst route = useRoute()\r\nconst item = ref(null)\r\nconst MainGraph = ref(null)\r\nconst GoodsRecommendList = ref([])\r\nconst currentIndex = ref(0)\r\nconst isLadderPrices = ref(null)\r\nconst TotalPrice = ref(0)\r\nconst ShowCities = ref(false)\r\nconst Citie = ref(null)\r\nconst SkuValueQty = ref(0)\r\nconst CombinationSku = ref([])\r\nconst CurrentSku = ref(null)\r\nconst GroceryList = ref([])\r\nconst GroceryQty = ref(0)\r\n\r\nconst NoGoods = ref(false)\r\nconst Remark = ref(null)\r\nconst IsBlacklist = ref(false)\r\n\r\nconst PriceRange = ref(null)\r\n\r\nconst buttonRef = ref()\r\nconst popoverRef = ref()\r\nconst onClickOutside = () => {\r\n unref(popoverRef).popperRef?.delayHide?.()\r\n}\r\n\r\nconst connection = ref()\r\nconst chatStart = (body) => {\r\n if (!connection.value) {\r\n connection.value = new SignalR.HubConnectionBuilder()\r\n .withUrl('https://testmsg.loda.com.kh/chathub', {\r\n accessTokenFactory: () => Token.value,\r\n })\r\n .build()\r\n connection.value\r\n .start()\r\n .then(() => {\r\n connection.value.invoke('ConnectionForTokenAccess', body.SearchChannel)\r\n Api.Post('grapgoods/api/GoodsSearch/', body).then((res) => {})\r\n })\r\n .catch()\r\n } else {\r\n Api.Post('grapgoods/api/GoodsSearch/', body).then((res) => {})\r\n }\r\n connection.value.on('ReceiveContent', (res) => {\r\n try {\r\n const parse = JSON.parse(res)\r\n GoodsItem(parse)\r\n } catch (error) {}\r\n })\r\n}\r\n\r\nonUnmounted(() => {\r\n if (connection.value) connection.value.stop()\r\n})\r\n\r\nconst GoodsItem = (parse) => {\r\n item.value = parse\r\n IsBlacklist.value = parse?.IsBlacklist\r\n NoGoods.value = parse?.GoodsName ? false : true\r\n if (!item.value.Skus.length) {\r\n CurrentSku.value = {\r\n ImgUrl: item.value.MasterImg,\r\n Price: item.value.Price,\r\n Qty: 0,\r\n OutSkuId: '0',\r\n }\r\n } else {\r\n item.value.Skus.forEach((ele, index) => {\r\n SelectSku(index, ele.Values[0])\r\n })\r\n }\r\n GetGoodsRecommend(item.value)\r\n}\r\n\r\nconst SelectSku = (index, sku) => {\r\n SkuValueQty.value = 0\r\n CombinationSku.value[index] = sku.Value\r\n if (CombinationSku.value.length == item.value.Skus.length) {\r\n let SkuValue = ''\r\n CombinationSku.value.forEach((value, index) => {\r\n SkuValue += index == 0 ? value : ';' + value\r\n })\r\n CurrentSku.value = item.value.SkuMap.find((sku) => {\r\n return sku.Value == SkuValue\r\n })\r\n if (item.value.MallId == 15 || item.value.MallId == 121440) {\r\n AddGroceryList(true)\r\n }\r\n MainGraph.value =\r\n CurrentSku.value.ImgUrl ||\r\n CombinationSku.value[0].ImgUrl ||\r\n item.value.MasterImg\r\n if (CurrentSku.value?.RedirectUrl) {\r\n route.query.Url = CurrentSku.value?.RedirectUrl\r\n GetProduct()\r\n }\r\n if (CurrentSku.value?.RedirectUrl) {\r\n route.query.Url = CurrentSku.value?.RedirectUrl\r\n GetProduct()\r\n }\r\n }\r\n}\r\n\r\nconst AddGroceryList = (isCheck) => {\r\n const isExists = GroceryList.value.findIndex((item) => {\r\n return item.SkuTitle == CurrentSku.value['Value']\r\n })\r\n if (isCheck) {\r\n SkuValueQty.value = isExists != -1 ? GroceryList.value[isExists].Qty : 0\r\n } else {\r\n if (isExists != -1) {\r\n if (SkuValueQty.value > 0) {\r\n GroceryList.value[isExists].Qty = SkuValueQty.value\r\n } else {\r\n GroceryList.value.splice(isExists, 1)\r\n }\r\n } else {\r\n GroceryList.value.push({\r\n Price: CurrentSku.value.Price,\r\n Qty: SkuValueQty.value,\r\n RmbPrice: CurrentSku.value.RmbPrice,\r\n SkuImgUrl: MainGraph.value,\r\n SkuTitle: CurrentSku.value.Value,\r\n SkuValue: CurrentSku.value.OutSkuId,\r\n SkuValueId: null,\r\n })\r\n }\r\n }\r\n}\r\n\r\nconst QuantityChange = () => {\r\n if (item.value.MallId == 15 || item.value.MallId == 121440) {\r\n AddGroceryList(false)\r\n GroceryQty.value = 0\r\n GroceryQty.value = GroceryList.value.reduce((prev, cur) => {\r\n return prev + cur.Qty\r\n }, 0)\r\n if (item.value.LadderPrices.length) {\r\n CheckLadderPrices()\r\n }\r\n }\r\n}\r\n//删除和修改同方法,没想好怎么合并\r\nconst DeleteGrocery = (index) => {\r\n if (CurrentSku.value.OutSkuId == GroceryList.value[index].SkuValue) {\r\n SkuValueQty.value = 0\r\n }\r\n GroceryList.value.splice(index, 1)\r\n GroceryQty.value = GroceryList.value.reduce((prev, cur) => {\r\n return prev + cur.Qty\r\n }, 0)\r\n if (item.value.LadderPrices.length) {\r\n CheckLadderPrices()\r\n }\r\n}\r\n\r\nconst GroceryChange = (index) => {\r\n if (CurrentSku.value.OutSkuId == GroceryList.value[index].SkuValue) {\r\n SkuValueQty.value = GroceryList.value[index].Qty\r\n }\r\n GroceryQty.value = GroceryList.value.reduce((prev, cur) => {\r\n return prev + cur.Qty\r\n }, 0)\r\n if (item.value.LadderPrices.length) {\r\n CheckLadderPrices()\r\n }\r\n}\r\n\r\nconst CheckLadderPrices = () => {\r\n const Qty = item.value.Skus.length ? GroceryQty.value : SkuValueQty.value\r\n isLadderPrices.value = item.value.LadderPrices.find((ladder) => {\r\n return ladder.EndQuantity\r\n ? Qty >= ladder.StartQuantity && Qty <= ladder.EndQuantity\r\n : Qty >= ladder.StartQuantity\r\n })\r\n}\r\n\r\nconst SameParagraph = () => {\r\n Router.push({\r\n name: 'searchList',\r\n query: { img: item.value.Imgs[0] },\r\n })\r\n}\r\n\r\nconst isAdd = () => {\r\n if (item.value.LadderPrices.length) {\r\n return isLadderPrices.value ? false : true\r\n } else if (item.value.MinQuantity) {\r\n if (GroceryList.value.length) {\r\n return item.value.MinQuantity > GroceryQty.value\r\n } else {\r\n return item.value.MinQuantity > SkuValueQty.value\r\n }\r\n } else {\r\n return SkuValueQty.value > 0\r\n }\r\n}\r\n\r\nconst WechatShare = () => {\r\n toWechat(hrefUrl.value, document.title)\r\n}\r\n\r\nconst FavoriteLoding = ref(false)\r\nconst FavoriteId = ref(null)\r\nconst CustomerFavorite = () => {\r\n let body = {}\r\n if (FavoriteId.value) {\r\n body = {\r\n Id: FavoriteId.value,\r\n }\r\n } else {\r\n body = {\r\n OutProductId: item.value.OutID,\r\n ProductUrl: item.value.OutID,\r\n ProductImgUrl: item.value.MasterImg,\r\n ProductName: item.value.GoodsName,\r\n }\r\n }\r\n FavoriteLoding.value = true\r\n Api.Post('user/api/CustomerFavorites/', body).then(\r\n (res) => {\r\n FavoriteLoding.value = false\r\n FavoriteId.value = res.Id\r\n },\r\n () => {\r\n FavoriteLoding.value = false\r\n }\r\n )\r\n}\r\n\r\nconst CheckFavoriteFavorite = (pId) => {\r\n FavoriteLoding.value = true\r\n Api.Get('sellers/api/CheckFavorite/', {\r\n pId,\r\n }).then((res) => {\r\n FavoriteLoding.value = false\r\n FavoriteId.value = res.FavoriteId\r\n })\r\n}\r\n\r\nconst GetCities = () => {\r\n store.setState('basic/api/Cities/', { province_id: 1311160291 }, 'Cities')\r\n}\r\n\r\nconst Beyond = ref(false)\r\nconst TemplatesDetails = ref([])\r\nconst CityFreight = ref(null)\r\nconst ChangeCityFreight = (City) => {\r\n let CityID = City.CityId\r\n Citie.value = City\r\n ShowCities.value = false\r\n CityFreight.value = null\r\n Beyond.value = false\r\n TemplatesDetails.value = []\r\n let Templates = item.value.FreightTemplatesDetails\r\n if (Templates.NoDeliveryCityId) {\r\n let Cid = Templates.NoDeliveryCityId.findIndex((res) => res == CityID)\r\n Beyond.value = Cid == -1 ? false : true\r\n }\r\n\r\n Templates.FreightRules?.forEach((val) => {\r\n if (!val.CityId) {\r\n TemplatesDetails.value.push(val)\r\n }\r\n if (val.CityId == CityID) {\r\n TemplatesDetails.value.push(val)\r\n }\r\n })\r\n\r\n let isTemplates = Templates.FreightTemplates.findIndex((res) => {\r\n return res.CityId == CityID\r\n })\r\n if (isTemplates != -1) {\r\n CityFreight.value = Templates.FreightTemplates[isTemplates].Freight\r\n }\r\n if (CityFreight.value == null) {\r\n CityFreight.value = Templates.FreightTemplates[0].Freight\r\n }\r\n}\r\n\r\nwatch(\r\n [() => Cities.value, () => item.value],\r\n () => {\r\n if (item.value?.FreightTemplatesDetails && Cities.value) {\r\n ChangeCityFreight(Cities.value.Cities[0])\r\n }\r\n },\r\n {\r\n deep: true, // 深度监听\r\n immediate: true,\r\n }\r\n)\r\n\r\nconst AddCart = () => {\r\n let SkuValues = {}\r\n if (!GroceryList.value.length) {\r\n if (item.value.SkuMap.length) {\r\n SkuValues = [\r\n {\r\n SkuTitle: CurrentSku.value.Value,\r\n SkuValue: CurrentSku.value.OutSkuId,\r\n Qty: SkuValueQty.value,\r\n RmbPrice: CurrentSku.value.RmbPrice,\r\n Price: CurrentSku.value.Price,\r\n SkuImgUrl: CurrentSku.value.MasterImg,\r\n SkuValueId: null,\r\n },\r\n ]\r\n } else {\r\n SkuValues = [\r\n {\r\n SkuTitle: 'There is no SKU',\r\n SkuValue: '0',\r\n Qty: SkuValueQty.value,\r\n RmbPrice: item.value.RmbPrice,\r\n Price: item.value.Price,\r\n SkuImgUrl: item.value.MasterImg,\r\n SkuValueId: null,\r\n },\r\n ]\r\n }\r\n }\r\n // return false\r\n let data = {\r\n MallId: item.value.MallId,\r\n OutId: item.value.OutID,\r\n ProductName: item.value.GoodsName,\r\n ProductUrl: item.value.Url,\r\n PurchasingSiteId: 1,\r\n ShopName: item.value.ShopName,\r\n SkuValues: GroceryList.value.length ? GroceryList.value : SkuValues,\r\n CustomerMemo: null,\r\n ProductId: null,\r\n Remark: Remark.value,\r\n RemarkImg: null,\r\n SellerPId: item.value.MallId == 111036 ? item.value.OutID : null,\r\n CategoryId:\r\n item.value.MallId == 111036 ? null : item.value.CategoryId.toString(),\r\n }\r\n const loading = ElLoading.service({\r\n lock: true,\r\n text: t('加入购物车中'),\r\n background: 'rgba(0, 0, 0, 0.7)',\r\n })\r\n Api.Post('cart/api/NewShoppingCart/', data)\r\n .then((res) => {\r\n loading.close()\r\n Api.Get('cart/api/NewShoppingCart/', { PageIndex: 1, PageSize: 1 })\r\n if (!res.IsError) {\r\n ElMessageBox.confirm(t('成功添加'), t('信息'), {\r\n confirmButtonText: t('继续'),\r\n cancelButtonText: t('购物车详情'),\r\n type: 'success',\r\n })\r\n .then(() => {})\r\n .catch(() => {\r\n Router.push({\r\n path: '/shoppingCart',\r\n })\r\n })\r\n }\r\n })\r\n .catch(() => {\r\n loading.close()\r\n })\r\n}\r\n\r\nconst GetGoodsRecommend = (item) => {\r\n document.title =\r\n (item.GoodsName || t('很抱歉,没有淘到该代购商品!')) +\r\n ' - ' +\r\n proxy.$SiteSet?.LODA\r\n Api.Get('grapgoods/api/GoodsRecommend/', {\r\n TypeId: item.MallId == 1 ? 1 : 2,\r\n frontCartId: item.CategoryId,\r\n }).then((res) => {\r\n GoodsRecommendList.value = res.Goods\r\n })\r\n}\r\n\r\nconst GetProduct = (Update) => {\r\n NoGoods.value = false\r\n item.value = null\r\n if (route.query.mallId == 111036) {\r\n CheckFavoriteFavorite(route.query.outId)\r\n Api.Get('sellers/api/SellerProductSku/', {\r\n pid: route.query.outId,\r\n }).then((res) => {\r\n item.value = res.GoodsItem\r\n if (\r\n res.GoodsItem.SellerInfo.ShopTypeId != 1 &&\r\n !sessionStorage.getItem('needTest')\r\n ) {\r\n Router.push({\r\n path: '/LodaFood',\r\n })\r\n }\r\n GetCities()\r\n\r\n NoGoods.value = item.value?.GoodsName ? false : true\r\n\r\n if (item.value.Skus.length) {\r\n item.value.Skus.forEach((ele, index) => {\r\n SelectSku(index, ele.Values[0])\r\n })\r\n }\r\n\r\n GetGoodsRecommend(item.value)\r\n })\r\n } else {\r\n const body = {\r\n IsUpdate: Update,\r\n Url: route.query.Url,\r\n OutId: route.query.outId,\r\n MallId: route.query.mallId,\r\n SearchChannel: route.query.outId + '-1',\r\n }\r\n // chatStart(body)\r\n Api.Post('grapgoods/api/GoodsSearch/', body).then((res) => {\r\n GoodsItem(res.GoodsItem)\r\n })\r\n setTimeout(() => {\r\n if (item.value == null) {\r\n NoGoods.value = true\r\n }\r\n }, 15000)\r\n }\r\n}\r\n\r\nonMounted(() => {\r\n myPromise().then((res) => {\r\n console.log(res)\r\n })\r\n GetProduct(false)\r\n})\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_el_popover = _resolveComponent(\"el-popover\")!\n const _component_Star = _resolveComponent(\"Star\")!\n const _component_el_icon = _resolveComponent(\"el-icon\")!\n const _component_StarFilled = _resolveComponent(\"StarFilled\")!\n const _component_el_link = _resolveComponent(\"el-link\")!\n const _component_el_button = _resolveComponent(\"el-button\")!\n const _component_arrow_down_bold = _resolveComponent(\"arrow-down-bold\")!\n const _component_suffix_img = _resolveComponent(\"suffix-img\")!\n const _component_el_input_number = _resolveComponent(\"el-input-number\")!\n const _component_font = _resolveComponent(\"font\")!\n const _component_el_input = _resolveComponent(\"el-input\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_el_skeleton_item = _resolveComponent(\"el-skeleton-item\")!\n const _component_el_skeleton = _resolveComponent(\"el-skeleton\")!\n const _component_CircleCloseFilled = _resolveComponent(\"CircleCloseFilled\")!\n const _component_SemiSelect = _resolveComponent(\"SemiSelect\")!\n const _component_WarningFilled = _resolveComponent(\"WarningFilled\")!\n const _directive_loading = _resolveDirective(\"loading\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(_Transition, { name: \"el-fade-in-linear\" }, {\n default: _withCtx(() => [\n (\r\n item.value &&\r\n !NoGoods.value &&\r\n !item.value?.IsShelves &&\r\n !item.value?.NotSupportLink &&\r\n !IsBlacklist.value\r\n )\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(EnlargeImages, {\n images: item.value.Imgs.length > 0 ? item.value.Imgs : [item.value.MasterImg],\n MainGraph: MainGraph.value\n }, null, 8, [\"images\", \"MainGraph\"]),\n _withDirectives(_createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('分享')), 1),\n _createVNode(_component_el_popover, {\n placement: \"top\",\n width: 25,\n trigger: \"click\"\n }, {\n reference: _withCtx(() => [\n _hoisted_6\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(QrcodeVue, {\n value: hrefUrl.value,\n \"size:300\": \"\",\n level: \"H\"\n }, null, 8, [\"value\"])\n ])\n ]),\n _: 1\n }),\n _createElementVNode(\"img\", {\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_unref(ShareFacebook) && _unref(ShareFacebook)(...args))),\n src: _imports_1\n })\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", { onClick: CustomerFavorite }, [\n _withDirectives(_createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_Star)\n ]),\n _: 1\n }, 512), [\n [_vShow, !FavoriteId.value]\n ]),\n _withDirectives(_createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_StarFilled)\n ]),\n _: 1\n }, 512), [\n [_vShow, FavoriteId.value]\n ]),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('收藏商品')), 1)\n ])), [\n [_directive_loading, FavoriteLoding.value]\n ])\n ], 512), [\n [_vShow, _unref(route).query.mallId == 111036]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, [\n _withDirectives(_createVNode(MallLabel, null, null, 512), [\n [_vShow, item.value.MallId == 111036]\n ]),\n _createVNode(_component_el_link, {\n href: item.value.Url,\n target: \"_blank\"\n }, {\n default: _withCtx(() => [\n _createVNode(GoogleTranslate, {\n text: item.value.GoodsName,\n type: null,\n MallId: item.value.MallId\n }, null, 8, [\"text\", \"MallId\"])\n ]),\n _: 1\n }, 8, [\"href\"])\n ]),\n (item.value.MallId != 111036)\n ? (_openBlock(), _createBlock(_component_el_button, {\n key: 0,\n class: \"SameParagraph\",\n onClick: SameParagraph,\n type: \"danger\",\n text: \"\",\n bg: \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('找同款')), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (item.value.LadderPrices && item.value.LadderPrices.length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('价格')), 1),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('起批量')), 1)\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.value.LadderPrices, (Ladder) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: Ladder.StartQuantity,\n class: _normalizeClass({ isLadder: isLadderPrices.value == Ladder})\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$ccy(Ladder?.Price)), 1),\n (Ladder.EndQuantity)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_11, _toDisplayString(Ladder.StartQuantity + '~' + Ladder.EndQuantity), 1))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_12, \" ≥ \" + _toDisplayString(Ladder.StartQuantity), 1))\n ], 2))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_13, [\n (isLadderPrices.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, _toDisplayString(_ctx.$ccy(isLadderPrices.value.Price)), 1))\n : (item.value.DiscountPrice)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$ccy(CurrentSku.value?.Price || item.value.Price)), 1),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$ccy(CurrentSku.value?.DiscountPrice || item.value.DiscountPrice)), 1),\n _createElementVNode(\"span\", null, _toDisplayString(CurrentSku.value?.DiscountRate || item.value.DiscountRate) + \"  OFF \", 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_16, _toDisplayString(_ctx.$ccy(PriceRange.value || CurrentSku.value?.Price || item.value.Price)), 1)),\n _withDirectives(_createElementVNode(\"div\", null, _toDisplayString(_ctx.$t('我们承诺您的交易安全:我们只会在买家收到货后拨款给卖家!')), 513), [\n [_vShow, item.value.MallId == 111036]\n ])\n ]),\n (item.value.MallId == 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [\n _createElementVNode(\"span\", _hoisted_18, _toDisplayString(_ctx.$t('配送至')), 1),\n (_unref(Cities))\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: \"CityName\",\n onMouseenter: _cache[1] || (_cache[1] = ($event: any) => (ShowCities.value = true))\n }, [\n _createTextVNode(_toDisplayString(Citie.value ? Citie.value.CityName : _unref(Cities).Cities[0].CityName) + \" \", 1),\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_arrow_down_bold)\n ]),\n _: 1\n })\n ], 32))\n : _createCommentVNode(\"\", true),\n (CityFreight.value)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(TemplatesDetails.value, (TemplatesDetail, index) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: index,\n class: \"TemplatesDetail\"\n }, _toDisplayString(TemplatesDetail.ConditionValue), 1))\n }), 128))\n : _createCommentVNode(\"\", true),\n _createVNode(_Transition, { name: \"el-fade-in-linear\" }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"Cities\",\n onMouseleave: _cache[2] || (_cache[2] = ($event: any) => (ShowCities.value = false))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(Cities)?.Cities, (C) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: C.CityId,\n onClick: ($event: any) => (ChangeCityFreight(C))\n }, _toDisplayString(C.CityName), 9, _hoisted_19))\n }), 128))\n ], 544), [\n [_vShow, ShowCities.value]\n ])\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true),\n (item.value.MallId == 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_20, [\n _createElementVNode(\"span\", _hoisted_21, [\n (item.value.Country == 1)\n ? (_openBlock(), _createElementBlock(\"img\", _hoisted_22))\n : (_openBlock(), _createElementBlock(\"img\", _hoisted_23))\n ]),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.DeliveryCountry), 1)\n ]))\n : _createCommentVNode(\"\", true),\n (item.value.MallId == 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_24, [\n _createElementVNode(\"span\", _hoisted_25, _toDisplayString(_ctx.$t('付款方式')), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.value.Payments, (Payment) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: Payment.PaymentTypeId\n }, _toDisplayString(Payment.PaymentValue) + \"    \", 1))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (item.value.MinQuantity && item.value.MallId != 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_26, [\n _createElementVNode(\"span\", _hoisted_27, _toDisplayString(_ctx.$t('起批量')), 1),\n _createElementVNode(\"span\", null, \"≥\" + _toDisplayString(item.value.MinQuantity), 1)\n ]))\n : _createCommentVNode(\"\", true),\n (item.value.MallId == 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_28, [\n _createElementVNode(\"span\", _hoisted_29, _toDisplayString(_ctx.$t('运费')), 1),\n _createElementVNode(\"span\", null, _toDisplayString(Beyond.value ? _ctx.$t('该地址不支持配送') : CityFreight.value ? _ctx.$ccy(CityFreight.value) : _ctx.$t('包邮')), 1)\n ]))\n : _createCommentVNode(\"\", true),\n (item.value.MallId != 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_30, [\n _createElementVNode(\"span\", _hoisted_31, _toDisplayString(_ctx.$t('商品来自')), 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.MallName), 1),\n _createElementVNode(\"span\", null, \"  \" + _toDisplayString(item.value.RmbPrice) + \"RMB\", 1),\n _createElementVNode(\"span\", _hoisted_32, [\n _createTextVNode(_toDisplayString(_ctx.$t('汇率')) + \" \", 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.ExchangeRate), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.value.Skus, (Sku, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"Skus\",\n key: Sku.Index\n }, [\n _createElementVNode(\"div\", _hoisted_33, [\n _createVNode(GoogleTranslate, {\n text: Sku.Name,\n type: null\n }, null, 8, [\"text\"])\n ]),\n _createElementVNode(\"div\", _hoisted_34, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(Sku.Values, (Value) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: Value,\n class: _normalizeClass(['Value',{ checkVal: CombinationSku.value[index] === Value.Value },]),\n onClick: ($event: any) => (SelectSku(index, Value))\n }, [\n (Value.ImgUrl)\n ? (_openBlock(), _createBlock(_component_suffix_img, {\n key: 0,\n class: \"ValueImage\",\n url: Value.ImgUrl\n }, null, 8, [\"url\"]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"span\", null, _toDisplayString(Value.Name), 1)\n ], 10, _hoisted_35))\n }), 128))\n ])\n ]))\n }), 128)),\n (CurrentSku.value || !item.value.SkuMap.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_36, [\n _createElementVNode(\"div\", _hoisted_37, _toDisplayString(_ctx.$t('数量')), 1),\n _createVNode(_component_el_input_number, {\n modelValue: SkuValueQty.value,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ((SkuValueQty).value = $event)),\n size: \"large\",\n min: 0,\n max: item.value.MallId==111036?item.value.StockQty:Infinity,\n onKeyup: QuantityChange,\n onChange: QuantityChange,\n precision: 0\n }, null, 8, [\"modelValue\", \"max\"]),\n (item.value.MallId==111036)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (CurrentSku.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_38, _toDisplayString(_ctx.$t('库存')) + \": \" + _toDisplayString(CurrentSku.value.StockQty), 1))\n : (!item.value.SkuMap.length && item.value.StockQty)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_39, _toDisplayString(_ctx.$t('库存')) + \": \" + _toDisplayString(item.value.StockQty), 1))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_40, [\n _createElementVNode(\"div\", _hoisted_41, _toDisplayString(_ctx.$t('总额')) + \":\", 1),\n _createElementVNode(\"div\", _hoisted_42, [\n _createElementVNode(\"span\", _hoisted_43, [\n (item.value.MallId==111036)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createTextVNode(_toDisplayString(_ctx.$ccy((CurrentSku.value?.DiscountPrice || item.value.DiscountPrice||CurrentSku.value?.Price||item.value.Price) * SkuValueQty.value)), 1)\n ], 64))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createTextVNode(_toDisplayString(_ctx.$ccy((GroceryList.value.length? GroceryQty.value : SkuValueQty.value) * (isLadderPrices.value?isLadderPrices.value.Price:item.value.Price))), 1)\n ], 64))\n ]),\n (GroceryList.value.length)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_44, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('数量')) + \":\", 1),\n _createElementVNode(\"span\", null, _toDisplayString(GroceryQty.value), 1),\n _withDirectives((_openBlock(), _createElementBlock(\"span\", {\n ref_key: \"buttonRef\",\n ref: buttonRef\n }, [\n _createTextVNode(_toDisplayString(_ctx.$t('采购清单')), 1)\n ])), [\n [_vShow, GroceryList.value.length],\n [_unref(vClickOutside), onClickOutside]\n ]),\n _createVNode(_component_el_popover, {\n placement: \"top\",\n ref_key: \"popoverRef\",\n ref: popoverRef,\n \"virtual-ref\": buttonRef.value,\n trigger: \"click\",\n width: \"500px\",\n title: _ctx.$t('采购清单'),\n \"virtual-triggering\": \"\",\n \"popper-class\": \"PurchaseList\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_45, [\n _createElementVNode(\"div\", _hoisted_46, [\n _createVNode(_component_font, null, {\n default: _withCtx(() => [\n _createTextVNode(\"SKU\")\n ]),\n _: 1\n }),\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.$t('数量')), 1)\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(GroceryList.value, (sku, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"skusTr\",\n key: index\n }, [\n _createVNode(_component_el_button, {\n type: \"danger\",\n icon: \"Delete\",\n circle: \"\",\n onClick: ($event: any) => (DeleteGrocery(index))\n }, null, 8, [\"onClick\"]),\n _createVNode(_component_font, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(sku.SkuTitle), 1)\n ]),\n _: 2\n }, 1024),\n _createVNode(_component_el_input_number, {\n modelValue: sku.Qty,\n \"onUpdate:modelValue\": ($event: any) => ((sku.Qty) = $event),\n size: \"large\",\n min: 1,\n onKeyup: ($event: any) => (GroceryChange(index)),\n onChange: ($event: any) => (GroceryChange(index)),\n precision: 0\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\", \"onKeyup\", \"onChange\"])\n ]))\n }), 128))\n ])\n ]),\n _: 1\n }, 8, [\"virtual-ref\", \"title\"])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n (item.value.MallId != 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_47, [\n _createElementVNode(\"div\", _hoisted_48, _toDisplayString(_ctx.$t('给客服留言')) + \":\", 1),\n _createVNode(_component_el_input, {\n modelValue: Remark.value,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((Remark).value = $event)),\n rows: 5,\n type: \"textarea\",\n maxlength: \"100\",\n \"show-word-limit\": \"\",\n placeholder: _ctx.$t('请输入')\n }, null, 8, [\"modelValue\", \"placeholder\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_49, [\n _createVNode(_component_el_button, {\n class: \"AddCart\",\n color: \"#fa713e\",\n icon: \"ShoppingCart\",\n disabled: isAdd(),\n size: \"large\",\n onClick: AddCart\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('加入购物车')), 1)\n ]),\n _: 1\n }, 8, [\"disabled\"]),\n _withDirectives(_createVNode(_component_el_button, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (GetProduct(true))),\n size: \"large\",\n color: \"#fa713e\",\n plain: \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('更新商品数据')), 1)\n ]),\n _: 1\n }, 512), [\n [_vShow, item.value.MallId != 111036]\n ])\n ])\n ])\n ]),\n (item.value.MallId == 111036)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_50, [\n _createVNode(_component_suffix_img, {\n class: \"ShopLogo\",\n url: item.value.SellerInfo.ShopLogo\n }, null, 8, [\"url\"]),\n _createElementVNode(\"div\", _hoisted_51, [\n _createElementVNode(\"div\", _hoisted_52, _toDisplayString(item.value.SellerInfo.ShopName), 1),\n _createElementVNode(\"div\", _hoisted_53, [\n _createVNode(_component_router_link, {\n to: {\r\n path: '/IM',\r\n query: {\r\n type: 'Grabgood',\r\n GoodsName: item.value.GoodsName,\r\n ImgUrl: item.value.MasterImg,\r\n Price: item.value.Price,\r\n Url: hrefUrl.value,\r\n shopId: item.value.ShopId,\r\n },\r\n },\n target: \"_blank\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"button\", null, _toDisplayString(_ctx.$t('即时聊天')), 1)\n ]),\n _: 1\n }, 8, [\"to\"]),\n _createElementVNode(\"button\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (\r\n _unref(Router).push({\r\n path: '/mallHome',\r\n query: { ShopId: item.value.ShopId },\r\n })\r\n ))\n }, _toDisplayString(_ctx.$t('进入商店')), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_54, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('聊天回应率')) + \":\", 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.SellerInfo.ChatResponseRate) + \"%\", 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('回应速度')) + \":\", 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.SellerInfo.ChatResponseSpeed) + \" \" + _toDisplayString(_ctx.$t('小时内')), 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('商品')) + \":\", 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.SellerInfo.ProductNum), 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('评价')) + \":\", 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.SellerInfo.Evaluation.toFixed(1)), 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('加入时间')) + \":\", 1),\n _createElementVNode(\"span\", null, _toDisplayString(item.value.SellerInfo.CreatedMonth) + \" \" + _toDisplayString(_ctx.$t('个月前')), 1)\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_55, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"div\", _hoisted_56, [\n _createElementVNode(\"div\", _hoisted_57, _toDisplayString(_ctx.$t('推荐商品')), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(GoodsRecommendList.value, (GoodsRecommend, index) => {\n return (_openBlock(), _createBlock(CommodityCard, {\n key: GoodsRecommend,\n data: GoodsRecommend,\n index: index,\n class: \"CCard\"\n }, null, 8, [\"data\", \"index\"]))\n }), 128))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"Description\",\n innerHTML: item.value.Description\n }, null, 8, _hoisted_58)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"el-zoom-in-center\" }, {\n default: _withCtx(() => [\n (!item.value && !NoGoods.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_59, [\n _createVNode(_component_el_skeleton, { animated: \"\" }, {\n template: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_60, [\n _createElementVNode(\"div\", _hoisted_61, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(6, (isImage) => {\n return _createVNode(_component_el_skeleton_item, {\n key: isImage,\n variant: \"image\"\n })\n }), 64))\n ]),\n _createElementVNode(\"div\", _hoisted_62, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (isText) => {\n return _createVNode(_component_el_skeleton_item, {\n key: isText,\n style: _normalizeStyle('width:' + 200 / isText + '%'),\n variant: \"text\"\n }, null, 8, [\"style\"])\n }), 64))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_63, [\n _createElementVNode(\"div\", _hoisted_64, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(6, (isText) => {\n return _createVNode(_component_el_skeleton_item, {\n key: isText,\n variant: \"text\"\n })\n }), 64))\n ])\n ])\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"el-fade-in-linear\" }, {\n default: _withCtx(() => [\n (item.value?.IsShelves)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_65, [\n _createElementVNode(\"div\", null, [\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_CircleCloseFilled)\n ]),\n _: 1\n }),\n _createTextVNode(\"     \"),\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_CircleCloseFilled)\n ]),\n _: 1\n }),\n _hoisted_66,\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_SemiSelect)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.$t('商品已下架')), 1)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"el-fade-in-linear\" }, {\n default: _withCtx(() => [\n (NoGoods.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_67, [\n _createElementVNode(\"div\", null, [\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_CircleCloseFilled)\n ]),\n _: 1\n }),\n _createTextVNode(\"     \"),\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_CircleCloseFilled)\n ]),\n _: 1\n }),\n _hoisted_68,\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_SemiSelect)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, [\n _createTextVNode(_toDisplayString(_ctx.$t('很抱歉,没有淘到该代购商品!')) + \" \", 1),\n (_unref(route).query?.Url)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_69, _toDisplayString(_ctx.$t('您可以仔细检查输入的代购链接是否正确')), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", null, [\n (_unref(route).query?.Url || item.value?.Url)\n ? (_openBlock(), _createBlock(_component_el_link, {\n key: 0,\n type: \"danger\",\n href: _unref(route).query.Url || item.value?.Url,\n target: \"_blank\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('打开原链接')), 1)\n ]),\n _: 1\n }, 8, [\"href\"]))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\"     \"),\n _createVNode(_component_el_link, {\n type: \"warning\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (GetProduct(false)))\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('更新商品数据')), 1)\n ]),\n _: 1\n })\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"el-fade-in-linear\" }, {\n default: _withCtx(() => [\n (IsBlacklist.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_70, [\n _createElementVNode(\"div\", null, [\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_WarningFilled)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.$t('很抱歉,该商品为黑名单商品!')), 1),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"p\", null, _toDisplayString(_ctx.$t('商品名字')) + \": \" + _toDisplayString(item.value.GoodsName), 1),\n _createElementVNode(\"p\", null, _toDisplayString(_ctx.$t('您可以选择其他喜爱商品再次尝试,谢谢。')), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"el-fade-in-linear\" }, {\n default: _withCtx(() => [\n (item.value?.NotSupportLink)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_71, [\n _createElementVNode(\"div\", null, [\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_CircleCloseFilled)\n ]),\n _: 1\n }),\n _createTextVNode(\"     \"),\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_CircleCloseFilled)\n ]),\n _: 1\n }),\n _hoisted_72,\n _createVNode(_component_el_icon, null, {\n default: _withCtx(() => [\n _createVNode(_component_SemiSelect)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.$t('暂时不支持该链接')), 1)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 64))\n}\n}\n\n})","import script from \"./product-details.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./product-details.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./product-details.vue?vue&type=style&index=0&id=165c7b98&lang=scss\"\nimport \"./product-details.vue?vue&type=style&index=1&id=165c7b98&scoped=true&lang=scss\"\n\nimport exportComponent from \"F:\\\\store\\\\NewLODAPC\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-165c7b98\"]])\n\nexport default __exports__","'use strict';\nvar global = require('../internals/global');\nvar classof = require('../internals/classof-raw');\n\nmodule.exports = classof(global.process) === 'process';\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { NullLogger } from \"./Loggers\";\r\n// Version token that will be replaced by the prepack command\r\n/** The version of the SignalR client. */\r\nexport const VERSION = \"7.0.14\";\r\n/** @private */\r\nexport class Arg {\r\n static isRequired(val, name) {\r\n if (val === null || val === undefined) {\r\n throw new Error(`The '${name}' argument is required.`);\r\n }\r\n }\r\n static isNotEmpty(val, name) {\r\n if (!val || val.match(/^\\s*$/)) {\r\n throw new Error(`The '${name}' argument should not be empty.`);\r\n }\r\n }\r\n static isIn(val, values, name) {\r\n // TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.\r\n if (!(val in values)) {\r\n throw new Error(`Unknown ${name} value: ${val}.`);\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport class Platform {\r\n // react-native has a window but no document so we should check both\r\n static get isBrowser() {\r\n return typeof window === \"object\" && typeof window.document === \"object\";\r\n }\r\n // WebWorkers don't have a window object so the isBrowser check would fail\r\n static get isWebWorker() {\r\n return typeof self === \"object\" && \"importScripts\" in self;\r\n }\r\n // react-native has a window but no document\r\n static get isReactNative() {\r\n return typeof window === \"object\" && typeof window.document === \"undefined\";\r\n }\r\n // Node apps shouldn't have a window object, but WebWorkers don't either\r\n // so we need to check for both WebWorker and window\r\n static get isNode() {\r\n return !this.isBrowser && !this.isWebWorker && !this.isReactNative;\r\n }\r\n}\r\n/** @private */\r\nexport function getDataDetail(data, includeContent) {\r\n let detail = \"\";\r\n if (isArrayBuffer(data)) {\r\n detail = `Binary data of length ${data.byteLength}`;\r\n if (includeContent) {\r\n detail += `. Content: '${formatArrayBuffer(data)}'`;\r\n }\r\n }\r\n else if (typeof data === \"string\") {\r\n detail = `String data of length ${data.length}`;\r\n if (includeContent) {\r\n detail += `. Content: '${data}'`;\r\n }\r\n }\r\n return detail;\r\n}\r\n/** @private */\r\nexport function formatArrayBuffer(data) {\r\n const view = new Uint8Array(data);\r\n // Uint8Array.map only supports returning another Uint8Array?\r\n let str = \"\";\r\n view.forEach((num) => {\r\n const pad = num < 16 ? \"0\" : \"\";\r\n str += `0x${pad}${num.toString(16)} `;\r\n });\r\n // Trim of trailing space.\r\n return str.substr(0, str.length - 1);\r\n}\r\n// Also in signalr-protocol-msgpack/Utils.ts\r\n/** @private */\r\nexport function isArrayBuffer(val) {\r\n return val && typeof ArrayBuffer !== \"undefined\" &&\r\n (val instanceof ArrayBuffer ||\r\n // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof\r\n (val.constructor && val.constructor.name === \"ArrayBuffer\"));\r\n}\r\n/** @private */\r\nexport async function sendMessage(logger, transportName, httpClient, url, content, options) {\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n logger.log(LogLevel.Trace, `(${transportName} transport) sending data. ${getDataDetail(content, options.logMessageContent)}.`);\r\n const responseType = isArrayBuffer(content) ? \"arraybuffer\" : \"text\";\r\n const response = await httpClient.post(url, {\r\n content,\r\n headers: { ...headers, ...options.headers },\r\n responseType,\r\n timeout: options.timeout,\r\n withCredentials: options.withCredentials,\r\n });\r\n logger.log(LogLevel.Trace, `(${transportName} transport) request complete. Response status: ${response.statusCode}.`);\r\n}\r\n/** @private */\r\nexport function createLogger(logger) {\r\n if (logger === undefined) {\r\n return new ConsoleLogger(LogLevel.Information);\r\n }\r\n if (logger === null) {\r\n return NullLogger.instance;\r\n }\r\n if (logger.log !== undefined) {\r\n return logger;\r\n }\r\n return new ConsoleLogger(logger);\r\n}\r\n/** @private */\r\nexport class SubjectSubscription {\r\n constructor(subject, observer) {\r\n this._subject = subject;\r\n this._observer = observer;\r\n }\r\n dispose() {\r\n const index = this._subject.observers.indexOf(this._observer);\r\n if (index > -1) {\r\n this._subject.observers.splice(index, 1);\r\n }\r\n if (this._subject.observers.length === 0 && this._subject.cancelCallback) {\r\n this._subject.cancelCallback().catch((_) => { });\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport class ConsoleLogger {\r\n constructor(minimumLogLevel) {\r\n this._minLevel = minimumLogLevel;\r\n this.out = console;\r\n }\r\n log(logLevel, message) {\r\n if (logLevel >= this._minLevel) {\r\n const msg = `[${new Date().toISOString()}] ${LogLevel[logLevel]}: ${message}`;\r\n switch (logLevel) {\r\n case LogLevel.Critical:\r\n case LogLevel.Error:\r\n this.out.error(msg);\r\n break;\r\n case LogLevel.Warning:\r\n this.out.warn(msg);\r\n break;\r\n case LogLevel.Information:\r\n this.out.info(msg);\r\n break;\r\n default:\r\n // console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug\r\n this.out.log(msg);\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport function getUserAgentHeader() {\r\n let userAgentHeaderName = \"X-SignalR-User-Agent\";\r\n if (Platform.isNode) {\r\n userAgentHeaderName = \"User-Agent\";\r\n }\r\n return [userAgentHeaderName, constructUserAgent(VERSION, getOsName(), getRuntime(), getRuntimeVersion())];\r\n}\r\n/** @private */\r\nexport function constructUserAgent(version, os, runtime, runtimeVersion) {\r\n // Microsoft SignalR/[Version] ([Detailed Version]; [Operating System]; [Runtime]; [Runtime Version])\r\n let userAgent = \"Microsoft SignalR/\";\r\n const majorAndMinor = version.split(\".\");\r\n userAgent += `${majorAndMinor[0]}.${majorAndMinor[1]}`;\r\n userAgent += ` (${version}; `;\r\n if (os && os !== \"\") {\r\n userAgent += `${os}; `;\r\n }\r\n else {\r\n userAgent += \"Unknown OS; \";\r\n }\r\n userAgent += `${runtime}`;\r\n if (runtimeVersion) {\r\n userAgent += `; ${runtimeVersion}`;\r\n }\r\n else {\r\n userAgent += \"; Unknown Runtime Version\";\r\n }\r\n userAgent += \")\";\r\n return userAgent;\r\n}\r\n// eslint-disable-next-line spaced-comment\r\n/*#__PURE__*/ function getOsName() {\r\n if (Platform.isNode) {\r\n switch (process.platform) {\r\n case \"win32\":\r\n return \"Windows NT\";\r\n case \"darwin\":\r\n return \"macOS\";\r\n case \"linux\":\r\n return \"Linux\";\r\n default:\r\n return process.platform;\r\n }\r\n }\r\n else {\r\n return \"\";\r\n }\r\n}\r\n// eslint-disable-next-line spaced-comment\r\n/*#__PURE__*/ function getRuntimeVersion() {\r\n if (Platform.isNode) {\r\n return process.versions.node;\r\n }\r\n return undefined;\r\n}\r\nfunction getRuntime() {\r\n if (Platform.isNode) {\r\n return \"NodeJS\";\r\n }\r\n else {\r\n return \"Browser\";\r\n }\r\n}\r\n/** @private */\r\nexport function getErrorString(e) {\r\n if (e.stack) {\r\n return e.stack;\r\n }\r\n else if (e.message) {\r\n return e.message;\r\n }\r\n return `${e}`;\r\n}\r\n/** @private */\r\nexport function getGlobalThis() {\r\n // globalThis is semi-new and not available in Node until v12\r\n if (typeof globalThis !== \"undefined\") {\r\n return globalThis;\r\n }\r\n if (typeof self !== \"undefined\") {\r\n return self;\r\n }\r\n if (typeof window !== \"undefined\") {\r\n return window;\r\n }\r\n if (typeof global !== \"undefined\") {\r\n return global;\r\n }\r\n throw new Error(\"could not find global\");\r\n}\r\n//# sourceMappingURL=Utils.js.map","// fb.ts\r\n// 引入登录SDK\r\nexport const fbJsdk = (typeIndex) => {\r\n ; (function (d: any, s: any, id: any) {\r\n var js\r\n var fjs = d.getElementsByTagName(s)[0]\r\n if (d.getElementById(id)) {\r\n return\r\n }\r\n js = d.createElement(s)\r\n js.id = id\r\n ; (js as any).src = 'https://connect.facebook.net/zh_CN/sdk.js'\r\n ; (fjs as any).parentNode.insertBefore(js, fjs)\r\n })(document, 'script', 'facebook-jssdk')\r\n // 初始化\r\n ; (window as any).fbAsyncInit = function () {\r\n // @ts-ignore:\r\n // eslint-disable-next-line no-undef\r\n FB.init({\r\n appId: '990922070918466', // 应用编号\r\n autoLogAppEvents: true,\r\n xfbml: true,\r\n version: 'v16.0',\r\n })\r\n if (typeIndex) {\r\n ShareFacebook()\r\n }\r\n }\r\n}\r\n\r\ndeclare const FB: any\r\nexport const ShareFacebook = () => {\r\n console.log(typeof FB)\r\n if (typeof FB == 'object') {\r\n FB.ui(\r\n {\r\n // display: 'popup',\r\n method: 'share',\r\n },\r\n function (response) { }\r\n )\r\n } else {\r\n fbJsdk(1)\r\n }\r\n}\r\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call -- required for testing\n method.call(null, argument || function () { return 1; }, 1);\n });\n};\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** A logger that does nothing when log messages are sent to it. */\r\nexport class NullLogger {\r\n constructor() { }\r\n /** @inheritDoc */\r\n // eslint-disable-next-line\r\n log(_logLevel, _message) {\r\n }\r\n}\r\n/** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */\r\nNullLogger.instance = new NullLogger();\r\n//# sourceMappingURL=Loggers.js.map","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./product-details.vue?vue&type=style&index=0&id=165c7b98&lang=scss\"","/*!\n * qrcode.vue v3.4.1\n * A Vue.js component to generate QRCode.\n * © 2017-2023 @scopewu(https://github.com/scopewu)\n * MIT License.\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) :\n typeof define === 'function' && define.amd ? define(['vue'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.QrcodeVue = factory(global.Vue));\n})(this, (function (vue) { 'use strict';\n\n /******************************************************************************\r\n Copyright (c) Microsoft Corporation.\r\n\r\n Permission to use, copy, modify, and/or distribute this software for any\r\n purpose with or without fee is hereby granted.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n PERFORMANCE OF THIS SOFTWARE.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\r\n\r\n typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\n\n /*\n * QR Code generator library (TypeScript)\n *\n * Copyright (c) Project Nayuki. (MIT License)\n * https://www.nayuki.io/page/qr-code-generator-library\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n * - The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * - The Software is provided \"as is\", without warranty of any kind, express or\n * implied, including but not limited to the warranties of merchantability,\n * fitness for a particular purpose and noninfringement. In no event shall the\n * authors or copyright holders be liable for any claim, damages or other\n * liability, whether in an action of contract, tort or otherwise, arising from,\n * out of or in connection with the Software or the use or other dealings in the\n * Software.\n */\n var qrcodegen;\n (function (qrcodegen) {\n /*---- QR Code symbol class ----*/\n /*\n * A QR Code symbol, which is a type of two-dimension barcode.\n * Invented by Denso Wave and described in the ISO/IEC 18004 standard.\n * Instances of this class represent an immutable square grid of dark and light cells.\n * The class provides static factory functions to create a QR Code from text or binary data.\n * The class covers the QR Code Model 2 specification, supporting all versions (sizes)\n * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.\n *\n * Ways to create a QR Code object:\n * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().\n * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().\n * - Low level: Custom-make the array of data codeword bytes (including\n * segment headers and final padding, excluding error correction codewords),\n * supply the appropriate version number, and call the QrCode() constructor.\n * (Note that all ways require supplying the desired error correction level.)\n */\n var QrCode = /** @class */ (function () {\n /*-- Constructor (low level) and fields --*/\n // Creates a new QR Code with the given version number,\n // error correction level, data codeword bytes, and mask number.\n // This is a low-level API that most users should not use directly.\n // A mid-level API is the encodeSegments() function.\n function QrCode(\n // The version number of this QR Code, which is between 1 and 40 (inclusive).\n // This determines the size of this barcode.\n version, \n // The error correction level used in this QR Code.\n errorCorrectionLevel, dataCodewords, msk) {\n this.version = version;\n this.errorCorrectionLevel = errorCorrectionLevel;\n // The modules of this QR Code (false = light, true = dark).\n // Immutable after constructor finishes. Accessed through getModule().\n this.modules = [];\n // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.\n this.isFunction = [];\n // Check scalar arguments\n if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION)\n throw new RangeError(\"Version value out of range\");\n if (msk < -1 || msk > 7)\n throw new RangeError(\"Mask value out of range\");\n this.size = version * 4 + 17;\n // Initialize both grids to be size*size arrays of Boolean false\n var row = [];\n for (var i = 0; i < this.size; i++)\n row.push(false);\n for (var i = 0; i < this.size; i++) {\n this.modules.push(row.slice()); // Initially all light\n this.isFunction.push(row.slice());\n }\n // Compute ECC, draw modules\n this.drawFunctionPatterns();\n var allCodewords = this.addEccAndInterleave(dataCodewords);\n this.drawCodewords(allCodewords);\n // Do masking\n if (msk == -1) { // Automatically choose best mask\n var minPenalty = 1000000000;\n for (var i = 0; i < 8; i++) {\n this.applyMask(i);\n this.drawFormatBits(i);\n var penalty = this.getPenaltyScore();\n if (penalty < minPenalty) {\n msk = i;\n minPenalty = penalty;\n }\n this.applyMask(i); // Undoes the mask due to XOR\n }\n }\n assert(0 <= msk && msk <= 7);\n this.mask = msk;\n this.applyMask(msk); // Apply the final choice of mask\n this.drawFormatBits(msk); // Overwrite old format bits\n this.isFunction = [];\n }\n /*-- Static factory functions (high level) --*/\n // Returns a QR Code representing the given Unicode text string at the given error correction level.\n // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer\n // Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible\n // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the\n // ecl argument if it can be done without increasing the version.\n QrCode.encodeText = function (text, ecl) {\n var segs = qrcodegen.QrSegment.makeSegments(text);\n return QrCode.encodeSegments(segs, ecl);\n };\n // Returns a QR Code representing the given binary data at the given error correction level.\n // This function always encodes using the binary segment mode, not any text mode. The maximum number of\n // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.\n // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.\n QrCode.encodeBinary = function (data, ecl) {\n var seg = qrcodegen.QrSegment.makeBytes(data);\n return QrCode.encodeSegments([seg], ecl);\n };\n /*-- Static factory functions (mid level) --*/\n // Returns a QR Code representing the given segments with the given encoding parameters.\n // The smallest possible QR Code version within the given range is automatically\n // chosen for the output. Iff boostEcl is true, then the ECC level of the result\n // may be higher than the ecl argument if it can be done without increasing the\n // version. The mask number is either between 0 to 7 (inclusive) to force that\n // mask, or -1 to automatically choose an appropriate mask (which may be slow).\n // This function allows the user to create a custom sequence of segments that switches\n // between modes (such as alphanumeric and byte) to encode text in less space.\n // This is a mid-level API; the high-level API is encodeText() and encodeBinary().\n QrCode.encodeSegments = function (segs, ecl, minVersion, maxVersion, mask, boostEcl) {\n if (minVersion === void 0) { minVersion = 1; }\n if (maxVersion === void 0) { maxVersion = 40; }\n if (mask === void 0) { mask = -1; }\n if (boostEcl === void 0) { boostEcl = true; }\n if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION)\n || mask < -1 || mask > 7)\n throw new RangeError(\"Invalid value\");\n // Find the minimal version number to use\n var version;\n var dataUsedBits;\n for (version = minVersion;; version++) {\n var dataCapacityBits_1 = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available\n var usedBits = QrSegment.getTotalBits(segs, version);\n if (usedBits <= dataCapacityBits_1) {\n dataUsedBits = usedBits;\n break; // This version number is found to be suitable\n }\n if (version >= maxVersion) // All versions in the range could not fit the given data\n throw new RangeError(\"Data too long\");\n }\n // Increase the error correction level while the data still fits in the current version number\n for (var _i = 0, _a = [QrCode.Ecc.MEDIUM, QrCode.Ecc.QUARTILE, QrCode.Ecc.HIGH]; _i < _a.length; _i++) { // From low to high\n var newEcl = _a[_i];\n if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8)\n ecl = newEcl;\n }\n // Concatenate all segments to create the data bit string\n var bb = [];\n for (var _b = 0, segs_1 = segs; _b < segs_1.length; _b++) {\n var seg = segs_1[_b];\n appendBits(seg.mode.modeBits, 4, bb);\n appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);\n for (var _c = 0, _d = seg.getData(); _c < _d.length; _c++) {\n var b = _d[_c];\n bb.push(b);\n }\n }\n assert(bb.length == dataUsedBits);\n // Add terminator and pad up to a byte if applicable\n var dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;\n assert(bb.length <= dataCapacityBits);\n appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);\n appendBits(0, (8 - bb.length % 8) % 8, bb);\n assert(bb.length % 8 == 0);\n // Pad with alternating bytes until data capacity is reached\n for (var padByte = 0xEC; bb.length < dataCapacityBits; padByte ^= 0xEC ^ 0x11)\n appendBits(padByte, 8, bb);\n // Pack bits into bytes in big endian\n var dataCodewords = [];\n while (dataCodewords.length * 8 < bb.length)\n dataCodewords.push(0);\n bb.forEach(function (b, i) {\n return dataCodewords[i >>> 3] |= b << (7 - (i & 7));\n });\n // Create the QR Code object\n return new QrCode(version, ecl, dataCodewords, mask);\n };\n /*-- Accessor methods --*/\n // Returns the color of the module (pixel) at the given coordinates, which is false\n // for light or true for dark. The top left corner has the coordinates (x=0, y=0).\n // If the given coordinates are out of bounds, then false (light) is returned.\n QrCode.prototype.getModule = function (x, y) {\n return 0 <= x && x < this.size && 0 <= y && y < this.size && this.modules[y][x];\n };\n QrCode.prototype.getModules = function () {\n return this.modules;\n };\n /*-- Private helper methods for constructor: Drawing function modules --*/\n // Reads this object's version field, and draws and marks all function modules.\n QrCode.prototype.drawFunctionPatterns = function () {\n // Draw horizontal and vertical timing patterns\n for (var i = 0; i < this.size; i++) {\n this.setFunctionModule(6, i, i % 2 == 0);\n this.setFunctionModule(i, 6, i % 2 == 0);\n }\n // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)\n this.drawFinderPattern(3, 3);\n this.drawFinderPattern(this.size - 4, 3);\n this.drawFinderPattern(3, this.size - 4);\n // Draw numerous alignment patterns\n var alignPatPos = this.getAlignmentPatternPositions();\n var numAlign = alignPatPos.length;\n for (var i = 0; i < numAlign; i++) {\n for (var j = 0; j < numAlign; j++) {\n // Don't draw on the three finder corners\n if (!(i == 0 && j == 0 || i == 0 && j == numAlign - 1 || i == numAlign - 1 && j == 0))\n this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j]);\n }\n }\n // Draw configuration data\n this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor\n this.drawVersion();\n };\n // Draws two copies of the format bits (with its own error correction code)\n // based on the given mask and this object's error correction level field.\n QrCode.prototype.drawFormatBits = function (mask) {\n // Calculate error correction code and pack bits\n var data = this.errorCorrectionLevel.formatBits << 3 | mask; // errCorrLvl is uint2, mask is uint3\n var rem = data;\n for (var i = 0; i < 10; i++)\n rem = (rem << 1) ^ ((rem >>> 9) * 0x537);\n var bits = (data << 10 | rem) ^ 0x5412; // uint15\n assert(bits >>> 15 == 0);\n // Draw first copy\n for (var i = 0; i <= 5; i++)\n this.setFunctionModule(8, i, getBit(bits, i));\n this.setFunctionModule(8, 7, getBit(bits, 6));\n this.setFunctionModule(8, 8, getBit(bits, 7));\n this.setFunctionModule(7, 8, getBit(bits, 8));\n for (var i = 9; i < 15; i++)\n this.setFunctionModule(14 - i, 8, getBit(bits, i));\n // Draw second copy\n for (var i = 0; i < 8; i++)\n this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i));\n for (var i = 8; i < 15; i++)\n this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i));\n this.setFunctionModule(8, this.size - 8, true); // Always dark\n };\n // Draws two copies of the version bits (with its own error correction code),\n // based on this object's version field, iff 7 <= version <= 40.\n QrCode.prototype.drawVersion = function () {\n if (this.version < 7)\n return;\n // Calculate error correction code and pack bits\n var rem = this.version; // version is uint6, in the range [7, 40]\n for (var i = 0; i < 12; i++)\n rem = (rem << 1) ^ ((rem >>> 11) * 0x1F25);\n var bits = this.version << 12 | rem; // uint18\n assert(bits >>> 18 == 0);\n // Draw two copies\n for (var i = 0; i < 18; i++) {\n var color = getBit(bits, i);\n var a = this.size - 11 + i % 3;\n var b = Math.floor(i / 3);\n this.setFunctionModule(a, b, color);\n this.setFunctionModule(b, a, color);\n }\n };\n // Draws a 9*9 finder pattern including the border separator,\n // with the center module at (x, y). Modules can be out of bounds.\n QrCode.prototype.drawFinderPattern = function (x, y) {\n for (var dy = -4; dy <= 4; dy++) {\n for (var dx = -4; dx <= 4; dx++) {\n var dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm\n var xx = x + dx;\n var yy = y + dy;\n if (0 <= xx && xx < this.size && 0 <= yy && yy < this.size)\n this.setFunctionModule(xx, yy, dist != 2 && dist != 4);\n }\n }\n };\n // Draws a 5*5 alignment pattern, with the center module\n // at (x, y). All modules must be in bounds.\n QrCode.prototype.drawAlignmentPattern = function (x, y) {\n for (var dy = -2; dy <= 2; dy++) {\n for (var dx = -2; dx <= 2; dx++)\n this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);\n }\n };\n // Sets the color of a module and marks it as a function module.\n // Only used by the constructor. Coordinates must be in bounds.\n QrCode.prototype.setFunctionModule = function (x, y, isDark) {\n this.modules[y][x] = isDark;\n this.isFunction[y][x] = true;\n };\n /*-- Private helper methods for constructor: Codewords and masking --*/\n // Returns a new byte string representing the given data with the appropriate error correction\n // codewords appended to it, based on this object's version and error correction level.\n QrCode.prototype.addEccAndInterleave = function (data) {\n var ver = this.version;\n var ecl = this.errorCorrectionLevel;\n if (data.length != QrCode.getNumDataCodewords(ver, ecl))\n throw new RangeError(\"Invalid argument\");\n // Calculate parameter numbers\n var numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n var blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];\n var rawCodewords = Math.floor(QrCode.getNumRawDataModules(ver) / 8);\n var numShortBlocks = numBlocks - rawCodewords % numBlocks;\n var shortBlockLen = Math.floor(rawCodewords / numBlocks);\n // Split data into blocks and append ECC to each block\n var blocks = [];\n var rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);\n for (var i = 0, k = 0; i < numBlocks; i++) {\n var dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));\n k += dat.length;\n var ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);\n if (i < numShortBlocks)\n dat.push(0);\n blocks.push(dat.concat(ecc));\n }\n // Interleave (not concatenate) the bytes from every block into a single sequence\n var result = [];\n var _loop_1 = function (i) {\n blocks.forEach(function (block, j) {\n // Skip the padding byte in short blocks\n if (i != shortBlockLen - blockEccLen || j >= numShortBlocks)\n result.push(block[i]);\n });\n };\n for (var i = 0; i < blocks[0].length; i++) {\n _loop_1(i);\n }\n assert(result.length == rawCodewords);\n return result;\n };\n // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire\n // data area of this QR Code. Function modules need to be marked off before this is called.\n QrCode.prototype.drawCodewords = function (data) {\n if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8))\n throw new RangeError(\"Invalid argument\");\n var i = 0; // Bit index into the data\n // Do the funny zigzag scan\n for (var right = this.size - 1; right >= 1; right -= 2) { // Index of right column in each column pair\n if (right == 6)\n right = 5;\n for (var vert = 0; vert < this.size; vert++) { // Vertical counter\n for (var j = 0; j < 2; j++) {\n var x = right - j; // Actual x coordinate\n var upward = ((right + 1) & 2) == 0;\n var y = upward ? this.size - 1 - vert : vert; // Actual y coordinate\n if (!this.isFunction[y][x] && i < data.length * 8) {\n this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));\n i++;\n }\n // If this QR Code has any remainder bits (0 to 7), they were assigned as\n // 0/false/light by the constructor and are left unchanged by this method\n }\n }\n }\n assert(i == data.length * 8);\n };\n // XORs the codeword modules in this QR Code with the given mask pattern.\n // The function modules must be marked and the codeword bits must be drawn\n // before masking. Due to the arithmetic of XOR, calling applyMask() with\n // the same mask value a second time will undo the mask. A final well-formed\n // QR Code needs exactly one (not zero, two, etc.) mask applied.\n QrCode.prototype.applyMask = function (mask) {\n if (mask < 0 || mask > 7)\n throw new RangeError(\"Mask value out of range\");\n for (var y = 0; y < this.size; y++) {\n for (var x = 0; x < this.size; x++) {\n var invert = void 0;\n switch (mask) {\n case 0:\n invert = (x + y) % 2 == 0;\n break;\n case 1:\n invert = y % 2 == 0;\n break;\n case 2:\n invert = x % 3 == 0;\n break;\n case 3:\n invert = (x + y) % 3 == 0;\n break;\n case 4:\n invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;\n break;\n case 5:\n invert = x * y % 2 + x * y % 3 == 0;\n break;\n case 6:\n invert = (x * y % 2 + x * y % 3) % 2 == 0;\n break;\n case 7:\n invert = ((x + y) % 2 + x * y % 3) % 2 == 0;\n break;\n default: throw new Error(\"Unreachable\");\n }\n if (!this.isFunction[y][x] && invert)\n this.modules[y][x] = !this.modules[y][x];\n }\n }\n };\n // Calculates and returns the penalty score based on state of this QR Code's current modules.\n // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.\n QrCode.prototype.getPenaltyScore = function () {\n var result = 0;\n // Adjacent modules in row having same color, and finder-like patterns\n for (var y = 0; y < this.size; y++) {\n var runColor = false;\n var runX = 0;\n var runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (var x = 0; x < this.size; x++) {\n if (this.modules[y][x] == runColor) {\n runX++;\n if (runX == 5)\n result += QrCode.PENALTY_N1;\n else if (runX > 5)\n result++;\n }\n else {\n this.finderPenaltyAddHistory(runX, runHistory);\n if (!runColor)\n result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runX = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;\n }\n // Adjacent modules in column having same color, and finder-like patterns\n for (var x = 0; x < this.size; x++) {\n var runColor = false;\n var runY = 0;\n var runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (var y = 0; y < this.size; y++) {\n if (this.modules[y][x] == runColor) {\n runY++;\n if (runY == 5)\n result += QrCode.PENALTY_N1;\n else if (runY > 5)\n result++;\n }\n else {\n this.finderPenaltyAddHistory(runY, runHistory);\n if (!runColor)\n result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runY = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * QrCode.PENALTY_N3;\n }\n // 2*2 blocks of modules having same color\n for (var y = 0; y < this.size - 1; y++) {\n for (var x = 0; x < this.size - 1; x++) {\n var color = this.modules[y][x];\n if (color == this.modules[y][x + 1] &&\n color == this.modules[y + 1][x] &&\n color == this.modules[y + 1][x + 1])\n result += QrCode.PENALTY_N2;\n }\n }\n // Balance of dark and light modules\n var dark = 0;\n for (var _i = 0, _a = this.modules; _i < _a.length; _i++) {\n var row = _a[_i];\n dark = row.reduce(function (sum, color) { return sum + (color ? 1 : 0); }, dark);\n }\n var total = this.size * this.size; // Note that size is odd, so dark/total != 1/2\n // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%\n var k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;\n assert(0 <= k && k <= 9);\n result += k * QrCode.PENALTY_N4;\n assert(0 <= result && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4\n return result;\n };\n /*-- Private helper functions --*/\n // Returns an ascending list of positions of alignment patterns for this version number.\n // Each position is in the range [0,177), and are used on both the x and y axes.\n // This could be implemented as lookup table of 40 variable-length lists of integers.\n QrCode.prototype.getAlignmentPatternPositions = function () {\n if (this.version == 1)\n return [];\n else {\n var numAlign = Math.floor(this.version / 7) + 2;\n var step = (this.version == 32) ? 26 :\n Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;\n var result = [6];\n for (var pos = this.size - 7; result.length < numAlign; pos -= step)\n result.splice(1, 0, pos);\n return result;\n }\n };\n // Returns the number of data bits that can be stored in a QR Code of the given version number, after\n // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.\n // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.\n QrCode.getNumRawDataModules = function (ver) {\n if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION)\n throw new RangeError(\"Version number out of range\");\n var result = (16 * ver + 128) * ver + 64;\n if (ver >= 2) {\n var numAlign = Math.floor(ver / 7) + 2;\n result -= (25 * numAlign - 10) * numAlign - 55;\n if (ver >= 7)\n result -= 36;\n }\n assert(208 <= result && result <= 29648);\n return result;\n };\n // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any\n // QR Code of the given version number and error correction level, with remainder bits discarded.\n // This stateless pure function could be implemented as a (40*4)-cell lookup table.\n QrCode.getNumDataCodewords = function (ver, ecl) {\n return Math.floor(QrCode.getNumRawDataModules(ver) / 8) -\n QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] *\n QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n };\n // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be\n // implemented as a lookup table over all possible parameter values, instead of as an algorithm.\n QrCode.reedSolomonComputeDivisor = function (degree) {\n if (degree < 1 || degree > 255)\n throw new RangeError(\"Degree out of range\");\n // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.\n // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93].\n var result = [];\n for (var i = 0; i < degree - 1; i++)\n result.push(0);\n result.push(1); // Start off with the monomial x^0\n // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),\n // and drop the highest monomial term which is always 1x^degree.\n // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).\n var root = 1;\n for (var i = 0; i < degree; i++) {\n // Multiply the current product by (x - r^i)\n for (var j = 0; j < result.length; j++) {\n result[j] = QrCode.reedSolomonMultiply(result[j], root);\n if (j + 1 < result.length)\n result[j] ^= result[j + 1];\n }\n root = QrCode.reedSolomonMultiply(root, 0x02);\n }\n return result;\n };\n // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.\n QrCode.reedSolomonComputeRemainder = function (data, divisor) {\n var result = divisor.map(function (_) { return 0; });\n var _loop_2 = function (b) {\n var factor = b ^ result.shift();\n result.push(0);\n divisor.forEach(function (coef, i) {\n return result[i] ^= QrCode.reedSolomonMultiply(coef, factor);\n });\n };\n for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {\n var b = data_1[_i];\n _loop_2(b);\n }\n return result;\n };\n // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result\n // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.\n QrCode.reedSolomonMultiply = function (x, y) {\n if (x >>> 8 != 0 || y >>> 8 != 0)\n throw new RangeError(\"Byte out of range\");\n // Russian peasant multiplication\n var z = 0;\n for (var i = 7; i >= 0; i--) {\n z = (z << 1) ^ ((z >>> 7) * 0x11D);\n z ^= ((y >>> i) & 1) * x;\n }\n assert(z >>> 8 == 0);\n return z;\n };\n // Can only be called immediately after a light run is added, and\n // returns either 0, 1, or 2. A helper function for getPenaltyScore().\n QrCode.prototype.finderPenaltyCountPatterns = function (runHistory) {\n var n = runHistory[1];\n assert(n <= this.size * 3);\n var core = n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;\n return (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0)\n + (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0);\n };\n // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().\n QrCode.prototype.finderPenaltyTerminateAndCount = function (currentRunColor, currentRunLength, runHistory) {\n if (currentRunColor) { // Terminate dark run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n currentRunLength = 0;\n }\n currentRunLength += this.size; // Add light border to final run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n return this.finderPenaltyCountPatterns(runHistory);\n };\n // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().\n QrCode.prototype.finderPenaltyAddHistory = function (currentRunLength, runHistory) {\n if (runHistory[0] == 0)\n currentRunLength += this.size; // Add light border to initial run\n runHistory.pop();\n runHistory.unshift(currentRunLength);\n };\n /*-- Constants and tables --*/\n // The minimum version number supported in the QR Code Model 2 standard.\n QrCode.MIN_VERSION = 1;\n // The maximum version number supported in the QR Code Model 2 standard.\n QrCode.MAX_VERSION = 40;\n // For use in getPenaltyScore(), when evaluating which mask is best.\n QrCode.PENALTY_N1 = 3;\n QrCode.PENALTY_N2 = 3;\n QrCode.PENALTY_N3 = 40;\n QrCode.PENALTY_N4 = 10;\n QrCode.ECC_CODEWORDS_PER_BLOCK = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],\n [-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n [-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], // High\n ];\n QrCode.NUM_ERROR_CORRECTION_BLOCKS = [\n // Version: (note that index 0 is for padding, and is set to an illegal value)\n //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n [-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],\n [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],\n [-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68],\n [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81], // High\n ];\n return QrCode;\n }());\n qrcodegen.QrCode = QrCode;\n // Appends the given number of low-order bits of the given value\n // to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.\n function appendBits(val, len, bb) {\n if (len < 0 || len > 31 || val >>> len != 0)\n throw new RangeError(\"Value out of range\");\n for (var i = len - 1; i >= 0; i--) // Append bit by bit\n bb.push((val >>> i) & 1);\n }\n // Returns true iff the i'th bit of x is set to 1.\n function getBit(x, i) {\n return ((x >>> i) & 1) != 0;\n }\n // Throws an exception if the given condition is false.\n function assert(cond) {\n if (!cond)\n throw new Error(\"Assertion error\");\n }\n /*---- Data segment class ----*/\n /*\n * A segment of character/binary/control data in a QR Code symbol.\n * Instances of this class are immutable.\n * The mid-level way to create a segment is to take the payload data\n * and call a static factory function such as QrSegment.makeNumeric().\n * The low-level way to create a segment is to custom-make the bit buffer\n * and call the QrSegment() constructor with appropriate values.\n * This segment class imposes no length restrictions, but QR Codes have restrictions.\n * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.\n * Any segment longer than this is meaningless for the purpose of generating QR Codes.\n */\n var QrSegment = /** @class */ (function () {\n /*-- Constructor (low level) and fields --*/\n // Creates a new QR Code segment with the given attributes and data.\n // The character count (numChars) must agree with the mode and the bit buffer length,\n // but the constraint isn't checked. The given bit buffer is cloned and stored.\n function QrSegment(\n // The mode indicator of this segment.\n mode, \n // The length of this segment's unencoded data. Measured in characters for\n // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.\n // Always zero or positive. Not the same as the data's bit length.\n numChars, \n // The data bits of this segment. Accessed through getData().\n bitData) {\n this.mode = mode;\n this.numChars = numChars;\n this.bitData = bitData;\n if (numChars < 0)\n throw new RangeError(\"Invalid argument\");\n this.bitData = bitData.slice(); // Make defensive copy\n }\n /*-- Static factory functions (mid level) --*/\n // Returns a segment representing the given binary data encoded in\n // byte mode. All input byte arrays are acceptable. Any text string\n // can be converted to UTF-8 bytes and encoded as a byte mode segment.\n QrSegment.makeBytes = function (data) {\n var bb = [];\n for (var _i = 0, data_2 = data; _i < data_2.length; _i++) {\n var b = data_2[_i];\n appendBits(b, 8, bb);\n }\n return new QrSegment(QrSegment.Mode.BYTE, data.length, bb);\n };\n // Returns a segment representing the given string of decimal digits encoded in numeric mode.\n QrSegment.makeNumeric = function (digits) {\n if (!QrSegment.isNumeric(digits))\n throw new RangeError(\"String contains non-numeric characters\");\n var bb = [];\n for (var i = 0; i < digits.length;) { // Consume up to 3 digits per iteration\n var n = Math.min(digits.length - i, 3);\n appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);\n i += n;\n }\n return new QrSegment(QrSegment.Mode.NUMERIC, digits.length, bb);\n };\n // Returns a segment representing the given text string encoded in alphanumeric mode.\n // The characters allowed are: 0 to 9, A to Z (uppercase only), space,\n // dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n QrSegment.makeAlphanumeric = function (text) {\n if (!QrSegment.isAlphanumeric(text))\n throw new RangeError(\"String contains unencodable characters in alphanumeric mode\");\n var bb = [];\n var i;\n for (i = 0; i + 2 <= text.length; i += 2) { // Process groups of 2\n var temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;\n temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));\n appendBits(temp, 11, bb);\n }\n if (i < text.length) // 1 character remaining\n appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);\n return new QrSegment(QrSegment.Mode.ALPHANUMERIC, text.length, bb);\n };\n // Returns a new mutable list of zero or more segments to represent the given Unicode text string.\n // The result may use various segment modes and switch modes to optimize the length of the bit stream.\n QrSegment.makeSegments = function (text) {\n // Select the most efficient segment encoding automatically\n if (text == \"\")\n return [];\n else if (QrSegment.isNumeric(text))\n return [QrSegment.makeNumeric(text)];\n else if (QrSegment.isAlphanumeric(text))\n return [QrSegment.makeAlphanumeric(text)];\n else\n return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];\n };\n // Returns a segment representing an Extended Channel Interpretation\n // (ECI) designator with the given assignment value.\n QrSegment.makeEci = function (assignVal) {\n var bb = [];\n if (assignVal < 0)\n throw new RangeError(\"ECI assignment value out of range\");\n else if (assignVal < (1 << 7))\n appendBits(assignVal, 8, bb);\n else if (assignVal < (1 << 14)) {\n appendBits(2, 2, bb);\n appendBits(assignVal, 14, bb);\n }\n else if (assignVal < 1000000) {\n appendBits(6, 3, bb);\n appendBits(assignVal, 21, bb);\n }\n else\n throw new RangeError(\"ECI assignment value out of range\");\n return new QrSegment(QrSegment.Mode.ECI, 0, bb);\n };\n // Tests whether the given string can be encoded as a segment in numeric mode.\n // A string is encodable iff each character is in the range 0 to 9.\n QrSegment.isNumeric = function (text) {\n return QrSegment.NUMERIC_REGEX.test(text);\n };\n // Tests whether the given string can be encoded as a segment in alphanumeric mode.\n // A string is encodable iff each character is in the following set: 0 to 9, A to Z\n // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n QrSegment.isAlphanumeric = function (text) {\n return QrSegment.ALPHANUMERIC_REGEX.test(text);\n };\n /*-- Methods --*/\n // Returns a new copy of the data bits of this segment.\n QrSegment.prototype.getData = function () {\n return this.bitData.slice(); // Make defensive copy\n };\n // (Package-private) Calculates and returns the number of bits needed to encode the given segments at\n // the given version. The result is infinity if a segment has too many characters to fit its length field.\n QrSegment.getTotalBits = function (segs, version) {\n var result = 0;\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var ccbits = seg.mode.numCharCountBits(version);\n if (seg.numChars >= (1 << ccbits))\n return Infinity; // The segment's length doesn't fit the field's bit width\n result += 4 + ccbits + seg.bitData.length;\n }\n return result;\n };\n // Returns a new array of bytes representing the given string encoded in UTF-8.\n QrSegment.toUtf8ByteArray = function (str) {\n str = encodeURI(str);\n var result = [];\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) != \"%\")\n result.push(str.charCodeAt(i));\n else {\n result.push(parseInt(str.substring(i + 1, i + 3), 16));\n i += 2;\n }\n }\n return result;\n };\n /*-- Constants --*/\n // Describes precisely all strings that are encodable in numeric mode.\n QrSegment.NUMERIC_REGEX = /^[0-9]*$/;\n // Describes precisely all strings that are encodable in alphanumeric mode.\n QrSegment.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\\/:-]*$/;\n // The set of all legal characters in alphanumeric mode,\n // where each character value maps to the index in the string.\n QrSegment.ALPHANUMERIC_CHARSET = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:\";\n return QrSegment;\n }());\n qrcodegen.QrSegment = QrSegment;\n })(qrcodegen || (qrcodegen = {}));\n /*---- Public helper enumeration ----*/\n (function (qrcodegen) {\n (function (QrCode) {\n /*\n * The error correction level in a QR Code symbol. Immutable.\n */\n var Ecc = /** @class */ (function () {\n /*-- Constructor and fields --*/\n function Ecc(\n // In the range 0 to 3 (unsigned 2-bit integer).\n ordinal, \n // (Package-private) In the range 0 to 3 (unsigned 2-bit integer).\n formatBits) {\n this.ordinal = ordinal;\n this.formatBits = formatBits;\n }\n /*-- Constants --*/\n Ecc.LOW = new Ecc(0, 1); // The QR Code can tolerate about 7% erroneous codewords\n Ecc.MEDIUM = new Ecc(1, 0); // The QR Code can tolerate about 15% erroneous codewords\n Ecc.QUARTILE = new Ecc(2, 3); // The QR Code can tolerate about 25% erroneous codewords\n Ecc.HIGH = new Ecc(3, 2); // The QR Code can tolerate about 30% erroneous codewords\n return Ecc;\n }());\n QrCode.Ecc = Ecc;\n })(qrcodegen.QrCode || (qrcodegen.QrCode = {}));\n })(qrcodegen || (qrcodegen = {}));\n /*---- Public helper enumeration ----*/\n (function (qrcodegen) {\n (function (QrSegment) {\n /*\n * Describes how a segment's data bits are interpreted. Immutable.\n */\n var Mode = /** @class */ (function () {\n /*-- Constructor and fields --*/\n function Mode(\n // The mode indicator bits, which is a uint4 value (range 0 to 15).\n modeBits, \n // Number of character count bits for three different version ranges.\n numBitsCharCount) {\n this.modeBits = modeBits;\n this.numBitsCharCount = numBitsCharCount;\n }\n /*-- Method --*/\n // (Package-private) Returns the bit width of the character count field for a segment in\n // this mode in a QR Code at the given version number. The result is in the range [0, 16].\n Mode.prototype.numCharCountBits = function (ver) {\n return this.numBitsCharCount[Math.floor((ver + 7) / 17)];\n };\n /*-- Constants --*/\n Mode.NUMERIC = new Mode(0x1, [10, 12, 14]);\n Mode.ALPHANUMERIC = new Mode(0x2, [9, 11, 13]);\n Mode.BYTE = new Mode(0x4, [8, 16, 16]);\n Mode.KANJI = new Mode(0x8, [8, 10, 12]);\n Mode.ECI = new Mode(0x7, [0, 0, 0]);\n return Mode;\n }());\n QrSegment.Mode = Mode;\n })(qrcodegen.QrSegment || (qrcodegen.QrSegment = {}));\n })(qrcodegen || (qrcodegen = {}));\n var QR = qrcodegen;\n\n var defaultErrorCorrectLevel = 'H';\n var ErrorCorrectLevelMap = {\n L: QR.QrCode.Ecc.LOW,\n M: QR.QrCode.Ecc.MEDIUM,\n Q: QR.QrCode.Ecc.QUARTILE,\n H: QR.QrCode.Ecc.HIGH,\n };\n // Thanks the `qrcode.react`\n var SUPPORTS_PATH2D = (function () {\n try {\n new Path2D().addPath(new Path2D());\n }\n catch (e) {\n return false;\n }\n return true;\n })();\n function validErrorCorrectLevel(level) {\n return level in ErrorCorrectLevelMap;\n }\n function generatePath(modules, margin) {\n if (margin === void 0) { margin = 0; }\n var ops = [];\n modules.forEach(function (row, y) {\n var start = null;\n row.forEach(function (cell, x) {\n if (!cell && start !== null) {\n // M0 0h7v1H0z injects the space with the move and drops the comma,\n // saving a char per operation\n ops.push(\"M\".concat(start + margin, \" \").concat(y + margin, \"h\").concat(x - start, \"v1H\").concat(start + margin, \"z\"));\n start = null;\n return;\n }\n // end of row, clean up or skip\n if (x === row.length - 1) {\n if (!cell) {\n // We would have closed the op above already so this can only mean\n // 2+ light modules in a row.\n return;\n }\n if (start === null) {\n // Just a single dark module.\n ops.push(\"M\".concat(x + margin, \",\").concat(y + margin, \" h1v1H\").concat(x + margin, \"z\"));\n }\n else {\n // Otherwise finish the current line.\n ops.push(\"M\".concat(start + margin, \",\").concat(y + margin, \" h\").concat(x + 1 - start, \"v1H\").concat(start + margin, \"z\"));\n }\n return;\n }\n if (cell && start === null) {\n start = x;\n }\n });\n });\n return ops.join('');\n }\n var QRCodeProps = {\n value: {\n type: String,\n required: true,\n default: '',\n },\n size: {\n type: Number,\n default: 100,\n },\n level: {\n type: String,\n default: defaultErrorCorrectLevel,\n validator: function (l) { return validErrorCorrectLevel(l); },\n },\n background: {\n type: String,\n default: '#fff',\n },\n foreground: {\n type: String,\n default: '#000',\n },\n margin: {\n type: Number,\n required: false,\n default: 0,\n },\n };\n var QRCodeVueProps = __assign(__assign({}, QRCodeProps), { renderAs: {\n type: String,\n required: false,\n default: 'canvas',\n validator: function (as) { return ['canvas', 'svg'].indexOf(as) > -1; },\n } });\n var QRCodeSvg = vue.defineComponent({\n name: 'QRCodeSvg',\n props: QRCodeProps,\n setup: function (props) {\n var numCells = vue.ref(0);\n var fgPath = vue.ref('');\n var generate = function () {\n var value = props.value, level = props.level, margin = props.margin;\n var cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules();\n numCells.value = cells.length + margin * 2;\n // Drawing strategy: instead of a rect per module, we're going to create a\n // single path for the dark modules and layer that on top of a light rect,\n // for a total of 2 DOM nodes. We pay a bit more in string concat but that's\n // way faster than DOM ops.\n // For level 1, 441 nodes -> 2\n // For level 40, 31329 -> 2\n fgPath.value = generatePath(cells, margin);\n };\n generate();\n vue.onUpdated(generate);\n return function () { return vue.h('svg', {\n width: props.size,\n height: props.size,\n 'shape-rendering': \"crispEdges\",\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: \"0 0 \".concat(numCells.value, \" \").concat(numCells.value),\n }, [\n vue.h('path', {\n fill: props.background,\n d: \"M0,0 h\".concat(numCells.value, \"v\").concat(numCells.value, \"H0z\"),\n }),\n vue.h('path', { fill: props.foreground, d: fgPath.value }),\n ]); };\n },\n });\n var QRCodeCanvas = vue.defineComponent({\n name: 'QRCodeCanvas',\n props: QRCodeProps,\n setup: function (props) {\n var canvasEl = vue.ref(null);\n var generate = function () {\n var value = props.value, level = props.level, size = props.size, margin = props.margin, background = props.background, foreground = props.foreground;\n var canvas = canvasEl.value;\n if (!canvas) {\n return;\n }\n var ctx = canvas.getContext('2d');\n if (!ctx) {\n return;\n }\n var cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules();\n var numCells = cells.length + margin * 2;\n var devicePixelRatio = window.devicePixelRatio || 1;\n var scale = (size / numCells) * devicePixelRatio;\n canvas.height = canvas.width = size * devicePixelRatio;\n ctx.scale(scale, scale);\n ctx.fillStyle = background;\n ctx.fillRect(0, 0, numCells, numCells);\n ctx.fillStyle = foreground;\n if (SUPPORTS_PATH2D) {\n ctx.fill(new Path2D(generatePath(cells, margin)));\n }\n else {\n cells.forEach(function (row, rdx) {\n row.forEach(function (cell, cdx) {\n if (cell) {\n ctx.fillRect(cdx + margin, rdx + margin, 1, 1);\n }\n });\n });\n }\n };\n vue.onMounted(generate);\n vue.onUpdated(generate);\n return function () { return vue.h('canvas', {\n ref: canvasEl,\n style: { width: \"\".concat(props.size, \"px\"), height: \"\".concat(props.size, \"px\") },\n }); };\n },\n });\n var QrcodeVue = vue.defineComponent({\n name: 'Qrcode',\n render: function () {\n var _a = this.$props, renderAs = _a.renderAs, value = _a.value, _size = _a.size, _margin = _a.margin, _level = _a.level, background = _a.background, foreground = _a.foreground;\n var size = _size >>> 0;\n var margin = _margin >>> 0;\n var level = validErrorCorrectLevel(_level) ? _level : defaultErrorCorrectLevel;\n return vue.h(renderAs === 'svg' ? QRCodeSvg : QRCodeCanvas, { value: value, size: size, margin: margin, level: level, background: background, foreground: foreground });\n },\n props: QRCodeVueProps,\n });\n\n return QrcodeVue;\n\n}));\n","'use strict';\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\nvar $TypeError = TypeError;\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = lengthOfArrayLike(O);\n aCallable(callbackfn);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw new $TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n"],"sourceRoot":""}