vue-composable
Advanced tools
Comparing version 1.0.0-beta.19 to 1.0.0-beta.20
@@ -1,1 +0,1 @@ | ||
var vueComposable=function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=o(n);function a(e){return t.isRef(e)?e.value:e}function s(e){return t.isRef(e)?e:t.ref(e)}const u=Array.isArray,l=e=>"function"==typeof e,i=e=>"string"==typeof e,c=e=>"boolean"==typeof e,v=e=>f(e)&&l(e.getTime),d=e=>"number"==typeof e,f=e=>null!==e&&"object"==typeof e,m=e=>f(e)&&!!e.tagName;function p(e){return f(e)&&l(e.then)&&l(e.catch)}const g=()=>{},h=()=>!1,y={passive:!0};function w(e){return new Promise((t=>{setTimeout(t,e)}))}const b=2**32-2;function E(e,t,n){return e<t?t:e>n?n:e}const S="undefined"!=typeof window;function C(e,...t){for(let n=0;n<t.length;n++){const o=t[n];if(void 0===o||!f(o))continue;const r=Object.keys(o);for(let t=0;t<r.length;t++){const n=r[t],s=a(o[n]),u=typeof s,l=typeof e[n];void 0!==e[n]&&u!==l||(e[n]=f(s)?C(e[n]||{},s):o[n])}}return e}const I=t.set;function $(e){return t.computed((()=>a(e)))}function M(e,n,o,r){let a=g;if(e){const u=s(e),l=e=>e.removeEventListener(n,o),i=e=>e.addEventListener(n,o,r),c=t.watch(u,((e,t,n)=>{e&&(i(e),n((()=>l(e))))}),{immediate:!0});a=()=>{l(u.value),c()}}return a}function k(e,t,n){return T(e,t,n)}function T(e,t=50,n={isImmediate:!1}){let o;return function(...r){const a=this,s=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(a,r)}),t),s&&e.apply(a,r)}}function R(e,n,o){const r=t.ref(0),a=t.ref(0),s=t.ref(0),u=t.ref(0);let l=e=>{r.value=e.x,a.value=e.y,s.value=e.pageX,u.value=e.pageY};const[i,c]=d(n)?[void 0,n]:[n,o];c&&(l=k(l,o));const v=M(e,"mousemove",l,i);return{mouseX:r,mouseY:a,pageX:s,pageY:u,remove:v}}const L=["scrollBy","scrollTo","scrollIntoView"];const x=["mousedown","touchstart"];function O(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[o,r]=c(n)?[n,!1]:f(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),s=t.ref(null),u=t.ref(null),l=t.ref(),i=async(...t)=>{a.value=!0,s.value=null;const n=t&&e.length!==t.length&&t.length>0&&c(t[t.length-1])?t[t.length-1]:r,o=l.value=e(...t);try{const e=await o;return l.value===o&&(u.value=e),e}catch(e){return l.value===o&&(s.value=e,u.value=null),n?o:void 0}finally{l.value===o&&(a.value=!1)}};return o||i(),{exec:i,result:u,promise:l,loading:a,error:s}}function P(e,n){const o=t.ref(!1);let r;const a=O(((...t)=>{return n=e(...t),new Promise(((e,t)=>{o.value=!1,r=e=>{o.value=!0,t(e)},n.then(e).catch(t)}));var n}),n);return!t.getCurrentInstance()||f(n)&&!1===n.unmountCancel||t.onUnmounted((()=>r&&r())),{...a,cancel:e=>{r&&r(e)},cancelled:o}}const j=Symbol(""),D=Symbol(""),A=async(e,t,n,o)=>{const r=t[j].value;let a=-1;const s=e.maxRetries||9001,u=e.retryDelay||U;let l;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;do{let e=!1,i=null;try{if(++a,i=o?n(...o):n(),p(i)&&(i=await i),t[D].value)return null;e=!0}catch(e){i=null,t.retryErrors.value.push(e)}if(r!==t[j].value)return i;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,i;if(a>=s)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error(`[useRetry] max retries reached ${s}`));t.isRetrying.value=!0;const c=Date.now(),f=u(a),m=p(f)?await f:f;if(!p(f)||m){if(d(m))l=m;else{if(!v(m))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof m}'`);l=m.getTime()}l<c?t.nextRetry.value=c+l:(t.nextRetry.value=l,l-=c),l>0&&await w(l)}if(t[D].value)return null;if(r!==t[j].value)return i}while(a<9e3);return null};const U=()=>0;const F=Symbol("");function V(e,t){l(e.provide)?e.provide(F,t):console.warn("[vue-composable] devtools is not supported for vue 2")}function N(){const e={},n=t.inject(F,e);if(n!==e)return n;console.warn("[vue-composable] devtools not found, please run app.use(VueComposableDevtools)")}let _;_=e=>{const t=[],n=[];let o;function r(e,t){o?o[e](...t):n.push({type:e,args:t})}e.then((e=>{o=e,async function(e,t,n){setTimeout((async()=>{const o=["addTimelineLayer","addInspector","sendInspectorTree","sendInspectorState","addTimelineEvent"];for(const t of o){for(const o of n.filter((e=>e.type===t)))e[t](...o.args);await w(20)}new Set(n.filter((e=>"notifyComponentUpdate"===e.type)).map((e=>e.args[0]))).forEach((t=>e.notifyComponentUpdate(t))),t.forEach((t=>e.on[t.type](...t.args))),t.length=0,n.length=0}),100)}(o,t,n)}));return{notifyComponentUpdate(e){r("notifyComponentUpdate",arguments)},addTimelineLayer(e){r("addTimelineLayer",arguments)},addTimelineEvent(e){r("addTimelineEvent",arguments)},addInspector(e){r("addInspector",arguments)},sendInspectorTree(e){r("sendInspectorTree",arguments)},sendInspectorState(e){r("sendInspectorState",arguments)},getComponentBounds(e){r("getComponentBounds",arguments)},getComponentName(e){r("getComponentName",arguments)},on:{transformCall(e){o?o.on.transformCall(e):t.push({type:"transformCall",args:arguments})},getAppRecordName(e){o?o.on.getAppRecordName(e):t.push({type:"getAppRecordName",args:arguments})},getAppRootInstance(e){o?o.on.getAppRootInstance(e):t.push({type:"getAppRootInstance",args:arguments})},registerApplication(e){o?o.on.registerApplication(e):t.push({type:"registerApplication",args:arguments})},walkComponentTree(e){o?o.on.walkComponentTree(e):t.push({type:"walkComponentTree",args:arguments})},visitComponentTree(e){o?o.on.visitComponentTree(e):t.push({type:"visitComponentTree",args:arguments})},walkComponentParents(e){o?o.on.walkComponentParents(e):t.push({type:"walkComponentParents",args:arguments})},inspectComponent(e){o?o.on.inspectComponent(e):t.push({type:"inspectComponent",args:arguments})},getComponentBounds(e){o?o.on.getComponentBounds(e):t.push({type:"getComponentBounds",args:arguments})},getComponentName(e){o?o.on.getComponentName(e):t.push({type:"getComponentName",args:arguments})},getElementComponent(e){o?o.on.getElementComponent(e):t.push({type:"getElementComponent",args:arguments})},getComponentRootElements(e){o?o.on.getComponentRootElements(e):t.push({type:"getComponentRootElements",args:arguments})},editComponentState(e){o?o.on.editComponentState(e):t.push({type:"editComponentState",args:arguments})},inspectTimelineEvent(e){o?o.on.inspectTimelineEvent(e):t.push({type:"inspectTimelineEvent",args:arguments})},getInspectorTree(e){o?o.on.getInspectorTree(e):t.push({type:"getInspectorTree",args:arguments})},getInspectorState(e){o?o.on.getInspectorState(e):t.push({type:"getInspectorState",args:arguments})},editInspectorState(e){o?o.on.editInspectorState(e):t.push({type:"editInspectorState",args:arguments})}}}};var W=_;const B=(e,t="vue-composable",n="Vue-composable devtools plugin")=>{const o=new Promise((e=>{}));V(e,W(o))},z={install:(e,t={id:"vue-composable",label:"Vue-composable devtools plugin"})=>B(e,t.id,t.label)};function H(e){if(!e)return{};const t=!!e.__v_isRef,n=t&&!!e.effect,o=!!e.__v_reactive,r=n?"Computed":t?"Ref":o?"Reactive":null;return{...r?{objectType:r}:{},...e.effect?{raw:e.effect.raw.toString()}:{}}}function K(e){return e&&(c(e.isJson)||c(e.parseImmediate)||c(e.unmountCancel))}let q,X,Y,J,Q;function G(e,n){const o=S&&"BroadcastChannel"in self,r=t.ref(null),a=t.ref(null),s=t.ref(null),u=t.ref(!1),l=t.ref(!1);let i=g,c=g,v=g;if(o){const o=new BroadcastChannel(e);o.addEventListener("messageerror",(e=>{s.value=e,u.value=!0}),y),o.addEventListener("message",(e=>{a.value=e,r.value=e.data}),y),i=e=>o.postMessage(e),c=()=>{o.close(),l.value=!0},v=(e,n)=>{o.addEventListener("message",e,n),t.onUnmounted((()=>o.removeEventListener("message",e)))},t.onUnmounted((()=>{n&&n(),c()}))}return{supported:o,data:r,messageEvent:a,errorEvent:s,errored:u,isClosed:l,send:i,close:c,addListener:v}}function Z(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function ee(e,t,n){e.style.setProperty(t,n)}const te={attributes:!0,childList:!0,subtree:!0},ne=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?`--${e}`:e;const oe=e=>function(t){const n=t.data||[];return new Promise((t=>{try{Promise.resolve(e.apply(e,n)).then((e=>t(postMessage([!0,e])))).catch((e=>t(postMessage([!1,e]))))}catch(e){t(postMessage([!1,e]))}}))};function re(e){const n=!!S&&"matchMedia"in window;let o,r,a=g;if(n){o=t.ref(matchMedia(e)),r=t.ref(o.value.matches);const n=e=>{r.value=e.matches};o.value.addEventListener("change",n,y);const a=()=>o.value.removeEventListener("change",n);t.onUnmounted(a)}else o=t.ref({}),r=t.ref(!1);return{supported:n,mediaQueryList:o,matches:r,remove:a}}function ae(e,n){const{addListener:o,send:r,close:a,supported:s}=G(e,(()=>h())),u=Date.now(),l=t.ref(!1),i=t.ref(0),c=t.computed((()=>1!==i.value||l.value)),v=t.ref([]),d=t.ref(n);let m,p=!1;r({type:0});const g=()=>r({type:5,id:u}),h=()=>{0!==v.value.length&&(l.value&&r({type:3,mind:1,id:Math.min(...v.value)}),r({type:4,id:u}))};return o((e=>{switch(e.data.type){case 0:r({type:2,value:d.value,mind:i.value});break;case 4:{const t=v.value.indexOf(e.data.id);t>=0&&v.value.splice(t,1),m===e.data.id&&v.value.length>0&&r({type:3,mind:1,id:Math.min(u,...v.value)});break}case 2:p=!0,d.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,m=1===e.data.mind&&e.data.id||void 0,l.value=m===u,l.value&&(v.value=[],g());break;case 5:v.value=[e.data.id],r({type:6,id:u});break;case 6:v.value.push(e.data.id)}}),y),g(),t.watch(d,((e,t)=>{if(p)p=!1;else{if(1===i.value&&!1===l.value)return p=!0,void(d.value=t);r({type:2,mind:i.value,value:f(e)?{...e}:e}),p=!1}}),{deep:!0,immediate:!1}),S&&window.addEventListener("unload",h,y),t.onUnmounted((()=>{h(),a()})),{supported:s,id:u,data:d,master:l,mind:i,editable:c,targets:v,ping:g,setMind:e=>{switch(e){case 1:l.value=!0;break;case 0:l.value=!1}i.value=e,r({type:3,id:u,mind:i.value})},addListener:o}}const se="no-scroll";function ue(e,n){return t.inject(e,n,!0)}function le(e,n){const o=s(n),r=s(e);return f(o.value)||t.isRef(n)?[void 0!==r.value?r:void 0,o]:!f(r.value)||u(r.value)||i(r.value)?[r.value?r:void 0,void 0]:[void 0,r]}function ie(e,n){const[o,r]=le(e,n),s=t.computed((()=>new Intl.NumberFormat(a(o),a(r)))),u=(e,t,n)=>(t||n?new Intl.NumberFormat(a(n)||a(o),{...a(r),...a(t)}):s.value).format(a(e));return{format:(e,n,o)=>t.computed((()=>u(e,n,o))),formatString:u,formatter:s}}function ce(e){if(e)return d(e)?e:ve(e)}const ve=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function de(e){const n={},o=new Map,r=t.ref();let a=[];const s=[];for(const r in e){const u=e[r],l=ce(u);if(void 0!==l){const e=t.ref(!1);n[r]=e,o.set(l,{name:r,valid:e}),a.push(l)}else{const{matches:e,remove:t}=re(u);n[r]=e,s.push(t)}}a=a.sort(((e,t)=>t-e));const u=S?()=>{const e=window.innerWidth;let t;for(let n=0;n<a.length;n++){const r=a[n],s=o.get(r);s.valid.value=e>=r,e>=r&&void 0===t&&(t=s.name)}r.value=t}:g,l=k(u,10),i=S?()=>window.removeEventListener("resize",l):g;return S&&(t.onMounted((()=>{u(),window.addEventListener("resize",l,y)})),t.onUnmounted((()=>{i(),s.forEach((e=>e()))}))),{...n,remove:i,current:r}}const fe=Symbol(""),me={sm:640,md:768,lg:1024,xl:1280};function pe(e){return f(e)&&f(e.theme)&&f(e.theme.screens)}function ge(e){return!!f(e)&&(i(e.min)||i(e.max)||d(e.min)||d(e.max))}function he(e){return d(e)?e+"px":e}function ye(e){const t=[];if(u(e)){const n=e.map(ye);for(let e=0;e<n.length;e++){const o=n[e];t.push(...o)}}else f(n=e)&&i(n.raw)?t.push(e.raw):ge(e)?t.push(function(e){return ge(e)?`(${[e.max&&`max-width: ${he(e.max)}`,e.min&&`min-width: ${he(e.min)}`].filter(Boolean).join(" and ")})`:""}(e)):(i(e)||d(e))&&t.push(`(min-width: ${he(e)})`);var n;return t}function we(e){const n=pe(e)?e.theme.screens:e;if(pe(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];f(t)?n[e]=ye(n[e]).join(" or "):i(t)&&(t.endsWith("px")||(n[e]=ye(n[e]).join(" or ")))}const o=de(n);return t.provide(fe,o),o}function be(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function Ee(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return be(t,e)}}function Se(e,t){try{return e.parse(t)}catch{return t}}let Ce,Ie;function $e(e,n=JSON,o=10){const r=S?window[e]:void 0,u=Ee(r);Ce||(Ce=new Map,S&&window.addEventListener("storage",(e=>{if(e.newValue===e.oldValue)return;let t=Ce.get("localStorage");t=e.storageArea===window.localStorage?Ce.get("localStorage"):Ce.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))})));let l,c=Ce.get(e);return u&&r?c?l=c.$quotaError:(l=t.ref(!1),c={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:l,key:r.key,length:r.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},save(e,t){try{const o=r.getItem(e),a=i(t)?t:n.stringify(t);r.setItem(e,a),o!==a&&S&&c.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:a,oldValue:o,storageArea:r}))}catch(e){l.value=be(e,r)}},clear(){this.$refMap.forEach(((e,t)=>this.removeItem(t)))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),r.removeItem(e)},getItem(e){const t=r.getItem(e);return t?this.setItem(e,Se(n,t)):null},getRef(e){const u=t.ref();let l=t.watch(s(e),(e=>{const t=r.getItem(e);if(!t)return u.value=null;u.value=Se(n,t)}),{immediate:!0,flush:"sync"}),i=t.watch(u,T((t=>{this.save(a(e),t)}),o),{deep:!0,flush:"sync"});const c=Math.random().toString();return this.$watchHandlers.set(c,(()=>{l(),i()})),this.$refMap.set(c,u),u},setItem(e,n){const r=s(n);this.$refMap.set(e,r),this.save(e,n);const a=t.watch(r,T((t=>{this.save(e,t)}),o),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,a),r},updateItem(e,t){let o=this.$refMap.get(e);o&&(o.value=Se(n,t))}},Ce.set(e,c)):(l=t.ref(!1),c={}),{supported:u,quotaError:l,store:c,remove:()=>Ce.delete(e)}}function Me(e,n,o){const{supported:r,store:s}=$e("localStorage");let u,l=g,i=g,c=g;return r&&s?(c=t=>s.setSync(a(e),t),l=()=>s.removeItem(a(e)),i=()=>s.clear(),u=s.getRef(e),null==u.value&&(s.save(a(e),n),u.value=n),t.watchEffect((()=>{!1!==o&&c(!0)}))):u=t.ref(n),{supported:r,storage:u,clear:i,remove:l,setSync:c}}function ke(e,n,o){const{supported:r,store:s}=$e("sessionStorage");let u,l=g,i=g,c=h;return r&&s?(l=()=>s.removeItem(a(e)),i=()=>s.clear(),u=s.getRef(e),null==u.value&&(s.save(a(e),n),u.value=n)):u=t.ref(n),{supported:r,storage:u,clear:i,remove:l,setSync:c}}function Te(e){const n=s(e.currentPage),o=s(e.pageSize),r=t.ref(0),a=s(e.total),u=t.computed({get:()=>r.value,set(e){d(e)&&(r.value=Math.min(e,a.value))}}),l=t.computed({get:()=>n.value,set(e){d(e)&&(n.value=E(e,1,c.value),u.value=(n.value-1)*i.value)}}),i=t.computed({get:()=>o.value,set(e){d(e)&&(o.value=e)}}),c=t.computed((()=>Math.ceil(a.value/i.value)));l.value=n.value;return t.watch([a,i],(e=>{l.value>c.value&&(l.value=c.value)}),{immediate:!1}),{pageSize:i,total:a,currentPage:l,offset:u,lastPage:c,next:()=>++l.value,prev:()=>--l.value,first:()=>l.value=1,last:()=>l.value=c.value}}function Re(e){const n=1e3,o=e&&e.refreshMs||n,r=!e||!c(e.sync)||e.sync,a=e&&l(e.timeFn)&&e.timeFn||Date.now;let s,u;const i=t.ref(a()),v=()=>{clearInterval(s),clearTimeout(u)},d=S?()=>s=setInterval((()=>i.value=a()),o):g;if(r){const e=n-(i.value-Math.floor(i.value/n)*n);u=setTimeout(d,e)}else d();return t.onUnmounted(v),{now:i,remove:v}}function Le(e,n){return t.computed((()=>{const o=a(e);if(!n)return o;const r=t.isRef(n)?t.reactive(n.value):t.reactive(n);return o.replace(/({?{[\w\s]*}?})/g,(e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return`${t}`;const n=u(r)?r[+t]:r[t];return void 0===n?e:`${a(n)}`}))}))}function xe(e,n,o=".",r=g){return t.computed((()=>{const t=a(e),s=a(n);if(void 0===t)return r(s,t,s,t);if(!s)return t;const u=s.split(o);let l=t;for(let e=0;e<u.length;e++){let n=u[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let o=n,r=t.exec(o);if(r){let a=r[0].length,s=r.index-a,l=1;do{r.index,s=r.index,a=r[0].length,n=n.slice(0,-r[0].length),u.splice(e+l,0,r[1]),++l}while(r=t.exec(o));if(!n&&"["===o[0]&&o.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${o}"`)}if(!f(l))return r(u.slice(0,e+1).join(o),l,s,t);if(!n)return r(u.slice(0,e+1).join(o),l,s,t);if(l=l[n],!l)return r(u.slice(0,e+1).join(o),l,s,t)}return l}))}function Oe(e){return void 0!==e.$value}const Pe=(e,n,o)=>{const{$message:r,$validator:s,...u}=function(e){return f(e)}(n)?n:{$validator:n,$message:void 0},{$pending:l,$promise:i,$invalid:c,$error:v,$touch:d}=((e,n,o,r)=>{const s=t.ref(null),u=t.ref(!1),l=t.ref(),i=t.ref(!1);let c;const v=e=>{s.value=(async()=>{try{u.value=!0;const t=n(e,c);p(t)?i.value=!await t:i.value=!t,l.value=i.value?o.value||!0:void 0}catch(e){throw i.value=!0,e}finally{u.value=!1}})().catch((e=>(l.value=a(e),i.value=!0,e)))};return r.push((o=>{c=o,t.watch((()=>{try{n(e.value,c)}catch(e){}return e.value}),v,{deep:!0,immediate:!0})})),{$promise:s,$pending:u,$invalid:i,$error:l,$touch:function(){v(e.value)}}})(e,s,t.ref(r),o);return{$pending:l,$error:v,$promise:i,$invalid:c,$message:r,$touch:d,...u}},je=(e,n)=>{const o={},r=Oe(e)?s(e.$value):void 0;for(const s of Object.keys(e))if("$"!==s[0])if(r){const t=Pe(r,e[s],n);o[s]=t}else{const r=je(e[s],n);let u,l,i,v=g;if(Oe(r)){const e=Object.keys(r).filter((e=>"$"!==e[0])).map((e=>r[e]));l=t.computed((()=>e.map((e=>e.$error)).map((e=>a(e))).filter((e=>void 0!==e)))),i=t.computed((()=>e.some((e=>!!a(e.$invalid))))),v=()=>Object.keys(r).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=r[t].toObject(),e)),{})}else{const e=Object.keys(r).map((e=>r[e]));l=t.computed((()=>e.map((e=>a(e.$errors))).filter((e=>void 0!==e)).filter((e=>e.some(Boolean))))),u=t.computed((()=>e.some((e=>a(e.$anyDirty)||c(a(e.$dirty))&&a(e.$dirty))))),i=t.computed((()=>e.some((e=>!!a(e.$anyInvalid))))),v=()=>Object.keys(r).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=r[t].toObject(),e)),{})}if(o[s]={toObject:v,...r,$errors:l,$anyInvalid:i},u){o[s].$anyDirty=u;const e=Object.keys(o[s]).filter((e=>"$"!==e[0]&&f(o[s][e])));o[s].$touch=()=>{e.forEach((e=>{const t=o[s][e].$touch;t&&t()}))},o[s].$reset=()=>{e.forEach((e=>{const t=o[s][e].$reset;t&&t()}))}}}else{if("$value"===s){o[s]=r;const e=t.ref(!1),n=t.watch(r,(()=>{e.value=!0,n()}),{immediate:!1,deep:!0});o.$dirty=e,o.$reset=()=>e.value=!1,o.$touch=()=>e.value=!0,o.toObject=()=>a(r);continue}o[s]=e[s]}return o};const De=Symbol("");function Ae(e){const n=t.ref(Object.keys(e.messages)),o=t.ref(e.messages),u=t.ref(e.locale),i=t.ref({});let v=t.ref();const d={},f=e=>("__esModule"in e||"Module"===e[Symbol.toStringTag])&&"default"in e?e.default:e,m=(e,n)=>{if(d[e])return d[e];const o=n.value[e];if(!o)return t.ref({});let r=l(o)?o():o;return p(r)?r.then((t=>d[e]=s(f(t)))):l(o)?s(f(r)):d[e]=t.computed((()=>f(n.value[e])))},g=!!e.fallback&&(!c(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(g){const t=m(e.fallback,o);p(t)?(t.then((e=>{v.value=e.value})),h=!0):v.value=t.value}else v.value={};const y=t.ref(0);t.watch(o,(()=>y.value++),{deep:!0,immediate:!1}),t.watch([u,v,y],(([t,n,r])=>{if(t===e.fallback&&g)i.value=n;else{const e=e=>i.value=C({},n,a(e)),r=m(t,o);p(r)?r.then(e):e(r)}}),{immediate:!h});const w=(t,n)=>e.resolve?s(e.resolve(i.value,t,n)):Le(xe(i,t,".",((e,t,n,o)=>n)),n);return{locale:u,locales:n,i18n:i,$t:w,$ts:(e,t)=>w(e,t).value,addLocale:(e,t)=>{n.value.indexOf(e)>=0||n.value.push(e),delete d[e],I(o.value,e,t)},removeLocale:t=>{const a=n.value.indexOf(t);if(a>=0){const o=[u.value,v.value&&e.fallback,...n.value].find((e=>e&&e!==t));o&&(t===e.fallback&&(v.value=void 0),t===u.value&&(u.value=o)),n.value.splice(a,1)}var s,l;s=o.value,l=t,r.delete(s,l),delete d[t]}}}function Ue(e){const n=Ae(e);return t.provide(De,n),n}const Fe=Symbol("");const Ve=Symbol(""),Ne={install(e){$(t.ref(!0))}};return e.COMMIT="2a583c0",e.FALSE_OP=h,e.MAX_ARRAY_SIZE=b,e.NO_OP=g,e.PASSIVE_EV=y,e.SCROLL_LOCK_CLASS=se,e.UseDevtoolsApp=B,e.VERSION="1.0.0-beta.19",e.VUE_VERSION="2",e.VueComposableDevtools=z,e.buildI18n=Ae,e.debounce=T,e.deepClone=C,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(u(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=Z,e.getDevtools=N,e.hydrationPlugin=Ne,e.injectFactory=ue,e.isArray=u,e.isBoolean=c,e.isClient=S,e.isDate=v,e.isElement=m,e.isFunction=l,e.isNull=e=>null===e,e.isNumber=d,e.isObject=f,e.isPromise=p,e.isString=i,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=e=>void 0===e,e.minMax=E,e.noDelay=U,e.promisedTimeout=w,e.provideSSRTitle=function(e,t){const n=s(void 0===t?"":t);return e.provide(Fe,n),n},e.refDebounced=function(e,n){let[o,r]=1===arguments.length&&d(e)&&void 0===n?[t.ref(),e]:[t.ref(e),n];return t.customRef(((e,t)=>({get:()=>(e(),o.value),set:T((e=>{o.value=e,t()}),r)})))},e.refShared=function(e,n){const o=t.getCurrentInstance(),r=n||o.$vnode&&o.$vnode.tag;if(!r)return t.ref(e);const{data:a,supported:s}=ae(r,e);return a},e.setBreakpointTailwindCSS=we,e.setCssVariableFor=ee,e.setDevtools=V,e.setI18n=Ue,e.storageAvailable=Ee,e.unwrap=a,e.useArrayPagination=function(e,n){const o=s(e),r=Te({currentPage:1,pageSize:10,...n,total:t.computed((()=>o.value.length))}),a=t.computed((()=>{const e=o.value;return Array.isArray(e)?e.slice(r.offset.value,r.offset.value+r.pageSize.value):[]}));return{...r,result:a}},e.useBreakpoint=de,e.useBreakpointChrome=function(){return de({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return ue(fe,(()=>we(e||me)))},e.useBroadcastChannel=G,e.useCancellablePromise=P,e.useClipboard=function(){const e=S&&"clipboard"in navigator,n=t.ref(),o=t.ref(),r=t=>(n.value=t,e?navigator.clipboard.writeText(t):Promise.resolve());let a=()=>Promise.resolve(void 0),s=a;if(e){let e=!1;const u=()=>a().then((e=>n.value=e));["copy","cut","focus"].map((e=>M(window,e,(()=>u())))),a=()=>navigator.clipboard.readText().then((t=>{try{return e=!0,n.value=t}finally{e=!1}})),s=()=>navigator.clipboard.read().then((e=>o.value=e)),t.watch(n,T((t=>{!e&&i(t)&&r(t)}),100))}return{supported:e,text:n,data:o,writeText:r,readText:a,write:t=>e?navigator.clipboard.write(t):Promise.resolve(),read:s}},e.useCssVariables=function(e,n,o){const r=S&&"MutationObserver"in self,[u,l]=t.isRef(n)||m(n)?[n,o||te]:[r&&document.documentElement||{},n||te],c=t.ref(!0),v={},d=[],f=Object.entries(e).map((e=>{const[t,n]=i(e[1])?[e[1]]:[e[1].name,e[1].value];return n&&(d.push((()=>ee(a(u),t,a(n)))),v[e[0]]=s(n)),[e[0],ne(t)]}));for(let e=0;e<f.length;e++){const[n,o]=f[e];v[n]||(v[n]=t.ref(t.isRef(u)&&!u.value||!r?null:Z(a(u),o))),r&&t.watch([v[n],s(u)],(e=>{c&&e[1]&&e[0]!==Z(e[1],o)&&ee(e[1],o,e[0])}),{immediate:!t.isRef(u)})}if(!r)return{...v,stop:g,resume:g,supported:r,observing:c};const p=()=>{for(let e=0;e<f.length;e++){const[t,n]=f[e];v[t].value=Z(a(u),n)}},h=new MutationObserver(p),y=()=>{h.disconnect(),c.value=!1},w=()=>{c.value||p(),h.observe(a(u),l),c.value=!0};return t.onUnmounted(y),t.isRef(u)?t.onMounted((()=>{d.forEach((e=>e())),t.watch(u,((e,t)=>{t&&y(),e&&w()}))})):(S||u)&&(d.forEach((e=>e())),w()),{...v,supported:r,resume:w,stop:y,observing:c}},e.useCurrencyFormat=function(e,n,o){const r=a(e),s=!f(r),u=s?e:t.computed((()=>a(e).currency)),[l,i]=le(n,s?o:e),c=t.computed((()=>{const e=a(i)||{},t=a(u)||e.currency;return{style:"currency",...e,currency:t}})),v=ie(l),d=(e,t,n,o,r)=>{const s={...c.value,...a(o)},u=a(t)||s.currency,l=a(n)||s.currencyDisplay;return v.formatString(e,{...s,currency:u,currencyDisplay:l},r)};return{format:(e,n,o,r,a)=>t.computed((()=>d(e,n,o,r,a))),formatString:d}},e.useDateNow=function(e){return Re({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=k,e.useDevtoolsComponentState=function(e,n){const o=t.getCurrentInstance(),r=N();r&&o&&r.on.inspectComponent(((t,r)=>{if(t.componentInstance!==o)return;const[s,i]=f(n)?[n.type,n.multiple]:["setup",!1];if(l(e))return void e(t.instanceData,r);let c=u(e)?e:Object.keys(e).map((t=>({type:s,key:t,value:a(e[t]),...H(e[t])})));if(!i){const e=new Set(t.instanceData.state.map((e=>e.key)));c=c.filter((t=>!e.has(t.key)))}t.instanceData.state.push(...c)}))},e.useDevtoolsInspector=function(e,n=[]){const o=N(),r=t.ref(n),a=t.computed((()=>{if(!r.value)return new Map;const e=t.toRaw(r.value),n=new Map;for(const t of e)n.set(t.id,t);return n}));if(o){const n=e.id;o.addInspector(e),o.on.getInspectorTree((o=>{if(o.inspectorId!=n)return;if(!r.value)return;const a=o.filter;let s=t.toRaw(r.value);o.filter&&(s=e.nodeFilter?e.nodeFilter(o.filter,s):s.filter((e=>e.id.indexOf(a)>=0||e.label.indexOf(a)>=0))),o.rootNodes=s})),o.on.getInspectorState((o=>{if(o.inspectorId!=n)return;const r=a.value.get(o.nodeId);if(r){const n=t.reactive(r.state);o.state=e.stateFilter?e.stateFilter("",n):n}})),t.watch(r,(()=>{o.sendInspectorTree(n),o.sendInspectorState(n)}),{immediate:!0,deep:!0})}return{nodes:r}},e.useDevtoolsTimelineLayer=function(e,t,n){const o=N();let r=g,a=g;return o&&(o.addTimelineLayer({id:e,label:t,color:n}),r=(t,n)=>o.addTimelineEvent({layerId:e,event:t,all:n}),a=e=>r({...e,time:Date.now()})),{id:e,addEvent:r,pushEvent:a}},e.useEvent=M,e.useFetch=function(e,n){const o=t.ref(null),r=t.ref(""),a=t.ref(),s=t.ref(null),[u,l,c]=K(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:K(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?i(e)?n:K(e)?e:i(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},g=O((async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[u?n.clone().json().then((e=>o.value=e)).catch((e=>{o.value=null,s.value=e})):Promise.resolve(),n.clone().blob().then((e=>{a.value=e})),n.clone().text().then((e=>{r.value=e}))];l&&await Promise.all(e)}return n}),!0),h=t.computed((()=>g.result.value&&g.result.value.status||null)),y=t.computed((()=>g.result.value&&g.result.value.statusText||null));return e&&(i(e)||i(e.url))&&g.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted((()=>{m&&p("unmounted")})),{...g,cancel:p,isCancelled:d,cancelledMessage:f,text:r,blob:a,json:o,jsonError:s,status:h,statusText:y}},e.useFormat=Le,e.useGeolocation=function(e){const n=S&&!!navigator.geolocation,o=t.ref(e?!1===e.immediate:void 0),r=t.ref(null),a=t.ref(null),s=t.ref(null),u=t.ref(e&&e.enableHighAccuracy||null);let l=g;if(n){const n=e=>{a.value=e.timestamp,s.value=e.coords,r.value=null},i=e=>{a.value=Date.now(),s.value=null,r.value=e},v=()=>!0!==o.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,i,e);l=o.value?()=>{o.value?o.value=!1:d()}:d;let f=0;t.onMounted((()=>t.watch([u,o],(t=>{v();const o=c(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,i,e?{...e,enableHighAccuracy:o}:{enableHighAccuracy:o})}),{immediate:!o.value}))),t.onUnmounted(v)}return{supported:n,refresh:l,error:r,timestamp:a,coords:s,highAccuracy:u}},e.useHydration=function(){return t.inject(Ve,t.computed((()=>!1)))},e.useI18n=function(e){return e?Ue(e):t.inject(De)},e.useIntersectionObserver=function(e,n){const o=S&&"IntersectionObserver"in window,r=e?s(e):void 0,u=!r||!m(r.value)&&r.value?void 0:r,l=t.computed((()=>n?a(n):u?void 0:a(e))),i=t.ref([]),c=t.computed((()=>i.value.length>0&&i.value.every((e=>e.isIntersecting)))),v=e=>{i.value=e};let d=t.ref();o&&t.watch(l,(e=>{d.value&&d.value.disconnect();const t=e&&e&&{root:a(e.root),rootMargin:a(e.rootMargin),threshold:a(e.threshold)}||void 0;d.value=new IntersectionObserver(v,t);i.value.map((e=>e.target)).forEach(d.value.observe)}),{deep:!0,immediate:!0});const f=o?e=>{const t=a(e);d.value.observe(t)}:g,p=o?e=>{const t=a(e);d.value.unobserve(t)}:g,h=()=>d.value.disconnect();return u&&(t.onMounted((()=>{u.value&&f(u)})),t.onUnmounted((()=>{h()}))),{supported:o,elements:i,observe:f,unobserve:p,disconnect:h,isIntersecting:c}},e.useInterval=function(e,n,...o){let r;const a=(t,...a)=>{if(s(),!t&&!n)return;return r=setInterval(e,t||n,...a&&a.length?a:o)},s=()=>{r&&(clearInterval(r),r=void 0)};return d(n)&&a(),t.onUnmounted(s),{remove:s,start:a}},e.useIntlDateTimeFormat=function(e,n){const[o,r]=le(e,n),s=t.computed((()=>new Intl.DateTimeFormat(a(o),a(r)))),u=(e,t,n)=>{const u=t||n?new Intl.DateTimeFormat(a(n)||a(o),{...a(r),...a(t)}):s.value,l=a(e);return u.format(i(l)?new Date(l):l)};return{format:(e,n,o)=>t.computed((()=>u(e,n,o))),formatString:u,formatter:s}},e.useIntlNumberFormat=ie,e.useLanguage=function(){if(J||(J=S?t.ref(navigator.language):t.ref("")),!Q)if(S){Q=t.ref(navigator.languages);const e=()=>{J.value=navigator.language,Q.value=navigator.languages};window.addEventListener("languagechange",e,y)}else Q=t.ref([]);return{language:J,languages:Q}},e.useLocalStorage=Me,e.useLockScroll=function(e,n){const o=i(e)?t.ref([]):u(t.unref(e))?s(e):s([e]),r=i(n)?{lockedClass:n,auto:!0}:n||{auto:!0};r.lockedClass||(r.lockedClass=se);const l=t.ref(!1),c=t.computed((()=>o.value.map((e=>t.ref(e))))),v=t.watch([l,c],(([e,t],[n,o])=>{for(const s of t){const t=a(s);if(r.lockedClass){if(!t)return;t.classList.toggle(r.lockedClass,e)}r.onChange&&(n===e&&o.find((e=>a(e)===t))||r.onChange(t,e))}}),{flush:"sync",deep:!1}),d=()=>l.value=!0,f=()=>l.value=!1;return i(e)&&t.onMounted((()=>o.value=Array.from(document.querySelectorAll(e)))),!1!==r.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:l,lock:d,unlock:f,remove:v}},e.useMatchMedia=re,e.useMouseDistanceFromElement=function(e,n,o){let r,s=g;if(S){const{pageX:u,pageY:l,remove:i}=R(window,n,o);r=t.computed((()=>{const t=a(e);return t?Math.floor(Math.sqrt(Math.pow(u.value-(t.offsetLeft+t.clientWidth/2),2)+Math.pow(l.value-(t.offsetTop+t.clientHeight/2),2))):0})),s=i}else r=t.computed((()=>-1));return{distance:r,remove:s}},e.useNetworkInformation=function(){const e=!!S&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,o=t.ref(0),r=t.ref(0),a=t.ref("none"),s=t.ref(0),u=t.ref(!1),l=t.ref("none");let i=g,c=g;return e&&(i=()=>{o.value=e.downlink,r.value=e.downlinkMax,a.value=e.effectiveType,s.value=e.rtt,u.value=e.saveData,l.value=e.type},c=M(e,"change",i,y),i()),{supported:n,downlink:o,downlinkMax:r,effectiveType:a,rtt:s,saveData:u,type:l,remove:c}},e.useNow=Re,e.useOnMouseMove=R,e.useOnOutsidePress=function(e,t){if(!S)return()=>{};const n=s(e),o=x.find((e=>`on${e}`in document.documentElement));return M(document,o,(e=>n.value&&!n.value.contains(e.target)&&t(e)),{passive:!0})},e.useOnResize=function(e,n,o){const r=s(e),a=t.ref(r.value&&r.value.clientHeight),u=t.ref(r.value&&r.value.clientWidth);let l=()=>{a.value=r.value.clientHeight,u.value=r.value.clientWidth};const[i,c]=d(n)?[void 0,n]:[n,o];c&&(l=k(l,o));const v=S?M(window,"resize",l,i||y):g;return t.isRef(e)&&!e.value&&t.onMounted(l),{height:a,width:u,remove:v}},e.useOnScroll=function(e,n,o){const r=e=>!(d(e)||c(e)||!m(e)&&!t.isRef(e)||!e),a=r(e)?s(e):t.ref(S&&window||void 0),u=r(e)?a:t.ref(S&&window.document.scrollingElement||void 0),l=t.ref(u.value&&u.value.scrollTop||0),i=t.ref(u.value&&u.value.scrollLeft||0);let v=()=>{l.value=u.value.scrollTop,i.value=u.value.scrollLeft};const f=L.reduce(((e,t)=>(e[t]=(...e)=>u.value&&u.value[t]&&u.value[t].apply(u.value,e),e)),{}),p=e=>f.scrollTo({top:e}),g=e=>f.scrollTo({left:e}),[h,w]=d(e)||!e?[y,e]:d(n)?[y,n]:[n,o];w&&(v=k(v,o));const b=M(a,"scroll",v,h),E=t.watch(l,p,{immediate:!1}),C=t.watch(i,g,{immediate:!1});return{scrollTop:l,scrollLeft:i,remove:()=>{b(),C(),E()},scrollTopTo:p,scrollLeftTo:g,...f}},e.useOnline=function(){const e=S&&"onLine"in navigator;return e||(q=t.ref(!1)),q||(q=t.ref(navigator.onLine),window.addEventListener("offline",(()=>q.value=!1),y),window.addEventListener("online",(()=>q.value=!0),y)),{supported:e,online:q}},e.usePageVisibility=function(){return Y||(Y=t.ref(S&&document.hidden)),X||(S?(X=t.ref(document.visibilityState),document.addEventListener("visibilitychange",(()=>{X.value=document.visibilityState,Y.value=document.hidden}),y)):X=t.ref("visible")),{visibility:X,hidden:Y}},e.usePagination=Te,e.usePath=xe,e.usePerformanceNow=function(e){return Re({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=O,e.usePromiseLazy=function(e,t=!1){return O(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const o=!e||l(e)?{}:e,r=l(e)?e:n;if(!l(e)&&!f(e))throw new Error("[useRetry] options needs to be 'object'");if(r&&!l(r))throw new Error("[useRetry] factory needs to be 'function'");const a=t.ref(!1),s=t.ref(),u=t.ref([]),i={value:!1},c={isRetrying:a,retryCount:t.computed((()=>u.value.length)),nextRetry:s,retryErrors:u,[j]:{value:0},[D]:i},v=r?(...e)=>(++c[j].value,A(o,c,r,e)):e=>(++c[j].value,A(o,c,e,void 0));return{...c,cancel:()=>{c.isRetrying.value=!1,c.retryErrors.value.push(new Error("[useRetry] cancelled")),c.nextRetry.value=void 0,i.value=!0},exec:v}},e.useSSRTitle=function(e){const n=Symbol(),o=t.inject(Fe,n);return o===n||void 0===o?t.ref(i(e)?e:""):(i(e)&&(o.value=e),o)},e.useSessionStorage=ke,e.useShare=function(e){const n=S&&"share"in navigator;let o=()=>Promise.resolve(!1),r=h,a=t.ref(!1),s=t.ref(!1);return n&&(o=e=>(a.value=!1,s.value=!1,navigator.share(e).then((e=>(a.value=!0,e))).catch((e=>(a.value=!1,s.value=!0,!1)))),r=e=>navigator.canShare(e),e&&r(e)&&o(e)),{supported:n,share:o,canShare:r,shared:a,cancelled:s}},e.useSharedRef=ae,e.useStorage=function(e,t,n){return void 0===Ie&&(Ie=$e("localStorage").supported),Ie?Me(e,t,n):ke(e,t)},e.useTimeline=function(e,n){const o=t.ref([]),r=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||b;return t.watch(e,((e,t)=>{o.value.unshift({item:r(t),date:new Date}),o.value.length>a&&o.value.pop()}),{immediate:!1,flush:"sync",...n}),$(o)},e.useTimeout=function(e,n=0){let o=t.ref(!1);const r=setTimeout((()=>{o.value=!0,e()}),n),a=()=>{o.value=null,clearTimeout(r)};return t.onUnmounted(a),{ready:o,cancel:a}},e.useTitle=function(e=null){const n=t.ref(i(e)?e:document.title),o=new MutationObserver((e=>{n.value=e[0].target.textContent}));t.watch(n,((e,t)=>{i(e)&&e!==t&&(document.title=e)}),{immediate:!0,flush:"sync"});const r=document.querySelector("title");return o.observe(r,{childList:!0}),t.onUnmounted((()=>o.disconnect())),n},e.useUndo=function(e,n){const o=s(e),r=t.ref([]),a=t.ref(0),u=n&&n.maxLength||b,l=n&&n.clone||(e=>e),i=t.computed((()=>{const e=0===a.value?1:a.value;return r.value.slice(e)})),c=t.computed((()=>{const e=0===a.value?1:0;return r.value.slice(e,a.value)}));t.watch(o,(e=>{if(r.value[a.value]===e)return;if(a.value>0){const e=a.value;r.value.splice(0,e),a.value=0}r.value.length>u&&r.value.pop();const t=l(e);r.value.unshift(t)}),{...n,immediate:!0,flush:"sync"});const v=e=>{const t=Math.sign(e)<=0?Math.max(e,-c.value.length):Math.min(e,i.value.length);a.value+=t,o.value=r.value[a.value]};return{value:o,undo:(e=1)=>v(e),redo:(e=1)=>v(-e),jump:v,prev:i,next:c}},e.useVModel=function(e,t){console.warn("[useVModel] is not supported on @vue/composition-api.")},e.useValidation=function(e){const n=[],o=je({input:e},n),r=t.reactive(o.input);return n.forEach((e=>e(r))),r},e.useValueSync=function(e,n){const o=s(e),r=2===arguments.length?t.isRef(arguments[1])&&u(arguments[1].value)?arguments[1]:t.ref([s(arguments[1])]):t.ref(Array.from(arguments).slice(1).map((e=>s(e))));r.value.forEach((e=>{e.value=o.value}));let a=r.value.length;return t.watch([o,r],(([e,t])=>{if(a<t.length)t.forEach((t=>{t.value!==e&&(t.value=e)}));else{a=t.length;for(const n of t)if(n.value!==e)return void(o.value=n.value)}}),{deep:!0}),t.watch(o,(e=>{r.value.forEach((t=>t.value=e))}),{deep:!0,flush:"sync"}),r},e.useWebSocket=function(e,n){const o=S&&"WebSocket"in window;let r=null;const a=t.ref(null),s=t.ref(null),u=t.ref(null),l=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=g,d=g;return o&&(r=new WebSocket(e,n),r.addEventListener("message",(e=>{a.value=e,u.value=e.data})),r.addEventListener("error",(e=>{s.value=e,c.value=!0})),r.addEventListener("close",(()=>{l.value=!1,i.value=!0})),r.addEventListener("open",(()=>{l.value=!0,i.value=!1})),v=e=>r.send(e),d=(e,t)=>{r.close(e,t)}),{supported:o,ws:r,send:v,close:d,messageEvent:a,errorEvent:s,data:u,isOpen:l,isClosed:i,errored:c}},e.useWebStorage=$e,e.useWorker=function(e,n,o){const r=S&&"Worker"in self,a=t.ref(),s=t.ref(),u=t.ref(!r),l=t.ref(!r);if(!r)return u.value=!0,{worker:void 0,data:s,postMessage:g,terminate:g,errorEvent:a,errored:l,terminated:u};const i=new Worker(e,o),c=e=>i.postMessage(e);function v(){i.terminate(),u.value=!0}return i.addEventListener("message",(e=>{s.value=e.data}),y),i.addEventListener("error",(e=>{a.value=e,l.value=!0}),y),t.onUnmounted(v),n&&c(n),{worker:i,data:s,postMessage:c,terminate:v,errorEvent:a,errored:l,terminated:u}},e.useWorkerFunction=function(e,n){const o=S&&"Worker"in self,r=t.computed((()=>n&&a(n.dependencies)||[])),s=t.computed((()=>n&&a(n.timeout)));if(!o)return P(e,{lazy:!0,throwException:!0});const u=P(((...n)=>new Promise(((o,a)=>{const l=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${oe.toString()})(${e.toString()})`],o=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(o)}(e,r.value),i=new Worker(l);let c=-1;const v=s.value,d=()=>{i.terminate(),URL.revokeObjectURL(l),clearTimeout(c),m()},f=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed((()=>u.cancelled.value||n[n.length-1].value)):u.cancelled,m=f?t.watch(f,(()=>{d(),o(void 0)}),{immediate:!1}):g;i.addEventListener("message",(e=>{e.data[0]?o(e.data[1]):a(e.data[1]),d()}),y),i.addEventListener("error",(e=>{d(),a(e)}),y),i.postMessage([...n]),v&&(c=setTimeout((()=>{u.cancel(`[WebWorker] timeout after ${v}ms`)}),v))}))),{lazy:!0,throwException:!0});return u},e.wrap=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({},vueCompositionApi,Vue); | ||
var vueComposable=function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=o(n);function a(e){return t.isRef(e)?e.value:e}function s(e){return t.isRef(e)?e:t.ref(e)}const u=Array.isArray,l=e=>"function"==typeof e,i=e=>"string"==typeof e,c=e=>"boolean"==typeof e,v=e=>f(e)&&l(e.getTime),d=e=>"number"==typeof e,f=e=>null!==e&&"object"==typeof e,m=e=>f(e)&&!!e.tagName;function p(e){return f(e)&&l(e.then)&&l(e.catch)}const g=()=>{},h=()=>!1,y={passive:!0};function w(e){return new Promise((t=>{setTimeout(t,e)}))}const b=2**32-2;function E(e,t,n){return e<t?t:e>n?n:e}const S="undefined"!=typeof window;function C(e,...t){for(let n=0;n<t.length;n++){const o=t[n];if(void 0===o||!f(o))continue;const r=Object.keys(o);for(let t=0;t<r.length;t++){const n=r[t],s=a(o[n]),u=typeof s,l=typeof e[n];void 0!==e[n]&&u!==l||(e[n]=f(s)?C(e[n]||{},s):o[n])}}return e}const I=t.set;function $(e){return t.computed((()=>a(e)))}function M(e,n,o,r){let a=g;if(e){const u=s(e),l=e=>e.removeEventListener(n,o),i=e=>e.addEventListener(n,o,r),c=t.watch(u,((e,t,n)=>{e&&(i(e),n((()=>l(e))))}),{immediate:!0});a=()=>{l(u.value),c()}}return a}function k(e,t,n){return T(e,t,n)}function T(e,t=50,n={isImmediate:!1}){let o;return function(...r){const a=this,s=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(a,r)}),t),s&&e.apply(a,r)}}function R(e,n,o){const r=t.ref(0),a=t.ref(0),s=t.ref(0),u=t.ref(0);let l=e=>{r.value=e.x,a.value=e.y,s.value=e.pageX,u.value=e.pageY};const[i,c]=d(n)?[void 0,n]:[n,o];c&&(l=k(l,o));const v=M(e,"mousemove",l,i);return{mouseX:r,mouseY:a,pageX:s,pageY:u,remove:v}}const L=["scrollBy","scrollTo","scrollIntoView"];const x=["mousedown","touchstart"];function O(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[o,r]=c(n)?[n,!1]:f(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),s=t.ref(null),u=t.ref(null),l=t.ref(),i=async(...t)=>{a.value=!0,s.value=null;const n=t&&e.length!==t.length&&t.length>0&&c(t[t.length-1])?t[t.length-1]:r,o=l.value=e(...t);try{const e=await o;return l.value===o&&(u.value=e),e}catch(e){return l.value===o&&(s.value=e,u.value=null),n?o:void 0}finally{l.value===o&&(a.value=!1)}};return o||i(),{exec:i,result:u,promise:l,loading:a,error:s}}function P(e,n){const o=t.ref(!1);let r;const a=O(((...t)=>{return n=e(...t),new Promise(((e,t)=>{o.value=!1,r=e=>{o.value=!0,t(e)},n.then(e).catch(t)}));var n}),n);return!t.getCurrentInstance()||f(n)&&!1===n.unmountCancel||t.onUnmounted((()=>r&&r())),{...a,cancel:e=>{r&&r(e)},cancelled:o}}const j=Symbol(""),D=Symbol(""),A=async(e,t,n,o)=>{const r=t[j].value;let a=-1;const s=e.maxRetries||9001,u=e.retryDelay||U;let l;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;do{let e=!1,i=null;try{if(++a,i=o?n(...o):n(),p(i)&&(i=await i),t[D].value)return null;e=!0}catch(e){i=null,t.retryErrors.value.push(e)}if(r!==t[j].value)return i;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,i;if(a>=s)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error(`[useRetry] max retries reached ${s}`));t.isRetrying.value=!0;const c=Date.now(),f=u(a),m=p(f)?await f:f;if(!p(f)||m){if(d(m))l=m;else{if(!v(m))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof m}'`);l=m.getTime()}l<c?t.nextRetry.value=c+l:(t.nextRetry.value=l,l-=c),l>0&&await w(l)}if(t[D].value)return null;if(r!==t[j].value)return i}while(a<9e3);return null};const U=()=>0;const F=Symbol("");function V(e,t){l(e.provide)?e.provide(F,t):console.warn("[vue-composable] devtools is not supported for vue 2")}function N(){const e={},n=t.inject(F,e);if(n!==e)return n;console.warn("[vue-composable] devtools not found, please run app.use(VueComposableDevtools)")}let _;_=e=>{const t=[],n=[];let o;function r(e,t){o?o[e](...t):n.push({type:e,args:t})}e.then((e=>{o=e,async function(e,t,n){setTimeout((async()=>{const o=["addTimelineLayer","addInspector","sendInspectorTree","sendInspectorState","addTimelineEvent"];for(const t of o){for(const o of n.filter((e=>e.type===t)))e[t](...o.args);await w(20)}new Set(n.filter((e=>"notifyComponentUpdate"===e.type)).map((e=>e.args[0]))).forEach((t=>e.notifyComponentUpdate(t))),t.forEach((t=>e.on[t.type](...t.args))),t.length=0,n.length=0}),100)}(o,t,n)}));return{notifyComponentUpdate(e){r("notifyComponentUpdate",arguments)},addTimelineLayer(e){r("addTimelineLayer",arguments)},addTimelineEvent(e){r("addTimelineEvent",arguments)},addInspector(e){r("addInspector",arguments)},sendInspectorTree(e){r("sendInspectorTree",arguments)},sendInspectorState(e){r("sendInspectorState",arguments)},getComponentBounds(e){r("getComponentBounds",arguments)},getComponentName(e){r("getComponentName",arguments)},on:{transformCall(e){o?o.on.transformCall(e):t.push({type:"transformCall",args:arguments})},getAppRecordName(e){o?o.on.getAppRecordName(e):t.push({type:"getAppRecordName",args:arguments})},getAppRootInstance(e){o?o.on.getAppRootInstance(e):t.push({type:"getAppRootInstance",args:arguments})},registerApplication(e){o?o.on.registerApplication(e):t.push({type:"registerApplication",args:arguments})},walkComponentTree(e){o?o.on.walkComponentTree(e):t.push({type:"walkComponentTree",args:arguments})},visitComponentTree(e){o?o.on.visitComponentTree(e):t.push({type:"visitComponentTree",args:arguments})},walkComponentParents(e){o?o.on.walkComponentParents(e):t.push({type:"walkComponentParents",args:arguments})},inspectComponent(e){o?o.on.inspectComponent(e):t.push({type:"inspectComponent",args:arguments})},getComponentBounds(e){o?o.on.getComponentBounds(e):t.push({type:"getComponentBounds",args:arguments})},getComponentName(e){o?o.on.getComponentName(e):t.push({type:"getComponentName",args:arguments})},getElementComponent(e){o?o.on.getElementComponent(e):t.push({type:"getElementComponent",args:arguments})},getComponentRootElements(e){o?o.on.getComponentRootElements(e):t.push({type:"getComponentRootElements",args:arguments})},editComponentState(e){o?o.on.editComponentState(e):t.push({type:"editComponentState",args:arguments})},inspectTimelineEvent(e){o?o.on.inspectTimelineEvent(e):t.push({type:"inspectTimelineEvent",args:arguments})},getInspectorTree(e){o?o.on.getInspectorTree(e):t.push({type:"getInspectorTree",args:arguments})},getInspectorState(e){o?o.on.getInspectorState(e):t.push({type:"getInspectorState",args:arguments})},editInspectorState(e){o?o.on.editInspectorState(e):t.push({type:"editInspectorState",args:arguments})}}}};var W=_;const B=(e,t="vue-composable",n="Vue-composable devtools plugin")=>{const o=new Promise((e=>{}));V(e,W(o))},z={install:(e,t={id:"vue-composable",label:"Vue-composable devtools plugin"})=>B(e,t.id,t.label)};function H(e){if(!e)return{};const t=!!e.__v_isRef,n=t&&!!e.effect,o=!!e.__v_reactive,r=n?"Computed":t?"Ref":o?"Reactive":null;return{...r?{objectType:r}:{},...e.effect?{raw:e.effect.raw.toString()}:{}}}function K(e){return e&&(c(e.isJson)||c(e.parseImmediate)||c(e.unmountCancel))}let q,X,Y,J,Q;function G(e,n){const o=S&&"BroadcastChannel"in self,r=t.ref(null),a=t.ref(null),s=t.ref(null),u=t.ref(!1),l=t.ref(!1);let i=g,c=g,v=g;if(o){const o=new BroadcastChannel(e);o.addEventListener("messageerror",(e=>{s.value=e,u.value=!0}),y),o.addEventListener("message",(e=>{a.value=e,r.value=e.data}),y),i=e=>o.postMessage(e),c=()=>{o.close(),l.value=!0},v=(e,n)=>{o.addEventListener("message",e,n),t.onUnmounted((()=>o.removeEventListener("message",e)))},t.onUnmounted((()=>{n&&n(),c()}))}return{supported:o,data:r,messageEvent:a,errorEvent:s,errored:u,isClosed:l,send:i,close:c,addListener:v}}function Z(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function ee(e,t,n){e.style.setProperty(t,n)}const te={attributes:!0,childList:!0,subtree:!0},ne=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?`--${e}`:e;const oe=e=>function(t){const n=t.data||[];return new Promise((t=>{try{Promise.resolve(e.apply(e,n)).then((e=>t(postMessage([!0,e])))).catch((e=>t(postMessage([!1,e]))))}catch(e){t(postMessage([!1,e]))}}))};function re(e){const n=!!S&&"matchMedia"in window;let o,r,a=g;if(n){o=t.ref(matchMedia(e)),r=t.ref(o.value.matches);const n=e=>{r.value=e.matches};o.value.addEventListener("change",n,y);const a=()=>o.value.removeEventListener("change",n);t.onUnmounted(a)}else o=t.ref({}),r=t.ref(!1);return{supported:n,mediaQueryList:o,matches:r,remove:a}}function ae(e,n){const{addListener:o,send:r,close:a,supported:s}=G(e,(()=>h())),u=Date.now(),l=t.ref(!1),i=t.ref(0),c=t.computed((()=>1!==i.value||l.value)),v=t.ref([]),d=t.ref(n);let m,p=!1;r({type:0});const g=()=>r({type:5,id:u}),h=()=>{0!==v.value.length&&(l.value&&r({type:3,mind:1,id:Math.min(...v.value)}),r({type:4,id:u}))};return o((e=>{switch(e.data.type){case 0:r({type:2,value:d.value,mind:i.value});break;case 4:{const t=v.value.indexOf(e.data.id);t>=0&&v.value.splice(t,1),m===e.data.id&&v.value.length>0&&r({type:3,mind:1,id:Math.min(u,...v.value)});break}case 2:p=!0,d.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,m=1===e.data.mind&&e.data.id||void 0,l.value=m===u,l.value&&(v.value=[],g());break;case 5:v.value=[e.data.id],r({type:6,id:u});break;case 6:v.value.push(e.data.id)}}),y),g(),t.watch(d,((e,t)=>{if(p)p=!1;else{if(1===i.value&&!1===l.value)return p=!0,void(d.value=t);r({type:2,mind:i.value,value:f(e)?{...e}:e}),p=!1}}),{deep:!0,immediate:!1}),S&&window.addEventListener("unload",h,y),t.onUnmounted((()=>{h(),a()})),{supported:s,id:u,data:d,master:l,mind:i,editable:c,targets:v,ping:g,setMind:e=>{switch(e){case 1:l.value=!0;break;case 0:l.value=!1}i.value=e,r({type:3,id:u,mind:i.value})},addListener:o}}const se="no-scroll";function ue(e,n){return t.inject(e,n,!0)}function le(e,n){const o=s(n),r=s(e);return f(o.value)||t.isRef(n)?[void 0!==r.value?r:void 0,o]:!f(r.value)||u(r.value)||i(r.value)?[r.value?r:void 0,void 0]:[void 0,r]}function ie(e,n){const[o,r]=le(e,n),s=t.computed((()=>new Intl.NumberFormat(a(o),a(r)))),u=(e,t,n)=>(t||n?new Intl.NumberFormat(a(n)||a(o),{...a(r),...a(t)}):s.value).format(a(e));return{format:(e,n,o)=>t.computed((()=>u(e,n,o))),formatString:u,formatter:s}}function ce(e){if(e)return d(e)?e:ve(e)}const ve=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function de(e){const n={},o=new Map,r=t.ref();let a=[];const s=[];for(const r in e){const u=e[r],l=ce(u);if(void 0!==l){const e=t.ref(!1);n[r]=e,o.set(l,{name:r,valid:e}),a.push(l)}else{const{matches:e,remove:t}=re(u);n[r]=e,s.push(t)}}a=a.sort(((e,t)=>t-e));const u=S?()=>{const e=window.innerWidth;let t;for(let n=0;n<a.length;n++){const r=a[n],s=o.get(r);s.valid.value=e>=r,e>=r&&void 0===t&&(t=s.name)}r.value=t}:g,l=k(u,10),i=S?()=>window.removeEventListener("resize",l):g;return S&&(t.onMounted((()=>{u(),window.addEventListener("resize",l,y)})),t.onUnmounted((()=>{i(),s.forEach((e=>e()))}))),{...n,remove:i,current:r}}const fe=Symbol(""),me={sm:640,md:768,lg:1024,xl:1280};function pe(e){return f(e)&&f(e.theme)&&f(e.theme.screens)}function ge(e){return!!f(e)&&(i(e.min)||i(e.max)||d(e.min)||d(e.max))}function he(e){return d(e)?e+"px":e}function ye(e){const t=[];if(u(e)){const n=e.map(ye);for(let e=0;e<n.length;e++){const o=n[e];t.push(...o)}}else f(n=e)&&i(n.raw)?t.push(e.raw):ge(e)?t.push(function(e){return ge(e)?`(${[e.max&&`max-width: ${he(e.max)}`,e.min&&`min-width: ${he(e.min)}`].filter(Boolean).join(" and ")})`:""}(e)):(i(e)||d(e))&&t.push(`(min-width: ${he(e)})`);var n;return t}function we(e){const n=pe(e)?e.theme.screens:e;if(pe(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];f(t)?n[e]=ye(n[e]).join(" or "):i(t)&&(t.endsWith("px")||(n[e]=ye(n[e]).join(" or ")))}const o=de(n);return t.provide(fe,o),o}function be(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function Ee(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return be(t,e)}}function Se(e,t){try{return e.parse(t)}catch{return t}}let Ce,Ie;function $e(e,n=JSON,o=10){const r=S?window[e]:void 0,u=Ee(r);Ce||(Ce=new Map,S&&window.addEventListener("storage",(e=>{if(e.newValue===e.oldValue)return;let t=Ce.get("localStorage");t=e.storageArea===window.localStorage?Ce.get("localStorage"):Ce.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))})));let l,c=Ce.get(e);return u&&r?c?l=c.$quotaError:(l=t.ref(!1),c={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:l,key:r.key,length:r.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},save(e,t){try{const o=r.getItem(e),a=i(t)?t:n.stringify(t);r.setItem(e,a),o!==a&&S&&c.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:a,oldValue:o,storageArea:r}))}catch(e){l.value=be(e,r)}},clear(){this.$refMap.forEach(((e,t)=>this.removeItem(t)))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),r.removeItem(e)},getItem(e){const t=r.getItem(e);return t?this.setItem(e,Se(n,t)):null},getRef(e){const u=t.ref();let l=t.watch(s(e),(e=>{const t=r.getItem(e);if(!t)return u.value=null;u.value=Se(n,t)}),{immediate:!0,flush:"sync"}),i=t.watch(u,T((t=>{this.save(a(e),t)}),o),{deep:!0,flush:"sync"});const c=Math.random().toString();return this.$watchHandlers.set(c,(()=>{l(),i()})),this.$refMap.set(c,u),u},setItem(e,n){const r=s(n);this.$refMap.set(e,r),this.save(e,n);const a=t.watch(r,T((t=>{this.save(e,t)}),o),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,a),r},updateItem(e,t){let o=this.$refMap.get(e);o&&(o.value=Se(n,t))}},Ce.set(e,c)):(l=t.ref(!1),c={}),{supported:u,quotaError:l,store:c,remove:()=>Ce.delete(e)}}function Me(e,n,o){const{supported:r,store:s}=$e("localStorage");let u,l=g,i=g,c=g;return r&&s?(c=t=>s.setSync(a(e),t),l=()=>s.removeItem(a(e)),i=()=>s.clear(),u=s.getRef(e),null==u.value&&(s.save(a(e),n),u.value=n),t.watchEffect((()=>{!1!==o&&c(!0)}))):u=t.ref(n),{supported:r,storage:u,clear:i,remove:l,setSync:c}}function ke(e,n,o){const{supported:r,store:s}=$e("sessionStorage");let u,l=g,i=g,c=h;return r&&s?(l=()=>s.removeItem(a(e)),i=()=>s.clear(),u=s.getRef(e),null==u.value&&(s.save(a(e),n),u.value=n)):u=t.ref(n),{supported:r,storage:u,clear:i,remove:l,setSync:c}}function Te(e){const n=s(e.currentPage),o=s(e.pageSize),r=t.ref(0),a=s(e.total),u=t.computed({get:()=>r.value,set(e){d(e)&&(r.value=Math.min(e,a.value))}}),l=t.computed({get:()=>n.value,set(e){d(e)&&(n.value=E(e,1,c.value),u.value=(n.value-1)*i.value)}}),i=t.computed({get:()=>o.value,set(e){d(e)&&(o.value=e)}}),c=t.computed((()=>Math.ceil(a.value/i.value)));l.value=n.value;return t.watch([a,i],(e=>{l.value>c.value&&(l.value=c.value)}),{immediate:!1}),{pageSize:i,total:a,currentPage:l,offset:u,lastPage:c,next:()=>++l.value,prev:()=>--l.value,first:()=>l.value=1,last:()=>l.value=c.value}}function Re(e){const n=1e3,o=e&&e.refreshMs||n,r=!e||!c(e.sync)||e.sync,a=e&&l(e.timeFn)&&e.timeFn||Date.now;let s,u;const i=t.ref(a()),v=()=>{clearInterval(s),clearTimeout(u)},d=S?()=>s=setInterval((()=>i.value=a()),o):g;if(r){const e=n-(i.value-Math.floor(i.value/n)*n);u=setTimeout(d,e)}else d();return t.onUnmounted(v),{now:i,remove:v}}function Le(e,n){return t.computed((()=>{const o=a(e);if(!n)return o;const r=t.isRef(n)?t.reactive(n.value):t.reactive(n);return o.replace(/({?{[\w\s]*}?})/g,(e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return`${t}`;const n=u(r)?r[+t]:r[t];return void 0===n?e:`${a(n)}`}))}))}function xe(e,n,o=".",r=g){return t.computed((()=>{const t=a(e),s=a(n);if(void 0===t)return r(s,t,s,t);if(!s)return t;const u=s.split(o);let l=t;for(let e=0;e<u.length;e++){let n=u[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let o=n,r=t.exec(o);if(r){let a=r[0].length,s=r.index-a,l=1;do{r.index,s=r.index,a=r[0].length,n=n.slice(0,-r[0].length),u.splice(e+l,0,r[1]),++l}while(r=t.exec(o));if(!n&&"["===o[0]&&o.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${o}"`)}if(!f(l))return r(u.slice(0,e+1).join(o),l,s,t);if(!n)return r(u.slice(0,e+1).join(o),l,s,t);if(l=l[n],!l)return r(u.slice(0,e+1).join(o),l,s,t)}return l}))}function Oe(e){return void 0!==e.$value}const Pe=(e,n,o)=>{const{$message:r,$validator:s,...u}=function(e){return f(e)}(n)?n:{$validator:n,$message:void 0},{$pending:l,$promise:i,$invalid:c,$error:v,$touch:d}=((e,n,o,r)=>{const s=t.ref(null),u=t.ref(!1),l=t.ref(),i=t.ref(!1);let c;const v=e=>{s.value=(async()=>{try{u.value=!0;const t=n(e,c);p(t)?i.value=!await t:i.value=!t,l.value=i.value?o.value||!0:void 0}catch(e){throw i.value=!0,e}finally{u.value=!1}})().catch((e=>(l.value=a(e),i.value=!0,e)))};return r.push((o=>{c=o,t.watch((()=>{try{n(e.value,c)}catch(e){}return e.value}),v,{deep:!0,immediate:!0})})),{$promise:s,$pending:u,$invalid:i,$error:l,$touch:function(){v(e.value)}}})(e,s,t.ref(r),o);return{$pending:l,$error:v,$promise:i,$invalid:c,$message:r,$touch:d,...u}},je=(e,n)=>{const o={},r=Oe(e)?s(e.$value):void 0;for(const s of Object.keys(e))if("$"!==s[0])if(r){const t=Pe(r,e[s],n);o[s]=t}else{const r=je(e[s],n);let u,l,i,v=g;if(Oe(r)){const e=Object.keys(r).filter((e=>"$"!==e[0])).map((e=>r[e]));l=t.computed((()=>e.map((e=>e.$error)).map((e=>a(e))).filter((e=>void 0!==e)))),i=t.computed((()=>e.some((e=>!!a(e.$invalid))))),v=()=>Object.keys(r).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=r[t].toObject(),e)),{})}else{const e=Object.keys(r).map((e=>r[e]));l=t.computed((()=>e.map((e=>a(e.$errors))).filter((e=>void 0!==e)).filter((e=>e.some(Boolean))))),u=t.computed((()=>e.some((e=>a(e.$anyDirty)||c(a(e.$dirty))&&a(e.$dirty))))),i=t.computed((()=>e.some((e=>!!a(e.$anyInvalid))))),v=()=>Object.keys(r).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=r[t].toObject(),e)),{})}if(o[s]={toObject:v,...r,$errors:l,$anyInvalid:i},u){o[s].$anyDirty=u;const e=Object.keys(o[s]).filter((e=>"$"!==e[0]&&f(o[s][e])));o[s].$touch=()=>{e.forEach((e=>{const t=o[s][e].$touch;t&&t()}))},o[s].$reset=()=>{e.forEach((e=>{const t=o[s][e].$reset;t&&t()}))}}}else{if("$value"===s){o[s]=r;const e=t.ref(!1),n=t.watch(r,(()=>{e.value=!0,n()}),{immediate:!1,deep:!0});o.$dirty=e,o.$reset=()=>e.value=!1,o.$touch=()=>e.value=!0,o.toObject=()=>a(r);continue}o[s]=e[s]}return o};const De=Symbol("");function Ae(e){const n=t.ref(Object.keys(e.messages)),o=t.ref(e.messages),u=t.ref(e.locale),i=t.ref({});let v=t.ref();const d={},f=e=>("__esModule"in e||"Module"===e[Symbol.toStringTag])&&"default"in e?e.default:e,m=(e,n)=>{if(d[e])return d[e];const o=n.value[e];if(!o)return t.ref({});let r=l(o)?o():o;return p(r)?r.then((t=>d[e]=s(f(t)))):l(o)?s(f(r)):d[e]=t.computed((()=>f(n.value[e])))},g=!!e.fallback&&(!c(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(g){const t=m(e.fallback,o);p(t)?(t.then((e=>{v.value=e.value})),h=!0):v.value=t.value}else v.value={};const y=t.ref(0);t.watch(o,(()=>y.value++),{deep:!0,immediate:!1}),t.watch([u,v,y],(([t,n,r])=>{if(t===e.fallback&&g)i.value=n;else{const e=e=>i.value=C({},n,a(e)),r=m(t,o);p(r)?r.then(e):e(r)}}),{immediate:!h});const w=(t,n)=>e.resolve?s(e.resolve(i.value,t,n)):Le(xe(i,t,".",((e,t,n,o)=>n)),n);return{locale:u,locales:n,i18n:i,$t:w,$ts:(e,t)=>w(e,t).value,addLocale:(e,t)=>{n.value.indexOf(e)>=0||n.value.push(e),delete d[e],I(o.value,e,t)},removeLocale:t=>{const a=n.value.indexOf(t);if(a>=0){const o=[u.value,v.value&&e.fallback,...n.value].find((e=>e&&e!==t));o&&(t===e.fallback&&(v.value=void 0),t===u.value&&(u.value=o)),n.value.splice(a,1)}var s,l;s=o.value,l=t,r.delete(s,l),delete d[t]}}}function Ue(e){const n=Ae(e);return t.provide(De,n),n}const Fe=Symbol("");const Ve=Symbol(""),Ne={install(e){$(t.ref(!0))}};return e.COMMIT="8ef1ad0",e.FALSE_OP=h,e.MAX_ARRAY_SIZE=b,e.NO_OP=g,e.PASSIVE_EV=y,e.SCROLL_LOCK_CLASS=se,e.UseDevtoolsApp=B,e.VERSION="1.0.0-beta.20",e.VUE_VERSION="2",e.VueComposableDevtools=z,e.buildI18n=Ae,e.debounce=T,e.deepClone=C,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(u(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=Z,e.getDevtools=N,e.hydrationPlugin=Ne,e.injectFactory=ue,e.isArray=u,e.isBoolean=c,e.isClient=S,e.isDate=v,e.isElement=m,e.isFunction=l,e.isNull=e=>null===e,e.isNumber=d,e.isObject=f,e.isPromise=p,e.isString=i,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=e=>void 0===e,e.minMax=E,e.noDelay=U,e.promisedTimeout=w,e.provideSSRTitle=function(e,t){const n=s(void 0===t?"":t);return e.provide(Fe,n),n},e.refDebounced=function(e,n){let[o,r]=1===arguments.length&&d(e)&&void 0===n?[t.ref(),e]:[t.ref(e),n];return t.customRef(((e,t)=>({get:()=>(e(),o.value),set:T((e=>{o.value=e,t()}),r)})))},e.refShared=function(e,n){const o=t.getCurrentInstance(),r=n||o.$vnode&&o.$vnode.tag;if(!r)return t.ref(e);const{data:a,supported:s}=ae(r,e);return a},e.setBreakpointTailwindCSS=we,e.setCssVariableFor=ee,e.setDevtools=V,e.setI18n=Ue,e.storageAvailable=Ee,e.unwrap=a,e.useArrayPagination=function(e,n){const o=s(e),r=Te({currentPage:1,pageSize:10,...n,total:t.computed((()=>o.value.length))}),a=t.computed((()=>{const e=o.value;return Array.isArray(e)?e.slice(r.offset.value,r.offset.value+r.pageSize.value):[]}));return{...r,result:a}},e.useBreakpoint=de,e.useBreakpointChrome=function(){return de({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return ue(fe,(()=>we(e||me)))},e.useBroadcastChannel=G,e.useCancellablePromise=P,e.useClipboard=function(){const e=S&&"clipboard"in navigator,n=t.ref(),o=t.ref(),r=t=>(n.value=t,e?navigator.clipboard.writeText(t):Promise.resolve());let a=()=>Promise.resolve(void 0),s=a;if(e){let e=!1;const u=()=>a().then((e=>n.value=e));["copy","cut","focus"].map((e=>M(window,e,(()=>u())))),a=()=>navigator.clipboard.readText().then((t=>{try{return e=!0,n.value=t}finally{e=!1}})),s=()=>navigator.clipboard.read().then((e=>o.value=e)),t.watch(n,T((t=>{!e&&i(t)&&r(t)}),100))}return{supported:e,text:n,data:o,writeText:r,readText:a,write:t=>e?navigator.clipboard.write(t):Promise.resolve(),read:s}},e.useCssVariables=function(e,n,o){const r=S&&"MutationObserver"in self,[u,l]=t.isRef(n)||m(n)?[n,o||te]:[r&&document.documentElement||{},n||te],c=t.ref(!0),v={},d=[],f=Object.entries(e).map((e=>{const[t,n]=i(e[1])?[e[1]]:[e[1].name,e[1].value];return n&&(d.push((()=>ee(a(u),t,a(n)))),v[e[0]]=s(n)),[e[0],ne(t)]}));for(let e=0;e<f.length;e++){const[n,o]=f[e];v[n]||(v[n]=t.ref(t.isRef(u)&&!u.value||!r?null:Z(a(u),o))),r&&t.watch([v[n],s(u)],(e=>{c&&e[1]&&e[0]!==Z(e[1],o)&&ee(e[1],o,e[0])}),{immediate:!t.isRef(u)})}if(!r)return{...v,stop:g,resume:g,supported:r,observing:c};const p=()=>{for(let e=0;e<f.length;e++){const[t,n]=f[e];v[t].value=Z(a(u),n)}},h=new MutationObserver(p),y=()=>{h.disconnect(),c.value=!1},w=()=>{c.value||p(),h.observe(a(u),l),c.value=!0};return t.onUnmounted(y),t.isRef(u)?t.onMounted((()=>{d.forEach((e=>e())),t.watch(u,((e,t)=>{t&&y(),e&&w()}))})):(S||u)&&(d.forEach((e=>e())),w()),{...v,supported:r,resume:w,stop:y,observing:c}},e.useCurrencyFormat=function(e,n,o){const r=a(e),s=!f(r),u=s?e:t.computed((()=>a(e).currency)),[l,i]=le(n,s?o:e),c=t.computed((()=>{const e=a(i)||{},t=a(u)||e.currency;return{style:"currency",...e,currency:t}})),v=ie(l),d=(e,t,n,o,r)=>{const s={...c.value,...a(o)},u=a(t)||s.currency,l=a(n)||s.currencyDisplay;return v.formatString(e,{...s,currency:u,currencyDisplay:l},r)};return{format:(e,n,o,r,a)=>t.computed((()=>d(e,n,o,r,a))),formatString:d}},e.useDateNow=function(e){return Re({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=k,e.useDevtoolsComponentState=function(e,n){const o=t.getCurrentInstance(),r=N();r&&o&&r.on.inspectComponent(((t,r)=>{if(t.componentInstance!==o)return;const[s,i]=f(n)?[n.type,n.multiple]:["setup",!1];if(l(e))return void e(t.instanceData,r);let c=u(e)?e:Object.keys(e).map((t=>({type:s,key:t,value:a(e[t]),...H(e[t])})));if(!i){const e=new Set(t.instanceData.state.map((e=>e.key)));c=c.filter((t=>!e.has(t.key)))}t.instanceData.state.push(...c)}))},e.useDevtoolsInspector=function(e,n=[]){const o=N(),r=t.ref(n),a=t.computed((()=>{if(!r.value)return new Map;const e=t.toRaw(r.value),n=new Map;for(const t of e)n.set(t.id,t);return n}));if(o){const n=e.id;o.addInspector(e),o.on.getInspectorTree((o=>{if(o.inspectorId!=n)return;if(!r.value)return;const a=o.filter;let s=t.toRaw(r.value);o.filter&&(s=e.nodeFilter?e.nodeFilter(o.filter,s):s.filter((e=>e.id.indexOf(a)>=0||e.label.indexOf(a)>=0))),o.rootNodes=s})),o.on.getInspectorState((o=>{if(o.inspectorId!=n)return;const r=a.value.get(o.nodeId);if(r){const n=t.reactive(r.state);o.state=e.stateFilter?e.stateFilter("",n):n}})),t.watch(r,(()=>{o.sendInspectorTree(n),o.sendInspectorState(n)}),{immediate:!0,deep:!0})}return{nodes:r}},e.useDevtoolsTimelineLayer=function(e,t,n){const o=N();let r=g,a=g;return o&&(o.addTimelineLayer({id:e,label:t,color:n}),r=(t,n)=>o.addTimelineEvent({layerId:e,event:t,all:n}),a=e=>r({...e,time:Date.now()})),{id:e,addEvent:r,pushEvent:a}},e.useEvent=M,e.useFetch=function(e,n){const o=t.ref(null),r=t.ref(""),a=t.ref(),s=t.ref(null),[u,l,c]=K(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:K(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?i(e)?n:K(e)?e:i(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},g=O((async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[u?n.clone().json().then((e=>o.value=e)).catch((e=>{o.value=null,s.value=e})):Promise.resolve(),n.clone().blob().then((e=>{a.value=e})),n.clone().text().then((e=>{r.value=e}))];l&&await Promise.all(e)}return n}),!0),h=t.computed((()=>g.result.value&&g.result.value.status||null)),y=t.computed((()=>g.result.value&&g.result.value.statusText||null));return e&&(i(e)||i(e.url))&&g.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted((()=>{m&&p("unmounted")})),{...g,cancel:p,isCancelled:d,cancelledMessage:f,text:r,blob:a,json:o,jsonError:s,status:h,statusText:y}},e.useFormat=Le,e.useGeolocation=function(e){const n=S&&!!navigator.geolocation,o=t.ref(e?!1===e.immediate:void 0),r=t.ref(null),a=t.ref(null),s=t.ref(null),u=t.ref(e&&e.enableHighAccuracy||null);let l=g;if(n){const n=e=>{a.value=e.timestamp,s.value=e.coords,r.value=null},i=e=>{a.value=Date.now(),s.value=null,r.value=e},v=()=>!0!==o.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,i,e);l=o.value?()=>{o.value?o.value=!1:d()}:d;let f=0;t.onMounted((()=>t.watch([u,o],(t=>{v();const o=c(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,i,e?{...e,enableHighAccuracy:o}:{enableHighAccuracy:o})}),{immediate:!o.value}))),t.onUnmounted(v)}return{supported:n,refresh:l,error:r,timestamp:a,coords:s,highAccuracy:u}},e.useHydration=function(){return t.inject(Ve,t.computed((()=>!1)))},e.useI18n=function(e){return e?Ue(e):t.inject(De)},e.useIntersectionObserver=function(e,n){const o=S&&"IntersectionObserver"in window,r=e?s(e):void 0,u=!r||!m(r.value)&&r.value?void 0:r,l=t.computed((()=>n?a(n):u?void 0:a(e))),i=t.ref([]),c=t.computed((()=>i.value.length>0&&i.value.every((e=>e.isIntersecting)))),v=e=>{i.value=e};let d=t.ref();o&&t.watch(l,(e=>{d.value&&d.value.disconnect();const t=e&&e&&{root:a(e.root),rootMargin:a(e.rootMargin),threshold:a(e.threshold)}||void 0;d.value=new IntersectionObserver(v,t);i.value.map((e=>e.target)).forEach(d.value.observe)}),{deep:!0,immediate:!0});const f=o?e=>{const t=a(e);d.value.observe(t)}:g,p=o?e=>{const t=a(e);d.value.unobserve(t)}:g,h=()=>d.value.disconnect();return u&&(t.onMounted((()=>{u.value&&f(u)})),t.onUnmounted((()=>{h()}))),{supported:o,elements:i,observe:f,unobserve:p,disconnect:h,isIntersecting:c}},e.useInterval=function(e,n,...o){let r;const a=(t,...a)=>{if(s(),!t&&!n)return;return r=setInterval(e,t||n,...a&&a.length?a:o)},s=()=>{r&&(clearInterval(r),r=void 0)};return d(n)&&a(),t.onUnmounted(s),{remove:s,start:a}},e.useIntlDateTimeFormat=function(e,n){const[o,r]=le(e,n),s=t.computed((()=>new Intl.DateTimeFormat(a(o),a(r)))),u=(e,t,n)=>{const u=t||n?new Intl.DateTimeFormat(a(n)||a(o),{...a(r),...a(t)}):s.value,l=a(e);return u.format(i(l)?new Date(l):l)};return{format:(e,n,o)=>t.computed((()=>u(e,n,o))),formatString:u,formatter:s}},e.useIntlNumberFormat=ie,e.useLanguage=function(){if(J||(J=S?t.ref(navigator.language):t.ref("")),!Q)if(S){Q=t.ref(navigator.languages);const e=()=>{J.value=navigator.language,Q.value=navigator.languages};window.addEventListener("languagechange",e,y)}else Q=t.ref([]);return{language:J,languages:Q}},e.useLocalStorage=Me,e.useLockScroll=function(e,n){const o=i(e)?t.ref([]):u(t.unref(e))?s(e):s([e]),r=i(n)?{lockedClass:n,auto:!0}:n||{auto:!0};r.lockedClass||(r.lockedClass=se);const l=t.ref(!1),c=t.computed((()=>o.value.map((e=>t.ref(e))))),v=t.watch([l,c],(([e,t],[n,o])=>{for(const s of t){const t=a(s);if(r.lockedClass){if(!t)return;t.classList.toggle(r.lockedClass,e)}r.onChange&&(n===e&&o.find((e=>a(e)===t))||r.onChange(t,e))}}),{flush:"sync",deep:!1}),d=()=>l.value=!0,f=()=>l.value=!1;return i(e)&&t.onMounted((()=>o.value=Array.from(document.querySelectorAll(e)))),!1!==r.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:l,lock:d,unlock:f,remove:v}},e.useMatchMedia=re,e.useMouseDistanceFromElement=function(e,n,o){let r,s=g;if(S){const{pageX:u,pageY:l,remove:i}=R(window,n,o);r=t.computed((()=>{const t=a(e);return t?Math.floor(Math.sqrt(Math.pow(u.value-(t.offsetLeft+t.clientWidth/2),2)+Math.pow(l.value-(t.offsetTop+t.clientHeight/2),2))):0})),s=i}else r=t.computed((()=>-1));return{distance:r,remove:s}},e.useNetworkInformation=function(){const e=!!S&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,o=t.ref(0),r=t.ref(0),a=t.ref("none"),s=t.ref(0),u=t.ref(!1),l=t.ref("none");let i=g,c=g;return e&&(i=()=>{o.value=e.downlink,r.value=e.downlinkMax,a.value=e.effectiveType,s.value=e.rtt,u.value=e.saveData,l.value=e.type},c=M(e,"change",i,y),i()),{supported:n,downlink:o,downlinkMax:r,effectiveType:a,rtt:s,saveData:u,type:l,remove:c}},e.useNow=Re,e.useOnMouseMove=R,e.useOnOutsidePress=function(e,t){if(!S)return()=>{};const n=s(e),o=x.find((e=>`on${e}`in document.documentElement));return M(document,o,(e=>n.value&&!n.value.contains(e.target)&&t(e)),{passive:!0})},e.useOnResize=function(e,n,o){const r=s(e),a=t.ref(r.value&&r.value.clientHeight),u=t.ref(r.value&&r.value.clientWidth);let l=()=>{a.value=r.value.clientHeight,u.value=r.value.clientWidth};const[i,c]=d(n)?[void 0,n]:[n,o];c&&(l=k(l,o));const v=S?M(window,"resize",l,i||y):g;return t.isRef(e)&&!e.value&&t.onMounted(l),{height:a,width:u,remove:v}},e.useOnScroll=function(e,n,o){const r=e=>!(d(e)||c(e)||!m(e)&&!t.isRef(e)||!e),a=r(e)?s(e):t.ref(S&&window||void 0),u=r(e)?a:t.ref(S&&window.document.scrollingElement||void 0),l=t.ref(u.value&&u.value.scrollTop||0),i=t.ref(u.value&&u.value.scrollLeft||0);let v=()=>{l.value=u.value.scrollTop,i.value=u.value.scrollLeft};const f=L.reduce(((e,t)=>(e[t]=(...e)=>u.value&&u.value[t]&&u.value[t].apply(u.value,e),e)),{}),p=e=>f.scrollTo({top:e}),g=e=>f.scrollTo({left:e}),[h,w]=d(e)||!e?[y,e]:d(n)?[y,n]:[n,o];w&&(v=k(v,o));const b=M(a,"scroll",v,h),E=t.watch(l,p,{immediate:!1}),C=t.watch(i,g,{immediate:!1});return{scrollTop:l,scrollLeft:i,remove:()=>{b(),C(),E()},scrollTopTo:p,scrollLeftTo:g,...f}},e.useOnline=function(){const e=S&&"onLine"in navigator;return e||(q=t.ref(!1)),q||(q=t.ref(navigator.onLine),window.addEventListener("offline",(()=>q.value=!1),y),window.addEventListener("online",(()=>q.value=!0),y)),{supported:e,online:q}},e.usePageVisibility=function(){return Y||(Y=t.ref(S&&document.hidden)),X||(S?(X=t.ref(document.visibilityState),document.addEventListener("visibilitychange",(()=>{X.value=document.visibilityState,Y.value=document.hidden}),y)):X=t.ref("visible")),{visibility:X,hidden:Y}},e.usePagination=Te,e.usePath=xe,e.usePerformanceNow=function(e){return Re({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=O,e.usePromiseLazy=function(e,t=!1){return O(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const o=!e||l(e)?{}:e,r=l(e)?e:n;if(!l(e)&&!f(e))throw new Error("[useRetry] options needs to be 'object'");if(r&&!l(r))throw new Error("[useRetry] factory needs to be 'function'");const a=t.ref(!1),s=t.ref(),u=t.ref([]),i={value:!1},c={isRetrying:a,retryCount:t.computed((()=>u.value.length)),nextRetry:s,retryErrors:u,[j]:{value:0},[D]:i},v=r?(...e)=>(++c[j].value,A(o,c,r,e)):e=>(++c[j].value,A(o,c,e,void 0));return{...c,cancel:()=>{c.isRetrying.value=!1,c.retryErrors.value.push(new Error("[useRetry] cancelled")),c.nextRetry.value=void 0,i.value=!0},exec:v}},e.useSSRTitle=function(e){const n=Symbol(),o=t.inject(Fe,n);return o===n||void 0===o?t.ref(i(e)?e:""):(i(e)&&(o.value=e),o)},e.useSessionStorage=ke,e.useShare=function(e){const n=S&&"share"in navigator;let o=()=>Promise.resolve(!1),r=h,a=t.ref(!1),s=t.ref(!1);return n&&(o=e=>(a.value=!1,s.value=!1,navigator.share(e).then((e=>(a.value=!0,e))).catch((e=>(a.value=!1,s.value=!0,!1)))),r=e=>navigator.canShare(e),e&&r(e)&&o(e)),{supported:n,share:o,canShare:r,shared:a,cancelled:s}},e.useSharedRef=ae,e.useStorage=function(e,t,n){return void 0===Ie&&(Ie=$e("localStorage").supported),Ie?Me(e,t,n):ke(e,t)},e.useTimeline=function(e,n){const o=t.ref([]),r=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||b;return t.watch(e,((e,t)=>{o.value.unshift({item:r(t),date:new Date}),o.value.length>a&&o.value.pop()}),{immediate:!1,flush:"sync",...n}),$(o)},e.useTimeout=function(e,n=0){let o=t.ref(!1);const r=setTimeout((()=>{o.value=!0,e()}),n),a=()=>{o.value=null,clearTimeout(r)};return t.onUnmounted(a),{ready:o,cancel:a}},e.useTitle=function(e=null){const n=t.ref(i(e)?e:document.title),o=new MutationObserver((e=>{n.value=e[0].target.textContent}));t.watch(n,((e,t)=>{i(e)&&e!==t&&(document.title=e)}),{immediate:!0,flush:"sync"});const r=document.querySelector("title");return o.observe(r,{childList:!0}),t.onUnmounted((()=>o.disconnect())),n},e.useUndo=function(e,n){const o=s(e),r=t.ref([]),a=t.ref(0),u=n&&n.maxLength||b,l=n&&n.clone||(e=>e),i=t.computed((()=>{const e=0===a.value?1:a.value;return r.value.slice(e)})),c=t.computed((()=>{const e=0===a.value?1:0;return r.value.slice(e,a.value)}));t.watch(o,(e=>{if(r.value[a.value]===e)return;if(a.value>0){const e=a.value;r.value.splice(0,e),a.value=0}r.value.length>u&&r.value.pop();const t=l(e);r.value.unshift(t)}),{...n,immediate:!0,flush:"sync"});const v=e=>{const t=Math.sign(e)<=0?Math.max(e,-c.value.length):Math.min(e,i.value.length);a.value+=t,o.value=r.value[a.value]};return{value:o,undo:(e=1)=>v(e),redo:(e=1)=>v(-e),jump:v,prev:i,next:c}},e.useVModel=function(e,t){console.warn("[useVModel] is not supported on @vue/composition-api.")},e.useValidation=function(e){const n=[],o=je({input:e},n),r=t.reactive(o.input);return n.forEach((e=>e(r))),r},e.useValueSync=function(e,n){const o=s(e),r=2===arguments.length?t.isRef(arguments[1])&&u(arguments[1].value)?arguments[1]:t.ref([s(arguments[1])]):t.ref(Array.from(arguments).slice(1).map((e=>s(e))));r.value.forEach((e=>{e.value=o.value}));let a=r.value.length;return t.watch([o,r],(([e,t])=>{if(a<t.length)t.forEach((t=>{t.value!==e&&(t.value=e)}));else{a=t.length;for(const n of t)if(n.value!==e)return void(o.value=n.value)}}),{deep:!0}),t.watch(o,(e=>{r.value.forEach((t=>t.value=e))}),{deep:!0,flush:"sync"}),r},e.useWebSocket=function(e,n){const o=S&&"WebSocket"in window;let r=null;const a=t.ref(null),s=t.ref(null),u=t.ref(null),l=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=g,d=g;return o&&(r=new WebSocket(e,n),r.addEventListener("message",(e=>{a.value=e,u.value=e.data})),r.addEventListener("error",(e=>{s.value=e,c.value=!0})),r.addEventListener("close",(()=>{l.value=!1,i.value=!0})),r.addEventListener("open",(()=>{l.value=!0,i.value=!1})),v=e=>r.send(e),d=(e,t)=>{r.close(e,t)}),{supported:o,ws:r,send:v,close:d,messageEvent:a,errorEvent:s,data:u,isOpen:l,isClosed:i,errored:c}},e.useWebStorage=$e,e.useWorker=function(e,n,o){const r=S&&"Worker"in self,a=t.ref(),s=t.ref(),u=t.ref(!r),l=t.ref(!r);if(!r)return u.value=!0,{worker:void 0,data:s,postMessage:g,terminate:g,errorEvent:a,errored:l,terminated:u};const i=new Worker(e,o),c=e=>i.postMessage(e);function v(){i.terminate(),u.value=!0}return i.addEventListener("message",(e=>{s.value=e.data}),y),i.addEventListener("error",(e=>{a.value=e,l.value=!0}),y),t.onUnmounted(v),n&&c(n),{worker:i,data:s,postMessage:c,terminate:v,errorEvent:a,errored:l,terminated:u}},e.useWorkerFunction=function(e,n){const o=S&&"Worker"in self,r=t.computed((()=>n&&a(n.dependencies)||[])),s=t.computed((()=>n&&a(n.timeout)));if(!o)return P(e,{lazy:!0,throwException:!0});const u=P(((...n)=>new Promise(((o,a)=>{const l=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${oe.toString()})(${e.toString()})`],o=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(o)}(e,r.value),i=new Worker(l);let c=-1;const v=s.value,d=()=>{i.terminate(),URL.revokeObjectURL(l),clearTimeout(c),m()},f=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed((()=>u.cancelled.value||n[n.length-1].value)):u.cancelled,m=f?t.watch(f,(()=>{d(),o(void 0)}),{immediate:!1}):g;i.addEventListener("message",(e=>{e.data[0]?o(e.data[1]):a(e.data[1]),d()}),y),i.addEventListener("error",(e=>{d(),a(e)}),y),i.postMessage([...n]),v&&(c=setTimeout((()=>{u.cancel(`[WebWorker] timeout after ${v}ms`)}),v))}))),{lazy:!0,throwException:!0});return u},e.wrap=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({},vueCompositionApi,Vue); |
@@ -1,1 +0,1 @@ | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function o(e){return t.isRef(e)?e:t.ref(e)}const r=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise((t=>{setTimeout(t,e)}))}const g=2**32-2;function y(e,t,n){return e<t?t:e>n?n:e}const w="undefined"!=typeof window;function b(e,...t){for(let o=0;o<t.length;o++){const r=t[o];if(void 0===r||!c(r))continue;const a=Object.keys(r);for(let t=0;t<a.length;t++){const o=a[t],u=n(r[o]),l=typeof u,s=typeof e[o];void 0!==e[o]&&l!==s||(e[o]=c(u)?b(e[o]||{},u):r[o])}}return e}function E(e,n,r,a){let u=f;if(e){const l=o(e),s=e=>e.removeEventListener(n,r),i=e=>e.addEventListener(n,r,a),c=t.watch(l,((e,t,n)=>{e&&(i(e),n((()=>s(e))))}),{immediate:!0});u=()=>{s(l.value),c()}}return u}function S(e,t,n){return $(e,t,n)}function $(e,t=50,n={isImmediate:!1}){let o;return function(...r){const a=this,u=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(a,r)}),t),u&&e.apply(a,r)}}function M(e,n,o){const r=t.ref(0),a=t.ref(0),u=t.ref(0),l=t.ref(0);let s=e=>{r.value=e.x,a.value=e.y,u.value=e.pageX,l.value=e.pageY};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=S(s,o));const d=E(e,"mousemove",s,c);return{mouseX:r,mouseY:a,pageX:u,pageY:l,remove:d}}const I=["scrollBy","scrollTo","scrollIntoView"];const k=["mousedown","touchstart"];function x(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[o,r]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:r,o=i.value=e(...t);try{const e=await o;return i.value===o&&(s.value=e),e}catch(e){return i.value===o&&(u.value=e,s.value=null),n?o:void 0}finally{i.value===o&&(a.value=!1)}};return o||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function L(e,n){const o=t.ref(!1);let r;const a=x(((...t)=>{return n=e(...t),new Promise(((e,t)=>{o.value=!1,r=e=>{o.value=!0,t(e)},n.then(e).catch(t)}));var n}),n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted((()=>r&&r())),{...a,cancel:e=>{r&&r(e)},cancelled:o}}const R=Symbol(""),C=Symbol(""),T=async(e,t,n,o)=>{const r=t[R].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||O;let c;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;do{let e=!1,v=null;try{if(++a,v=o?n(...o):n(),d(v)&&(v=await v),t[C].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(r!==t[R].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error(`[useRetry] max retries reached ${u}`));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[C].value)return null;if(r!==t[R].value)return v}while(a<9e3);return null};const O=()=>0;const P=Symbol("");function j(e,t){a(e.provide)?e.provide(P,t):console.warn("[vue-composable] devtools is not supported for vue 2")}function D(){const e={},n=t.inject(P,e);if(n!==e)return n;console.warn("[vue-composable] devtools not found, please run app.use(VueComposableDevtools)")}let A;A=e=>{let t;const n=[],o=[],r=new Proxy({},{get:(e,o)=>t?t.on[o]:o in e?e[o]:e[o]=(...e)=>{n.push({type:o,args:e})}}),a=new Proxy({on:r},{get:(e,n)=>"on"===n?e.on:t?t[n]:n in e?e[n]:e[n]=(...e)=>{o.push({type:n,args:e})}});return e.then((e=>{t=e,async function(e,t,n){setTimeout((async()=>{const o=["addTimelineLayer","addInspector","sendInspectorTree","sendInspectorState","addTimelineEvent"];for(const t of o){for(const o of n.filter((e=>e.type===t)))e[t](...o.args);await h(20)}new Set(n.filter((e=>"notifyComponentUpdate"===e.type)).map((e=>e.args[0]))).forEach((t=>e.notifyComponentUpdate(t))),t.forEach((t=>e.on[t.type](...t.args))),t.length=0,n.length=0}),100)}(t,n,o)})),a};var F=A;const U=(e,t="vue-composable",n="Vue-composable devtools plugin")=>{const o=new Promise((e=>{}));j(e,F(o))},V={install:(e,t={id:"vue-composable",label:"Vue-composable devtools plugin"})=>U(e,t.id,t.label)};function _(e){if(!e)return{};const t=!!e.__v_isRef,n=t&&!!e.effect,o=!!e.__v_reactive,r=n?"Computed":t?"Ref":o?"Reactive":null;return{...r?{objectType:r}:{},...e.effect?{raw:e.effect.raw.toString()}:{}}}function W(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let N,z,B,H,K;function q(e,n){const o=w&&"BroadcastChannel"in self,r=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(o){const o=new BroadcastChannel(e);o.addEventListener("messageerror",(e=>{u.value=e,l.value=!0}),p),o.addEventListener("message",(e=>{a.value=e,r.value=e.data}),p),i=e=>o.postMessage(e),c=()=>{o.close(),s.value=!0},v=(e,n)=>{o.addEventListener("message",e,n),t.onUnmounted((()=>o.removeEventListener("message",e)))},t.onUnmounted((()=>{n&&n(),c()}))}return{supported:o,data:r,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function X(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function Y(e,t,n){e.style.setProperty(t,n)}const J={attributes:!0,childList:!0,subtree:!0},Q=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?`--${e}`:e;const G=e=>function(t){const n=t.data||[];return new Promise((t=>{try{Promise.resolve(e.apply(e,n)).then((e=>t(postMessage([!0,e])))).catch((e=>t(postMessage([!1,e]))))}catch(e){t(postMessage([!1,e]))}}))};function Z(e){const n=!!w&&"matchMedia"in window;let o,r,a=f;if(n){o=t.ref(matchMedia(e)),r=t.ref(o.value.matches);const n=e=>{r.value=e.matches};o.value.addEventListener("change",n,p);const a=()=>o.value.removeEventListener("change",n);t.onUnmounted(a)}else o=t.ref({}),r=t.ref(!1);return{supported:n,mediaQueryList:o,matches:r,remove:a}}function ee(e,n){const{addListener:o,send:r,close:a,supported:u}=q(e,(()=>y())),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed((()=>1!==i.value||s.value)),d=t.ref([]),f=t.ref(n);let m,h=!1;r({type:0});const g=()=>r({type:5,id:l}),y=()=>{0!==d.value.length&&(s.value&&r({type:3,mind:1,id:Math.min(...d.value)}),r({type:4,id:l}))};return o((e=>{switch(e.data.type){case 0:r({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),m===e.data.id&&d.value.length>0&&r({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:h=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,m=1===e.data.mind&&e.data.id||void 0,s.value=m===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],r({type:6,id:l});break;case 6:d.value.push(e.data.id)}}),p),g(),t.watch(f,((e,t)=>{if(h)h=!1;else{if(1===i.value&&!1===s.value)return h=!0,void(f.value=t);r({type:2,mind:i.value,value:c(e)?{...e}:e}),h=!1}}),{deep:!0,immediate:!1}),w&&window.addEventListener("unload",y,p),t.onUnmounted((()=>{y(),a()})),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,r({type:3,id:l,mind:i.value})},addListener:o}}const te="no-scroll";function ne(e,n){return t.inject(e,n,!0)}function oe(e,n){const a=o(n),l=o(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||r(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function re(e,o){const[r,a]=oe(e,o),u=t.computed((()=>new Intl.NumberFormat(n(r),n(a)))),l=(e,t,o)=>(t||o?new Intl.NumberFormat(n(o)||n(r),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,o)=>t.computed((()=>l(e,n,o))),formatString:l,formatter:u}}function ae(e){if(e)return i(e)?e:ue(e)}const ue=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function le(e){const n={},o=new Map,r=t.ref();let a=[];const u=[];for(const r in e){const l=e[r],s=ae(l);if(void 0!==s){const e=t.ref(!1);n[r]=e,o.set(s,{name:r,valid:e}),a.push(s)}else{const{matches:e,remove:t}=Z(l);n[r]=e,u.push(t)}}a=a.sort(((e,t)=>t-e));const l=w?()=>{const e=window.innerWidth;let t;for(let n=0;n<a.length;n++){const r=a[n],u=o.get(r);u.valid.value=e>=r,e>=r&&void 0===t&&(t=u.name)}r.value=t}:f,s=S(l,10),i=w?()=>window.removeEventListener("resize",s):f;return w&&(t.onMounted((()=>{l(),window.addEventListener("resize",s,p)})),t.onUnmounted((()=>{i(),u.forEach((e=>e()))}))),{...n,remove:i,current:r}}const se=Symbol(""),ie={sm:640,md:768,lg:1024,xl:1280};function ce(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function ve(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function de(e){return i(e)?e+"px":e}function fe(e){const t=[];if(r(e)){const n=e.map(fe);for(let e=0;e<n.length;e++){const o=n[e];t.push(...o)}}else c(n=e)&&u(n.raw)?t.push(e.raw):ve(e)?t.push(function(e){return ve(e)?`(${[e.max&&`max-width: ${de(e.max)}`,e.min&&`min-width: ${de(e.min)}`].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${de(e)})`);var n;return t}function me(e){const n=ce(e)?e.theme.screens:e;if(ce(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=fe(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=fe(n[e]).join(" or ")))}const o=le(n);return t.provide(se,o),o}function pe(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function he(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return pe(t,e)}}function ge(e,t){try{return e.parse(t)}catch{return t}}let ye,we;function be(e,r=JSON,a=10){const l=w?window[e]:void 0,s=he(l);ye||(ye=new Map,w&&window.addEventListener("storage",(e=>{if(e.newValue===e.oldValue)return;let t=ye.get("localStorage");t=e.storageArea===window.localStorage?ye.get("localStorage"):ye.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))})));let i,c=ye.get(e);return s&&l?c?i=c.$quotaError:(i=t.ref(!1),c={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:i,key:l.key,length:l.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},save(e,t){try{const n=l.getItem(e),o=u(t)?t:r.stringify(t);l.setItem(e,o),n!==o&&w&&c.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:n,storageArea:l}))}catch(e){i.value=pe(e,l)}},clear(){this.$refMap.forEach(((e,t)=>this.removeItem(t)))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),l.removeItem(e)},getItem(e){const t=l.getItem(e);return t?this.setItem(e,ge(r,t)):null},getRef(e){const u=t.ref();let s=t.watch(o(e),(e=>{const t=l.getItem(e);if(!t)return u.value=null;u.value=ge(r,t)}),{immediate:!0,flush:"sync"}),i=t.watch(u,$((t=>{this.save(n(e),t)}),a),{deep:!0,flush:"sync"});const c=Math.random().toString();return this.$watchHandlers.set(c,(()=>{s(),i()})),this.$refMap.set(c,u),u},setItem(e,n){const r=o(n);this.$refMap.set(e,r),this.save(e,n);const u=t.watch(r,$((t=>{this.save(e,t)}),a),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,u),r},updateItem(e,t){let n=this.$refMap.get(e);n&&(n.value=ge(r,t))}},ye.set(e,c)):(i=t.ref(!1),c={}),{supported:s,quotaError:i,store:c,remove:()=>ye.delete(e)}}function Ee(e,o,r){const{supported:a,store:u}=be("localStorage");let l,s=f,i=f,c=f;return a&&u?(c=t=>u.setSync(n(e),t),s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o),t.watchEffect((()=>{!1!==r&&c(!0)}))):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function Se(e,o,r){const{supported:a,store:u}=be("sessionStorage");let l,s=f,i=f,c=m;return a&&u?(s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o)):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function $e(e){const n=o(e.currentPage),r=o(e.pageSize),a=t.ref(0),u=o(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=y(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>r.value,set(e){i(e)&&(r.value=e)}}),v=t.computed((()=>Math.ceil(u.value/c.value)));s.value=n.value;return t.watch([u,c],(e=>{s.value>v.value&&(s.value=v.value)}),{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function Me(e){const n=1e3,o=e&&e.refreshMs||n,r=!e||!l(e.sync)||e.sync,u=e&&a(e.timeFn)&&e.timeFn||Date.now;let s,i;const c=t.ref(u()),v=()=>{clearInterval(s),clearTimeout(i)},d=w?()=>s=setInterval((()=>c.value=u()),o):f;if(r){const e=n-(c.value-Math.floor(c.value/n)*n);i=setTimeout(d,e)}else d();return t.onUnmounted(v),{now:c,remove:v}}function Ie(e,o){return t.computed((()=>{const a=n(e);if(!o)return a;const u=t.isRef(o)?t.reactive(o.value):t.reactive(o);return a.replace(/({?{[\w\s]*}?})/g,(e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return`${t}`;const o=r(u)?u[+t]:u[t];return void 0===o?e:`${n(o)}`}))}))}function ke(e,o,r=".",a=f){return t.computed((()=>{const t=n(e),u=n(o);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(r);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let o=n,r=t.exec(o);if(r){let a=r[0].length,u=r.index-a,s=1;do{r.index,u=r.index,a=r[0].length,n=n.slice(0,-r[0].length),l.splice(e+s,0,r[1]),++s}while(r=t.exec(o));if(!n&&"["===o[0]&&o.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${o}"`)}if(!c(s))return a(l.slice(0,e+1).join(r),s,u,t);if(!n)return a(l.slice(0,e+1).join(r),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(r),s,u,t)}return s}))}function xe(e){return void 0!==e.$value}const Le=(e,o,r)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(o)?o:{$validator:o,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f,$touch:m}=((e,o,r,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=o(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?r.value||!0:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch((e=>(s.value=n(e),i.value=!0,e)))};return a.push((n=>{c=n,t.watch((()=>{try{o(e.value,c)}catch(e){}return e.value}),v,{deep:!0,immediate:!0})})),{$promise:u,$pending:l,$invalid:i,$error:s,$touch:function(){v(e.value)}}})(e,u,t.ref(a),r);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,$touch:m,...l}},Re=(e,r)=>{const a={},u=xe(e)?o(e.$value):void 0;for(const o of Object.keys(e))if("$"!==o[0])if(u){const t=Le(u,e[o],r);a[o]=t}else{const u=Re(e[o],r);let s,i,v,d=f;if(xe(u)){const e=Object.keys(u).filter((e=>"$"!==e[0])).map((e=>u[e]));i=t.computed((()=>e.map((e=>e.$error)).map((e=>n(e))).filter((e=>void 0!==e)))),v=t.computed((()=>e.some((e=>!!n(e.$invalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}else{const e=Object.keys(u).map((e=>u[e]));i=t.computed((()=>e.map((e=>n(e.$errors))).filter((e=>void 0!==e)).filter((e=>e.some(Boolean))))),s=t.computed((()=>e.some((e=>n(e.$anyDirty)||l(n(e.$dirty))&&n(e.$dirty))))),v=t.computed((()=>e.some((e=>!!n(e.$anyInvalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}if(a[o]={toObject:d,...u,$errors:i,$anyInvalid:v},s){a[o].$anyDirty=s;const e=Object.keys(a[o]).filter((e=>"$"!==e[0]&&c(a[o][e])));a[o].$touch=()=>{e.forEach((e=>{const t=a[o][e].$touch;t&&t()}))},a[o].$reset=()=>{e.forEach((e=>{const t=a[o][e].$reset;t&&t()}))}}}else{if("$value"===o){a[o]=u;const e=t.ref(!1),r=t.watch(u,(()=>{e.value=!0,r()}),{immediate:!1,deep:!0});a.$dirty=e,a.$reset=()=>e.value=!1,a.$touch=()=>e.value=!0,a.toObject=()=>n(u);continue}a[o]=e[o]}return a};const Ce=Symbol("");function Te(e){const r=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=e=>("__esModule"in e||"Module"===e[Symbol.toStringTag])&&"default"in e?e.default:e,m=(e,n)=>{if(v[e])return v[e];const r=n.value[e];if(!r)return t.ref({});let u=a(r)?r():r;return d(u)?u.then((t=>v[e]=o(f(t)))):a(r)?o(f(u)):v[e]=t.computed((()=>f(n.value[e])))},p=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(p){const t=m(e.fallback,u);d(t)?(t.then((e=>{c.value=e.value})),h=!0):c.value=t.value}else c.value={};const g=t.ref(0);t.watch(u,(()=>g.value++),{deep:!0,immediate:!1}),t.watch([s,c,g],(([t,o,r])=>{if(t===e.fallback&&p)i.value=o;else{const e=e=>i.value=b({},o,n(e)),r=m(t,u);d(r)?r.then(e):e(r)}}),{immediate:!h});const y=(t,n)=>e.resolve?o(e.resolve(i.value,t,n)):Ie(ke(i,t,".",((e,t,n,o)=>n)),n);return{locale:s,locales:r,i18n:i,$t:y,$ts:(e,t)=>y(e,t).value,addLocale:(e,t)=>{r.value.indexOf(e)>=0||r.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=r.value.indexOf(t);if(n>=0){const o=[s.value,c.value&&e.fallback,...r.value].find((e=>e&&e!==t));o&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=o)),r.value.splice(n,1)}delete u.value[t],delete v[t]}}}function Oe(e){const n=Te(e);return t.provide(Ce,n),n}const Pe=Symbol("");const je=Symbol(""),De={install(e){const n=t.ref(!0),o=t.readonly(n);{e._context.provides[je]=o;const t=e.mount;e.mount=(...e)=>{const o=t(...e);return n.value=!1,o}}}};return e.COMMIT="2a583c0",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=g,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS=te,e.UseDevtoolsApp=U,e.VERSION="1.0.0-beta.19",e.VUE_VERSION="3",e.VueComposableDevtools=V,e.buildI18n=Te,e.debounce=$,e.deepClone=b,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(r(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=X,e.getDevtools=D,e.hydrationPlugin=De,e.injectFactory=ne,e.isArray=r,e.isBoolean=l,e.isClient=w,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNull=e=>null===e,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=e=>void 0===e,e.minMax=y,e.noDelay=O,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=o(void 0===t?"":t);return e.provide(Pe,n),n},e.refDebounced=function(e,n){let[o,r]=1===arguments.length&&i(e)&&void 0===n?[t.ref(),e]:[t.ref(e),n];return t.customRef(((e,t)=>({get:()=>(e(),o.value),set:$((e=>{o.value=e,t()}),r)})))},e.refShared=function(e,n){const o=t.getCurrentInstance(),r=n||o.vnode.scopeId;if(!r)return t.ref(e);const{data:a,supported:u}=ee(r,e);return a},e.setBreakpointTailwindCSS=me,e.setCssVariableFor=Y,e.setDevtools=j,e.setI18n=Oe,e.storageAvailable=he,e.unwrap=n,e.useArrayPagination=function(e,n){const r=o(e),a=$e({currentPage:1,pageSize:10,...n,total:t.computed((()=>r.value.length))}),u=t.computed((()=>{const e=r.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]}));return{...a,result:u}},e.useBreakpoint=le,e.useBreakpointChrome=function(){return le({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return ne(se,(()=>me(e||ie)))},e.useBroadcastChannel=q,e.useCancellablePromise=L,e.useClipboard=function(){const e=w&&"clipboard"in navigator,n=t.ref(),o=t.ref(),r=t=>(n.value=t,e?navigator.clipboard.writeText(t):Promise.resolve());let a=()=>Promise.resolve(void 0),l=a;if(e){let e=!1;const s=()=>a().then((e=>n.value=e));["copy","cut","focus"].map((e=>E(window,e,(()=>s())))),a=()=>navigator.clipboard.readText().then((t=>{try{return e=!0,n.value=t}finally{e=!1}})),l=()=>navigator.clipboard.read().then((e=>o.value=e)),t.watch(n,$((t=>{!e&&u(t)&&r(t)}),100))}return{supported:e,text:n,data:o,writeText:r,readText:a,write:t=>e?navigator.clipboard.write(t):Promise.resolve(),read:l}},e.useCssVariables=function(e,r,a){const l=w&&"MutationObserver"in self,[s,i]=t.isRef(r)||v(r)?[r,a||J]:[l&&document.documentElement||{},r||J],c=t.ref(!0),d={},m=[],p=Object.entries(e).map((e=>{const[t,r]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return r&&(m.push((()=>Y(n(s),t,n(r)))),d[e[0]]=o(r)),[e[0],Q(t)]}));for(let e=0;e<p.length;e++){const[r,a]=p[e];d[r]||(d[r]=t.ref(t.isRef(s)&&!s.value||!l?null:X(n(s),a))),l&&t.watch([d[r],o(s)],(e=>{c&&e[1]&&e[0]!==X(e[1],a)&&Y(e[1],a,e[0])}),{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,o]=p[e];d[t].value=X(n(s),o)}},g=new MutationObserver(h),y=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(y),t.isRef(s)?t.onMounted((()=>{m.forEach((e=>e())),t.watch(s,((e,t)=>{t&&y(),e&&b()}))})):(w||s)&&(m.forEach((e=>e())),b()),{...d,supported:l,resume:b,stop:y,observing:c}},e.useCurrencyFormat=function(e,o,r){const a=n(e),u=!c(a),l=u?e:t.computed((()=>n(e).currency)),[s,i]=oe(o,u?r:e),v=t.computed((()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}})),d=re(s),f=(e,t,o,r,a)=>{const u={...v.value,...n(r)},l=n(t)||u.currency,s=n(o)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,o,r,a)=>t.computed((()=>f(e,n,o,r,a))),formatString:f}},e.useDateNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=S,e.useDevtoolsComponentState=function(e,o){const u=t.getCurrentInstance(),l=D();l&&u&&l.on.inspectComponent(((t,l)=>{if(t.componentInstance!==u)return;const[s,i]=c(o)?[o.type,o.multiple]:["setup",!1];if(a(e))return void e(t.instanceData,l);let v=r(e)?e:Object.keys(e).map((t=>({type:s,key:t,value:n(e[t]),..._(e[t])})));if(!i){const e=new Set(t.instanceData.state.map((e=>e.key)));v=v.filter((t=>!e.has(t.key)))}t.instanceData.state.push(...v)}))},e.useDevtoolsInspector=function(e,n=[]){const o=D(),r=t.ref(n),a=t.computed((()=>{if(!r.value)return new Map;const e=t.toRaw(r.value),n=new Map;for(const t of e)n.set(t.id,t);return n}));if(o){const n=e.id;o.addInspector(e),o.on.getInspectorTree((o=>{if(o.inspectorId!=n)return;if(!r.value)return;const a=o.filter;let u=t.toRaw(r.value);o.filter&&(u=e.nodeFilter?e.nodeFilter(o.filter,u):u.filter((e=>e.id.indexOf(a)>=0||e.label.indexOf(a)>=0))),o.rootNodes=u})),o.on.getInspectorState((o=>{if(o.inspectorId!=n)return;const r=a.value.get(o.nodeId);if(r){const n=t.reactive(r.state);o.state=e.stateFilter?e.stateFilter("",n):n}})),t.watch(r,(()=>{o.sendInspectorTree(n),o.sendInspectorState(n)}),{immediate:!0,deep:!0})}return{nodes:r}},e.useDevtoolsTimelineLayer=function(e,t,n){const o=D();let r=f,a=f;return o&&(o.addTimelineLayer({id:e,label:t,color:n}),r=(t,n)=>o.addTimelineEvent({layerId:e,event:t,all:n}),a=e=>r({...e,time:Date.now()})),{id:e,addEvent:r,pushEvent:a}},e.useEvent=E,e.useFetch=function(e,n){const o=t.ref(null),r=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=W(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:W(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:W(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=x((async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then((e=>o.value=e)).catch((e=>{o.value=null,l.value=e})):Promise.resolve(),n.clone().blob().then((e=>{a.value=e})),n.clone().text().then((e=>{r.value=e}))];i&&await Promise.all(e)}return n}),!0),g=t.computed((()=>h.result.value&&h.result.value.status||null)),y=t.computed((()=>h.result.value&&h.result.value.statusText||null));return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted((()=>{m&&p("unmounted")})),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:r,blob:a,json:o,jsonError:l,status:g,statusText:y}},e.useFormat=Ie,e.useGeolocation=function(e){const n=w&&!!navigator.geolocation,o=t.ref(e?!1===e.immediate:void 0),r=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,r.value=null},c=e=>{a.value=Date.now(),u.value=null,r.value=e},v=()=>!0!==o.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=o.value?()=>{o.value?o.value=!1:d()}:d;let f=0;t.onMounted((()=>t.watch([s,o],(t=>{v();const o=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:o}:{enableHighAccuracy:o})}),{immediate:!o.value}))),t.onUnmounted(v)}return{supported:n,refresh:i,error:r,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(je,t.computed((()=>!1)))},e.useI18n=function(e){return e?Oe(e):t.inject(Ce)},e.useIntersectionObserver=function(e,r){const a=w&&"IntersectionObserver"in window,u=e?o(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed((()=>r?n(r):l?void 0:n(e))),i=t.ref([]),c=t.computed((()=>i.value.length>0&&i.value.every((e=>e.isIntersecting)))),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,(e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map((e=>e.target)).forEach(m.value.observe)}),{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted((()=>{l.value&&p(l)})),t.onUnmounted((()=>{g()}))),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...o){let r;const a=(t,...a)=>{if(u(),!t&&!n)return;return r=setInterval(e,t||n,...a&&a.length?a:o)},u=()=>{r&&(clearInterval(r),r=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,o){const[r,a]=oe(e,o),l=t.computed((()=>new Intl.DateTimeFormat(n(r),n(a)))),s=(e,t,o)=>{const s=t||o?new Intl.DateTimeFormat(n(o)||n(r),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,o)=>t.computed((()=>s(e,n,o))),formatString:s,formatter:l}},e.useIntlNumberFormat=re,e.useLanguage=function(){if(H||(H=w?t.ref(navigator.language):t.ref("")),!K)if(w){K=t.ref(navigator.languages);const e=()=>{H.value=navigator.language,K.value=navigator.languages};window.addEventListener("languagechange",e,p)}else K=t.ref([]);return{language:H,languages:K}},e.useLocalStorage=Ee,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):r(t.unref(e))?o(e):o([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass=te);const i=t.ref(!1),c=t.computed((()=>l.value.map((e=>t.ref(e))))),v=t.watch([i,c],(([e,t],[o,r])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(o===e&&r.find((e=>n(e)===t))||s.onChange(t,e))}}),{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted((()=>l.value=Array.from(document.querySelectorAll(e)))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=Z,e.useMouseDistanceFromElement=function(e,o,r){let a,u=f;if(w){const{pageX:l,pageY:s,remove:i}=M(window,o,r);a=t.computed((()=>{const t=n(e);return t?Math.floor(Math.sqrt(Math.pow(l.value-(t.offsetLeft+t.clientWidth/2),2)+Math.pow(s.value-(t.offsetTop+t.clientHeight/2),2))):0})),u=i}else a=t.computed((()=>-1));return{distance:a,remove:u}},e.useNetworkInformation=function(){const e=!!w&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,o=t.ref(0),r=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{o.value=e.downlink,r.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=E(e,"change",i,p),i()),{supported:n,downlink:o,downlinkMax:r,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=Me,e.useOnMouseMove=M,e.useOnOutsidePress=function(e,t){if(!w)return()=>{};const n=o(e),r=k.find((e=>`on${e}`in document.documentElement));return E(document,r,(e=>n.value&&!n.value.contains(e.target)&&t(e)),{passive:!0})},e.useOnResize=function(e,n,r){const a=o(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,r];v&&(s=S(s,r));const d=w?E(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,r){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?o(e):t.ref(w&&window||void 0),s=a(e)?u:t.ref(w&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=I.reduce(((e,t)=>(e[t]=(...e)=>s.value&&s.value[t]&&s.value[t].apply(s.value,e),e)),{}),h=e=>m.scrollTo({top:e}),g=e=>m.scrollTo({left:e}),[y,b]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,r];b&&(f=S(f,r));const $=E(u,"scroll",f,y),M=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,remove:()=>{$(),k(),M()},scrollTopTo:h,scrollLeftTo:g,...m}},e.useOnline=function(){const e=w&&"onLine"in navigator;return e||(N=t.ref(!1)),N||(N=t.ref(navigator.onLine),window.addEventListener("offline",(()=>N.value=!1),p),window.addEventListener("online",(()=>N.value=!0),p)),{supported:e,online:N}},e.usePageVisibility=function(){return B||(B=t.ref(w&&document.hidden)),z||(w?(z=t.ref(document.visibilityState),document.addEventListener("visibilitychange",(()=>{z.value=document.visibilityState,B.value=document.hidden}),p)):z=t.ref("visible")),{visibility:z,hidden:B}},e.usePagination=$e,e.usePath=ke,e.usePerformanceNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=x,e.usePromiseLazy=function(e,t=!1){return x(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const o=!e||a(e)?{}:e,r=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(r&&!a(r))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed((()=>s.value.length)),nextRetry:l,retryErrors:s,[R]:{value:0},[C]:i},d=r?(...e)=>(++v[R].value,T(o,v,r,e)):e=>(++v[R].value,T(o,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),o=t.inject(Pe,n);return o===n||void 0===o?t.ref(u(e)?e:""):(u(e)&&(o.value=e),o)},e.useSessionStorage=Se,e.useShare=function(e){const n=w&&"share"in navigator;let o=()=>Promise.resolve(!1),r=m,a=t.ref(!1),u=t.ref(!1);return n&&(o=e=>(a.value=!1,u.value=!1,navigator.share(e).then((e=>(a.value=!0,e))).catch((e=>(a.value=!1,u.value=!0,!1)))),r=e=>navigator.canShare(e),e&&r(e)&&o(e)),{supported:n,share:o,canShare:r,shared:a,cancelled:u}},e.useSharedRef=ee,e.useStorage=function(e,t,n){return void 0===we&&(we=be("localStorage").supported),we?Ee(e,t,n):Se(e,t)},e.useTimeline=function(e,n){const o=t.ref([]),r=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||g;return t.watch(e,((e,t)=>{o.value.unshift({item:r(t),date:new Date}),o.value.length>a&&o.value.pop()}),{immediate:!1,flush:"sync",...n}),t.readonly(o)},e.useTimeout=function(e,n=0){let o=t.ref(!1);const r=setTimeout((()=>{o.value=!0,e()}),n),a=()=>{o.value=null,clearTimeout(r)};return t.onUnmounted(a),{ready:o,cancel:a}},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),o=new MutationObserver((e=>{n.value=e[0].target.textContent}));t.watch(n,((e,t)=>{u(e)&&e!==t&&(document.title=e)}),{immediate:!0,flush:"sync"});const r=document.querySelector("title");return o.observe(r,{childList:!0}),t.onUnmounted((()=>o.disconnect())),n},e.useUndo=function(e,n){const r=o(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||g,s=n&&n.clone||(e=>e),i=t.computed((()=>{const e=0===u.value?1:u.value;return a.value.slice(e)})),c=t.computed((()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)}));t.watch(r,(e=>{if(a.value[u.value]===e)return;if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop();const t=s(e);a.value.unshift(t)}),{...n,immediate:!0,flush:"sync"});const v=e=>{const t=Math.sign(e)<=0?Math.max(e,-c.value.length):Math.min(e,i.value.length);u.value+=t,r.value=a.value[u.value]};return{value:r,undo:(e=1)=>v(e),redo:(e=1)=>v(-e),jump:v,prev:i,next:c}},e.useVModel=function(e,n){const o=t.getCurrentInstance();return o?t.computed({get:()=>e[n],set(e){o.emit(`update:${n}`,e)}}):t.ref()},e.useValidation=function(e){const n=[],o=Re({input:e},n),r=t.reactive(o.input);return n.forEach((e=>e(r))),r},e.useValueSync=function(e,n){const a=o(e),u=2===arguments.length?t.isRef(arguments[1])&&r(arguments[1].value)?arguments[1]:t.ref([o(arguments[1])]):t.ref(Array.from(arguments).slice(1).map((e=>o(e))));u.value.forEach((e=>{e.value=a.value}));let l=u.value.length;return t.watch([a,u],(([e,t])=>{if(l<t.length)t.forEach((t=>{t.value!==e&&(t.value=e)}));else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}}),{deep:!0}),t.watch(a,(e=>{u.value.forEach((t=>t.value=e))}),{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const o=w&&"WebSocket"in window;let r=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return o&&(r=new WebSocket(e,n),r.addEventListener("message",(e=>{a.value=e,l.value=e.data})),r.addEventListener("error",(e=>{u.value=e,c.value=!0})),r.addEventListener("close",(()=>{s.value=!1,i.value=!0})),r.addEventListener("open",(()=>{s.value=!0,i.value=!1})),v=e=>r.send(e),d=(e,t)=>{r.close(e,t)}),{supported:o,ws:r,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=be,e.useWorker=function(e,n,o){const r=w&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!r),s=t.ref(!r);if(!r)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,o),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",(e=>{u.value=e.data}),p),i.addEventListener("error",(e=>{a.value=e,s.value=!0}),p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,o){const r=w&&"Worker"in self,a=t.computed((()=>o&&n(o.dependencies)||[])),u=t.computed((()=>o&&n(o.timeout)));if(!r)return L(e,{lazy:!0,throwException:!0});const l=L(((...n)=>new Promise(((o,r)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${G.toString()})(${e.toString()})`],o=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(o)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed((()=>l.cancelled.value||n[n.length-1].value)):l.cancelled,h=m?t.watch(m,(()=>{d(),o(void 0)}),{immediate:!1}):f;i.addEventListener("message",(e=>{e.data[0]?o(e.data[1]):r(e.data[1]),d()}),p),i.addEventListener("error",(e=>{d(),r(e)}),p),i.postMessage([...n]),v&&(c=setTimeout((()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)}),v))}))),{lazy:!0,throwException:!0});return l},e.wrap=o,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueRuntimeCore); | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function o(e){return t.isRef(e)?e:t.ref(e)}const r=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise((t=>{setTimeout(t,e)}))}const g=2**32-2;function y(e,t,n){return e<t?t:e>n?n:e}const w="undefined"!=typeof window;function b(e,...t){for(let o=0;o<t.length;o++){const r=t[o];if(void 0===r||!c(r))continue;const a=Object.keys(r);for(let t=0;t<a.length;t++){const o=a[t],u=n(r[o]),l=typeof u,s=typeof e[o];void 0!==e[o]&&l!==s||(e[o]=c(u)?b(e[o]||{},u):r[o])}}return e}function E(e,n,r,a){let u=f;if(e){const l=o(e),s=e=>e.removeEventListener(n,r),i=e=>e.addEventListener(n,r,a),c=t.watch(l,((e,t,n)=>{e&&(i(e),n((()=>s(e))))}),{immediate:!0});u=()=>{s(l.value),c()}}return u}function S(e,t,n){return $(e,t,n)}function $(e,t=50,n={isImmediate:!1}){let o;return function(...r){const a=this,u=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(a,r)}),t),u&&e.apply(a,r)}}function M(e,n,o){const r=t.ref(0),a=t.ref(0),u=t.ref(0),l=t.ref(0);let s=e=>{r.value=e.x,a.value=e.y,u.value=e.pageX,l.value=e.pageY};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=S(s,o));const d=E(e,"mousemove",s,c);return{mouseX:r,mouseY:a,pageX:u,pageY:l,remove:d}}const I=["scrollBy","scrollTo","scrollIntoView"];const k=["mousedown","touchstart"];function x(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[o,r]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:r,o=i.value=e(...t);try{const e=await o;return i.value===o&&(s.value=e),e}catch(e){return i.value===o&&(u.value=e,s.value=null),n?o:void 0}finally{i.value===o&&(a.value=!1)}};return o||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function L(e,n){const o=t.ref(!1);let r;const a=x(((...t)=>{return n=e(...t),new Promise(((e,t)=>{o.value=!1,r=e=>{o.value=!0,t(e)},n.then(e).catch(t)}));var n}),n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted((()=>r&&r())),{...a,cancel:e=>{r&&r(e)},cancelled:o}}const R=Symbol(""),C=Symbol(""),T=async(e,t,n,o)=>{const r=t[R].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||O;let c;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;do{let e=!1,v=null;try{if(++a,v=o?n(...o):n(),d(v)&&(v=await v),t[C].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(r!==t[R].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error(`[useRetry] max retries reached ${u}`));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[C].value)return null;if(r!==t[R].value)return v}while(a<9e3);return null};const O=()=>0;const P=Symbol("");function j(e,t){a(e.provide)?e.provide(P,t):console.warn("[vue-composable] devtools is not supported for vue 2")}function D(){const e={},n=t.inject(P,e);if(n!==e)return n;console.warn("[vue-composable] devtools not found, please run app.use(VueComposableDevtools)")}let A;A=e=>{let t;const n=[],o=[],r=new Proxy({},{get:(e,o)=>t?t.on[o]:o in e?e[o]:e[o]=(...e)=>{n.push({type:o,args:e})}}),a=new Proxy({on:r},{get:(e,n)=>"on"===n?e.on:t?t[n]:n in e?e[n]:e[n]=(...e)=>{o.push({type:n,args:e})}});return e.then((e=>{t=e,async function(e,t,n){setTimeout((async()=>{const o=["addTimelineLayer","addInspector","sendInspectorTree","sendInspectorState","addTimelineEvent"];for(const t of o){for(const o of n.filter((e=>e.type===t)))e[t](...o.args);await h(20)}new Set(n.filter((e=>"notifyComponentUpdate"===e.type)).map((e=>e.args[0]))).forEach((t=>e.notifyComponentUpdate(t))),t.forEach((t=>e.on[t.type](...t.args))),t.length=0,n.length=0}),100)}(t,n,o)})),a};var F=A;const U=(e,t="vue-composable",n="Vue-composable devtools plugin")=>{const o=new Promise((e=>{}));j(e,F(o))},V={install:(e,t={id:"vue-composable",label:"Vue-composable devtools plugin"})=>U(e,t.id,t.label)};function _(e){if(!e)return{};const t=!!e.__v_isRef,n=t&&!!e.effect,o=!!e.__v_reactive,r=n?"Computed":t?"Ref":o?"Reactive":null;return{...r?{objectType:r}:{},...e.effect?{raw:e.effect.raw.toString()}:{}}}function W(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let N,z,B,H,K;function q(e,n){const o=w&&"BroadcastChannel"in self,r=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(o){const o=new BroadcastChannel(e);o.addEventListener("messageerror",(e=>{u.value=e,l.value=!0}),p),o.addEventListener("message",(e=>{a.value=e,r.value=e.data}),p),i=e=>o.postMessage(e),c=()=>{o.close(),s.value=!0},v=(e,n)=>{o.addEventListener("message",e,n),t.onUnmounted((()=>o.removeEventListener("message",e)))},t.onUnmounted((()=>{n&&n(),c()}))}return{supported:o,data:r,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function X(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function Y(e,t,n){e.style.setProperty(t,n)}const J={attributes:!0,childList:!0,subtree:!0},Q=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?`--${e}`:e;const G=e=>function(t){const n=t.data||[];return new Promise((t=>{try{Promise.resolve(e.apply(e,n)).then((e=>t(postMessage([!0,e])))).catch((e=>t(postMessage([!1,e]))))}catch(e){t(postMessage([!1,e]))}}))};function Z(e){const n=!!w&&"matchMedia"in window;let o,r,a=f;if(n){o=t.ref(matchMedia(e)),r=t.ref(o.value.matches);const n=e=>{r.value=e.matches};o.value.addEventListener("change",n,p);const a=()=>o.value.removeEventListener("change",n);t.onUnmounted(a)}else o=t.ref({}),r=t.ref(!1);return{supported:n,mediaQueryList:o,matches:r,remove:a}}function ee(e,n){const{addListener:o,send:r,close:a,supported:u}=q(e,(()=>y())),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed((()=>1!==i.value||s.value)),d=t.ref([]),f=t.ref(n);let m,h=!1;r({type:0});const g=()=>r({type:5,id:l}),y=()=>{0!==d.value.length&&(s.value&&r({type:3,mind:1,id:Math.min(...d.value)}),r({type:4,id:l}))};return o((e=>{switch(e.data.type){case 0:r({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),m===e.data.id&&d.value.length>0&&r({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:h=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,m=1===e.data.mind&&e.data.id||void 0,s.value=m===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],r({type:6,id:l});break;case 6:d.value.push(e.data.id)}}),p),g(),t.watch(f,((e,t)=>{if(h)h=!1;else{if(1===i.value&&!1===s.value)return h=!0,void(f.value=t);r({type:2,mind:i.value,value:c(e)?{...e}:e}),h=!1}}),{deep:!0,immediate:!1}),w&&window.addEventListener("unload",y,p),t.onUnmounted((()=>{y(),a()})),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,r({type:3,id:l,mind:i.value})},addListener:o}}const te="no-scroll";function ne(e,n){return t.inject(e,n,!0)}function oe(e,n){const a=o(n),l=o(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||r(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function re(e,o){const[r,a]=oe(e,o),u=t.computed((()=>new Intl.NumberFormat(n(r),n(a)))),l=(e,t,o)=>(t||o?new Intl.NumberFormat(n(o)||n(r),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,o)=>t.computed((()=>l(e,n,o))),formatString:l,formatter:u}}function ae(e){if(e)return i(e)?e:ue(e)}const ue=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function le(e){const n={},o=new Map,r=t.ref();let a=[];const u=[];for(const r in e){const l=e[r],s=ae(l);if(void 0!==s){const e=t.ref(!1);n[r]=e,o.set(s,{name:r,valid:e}),a.push(s)}else{const{matches:e,remove:t}=Z(l);n[r]=e,u.push(t)}}a=a.sort(((e,t)=>t-e));const l=w?()=>{const e=window.innerWidth;let t;for(let n=0;n<a.length;n++){const r=a[n],u=o.get(r);u.valid.value=e>=r,e>=r&&void 0===t&&(t=u.name)}r.value=t}:f,s=S(l,10),i=w?()=>window.removeEventListener("resize",s):f;return w&&(t.onMounted((()=>{l(),window.addEventListener("resize",s,p)})),t.onUnmounted((()=>{i(),u.forEach((e=>e()))}))),{...n,remove:i,current:r}}const se=Symbol(""),ie={sm:640,md:768,lg:1024,xl:1280};function ce(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function ve(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function de(e){return i(e)?e+"px":e}function fe(e){const t=[];if(r(e)){const n=e.map(fe);for(let e=0;e<n.length;e++){const o=n[e];t.push(...o)}}else c(n=e)&&u(n.raw)?t.push(e.raw):ve(e)?t.push(function(e){return ve(e)?`(${[e.max&&`max-width: ${de(e.max)}`,e.min&&`min-width: ${de(e.min)}`].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${de(e)})`);var n;return t}function me(e){const n=ce(e)?e.theme.screens:e;if(ce(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=fe(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=fe(n[e]).join(" or ")))}const o=le(n);return t.provide(se,o),o}function pe(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function he(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return pe(t,e)}}function ge(e,t){try{return e.parse(t)}catch{return t}}let ye,we;function be(e,r=JSON,a=10){const l=w?window[e]:void 0,s=he(l);ye||(ye=new Map,w&&window.addEventListener("storage",(e=>{if(e.newValue===e.oldValue)return;let t=ye.get("localStorage");t=e.storageArea===window.localStorage?ye.get("localStorage"):ye.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))})));let i,c=ye.get(e);return s&&l?c?i=c.$quotaError:(i=t.ref(!1),c={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:i,key:l.key,length:l.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},save(e,t){try{const n=l.getItem(e),o=u(t)?t:r.stringify(t);l.setItem(e,o),n!==o&&w&&c.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:n,storageArea:l}))}catch(e){i.value=pe(e,l)}},clear(){this.$refMap.forEach(((e,t)=>this.removeItem(t)))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),l.removeItem(e)},getItem(e){const t=l.getItem(e);return t?this.setItem(e,ge(r,t)):null},getRef(e){const u=t.ref();let s=t.watch(o(e),(e=>{const t=l.getItem(e);if(!t)return u.value=null;u.value=ge(r,t)}),{immediate:!0,flush:"sync"}),i=t.watch(u,$((t=>{this.save(n(e),t)}),a),{deep:!0,flush:"sync"});const c=Math.random().toString();return this.$watchHandlers.set(c,(()=>{s(),i()})),this.$refMap.set(c,u),u},setItem(e,n){const r=o(n);this.$refMap.set(e,r),this.save(e,n);const u=t.watch(r,$((t=>{this.save(e,t)}),a),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,u),r},updateItem(e,t){let n=this.$refMap.get(e);n&&(n.value=ge(r,t))}},ye.set(e,c)):(i=t.ref(!1),c={}),{supported:s,quotaError:i,store:c,remove:()=>ye.delete(e)}}function Ee(e,o,r){const{supported:a,store:u}=be("localStorage");let l,s=f,i=f,c=f;return a&&u?(c=t=>u.setSync(n(e),t),s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o),t.watchEffect((()=>{!1!==r&&c(!0)}))):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function Se(e,o,r){const{supported:a,store:u}=be("sessionStorage");let l,s=f,i=f,c=m;return a&&u?(s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o)):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function $e(e){const n=o(e.currentPage),r=o(e.pageSize),a=t.ref(0),u=o(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=y(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>r.value,set(e){i(e)&&(r.value=e)}}),v=t.computed((()=>Math.ceil(u.value/c.value)));s.value=n.value;return t.watch([u,c],(e=>{s.value>v.value&&(s.value=v.value)}),{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function Me(e){const n=1e3,o=e&&e.refreshMs||n,r=!e||!l(e.sync)||e.sync,u=e&&a(e.timeFn)&&e.timeFn||Date.now;let s,i;const c=t.ref(u()),v=()=>{clearInterval(s),clearTimeout(i)},d=w?()=>s=setInterval((()=>c.value=u()),o):f;if(r){const e=n-(c.value-Math.floor(c.value/n)*n);i=setTimeout(d,e)}else d();return t.onUnmounted(v),{now:c,remove:v}}function Ie(e,o){return t.computed((()=>{const a=n(e);if(!o)return a;const u=t.isRef(o)?t.reactive(o.value):t.reactive(o);return a.replace(/({?{[\w\s]*}?})/g,(e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return`${t}`;const o=r(u)?u[+t]:u[t];return void 0===o?e:`${n(o)}`}))}))}function ke(e,o,r=".",a=f){return t.computed((()=>{const t=n(e),u=n(o);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(r);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let o=n,r=t.exec(o);if(r){let a=r[0].length,u=r.index-a,s=1;do{r.index,u=r.index,a=r[0].length,n=n.slice(0,-r[0].length),l.splice(e+s,0,r[1]),++s}while(r=t.exec(o));if(!n&&"["===o[0]&&o.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${o}"`)}if(!c(s))return a(l.slice(0,e+1).join(r),s,u,t);if(!n)return a(l.slice(0,e+1).join(r),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(r),s,u,t)}return s}))}function xe(e){return void 0!==e.$value}const Le=(e,o,r)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(o)?o:{$validator:o,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f,$touch:m}=((e,o,r,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=o(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?r.value||!0:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch((e=>(s.value=n(e),i.value=!0,e)))};return a.push((n=>{c=n,t.watch((()=>{try{o(e.value,c)}catch(e){}return e.value}),v,{deep:!0,immediate:!0})})),{$promise:u,$pending:l,$invalid:i,$error:s,$touch:function(){v(e.value)}}})(e,u,t.ref(a),r);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,$touch:m,...l}},Re=(e,r)=>{const a={},u=xe(e)?o(e.$value):void 0;for(const o of Object.keys(e))if("$"!==o[0])if(u){const t=Le(u,e[o],r);a[o]=t}else{const u=Re(e[o],r);let s,i,v,d=f;if(xe(u)){const e=Object.keys(u).filter((e=>"$"!==e[0])).map((e=>u[e]));i=t.computed((()=>e.map((e=>e.$error)).map((e=>n(e))).filter((e=>void 0!==e)))),v=t.computed((()=>e.some((e=>!!n(e.$invalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}else{const e=Object.keys(u).map((e=>u[e]));i=t.computed((()=>e.map((e=>n(e.$errors))).filter((e=>void 0!==e)).filter((e=>e.some(Boolean))))),s=t.computed((()=>e.some((e=>n(e.$anyDirty)||l(n(e.$dirty))&&n(e.$dirty))))),v=t.computed((()=>e.some((e=>!!n(e.$anyInvalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}if(a[o]={toObject:d,...u,$errors:i,$anyInvalid:v},s){a[o].$anyDirty=s;const e=Object.keys(a[o]).filter((e=>"$"!==e[0]&&c(a[o][e])));a[o].$touch=()=>{e.forEach((e=>{const t=a[o][e].$touch;t&&t()}))},a[o].$reset=()=>{e.forEach((e=>{const t=a[o][e].$reset;t&&t()}))}}}else{if("$value"===o){a[o]=u;const e=t.ref(!1),r=t.watch(u,(()=>{e.value=!0,r()}),{immediate:!1,deep:!0});a.$dirty=e,a.$reset=()=>e.value=!1,a.$touch=()=>e.value=!0,a.toObject=()=>n(u);continue}a[o]=e[o]}return a};const Ce=Symbol("");function Te(e){const r=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=e=>("__esModule"in e||"Module"===e[Symbol.toStringTag])&&"default"in e?e.default:e,m=(e,n)=>{if(v[e])return v[e];const r=n.value[e];if(!r)return t.ref({});let u=a(r)?r():r;return d(u)?u.then((t=>v[e]=o(f(t)))):a(r)?o(f(u)):v[e]=t.computed((()=>f(n.value[e])))},p=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(p){const t=m(e.fallback,u);d(t)?(t.then((e=>{c.value=e.value})),h=!0):c.value=t.value}else c.value={};const g=t.ref(0);t.watch(u,(()=>g.value++),{deep:!0,immediate:!1}),t.watch([s,c,g],(([t,o,r])=>{if(t===e.fallback&&p)i.value=o;else{const e=e=>i.value=b({},o,n(e)),r=m(t,u);d(r)?r.then(e):e(r)}}),{immediate:!h});const y=(t,n)=>e.resolve?o(e.resolve(i.value,t,n)):Ie(ke(i,t,".",((e,t,n,o)=>n)),n);return{locale:s,locales:r,i18n:i,$t:y,$ts:(e,t)=>y(e,t).value,addLocale:(e,t)=>{r.value.indexOf(e)>=0||r.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=r.value.indexOf(t);if(n>=0){const o=[s.value,c.value&&e.fallback,...r.value].find((e=>e&&e!==t));o&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=o)),r.value.splice(n,1)}delete u.value[t],delete v[t]}}}function Oe(e){const n=Te(e);return t.provide(Ce,n),n}const Pe=Symbol("");const je=Symbol(""),De={install(e){const n=t.ref(!0),o=t.readonly(n);{e._context.provides[je]=o;const t=e.mount;e.mount=(...e)=>{const o=t(...e);return n.value=!1,o}}}};return e.COMMIT="8ef1ad0",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=g,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS=te,e.UseDevtoolsApp=U,e.VERSION="1.0.0-beta.20",e.VUE_VERSION="3",e.VueComposableDevtools=V,e.buildI18n=Te,e.debounce=$,e.deepClone=b,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(r(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=X,e.getDevtools=D,e.hydrationPlugin=De,e.injectFactory=ne,e.isArray=r,e.isBoolean=l,e.isClient=w,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNull=e=>null===e,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=e=>void 0===e,e.minMax=y,e.noDelay=O,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=o(void 0===t?"":t);return e.provide(Pe,n),n},e.refDebounced=function(e,n){let[o,r]=1===arguments.length&&i(e)&&void 0===n?[t.ref(),e]:[t.ref(e),n];return t.customRef(((e,t)=>({get:()=>(e(),o.value),set:$((e=>{o.value=e,t()}),r)})))},e.refShared=function(e,n){const o=t.getCurrentInstance(),r=n||o.vnode.scopeId;if(!r)return t.ref(e);const{data:a,supported:u}=ee(r,e);return a},e.setBreakpointTailwindCSS=me,e.setCssVariableFor=Y,e.setDevtools=j,e.setI18n=Oe,e.storageAvailable=he,e.unwrap=n,e.useArrayPagination=function(e,n){const r=o(e),a=$e({currentPage:1,pageSize:10,...n,total:t.computed((()=>r.value.length))}),u=t.computed((()=>{const e=r.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]}));return{...a,result:u}},e.useBreakpoint=le,e.useBreakpointChrome=function(){return le({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return ne(se,(()=>me(e||ie)))},e.useBroadcastChannel=q,e.useCancellablePromise=L,e.useClipboard=function(){const e=w&&"clipboard"in navigator,n=t.ref(),o=t.ref(),r=t=>(n.value=t,e?navigator.clipboard.writeText(t):Promise.resolve());let a=()=>Promise.resolve(void 0),l=a;if(e){let e=!1;const s=()=>a().then((e=>n.value=e));["copy","cut","focus"].map((e=>E(window,e,(()=>s())))),a=()=>navigator.clipboard.readText().then((t=>{try{return e=!0,n.value=t}finally{e=!1}})),l=()=>navigator.clipboard.read().then((e=>o.value=e)),t.watch(n,$((t=>{!e&&u(t)&&r(t)}),100))}return{supported:e,text:n,data:o,writeText:r,readText:a,write:t=>e?navigator.clipboard.write(t):Promise.resolve(),read:l}},e.useCssVariables=function(e,r,a){const l=w&&"MutationObserver"in self,[s,i]=t.isRef(r)||v(r)?[r,a||J]:[l&&document.documentElement||{},r||J],c=t.ref(!0),d={},m=[],p=Object.entries(e).map((e=>{const[t,r]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return r&&(m.push((()=>Y(n(s),t,n(r)))),d[e[0]]=o(r)),[e[0],Q(t)]}));for(let e=0;e<p.length;e++){const[r,a]=p[e];d[r]||(d[r]=t.ref(t.isRef(s)&&!s.value||!l?null:X(n(s),a))),l&&t.watch([d[r],o(s)],(e=>{c&&e[1]&&e[0]!==X(e[1],a)&&Y(e[1],a,e[0])}),{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,o]=p[e];d[t].value=X(n(s),o)}},g=new MutationObserver(h),y=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(y),t.isRef(s)?t.onMounted((()=>{m.forEach((e=>e())),t.watch(s,((e,t)=>{t&&y(),e&&b()}))})):(w||s)&&(m.forEach((e=>e())),b()),{...d,supported:l,resume:b,stop:y,observing:c}},e.useCurrencyFormat=function(e,o,r){const a=n(e),u=!c(a),l=u?e:t.computed((()=>n(e).currency)),[s,i]=oe(o,u?r:e),v=t.computed((()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}})),d=re(s),f=(e,t,o,r,a)=>{const u={...v.value,...n(r)},l=n(t)||u.currency,s=n(o)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,o,r,a)=>t.computed((()=>f(e,n,o,r,a))),formatString:f}},e.useDateNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=S,e.useDevtoolsComponentState=function(e,o){const u=t.getCurrentInstance(),l=D();l&&u&&l.on.inspectComponent(((t,l)=>{if(t.componentInstance!==u)return;const[s,i]=c(o)?[o.type,o.multiple]:["setup",!1];if(a(e))return void e(t.instanceData,l);let v=r(e)?e:Object.keys(e).map((t=>({type:s,key:t,value:n(e[t]),..._(e[t])})));if(!i){const e=new Set(t.instanceData.state.map((e=>e.key)));v=v.filter((t=>!e.has(t.key)))}t.instanceData.state.push(...v)}))},e.useDevtoolsInspector=function(e,n=[]){const o=D(),r=t.ref(n),a=t.computed((()=>{if(!r.value)return new Map;const e=t.toRaw(r.value),n=new Map;for(const t of e)n.set(t.id,t);return n}));if(o){const n=e.id;o.addInspector(e),o.on.getInspectorTree((o=>{if(o.inspectorId!=n)return;if(!r.value)return;const a=o.filter;let u=t.toRaw(r.value);o.filter&&(u=e.nodeFilter?e.nodeFilter(o.filter,u):u.filter((e=>e.id.indexOf(a)>=0||e.label.indexOf(a)>=0))),o.rootNodes=u})),o.on.getInspectorState((o=>{if(o.inspectorId!=n)return;const r=a.value.get(o.nodeId);if(r){const n=t.reactive(r.state);o.state=e.stateFilter?e.stateFilter("",n):n}})),t.watch(r,(()=>{o.sendInspectorTree(n),o.sendInspectorState(n)}),{immediate:!0,deep:!0})}return{nodes:r}},e.useDevtoolsTimelineLayer=function(e,t,n){const o=D();let r=f,a=f;return o&&(o.addTimelineLayer({id:e,label:t,color:n}),r=(t,n)=>o.addTimelineEvent({layerId:e,event:t,all:n}),a=e=>r({...e,time:Date.now()})),{id:e,addEvent:r,pushEvent:a}},e.useEvent=E,e.useFetch=function(e,n){const o=t.ref(null),r=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=W(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:W(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:W(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=x((async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then((e=>o.value=e)).catch((e=>{o.value=null,l.value=e})):Promise.resolve(),n.clone().blob().then((e=>{a.value=e})),n.clone().text().then((e=>{r.value=e}))];i&&await Promise.all(e)}return n}),!0),g=t.computed((()=>h.result.value&&h.result.value.status||null)),y=t.computed((()=>h.result.value&&h.result.value.statusText||null));return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted((()=>{m&&p("unmounted")})),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:r,blob:a,json:o,jsonError:l,status:g,statusText:y}},e.useFormat=Ie,e.useGeolocation=function(e){const n=w&&!!navigator.geolocation,o=t.ref(e?!1===e.immediate:void 0),r=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,r.value=null},c=e=>{a.value=Date.now(),u.value=null,r.value=e},v=()=>!0!==o.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=o.value?()=>{o.value?o.value=!1:d()}:d;let f=0;t.onMounted((()=>t.watch([s,o],(t=>{v();const o=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:o}:{enableHighAccuracy:o})}),{immediate:!o.value}))),t.onUnmounted(v)}return{supported:n,refresh:i,error:r,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(je,t.computed((()=>!1)))},e.useI18n=function(e){return e?Oe(e):t.inject(Ce)},e.useIntersectionObserver=function(e,r){const a=w&&"IntersectionObserver"in window,u=e?o(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed((()=>r?n(r):l?void 0:n(e))),i=t.ref([]),c=t.computed((()=>i.value.length>0&&i.value.every((e=>e.isIntersecting)))),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,(e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map((e=>e.target)).forEach(m.value.observe)}),{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted((()=>{l.value&&p(l)})),t.onUnmounted((()=>{g()}))),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...o){let r;const a=(t,...a)=>{if(u(),!t&&!n)return;return r=setInterval(e,t||n,...a&&a.length?a:o)},u=()=>{r&&(clearInterval(r),r=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,o){const[r,a]=oe(e,o),l=t.computed((()=>new Intl.DateTimeFormat(n(r),n(a)))),s=(e,t,o)=>{const s=t||o?new Intl.DateTimeFormat(n(o)||n(r),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,o)=>t.computed((()=>s(e,n,o))),formatString:s,formatter:l}},e.useIntlNumberFormat=re,e.useLanguage=function(){if(H||(H=w?t.ref(navigator.language):t.ref("")),!K)if(w){K=t.ref(navigator.languages);const e=()=>{H.value=navigator.language,K.value=navigator.languages};window.addEventListener("languagechange",e,p)}else K=t.ref([]);return{language:H,languages:K}},e.useLocalStorage=Ee,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):r(t.unref(e))?o(e):o([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass=te);const i=t.ref(!1),c=t.computed((()=>l.value.map((e=>t.ref(e))))),v=t.watch([i,c],(([e,t],[o,r])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(o===e&&r.find((e=>n(e)===t))||s.onChange(t,e))}}),{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted((()=>l.value=Array.from(document.querySelectorAll(e)))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=Z,e.useMouseDistanceFromElement=function(e,o,r){let a,u=f;if(w){const{pageX:l,pageY:s,remove:i}=M(window,o,r);a=t.computed((()=>{const t=n(e);return t?Math.floor(Math.sqrt(Math.pow(l.value-(t.offsetLeft+t.clientWidth/2),2)+Math.pow(s.value-(t.offsetTop+t.clientHeight/2),2))):0})),u=i}else a=t.computed((()=>-1));return{distance:a,remove:u}},e.useNetworkInformation=function(){const e=!!w&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,o=t.ref(0),r=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{o.value=e.downlink,r.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=E(e,"change",i,p),i()),{supported:n,downlink:o,downlinkMax:r,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=Me,e.useOnMouseMove=M,e.useOnOutsidePress=function(e,t){if(!w)return()=>{};const n=o(e),r=k.find((e=>`on${e}`in document.documentElement));return E(document,r,(e=>n.value&&!n.value.contains(e.target)&&t(e)),{passive:!0})},e.useOnResize=function(e,n,r){const a=o(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,r];v&&(s=S(s,r));const d=w?E(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,r){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?o(e):t.ref(w&&window||void 0),s=a(e)?u:t.ref(w&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=I.reduce(((e,t)=>(e[t]=(...e)=>s.value&&s.value[t]&&s.value[t].apply(s.value,e),e)),{}),h=e=>m.scrollTo({top:e}),g=e=>m.scrollTo({left:e}),[y,b]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,r];b&&(f=S(f,r));const $=E(u,"scroll",f,y),M=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,remove:()=>{$(),k(),M()},scrollTopTo:h,scrollLeftTo:g,...m}},e.useOnline=function(){const e=w&&"onLine"in navigator;return e||(N=t.ref(!1)),N||(N=t.ref(navigator.onLine),window.addEventListener("offline",(()=>N.value=!1),p),window.addEventListener("online",(()=>N.value=!0),p)),{supported:e,online:N}},e.usePageVisibility=function(){return B||(B=t.ref(w&&document.hidden)),z||(w?(z=t.ref(document.visibilityState),document.addEventListener("visibilitychange",(()=>{z.value=document.visibilityState,B.value=document.hidden}),p)):z=t.ref("visible")),{visibility:z,hidden:B}},e.usePagination=$e,e.usePath=ke,e.usePerformanceNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=x,e.usePromiseLazy=function(e,t=!1){return x(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const o=!e||a(e)?{}:e,r=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(r&&!a(r))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed((()=>s.value.length)),nextRetry:l,retryErrors:s,[R]:{value:0},[C]:i},d=r?(...e)=>(++v[R].value,T(o,v,r,e)):e=>(++v[R].value,T(o,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),o=t.inject(Pe,n);return o===n||void 0===o?t.ref(u(e)?e:""):(u(e)&&(o.value=e),o)},e.useSessionStorage=Se,e.useShare=function(e){const n=w&&"share"in navigator;let o=()=>Promise.resolve(!1),r=m,a=t.ref(!1),u=t.ref(!1);return n&&(o=e=>(a.value=!1,u.value=!1,navigator.share(e).then((e=>(a.value=!0,e))).catch((e=>(a.value=!1,u.value=!0,!1)))),r=e=>navigator.canShare(e),e&&r(e)&&o(e)),{supported:n,share:o,canShare:r,shared:a,cancelled:u}},e.useSharedRef=ee,e.useStorage=function(e,t,n){return void 0===we&&(we=be("localStorage").supported),we?Ee(e,t,n):Se(e,t)},e.useTimeline=function(e,n){const o=t.ref([]),r=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||g;return t.watch(e,((e,t)=>{o.value.unshift({item:r(t),date:new Date}),o.value.length>a&&o.value.pop()}),{immediate:!1,flush:"sync",...n}),t.readonly(o)},e.useTimeout=function(e,n=0){let o=t.ref(!1);const r=setTimeout((()=>{o.value=!0,e()}),n),a=()=>{o.value=null,clearTimeout(r)};return t.onUnmounted(a),{ready:o,cancel:a}},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),o=new MutationObserver((e=>{n.value=e[0].target.textContent}));t.watch(n,((e,t)=>{u(e)&&e!==t&&(document.title=e)}),{immediate:!0,flush:"sync"});const r=document.querySelector("title");return o.observe(r,{childList:!0}),t.onUnmounted((()=>o.disconnect())),n},e.useUndo=function(e,n){const r=o(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||g,s=n&&n.clone||(e=>e),i=t.computed((()=>{const e=0===u.value?1:u.value;return a.value.slice(e)})),c=t.computed((()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)}));t.watch(r,(e=>{if(a.value[u.value]===e)return;if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop();const t=s(e);a.value.unshift(t)}),{...n,immediate:!0,flush:"sync"});const v=e=>{const t=Math.sign(e)<=0?Math.max(e,-c.value.length):Math.min(e,i.value.length);u.value+=t,r.value=a.value[u.value]};return{value:r,undo:(e=1)=>v(e),redo:(e=1)=>v(-e),jump:v,prev:i,next:c}},e.useVModel=function(e,n){const o=t.getCurrentInstance();return o?t.computed({get:()=>e[n],set(e){o.emit(`update:${n}`,e)}}):t.ref()},e.useValidation=function(e){const n=[],o=Re({input:e},n),r=t.reactive(o.input);return n.forEach((e=>e(r))),r},e.useValueSync=function(e,n){const a=o(e),u=2===arguments.length?t.isRef(arguments[1])&&r(arguments[1].value)?arguments[1]:t.ref([o(arguments[1])]):t.ref(Array.from(arguments).slice(1).map((e=>o(e))));u.value.forEach((e=>{e.value=a.value}));let l=u.value.length;return t.watch([a,u],(([e,t])=>{if(l<t.length)t.forEach((t=>{t.value!==e&&(t.value=e)}));else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}}),{deep:!0}),t.watch(a,(e=>{u.value.forEach((t=>t.value=e))}),{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const o=w&&"WebSocket"in window;let r=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return o&&(r=new WebSocket(e,n),r.addEventListener("message",(e=>{a.value=e,l.value=e.data})),r.addEventListener("error",(e=>{u.value=e,c.value=!0})),r.addEventListener("close",(()=>{s.value=!1,i.value=!0})),r.addEventListener("open",(()=>{s.value=!0,i.value=!1})),v=e=>r.send(e),d=(e,t)=>{r.close(e,t)}),{supported:o,ws:r,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=be,e.useWorker=function(e,n,o){const r=w&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!r),s=t.ref(!r);if(!r)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,o),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",(e=>{u.value=e.data}),p),i.addEventListener("error",(e=>{a.value=e,s.value=!0}),p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,o){const r=w&&"Worker"in self,a=t.computed((()=>o&&n(o.dependencies)||[])),u=t.computed((()=>o&&n(o.timeout)));if(!r)return L(e,{lazy:!0,throwException:!0});const l=L(((...n)=>new Promise(((o,r)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${G.toString()})(${e.toString()})`],o=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(o)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed((()=>l.cancelled.value||n[n.length-1].value)):l.cancelled,h=m?t.watch(m,(()=>{d(),o(void 0)}),{immediate:!1}):f;i.addEventListener("message",(e=>{e.data[0]?o(e.data[1]):r(e.data[1]),d()}),p),i.addEventListener("error",(e=>{d(),r(e)}),p),i.postMessage([...n]),v&&(c=setTimeout((()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)}),v))}))),{lazy:!0,throwException:!0});return l},e.wrap=o,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueRuntimeCore); |
@@ -1,1 +0,1 @@ | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function o(e){return t.isRef(e)?e:t.ref(e)}const r=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise((t=>{setTimeout(t,e)}))}const g=2**32-2;function y(e,t,n){return e<t?t:e>n?n:e}const w="undefined"!=typeof window;function b(e,...t){for(let o=0;o<t.length;o++){const r=t[o];if(void 0===r||!c(r))continue;const a=Object.keys(r);for(let t=0;t<a.length;t++){const o=a[t],u=n(r[o]),l=typeof u,s=typeof e[o];void 0!==e[o]&&l!==s||(e[o]=c(u)?b(e[o]||{},u):r[o])}}return e}function E(e,n,r,a){let u=f;if(e){const l=o(e),s=e=>e.removeEventListener(n,r),i=e=>e.addEventListener(n,r,a),c=t.watch(l,((e,t,n)=>{e&&(i(e),n((()=>s(e))))}),{immediate:!0});u=()=>{s(l.value),c()}}return u}function S(e,t,n){return $(e,t,n)}function $(e,t=50,n={isImmediate:!1}){let o;return function(...r){const a=this,u=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(a,r)}),t),u&&e.apply(a,r)}}function M(e,n,o){const r=t.ref(0),a=t.ref(0),u=t.ref(0),l=t.ref(0);let s=e=>{r.value=e.x,a.value=e.y,u.value=e.pageX,l.value=e.pageY};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=S(s,o));const d=E(e,"mousemove",s,c);return{mouseX:r,mouseY:a,pageX:u,pageY:l,remove:d}}const I=["scrollBy","scrollTo","scrollIntoView"];const k=["mousedown","touchstart"];function x(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[o,r]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:r,o=i.value=e(...t);try{const e=await o;return i.value===o&&(s.value=e),e}catch(e){return i.value===o&&(u.value=e,s.value=null),n?o:void 0}finally{i.value===o&&(a.value=!1)}};return o||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function L(e,n){const o=t.ref(!1);let r;const a=x(((...t)=>{return n=e(...t),new Promise(((e,t)=>{o.value=!1,r=e=>{o.value=!0,t(e)},n.then(e).catch(t)}));var n}),n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted((()=>r&&r())),{...a,cancel:e=>{r&&r(e)},cancelled:o}}const R=Symbol(""),C=Symbol(""),T=async(e,t,n,o)=>{const r=t[R].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||O;let c;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;do{let e=!1,v=null;try{if(++a,v=o?n(...o):n(),d(v)&&(v=await v),t[C].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(r!==t[R].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error(`[useRetry] max retries reached ${u}`));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[C].value)return null;if(r!==t[R].value)return v}while(a<9e3);return null};const O=()=>0;const P=Symbol("");function j(e,t){a(e.provide)?e.provide(P,t):console.warn("[vue-composable] devtools is not supported for vue 2")}function D(){const e={},n=t.inject(P,e);if(n!==e)return n;console.warn("[vue-composable] devtools not found, please run app.use(VueComposableDevtools)")}let A;A=e=>{let t;const n=[],o=[],r=new Proxy({},{get:(e,o)=>t?t.on[o]:o in e?e[o]:e[o]=(...e)=>{n.push({type:o,args:e})}}),a=new Proxy({on:r},{get:(e,n)=>"on"===n?e.on:t?t[n]:n in e?e[n]:e[n]=(...e)=>{o.push({type:n,args:e})}});return e.then((e=>{t=e,async function(e,t,n){setTimeout((async()=>{const o=["addTimelineLayer","addInspector","sendInspectorTree","sendInspectorState","addTimelineEvent"];for(const t of o){for(const o of n.filter((e=>e.type===t)))e[t](...o.args);await h(20)}new Set(n.filter((e=>"notifyComponentUpdate"===e.type)).map((e=>e.args[0]))).forEach((t=>e.notifyComponentUpdate(t))),t.forEach((t=>e.on[t.type](...t.args))),t.length=0,n.length=0}),100)}(t,n,o)})),a};var F=A;const U=(e,t="vue-composable",n="Vue-composable devtools plugin")=>{const o=new Promise((e=>{}));j(e,F(o))},V={install:(e,t={id:"vue-composable",label:"Vue-composable devtools plugin"})=>U(e,t.id,t.label)};function _(e){if(!e)return{};const t=!!e.__v_isRef,n=t&&!!e.effect,o=!!e.__v_reactive,r=n?"Computed":t?"Ref":o?"Reactive":null;return{...r?{objectType:r}:{},...e.effect?{raw:e.effect.raw.toString()}:{}}}function W(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let N,z,B,H,K;function q(e,n){const o=w&&"BroadcastChannel"in self,r=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(o){const o=new BroadcastChannel(e);o.addEventListener("messageerror",(e=>{u.value=e,l.value=!0}),p),o.addEventListener("message",(e=>{a.value=e,r.value=e.data}),p),i=e=>o.postMessage(e),c=()=>{o.close(),s.value=!0},v=(e,n)=>{o.addEventListener("message",e,n),t.onUnmounted((()=>o.removeEventListener("message",e)))},t.onUnmounted((()=>{n&&n(),c()}))}return{supported:o,data:r,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function X(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function Y(e,t,n){e.style.setProperty(t,n)}const J={attributes:!0,childList:!0,subtree:!0},Q=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?`--${e}`:e;const G=e=>function(t){const n=t.data||[];return new Promise((t=>{try{Promise.resolve(e.apply(e,n)).then((e=>t(postMessage([!0,e])))).catch((e=>t(postMessage([!1,e]))))}catch(e){t(postMessage([!1,e]))}}))};function Z(e){const n=!!w&&"matchMedia"in window;let o,r,a=f;if(n){o=t.ref(matchMedia(e)),r=t.ref(o.value.matches);const n=e=>{r.value=e.matches};o.value.addEventListener("change",n,p);const a=()=>o.value.removeEventListener("change",n);t.onUnmounted(a)}else o=t.ref({}),r=t.ref(!1);return{supported:n,mediaQueryList:o,matches:r,remove:a}}function ee(e,n){const{addListener:o,send:r,close:a,supported:u}=q(e,(()=>y())),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed((()=>1!==i.value||s.value)),d=t.ref([]),f=t.ref(n);let m,h=!1;r({type:0});const g=()=>r({type:5,id:l}),y=()=>{0!==d.value.length&&(s.value&&r({type:3,mind:1,id:Math.min(...d.value)}),r({type:4,id:l}))};return o((e=>{switch(e.data.type){case 0:r({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),m===e.data.id&&d.value.length>0&&r({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:h=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,m=1===e.data.mind&&e.data.id||void 0,s.value=m===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],r({type:6,id:l});break;case 6:d.value.push(e.data.id)}}),p),g(),t.watch(f,((e,t)=>{if(h)h=!1;else{if(1===i.value&&!1===s.value)return h=!0,void(f.value=t);r({type:2,mind:i.value,value:c(e)?{...e}:e}),h=!1}}),{deep:!0,immediate:!1}),w&&window.addEventListener("unload",y,p),t.onUnmounted((()=>{y(),a()})),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,r({type:3,id:l,mind:i.value})},addListener:o}}const te="no-scroll";function ne(e,n){return t.inject(e,n,!0)}function oe(e,n){const a=o(n),l=o(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||r(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function re(e,o){const[r,a]=oe(e,o),u=t.computed((()=>new Intl.NumberFormat(n(r),n(a)))),l=(e,t,o)=>(t||o?new Intl.NumberFormat(n(o)||n(r),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,o)=>t.computed((()=>l(e,n,o))),formatString:l,formatter:u}}function ae(e){if(e)return i(e)?e:ue(e)}const ue=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function le(e){const n={},o=new Map,r=t.ref();let a=[];const u=[];for(const r in e){const l=e[r],s=ae(l);if(void 0!==s){const e=t.ref(!1);n[r]=e,o.set(s,{name:r,valid:e}),a.push(s)}else{const{matches:e,remove:t}=Z(l);n[r]=e,u.push(t)}}a=a.sort(((e,t)=>t-e));const l=w?()=>{const e=window.innerWidth;let t;for(let n=0;n<a.length;n++){const r=a[n],u=o.get(r);u.valid.value=e>=r,e>=r&&void 0===t&&(t=u.name)}r.value=t}:f,s=S(l,10),i=w?()=>window.removeEventListener("resize",s):f;return w&&(t.onMounted((()=>{l(),window.addEventListener("resize",s,p)})),t.onUnmounted((()=>{i(),u.forEach((e=>e()))}))),{...n,remove:i,current:r}}const se=Symbol(""),ie={sm:640,md:768,lg:1024,xl:1280};function ce(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function ve(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function de(e){return i(e)?e+"px":e}function fe(e){const t=[];if(r(e)){const n=e.map(fe);for(let e=0;e<n.length;e++){const o=n[e];t.push(...o)}}else c(n=e)&&u(n.raw)?t.push(e.raw):ve(e)?t.push(function(e){return ve(e)?`(${[e.max&&`max-width: ${de(e.max)}`,e.min&&`min-width: ${de(e.min)}`].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${de(e)})`);var n;return t}function me(e){const n=ce(e)?e.theme.screens:e;if(ce(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=fe(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=fe(n[e]).join(" or ")))}const o=le(n);return t.provide(se,o),o}function pe(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function he(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return pe(t,e)}}function ge(e,t){try{return e.parse(t)}catch{return t}}let ye,we;function be(e,r=JSON,a=10){const l=w?window[e]:void 0,s=he(l);ye||(ye=new Map,w&&window.addEventListener("storage",(e=>{if(e.newValue===e.oldValue)return;let t=ye.get("localStorage");t=e.storageArea===window.localStorage?ye.get("localStorage"):ye.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))})));let i,c=ye.get(e);return s&&l?c?i=c.$quotaError:(i=t.ref(!1),c={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:i,key:l.key,length:l.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},save(e,t){try{const n=l.getItem(e),o=u(t)?t:r.stringify(t);l.setItem(e,o),n!==o&&w&&c.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:n,storageArea:l}))}catch(e){i.value=pe(e,l)}},clear(){this.$refMap.forEach(((e,t)=>this.removeItem(t)))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),l.removeItem(e)},getItem(e){const t=l.getItem(e);return t?this.setItem(e,ge(r,t)):null},getRef(e){const u=t.ref();let s=t.watch(o(e),(e=>{const t=l.getItem(e);if(!t)return u.value=null;u.value=ge(r,t)}),{immediate:!0,flush:"sync"}),i=t.watch(u,$((t=>{this.save(n(e),t)}),a),{deep:!0,flush:"sync"});const c=Math.random().toString();return this.$watchHandlers.set(c,(()=>{s(),i()})),this.$refMap.set(c,u),u},setItem(e,n){const r=o(n);this.$refMap.set(e,r),this.save(e,n);const u=t.watch(r,$((t=>{this.save(e,t)}),a),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,u),r},updateItem(e,t){let n=this.$refMap.get(e);n&&(n.value=ge(r,t))}},ye.set(e,c)):(i=t.ref(!1),c={}),{supported:s,quotaError:i,store:c,remove:()=>ye.delete(e)}}function Ee(e,o,r){const{supported:a,store:u}=be("localStorage");let l,s=f,i=f,c=f;return a&&u?(c=t=>u.setSync(n(e),t),s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o),t.watchEffect((()=>{!1!==r&&c(!0)}))):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function Se(e,o,r){const{supported:a,store:u}=be("sessionStorage");let l,s=f,i=f,c=m;return a&&u?(s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o)):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function $e(e){const n=o(e.currentPage),r=o(e.pageSize),a=t.ref(0),u=o(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=y(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>r.value,set(e){i(e)&&(r.value=e)}}),v=t.computed((()=>Math.ceil(u.value/c.value)));s.value=n.value;return t.watch([u,c],(e=>{s.value>v.value&&(s.value=v.value)}),{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function Me(e){const n=1e3,o=e&&e.refreshMs||n,r=!e||!l(e.sync)||e.sync,u=e&&a(e.timeFn)&&e.timeFn||Date.now;let s,i;const c=t.ref(u()),v=()=>{clearInterval(s),clearTimeout(i)},d=w?()=>s=setInterval((()=>c.value=u()),o):f;if(r){const e=n-(c.value-Math.floor(c.value/n)*n);i=setTimeout(d,e)}else d();return t.onUnmounted(v),{now:c,remove:v}}function Ie(e,o){return t.computed((()=>{const a=n(e);if(!o)return a;const u=t.isRef(o)?t.reactive(o.value):t.reactive(o);return a.replace(/({?{[\w\s]*}?})/g,(e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return`${t}`;const o=r(u)?u[+t]:u[t];return void 0===o?e:`${n(o)}`}))}))}function ke(e,o,r=".",a=f){return t.computed((()=>{const t=n(e),u=n(o);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(r);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let o=n,r=t.exec(o);if(r){let a=r[0].length,u=r.index-a,s=1;do{r.index,u=r.index,a=r[0].length,n=n.slice(0,-r[0].length),l.splice(e+s,0,r[1]),++s}while(r=t.exec(o));if(!n&&"["===o[0]&&o.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${o}"`)}if(!c(s))return a(l.slice(0,e+1).join(r),s,u,t);if(!n)return a(l.slice(0,e+1).join(r),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(r),s,u,t)}return s}))}function xe(e){return void 0!==e.$value}const Le=(e,o,r)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(o)?o:{$validator:o,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f,$touch:m}=((e,o,r,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=o(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?r.value||!0:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch((e=>(s.value=n(e),i.value=!0,e)))};return a.push((n=>{c=n,t.watch((()=>{try{o(e.value,c)}catch(e){}return e.value}),v,{deep:!0,immediate:!0})})),{$promise:u,$pending:l,$invalid:i,$error:s,$touch:function(){v(e.value)}}})(e,u,t.ref(a),r);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,$touch:m,...l}},Re=(e,r)=>{const a={},u=xe(e)?o(e.$value):void 0;for(const o of Object.keys(e))if("$"!==o[0])if(u){const t=Le(u,e[o],r);a[o]=t}else{const u=Re(e[o],r);let s,i,v,d=f;if(xe(u)){const e=Object.keys(u).filter((e=>"$"!==e[0])).map((e=>u[e]));i=t.computed((()=>e.map((e=>e.$error)).map((e=>n(e))).filter((e=>void 0!==e)))),v=t.computed((()=>e.some((e=>!!n(e.$invalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}else{const e=Object.keys(u).map((e=>u[e]));i=t.computed((()=>e.map((e=>n(e.$errors))).filter((e=>void 0!==e)).filter((e=>e.some(Boolean))))),s=t.computed((()=>e.some((e=>n(e.$anyDirty)||l(n(e.$dirty))&&n(e.$dirty))))),v=t.computed((()=>e.some((e=>!!n(e.$anyInvalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}if(a[o]={toObject:d,...u,$errors:i,$anyInvalid:v},s){a[o].$anyDirty=s;const e=Object.keys(a[o]).filter((e=>"$"!==e[0]&&c(a[o][e])));a[o].$touch=()=>{e.forEach((e=>{const t=a[o][e].$touch;t&&t()}))},a[o].$reset=()=>{e.forEach((e=>{const t=a[o][e].$reset;t&&t()}))}}}else{if("$value"===o){a[o]=u;const e=t.ref(!1),r=t.watch(u,(()=>{e.value=!0,r()}),{immediate:!1,deep:!0});a.$dirty=e,a.$reset=()=>e.value=!1,a.$touch=()=>e.value=!0,a.toObject=()=>n(u);continue}a[o]=e[o]}return a};const Ce=Symbol("");function Te(e){const r=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=e=>("__esModule"in e||"Module"===e[Symbol.toStringTag])&&"default"in e?e.default:e,m=(e,n)=>{if(v[e])return v[e];const r=n.value[e];if(!r)return t.ref({});let u=a(r)?r():r;return d(u)?u.then((t=>v[e]=o(f(t)))):a(r)?o(f(u)):v[e]=t.computed((()=>f(n.value[e])))},p=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(p){const t=m(e.fallback,u);d(t)?(t.then((e=>{c.value=e.value})),h=!0):c.value=t.value}else c.value={};const g=t.ref(0);t.watch(u,(()=>g.value++),{deep:!0,immediate:!1}),t.watch([s,c,g],(([t,o,r])=>{if(t===e.fallback&&p)i.value=o;else{const e=e=>i.value=b({},o,n(e)),r=m(t,u);d(r)?r.then(e):e(r)}}),{immediate:!h});const y=(t,n)=>e.resolve?o(e.resolve(i.value,t,n)):Ie(ke(i,t,".",((e,t,n,o)=>n)),n);return{locale:s,locales:r,i18n:i,$t:y,$ts:(e,t)=>y(e,t).value,addLocale:(e,t)=>{r.value.indexOf(e)>=0||r.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=r.value.indexOf(t);if(n>=0){const o=[s.value,c.value&&e.fallback,...r.value].find((e=>e&&e!==t));o&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=o)),r.value.splice(n,1)}delete u.value[t],delete v[t]}}}function Oe(e){const n=Te(e);return t.provide(Ce,n),n}const Pe=Symbol("");const je=Symbol(""),De={install(e){const n=t.ref(!0),o=t.readonly(n);{e._context.provides[je]=o;const t=e.mount;e.mount=(...e)=>{const o=t(...e);return n.value=!1,o}}}};return e.COMMIT="2a583c0",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=g,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS=te,e.UseDevtoolsApp=U,e.VERSION="1.0.0-beta.19",e.VUE_VERSION="3",e.VueComposableDevtools=V,e.buildI18n=Te,e.debounce=$,e.deepClone=b,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(r(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=X,e.getDevtools=D,e.hydrationPlugin=De,e.injectFactory=ne,e.isArray=r,e.isBoolean=l,e.isClient=w,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNull=e=>null===e,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=e=>void 0===e,e.minMax=y,e.noDelay=O,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=o(void 0===t?"":t);return e.provide(Pe,n),n},e.refDebounced=function(e,n){let[o,r]=1===arguments.length&&i(e)&&void 0===n?[t.ref(),e]:[t.ref(e),n];return t.customRef(((e,t)=>({get:()=>(e(),o.value),set:$((e=>{o.value=e,t()}),r)})))},e.refShared=function(e,n){const o=t.getCurrentInstance(),r=n||o.vnode.scopeId;if(!r)return t.ref(e);const{data:a,supported:u}=ee(r,e);return a},e.setBreakpointTailwindCSS=me,e.setCssVariableFor=Y,e.setDevtools=j,e.setI18n=Oe,e.storageAvailable=he,e.unwrap=n,e.useArrayPagination=function(e,n){const r=o(e),a=$e({currentPage:1,pageSize:10,...n,total:t.computed((()=>r.value.length))}),u=t.computed((()=>{const e=r.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]}));return{...a,result:u}},e.useBreakpoint=le,e.useBreakpointChrome=function(){return le({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return ne(se,(()=>me(e||ie)))},e.useBroadcastChannel=q,e.useCancellablePromise=L,e.useClipboard=function(){const e=w&&"clipboard"in navigator,n=t.ref(),o=t.ref(),r=t=>(n.value=t,e?navigator.clipboard.writeText(t):Promise.resolve());let a=()=>Promise.resolve(void 0),l=a;if(e){let e=!1;const s=()=>a().then((e=>n.value=e));["copy","cut","focus"].map((e=>E(window,e,(()=>s())))),a=()=>navigator.clipboard.readText().then((t=>{try{return e=!0,n.value=t}finally{e=!1}})),l=()=>navigator.clipboard.read().then((e=>o.value=e)),t.watch(n,$((t=>{!e&&u(t)&&r(t)}),100))}return{supported:e,text:n,data:o,writeText:r,readText:a,write:t=>e?navigator.clipboard.write(t):Promise.resolve(),read:l}},e.useCssVariables=function(e,r,a){const l=w&&"MutationObserver"in self,[s,i]=t.isRef(r)||v(r)?[r,a||J]:[l&&document.documentElement||{},r||J],c=t.ref(!0),d={},m=[],p=Object.entries(e).map((e=>{const[t,r]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return r&&(m.push((()=>Y(n(s),t,n(r)))),d[e[0]]=o(r)),[e[0],Q(t)]}));for(let e=0;e<p.length;e++){const[r,a]=p[e];d[r]||(d[r]=t.ref(t.isRef(s)&&!s.value||!l?null:X(n(s),a))),l&&t.watch([d[r],o(s)],(e=>{c&&e[1]&&e[0]!==X(e[1],a)&&Y(e[1],a,e[0])}),{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,o]=p[e];d[t].value=X(n(s),o)}},g=new MutationObserver(h),y=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(y),t.isRef(s)?t.onMounted((()=>{m.forEach((e=>e())),t.watch(s,((e,t)=>{t&&y(),e&&b()}))})):(w||s)&&(m.forEach((e=>e())),b()),{...d,supported:l,resume:b,stop:y,observing:c}},e.useCurrencyFormat=function(e,o,r){const a=n(e),u=!c(a),l=u?e:t.computed((()=>n(e).currency)),[s,i]=oe(o,u?r:e),v=t.computed((()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}})),d=re(s),f=(e,t,o,r,a)=>{const u={...v.value,...n(r)},l=n(t)||u.currency,s=n(o)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,o,r,a)=>t.computed((()=>f(e,n,o,r,a))),formatString:f}},e.useDateNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=S,e.useDevtoolsComponentState=function(e,o){const u=t.getCurrentInstance(),l=D();l&&u&&l.on.inspectComponent(((t,l)=>{if(t.componentInstance!==u)return;const[s,i]=c(o)?[o.type,o.multiple]:["setup",!1];if(a(e))return void e(t.instanceData,l);let v=r(e)?e:Object.keys(e).map((t=>({type:s,key:t,value:n(e[t]),..._(e[t])})));if(!i){const e=new Set(t.instanceData.state.map((e=>e.key)));v=v.filter((t=>!e.has(t.key)))}t.instanceData.state.push(...v)}))},e.useDevtoolsInspector=function(e,n=[]){const o=D(),r=t.ref(n),a=t.computed((()=>{if(!r.value)return new Map;const e=t.toRaw(r.value),n=new Map;for(const t of e)n.set(t.id,t);return n}));if(o){const n=e.id;o.addInspector(e),o.on.getInspectorTree((o=>{if(o.inspectorId!=n)return;if(!r.value)return;const a=o.filter;let u=t.toRaw(r.value);o.filter&&(u=e.nodeFilter?e.nodeFilter(o.filter,u):u.filter((e=>e.id.indexOf(a)>=0||e.label.indexOf(a)>=0))),o.rootNodes=u})),o.on.getInspectorState((o=>{if(o.inspectorId!=n)return;const r=a.value.get(o.nodeId);if(r){const n=t.reactive(r.state);o.state=e.stateFilter?e.stateFilter("",n):n}})),t.watch(r,(()=>{o.sendInspectorTree(n),o.sendInspectorState(n)}),{immediate:!0,deep:!0})}return{nodes:r}},e.useDevtoolsTimelineLayer=function(e,t,n){const o=D();let r=f,a=f;return o&&(o.addTimelineLayer({id:e,label:t,color:n}),r=(t,n)=>o.addTimelineEvent({layerId:e,event:t,all:n}),a=e=>r({...e,time:Date.now()})),{id:e,addEvent:r,pushEvent:a}},e.useEvent=E,e.useFetch=function(e,n){const o=t.ref(null),r=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=W(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:W(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:W(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=x((async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then((e=>o.value=e)).catch((e=>{o.value=null,l.value=e})):Promise.resolve(),n.clone().blob().then((e=>{a.value=e})),n.clone().text().then((e=>{r.value=e}))];i&&await Promise.all(e)}return n}),!0),g=t.computed((()=>h.result.value&&h.result.value.status||null)),y=t.computed((()=>h.result.value&&h.result.value.statusText||null));return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted((()=>{m&&p("unmounted")})),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:r,blob:a,json:o,jsonError:l,status:g,statusText:y}},e.useFormat=Ie,e.useGeolocation=function(e){const n=w&&!!navigator.geolocation,o=t.ref(e?!1===e.immediate:void 0),r=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,r.value=null},c=e=>{a.value=Date.now(),u.value=null,r.value=e},v=()=>!0!==o.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=o.value?()=>{o.value?o.value=!1:d()}:d;let f=0;t.onMounted((()=>t.watch([s,o],(t=>{v();const o=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:o}:{enableHighAccuracy:o})}),{immediate:!o.value}))),t.onUnmounted(v)}return{supported:n,refresh:i,error:r,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(je,t.computed((()=>!1)))},e.useI18n=function(e){return e?Oe(e):t.inject(Ce)},e.useIntersectionObserver=function(e,r){const a=w&&"IntersectionObserver"in window,u=e?o(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed((()=>r?n(r):l?void 0:n(e))),i=t.ref([]),c=t.computed((()=>i.value.length>0&&i.value.every((e=>e.isIntersecting)))),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,(e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map((e=>e.target)).forEach(m.value.observe)}),{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted((()=>{l.value&&p(l)})),t.onUnmounted((()=>{g()}))),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...o){let r;const a=(t,...a)=>{if(u(),!t&&!n)return;return r=setInterval(e,t||n,...a&&a.length?a:o)},u=()=>{r&&(clearInterval(r),r=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,o){const[r,a]=oe(e,o),l=t.computed((()=>new Intl.DateTimeFormat(n(r),n(a)))),s=(e,t,o)=>{const s=t||o?new Intl.DateTimeFormat(n(o)||n(r),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,o)=>t.computed((()=>s(e,n,o))),formatString:s,formatter:l}},e.useIntlNumberFormat=re,e.useLanguage=function(){if(H||(H=w?t.ref(navigator.language):t.ref("")),!K)if(w){K=t.ref(navigator.languages);const e=()=>{H.value=navigator.language,K.value=navigator.languages};window.addEventListener("languagechange",e,p)}else K=t.ref([]);return{language:H,languages:K}},e.useLocalStorage=Ee,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):r(t.unref(e))?o(e):o([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass=te);const i=t.ref(!1),c=t.computed((()=>l.value.map((e=>t.ref(e))))),v=t.watch([i,c],(([e,t],[o,r])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(o===e&&r.find((e=>n(e)===t))||s.onChange(t,e))}}),{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted((()=>l.value=Array.from(document.querySelectorAll(e)))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=Z,e.useMouseDistanceFromElement=function(e,o,r){let a,u=f;if(w){const{pageX:l,pageY:s,remove:i}=M(window,o,r);a=t.computed((()=>{const t=n(e);return t?Math.floor(Math.sqrt(Math.pow(l.value-(t.offsetLeft+t.clientWidth/2),2)+Math.pow(s.value-(t.offsetTop+t.clientHeight/2),2))):0})),u=i}else a=t.computed((()=>-1));return{distance:a,remove:u}},e.useNetworkInformation=function(){const e=!!w&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,o=t.ref(0),r=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{o.value=e.downlink,r.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=E(e,"change",i,p),i()),{supported:n,downlink:o,downlinkMax:r,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=Me,e.useOnMouseMove=M,e.useOnOutsidePress=function(e,t){if(!w)return()=>{};const n=o(e),r=k.find((e=>`on${e}`in document.documentElement));return E(document,r,(e=>n.value&&!n.value.contains(e.target)&&t(e)),{passive:!0})},e.useOnResize=function(e,n,r){const a=o(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,r];v&&(s=S(s,r));const d=w?E(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,r){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?o(e):t.ref(w&&window||void 0),s=a(e)?u:t.ref(w&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=I.reduce(((e,t)=>(e[t]=(...e)=>s.value&&s.value[t]&&s.value[t].apply(s.value,e),e)),{}),h=e=>m.scrollTo({top:e}),g=e=>m.scrollTo({left:e}),[y,b]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,r];b&&(f=S(f,r));const $=E(u,"scroll",f,y),M=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,remove:()=>{$(),k(),M()},scrollTopTo:h,scrollLeftTo:g,...m}},e.useOnline=function(){const e=w&&"onLine"in navigator;return e||(N=t.ref(!1)),N||(N=t.ref(navigator.onLine),window.addEventListener("offline",(()=>N.value=!1),p),window.addEventListener("online",(()=>N.value=!0),p)),{supported:e,online:N}},e.usePageVisibility=function(){return B||(B=t.ref(w&&document.hidden)),z||(w?(z=t.ref(document.visibilityState),document.addEventListener("visibilitychange",(()=>{z.value=document.visibilityState,B.value=document.hidden}),p)):z=t.ref("visible")),{visibility:z,hidden:B}},e.usePagination=$e,e.usePath=ke,e.usePerformanceNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=x,e.usePromiseLazy=function(e,t=!1){return x(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const o=!e||a(e)?{}:e,r=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(r&&!a(r))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed((()=>s.value.length)),nextRetry:l,retryErrors:s,[R]:{value:0},[C]:i},d=r?(...e)=>(++v[R].value,T(o,v,r,e)):e=>(++v[R].value,T(o,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),o=t.inject(Pe,n);return o===n||void 0===o?t.ref(u(e)?e:""):(u(e)&&(o.value=e),o)},e.useSessionStorage=Se,e.useShare=function(e){const n=w&&"share"in navigator;let o=()=>Promise.resolve(!1),r=m,a=t.ref(!1),u=t.ref(!1);return n&&(o=e=>(a.value=!1,u.value=!1,navigator.share(e).then((e=>(a.value=!0,e))).catch((e=>(a.value=!1,u.value=!0,!1)))),r=e=>navigator.canShare(e),e&&r(e)&&o(e)),{supported:n,share:o,canShare:r,shared:a,cancelled:u}},e.useSharedRef=ee,e.useStorage=function(e,t,n){return void 0===we&&(we=be("localStorage").supported),we?Ee(e,t,n):Se(e,t)},e.useTimeline=function(e,n){const o=t.ref([]),r=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||g;return t.watch(e,((e,t)=>{o.value.unshift({item:r(t),date:new Date}),o.value.length>a&&o.value.pop()}),{immediate:!1,flush:"sync",...n}),t.readonly(o)},e.useTimeout=function(e,n=0){let o=t.ref(!1);const r=setTimeout((()=>{o.value=!0,e()}),n),a=()=>{o.value=null,clearTimeout(r)};return t.onUnmounted(a),{ready:o,cancel:a}},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),o=new MutationObserver((e=>{n.value=e[0].target.textContent}));t.watch(n,((e,t)=>{u(e)&&e!==t&&(document.title=e)}),{immediate:!0,flush:"sync"});const r=document.querySelector("title");return o.observe(r,{childList:!0}),t.onUnmounted((()=>o.disconnect())),n},e.useUndo=function(e,n){const r=o(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||g,s=n&&n.clone||(e=>e),i=t.computed((()=>{const e=0===u.value?1:u.value;return a.value.slice(e)})),c=t.computed((()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)}));t.watch(r,(e=>{if(a.value[u.value]===e)return;if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop();const t=s(e);a.value.unshift(t)}),{...n,immediate:!0,flush:"sync"});const v=e=>{const t=Math.sign(e)<=0?Math.max(e,-c.value.length):Math.min(e,i.value.length);u.value+=t,r.value=a.value[u.value]};return{value:r,undo:(e=1)=>v(e),redo:(e=1)=>v(-e),jump:v,prev:i,next:c}},e.useVModel=function(e,n){const o=t.getCurrentInstance();return o?t.computed({get:()=>e[n],set(e){o.emit(`update:${n}`,e)}}):t.ref()},e.useValidation=function(e){const n=[],o=Re({input:e},n),r=t.reactive(o.input);return n.forEach((e=>e(r))),r},e.useValueSync=function(e,n){const a=o(e),u=2===arguments.length?t.isRef(arguments[1])&&r(arguments[1].value)?arguments[1]:t.ref([o(arguments[1])]):t.ref(Array.from(arguments).slice(1).map((e=>o(e))));u.value.forEach((e=>{e.value=a.value}));let l=u.value.length;return t.watch([a,u],(([e,t])=>{if(l<t.length)t.forEach((t=>{t.value!==e&&(t.value=e)}));else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}}),{deep:!0}),t.watch(a,(e=>{u.value.forEach((t=>t.value=e))}),{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const o=w&&"WebSocket"in window;let r=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return o&&(r=new WebSocket(e,n),r.addEventListener("message",(e=>{a.value=e,l.value=e.data})),r.addEventListener("error",(e=>{u.value=e,c.value=!0})),r.addEventListener("close",(()=>{s.value=!1,i.value=!0})),r.addEventListener("open",(()=>{s.value=!0,i.value=!1})),v=e=>r.send(e),d=(e,t)=>{r.close(e,t)}),{supported:o,ws:r,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=be,e.useWorker=function(e,n,o){const r=w&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!r),s=t.ref(!r);if(!r)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,o),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",(e=>{u.value=e.data}),p),i.addEventListener("error",(e=>{a.value=e,s.value=!0}),p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,o){const r=w&&"Worker"in self,a=t.computed((()=>o&&n(o.dependencies)||[])),u=t.computed((()=>o&&n(o.timeout)));if(!r)return L(e,{lazy:!0,throwException:!0});const l=L(((...n)=>new Promise(((o,r)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${G.toString()})(${e.toString()})`],o=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(o)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed((()=>l.cancelled.value||n[n.length-1].value)):l.cancelled,h=m?t.watch(m,(()=>{d(),o(void 0)}),{immediate:!1}):f;i.addEventListener("message",(e=>{e.data[0]?o(e.data[1]):r(e.data[1]),d()}),p),i.addEventListener("error",(e=>{d(),r(e)}),p),i.postMessage([...n]),v&&(c=setTimeout((()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)}),v))}))),{lazy:!0,throwException:!0});return l},e.wrap=o,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueRuntimeCore); | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function o(e){return t.isRef(e)?e:t.ref(e)}const r=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise((t=>{setTimeout(t,e)}))}const g=2**32-2;function y(e,t,n){return e<t?t:e>n?n:e}const w="undefined"!=typeof window;function b(e,...t){for(let o=0;o<t.length;o++){const r=t[o];if(void 0===r||!c(r))continue;const a=Object.keys(r);for(let t=0;t<a.length;t++){const o=a[t],u=n(r[o]),l=typeof u,s=typeof e[o];void 0!==e[o]&&l!==s||(e[o]=c(u)?b(e[o]||{},u):r[o])}}return e}function E(e,n,r,a){let u=f;if(e){const l=o(e),s=e=>e.removeEventListener(n,r),i=e=>e.addEventListener(n,r,a),c=t.watch(l,((e,t,n)=>{e&&(i(e),n((()=>s(e))))}),{immediate:!0});u=()=>{s(l.value),c()}}return u}function S(e,t,n){return $(e,t,n)}function $(e,t=50,n={isImmediate:!1}){let o;return function(...r){const a=this,u=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(a,r)}),t),u&&e.apply(a,r)}}function M(e,n,o){const r=t.ref(0),a=t.ref(0),u=t.ref(0),l=t.ref(0);let s=e=>{r.value=e.x,a.value=e.y,u.value=e.pageX,l.value=e.pageY};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=S(s,o));const d=E(e,"mousemove",s,c);return{mouseX:r,mouseY:a,pageX:u,pageY:l,remove:d}}const I=["scrollBy","scrollTo","scrollIntoView"];const k=["mousedown","touchstart"];function x(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[o,r]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:r,o=i.value=e(...t);try{const e=await o;return i.value===o&&(s.value=e),e}catch(e){return i.value===o&&(u.value=e,s.value=null),n?o:void 0}finally{i.value===o&&(a.value=!1)}};return o||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function L(e,n){const o=t.ref(!1);let r;const a=x(((...t)=>{return n=e(...t),new Promise(((e,t)=>{o.value=!1,r=e=>{o.value=!0,t(e)},n.then(e).catch(t)}));var n}),n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted((()=>r&&r())),{...a,cancel:e=>{r&&r(e)},cancelled:o}}const R=Symbol(""),C=Symbol(""),T=async(e,t,n,o)=>{const r=t[R].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||O;let c;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;do{let e=!1,v=null;try{if(++a,v=o?n(...o):n(),d(v)&&(v=await v),t[C].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(r!==t[R].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error(`[useRetry] max retries reached ${u}`));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[C].value)return null;if(r!==t[R].value)return v}while(a<9e3);return null};const O=()=>0;const P=Symbol("");function j(e,t){a(e.provide)?e.provide(P,t):console.warn("[vue-composable] devtools is not supported for vue 2")}function D(){const e={},n=t.inject(P,e);if(n!==e)return n;console.warn("[vue-composable] devtools not found, please run app.use(VueComposableDevtools)")}let A;A=e=>{let t;const n=[],o=[],r=new Proxy({},{get:(e,o)=>t?t.on[o]:o in e?e[o]:e[o]=(...e)=>{n.push({type:o,args:e})}}),a=new Proxy({on:r},{get:(e,n)=>"on"===n?e.on:t?t[n]:n in e?e[n]:e[n]=(...e)=>{o.push({type:n,args:e})}});return e.then((e=>{t=e,async function(e,t,n){setTimeout((async()=>{const o=["addTimelineLayer","addInspector","sendInspectorTree","sendInspectorState","addTimelineEvent"];for(const t of o){for(const o of n.filter((e=>e.type===t)))e[t](...o.args);await h(20)}new Set(n.filter((e=>"notifyComponentUpdate"===e.type)).map((e=>e.args[0]))).forEach((t=>e.notifyComponentUpdate(t))),t.forEach((t=>e.on[t.type](...t.args))),t.length=0,n.length=0}),100)}(t,n,o)})),a};var F=A;const U=(e,t="vue-composable",n="Vue-composable devtools plugin")=>{const o=new Promise((e=>{}));j(e,F(o))},V={install:(e,t={id:"vue-composable",label:"Vue-composable devtools plugin"})=>U(e,t.id,t.label)};function _(e){if(!e)return{};const t=!!e.__v_isRef,n=t&&!!e.effect,o=!!e.__v_reactive,r=n?"Computed":t?"Ref":o?"Reactive":null;return{...r?{objectType:r}:{},...e.effect?{raw:e.effect.raw.toString()}:{}}}function W(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let N,z,B,H,K;function q(e,n){const o=w&&"BroadcastChannel"in self,r=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(o){const o=new BroadcastChannel(e);o.addEventListener("messageerror",(e=>{u.value=e,l.value=!0}),p),o.addEventListener("message",(e=>{a.value=e,r.value=e.data}),p),i=e=>o.postMessage(e),c=()=>{o.close(),s.value=!0},v=(e,n)=>{o.addEventListener("message",e,n),t.onUnmounted((()=>o.removeEventListener("message",e)))},t.onUnmounted((()=>{n&&n(),c()}))}return{supported:o,data:r,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function X(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function Y(e,t,n){e.style.setProperty(t,n)}const J={attributes:!0,childList:!0,subtree:!0},Q=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?`--${e}`:e;const G=e=>function(t){const n=t.data||[];return new Promise((t=>{try{Promise.resolve(e.apply(e,n)).then((e=>t(postMessage([!0,e])))).catch((e=>t(postMessage([!1,e]))))}catch(e){t(postMessage([!1,e]))}}))};function Z(e){const n=!!w&&"matchMedia"in window;let o,r,a=f;if(n){o=t.ref(matchMedia(e)),r=t.ref(o.value.matches);const n=e=>{r.value=e.matches};o.value.addEventListener("change",n,p);const a=()=>o.value.removeEventListener("change",n);t.onUnmounted(a)}else o=t.ref({}),r=t.ref(!1);return{supported:n,mediaQueryList:o,matches:r,remove:a}}function ee(e,n){const{addListener:o,send:r,close:a,supported:u}=q(e,(()=>y())),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed((()=>1!==i.value||s.value)),d=t.ref([]),f=t.ref(n);let m,h=!1;r({type:0});const g=()=>r({type:5,id:l}),y=()=>{0!==d.value.length&&(s.value&&r({type:3,mind:1,id:Math.min(...d.value)}),r({type:4,id:l}))};return o((e=>{switch(e.data.type){case 0:r({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),m===e.data.id&&d.value.length>0&&r({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:h=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,m=1===e.data.mind&&e.data.id||void 0,s.value=m===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],r({type:6,id:l});break;case 6:d.value.push(e.data.id)}}),p),g(),t.watch(f,((e,t)=>{if(h)h=!1;else{if(1===i.value&&!1===s.value)return h=!0,void(f.value=t);r({type:2,mind:i.value,value:c(e)?{...e}:e}),h=!1}}),{deep:!0,immediate:!1}),w&&window.addEventListener("unload",y,p),t.onUnmounted((()=>{y(),a()})),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,r({type:3,id:l,mind:i.value})},addListener:o}}const te="no-scroll";function ne(e,n){return t.inject(e,n,!0)}function oe(e,n){const a=o(n),l=o(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||r(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function re(e,o){const[r,a]=oe(e,o),u=t.computed((()=>new Intl.NumberFormat(n(r),n(a)))),l=(e,t,o)=>(t||o?new Intl.NumberFormat(n(o)||n(r),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,o)=>t.computed((()=>l(e,n,o))),formatString:l,formatter:u}}function ae(e){if(e)return i(e)?e:ue(e)}const ue=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function le(e){const n={},o=new Map,r=t.ref();let a=[];const u=[];for(const r in e){const l=e[r],s=ae(l);if(void 0!==s){const e=t.ref(!1);n[r]=e,o.set(s,{name:r,valid:e}),a.push(s)}else{const{matches:e,remove:t}=Z(l);n[r]=e,u.push(t)}}a=a.sort(((e,t)=>t-e));const l=w?()=>{const e=window.innerWidth;let t;for(let n=0;n<a.length;n++){const r=a[n],u=o.get(r);u.valid.value=e>=r,e>=r&&void 0===t&&(t=u.name)}r.value=t}:f,s=S(l,10),i=w?()=>window.removeEventListener("resize",s):f;return w&&(t.onMounted((()=>{l(),window.addEventListener("resize",s,p)})),t.onUnmounted((()=>{i(),u.forEach((e=>e()))}))),{...n,remove:i,current:r}}const se=Symbol(""),ie={sm:640,md:768,lg:1024,xl:1280};function ce(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function ve(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function de(e){return i(e)?e+"px":e}function fe(e){const t=[];if(r(e)){const n=e.map(fe);for(let e=0;e<n.length;e++){const o=n[e];t.push(...o)}}else c(n=e)&&u(n.raw)?t.push(e.raw):ve(e)?t.push(function(e){return ve(e)?`(${[e.max&&`max-width: ${de(e.max)}`,e.min&&`min-width: ${de(e.min)}`].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${de(e)})`);var n;return t}function me(e){const n=ce(e)?e.theme.screens:e;if(ce(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=fe(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=fe(n[e]).join(" or ")))}const o=le(n);return t.provide(se,o),o}function pe(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function he(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return pe(t,e)}}function ge(e,t){try{return e.parse(t)}catch{return t}}let ye,we;function be(e,r=JSON,a=10){const l=w?window[e]:void 0,s=he(l);ye||(ye=new Map,w&&window.addEventListener("storage",(e=>{if(e.newValue===e.oldValue)return;let t=ye.get("localStorage");t=e.storageArea===window.localStorage?ye.get("localStorage"):ye.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))})));let i,c=ye.get(e);return s&&l?c?i=c.$quotaError:(i=t.ref(!1),c={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:i,key:l.key,length:l.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},save(e,t){try{const n=l.getItem(e),o=u(t)?t:r.stringify(t);l.setItem(e,o),n!==o&&w&&c.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:n,storageArea:l}))}catch(e){i.value=pe(e,l)}},clear(){this.$refMap.forEach(((e,t)=>this.removeItem(t)))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),l.removeItem(e)},getItem(e){const t=l.getItem(e);return t?this.setItem(e,ge(r,t)):null},getRef(e){const u=t.ref();let s=t.watch(o(e),(e=>{const t=l.getItem(e);if(!t)return u.value=null;u.value=ge(r,t)}),{immediate:!0,flush:"sync"}),i=t.watch(u,$((t=>{this.save(n(e),t)}),a),{deep:!0,flush:"sync"});const c=Math.random().toString();return this.$watchHandlers.set(c,(()=>{s(),i()})),this.$refMap.set(c,u),u},setItem(e,n){const r=o(n);this.$refMap.set(e,r),this.save(e,n);const u=t.watch(r,$((t=>{this.save(e,t)}),a),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,u),r},updateItem(e,t){let n=this.$refMap.get(e);n&&(n.value=ge(r,t))}},ye.set(e,c)):(i=t.ref(!1),c={}),{supported:s,quotaError:i,store:c,remove:()=>ye.delete(e)}}function Ee(e,o,r){const{supported:a,store:u}=be("localStorage");let l,s=f,i=f,c=f;return a&&u?(c=t=>u.setSync(n(e),t),s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o),t.watchEffect((()=>{!1!==r&&c(!0)}))):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function Se(e,o,r){const{supported:a,store:u}=be("sessionStorage");let l,s=f,i=f,c=m;return a&&u?(s=()=>u.removeItem(n(e)),i=()=>u.clear(),l=u.getRef(e),null==l.value&&(u.save(n(e),o),l.value=o)):l=t.ref(o),{supported:a,storage:l,clear:i,remove:s,setSync:c}}function $e(e){const n=o(e.currentPage),r=o(e.pageSize),a=t.ref(0),u=o(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=y(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>r.value,set(e){i(e)&&(r.value=e)}}),v=t.computed((()=>Math.ceil(u.value/c.value)));s.value=n.value;return t.watch([u,c],(e=>{s.value>v.value&&(s.value=v.value)}),{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function Me(e){const n=1e3,o=e&&e.refreshMs||n,r=!e||!l(e.sync)||e.sync,u=e&&a(e.timeFn)&&e.timeFn||Date.now;let s,i;const c=t.ref(u()),v=()=>{clearInterval(s),clearTimeout(i)},d=w?()=>s=setInterval((()=>c.value=u()),o):f;if(r){const e=n-(c.value-Math.floor(c.value/n)*n);i=setTimeout(d,e)}else d();return t.onUnmounted(v),{now:c,remove:v}}function Ie(e,o){return t.computed((()=>{const a=n(e);if(!o)return a;const u=t.isRef(o)?t.reactive(o.value):t.reactive(o);return a.replace(/({?{[\w\s]*}?})/g,(e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return`${t}`;const o=r(u)?u[+t]:u[t];return void 0===o?e:`${n(o)}`}))}))}function ke(e,o,r=".",a=f){return t.computed((()=>{const t=n(e),u=n(o);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(r);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let o=n,r=t.exec(o);if(r){let a=r[0].length,u=r.index-a,s=1;do{r.index,u=r.index,a=r[0].length,n=n.slice(0,-r[0].length),l.splice(e+s,0,r[1]),++s}while(r=t.exec(o));if(!n&&"["===o[0]&&o.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${o}"`)}if(!c(s))return a(l.slice(0,e+1).join(r),s,u,t);if(!n)return a(l.slice(0,e+1).join(r),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(r),s,u,t)}return s}))}function xe(e){return void 0!==e.$value}const Le=(e,o,r)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(o)?o:{$validator:o,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f,$touch:m}=((e,o,r,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=o(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?r.value||!0:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch((e=>(s.value=n(e),i.value=!0,e)))};return a.push((n=>{c=n,t.watch((()=>{try{o(e.value,c)}catch(e){}return e.value}),v,{deep:!0,immediate:!0})})),{$promise:u,$pending:l,$invalid:i,$error:s,$touch:function(){v(e.value)}}})(e,u,t.ref(a),r);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,$touch:m,...l}},Re=(e,r)=>{const a={},u=xe(e)?o(e.$value):void 0;for(const o of Object.keys(e))if("$"!==o[0])if(u){const t=Le(u,e[o],r);a[o]=t}else{const u=Re(e[o],r);let s,i,v,d=f;if(xe(u)){const e=Object.keys(u).filter((e=>"$"!==e[0])).map((e=>u[e]));i=t.computed((()=>e.map((e=>e.$error)).map((e=>n(e))).filter((e=>void 0!==e)))),v=t.computed((()=>e.some((e=>!!n(e.$invalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}else{const e=Object.keys(u).map((e=>u[e]));i=t.computed((()=>e.map((e=>n(e.$errors))).filter((e=>void 0!==e)).filter((e=>e.some(Boolean))))),s=t.computed((()=>e.some((e=>n(e.$anyDirty)||l(n(e.$dirty))&&n(e.$dirty))))),v=t.computed((()=>e.some((e=>!!n(e.$anyInvalid))))),d=()=>Object.keys(u).filter((e=>"$"!==e[0])).reduce(((e,t)=>(e[t]=u[t].toObject(),e)),{})}if(a[o]={toObject:d,...u,$errors:i,$anyInvalid:v},s){a[o].$anyDirty=s;const e=Object.keys(a[o]).filter((e=>"$"!==e[0]&&c(a[o][e])));a[o].$touch=()=>{e.forEach((e=>{const t=a[o][e].$touch;t&&t()}))},a[o].$reset=()=>{e.forEach((e=>{const t=a[o][e].$reset;t&&t()}))}}}else{if("$value"===o){a[o]=u;const e=t.ref(!1),r=t.watch(u,(()=>{e.value=!0,r()}),{immediate:!1,deep:!0});a.$dirty=e,a.$reset=()=>e.value=!1,a.$touch=()=>e.value=!0,a.toObject=()=>n(u);continue}a[o]=e[o]}return a};const Ce=Symbol("");function Te(e){const r=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=e=>("__esModule"in e||"Module"===e[Symbol.toStringTag])&&"default"in e?e.default:e,m=(e,n)=>{if(v[e])return v[e];const r=n.value[e];if(!r)return t.ref({});let u=a(r)?r():r;return d(u)?u.then((t=>v[e]=o(f(t)))):a(r)?o(f(u)):v[e]=t.computed((()=>f(n.value[e])))},p=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(p){const t=m(e.fallback,u);d(t)?(t.then((e=>{c.value=e.value})),h=!0):c.value=t.value}else c.value={};const g=t.ref(0);t.watch(u,(()=>g.value++),{deep:!0,immediate:!1}),t.watch([s,c,g],(([t,o,r])=>{if(t===e.fallback&&p)i.value=o;else{const e=e=>i.value=b({},o,n(e)),r=m(t,u);d(r)?r.then(e):e(r)}}),{immediate:!h});const y=(t,n)=>e.resolve?o(e.resolve(i.value,t,n)):Ie(ke(i,t,".",((e,t,n,o)=>n)),n);return{locale:s,locales:r,i18n:i,$t:y,$ts:(e,t)=>y(e,t).value,addLocale:(e,t)=>{r.value.indexOf(e)>=0||r.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=r.value.indexOf(t);if(n>=0){const o=[s.value,c.value&&e.fallback,...r.value].find((e=>e&&e!==t));o&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=o)),r.value.splice(n,1)}delete u.value[t],delete v[t]}}}function Oe(e){const n=Te(e);return t.provide(Ce,n),n}const Pe=Symbol("");const je=Symbol(""),De={install(e){const n=t.ref(!0),o=t.readonly(n);{e._context.provides[je]=o;const t=e.mount;e.mount=(...e)=>{const o=t(...e);return n.value=!1,o}}}};return e.COMMIT="8ef1ad0",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=g,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS=te,e.UseDevtoolsApp=U,e.VERSION="1.0.0-beta.20",e.VUE_VERSION="3",e.VueComposableDevtools=V,e.buildI18n=Te,e.debounce=$,e.deepClone=b,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(r(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=X,e.getDevtools=D,e.hydrationPlugin=De,e.injectFactory=ne,e.isArray=r,e.isBoolean=l,e.isClient=w,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNull=e=>null===e,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=e=>void 0===e,e.minMax=y,e.noDelay=O,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=o(void 0===t?"":t);return e.provide(Pe,n),n},e.refDebounced=function(e,n){let[o,r]=1===arguments.length&&i(e)&&void 0===n?[t.ref(),e]:[t.ref(e),n];return t.customRef(((e,t)=>({get:()=>(e(),o.value),set:$((e=>{o.value=e,t()}),r)})))},e.refShared=function(e,n){const o=t.getCurrentInstance(),r=n||o.vnode.scopeId;if(!r)return t.ref(e);const{data:a,supported:u}=ee(r,e);return a},e.setBreakpointTailwindCSS=me,e.setCssVariableFor=Y,e.setDevtools=j,e.setI18n=Oe,e.storageAvailable=he,e.unwrap=n,e.useArrayPagination=function(e,n){const r=o(e),a=$e({currentPage:1,pageSize:10,...n,total:t.computed((()=>r.value.length))}),u=t.computed((()=>{const e=r.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]}));return{...a,result:u}},e.useBreakpoint=le,e.useBreakpointChrome=function(){return le({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return ne(se,(()=>me(e||ie)))},e.useBroadcastChannel=q,e.useCancellablePromise=L,e.useClipboard=function(){const e=w&&"clipboard"in navigator,n=t.ref(),o=t.ref(),r=t=>(n.value=t,e?navigator.clipboard.writeText(t):Promise.resolve());let a=()=>Promise.resolve(void 0),l=a;if(e){let e=!1;const s=()=>a().then((e=>n.value=e));["copy","cut","focus"].map((e=>E(window,e,(()=>s())))),a=()=>navigator.clipboard.readText().then((t=>{try{return e=!0,n.value=t}finally{e=!1}})),l=()=>navigator.clipboard.read().then((e=>o.value=e)),t.watch(n,$((t=>{!e&&u(t)&&r(t)}),100))}return{supported:e,text:n,data:o,writeText:r,readText:a,write:t=>e?navigator.clipboard.write(t):Promise.resolve(),read:l}},e.useCssVariables=function(e,r,a){const l=w&&"MutationObserver"in self,[s,i]=t.isRef(r)||v(r)?[r,a||J]:[l&&document.documentElement||{},r||J],c=t.ref(!0),d={},m=[],p=Object.entries(e).map((e=>{const[t,r]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return r&&(m.push((()=>Y(n(s),t,n(r)))),d[e[0]]=o(r)),[e[0],Q(t)]}));for(let e=0;e<p.length;e++){const[r,a]=p[e];d[r]||(d[r]=t.ref(t.isRef(s)&&!s.value||!l?null:X(n(s),a))),l&&t.watch([d[r],o(s)],(e=>{c&&e[1]&&e[0]!==X(e[1],a)&&Y(e[1],a,e[0])}),{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,o]=p[e];d[t].value=X(n(s),o)}},g=new MutationObserver(h),y=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(y),t.isRef(s)?t.onMounted((()=>{m.forEach((e=>e())),t.watch(s,((e,t)=>{t&&y(),e&&b()}))})):(w||s)&&(m.forEach((e=>e())),b()),{...d,supported:l,resume:b,stop:y,observing:c}},e.useCurrencyFormat=function(e,o,r){const a=n(e),u=!c(a),l=u?e:t.computed((()=>n(e).currency)),[s,i]=oe(o,u?r:e),v=t.computed((()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}})),d=re(s),f=(e,t,o,r,a)=>{const u={...v.value,...n(r)},l=n(t)||u.currency,s=n(o)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,o,r,a)=>t.computed((()=>f(e,n,o,r,a))),formatString:f}},e.useDateNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=S,e.useDevtoolsComponentState=function(e,o){const u=t.getCurrentInstance(),l=D();l&&u&&l.on.inspectComponent(((t,l)=>{if(t.componentInstance!==u)return;const[s,i]=c(o)?[o.type,o.multiple]:["setup",!1];if(a(e))return void e(t.instanceData,l);let v=r(e)?e:Object.keys(e).map((t=>({type:s,key:t,value:n(e[t]),..._(e[t])})));if(!i){const e=new Set(t.instanceData.state.map((e=>e.key)));v=v.filter((t=>!e.has(t.key)))}t.instanceData.state.push(...v)}))},e.useDevtoolsInspector=function(e,n=[]){const o=D(),r=t.ref(n),a=t.computed((()=>{if(!r.value)return new Map;const e=t.toRaw(r.value),n=new Map;for(const t of e)n.set(t.id,t);return n}));if(o){const n=e.id;o.addInspector(e),o.on.getInspectorTree((o=>{if(o.inspectorId!=n)return;if(!r.value)return;const a=o.filter;let u=t.toRaw(r.value);o.filter&&(u=e.nodeFilter?e.nodeFilter(o.filter,u):u.filter((e=>e.id.indexOf(a)>=0||e.label.indexOf(a)>=0))),o.rootNodes=u})),o.on.getInspectorState((o=>{if(o.inspectorId!=n)return;const r=a.value.get(o.nodeId);if(r){const n=t.reactive(r.state);o.state=e.stateFilter?e.stateFilter("",n):n}})),t.watch(r,(()=>{o.sendInspectorTree(n),o.sendInspectorState(n)}),{immediate:!0,deep:!0})}return{nodes:r}},e.useDevtoolsTimelineLayer=function(e,t,n){const o=D();let r=f,a=f;return o&&(o.addTimelineLayer({id:e,label:t,color:n}),r=(t,n)=>o.addTimelineEvent({layerId:e,event:t,all:n}),a=e=>r({...e,time:Date.now()})),{id:e,addEvent:r,pushEvent:a}},e.useEvent=E,e.useFetch=function(e,n){const o=t.ref(null),r=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=W(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:W(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:W(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=x((async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then((e=>o.value=e)).catch((e=>{o.value=null,l.value=e})):Promise.resolve(),n.clone().blob().then((e=>{a.value=e})),n.clone().text().then((e=>{r.value=e}))];i&&await Promise.all(e)}return n}),!0),g=t.computed((()=>h.result.value&&h.result.value.status||null)),y=t.computed((()=>h.result.value&&h.result.value.statusText||null));return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted((()=>{m&&p("unmounted")})),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:r,blob:a,json:o,jsonError:l,status:g,statusText:y}},e.useFormat=Ie,e.useGeolocation=function(e){const n=w&&!!navigator.geolocation,o=t.ref(e?!1===e.immediate:void 0),r=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,r.value=null},c=e=>{a.value=Date.now(),u.value=null,r.value=e},v=()=>!0!==o.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=o.value?()=>{o.value?o.value=!1:d()}:d;let f=0;t.onMounted((()=>t.watch([s,o],(t=>{v();const o=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:o}:{enableHighAccuracy:o})}),{immediate:!o.value}))),t.onUnmounted(v)}return{supported:n,refresh:i,error:r,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(je,t.computed((()=>!1)))},e.useI18n=function(e){return e?Oe(e):t.inject(Ce)},e.useIntersectionObserver=function(e,r){const a=w&&"IntersectionObserver"in window,u=e?o(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed((()=>r?n(r):l?void 0:n(e))),i=t.ref([]),c=t.computed((()=>i.value.length>0&&i.value.every((e=>e.isIntersecting)))),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,(e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map((e=>e.target)).forEach(m.value.observe)}),{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted((()=>{l.value&&p(l)})),t.onUnmounted((()=>{g()}))),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...o){let r;const a=(t,...a)=>{if(u(),!t&&!n)return;return r=setInterval(e,t||n,...a&&a.length?a:o)},u=()=>{r&&(clearInterval(r),r=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,o){const[r,a]=oe(e,o),l=t.computed((()=>new Intl.DateTimeFormat(n(r),n(a)))),s=(e,t,o)=>{const s=t||o?new Intl.DateTimeFormat(n(o)||n(r),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,o)=>t.computed((()=>s(e,n,o))),formatString:s,formatter:l}},e.useIntlNumberFormat=re,e.useLanguage=function(){if(H||(H=w?t.ref(navigator.language):t.ref("")),!K)if(w){K=t.ref(navigator.languages);const e=()=>{H.value=navigator.language,K.value=navigator.languages};window.addEventListener("languagechange",e,p)}else K=t.ref([]);return{language:H,languages:K}},e.useLocalStorage=Ee,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):r(t.unref(e))?o(e):o([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass=te);const i=t.ref(!1),c=t.computed((()=>l.value.map((e=>t.ref(e))))),v=t.watch([i,c],(([e,t],[o,r])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(o===e&&r.find((e=>n(e)===t))||s.onChange(t,e))}}),{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted((()=>l.value=Array.from(document.querySelectorAll(e)))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=Z,e.useMouseDistanceFromElement=function(e,o,r){let a,u=f;if(w){const{pageX:l,pageY:s,remove:i}=M(window,o,r);a=t.computed((()=>{const t=n(e);return t?Math.floor(Math.sqrt(Math.pow(l.value-(t.offsetLeft+t.clientWidth/2),2)+Math.pow(s.value-(t.offsetTop+t.clientHeight/2),2))):0})),u=i}else a=t.computed((()=>-1));return{distance:a,remove:u}},e.useNetworkInformation=function(){const e=!!w&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,o=t.ref(0),r=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{o.value=e.downlink,r.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=E(e,"change",i,p),i()),{supported:n,downlink:o,downlinkMax:r,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=Me,e.useOnMouseMove=M,e.useOnOutsidePress=function(e,t){if(!w)return()=>{};const n=o(e),r=k.find((e=>`on${e}`in document.documentElement));return E(document,r,(e=>n.value&&!n.value.contains(e.target)&&t(e)),{passive:!0})},e.useOnResize=function(e,n,r){const a=o(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,r];v&&(s=S(s,r));const d=w?E(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,r){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?o(e):t.ref(w&&window||void 0),s=a(e)?u:t.ref(w&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=I.reduce(((e,t)=>(e[t]=(...e)=>s.value&&s.value[t]&&s.value[t].apply(s.value,e),e)),{}),h=e=>m.scrollTo({top:e}),g=e=>m.scrollTo({left:e}),[y,b]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,r];b&&(f=S(f,r));const $=E(u,"scroll",f,y),M=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,remove:()=>{$(),k(),M()},scrollTopTo:h,scrollLeftTo:g,...m}},e.useOnline=function(){const e=w&&"onLine"in navigator;return e||(N=t.ref(!1)),N||(N=t.ref(navigator.onLine),window.addEventListener("offline",(()=>N.value=!1),p),window.addEventListener("online",(()=>N.value=!0),p)),{supported:e,online:N}},e.usePageVisibility=function(){return B||(B=t.ref(w&&document.hidden)),z||(w?(z=t.ref(document.visibilityState),document.addEventListener("visibilitychange",(()=>{z.value=document.visibilityState,B.value=document.hidden}),p)):z=t.ref("visible")),{visibility:z,hidden:B}},e.usePagination=$e,e.usePath=ke,e.usePerformanceNow=function(e){return Me({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=x,e.usePromiseLazy=function(e,t=!1){return x(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const o=!e||a(e)?{}:e,r=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(r&&!a(r))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed((()=>s.value.length)),nextRetry:l,retryErrors:s,[R]:{value:0},[C]:i},d=r?(...e)=>(++v[R].value,T(o,v,r,e)):e=>(++v[R].value,T(o,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),o=t.inject(Pe,n);return o===n||void 0===o?t.ref(u(e)?e:""):(u(e)&&(o.value=e),o)},e.useSessionStorage=Se,e.useShare=function(e){const n=w&&"share"in navigator;let o=()=>Promise.resolve(!1),r=m,a=t.ref(!1),u=t.ref(!1);return n&&(o=e=>(a.value=!1,u.value=!1,navigator.share(e).then((e=>(a.value=!0,e))).catch((e=>(a.value=!1,u.value=!0,!1)))),r=e=>navigator.canShare(e),e&&r(e)&&o(e)),{supported:n,share:o,canShare:r,shared:a,cancelled:u}},e.useSharedRef=ee,e.useStorage=function(e,t,n){return void 0===we&&(we=be("localStorage").supported),we?Ee(e,t,n):Se(e,t)},e.useTimeline=function(e,n){const o=t.ref([]),r=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||g;return t.watch(e,((e,t)=>{o.value.unshift({item:r(t),date:new Date}),o.value.length>a&&o.value.pop()}),{immediate:!1,flush:"sync",...n}),t.readonly(o)},e.useTimeout=function(e,n=0){let o=t.ref(!1);const r=setTimeout((()=>{o.value=!0,e()}),n),a=()=>{o.value=null,clearTimeout(r)};return t.onUnmounted(a),{ready:o,cancel:a}},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),o=new MutationObserver((e=>{n.value=e[0].target.textContent}));t.watch(n,((e,t)=>{u(e)&&e!==t&&(document.title=e)}),{immediate:!0,flush:"sync"});const r=document.querySelector("title");return o.observe(r,{childList:!0}),t.onUnmounted((()=>o.disconnect())),n},e.useUndo=function(e,n){const r=o(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||g,s=n&&n.clone||(e=>e),i=t.computed((()=>{const e=0===u.value?1:u.value;return a.value.slice(e)})),c=t.computed((()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)}));t.watch(r,(e=>{if(a.value[u.value]===e)return;if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop();const t=s(e);a.value.unshift(t)}),{...n,immediate:!0,flush:"sync"});const v=e=>{const t=Math.sign(e)<=0?Math.max(e,-c.value.length):Math.min(e,i.value.length);u.value+=t,r.value=a.value[u.value]};return{value:r,undo:(e=1)=>v(e),redo:(e=1)=>v(-e),jump:v,prev:i,next:c}},e.useVModel=function(e,n){const o=t.getCurrentInstance();return o?t.computed({get:()=>e[n],set(e){o.emit(`update:${n}`,e)}}):t.ref()},e.useValidation=function(e){const n=[],o=Re({input:e},n),r=t.reactive(o.input);return n.forEach((e=>e(r))),r},e.useValueSync=function(e,n){const a=o(e),u=2===arguments.length?t.isRef(arguments[1])&&r(arguments[1].value)?arguments[1]:t.ref([o(arguments[1])]):t.ref(Array.from(arguments).slice(1).map((e=>o(e))));u.value.forEach((e=>{e.value=a.value}));let l=u.value.length;return t.watch([a,u],(([e,t])=>{if(l<t.length)t.forEach((t=>{t.value!==e&&(t.value=e)}));else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}}),{deep:!0}),t.watch(a,(e=>{u.value.forEach((t=>t.value=e))}),{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const o=w&&"WebSocket"in window;let r=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return o&&(r=new WebSocket(e,n),r.addEventListener("message",(e=>{a.value=e,l.value=e.data})),r.addEventListener("error",(e=>{u.value=e,c.value=!0})),r.addEventListener("close",(()=>{s.value=!1,i.value=!0})),r.addEventListener("open",(()=>{s.value=!0,i.value=!1})),v=e=>r.send(e),d=(e,t)=>{r.close(e,t)}),{supported:o,ws:r,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=be,e.useWorker=function(e,n,o){const r=w&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!r),s=t.ref(!r);if(!r)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,o),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",(e=>{u.value=e.data}),p),i.addEventListener("error",(e=>{a.value=e,s.value=!0}),p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,o){const r=w&&"Worker"in self,a=t.computed((()=>o&&n(o.dependencies)||[])),u=t.computed((()=>o&&n(o.timeout)));if(!r)return L(e,{lazy:!0,throwException:!0});const l=L(((...n)=>new Promise(((o,r)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${G.toString()})(${e.toString()})`],o=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(o)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed((()=>l.cancelled.value||n[n.length-1].value)):l.cancelled,h=m?t.watch(m,(()=>{d(),o(void 0)}),{immediate:!1}):f;i.addEventListener("message",(e=>{e.data[0]?o(e.data[1]):r(e.data[1]),d()}),p),i.addEventListener("error",(e=>{d(),r(e)}),p),i.postMessage([...n]),v&&(c=setTimeout((()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)}),v))}))),{lazy:!0,throwException:!0});return l},e.wrap=o,Object.defineProperty(e,"__esModule",{value:!0}),e}({},VueRuntimeCore); |
{ | ||
"name": "vue-composable", | ||
"version": "1.0.0-beta.19", | ||
"version": "1.0.0-beta.20", | ||
"description": "vue-composable", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1804313