diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..78a833ef --- /dev/null +++ b/404.html @@ -0,0 +1,21 @@ + + + + + + 404 | js-lib + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/array.html b/array.html new file mode 100644 index 00000000..dd21e9e1 --- /dev/null +++ b/array.html @@ -0,0 +1,139 @@ + + + + + + Array | js-lib + + + + + + + + + + + + + +
Skip to content

Array

_range

Quickly generate an incremental array of numbers.

  • Starts with 0, unless specified differently
  • Step is 1, unless specified differently
  • Lower bound is inclusive, higher-bound is exclusive.
ts
_range(3)
+// [0, 1, 2]
+
+_range(3, 6)
+// [3, 4, 5]
+
+_range(1, 10, 2)
+// [1, 3, 5, 7, 9]

_chunk

Splits an input array into "chunks" of defined size. Last/remaining chunk may be of "incomplete" size. Returns array-of-arrays.

ts
const a = [1, 2, 3, 4, 5, 6]
+
+_chunk(a, 2)
+// [[1, 2], [3, 4], [5, 6]]
+
+_chunk(a, 3)
+// [[1, 2, 3], [4, 5, 6]]
+
+_chunk(a, 4)
+// [[1, 2, 3, 4], [5, 6]]]

_flatten

Polyfill to Array.flat() with depth=1. From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat

ts
_flatten([
+  [1, 2],
+  [3, 4],
+])
+// [1, 2, 3, 4]

_flattenDeep

Based on https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep

Recursive Array.flat(), with infinite depth.

ts
_flattenDeep([
+  [
+    [1, 2],
+    [3, 4],
+  ],
+  [5, 6],
+  [7],
+])
+// [1, 2, 3, 4, 5, 6, 7]

_uniq

Convenience function to remove duplicates from an array of primitives.

ts
const a = [1, 2, 2, 3]
+_uniq(a)
+// [1, 2, 3]

_uniqBy

Remove duplicates from array of objects, providing a comparator function.

ts
const a = [{ age: 18 }, { age: 20 }, { age: 18 }]
+_uniqBy(a, obj => obj.age)
+// [{ age: 18 }, { age: 20 }]

_by

ts
const a = [
+  { id: 'id1', a: 'a1' },
+  { id: 'id2', b: 'b1' },
+]
+
+_by(a, r => r.id)
+// {
+//  id1: {id: 'id1', a: 'a1'},
+//  id2: {id: 'id2', b: 'b1'},
+//}

_groupBy

ts
const a = [1, 2, 3, 4, 5]
+
+_groupBy(a, r => (r % 2 ? 'even' : 'odd'))
+// {
+//  odd: [1, 3, 5],
+//  even: [2, 4],
+// }

Returning undefined from the Mapper will EXCLUDE the item.

_sortBy

Sort an array of object, providing a comparator function.

ts
const a = [{ age: 18 }, { age: 20 }, { age: 19 }]
+_sortBy(a, obj => obj.age)
+// [{ age: 18 }, {age: 19 }, { age: 20 }]

_sortNumbers

Sort an array of numbers. Needs a special treatment because of a caveat, that a default comparator function compares things as Strings (even Numbers), so '21' > '100'.

ts
const a = [1, 3, 2]
+_sortNumbers(a)
+// [1, 2, 3]

_findLast

Like .find(), but tries to find an element from the END of the array.

ts
const a = [1, 2, 3, 4, 5]
+_findLast(a, n => n % 2 === 0)
+// 4

_takeWhile, _takeRightWhile, _dropWhile, _dropRightWhile

ts
const a = [1, 2, 3, 4, 5, 2, 1]
+
+_takeWhile(a, r => r <= 3)
+// [1, 2, 3]
+
+_takeRightWhile(a, r => r <= 3)
+// [1, 2]
+// Note that the order is reversed when taking from Right!
+
+_dropWhile(a, r => r <= 3)
+// [4, 5, 2, 1]
+
+_dropRightWhile(a, r => r <= 3)
+// [5, 4, 3, 2, 1]
+// Note that the order is reversed when dropping from Right!

_countBy

ts
_countBy(['a', 'aa', 'aaa', 'aaa', 'aaaa'], r => r.length)
+// {
+//   1: 1,
+//   2: 1,
+//   3: 2,
+//   4: 1,
+// })

_intersection

Inspired by Lodash's _.intersection.

ts
_intersection([2, 1], [2, 3])
+// [2]
+
+_intersection([1], [2])
+// []
+
+_intersection()
+// []
+
+_intersection([1])
+// [1]

_difference

Inspired by Lodash's _.difference

ts
_difference([2, 1], [2, 3])
+// [1]
+
+_difference([1], [2])
+// [1]
+
+_difference([1], [1])
+// []
+
+_difference([1])
+// [1]

_sum

Inspired by Lodash's _.sum

Same as Lodash, sum of empty array returns 0 (not NaN, not error)

ts
_sum([]) // 0
+_sum([1]) // 1
+_sum([1, 2]) // 3

_sumBy

Inspired by Lodash's _.sumBy

ts
const items = [
+  { a: 1 },
+  { a: 2 },
+  { b: 3 }, // `a` is undefined (not a number) here, will be treated as 0
+]
+
+_sumBy(items, i => i.a) // 1 + 2 + 0 == 3

_mapToObject

Map an array of T to a StringMap<V>, by returning a tuple of [key, value] from a mapper function.

Return undefined/null/false/0/void to filter out (not include) a value.

Similar to reduce, but with subjectively cleaner syntax of returning "entries".

Similar to mapping to "entries" and passing to Object.fromEntries().

ts
_mapToObject([1, 2, 3], n => [n, n * 2])
+// { '1': 2, '2': 4, '3': 6 }
+
+_mapToObject([1, 2, 3], n => [n, `id${n}`])
+// { '1': 'id1, '2': 'id2', '3': 'id3' }

_shuffle

Randomly shuffle an array values.

Uses Fisher–Yates algorithm.

Based on: https://stackoverflow.com/a/12646864/4919972

ts
const a = [1, 2, 3, 4, 5]
+const b = _shuffle(a)
+// [3, 1, 2, 5, 4]
+
+// Mutating example
+_shuffle(a)
+// a == [4, 2, 3, 1, 5]

_last

Returns last element of the array, or undefined if the array is empty.

Very simple semantic convenience method (lodash-inspired).

ts
const a = [1, 2, 3]
+_last(a) // 3
+
+const a = []
+_last(a) // undefined
+ + + + \ No newline at end of file diff --git a/assets/app.fgrtGekM.js b/assets/app.fgrtGekM.js new file mode 100644 index 00000000..bedce8f3 --- /dev/null +++ b/assets/app.fgrtGekM.js @@ -0,0 +1 @@ +import{U as o,a2 as p,a3 as u,a4 as l,a5 as c,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as P,u as v,y,x as C,ac as b,ad as w,ae as E,af as R}from"./chunks/framework.DXq9tg-I.js";import{t as S}from"./chunks/theme.BaZNtQCC.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),_=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),E(),s.setup&&s.setup(),()=>R(s.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=D(),a=x();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function x(){return h(_)}function D(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{T as createApp}; diff --git a/assets/array.md.CCcREjNl.js b/assets/array.md.CCcREjNl.js new file mode 100644 index 00000000..b4167dcd --- /dev/null +++ b/assets/array.md.CCcREjNl.js @@ -0,0 +1,116 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const o=JSON.parse('{"title":"Array","description":"","frontmatter":{},"headers":[],"relativePath":"array.md","filePath":"array.md"}'),h={name:"array.md"},t=n(`

Array

_range

Quickly generate an incremental array of numbers.

ts
_range(3)
+// [0, 1, 2]
+
+_range(3, 6)
+// [3, 4, 5]
+
+_range(1, 10, 2)
+// [1, 3, 5, 7, 9]

_chunk

Splits an input array into "chunks" of defined size. Last/remaining chunk may be of "incomplete" size. Returns array-of-arrays.

ts
const a = [1, 2, 3, 4, 5, 6]
+
+_chunk(a, 2)
+// [[1, 2], [3, 4], [5, 6]]
+
+_chunk(a, 3)
+// [[1, 2, 3], [4, 5, 6]]
+
+_chunk(a, 4)
+// [[1, 2, 3, 4], [5, 6]]]

_flatten

Polyfill to Array.flat() with depth=1. From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat

ts
_flatten([
+  [1, 2],
+  [3, 4],
+])
+// [1, 2, 3, 4]

_flattenDeep

Based on https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep

Recursive Array.flat(), with infinite depth.

ts
_flattenDeep([
+  [
+    [1, 2],
+    [3, 4],
+  ],
+  [5, 6],
+  [7],
+])
+// [1, 2, 3, 4, 5, 6, 7]

_uniq

Convenience function to remove duplicates from an array of primitives.

ts
const a = [1, 2, 2, 3]
+_uniq(a)
+// [1, 2, 3]

_uniqBy

Remove duplicates from array of objects, providing a comparator function.

ts
const a = [{ age: 18 }, { age: 20 }, { age: 18 }]
+_uniqBy(a, obj => obj.age)
+// [{ age: 18 }, { age: 20 }]

_by

ts
const a = [
+  { id: 'id1', a: 'a1' },
+  { id: 'id2', b: 'b1' },
+]
+
+_by(a, r => r.id)
+// {
+//  id1: {id: 'id1', a: 'a1'},
+//  id2: {id: 'id2', b: 'b1'},
+//}

_groupBy

ts
const a = [1, 2, 3, 4, 5]
+
+_groupBy(a, r => (r % 2 ? 'even' : 'odd'))
+// {
+//  odd: [1, 3, 5],
+//  even: [2, 4],
+// }

Returning undefined from the Mapper will EXCLUDE the item.

_sortBy

Sort an array of object, providing a comparator function.

ts
const a = [{ age: 18 }, { age: 20 }, { age: 19 }]
+_sortBy(a, obj => obj.age)
+// [{ age: 18 }, {age: 19 }, { age: 20 }]

_sortNumbers

Sort an array of numbers. Needs a special treatment because of a caveat, that a default comparator function compares things as Strings (even Numbers), so '21' > '100'.

ts
const a = [1, 3, 2]
+_sortNumbers(a)
+// [1, 2, 3]

_findLast

Like .find(), but tries to find an element from the END of the array.

ts
const a = [1, 2, 3, 4, 5]
+_findLast(a, n => n % 2 === 0)
+// 4

_takeWhile, _takeRightWhile, _dropWhile, _dropRightWhile

ts
const a = [1, 2, 3, 4, 5, 2, 1]
+
+_takeWhile(a, r => r <= 3)
+// [1, 2, 3]
+
+_takeRightWhile(a, r => r <= 3)
+// [1, 2]
+// Note that the order is reversed when taking from Right!
+
+_dropWhile(a, r => r <= 3)
+// [4, 5, 2, 1]
+
+_dropRightWhile(a, r => r <= 3)
+// [5, 4, 3, 2, 1]
+// Note that the order is reversed when dropping from Right!

_countBy

ts
_countBy(['a', 'aa', 'aaa', 'aaa', 'aaaa'], r => r.length)
+// {
+//   1: 1,
+//   2: 1,
+//   3: 2,
+//   4: 1,
+// })

_intersection

Inspired by Lodash's _.intersection.

ts
_intersection([2, 1], [2, 3])
+// [2]
+
+_intersection([1], [2])
+// []
+
+_intersection()
+// []
+
+_intersection([1])
+// [1]

_difference

Inspired by Lodash's _.difference

ts
_difference([2, 1], [2, 3])
+// [1]
+
+_difference([1], [2])
+// [1]
+
+_difference([1], [1])
+// []
+
+_difference([1])
+// [1]

_sum

Inspired by Lodash's _.sum

Same as Lodash, sum of empty array returns 0 (not NaN, not error)

ts
_sum([]) // 0
+_sum([1]) // 1
+_sum([1, 2]) // 3

_sumBy

Inspired by Lodash's _.sumBy

ts
const items = [
+  { a: 1 },
+  { a: 2 },
+  { b: 3 }, // \`a\` is undefined (not a number) here, will be treated as 0
+]
+
+_sumBy(items, i => i.a) // 1 + 2 + 0 == 3

_mapToObject

Map an array of T to a StringMap<V>, by returning a tuple of [key, value] from a mapper function.

Return undefined/null/false/0/void to filter out (not include) a value.

Similar to reduce, but with subjectively cleaner syntax of returning "entries".

Similar to mapping to "entries" and passing to Object.fromEntries().

ts
_mapToObject([1, 2, 3], n => [n, n * 2])
+// { '1': 2, '2': 4, '3': 6 }
+
+_mapToObject([1, 2, 3], n => [n, \`id\${n}\`])
+// { '1': 'id1, '2': 'id2', '3': 'id3' }

_shuffle

Randomly shuffle an array values.

Uses Fisher–Yates algorithm.

Based on: https://stackoverflow.com/a/12646864/4919972

ts
const a = [1, 2, 3, 4, 5]
+const b = _shuffle(a)
+// [3, 1, 2, 5, 4]
+
+// Mutating example
+_shuffle(a)
+// a == [4, 2, 3, 1, 5]

_last

Returns last element of the array, or undefined if the array is empty.

Very simple semantic convenience method (lodash-inspired).

ts
const a = [1, 2, 3]
+_last(a) // 3
+
+const a = []
+_last(a) // undefined
`,67),l=[t];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const c=s(h,[["render",p]]);export{o as __pageData,c as default}; diff --git a/assets/array.md.CCcREjNl.lean.js b/assets/array.md.CCcREjNl.lean.js new file mode 100644 index 00000000..263f5f7c --- /dev/null +++ b/assets/array.md.CCcREjNl.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const o=JSON.parse('{"title":"Array","description":"","frontmatter":{},"headers":[],"relativePath":"array.md","filePath":"array.md"}'),h={name:"array.md"},t=n("",67),l=[t];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const c=s(h,[["render",p]]);export{o as __pageData,c as default}; diff --git a/assets/chunks/framework.DXq9tg-I.js b/assets/chunks/framework.DXq9tg-I.js new file mode 100644 index 00000000..d7d51383 --- /dev/null +++ b/assets/chunks/framework.DXq9tg-I.js @@ -0,0 +1,17 @@ +/** +* @vue/shared v3.4.29 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function fs(e,t){const n=new Set(e.split(","));return s=>n.has(s)}const te={},gt=[],Se=()=>{},fo=()=>!1,Vt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ds=e=>e.startsWith("onUpdate:"),ie=Object.assign,hs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ho=Object.prototype.hasOwnProperty,Y=(e,t)=>ho.call(e,t),D=Array.isArray,mt=e=>mn(e)==="[object Map]",Mr=e=>mn(e)==="[object Set]",k=e=>typeof e=="function",re=e=>typeof e=="string",ut=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",Nr=e=>(Z(e)||k(e))&&k(e.then)&&k(e.catch),Fr=Object.prototype.toString,mn=e=>Fr.call(e),po=e=>mn(e).slice(8,-1),$r=e=>mn(e)==="[object Object]",ps=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,_t=fs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_n=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},go=/-(\w)/g,Ne=_n(e=>e.replace(go,(t,n)=>n?n.toUpperCase():"")),mo=/\B([A-Z])/g,ft=_n(e=>e.replace(mo,"-$1").toLowerCase()),yn=_n(e=>e.charAt(0).toUpperCase()+e.slice(1)),tn=_n(e=>e?`on${yn(e)}`:""),Ye=(e,t)=>!Object.is(e,t),Fn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},_o=e=>{const t=parseFloat(e);return isNaN(t)?e:t},yo=e=>{const t=re(e)?Number(e):NaN;return isNaN(t)?e:t};let js;const jr=()=>js||(js=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gs(e){if(D(e)){const t={};for(let n=0;n{if(n){const s=n.split(vo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ms(e){let t="";if(re(e))t=e;else if(D(e))for(let n=0;nre(e)?e:e==null?"":D(e)||Z(e)&&(e.toString===Fr||!k(e.toString))?JSON.stringify(e,Dr,2):String(e),Dr=(e,t)=>t&&t.__v_isRef?Dr(e,t.value):mt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[$n(s,i)+" =>"]=r,n),{})}:Mr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>$n(n))}:ut(t)?$n(t):Z(t)&&!D(t)&&!$r(t)?String(t):t,$n=(e,t="")=>{var n;return ut(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.4.29 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let we;class xo{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=we;try{return we=this,t()}finally{we=n}}}on(){we=this}off(){we=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Ze()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Ge,n=lt;try{return Ge=!0,lt=this,this._runnings++,Vs(this),this.fn()}finally{Ds(this),this._runnings--,lt=n,Ge=t}}stop(){this.active&&(Vs(this),Ds(this),this.onStop&&this.onStop(),this.active=!1)}}function Ro(e){return e.value}function Vs(e){e._trackId++,e._depsLength=0}function Ds(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t0){s._dirtyLevel=2;continue}let r;s._dirtyLevel{const n=new Map;return n.cleanup=e,n.computed=t,n},ln=new WeakMap,ct=Symbol(""),ns=Symbol("");function be(e,t,n){if(Ge&<){let s=ln.get(e);s||ln.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=qr(()=>s.delete(n))),kr(lt,r)}}function je(e,t,n,s,r,i){const o=ln.get(e);if(!o)return;let l=[];if(t==="clear")l=[...o.values()];else if(n==="length"&&D(e)){const c=Number(s);o.forEach((u,d)=>{(d==="length"||!ut(d)&&d>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":D(e)?ps(n)&&l.push(o.get("length")):(l.push(o.get(ct)),mt(e)&&l.push(o.get(ns)));break;case"delete":D(e)||(l.push(o.get(ct)),mt(e)&&l.push(o.get(ns)));break;case"set":mt(e)&&l.push(o.get(ct));break}ys();for(const c of l)c&&Wr(c,5);bs()}function Oo(e,t){const n=ln.get(e);return n&&n.get(t)}const Lo=fs("__proto__,__v_isRef,__isVue"),Gr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ut)),Us=Io();function Io(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=J(this);for(let i=0,o=this.length;i{e[t]=function(...n){Qe(),ys();const s=J(this)[t].apply(this,n);return bs(),Ze(),s}}),e}function Po(e){ut(e)||(e=String(e));const t=J(this);return be(t,"has",e),t.hasOwnProperty(e)}class zr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Wo:Qr:i?Jr:Yr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=D(t);if(!r){if(o&&Y(Us,n))return Reflect.get(Us,n,s);if(n==="hasOwnProperty")return Po}const l=Reflect.get(t,n,s);return(ut(n)?Gr.has(n):Lo(n))||(r||be(t,"get",n),i)?l:pe(l)?o&&ps(n)?l:l.value:Z(l)?r?wn(l):vn(l):l}}class Xr extends zr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const c=Mt(i);if(!cn(s)&&!Mt(s)&&(i=J(i),s=J(s)),!D(t)&&pe(i)&&!pe(s))return c?!1:(i.value=s,!0)}const o=D(t)&&ps(n)?Number(n)e,bn=e=>Reflect.getPrototypeOf(e);function Kt(e,t,n=!1,s=!1){e=e.__v_raw;const r=J(e),i=J(t);n||(Ye(t,i)&&be(r,"get",t),be(r,"get",i));const{has:o}=bn(r),l=s?vs:n?Cs:Nt;if(o.call(r,t))return l(e.get(t));if(o.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function kt(e,t=!1){const n=this.__v_raw,s=J(n),r=J(e);return t||(Ye(e,r)&&be(s,"has",e),be(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Wt(e,t=!1){return e=e.__v_raw,!t&&be(J(e),"iterate",ct),Reflect.get(e,"size",e)}function Bs(e){e=J(e);const t=J(this);return bn(t).has.call(t,e)||(t.add(e),je(t,"add",e,e)),this}function Ks(e,t){t=J(t);const n=J(this),{has:s,get:r}=bn(n);let i=s.call(n,e);i||(e=J(e),i=s.call(n,e));const o=r.call(n,e);return n.set(e,t),i?Ye(t,o)&&je(n,"set",e,t):je(n,"add",e,t),this}function ks(e){const t=J(this),{has:n,get:s}=bn(t);let r=n.call(t,e);r||(e=J(e),r=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return r&&je(t,"delete",e,void 0),i}function Ws(){const e=J(this),t=e.size!==0,n=e.clear();return t&&je(e,"clear",void 0,void 0),n}function qt(e,t){return function(s,r){const i=this,o=i.__v_raw,l=J(o),c=t?vs:e?Cs:Nt;return!e&&be(l,"iterate",ct),o.forEach((u,d)=>s.call(r,c(u),c(d),i))}}function Gt(e,t,n){return function(...s){const r=this.__v_raw,i=J(r),o=mt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=r[e](...s),d=n?vs:t?Cs:Nt;return!t&&be(i,"iterate",c?ns:ct),{next(){const{value:h,done:b}=u.next();return b?{value:h,done:b}:{value:l?[d(h[0]),d(h[1])]:d(h),done:b}},[Symbol.iterator](){return this}}}}function Ue(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ho(){const e={get(i){return Kt(this,i)},get size(){return Wt(this)},has:kt,add:Bs,set:Ks,delete:ks,clear:Ws,forEach:qt(!1,!1)},t={get(i){return Kt(this,i,!1,!0)},get size(){return Wt(this)},has:kt,add:Bs,set:Ks,delete:ks,clear:Ws,forEach:qt(!1,!0)},n={get(i){return Kt(this,i,!0)},get size(){return Wt(this,!0)},has(i){return kt.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:qt(!0,!1)},s={get(i){return Kt(this,i,!0,!0)},get size(){return Wt(this,!0)},has(i){return kt.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:qt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Gt(i,!1,!1),n[i]=Gt(i,!0,!1),t[i]=Gt(i,!1,!0),s[i]=Gt(i,!0,!0)}),[e,n,t,s]}const[jo,Vo,Do,Uo]=Ho();function ws(e,t){const n=t?e?Uo:Do:e?Vo:jo;return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Y(n,r)&&r in s?n:s,r,i)}const Bo={get:ws(!1,!1)},Ko={get:ws(!1,!0)},ko={get:ws(!0,!1)};const Yr=new WeakMap,Jr=new WeakMap,Qr=new WeakMap,Wo=new WeakMap;function qo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Go(e){return e.__v_skip||!Object.isExtensible(e)?0:qo(po(e))}function vn(e){return Mt(e)?e:Es(e,!1,No,Bo,Yr)}function zo(e){return Es(e,!1,$o,Ko,Jr)}function wn(e){return Es(e,!0,Fo,ko,Qr)}function Es(e,t,n,s,r){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=Go(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function At(e){return Mt(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function cn(e){return!!(e&&e.__v_isShallow)}function Zr(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function nn(e){return Object.isExtensible(e)&&Hr(e,"__v_skip",!0),e}const Nt=e=>Z(e)?vn(e):e,Cs=e=>Z(e)?wn(e):e;class ei{constructor(t,n,s,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new _s(()=>t(this._value),()=>Rt(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=J(this);return(!t._cacheable||t.effect.dirty)&&Ye(t._value,t._value=t.effect.run())&&Rt(t,5),Ss(t),t.effect._dirtyLevel>=2&&Rt(t,3),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Xo(e,t,n=!1){let s,r;const i=k(e);return i?(s=e,r=Se):(s=e.get,r=e.set),new ei(s,r,i||!r,n)}function Ss(e){var t;Ge&<&&(e=J(e),kr(lt,(t=e.dep)!=null?t:e.dep=qr(()=>e.dep=void 0,e instanceof ei?e:void 0)))}function Rt(e,t=5,n,s){e=J(e);const r=e.dep;r&&Wr(r,t)}function pe(e){return!!(e&&e.__v_isRef===!0)}function ae(e){return ni(e,!1)}function ti(e){return ni(e,!0)}function ni(e,t){return pe(e)?e:new Yo(e,t)}class Yo{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:J(t),this._value=n?t:Nt(t)}get value(){return Ss(this),this._value}set value(t){const n=this.__v_isShallow||cn(t)||Mt(t);t=n?t:J(t),Ye(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Nt(t),Rt(this,5))}}function si(e){return pe(e)?e.value:e}const Jo={get:(e,t,n)=>si(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pe(r)&&!pe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function ri(e){return At(e)?e:new Proxy(e,Jo)}class Qo{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:s}=t(()=>Ss(this),()=>Rt(this));this._get=n,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function Zo(e){return new Qo(e)}class el{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Oo(J(this._object),this._key)}}class tl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function nl(e,t,n){return pe(e)?e:k(e)?new tl(e):Z(e)&&arguments.length>1?sl(e,t,n):ae(e)}function sl(e,t,n){const s=e[t];return pe(s)?s:new el(e,t,n)}/** +* @vue/runtime-core v3.4.29 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function ze(e,t,n,s){try{return s?e(...s):e()}catch(r){En(r,t,n)}}function xe(e,t,n,s){if(k(e)){const r=ze(e,t,n,s);return r&&Nr(r)&&r.catch(i=>{En(i,t,n)}),r}if(D(e)){const r=[];for(let i=0;i>>1,r=de[s],i=$t(r);iPe&&de.splice(t,1)}function ll(e){D(e)?yt.push(...e):(!ke||!ke.includes(e,e.allowRecurse?rt+1:rt))&&yt.push(e),oi()}function qs(e,t,n=Ft?Pe+1:0){for(;n$t(n)-$t(s));if(yt.length=0,ke){ke.push(...t);return}for(ke=t,rt=0;rte.id==null?1/0:e.id,cl=(e,t)=>{const n=$t(e)-$t(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function li(e){ss=!1,Ft=!0,de.sort(cl);try{for(Pe=0;Pere(T)?T.trim():T)),h&&(r=n.map(_o))}let l,c=s[l=tn(t)]||s[l=tn(Ne(t))];!c&&i&&(c=s[l=tn(ft(t))]),c&&xe(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xe(u,e,6,r)}}function ci(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!k(e)){const c=u=>{const d=ci(u,t,!0);d&&(l=!0,ie(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(Z(e)&&s.set(e,null),null):(D(i)?i.forEach(c=>o[c]=null):ie(o,i),Z(e)&&s.set(e,o),o)}function Sn(e,t){return!e||!Vt(t)?!1:(t=t.slice(2).replace(/Once$/,""),Y(e,t[0].toLowerCase()+t.slice(1))||Y(e,ft(t))||Y(e,t))}let he=null,xn=null;function un(e){const t=he;return he=e,xn=e&&e.type.__scopeId||null,t}function Ua(e){xn=e}function Ba(){xn=null}function ul(e,t=he,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&or(-1);const i=un(t);let o;try{o=e(...r)}finally{un(i),s._d&&or(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Hn(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:u,renderCache:d,props:h,data:b,setupState:T,ctx:P,inheritAttrs:M}=e,B=un(e);let G,z;try{if(n.shapeFlag&4){const m=r||s,I=m;G=Ae(u.call(I,m,d,h,T,b,P)),z=l}else{const m=t;G=Ae(m.length>1?m(h,{attrs:l,slots:o,emit:c}):m(h,null)),z=t.props?l:fl(l)}}catch(m){Pt.length=0,En(m,e,1),G=ue(me)}let g=G;if(z&&M!==!1){const m=Object.keys(z),{shapeFlag:I}=g;m.length&&I&7&&(i&&m.some(ds)&&(z=dl(z,i)),g=Je(g,z,!1,!0))}return n.dirs&&(g=Je(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),G=g,un(B),G}const fl=e=>{let t;for(const n in e)(n==="class"||n==="style"||Vt(n))&&((t||(t={}))[n]=e[n]);return t},dl=(e,t)=>{const n={};for(const s in e)(!ds(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function hl(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Gs(s,o,u):!!o;if(c&8){const d=t.dynamicProps;for(let h=0;he.__isSuspense;function di(e,t){t&&t.pendingBranch?D(e)?t.effects.push(...e):t.effects.push(e):ll(e)}function Tn(e,t,n=ce,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Qe();const l=Dt(n),c=xe(t,n,e,o);return l(),Ze(),c});return s?r.unshift(i):r.push(i),i}}const De=e=>(t,n=ce)=>{(!In||e==="sp")&&Tn(e,(...s)=>t(...s),n)},ml=De("bm"),Ct=De("m"),_l=De("bu"),yl=De("u"),hi=De("bum"),An=De("um"),bl=De("sp"),vl=De("rtg"),wl=De("rtc");function El(e,t=ce){Tn("ec",e,t)}function Ie(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;ot(o,l,void 0,i));else{const o=Object.keys(e);r=new Array(o.length);for(let l=0,c=o.length;l!!e.type.__asyncLoader;function qa(e,t,n={},s,r){if(he.isCE||he.parent&&bt(he.parent)&&he.parent.isCE)return t!=="default"&&(n.name=t),ue("slot",n,s&&s());let i=e[t];i&&i._c&&(i._d=!1),$i();const o=i&&gi(i(n)),l=ji(ye,{key:n.key||o&&o.key||`_${t}`},o||(s?s():[]),o&&e._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function gi(e){return e.some(t=>pn(t)?!(t.type===me||t.type===ye&&!gi(t.children)):!0)?e:null}function Ga(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:tn(s)]=e[s];return n}const rs=e=>e?Bi(e)?Ls(e):rs(e.parent):null,Ot=ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rs(e.parent),$root:e=>rs(e.root),$emit:e=>e.emit,$options:e=>As(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Ts(e.update)}),$nextTick:e=>e.n||(e.n=Cn.bind(e.proxy)),$watch:e=>ql.bind(e)}),jn=(e,t)=>e!==te&&!e.__isScriptSetup&&Y(e,t),Cl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const T=o[t];if(T!==void 0)switch(T){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(jn(s,t))return o[t]=1,s[t];if(r!==te&&Y(r,t))return o[t]=2,r[t];if((u=e.propsOptions[0])&&Y(u,t))return o[t]=3,i[t];if(n!==te&&Y(n,t))return o[t]=4,n[t];is&&(o[t]=0)}}const d=Ot[t];let h,b;if(d)return t==="$attrs"&&be(e.attrs,"get",""),d(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==te&&Y(n,t))return o[t]=4,n[t];if(b=c.config.globalProperties,Y(b,t))return b[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return jn(r,t)?(r[t]=n,!0):s!==te&&Y(s,t)?(s[t]=n,!0):Y(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==te&&Y(e,o)||jn(t,o)||(l=i[0])&&Y(l,o)||Y(s,o)||Y(Ot,o)||Y(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Y(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function za(){return Sl().slots}function Sl(){const e=Ln();return e.setupContext||(e.setupContext=ki(e))}function Xs(e){return D(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let is=!0;function xl(e){const t=As(e),n=e.proxy,s=e.ctx;is=!1,t.beforeCreate&&Ys(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:u,created:d,beforeMount:h,mounted:b,beforeUpdate:T,updated:P,activated:M,deactivated:B,beforeDestroy:G,beforeUnmount:z,destroyed:g,unmounted:m,render:I,renderTracked:R,renderTriggered:U,errorCaptured:V,serverPrefetch:L,expose:w,inheritAttrs:N,components:S,directives:W,filters:ne}=t;if(u&&Tl(u,s,null),o)for(const X in o){const $=o[X];k($)&&(s[X]=$.bind(n))}if(r){const X=r.call(n,n);Z(X)&&(e.data=vn(X))}if(is=!0,i)for(const X in i){const $=i[X],Fe=k($)?$.bind(n,n):k($.get)?$.get.bind(n,n):Se,Ut=!k($)&&k($.set)?$.set.bind(n):Se,et=se({get:Fe,set:Ut});Object.defineProperty(s,X,{enumerable:!0,configurable:!0,get:()=>et.value,set:Oe=>et.value=Oe})}if(l)for(const X in l)mi(l[X],s,n,X);if(c){const X=k(c)?c.call(n):c;Reflect.ownKeys(X).forEach($=>{Pl($,X[$])})}d&&Ys(d,e,"c");function H(X,$){D($)?$.forEach(Fe=>X(Fe.bind(n))):$&&X($.bind(n))}if(H(ml,h),H(Ct,b),H(_l,T),H(yl,P),H(Gl,M),H(zl,B),H(El,V),H(wl,R),H(vl,U),H(hi,z),H(An,m),H(bl,L),D(w))if(w.length){const X=e.exposed||(e.exposed={});w.forEach($=>{Object.defineProperty(X,$,{get:()=>n[$],set:Fe=>n[$]=Fe})})}else e.exposed||(e.exposed={});I&&e.render===Se&&(e.render=I),N!=null&&(e.inheritAttrs=N),S&&(e.components=S),W&&(e.directives=W)}function Tl(e,t,n=Se){D(e)&&(e=os(e));for(const s in e){const r=e[s];let i;Z(r)?"default"in r?i=vt(r.from||s,r.default,!0):i=vt(r.from||s):i=vt(r),pe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Ys(e,t,n){xe(D(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function mi(e,t,n,s){const r=s.includes(".")?Li(n,s):()=>n[s];if(re(e)){const i=t[e];k(i)&&Me(r,i)}else if(k(e))Me(r,e.bind(n));else if(Z(e))if(D(e))e.forEach(i=>mi(i,t,n,s));else{const i=k(e.handler)?e.handler.bind(n):t[e.handler];k(i)&&Me(r,i,e)}}function As(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>fn(c,u,o,!0)),fn(c,t,o)),Z(t)&&i.set(t,c),c}function fn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&fn(e,i,n,!0),r&&r.forEach(o=>fn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Al[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Al={data:Js,props:Qs,emits:Qs,methods:Tt,computed:Tt,beforeCreate:ge,created:ge,beforeMount:ge,mounted:ge,beforeUpdate:ge,updated:ge,beforeDestroy:ge,beforeUnmount:ge,destroyed:ge,unmounted:ge,activated:ge,deactivated:ge,errorCaptured:ge,serverPrefetch:ge,components:Tt,directives:Tt,watch:Ol,provide:Js,inject:Rl};function Js(e,t){return t?e?function(){return ie(k(e)?e.call(this,this):e,k(t)?t.call(this,this):t)}:t:e}function Rl(e,t){return Tt(os(e),os(t))}function os(e){if(D(e)){const t={};for(let n=0;n1)return n&&k(t)?t.call(s&&s.proxy):t}}const yi={},bi=()=>Object.create(yi),vi=e=>Object.getPrototypeOf(e)===yi;function Ml(e,t,n,s=!1){const r={},i=bi();e.propsDefaults=Object.create(null),wi(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:zo(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Nl(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=J(r),[c]=e.propsOptions;let u=!1;if((s||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[b,T]=Ei(h,t,!0);ie(o,b),T&&l.push(...T)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return Z(e)&&s.set(e,gt),gt;if(D(i))for(let d=0;d-1,T[1]=M<0||P-1||Y(T,"default"))&&l.push(h)}}}const u=[o,l];return Z(e)&&s.set(e,u),u}function Zs(e){return e[0]!=="$"&&!_t(e)}function er(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function tr(e,t){return er(e)===er(t)}function nr(e,t){return D(t)?t.findIndex(n=>tr(n,e)):k(t)&&tr(t,e)?0:-1}const Ci=e=>e[0]==="_"||e==="$stable",Rs=e=>D(e)?e.map(Ae):[Ae(e)],Fl=(e,t,n)=>{if(t._n)return t;const s=ul((...r)=>Rs(t(...r)),n);return s._c=!1,s},Si=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Ci(r))continue;const i=e[r];if(k(i))t[r]=Fl(r,i,s);else if(i!=null){const o=Rs(i);t[r]=()=>o}}},xi=(e,t)=>{const n=Rs(t);e.slots.default=()=>n},$l=(e,t)=>{const n=e.slots=bi();if(e.vnode.shapeFlag&32){const s=t._;s?(ie(n,t),Hr(n,"_",s,!0)):Si(t,n)}else t&&xi(e,t)},Hl=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=te;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(ie(r,t),!n&&l===1&&delete r._):(i=!t.$stable,Si(t,r)),o=t}else t&&(xi(e,t),o={default:1});if(i)for(const l in r)!Ci(l)&&o[l]==null&&delete r[l]};function dn(e,t,n,s,r=!1){if(D(e)){e.forEach((b,T)=>dn(b,t&&(D(t)?t[T]:t),n,s,r));return}if(bt(s)&&!r)return;const i=s.shapeFlag&4?Ls(s.component):s.el,o=r?null:i,{i:l,r:c}=e,u=t&&t.r,d=l.refs===te?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(re(u)?(d[u]=null,Y(h,u)&&(h[u]=null)):pe(u)&&(u.value=null)),k(c))ze(c,l,12,[o,d]);else{const b=re(c),T=pe(c);if(b||T){const P=()=>{if(e.f){const M=b?Y(h,c)?h[c]:d[c]:c.value;r?D(M)&&hs(M,i):D(M)?M.includes(i)||M.push(i):b?(d[c]=[i],Y(h,c)&&(h[c]=d[c])):(c.value=[i],e.k&&(d[e.k]=c.value))}else b?(d[c]=o,Y(h,c)&&(h[c]=o)):T&&(c.value=o,e.k&&(d[e.k]=o))};o?(P.id=-1,_e(P,n)):P()}}}let sr=!1;const pt=()=>{sr||(console.error("Hydration completed but contains mismatches."),sr=!0)},jl=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Vl=e=>e.namespaceURI.includes("MathML"),zt=e=>{if(jl(e))return"svg";if(Vl(e))return"mathml"},Xt=e=>e.nodeType===8;function Dl(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:u}}=e,d=(g,m)=>{if(!m.hasChildNodes()){n(null,g,m),an(),m._vnode=g;return}h(m.firstChild,g,null,null,null),an(),m._vnode=g},h=(g,m,I,R,U,V=!1)=>{V=V||!!m.dynamicChildren;const L=Xt(g)&&g.data==="[",w=()=>M(g,m,I,R,U,L),{type:N,ref:S,shapeFlag:W,patchFlag:ne}=m;let oe=g.nodeType;m.el=g,ne===-2&&(V=!1,m.dynamicChildren=null);let H=null;switch(N){case wt:oe!==3?m.children===""?(c(m.el=r(""),o(g),g),H=g):H=w():(g.data!==m.children&&(pt(),g.data=m.children),H=i(g));break;case me:z(g)?(H=i(g),G(m.el=g.content.firstChild,g,I)):oe!==8||L?H=w():H=i(g);break;case It:if(L&&(g=i(g),oe=g.nodeType),oe===1||oe===3){H=g;const X=!m.children.length;for(let $=0;${V=V||!!m.dynamicChildren;const{type:L,props:w,patchFlag:N,shapeFlag:S,dirs:W,transition:ne}=m,oe=L==="input"||L==="option";if(oe||N!==-1){W&&Ie(m,null,I,"created");let H=!1;if(z(g)){H=Ti(R,ne)&&I&&I.vnode.props&&I.vnode.props.appear;const $=g.content.firstChild;H&&ne.beforeEnter($),G($,g,I),m.el=g=$}if(S&16&&!(w&&(w.innerHTML||w.textContent))){let $=T(g.firstChild,m,g,I,R,U,V);for(;$;){pt();const Fe=$;$=$.nextSibling,l(Fe)}}else S&8&&g.textContent!==m.children&&(pt(),g.textContent=m.children);if(w)if(oe||!V||N&48)for(const $ in w)(oe&&($.endsWith("value")||$==="indeterminate")||Vt($)&&!_t($)||$[0]===".")&&s(g,$,null,w[$],void 0,void 0,I);else w.onClick&&s(g,"onClick",null,w.onClick,void 0,void 0,I);let X;(X=w&&w.onVnodeBeforeMount)&&Ce(X,I,m),W&&Ie(m,null,I,"beforeMount"),((X=w&&w.onVnodeMounted)||W||H)&&di(()=>{X&&Ce(X,I,m),H&&ne.enter(g),W&&Ie(m,null,I,"mounted")},R)}return g.nextSibling},T=(g,m,I,R,U,V,L)=>{L=L||!!m.dynamicChildren;const w=m.children,N=w.length;for(let S=0;S{const{slotScopeIds:L}=m;L&&(U=U?U.concat(L):L);const w=o(g),N=T(i(g),m,w,I,R,U,V);return N&&Xt(N)&&N.data==="]"?i(m.anchor=N):(pt(),c(m.anchor=u("]"),w,N),N)},M=(g,m,I,R,U,V)=>{if(pt(),m.el=null,V){const N=B(g);for(;;){const S=i(g);if(S&&S!==N)l(S);else break}}const L=i(g),w=o(g);return l(g),n(null,m,w,L,I,R,zt(w),U),L},B=(g,m="[",I="]")=>{let R=0;for(;g;)if(g=i(g),g&&Xt(g)&&(g.data===m&&R++,g.data===I)){if(R===0)return i(g);R--}return g},G=(g,m,I)=>{const R=m.parentNode;R&&R.replaceChild(g,m);let U=I;for(;U;)U.vnode.el===m&&(U.vnode.el=U.subTree.el=g),U=U.parent},z=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[d,h]}const _e=di;function Ul(e){return Bl(e,Dl)}function Bl(e,t){const n=jr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:d,parentNode:h,nextSibling:b,setScopeId:T=Se,insertStaticContent:P}=e,M=(a,f,p,_=null,y=null,C=null,A=void 0,E=null,x=!!f.dynamicChildren)=>{if(a===f)return;a&&!ot(a,f)&&(_=Bt(a),Oe(a,y,C,!0),a=null),f.patchFlag===-2&&(x=!1,f.dynamicChildren=null);const{type:v,ref:O,shapeFlag:j}=f;switch(v){case wt:B(a,f,p,_);break;case me:G(a,f,p,_);break;case It:a==null&&z(f,p,_,A);break;case ye:S(a,f,p,_,y,C,A,E,x);break;default:j&1?I(a,f,p,_,y,C,A,E,x):j&6?W(a,f,p,_,y,C,A,E,x):(j&64||j&128)&&v.process(a,f,p,_,y,C,A,E,x,dt)}O!=null&&y&&dn(O,a&&a.ref,C,f||a,!f)},B=(a,f,p,_)=>{if(a==null)s(f.el=l(f.children),p,_);else{const y=f.el=a.el;f.children!==a.children&&u(y,f.children)}},G=(a,f,p,_)=>{a==null?s(f.el=c(f.children||""),p,_):f.el=a.el},z=(a,f,p,_)=>{[a.el,a.anchor]=P(a.children,f,p,_,a.el,a.anchor)},g=({el:a,anchor:f},p,_)=>{let y;for(;a&&a!==f;)y=b(a),s(a,p,_),a=y;s(f,p,_)},m=({el:a,anchor:f})=>{let p;for(;a&&a!==f;)p=b(a),r(a),a=p;r(f)},I=(a,f,p,_,y,C,A,E,x)=>{f.type==="svg"?A="svg":f.type==="math"&&(A="mathml"),a==null?R(f,p,_,y,C,A,E,x):L(a,f,y,C,A,E,x)},R=(a,f,p,_,y,C,A,E)=>{let x,v;const{props:O,shapeFlag:j,transition:F,dirs:K}=a;if(x=a.el=o(a.type,C,O&&O.is,O),j&8?d(x,a.children):j&16&&V(a.children,x,null,_,y,Vn(a,C),A,E),K&&Ie(a,null,_,"created"),U(x,a,a.scopeId,A,_),O){for(const ee in O)ee!=="value"&&!_t(ee)&&i(x,ee,null,O[ee],C,a.children,_,y,$e);"value"in O&&i(x,"value",null,O.value,C),(v=O.onVnodeBeforeMount)&&Ce(v,_,a)}K&&Ie(a,null,_,"beforeMount");const q=Ti(y,F);q&&F.beforeEnter(x),s(x,f,p),((v=O&&O.onVnodeMounted)||q||K)&&_e(()=>{v&&Ce(v,_,a),q&&F.enter(x),K&&Ie(a,null,_,"mounted")},y)},U=(a,f,p,_,y)=>{if(p&&T(a,p),_)for(let C=0;C<_.length;C++)T(a,_[C]);if(y){let C=y.subTree;if(f===C){const A=y.vnode;U(a,A,A.scopeId,A.slotScopeIds,y.parent)}}},V=(a,f,p,_,y,C,A,E,x=0)=>{for(let v=x;v{const E=f.el=a.el;let{patchFlag:x,dynamicChildren:v,dirs:O}=f;x|=a.patchFlag&16;const j=a.props||te,F=f.props||te;let K;if(p&&tt(p,!1),(K=F.onVnodeBeforeUpdate)&&Ce(K,p,f,a),O&&Ie(f,a,p,"beforeUpdate"),p&&tt(p,!0),v?w(a.dynamicChildren,v,E,p,_,Vn(f,y),C):A||$(a,f,E,null,p,_,Vn(f,y),C,!1),x>0){if(x&16)N(E,f,j,F,p,_,y);else if(x&2&&j.class!==F.class&&i(E,"class",null,F.class,y),x&4&&i(E,"style",j.style,F.style,y),x&8){const q=f.dynamicProps;for(let ee=0;ee{K&&Ce(K,p,f,a),O&&Ie(f,a,p,"updated")},_)},w=(a,f,p,_,y,C,A)=>{for(let E=0;E{if(p!==_){if(p!==te)for(const E in p)!_t(E)&&!(E in _)&&i(a,E,p[E],null,A,f.children,y,C,$e);for(const E in _){if(_t(E))continue;const x=_[E],v=p[E];x!==v&&E!=="value"&&i(a,E,v,x,A,f.children,y,C,$e)}"value"in _&&i(a,"value",p.value,_.value,A)}},S=(a,f,p,_,y,C,A,E,x)=>{const v=f.el=a?a.el:l(""),O=f.anchor=a?a.anchor:l("");let{patchFlag:j,dynamicChildren:F,slotScopeIds:K}=f;K&&(E=E?E.concat(K):K),a==null?(s(v,p,_),s(O,p,_),V(f.children||[],p,O,y,C,A,E,x)):j>0&&j&64&&F&&a.dynamicChildren?(w(a.dynamicChildren,F,p,y,C,A,E),(f.key!=null||y&&f===y.subTree)&&Ai(a,f,!0)):$(a,f,p,O,y,C,A,E,x)},W=(a,f,p,_,y,C,A,E,x)=>{f.slotScopeIds=E,a==null?f.shapeFlag&512?y.ctx.activate(f,p,_,A,x):ne(f,p,_,y,C,A,x):oe(a,f,x)},ne=(a,f,p,_,y,C,A)=>{const E=a.component=oc(a,_,y);if(On(a)&&(E.ctx.renderer=dt),lc(E),E.asyncDep){if(y&&y.registerDep(E,H,A),!a.el){const x=E.subTree=ue(me);G(null,x,f,p)}}else H(E,a,f,p,y,C,A)},oe=(a,f,p)=>{const _=f.component=a.component;if(hl(a,f,p))if(_.asyncDep&&!_.asyncResolved){X(_,f,p);return}else _.next=f,ol(_.update),_.effect.dirty=!0,_.update();else f.el=a.el,_.vnode=f},H=(a,f,p,_,y,C,A)=>{const E=()=>{if(a.isMounted){let{next:O,bu:j,u:F,parent:K,vnode:q}=a;{const ht=Ri(a);if(ht){O&&(O.el=q.el,X(a,O,A)),ht.asyncDep.then(()=>{a.isUnmounted||E()});return}}let ee=O,Q;tt(a,!1),O?(O.el=q.el,X(a,O,A)):O=q,j&&Fn(j),(Q=O.props&&O.props.onVnodeBeforeUpdate)&&Ce(Q,K,O,q),tt(a,!0);const le=Hn(a),Te=a.subTree;a.subTree=le,M(Te,le,h(Te.el),Bt(Te),a,y,C),O.el=le.el,ee===null&&pl(a,le.el),F&&_e(F,y),(Q=O.props&&O.props.onVnodeUpdated)&&_e(()=>Ce(Q,K,O,q),y)}else{let O;const{el:j,props:F}=f,{bm:K,m:q,parent:ee}=a,Q=bt(f);if(tt(a,!1),K&&Fn(K),!Q&&(O=F&&F.onVnodeBeforeMount)&&Ce(O,ee,f),tt(a,!0),j&&Nn){const le=()=>{a.subTree=Hn(a),Nn(j,a.subTree,a,y,null)};Q?f.type.__asyncLoader().then(()=>!a.isUnmounted&&le()):le()}else{const le=a.subTree=Hn(a);M(null,le,p,_,a,y,C),f.el=le.el}if(q&&_e(q,y),!Q&&(O=F&&F.onVnodeMounted)){const le=f;_e(()=>Ce(O,ee,le),y)}(f.shapeFlag&256||ee&&bt(ee.vnode)&&ee.vnode.shapeFlag&256)&&a.a&&_e(a.a,y),a.isMounted=!0,f=p=_=null}},x=a.effect=new _s(E,Se,()=>Ts(v),a.scope),v=a.update=()=>{x.dirty&&x.run()};v.id=a.uid,tt(a,!0),v()},X=(a,f,p)=>{f.component=a;const _=a.vnode.props;a.vnode=f,a.next=null,Nl(a,f.props,_,p),Hl(a,f.children,p),Qe(),qs(a),Ze()},$=(a,f,p,_,y,C,A,E,x=!1)=>{const v=a&&a.children,O=a?a.shapeFlag:0,j=f.children,{patchFlag:F,shapeFlag:K}=f;if(F>0){if(F&128){Ut(v,j,p,_,y,C,A,E,x);return}else if(F&256){Fe(v,j,p,_,y,C,A,E,x);return}}K&8?(O&16&&$e(v,y,C),j!==v&&d(p,j)):O&16?K&16?Ut(v,j,p,_,y,C,A,E,x):$e(v,y,C,!0):(O&8&&d(p,""),K&16&&V(j,p,_,y,C,A,E,x))},Fe=(a,f,p,_,y,C,A,E,x)=>{a=a||gt,f=f||gt;const v=a.length,O=f.length,j=Math.min(v,O);let F;for(F=0;FO?$e(a,y,C,!0,!1,j):V(f,p,_,y,C,A,E,x,j)},Ut=(a,f,p,_,y,C,A,E,x)=>{let v=0;const O=f.length;let j=a.length-1,F=O-1;for(;v<=j&&v<=F;){const K=a[v],q=f[v]=x?qe(f[v]):Ae(f[v]);if(ot(K,q))M(K,q,p,null,y,C,A,E,x);else break;v++}for(;v<=j&&v<=F;){const K=a[j],q=f[F]=x?qe(f[F]):Ae(f[F]);if(ot(K,q))M(K,q,p,null,y,C,A,E,x);else break;j--,F--}if(v>j){if(v<=F){const K=F+1,q=KF)for(;v<=j;)Oe(a[v],y,C,!0),v++;else{const K=v,q=v,ee=new Map;for(v=q;v<=F;v++){const ve=f[v]=x?qe(f[v]):Ae(f[v]);ve.key!=null&&ee.set(ve.key,v)}let Q,le=0;const Te=F-q+1;let ht=!1,Fs=0;const St=new Array(Te);for(v=0;v=Te){Oe(ve,y,C,!0);continue}let Le;if(ve.key!=null)Le=ee.get(ve.key);else for(Q=q;Q<=F;Q++)if(St[Q-q]===0&&ot(ve,f[Q])){Le=Q;break}Le===void 0?Oe(ve,y,C,!0):(St[Le-q]=v+1,Le>=Fs?Fs=Le:ht=!0,M(ve,f[Le],p,null,y,C,A,E,x),le++)}const $s=ht?Kl(St):gt;for(Q=$s.length-1,v=Te-1;v>=0;v--){const ve=q+v,Le=f[ve],Hs=ve+1{const{el:C,type:A,transition:E,children:x,shapeFlag:v}=a;if(v&6){et(a.component.subTree,f,p,_);return}if(v&128){a.suspense.move(f,p,_);return}if(v&64){A.move(a,f,p,dt);return}if(A===ye){s(C,f,p);for(let j=0;jE.enter(C),y);else{const{leave:j,delayLeave:F,afterLeave:K}=E,q=()=>s(C,f,p),ee=()=>{j(C,()=>{q(),K&&K()})};F?F(C,q,ee):ee()}else s(C,f,p)},Oe=(a,f,p,_=!1,y=!1)=>{const{type:C,props:A,ref:E,children:x,dynamicChildren:v,shapeFlag:O,patchFlag:j,dirs:F,memoIndex:K}=a;if(E!=null&&dn(E,null,p,a,!0),K!=null&&(f.renderCache[K]=void 0),O&256){f.ctx.deactivate(a);return}const q=O&1&&F,ee=!bt(a);let Q;if(ee&&(Q=A&&A.onVnodeBeforeUnmount)&&Ce(Q,f,a),O&6)uo(a.component,p,_);else{if(O&128){a.suspense.unmount(p,_);return}q&&Ie(a,null,f,"beforeUnmount"),O&64?a.type.remove(a,f,p,y,dt,_):v&&(C!==ye||j>0&&j&64)?$e(v,f,p,!1,!0):(C===ye&&j&384||!y&&O&16)&&$e(x,f,p),_&&Ms(a)}(ee&&(Q=A&&A.onVnodeUnmounted)||q)&&_e(()=>{Q&&Ce(Q,f,a),q&&Ie(a,null,f,"unmounted")},p)},Ms=a=>{const{type:f,el:p,anchor:_,transition:y}=a;if(f===ye){ao(p,_);return}if(f===It){m(a);return}const C=()=>{r(p),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(a.shapeFlag&1&&y&&!y.persisted){const{leave:A,delayLeave:E}=y,x=()=>A(p,C);E?E(a.el,C,x):x()}else C()},ao=(a,f)=>{let p;for(;a!==f;)p=b(a),r(a),a=p;r(f)},uo=(a,f,p)=>{const{bum:_,scope:y,update:C,subTree:A,um:E,m:x,a:v}=a;rr(x),rr(v),_&&Fn(_),y.stop(),C&&(C.active=!1,Oe(A,a,f,p)),E&&_e(E,f),_e(()=>{a.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&a.asyncDep&&!a.asyncResolved&&a.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve())},$e=(a,f,p,_=!1,y=!1,C=0)=>{for(let A=C;Aa.shapeFlag&6?Bt(a.component.subTree):a.shapeFlag&128?a.suspense.next():b(a.anchor||a.el);let Pn=!1;const Ns=(a,f,p)=>{a==null?f._vnode&&Oe(f._vnode,null,null,!0):M(f._vnode||null,a,f,null,null,null,p),Pn||(Pn=!0,qs(),an(),Pn=!1),f._vnode=a},dt={p:M,um:Oe,m:et,r:Ms,mt:ne,mc:V,pc:$,pbc:w,n:Bt,o:e};let Mn,Nn;return t&&([Mn,Nn]=t(dt)),{render:Ns,hydrate:Mn,createApp:Il(Ns,Mn)}}function Vn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function tt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ti(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ai(e,t,n=!1){const s=e.children,r=t.children;if(D(s)&&D(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Ri(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ri(t)}function rr(e){if(e)for(let t=0;tvt(kl);function Oi(e,t){return Rn(e,null,t)}function Xa(e,t){return Rn(e,null,{flush:"post"})}const Yt={};function Me(e,t,n){return Rn(e,t,n)}function Rn(e,t,{immediate:n,deep:s,flush:r,once:i,onTrack:o,onTrigger:l}=te){if(t&&i){const R=t;t=(...U)=>{R(...U),I()}}const c=ce,u=R=>s===!0?R:it(R,s===!1?1:void 0);let d,h=!1,b=!1;if(pe(e)?(d=()=>e.value,h=cn(e)):At(e)?(d=()=>u(e),h=!0):D(e)?(b=!0,h=e.some(R=>At(R)||cn(R)),d=()=>e.map(R=>{if(pe(R))return R.value;if(At(R))return u(R);if(k(R))return ze(R,c,2)})):k(e)?t?d=()=>ze(e,c,2):d=()=>(T&&T(),xe(e,c,3,[P])):d=Se,t&&s){const R=d;d=()=>it(R())}let T,P=R=>{T=g.onStop=()=>{ze(R,c,4),T=g.onStop=void 0}},M;if(In)if(P=Se,t?n&&xe(t,c,3,[d(),b?[]:void 0,P]):d(),r==="sync"){const R=Wl();M=R.__watcherHandles||(R.__watcherHandles=[])}else return Se;let B=b?new Array(e.length).fill(Yt):Yt;const G=()=>{if(!(!g.active||!g.dirty))if(t){const R=g.run();(s||h||(b?R.some((U,V)=>Ye(U,B[V])):Ye(R,B)))&&(T&&T(),xe(t,c,3,[R,B===Yt?void 0:b&&B[0]===Yt?[]:B,P]),B=R)}else g.run()};G.allowRecurse=!!t;let z;r==="sync"?z=G:r==="post"?z=()=>_e(G,c&&c.suspense):(G.pre=!0,c&&(G.id=c.uid),z=()=>Ts(G));const g=new _s(d,Se,z),m=Ur(),I=()=>{g.stop(),m&&hs(m.effects,g)};return t?n?G():B=g.run():r==="post"?_e(g.run.bind(g),c&&c.suspense):g.run(),M&&M.push(I),I}function ql(e,t,n){const s=this.proxy,r=re(e)?e.includes(".")?Li(s,e):()=>s[e]:e.bind(s,s);let i;k(t)?i=t:(i=t.handler,n=t);const o=Dt(this),l=Rn(r,i.bind(s),n);return o(),l}function Li(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r{it(s,t,n)});else if($r(e)){for(const s in e)it(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&it(e[s],t,n)}return e}const On=e=>e.type.__isKeepAlive;function Gl(e,t){Ii(e,"a",t)}function zl(e,t){Ii(e,"da",t)}function Ii(e,t,n=ce){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Tn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)On(r.parent.vnode)&&Xl(s,t,n,r),r=r.parent}}function Xl(e,t,n,s){const r=Tn(t,e,s,!0);An(()=>{hs(s[t],r)},n)}const We=Symbol("_leaveCb"),Jt=Symbol("_enterCb");function Yl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ct(()=>{e.isMounted=!0}),hi(()=>{e.isUnmounting=!0}),e}const Ee=[Function,Array],Pi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ee,onEnter:Ee,onAfterEnter:Ee,onEnterCancelled:Ee,onBeforeLeave:Ee,onLeave:Ee,onAfterLeave:Ee,onLeaveCancelled:Ee,onBeforeAppear:Ee,onAppear:Ee,onAfterAppear:Ee,onAppearCancelled:Ee},Mi=e=>{const t=e.subTree;return t.component?Mi(t.component):t},Jl={name:"BaseTransition",props:Pi,setup(e,{slots:t}){const n=Ln(),s=Yl();return()=>{const r=t.default&&Fi(t.default(),!0);if(!r||!r.length)return;let i=r[0];if(r.length>1){for(const b of r)if(b.type!==me){i=b;break}}const o=J(e),{mode:l}=o;if(s.isLeaving)return Dn(i);const c=ir(i);if(!c)return Dn(i);let u=cs(c,o,s,n,b=>u=b);hn(c,u);const d=n.subTree,h=d&&ir(d);if(h&&h.type!==me&&!ot(c,h)&&Mi(n).type!==me){const b=cs(h,o,s,n);if(hn(h,b),l==="out-in"&&c.type!==me)return s.isLeaving=!0,b.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Dn(i);l==="in-out"&&c.type!==me&&(b.delayLeave=(T,P,M)=>{const B=Ni(s,h);B[String(h.key)]=h,T[We]=()=>{P(),T[We]=void 0,delete u.delayedLeave},u.delayedLeave=M})}return i}}},Ql=Jl;function Ni(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function cs(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:d,onEnterCancelled:h,onBeforeLeave:b,onLeave:T,onAfterLeave:P,onLeaveCancelled:M,onBeforeAppear:B,onAppear:G,onAfterAppear:z,onAppearCancelled:g}=t,m=String(e.key),I=Ni(n,e),R=(L,w)=>{L&&xe(L,s,9,w)},U=(L,w)=>{const N=w[1];R(L,w),D(L)?L.every(S=>S.length<=1)&&N():L.length<=1&&N()},V={mode:o,persisted:l,beforeEnter(L){let w=c;if(!n.isMounted)if(i)w=B||c;else return;L[We]&&L[We](!0);const N=I[m];N&&ot(e,N)&&N.el[We]&&N.el[We](),R(w,[L])},enter(L){let w=u,N=d,S=h;if(!n.isMounted)if(i)w=G||u,N=z||d,S=g||h;else return;let W=!1;const ne=L[Jt]=oe=>{W||(W=!0,oe?R(S,[L]):R(N,[L]),V.delayedLeave&&V.delayedLeave(),L[Jt]=void 0)};w?U(w,[L,ne]):ne()},leave(L,w){const N=String(e.key);if(L[Jt]&&L[Jt](!0),n.isUnmounting)return w();R(b,[L]);let S=!1;const W=L[We]=ne=>{S||(S=!0,w(),ne?R(M,[L]):R(P,[L]),L[We]=void 0,I[N]===e&&delete I[N])};I[N]=e,T?U(T,[L,W]):W()},clone(L){const w=cs(L,t,n,s,r);return r&&r(w),w}};return V}function Dn(e){if(On(e))return e=Je(e),e.children=null,e}function ir(e){if(!On(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&k(n.default))return n.default()}}function hn(e,t){e.shapeFlag&6&&e.component?hn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Fi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;ie.__isTeleport,ye=Symbol.for("v-fgt"),wt=Symbol.for("v-txt"),me=Symbol.for("v-cmt"),It=Symbol.for("v-stc"),Pt=[];let Re=null;function $i(e=!1){Pt.push(Re=e?null:[])}function ec(){Pt.pop(),Re=Pt[Pt.length-1]||null}let Ht=1;function or(e){Ht+=e}function Hi(e){return e.dynamicChildren=Ht>0?Re||gt:null,ec(),Ht>0&&Re&&Re.push(e),e}function Ya(e,t,n,s,r,i){return Hi(Di(e,t,n,s,r,i,!0))}function ji(e,t,n,s,r){return Hi(ue(e,t,n,s,r,!0))}function pn(e){return e?e.__v_isVNode===!0:!1}function ot(e,t){return e.type===t.type&&e.key===t.key}const Vi=({key:e})=>e??null,sn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?re(e)||pe(e)||k(e)?{i:he,r:e,k:t,f:!!n}:e:null);function Di(e,t=null,n=null,s=0,r=null,i=e===ye?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vi(t),ref:t&&sn(t),scopeId:xn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:he};return l?(Os(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=re(n)?8:16),Ht>0&&!o&&Re&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Re.push(c),c}const ue=tc;function tc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===ui)&&(e=me),pn(e)){const l=Je(e,t,!0);return n&&Os(l,n),Ht>0&&!i&&Re&&(l.shapeFlag&6?Re[Re.indexOf(e)]=l:Re.push(l)),l.patchFlag=-2,l}if(fc(e)&&(e=e.__vccOpts),t){t=nc(t);let{class:l,style:c}=t;l&&!re(l)&&(t.class=ms(l)),Z(c)&&(Zr(c)&&!D(c)&&(c=ie({},c)),t.style=gs(c))}const o=re(e)?1:gl(e)?128:Zl(e)?64:Z(e)?4:k(e)?2:0;return Di(e,t,n,s,r,o,i,!0)}function nc(e){return e?Zr(e)||vi(e)?ie({},e):e:null}function Je(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,u=t?sc(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Vi(u),ref:t&&t.ref?n&&i?D(i)?i.concat(sn(t)):[i,sn(t)]:sn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ye?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Je(e.ssContent),ssFallback:e.ssFallback&&Je(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&hn(d,c.clone(d)),d}function Ui(e=" ",t=0){return ue(wt,null,e,t)}function Ja(e,t){const n=ue(It,null,e);return n.staticCount=t,n}function Qa(e="",t=!1){return t?($i(),ji(me,null,e)):ue(me,null,e)}function Ae(e){return e==null||typeof e=="boolean"?ue(me):D(e)?ue(ye,null,e.slice()):typeof e=="object"?qe(e):ue(wt,null,String(e))}function qe(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Je(e)}function Os(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(D(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Os(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!vi(t)?t._ctx=he:r===3&&he&&(he.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else k(t)?(t={default:t,_ctx:he},n=32):(t=String(t),s&64?(n=16,t=[Ui(t)]):n=8);e.children=t,e.shapeFlag|=n}function sc(...e){const t={};for(let n=0;nce||he;let gn,as;{const e=jr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};gn=t("__VUE_INSTANCE_SETTERS__",n=>ce=n),as=t("__VUE_SSR_SETTERS__",n=>In=n)}const Dt=e=>{const t=ce;return gn(e),e.scope.on(),()=>{e.scope.off(),gn(t)}},lr=()=>{ce&&ce.scope.off(),gn(null)};function Bi(e){return e.vnode.shapeFlag&4}let In=!1;function lc(e,t=!1){t&&as(t);const{props:n,children:s}=e.vnode,r=Bi(e);Ml(e,n,r,t),$l(e,s);const i=r?cc(e,t):void 0;return t&&as(!1),i}function cc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cl);const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?ki(e):null,i=Dt(e);Qe();const o=ze(s,e,0,[e.props,r]);if(Ze(),i(),Nr(o)){if(o.then(lr,lr),t)return o.then(l=>{cr(e,l,t)}).catch(l=>{En(l,e,0)});e.asyncDep=o}else cr(e,o,t)}else Ki(e,t)}function cr(e,t,n){k(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=ri(t)),Ki(e,n)}let ar;function Ki(e,t,n){const s=e.type;if(!e.render){if(!t&&ar&&!s.render){const r=s.template||As(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,u=ie(ie({isCustomElement:i,delimiters:l},o),c);s.render=ar(r,u)}}e.render=s.render||Se}{const r=Dt(e);Qe();try{xl(e)}finally{Ze(),r()}}}const ac={get(e,t){return be(e,"get",""),e[t]}};function ki(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ac),slots:e.slots,emit:e.emit,expose:t}}function Ls(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ri(nn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ot)return Ot[n](e)},has(t,n){return n in t||n in Ot}})):e.proxy}function uc(e,t=!0){return k(e)?e.displayName||e.name:e.name||t&&e.__name}function fc(e){return k(e)&&"__vccOpts"in e}const se=(e,t)=>Xo(e,t,In);function us(e,t,n){const s=arguments.length;return s===2?Z(t)&&!D(t)?pn(t)?ue(e,null,[t]):ue(e,t):ue(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&pn(n)&&(n=[n]),ue(e,t,n))}const dc="3.4.29";/** +* @vue/runtime-dom v3.4.29 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const hc="http://www.w3.org/2000/svg",pc="http://www.w3.org/1998/Math/MathML",He=typeof document<"u"?document:null,ur=He&&He.createElement("template"),gc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?He.createElementNS(hc,e):t==="mathml"?He.createElementNS(pc,e):n?He.createElement(e,{is:n}):He.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>He.createTextNode(e),createComment:e=>He.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>He.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{ur.innerHTML=s==="svg"?`${e}`:s==="mathml"?`${e}`:e;const l=ur.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Be="transition",xt="animation",jt=Symbol("_vtc"),Wi=(e,{slots:t})=>us(Ql,mc(e),t);Wi.displayName="Transition";const qi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Wi.props=ie({},Pi,qi);const nt=(e,t=[])=>{D(e)?e.forEach(n=>n(...t)):e&&e(...t)},fr=e=>e?D(e)?e.some(t=>t.length>1):e.length>1:!1;function mc(e){const t={};for(const S in e)S in qi||(t[S]=e[S]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:b=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,P=_c(r),M=P&&P[0],B=P&&P[1],{onBeforeEnter:G,onEnter:z,onEnterCancelled:g,onLeave:m,onLeaveCancelled:I,onBeforeAppear:R=G,onAppear:U=z,onAppearCancelled:V=g}=t,L=(S,W,ne)=>{st(S,W?d:l),st(S,W?u:o),ne&&ne()},w=(S,W)=>{S._isLeaving=!1,st(S,h),st(S,T),st(S,b),W&&W()},N=S=>(W,ne)=>{const oe=S?U:z,H=()=>L(W,S,ne);nt(oe,[W,H]),dr(()=>{st(W,S?c:i),Ke(W,S?d:l),fr(oe)||hr(W,s,M,H)})};return ie(t,{onBeforeEnter(S){nt(G,[S]),Ke(S,i),Ke(S,o)},onBeforeAppear(S){nt(R,[S]),Ke(S,c),Ke(S,u)},onEnter:N(!1),onAppear:N(!0),onLeave(S,W){S._isLeaving=!0;const ne=()=>w(S,W);Ke(S,h),Ke(S,b),vc(),dr(()=>{S._isLeaving&&(st(S,h),Ke(S,T),fr(m)||hr(S,s,B,ne))}),nt(m,[S,ne])},onEnterCancelled(S){L(S,!1),nt(g,[S])},onAppearCancelled(S){L(S,!0),nt(V,[S])},onLeaveCancelled(S){w(S),nt(I,[S])}})}function _c(e){if(e==null)return null;if(Z(e))return[Un(e.enter),Un(e.leave)];{const t=Un(e);return[t,t]}}function Un(e){return yo(e)}function Ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[jt]||(e[jt]=new Set)).add(t)}function st(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[jt];n&&(n.delete(t),n.size||(e[jt]=void 0))}function dr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let yc=0;function hr(e,t,n,s){const r=e._endId=++yc,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=bc(e,t);if(!o)return s();const u=o+"end";let d=0;const h=()=>{e.removeEventListener(u,b),i()},b=T=>{T.target===e&&++d>=c&&h()};setTimeout(()=>{d(n[P]||"").split(", "),r=s(`${Be}Delay`),i=s(`${Be}Duration`),o=pr(r,i),l=s(`${xt}Delay`),c=s(`${xt}Duration`),u=pr(l,c);let d=null,h=0,b=0;t===Be?o>0&&(d=Be,h=o,b=i.length):t===xt?u>0&&(d=xt,h=u,b=c.length):(h=Math.max(o,u),d=h>0?o>u?Be:xt:null,b=d?d===Be?i.length:c.length:0);const T=d===Be&&/\b(transform|all)(,|$)/.test(s(`${Be}Property`).toString());return{type:d,timeout:h,propCount:b,hasTransform:T}}function pr(e,t){for(;e.lengthgr(n)+gr(e[s])))}function gr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vc(){return document.body.offsetHeight}function wc(e,t,n){const s=e[jt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const mr=Symbol("_vod"),Ec=Symbol("_vsh"),Cc=Symbol(""),Sc=/(^|;)\s*display\s*:/;function xc(e,t,n){const s=e.style,r=re(n);let i=!1;if(n&&!r){if(t)if(re(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&rn(s,l,"")}else for(const o in t)n[o]==null&&rn(s,o,"");for(const o in n)o==="display"&&(i=!0),rn(s,o,n[o])}else if(r){if(t!==n){const o=s[Cc];o&&(n+=";"+o),s.cssText=n,i=Sc.test(n)}}else t&&e.removeAttribute("style");mr in e&&(e[mr]=i?s.display:"",e[Ec]&&(s.display="none"))}const _r=/\s*!important$/;function rn(e,t,n){if(D(n))n.forEach(s=>rn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Tc(e,t);_r.test(n)?e.setProperty(ft(s),n.replace(_r,""),"important"):e[s]=n}}const yr=["Webkit","Moz","ms"],Bn={};function Tc(e,t){const n=Bn[t];if(n)return n;let s=Ne(t);if(s!=="filter"&&s in e)return Bn[t]=s;s=yn(s);for(let r=0;rKn||(Pc.then(()=>Kn=0),Kn=Date.now());function Nc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;xe(Fc(s,n.value),t,5,[s])};return n.value=e,n.attached=Mc(),n}function Fc(e,t){if(D(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Cr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,$c=(e,t,n,s,r,i,o,l,c)=>{const u=r==="svg";t==="class"?wc(e,s,u):t==="style"?xc(e,n,s):Vt(t)?ds(t)||Lc(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hc(e,t,s,u))?(Ac(e,t,s,i,o,l,c),(t==="value"||t==="checked"||t==="selected")&&vr(e,t,s,u,o,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),vr(e,t,s,u))};function Hc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Cr(t)&&k(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Cr(t)&&re(n)?!1:t in e}const jc=["ctrl","shift","alt","meta"],Vc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>jc.some(n=>e[`${n}Key`]&&!t.includes(n))},Za=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=ft(r.key);if(t.some(o=>o===i||Dc[o]===i))return e(r)})},Uc=ie({patchProp:$c},gc);let kn,Sr=!1;function Bc(){return kn=Sr?kn:Ul(Uc),Sr=!0,kn}const tu=(...e)=>{const t=Bc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=kc(s);if(r)return n(r,!0,Kc(r))},t};function Kc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function kc(e){return re(e)?document.querySelector(e):e}const nu=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Wc="modulepreload",qc=function(e){return"/js-lib/"+e},xr={},su=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.all(n.map(l=>{if(l=qc(l),l in xr)return;xr[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Wc,c||(d.as="script",d.crossOrigin=""),d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),c)return new Promise((h,b)=>{d.addEventListener("load",h),d.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${l}`)))})}))}return r.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},Gc=window.__VP_SITE_DATA__;function Is(e){return Ur()?(Ao(e),!0):!1}function Xe(e){return typeof e=="function"?e():si(e)}const Gi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zc=Object.prototype.toString,Xc=e=>zc.call(e)==="[object Object]",zi=()=>{},Tr=Yc();function Yc(){var e,t;return Gi&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Jc(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Xi=e=>e();function Qc(e=Xi){const t=ae(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:wn(t),pause:n,resume:s,eventFilter:r}}function Zc(e){return Ln()}function Yi(...e){if(e.length!==1)return nl(...e);const t=e[0];return typeof t=="function"?wn(Zo(()=>({get:t,set:zi}))):ae(t)}function ea(e,t,n={}){const{eventFilter:s=Xi,...r}=n;return Me(e,Jc(s,t),r)}function ta(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Qc(s);return{stop:ea(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function Ps(e,t=!0,n){Zc()?Ct(e,n):t?e():Cn(e)}function Ji(e){var t;const n=Xe(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Ve=Gi?window:void 0;function Et(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=Ve):[t,n,s,r]=e,!t)return zi;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,h,b,T)=>(d.addEventListener(h,b,T),()=>d.removeEventListener(h,b,T)),c=Me(()=>[Ji(t),Xe(r)],([d,h])=>{if(o(),!d)return;const b=Xc(h)?{...h}:h;i.push(...n.flatMap(T=>s.map(P=>l(d,T,P,b))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return Is(u),u}function na(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ru(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=Ve,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=na(t);return Et(r,i,d=>{d.repeat&&Xe(l)||c(d)&&n(d)},o)}function sa(){const e=ae(!1),t=Ln();return t&&Ct(()=>{e.value=!0},t),e}function ra(e){const t=sa();return se(()=>(t.value,!!e()))}function Qi(e,t={}){const{window:n=Ve}=t,s=ra(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=ae(!1),o=u=>{i.value=u.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=Oi(()=>{s.value&&(l(),r=n.matchMedia(Xe(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return Is(()=>{c(),l(),r=void 0}),i}const Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zt="__vueuse_ssr_handlers__",ia=oa();function oa(){return Zt in Qt||(Qt[Zt]=Qt[Zt]||{}),Qt[Zt]}function Zi(e,t){return ia[e]||t}function la(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const ca={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ar="vueuse-storage";function aa(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:h=Ve,eventFilter:b,onError:T=w=>{console.error(w)},initOnMounted:P}=s,M=(d?ti:ae)(typeof t=="function"?t():t);if(!n)try{n=Zi("getDefaultStorage",()=>{var w;return(w=Ve)==null?void 0:w.localStorage})()}catch(w){T(w)}if(!n)return M;const B=Xe(t),G=la(B),z=(r=s.serializer)!=null?r:ca[G],{pause:g,resume:m}=ta(M,()=>R(M.value),{flush:i,deep:o,eventFilter:b});h&&l&&Ps(()=>{Et(h,"storage",V),Et(h,Ar,L),P&&V()}),P||V();function I(w,N){h&&h.dispatchEvent(new CustomEvent(Ar,{detail:{key:e,oldValue:w,newValue:N,storageArea:n}}))}function R(w){try{const N=n.getItem(e);if(w==null)I(N,null),n.removeItem(e);else{const S=z.write(w);N!==S&&(n.setItem(e,S),I(N,S))}}catch(N){T(N)}}function U(w){const N=w?w.newValue:n.getItem(e);if(N==null)return c&&B!=null&&n.setItem(e,z.write(B)),B;if(!w&&u){const S=z.read(N);return typeof u=="function"?u(S,B):G==="object"&&!Array.isArray(S)?{...B,...S}:S}else return typeof N!="string"?N:z.read(N)}function V(w){if(!(w&&w.storageArea!==n)){if(w&&w.key==null){M.value=B;return}if(!(w&&w.key!==e)){g();try{(w==null?void 0:w.newValue)!==z.write(M.value)&&(M.value=U(w))}catch(N){T(N)}finally{w?Cn(m):m()}}}}function L(w){V(w.detail)}return M}function eo(e){return Qi("(prefers-color-scheme: dark)",e)}function ua(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=Ve,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},b=eo({window:r}),T=se(()=>b.value?"dark":"light"),P=c||(o==null?Yi(s):aa(o,s,i,{window:r,listenToStorageChanges:l})),M=se(()=>P.value==="auto"?T.value:P.value),B=Zi("updateHTMLAttrs",(m,I,R)=>{const U=typeof m=="string"?r==null?void 0:r.document.querySelector(m):Ji(m);if(!U)return;let V;if(d&&(V=r.document.createElement("style"),V.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),r.document.head.appendChild(V)),I==="class"){const L=R.split(/\s/g);Object.values(h).flatMap(w=>(w||"").split(/\s/g)).filter(Boolean).forEach(w=>{L.includes(w)?U.classList.add(w):U.classList.remove(w)})}else U.setAttribute(I,R);d&&(r.getComputedStyle(V).opacity,document.head.removeChild(V))});function G(m){var I;B(t,n,(I=h[m])!=null?I:m)}function z(m){e.onChanged?e.onChanged(m,G):G(m)}Me(M,z,{flush:"post",immediate:!0}),Ps(()=>z(M.value));const g=se({get(){return u?P.value:M.value},set(m){P.value=m}});try{return Object.assign(g,{store:P,system:T,state:M})}catch{return g}}function fa(e={}){const{valueDark:t="dark",valueLight:n="",window:s=Ve}=e,r=ua({...e,onChanged:(l,c)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=se(()=>r.system?r.system.value:eo({window:s}).value?"dark":"light");return se({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function Wn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function to(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const qn=new WeakMap;function iu(e,t=!1){const n=ae(t);let s=null,r="";Me(Yi(e),l=>{const c=Wn(Xe(l));if(c){const u=c;if(qn.get(u)||qn.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(r=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=Wn(Xe(e));!l||n.value||(Tr&&(s=Et(l,"touchmove",c=>{da(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=Wn(Xe(e));!l||!n.value||(Tr&&(s==null||s()),l.style.overflow=r,qn.delete(l),n.value=!1)};return Is(o),se({get(){return n.value},set(l){l?i():o()}})}function ou(e={}){const{window:t=Ve,behavior:n="auto"}=e;if(!t)return{x:ae(0),y:ae(0)};const s=ae(t.scrollX),r=ae(t.scrollY),i=se({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=se({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return Et(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function lu(e={}){const{window:t=Ve,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0}=e,o=ae(n),l=ae(s),c=()=>{t&&(i?(o.value=t.innerWidth,l.value=t.innerHeight):(o.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(c(),Ps(c),Et("resize",c,{passive:!0}),r){const u=Qi("(orientation: portrait)");Me(u,()=>c())}return{width:o,height:l}}var Gn={BASE_URL:"/js-lib/",MODE:"production",DEV:!1,PROD:!0,SSR:!1},zn={};const no=/^(?:[a-z]+:|\/\/)/i,ha="vitepress-theme-appearance",pa=/#.*$/,ga=/[?#].*$/,ma=/(?:(^|\/)index)?\.(?:md|html)$/,fe=typeof document<"u",so={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function _a(e,t,n=!1){if(t===void 0)return!1;if(e=Rr(`/${e}`),n)return new RegExp(t).test(e);if(Rr(t)!==e)return!1;const s=t.match(pa);return s?(fe?location.hash:"")===s[0]:!0}function Rr(e){return decodeURI(e).replace(ga,"").replace(ma,"$1")}function ya(e){return no.test(e)}function ba(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!ya(n)&&_a(t,`/${n}/`,!0))||"root"}function va(e,t){var s,r,i,o,l,c,u;const n=ba(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:io(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(u=e.locales[n])==null?void 0:u.themeConfig}})}function ro(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=wa(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function wa(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Ea(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function io(e,t){return[...e.filter(n=>!Ea(t,n)),...t]}const Ca=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,Sa=/^[a-z]:/i;function Or(e){const t=Sa.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Ca,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const Xn=new Set;function xa(e){if(Xn.size===0){const n=typeof process=="object"&&(zn==null?void 0:zn.VITE_EXTRA_EXTENSIONS)||(Gn==null?void 0:Gn.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>Xn.add(s))}const t=e.split(".").pop();return t==null||!Xn.has(t.toLowerCase())}const Ta=Symbol(),at=ti(Gc);function cu(e){const t=se(()=>va(at.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?ae(!0):n?fa({storageKey:ha,initialValue:()=>typeof n=="string"?n:"auto",...typeof n=="object"?n:{}}):ae(!1),r=ae(fe?location.hash:"");return fe&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Me(()=>e.data,()=>{r.value=fe?location.hash:""}),{site:t,theme:se(()=>t.value.themeConfig),page:se(()=>e.data),frontmatter:se(()=>e.data.frontmatter),params:se(()=>e.data.params),lang:se(()=>t.value.lang),dir:se(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:se(()=>t.value.localeIndex||"root"),title:se(()=>ro(t.value,e.data)),description:se(()=>e.data.description||t.value.description),isDark:s,hash:se(()=>r.value)}}function Aa(){const e=vt(Ta);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Ra(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Lr(e){return no.test(e)||!e.startsWith("/")?e:Ra(at.value.base,e)}function Oa(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),fe){const n="/js-lib/";t=Or(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${Or(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let on=[];function au(e){on.push(e),An(()=>{on=on.filter(t=>t!==e)})}function La(){let e=at.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Ir(e,n);else if(Array.isArray(e))for(const s of e){const r=Ir(s,n);if(r){t=r;break}}return t}function Ir(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Ia=Symbol(),oo="http://a.com",Pa=()=>({path:"/",component:null,data:so});function uu(e,t){const n=vn(Pa()),s={route:n,go:r};async function r(l=fe?location.href:"/"){var c,u;l=Yn(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(fe&&l!==Yn(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((u=s.onAfterRouteChanged)==null?void 0:u.call(s,l)))}let i=null;async function o(l,c=0,u=!1){var b;if(await((b=s.onBeforePageLoad)==null?void 0:b.call(s,l))===!1)return;const d=new URL(l,oo),h=i=d.pathname;try{let T=await e(h);if(!T)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:P,__pageData:M}=T;if(!P)throw new Error(`Invalid route component: ${P}`);n.path=fe?h:Lr(h),n.component=nn(P),n.data=nn(M),fe&&Cn(()=>{let B=at.value.base+M.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!at.value.cleanUrls&&!B.endsWith("/")&&(B+=".html"),B!==d.pathname&&(d.pathname=B,l=B+d.search+d.hash,history.replaceState({},"",l)),d.hash&&!c){let G=null;try{G=document.getElementById(decodeURIComponent(d.hash).slice(1))}catch(z){console.warn(z)}if(G){Pr(G,d.hash);return}}window.scrollTo(0,c)})}}catch(T){if(!/fetch|Page not found/.test(T.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(T),!u)try{const P=await fetch(at.value.base+"hashmap.json");window.__VP_HASH_MAP__=await P.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=fe?h:Lr(h),n.component=t?nn(t):null;const P=fe?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...so,relativePath:P}}}}return fe&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.target.closest("button"))return;const u=l.target.closest("a");if(u&&!u.closest(".vp-raw")&&(u instanceof SVGElement||!u.download)){const{target:d}=u,{href:h,origin:b,pathname:T,hash:P,search:M}=new URL(u.href instanceof SVGAnimatedString?u.href.animVal:u.href,u.baseURI),B=new URL(location.href);!l.ctrlKey&&!l.shiftKey&&!l.altKey&&!l.metaKey&&!d&&b===B.origin&&xa(T)&&(l.preventDefault(),T===B.pathname&&M===B.search?(P!==B.hash&&(history.pushState({},"",h),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:B.href,newURL:h}))),P?Pr(u,P,u.classList.contains("header-anchor")):window.scrollTo(0,0)):r(h))}},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(Yn(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function Ma(){const e=vt(Ia);if(!e)throw new Error("useRouter() is called without provider.");return e}function lo(){return Ma().route}function Pr(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-La()+i;requestAnimationFrame(r)}}function Yn(e){const t=new URL(e,oo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),at.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const Jn=()=>on.forEach(e=>e()),fu=pi({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=lo(),{site:n}=Aa();return()=>us(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?us(t.component,{onVnodeMounted:Jn,onVnodeUpdated:Jn,onVnodeUnmounted:Jn}):"404 Page Not Found"])}}),du=pi({setup(e,{slots:t}){const n=ae(!1);return Ct(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function hu(){fe&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(u=>u.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function pu(){if(fe){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(d=>d.remove());let u=c.textContent||"";o&&(u=u.replace(/^ *(\$|>) /gm,"").trim()),Na(u).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const d=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,d)})}})}}async function Na(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function gu(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=Qn(l);for(const u of document.head.children)if(u.isEqualNode(c)){s.push(u);return}});return}const o=i.map(Qn);s.forEach((l,c)=>{const u=o.findIndex(d=>d==null?void 0:d.isEqualNode(l??null));u!==-1?delete o[u]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Oi(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],u=ro(o,i);u!==document.title&&(document.title=u);const d=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==d&&h.setAttribute("content",d):Qn(["meta",{name:"description",content:d}]),r(io(o.head,$a(c)))})}function Qn([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&!t.async&&(s.async=!1),s}function Fa(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function $a(e){return e.filter(t=>!Fa(t))}const Zn=new Set,co=()=>document.createElement("link"),Ha=e=>{const t=co();t.rel="prefetch",t.href=e,document.head.appendChild(t)},ja=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let en;const Va=fe&&(en=co())&&en.relList&&en.relList.supports&&en.relList.supports("prefetch")?Ha:ja;function mu(){if(!fe||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!Zn.has(c)){Zn.add(c);const u=Oa(c);u&&Va(u)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):Zn.add(l))})})};Ct(s);const r=lo();Me(()=>r.path,s),An(()=>{n&&n.disconnect()})}export{Za as $,Xa as A,yl as B,La as C,Ka as D,Wa as E,ye as F,ti as G,au as H,ue as I,ka as J,no as K,lo as L,sc as M,vt as N,lu as O,gs as P,ru as Q,Cn as R,ou as S,Wi as T,fe as U,wn as V,iu as W,Pl as X,eu as Y,Ga as Z,nu as _,Ui as a,za as a0,Ja as a1,gu as a2,Ia as a3,cu as a4,Ta as a5,fu as a6,du as a7,at as a8,tu as a9,uu as aa,Oa as ab,mu as ac,pu as ad,hu as ae,us as af,su as ag,ji as b,Ya as c,pi as d,Qa as e,xa as f,Lr as g,se as h,ya as i,Di as j,si as k,Ba as l,_a as m,ms as n,$i as o,Ua as p,Qi as q,qa as r,ae as s,Da as t,Aa as u,Me as v,ul as w,Oi as x,Ct as y,An as z}; diff --git a/assets/chunks/theme.BaZNtQCC.js b/assets/chunks/theme.BaZNtQCC.js new file mode 100644 index 00000000..f8d46066 --- /dev/null +++ b/assets/chunks/theme.BaZNtQCC.js @@ -0,0 +1 @@ +import{d as _,o as a,c,r as l,n as T,a as D,t as I,b,w as v,e as f,T as de,_ as k,u as Oe,i as Ue,f as Ge,g as ve,h as $,j as p,k as r,p as C,l as H,m as z,q as ie,s as w,v as j,x as Z,y as R,z as pe,A as ge,B as je,C as ze,D as q,F as M,E,G as ye,H as x,I as m,J as K,K as Pe,L as ee,M as Y,N as te,O as qe,P as Le,Q as We,R as Ke,S as Ve,U as oe,V as Re,W as Se,X as Ie,Y as Je,Z as Ye,$ as Qe,a0 as Xe}from"./framework.DXq9tg-I.js";const Ze=_({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(o){return(e,t)=>(a(),c("span",{class:T(["VPBadge",e.type])},[l(e.$slots,"default",{},()=>[D(I(e.text),1)])],2))}}),xe={key:0,class:"VPBackdrop"},et=_({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(o){return(e,t)=>(a(),b(de,{name:"fade"},{default:v(()=>[e.show?(a(),c("div",xe)):f("",!0)]),_:1}))}}),tt=k(et,[["__scopeId","data-v-c79a1216"]]),L=Oe;function ot(o,e){let t,n=!1;return()=>{t&&clearTimeout(t),n?t=setTimeout(o,e):(o(),(n=!0)&&setTimeout(()=>n=!1,e))}}function le(o){return/^\//.test(o)?o:`/${o}`}function he(o){const{pathname:e,search:t,hash:n,protocol:s}=new URL(o,"http://a.com");if(Ue(o)||o.startsWith("#")||!s.startsWith("http")||!Ge(e))return o;const{site:i}=L(),u=e.endsWith("/")||e.endsWith(".html")?o:o.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${n}`);return ve(u)}function J({correspondingLink:o=!1}={}){const{site:e,localeIndex:t,page:n,theme:s,hash:i}=L(),u=$(()=>{var d,g;return{label:(d=e.value.locales[t.value])==null?void 0:d.label,link:((g=e.value.locales[t.value])==null?void 0:g.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:$(()=>Object.entries(e.value.locales).flatMap(([d,g])=>u.value.label===g.label?[]:{text:g.label,link:st(g.link||(d==="root"?"/":`/${d}/`),s.value.i18nRouting!==!1&&o,n.value.relativePath.slice(u.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:u}}function st(o,e,t,n){return e?o.replace(/\/$/,"")+le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,n?".html":"")):o}const nt=o=>(C("data-v-d6be1790"),o=o(),H(),o),at={class:"NotFound"},rt={class:"code"},it={class:"title"},lt=nt(()=>p("div",{class:"divider"},null,-1)),ct={class:"quote"},ut={class:"action"},dt=["href","aria-label"],vt=_({__name:"NotFound",setup(o){const{theme:e}=L(),{currentLang:t}=J();return(n,s)=>{var i,u,h,d,g;return a(),c("div",at,[p("p",rt,I(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),p("h1",it,I(((u=r(e).notFound)==null?void 0:u.title)??"PAGE NOT FOUND"),1),lt,p("blockquote",ct,I(((h=r(e).notFound)==null?void 0:h.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),p("div",ut,[p("a",{class:"link",href:r(ve)(r(t).link),"aria-label":((d=r(e).notFound)==null?void 0:d.linkLabel)??"go to home"},I(((g=r(e).notFound)==null?void 0:g.linkText)??"Take me home"),9,dt)])])}}}),pt=k(vt,[["__scopeId","data-v-d6be1790"]]);function we(o,e){if(Array.isArray(o))return Q(o);if(o==null)return[];e=le(e);const t=Object.keys(o).sort((s,i)=>i.split("/").length-s.split("/").length).find(s=>e.startsWith(le(s))),n=t?o[t]:[];return Array.isArray(n)?Q(n):Q(n.items,n.base)}function ht(o){const e=[];let t=0;for(const n in o){const s=o[n];if(s.items){t=e.push(s);continue}e[t]||e.push({items:[]}),e[t].items.push(s)}return e}function ft(o){const e=[];function t(n){for(const s of n)s.text&&s.link&&e.push({text:s.text,link:s.link,docFooterText:s.docFooterText}),s.items&&t(s.items)}return t(o),e}function ce(o,e){return Array.isArray(e)?e.some(t=>ce(o,t)):z(o,e.link)?!0:e.items?ce(o,e.items):!1}function Q(o,e){return[...o].map(t=>{const n={...t},s=n.base||e;return s&&n.link&&(n.link=s+n.link),n.items&&(n.items=Q(n.items,s)),n})}function O(){const{frontmatter:o,page:e,theme:t}=L(),n=ie("(min-width: 960px)"),s=w(!1),i=$(()=>{const B=t.value.sidebar,S=e.value.relativePath;return B?we(B,S):[]}),u=w(i.value);j(i,(B,S)=>{JSON.stringify(B)!==JSON.stringify(S)&&(u.value=i.value)});const h=$(()=>o.value.sidebar!==!1&&u.value.length>0&&o.value.layout!=="home"),d=$(()=>g?o.value.aside==null?t.value.aside==="left":o.value.aside==="left":!1),g=$(()=>o.value.layout==="home"?!1:o.value.aside!=null?!!o.value.aside:t.value.aside!==!1),P=$(()=>h.value&&n.value),y=$(()=>h.value?ht(u.value):[]);function V(){s.value=!0}function N(){s.value=!1}function A(){s.value?N():V()}return{isOpen:s,sidebar:u,sidebarGroups:y,hasSidebar:h,hasAside:g,leftAside:d,isSidebarEnabled:P,open:V,close:N,toggle:A}}function _t(o,e){let t;Z(()=>{t=o.value?document.activeElement:void 0}),R(()=>{window.addEventListener("keyup",n)}),pe(()=>{window.removeEventListener("keyup",n)});function n(s){s.key==="Escape"&&o.value&&(e(),t==null||t.focus())}}function mt(o){const{page:e,hash:t}=L(),n=w(!1),s=$(()=>o.value.collapsed!=null),i=$(()=>!!o.value.link),u=w(!1),h=()=>{u.value=z(e.value.relativePath,o.value.link)};j([e,o,t],h),R(h);const d=$(()=>u.value?!0:o.value.items?ce(e.value.relativePath,o.value.items):!1),g=$(()=>!!(o.value.items&&o.value.items.length));Z(()=>{n.value=!!(s.value&&o.value.collapsed)}),ge(()=>{(u.value||d.value)&&(n.value=!1)});function P(){s.value&&(n.value=!n.value)}return{collapsed:n,collapsible:s,isLink:i,isActiveLink:u,hasActiveLink:d,hasChildren:g,toggle:P}}function kt(){const{hasSidebar:o}=O(),e=ie("(min-width: 960px)"),t=ie("(min-width: 1280px)");return{isAsideEnabled:$(()=>!t.value&&!e.value?!1:o.value?t.value:e.value)}}const ue=[];function Te(o){return typeof o.outline=="object"&&!Array.isArray(o.outline)&&o.outline.label||o.outlineTitle||"On this page"}function fe(o){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const n=Number(t.tagName[1]);return{element:t,title:bt(t),link:"#"+t.id,level:n}});return $t(e,o)}function bt(o){let e="";for(const t of o.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function $t(o,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[n,s]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;o=o.filter(u=>u.level>=n&&u.level<=s),ue.length=0;for(const{element:u,link:h}of o)ue.push({element:u,link:h});const i=[];e:for(let u=0;u=0;d--){const g=o[d];if(g.level{requestAnimationFrame(i),window.addEventListener("scroll",n)}),je(()=>{u(location.hash)}),pe(()=>{window.removeEventListener("scroll",n)});function i(){if(!t.value)return;const h=window.scrollY,d=window.innerHeight,g=document.body.offsetHeight,P=Math.abs(h+d-g)<1,y=ue.map(({element:N,link:A})=>({link:A,top:yt(N)})).filter(({top:N})=>!Number.isNaN(N)).sort((N,A)=>N.top-A.top);if(!y.length){u(null);return}if(h<1){u(null);return}if(P){u(y[y.length-1].link);return}let V=null;for(const{link:N,top:A}of y){if(A>h+ze()+4)break;V=N}u(V)}function u(h){s&&s.classList.remove("active"),h==null?s=null:s=o.value.querySelector(`a[href="${decodeURIComponent(h)}"]`);const d=s;d?(d.classList.add("active"),e.value.style.top=d.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function yt(o){let e=0;for(;o!==document.body;){if(o===null)return NaN;e+=o.offsetTop,o=o.offsetParent}return e}const Pt=["href","title"],Lt=_({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(o){function e({target:t}){const n=t.href.split("#")[1],s=document.getElementById(decodeURIComponent(n));s==null||s.focus({preventScroll:!0})}return(t,n)=>{const s=q("VPDocOutlineItem",!0);return a(),c("ul",{class:T(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),c(M,null,E(t.headers,({children:i,link:u,title:h})=>(a(),c("li",null,[p("a",{class:"outline-link",href:u,onClick:e,title:h},I(h),9,Pt),i!=null&&i.length?(a(),b(s,{key:0,headers:i},null,8,["headers"])):f("",!0)]))),256))],2)}}}),Ne=k(Lt,[["__scopeId","data-v-b933a997"]]),Vt={class:"content"},St={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},It=_({__name:"VPDocAsideOutline",setup(o){const{frontmatter:e,theme:t}=L(),n=ye([]);x(()=>{n.value=fe(e.value.outline??t.value.outline)});const s=w(),i=w();return gt(s,i),(u,h)=>(a(),c("nav",{"aria-labelledby":"doc-outline-aria-label",class:T(["VPDocAsideOutline",{"has-outline":n.value.length>0}]),ref_key:"container",ref:s},[p("div",Vt,[p("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),p("div",St,I(r(Te)(r(t))),1),m(Ne,{headers:n.value,root:!0},null,8,["headers"])])],2))}}),wt=k(It,[["__scopeId","data-v-a5bbad30"]]),Tt={class:"VPDocAsideCarbonAds"},Nt=_({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(o){const e=()=>null;return(t,n)=>(a(),c("div",Tt,[m(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Mt=o=>(C("data-v-3f215769"),o=o(),H(),o),At={class:"VPDocAside"},Bt=Mt(()=>p("div",{class:"spacer"},null,-1)),Ct=_({__name:"VPDocAside",setup(o){const{theme:e}=L();return(t,n)=>(a(),c("div",At,[l(t.$slots,"aside-top",{},void 0,!0),l(t.$slots,"aside-outline-before",{},void 0,!0),m(wt),l(t.$slots,"aside-outline-after",{},void 0,!0),Bt,l(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),b(Nt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):f("",!0),l(t.$slots,"aside-ads-after",{},void 0,!0),l(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Ht=k(Ct,[["__scopeId","data-v-3f215769"]]);function Et(){const{theme:o,page:e}=L();return $(()=>{const{text:t="Edit this page",pattern:n=""}=o.value.editLink||{};let s;return typeof n=="function"?s=n(e.value):s=n.replace(/:path/g,e.value.filePath),{url:s,text:t}})}function Ft(){const{page:o,theme:e,frontmatter:t}=L();return $(()=>{var g,P,y,V,N,A,B,S;const n=we(e.value.sidebar,o.value.relativePath),s=ft(n),i=Dt(s,U=>U.link.replace(/[?#].*$/,"")),u=i.findIndex(U=>z(o.value.relativePath,U.link)),h=((g=e.value.docFooter)==null?void 0:g.prev)===!1&&!t.value.prev||t.value.prev===!1,d=((P=e.value.docFooter)==null?void 0:P.next)===!1&&!t.value.next||t.value.next===!1;return{prev:h?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=i[u-1])==null?void 0:y.docFooterText)??((V=i[u-1])==null?void 0:V.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((N=i[u-1])==null?void 0:N.link)},next:d?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((A=i[u+1])==null?void 0:A.docFooterText)??((B=i[u+1])==null?void 0:B.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=i[u+1])==null?void 0:S.link)}}})}function Dt(o,e){const t=new Set;return o.filter(n=>{const s=e(n);return t.has(s)?!1:t.add(s)})}const F=_({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(o){const e=o,t=$(()=>e.tag??(e.href?"a":"span")),n=$(()=>e.href&&Pe.test(e.href)||e.target==="_blank");return(s,i)=>(a(),b(K(t.value),{class:T(["VPLink",{link:s.href,"vp-external-link-icon":n.value,"no-icon":s.noIcon}]),href:s.href?r(he)(s.href):void 0,target:s.target??(n.value?"_blank":void 0),rel:s.rel??(n.value?"noreferrer":void 0)},{default:v(()=>[l(s.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Ot={class:"VPLastUpdated"},Ut=["datetime"],Gt=_({__name:"VPDocFooterLastUpdated",setup(o){const{theme:e,page:t,frontmatter:n,lang:s}=L(),i=$(()=>new Date(n.value.lastUpdated??t.value.lastUpdated)),u=$(()=>i.value.toISOString()),h=w("");return R(()=>{Z(()=>{var d,g,P;h.value=new Intl.DateTimeFormat((g=(d=e.value.lastUpdated)==null?void 0:d.formatOptions)!=null&&g.forceLocale?s.value:void 0,((P=e.value.lastUpdated)==null?void 0:P.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(i.value)})}),(d,g)=>{var P;return a(),c("p",Ot,[D(I(((P=r(e).lastUpdated)==null?void 0:P.text)||r(e).lastUpdatedText||"Last updated")+": ",1),p("time",{datetime:u.value},I(h.value),9,Ut)])}}}),jt=k(Gt,[["__scopeId","data-v-7e05ebdb"]]),Me=o=>(C("data-v-d4a0bba5"),o=o(),H(),o),zt={key:0,class:"VPDocFooter"},qt={key:0,class:"edit-info"},Wt={key:0,class:"edit-link"},Kt=Me(()=>p("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Rt={key:1,class:"last-updated"},Jt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Yt=Me(()=>p("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),Qt={class:"pager"},Xt=["innerHTML"],Zt=["innerHTML"],xt={class:"pager"},eo=["innerHTML"],to=["innerHTML"],oo=_({__name:"VPDocFooter",setup(o){const{theme:e,page:t,frontmatter:n}=L(),s=Et(),i=Ft(),u=$(()=>e.value.editLink&&n.value.editLink!==!1),h=$(()=>t.value.lastUpdated&&n.value.lastUpdated!==!1),d=$(()=>u.value||h.value||i.value.prev||i.value.next);return(g,P)=>{var y,V,N,A;return d.value?(a(),c("footer",zt,[l(g.$slots,"doc-footer-before",{},void 0,!0),u.value||h.value?(a(),c("div",qt,[u.value?(a(),c("div",Wt,[m(F,{class:"edit-link-button",href:r(s).url,"no-icon":!0},{default:v(()=>[Kt,D(" "+I(r(s).text),1)]),_:1},8,["href"])])):f("",!0),h.value?(a(),c("div",Rt,[m(jt)])):f("",!0)])):f("",!0),(y=r(i).prev)!=null&&y.link||(V=r(i).next)!=null&&V.link?(a(),c("nav",Jt,[Yt,p("div",Qt,[(N=r(i).prev)!=null&&N.link?(a(),b(F,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:v(()=>{var B;return[p("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.prev)||"Previous page"},null,8,Xt),p("span",{class:"title",innerHTML:r(i).prev.text},null,8,Zt)]}),_:1},8,["href"])):f("",!0)]),p("div",xt,[(A=r(i).next)!=null&&A.link?(a(),b(F,{key:0,class:"pager-link next",href:r(i).next.link},{default:v(()=>{var B;return[p("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.next)||"Next page"},null,8,eo),p("span",{class:"title",innerHTML:r(i).next.text},null,8,to)]}),_:1},8,["href"])):f("",!0)])])):f("",!0)])):f("",!0)}}}),so=k(oo,[["__scopeId","data-v-d4a0bba5"]]),no=o=>(C("data-v-39a288b8"),o=o(),H(),o),ao={class:"container"},ro=no(()=>p("div",{class:"aside-curtain"},null,-1)),io={class:"aside-container"},lo={class:"aside-content"},co={class:"content"},uo={class:"content-container"},vo={class:"main"},po=_({__name:"VPDoc",setup(o){const{theme:e}=L(),t=ee(),{hasSidebar:n,hasAside:s,leftAside:i}=O(),u=$(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(h,d)=>{const g=q("Content");return a(),c("div",{class:T(["VPDoc",{"has-sidebar":r(n),"has-aside":r(s)}])},[l(h.$slots,"doc-top",{},void 0,!0),p("div",ao,[r(s)?(a(),c("div",{key:0,class:T(["aside",{"left-aside":r(i)}])},[ro,p("div",io,[p("div",lo,[m(Ht,null,{"aside-top":v(()=>[l(h.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[l(h.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[l(h.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(h.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(h.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(h.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):f("",!0),p("div",co,[p("div",uo,[l(h.$slots,"doc-before",{},void 0,!0),p("main",vo,[m(g,{class:T(["vp-doc",[u.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),m(so,null,{"doc-footer-before":v(()=>[l(h.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),l(h.$slots,"doc-after",{},void 0,!0)])])]),l(h.$slots,"doc-bottom",{},void 0,!0)],2)}}}),ho=k(po,[["__scopeId","data-v-39a288b8"]]),fo=_({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(o){const e=o,t=$(()=>e.href&&Pe.test(e.href)),n=$(()=>e.tag||e.href?"a":"button");return(s,i)=>(a(),b(K(n.value),{class:T(["VPButton",[s.size,s.theme]]),href:s.href?r(he)(s.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:v(()=>[D(I(s.text),1)]),_:1},8,["class","href","target","rel"]))}}),_o=k(fo,[["__scopeId","data-v-cad61b99"]]),mo=["src","alt"],ko=_({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(o){return(e,t)=>{const n=q("VPImage",!0);return e.image?(a(),c(M,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),c("img",Y({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(ve)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,mo)):(a(),c(M,{key:1},[m(n,Y({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),m(n,Y({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):f("",!0)}}}),X=k(ko,[["__scopeId","data-v-8426fc1a"]]),bo=o=>(C("data-v-303bb580"),o=o(),H(),o),$o={class:"container"},go={class:"main"},yo={key:0,class:"name"},Po=["innerHTML"],Lo=["innerHTML"],Vo=["innerHTML"],So={key:0,class:"actions"},Io={key:0,class:"image"},wo={class:"image-container"},To=bo(()=>p("div",{class:"image-bg"},null,-1)),No=_({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(o){const e=te("hero-image-slot-exists");return(t,n)=>(a(),c("div",{class:T(["VPHero",{"has-image":t.image||r(e)}])},[p("div",$o,[p("div",go,[l(t.$slots,"home-hero-info-before",{},void 0,!0),l(t.$slots,"home-hero-info",{},()=>[t.name?(a(),c("h1",yo,[p("span",{innerHTML:t.name,class:"clip"},null,8,Po)])):f("",!0),t.text?(a(),c("p",{key:1,innerHTML:t.text,class:"text"},null,8,Lo)):f("",!0),t.tagline?(a(),c("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,Vo)):f("",!0)],!0),l(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),c("div",So,[(a(!0),c(M,null,E(t.actions,s=>(a(),c("div",{key:s.link,class:"action"},[m(_o,{tag:"a",size:"medium",theme:s.theme,text:s.text,href:s.link,target:s.target,rel:s.rel},null,8,["theme","text","href","target","rel"])]))),128))])):f("",!0),l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),c("div",Io,[p("div",wo,[To,l(t.$slots,"home-hero-image",{},()=>[t.image?(a(),b(X,{key:0,class:"image-src",image:t.image},null,8,["image"])):f("",!0)],!0)])])):f("",!0)])],2))}}),Mo=k(No,[["__scopeId","data-v-303bb580"]]),Ao=_({__name:"VPHomeHero",setup(o){const{frontmatter:e}=L();return(t,n)=>r(e).hero?(a(),b(Mo,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":v(()=>[l(t.$slots,"home-hero-info-before")]),"home-hero-info":v(()=>[l(t.$slots,"home-hero-info")]),"home-hero-info-after":v(()=>[l(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":v(()=>[l(t.$slots,"home-hero-actions-after")]),"home-hero-image":v(()=>[l(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):f("",!0)}}),Bo=o=>(C("data-v-a3976bdc"),o=o(),H(),o),Co={class:"box"},Ho={key:0,class:"icon"},Eo=["innerHTML"],Fo=["innerHTML"],Do=["innerHTML"],Oo={key:4,class:"link-text"},Uo={class:"link-text-value"},Go=Bo(()=>p("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),jo=_({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(o){return(e,t)=>(a(),b(F,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:v(()=>[p("article",Co,[typeof e.icon=="object"&&e.icon.wrap?(a(),c("div",Ho,[m(X,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),b(X,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),c("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Eo)):f("",!0),p("h2",{class:"title",innerHTML:e.title},null,8,Fo),e.details?(a(),c("p",{key:3,class:"details",innerHTML:e.details},null,8,Do)):f("",!0),e.linkText?(a(),c("div",Oo,[p("p",Uo,[D(I(e.linkText)+" ",1),Go])])):f("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),zo=k(jo,[["__scopeId","data-v-a3976bdc"]]),qo={key:0,class:"VPFeatures"},Wo={class:"container"},Ko={class:"items"},Ro=_({__name:"VPFeatures",props:{features:{}},setup(o){const e=o,t=$(()=>{const n=e.features.length;if(n){if(n===2)return"grid-2";if(n===3)return"grid-3";if(n%3===0)return"grid-6";if(n>3)return"grid-4"}else return});return(n,s)=>n.features?(a(),c("div",qo,[p("div",Wo,[p("div",Ko,[(a(!0),c(M,null,E(n.features,i=>(a(),c("div",{key:i.title,class:T(["item",[t.value]])},[m(zo,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):f("",!0)}}),Jo=k(Ro,[["__scopeId","data-v-a6181336"]]),Yo=_({__name:"VPHomeFeatures",setup(o){const{frontmatter:e}=L();return(t,n)=>r(e).features?(a(),b(Jo,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):f("",!0)}}),Qo=_({__name:"VPHomeContent",setup(o){const{width:e}=qe({initialWidth:0,includeScrollbar:!1});return(t,n)=>(a(),c("div",{class:"vp-doc container",style:Le(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[l(t.$slots,"default",{},void 0,!0)],4))}}),Xo=k(Qo,[["__scopeId","data-v-8e2d4988"]]),Zo={class:"VPHome"},xo=_({__name:"VPHome",setup(o){const{frontmatter:e}=L();return(t,n)=>{const s=q("Content");return a(),c("div",Zo,[l(t.$slots,"home-hero-before",{},void 0,!0),m(Ao,null,{"home-hero-info-before":v(()=>[l(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),l(t.$slots,"home-hero-after",{},void 0,!0),l(t.$slots,"home-features-before",{},void 0,!0),m(Yo),l(t.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),b(Xo,{key:0},{default:v(()=>[m(s)]),_:1})):(a(),b(s,{key:1}))])}}}),es=k(xo,[["__scopeId","data-v-686f80a6"]]),ts={},os={class:"VPPage"};function ss(o,e){const t=q("Content");return a(),c("div",os,[l(o.$slots,"page-top"),m(t),l(o.$slots,"page-bottom")])}const ns=k(ts,[["render",ss]]),as=_({__name:"VPContent",setup(o){const{page:e,frontmatter:t}=L(),{hasSidebar:n}=O();return(s,i)=>(a(),c("div",{class:T(["VPContent",{"has-sidebar":r(n),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?l(s.$slots,"not-found",{key:0},()=>[m(pt)],!0):r(t).layout==="page"?(a(),b(ns,{key:1},{"page-top":v(()=>[l(s.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[l(s.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),b(es,{key:2},{"home-hero-before":v(()=>[l(s.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[l(s.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(s.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(s.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(s.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[l(s.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[l(s.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[l(s.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),b(K(r(t).layout),{key:3})):(a(),b(ho,{key:4},{"doc-top":v(()=>[l(s.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[l(s.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":v(()=>[l(s.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[l(s.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[l(s.$slots,"doc-after",{},void 0,!0)]),"aside-top":v(()=>[l(s.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":v(()=>[l(s.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(s.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(s.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(s.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":v(()=>[l(s.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),rs=k(as,[["__scopeId","data-v-1428d186"]]),is={class:"container"},ls=["innerHTML"],cs=["innerHTML"],us=_({__name:"VPFooter",setup(o){const{theme:e,frontmatter:t}=L(),{hasSidebar:n}=O();return(s,i)=>r(e).footer&&r(t).footer!==!1?(a(),c("footer",{key:0,class:T(["VPFooter",{"has-sidebar":r(n)}])},[p("div",is,[r(e).footer.message?(a(),c("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,ls)):f("",!0),r(e).footer.copyright?(a(),c("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,cs)):f("",!0)])],2)):f("",!0)}}),ds=k(us,[["__scopeId","data-v-e315a0ad"]]);function vs(){const{theme:o,frontmatter:e}=L(),t=ye([]),n=$(()=>t.value.length>0);return x(()=>{t.value=fe(e.value.outline??o.value.outline)}),{headers:t,hasLocalNav:n}}const ps=o=>(C("data-v-17a5e62e"),o=o(),H(),o),hs={class:"menu-text"},fs=ps(()=>p("span",{class:"vpi-chevron-right icon"},null,-1)),_s={class:"header"},ms={class:"outline"},ks=_({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(o){const e=o,{theme:t}=L(),n=w(!1),s=w(0),i=w(),u=w();function h(y){var V;(V=i.value)!=null&&V.contains(y.target)||(n.value=!1)}j(n,y=>{if(y){document.addEventListener("click",h);return}document.removeEventListener("click",h)}),We("Escape",()=>{n.value=!1}),x(()=>{n.value=!1});function d(){n.value=!n.value,s.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function g(y){y.target.classList.contains("outline-link")&&(u.value&&(u.value.style.transition="none"),Ke(()=>{n.value=!1}))}function P(){n.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,V)=>(a(),c("div",{class:"VPLocalNavOutlineDropdown",style:Le({"--vp-vh":s.value+"px"}),ref_key:"main",ref:i},[y.headers.length>0?(a(),c("button",{key:0,onClick:d,class:T({open:n.value})},[p("span",hs,I(r(Te)(r(t))),1),fs],2)):(a(),c("button",{key:1,onClick:P},I(r(t).returnToTopLabel||"Return to top"),1)),m(de,{name:"flyout"},{default:v(()=>[n.value?(a(),c("div",{key:0,ref_key:"items",ref:u,class:"items",onClick:g},[p("div",_s,[p("a",{class:"top-link",href:"#",onClick:P},I(r(t).returnToTopLabel||"Return to top"),1)]),p("div",ms,[m(Ne,{headers:y.headers},null,8,["headers"])])],512)):f("",!0)]),_:1})],4))}}),bs=k(ks,[["__scopeId","data-v-17a5e62e"]]),$s=o=>(C("data-v-a6f0e41e"),o=o(),H(),o),gs={class:"container"},ys=["aria-expanded"],Ps=$s(()=>p("span",{class:"vpi-align-left menu-icon"},null,-1)),Ls={class:"menu-text"},Vs=_({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(o){const{theme:e,frontmatter:t}=L(),{hasSidebar:n}=O(),{headers:s}=vs(),{y:i}=Ve(),u=w(0);R(()=>{u.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),x(()=>{s.value=fe(t.value.outline??e.value.outline)});const h=$(()=>s.value.length===0),d=$(()=>h.value&&!n.value),g=$(()=>({VPLocalNav:!0,"has-sidebar":n.value,empty:h.value,fixed:d.value}));return(P,y)=>r(t).layout!=="home"&&(!d.value||r(i)>=u.value)?(a(),c("div",{key:0,class:T(g.value)},[p("div",gs,[r(n)?(a(),c("button",{key:0,class:"menu","aria-expanded":P.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=V=>P.$emit("open-menu"))},[Ps,p("span",Ls,I(r(e).sidebarMenuLabel||"Menu"),1)],8,ys)):f("",!0),m(bs,{headers:r(s),navHeight:u.value},null,8,["headers","navHeight"])])],2)):f("",!0)}}),Ss=k(Vs,[["__scopeId","data-v-a6f0e41e"]]);function Is(){const o=w(!1);function e(){o.value=!0,window.addEventListener("resize",s)}function t(){o.value=!1,window.removeEventListener("resize",s)}function n(){o.value?t():e()}function s(){window.outerWidth>=768&&t()}const i=ee();return j(()=>i.path,t),{isScreenOpen:o,openScreen:e,closeScreen:t,toggleScreen:n}}const ws={},Ts={class:"VPSwitch",type:"button",role:"switch"},Ns={class:"check"},Ms={key:0,class:"icon"};function As(o,e){return a(),c("button",Ts,[p("span",Ns,[o.$slots.default?(a(),c("span",Ms,[l(o.$slots,"default",{},void 0,!0)])):f("",!0)])])}const Bs=k(ws,[["render",As],["__scopeId","data-v-1d5665e3"]]),Ae=o=>(C("data-v-d1f28634"),o=o(),H(),o),Cs=Ae(()=>p("span",{class:"vpi-sun sun"},null,-1)),Hs=Ae(()=>p("span",{class:"vpi-moon moon"},null,-1)),Es=_({__name:"VPSwitchAppearance",setup(o){const{isDark:e,theme:t}=L(),n=te("toggle-appearance",()=>{e.value=!e.value}),s=$(()=>e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme");return(i,u)=>(a(),b(Bs,{title:s.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(n)},{default:v(()=>[Cs,Hs]),_:1},8,["title","aria-checked","onClick"]))}}),_e=k(Es,[["__scopeId","data-v-d1f28634"]]),Fs={key:0,class:"VPNavBarAppearance"},Ds=_({__name:"VPNavBarAppearance",setup(o){const{site:e}=L();return(t,n)=>r(e).appearance&&r(e).appearance!=="force-dark"?(a(),c("div",Fs,[m(_e)])):f("",!0)}}),Os=k(Ds,[["__scopeId","data-v-e6aabb21"]]),me=w();let Be=!1,re=0;function Us(o){const e=w(!1);if(oe){!Be&&Gs(),re++;const t=j(me,n=>{var s,i,u;n===o.el.value||(s=o.el.value)!=null&&s.contains(n)?(e.value=!0,(i=o.onFocus)==null||i.call(o)):(e.value=!1,(u=o.onBlur)==null||u.call(o))});pe(()=>{t(),re--,re||js()})}return Re(e)}function Gs(){document.addEventListener("focusin",Ce),Be=!0,me.value=document.activeElement}function js(){document.removeEventListener("focusin",Ce)}function Ce(){me.value=document.activeElement}const zs={class:"VPMenuLink"},qs=_({__name:"VPMenuLink",props:{item:{}},setup(o){const{page:e}=L();return(t,n)=>(a(),c("div",zs,[m(F,{class:T({active:r(z)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:v(()=>[D(I(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),se=k(qs,[["__scopeId","data-v-43f1e123"]]),Ws={class:"VPMenuGroup"},Ks={key:0,class:"title"},Rs=_({__name:"VPMenuGroup",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Ws,[e.text?(a(),c("p",Ks,I(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,n=>(a(),c(M,null,["link"in n?(a(),b(se,{key:0,item:n},null,8,["item"])):f("",!0)],64))),256))]))}}),Js=k(Rs,[["__scopeId","data-v-69e747b5"]]),Ys={class:"VPMenu"},Qs={key:0,class:"items"},Xs=_({__name:"VPMenu",props:{items:{}},setup(o){return(e,t)=>(a(),c("div",Ys,[e.items?(a(),c("div",Qs,[(a(!0),c(M,null,E(e.items,n=>(a(),c(M,{key:n.text},["link"in n?(a(),b(se,{key:0,item:n},null,8,["item"])):(a(),b(Js,{key:1,text:n.text,items:n.items},null,8,["text","items"]))],64))),128))])):f("",!0),l(e.$slots,"default",{},void 0,!0)]))}}),Zs=k(Xs,[["__scopeId","data-v-e7ea1737"]]),xs=o=>(C("data-v-b6c34ac9"),o=o(),H(),o),en=["aria-expanded","aria-label"],tn={key:0,class:"text"},on=["innerHTML"],sn=xs(()=>p("span",{class:"vpi-chevron-down text-icon"},null,-1)),nn={key:1,class:"vpi-more-horizontal icon"},an={class:"menu"},rn=_({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(o){const e=w(!1),t=w();Us({el:t,onBlur:n});function n(){e.value=!1}return(s,i)=>(a(),c("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=u=>e.value=!0),onMouseleave:i[2]||(i[2]=u=>e.value=!1)},[p("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":s.label,onClick:i[0]||(i[0]=u=>e.value=!e.value)},[s.button||s.icon?(a(),c("span",tn,[s.icon?(a(),c("span",{key:0,class:T([s.icon,"option-icon"])},null,2)):f("",!0),s.button?(a(),c("span",{key:1,innerHTML:s.button},null,8,on)):f("",!0),sn])):(a(),c("span",nn))],8,en),p("div",an,[m(Zs,{items:s.items},{default:v(()=>[l(s.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),ke=k(rn,[["__scopeId","data-v-b6c34ac9"]]),ln=["href","aria-label","innerHTML"],cn=_({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(o){const e=o,t=$(()=>typeof e.icon=="object"?e.icon.svg:``);return(n,s)=>(a(),c("a",{class:"VPSocialLink no-icon",href:n.link,"aria-label":n.ariaLabel??(typeof n.icon=="string"?n.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,ln))}}),un=k(cn,[["__scopeId","data-v-eee4e7cb"]]),dn={class:"VPSocialLinks"},vn=_({__name:"VPSocialLinks",props:{links:{}},setup(o){return(e,t)=>(a(),c("div",dn,[(a(!0),c(M,null,E(e.links,({link:n,icon:s,ariaLabel:i})=>(a(),b(un,{key:n,icon:s,link:n,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),be=k(vn,[["__scopeId","data-v-7bc22406"]]),pn={key:0,class:"group translations"},hn={class:"trans-title"},fn={key:1,class:"group"},_n={class:"item appearance"},mn={class:"label"},kn={class:"appearance-action"},bn={key:2,class:"group"},$n={class:"item social-links"},gn=_({__name:"VPNavBarExtra",setup(o){const{site:e,theme:t}=L(),{localeLinks:n,currentLang:s}=J({correspondingLink:!0}),i=$(()=>n.value.length&&s.value.label||e.value.appearance||t.value.socialLinks);return(u,h)=>i.value?(a(),b(ke,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:v(()=>[r(n).length&&r(s).label?(a(),c("div",pn,[p("p",hn,I(r(s).label),1),(a(!0),c(M,null,E(r(n),d=>(a(),b(se,{key:d.link,item:d},null,8,["item"]))),128))])):f("",!0),r(e).appearance&&r(e).appearance!=="force-dark"?(a(),c("div",fn,[p("div",_n,[p("p",mn,I(r(t).darkModeSwitchLabel||"Appearance"),1),p("div",kn,[m(_e)])])])):f("",!0),r(t).socialLinks?(a(),c("div",bn,[p("div",$n,[m(be,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):f("",!0)]),_:1})):f("",!0)}}),yn=k(gn,[["__scopeId","data-v-d0bd9dde"]]),Pn=o=>(C("data-v-e5dd9c1c"),o=o(),H(),o),Ln=["aria-expanded"],Vn=Pn(()=>p("span",{class:"container"},[p("span",{class:"top"}),p("span",{class:"middle"}),p("span",{class:"bottom"})],-1)),Sn=[Vn],In=_({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(o){return(e,t)=>(a(),c("button",{type:"button",class:T(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=n=>e.$emit("click"))},Sn,10,Ln))}}),wn=k(In,[["__scopeId","data-v-e5dd9c1c"]]),Tn=["innerHTML"],Nn=_({__name:"VPNavBarMenuLink",props:{item:{}},setup(o){const{page:e}=L();return(t,n)=>(a(),b(F,{class:T({VPNavBarMenuLink:!0,active:r(z)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,noIcon:t.item.noIcon,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:v(()=>[p("span",{innerHTML:t.item.text},null,8,Tn)]),_:1},8,["class","href","noIcon","target","rel"]))}}),Mn=k(Nn,[["__scopeId","data-v-9c663999"]]),An=_({__name:"VPNavBarMenuGroup",props:{item:{}},setup(o){const e=o,{page:t}=L(),n=i=>"link"in i?z(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(n),s=$(()=>n(e.item));return(i,u)=>(a(),b(ke,{class:T({VPNavBarMenuGroup:!0,active:r(z)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||s.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),Bn=o=>(C("data-v-7f418b0f"),o=o(),H(),o),Cn={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Hn=Bn(()=>p("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),En=_({__name:"VPNavBarMenu",setup(o){const{theme:e}=L();return(t,n)=>r(e).nav?(a(),c("nav",Cn,[Hn,(a(!0),c(M,null,E(r(e).nav,s=>(a(),c(M,{key:s.text},["link"in s?(a(),b(Mn,{key:0,item:s},null,8,["item"])):(a(),b(An,{key:1,item:s},null,8,["item"]))],64))),128))])):f("",!0)}}),Fn=k(En,[["__scopeId","data-v-7f418b0f"]]);function Dn(o){const{localeIndex:e,theme:t}=L();function n(s){var A,B,S;const i=s.split("."),u=(A=t.value.search)==null?void 0:A.options,h=u&&typeof u=="object",d=h&&((S=(B=u.locales)==null?void 0:B[e.value])==null?void 0:S.translations)||null,g=h&&u.translations||null;let P=d,y=g,V=o;const N=i.pop();for(const U of i){let G=null;const W=V==null?void 0:V[U];W&&(G=V=W);const ne=y==null?void 0:y[U];ne&&(G=y=ne);const ae=P==null?void 0:P[U];ae&&(G=P=ae),W||(V=G),ne||(y=G),ae||(P=G)}return(P==null?void 0:P[N])??(y==null?void 0:y[N])??(V==null?void 0:V[N])??""}return n}const On=["aria-label"],Un={class:"DocSearch-Button-Container"},Gn=p("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1),jn={class:"DocSearch-Button-Placeholder"},zn=p("span",{class:"DocSearch-Button-Keys"},[p("kbd",{class:"DocSearch-Button-Key"}),p("kbd",{class:"DocSearch-Button-Key"},"K")],-1),$e=_({__name:"VPNavBarSearchButton",setup(o){const t=Dn({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(n,s)=>(a(),c("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[p("span",Un,[Gn,p("span",jn,I(r(t)("button.buttonText")),1)]),zn],8,On))}}),qn={class:"VPNavBarSearch"},Wn={id:"local-search"},Kn={key:1,id:"docsearch"},Rn=_({__name:"VPNavBarSearch",setup(o){const e=()=>null,t=()=>null,{theme:n}=L(),s=w(!1),i=w(!1);R(()=>{});function u(){s.value||(s.value=!0,setTimeout(h,16))}function h(){const P=new Event("keydown");P.key="k",P.metaKey=!0,window.dispatchEvent(P),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||h()},16)}const d=w(!1),g="";return(P,y)=>{var V;return a(),c("div",qn,[r(g)==="local"?(a(),c(M,{key:0},[d.value?(a(),b(r(e),{key:0,onClose:y[0]||(y[0]=N=>d.value=!1)})):f("",!0),p("div",Wn,[m($e,{onClick:y[1]||(y[1]=N=>d.value=!0)})])],64)):r(g)==="algolia"?(a(),c(M,{key:1},[s.value?(a(),b(r(t),{key:0,algolia:((V=r(n).search)==null?void 0:V.options)??r(n).algolia,onVnodeBeforeMount:y[2]||(y[2]=N=>i.value=!0)},null,8,["algolia"])):f("",!0),i.value?f("",!0):(a(),c("div",Kn,[m($e,{onClick:u})]))],64)):f("",!0)])}}}),Jn=_({__name:"VPNavBarSocialLinks",setup(o){const{theme:e}=L();return(t,n)=>r(e).socialLinks?(a(),b(be,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Yn=k(Jn,[["__scopeId","data-v-0394ad82"]]),Qn=["href","rel","target"],Xn={key:1},Zn={key:2},xn=_({__name:"VPNavBarTitle",setup(o){const{site:e,theme:t}=L(),{hasSidebar:n}=O(),{currentLang:s}=J(),i=$(()=>{var d;return typeof t.value.logoLink=="string"?t.value.logoLink:(d=t.value.logoLink)==null?void 0:d.link}),u=$(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.rel}),h=$(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.target});return(d,g)=>(a(),c("div",{class:T(["VPNavBarTitle",{"has-sidebar":r(n)}])},[p("a",{class:"title",href:i.value??r(he)(r(s).link),rel:u.value,target:h.value},[l(d.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),b(X,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):f("",!0),r(t).siteTitle?(a(),c("span",Xn,I(r(t).siteTitle),1)):r(t).siteTitle===void 0?(a(),c("span",Zn,I(r(e).title),1)):f("",!0),l(d.$slots,"nav-bar-title-after",{},void 0,!0)],8,Qn)],2))}}),ea=k(xn,[["__scopeId","data-v-ab179fa1"]]),ta={class:"items"},oa={class:"title"},sa=_({__name:"VPNavBarTranslations",setup(o){const{theme:e}=L(),{localeLinks:t,currentLang:n}=J({correspondingLink:!0});return(s,i)=>r(t).length&&r(n).label?(a(),b(ke,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:v(()=>[p("div",ta,[p("p",oa,I(r(n).label),1),(a(!0),c(M,null,E(r(t),u=>(a(),b(se,{key:u.link,item:u},null,8,["item"]))),128))])]),_:1},8,["label"])):f("",!0)}}),na=k(sa,[["__scopeId","data-v-88af2de4"]]),aa=o=>(C("data-v-ccf7ddec"),o=o(),H(),o),ra={class:"wrapper"},ia={class:"container"},la={class:"title"},ca={class:"content"},ua={class:"content-body"},da=aa(()=>p("div",{class:"divider"},[p("div",{class:"divider-line"})],-1)),va=_({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(o){const{y:e}=Ve(),{hasSidebar:t}=O(),{frontmatter:n}=L(),s=w({});return ge(()=>{s.value={"has-sidebar":t.value,home:n.value.layout==="home",top:e.value===0}}),(i,u)=>(a(),c("div",{class:T(["VPNavBar",s.value])},[p("div",ra,[p("div",ia,[p("div",la,[m(ea,null,{"nav-bar-title-before":v(()=>[l(i.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(i.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),p("div",ca,[p("div",ua,[l(i.$slots,"nav-bar-content-before",{},void 0,!0),m(Rn,{class:"search"}),m(Fn,{class:"menu"}),m(na,{class:"translations"}),m(Os,{class:"appearance"}),m(Yn,{class:"social-links"}),m(yn,{class:"extra"}),l(i.$slots,"nav-bar-content-after",{},void 0,!0),m(wn,{class:"hamburger",active:i.isScreenOpen,onClick:u[0]||(u[0]=h=>i.$emit("toggle-screen"))},null,8,["active"])])])])]),da],2))}}),pa=k(va,[["__scopeId","data-v-ccf7ddec"]]),ha={key:0,class:"VPNavScreenAppearance"},fa={class:"text"},_a=_({__name:"VPNavScreenAppearance",setup(o){const{site:e,theme:t}=L();return(n,s)=>r(e).appearance&&r(e).appearance!=="force-dark"?(a(),c("div",ha,[p("p",fa,I(r(t).darkModeSwitchLabel||"Appearance"),1),m(_e)])):f("",!0)}}),ma=k(_a,[["__scopeId","data-v-2d7af913"]]),ka=_({__name:"VPNavScreenMenuLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,n)=>(a(),b(F,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e),innerHTML:t.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),ba=k(ka,[["__scopeId","data-v-7f31e1f6"]]),$a=_({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,n)=>(a(),b(F,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e)},{default:v(()=>[D(I(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),He=k($a,[["__scopeId","data-v-19976ae1"]]),ga={class:"VPNavScreenMenuGroupSection"},ya={key:0,class:"title"},Pa=_({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",ga,[e.text?(a(),c("p",ya,I(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,n=>(a(),b(He,{key:n.text,item:n},null,8,["item"]))),128))]))}}),La=k(Pa,[["__scopeId","data-v-8133b170"]]),Va=o=>(C("data-v-ff6087d4"),o=o(),H(),o),Sa=["aria-controls","aria-expanded"],Ia=["innerHTML"],wa=Va(()=>p("span",{class:"vpi-plus button-icon"},null,-1)),Ta=["id"],Na={key:1,class:"group"},Ma=_({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(o){const e=o,t=w(!1),n=$(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function s(){t.value=!t.value}return(i,u)=>(a(),c("div",{class:T(["VPNavScreenMenuGroup",{open:t.value}])},[p("button",{class:"button","aria-controls":n.value,"aria-expanded":t.value,onClick:s},[p("span",{class:"button-text",innerHTML:i.text},null,8,Ia),wa],8,Sa),p("div",{id:n.value,class:"items"},[(a(!0),c(M,null,E(i.items,h=>(a(),c(M,{key:h.text},["link"in h?(a(),c("div",{key:h.text,class:"item"},[m(He,{item:h},null,8,["item"])])):(a(),c("div",Na,[m(La,{text:h.text,items:h.items},null,8,["text","items"])]))],64))),128))],8,Ta)],2))}}),Aa=k(Ma,[["__scopeId","data-v-ff6087d4"]]),Ba={key:0,class:"VPNavScreenMenu"},Ca=_({__name:"VPNavScreenMenu",setup(o){const{theme:e}=L();return(t,n)=>r(e).nav?(a(),c("nav",Ba,[(a(!0),c(M,null,E(r(e).nav,s=>(a(),c(M,{key:s.text},["link"in s?(a(),b(ba,{key:0,item:s},null,8,["item"])):(a(),b(Aa,{key:1,text:s.text||"",items:s.items},null,8,["text","items"]))],64))),128))])):f("",!0)}}),Ha=_({__name:"VPNavScreenSocialLinks",setup(o){const{theme:e}=L();return(t,n)=>r(e).socialLinks?(a(),b(be,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Ee=o=>(C("data-v-858fe1a4"),o=o(),H(),o),Ea=Ee(()=>p("span",{class:"vpi-languages icon lang"},null,-1)),Fa=Ee(()=>p("span",{class:"vpi-chevron-down icon chevron"},null,-1)),Da={class:"list"},Oa=_({__name:"VPNavScreenTranslations",setup(o){const{localeLinks:e,currentLang:t}=J({correspondingLink:!0}),n=w(!1);function s(){n.value=!n.value}return(i,u)=>r(e).length&&r(t).label?(a(),c("div",{key:0,class:T(["VPNavScreenTranslations",{open:n.value}])},[p("button",{class:"title",onClick:s},[Ea,D(" "+I(r(t).label)+" ",1),Fa]),p("ul",Da,[(a(!0),c(M,null,E(r(e),h=>(a(),c("li",{key:h.link,class:"item"},[m(F,{class:"link",href:h.link},{default:v(()=>[D(I(h.text),1)]),_:2},1032,["href"])]))),128))])],2)):f("",!0)}}),Ua=k(Oa,[["__scopeId","data-v-858fe1a4"]]),Ga={class:"container"},ja=_({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(o){const e=w(null),t=Se(oe?document.body:null);return(n,s)=>(a(),b(de,{name:"fade",onEnter:s[0]||(s[0]=i=>t.value=!0),onAfterLeave:s[1]||(s[1]=i=>t.value=!1)},{default:v(()=>[n.open?(a(),c("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[p("div",Ga,[l(n.$slots,"nav-screen-content-before",{},void 0,!0),m(Ca,{class:"menu"}),m(Ua,{class:"translations"}),m(ma,{class:"appearance"}),m(Ha,{class:"social-links"}),l(n.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):f("",!0)]),_:3}))}}),za=k(ja,[["__scopeId","data-v-cc5739dd"]]),qa={key:0,class:"VPNav"},Wa=_({__name:"VPNav",setup(o){const{isScreenOpen:e,closeScreen:t,toggleScreen:n}=Is(),{frontmatter:s}=L(),i=$(()=>s.value.navbar!==!1);return Ie("close-screen",t),Z(()=>{oe&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(u,h)=>i.value?(a(),c("header",qa,[m(pa,{"is-screen-open":r(e),onToggleScreen:r(n)},{"nav-bar-title-before":v(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[l(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[l(u.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),m(za,{open:r(e)},{"nav-screen-content-before":v(()=>[l(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[l(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):f("",!0)}}),Ka=k(Wa,[["__scopeId","data-v-ae24b3ad"]]),Fe=o=>(C("data-v-b8d55f3b"),o=o(),H(),o),Ra=["role","tabindex"],Ja=Fe(()=>p("div",{class:"indicator"},null,-1)),Ya=Fe(()=>p("span",{class:"vpi-chevron-right caret-icon"},null,-1)),Qa=[Ya],Xa={key:1,class:"items"},Za=_({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(o){const e=o,{collapsed:t,collapsible:n,isLink:s,isActiveLink:i,hasActiveLink:u,hasChildren:h,toggle:d}=mt($(()=>e.item)),g=$(()=>h.value?"section":"div"),P=$(()=>s.value?"a":"div"),y=$(()=>h.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),V=$(()=>s.value?void 0:"button"),N=$(()=>[[`level-${e.depth}`],{collapsible:n.value},{collapsed:t.value},{"is-link":s.value},{"is-active":i.value},{"has-active":u.value}]);function A(S){"key"in S&&S.key!=="Enter"||!e.item.link&&d()}function B(){e.item.link&&d()}return(S,U)=>{const G=q("VPSidebarItem",!0);return a(),b(K(g.value),{class:T(["VPSidebarItem",N.value])},{default:v(()=>[S.item.text?(a(),c("div",Y({key:0,class:"item",role:V.value},Ye(S.item.items?{click:A,keydown:A}:{},!0),{tabindex:S.item.items&&0}),[Ja,S.item.link?(a(),b(F,{key:0,tag:P.value,class:"link",href:S.item.link,rel:S.item.rel,target:S.item.target},{default:v(()=>[(a(),b(K(y.value),{class:"text",innerHTML:S.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),b(K(y.value),{key:1,class:"text",innerHTML:S.item.text},null,8,["innerHTML"])),S.item.collapsed!=null&&S.item.items&&S.item.items.length?(a(),c("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:B,onKeydown:Je(B,["enter"]),tabindex:"0"},Qa,32)):f("",!0)],16,Ra)):f("",!0),S.item.items&&S.item.items.length?(a(),c("div",Xa,[S.depth<5?(a(!0),c(M,{key:0},E(S.item.items,W=>(a(),b(G,{key:W.text,item:W,depth:S.depth+1},null,8,["item","depth"]))),128)):f("",!0)])):f("",!0)]),_:1},8,["class"])}}}),xa=k(Za,[["__scopeId","data-v-b8d55f3b"]]),De=o=>(C("data-v-575e6a36"),o=o(),H(),o),er=De(()=>p("div",{class:"curtain"},null,-1)),tr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},or=De(()=>p("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),sr=_({__name:"VPSidebar",props:{open:{type:Boolean}},setup(o){const{sidebarGroups:e,hasSidebar:t}=O(),n=o,s=w(null),i=Se(oe?document.body:null);return j([n,s],()=>{var u;n.open?(i.value=!0,(u=s.value)==null||u.focus()):i.value=!1},{immediate:!0,flush:"post"}),(u,h)=>r(t)?(a(),c("aside",{key:0,class:T(["VPSidebar",{open:u.open}]),ref_key:"navEl",ref:s,onClick:h[0]||(h[0]=Qe(()=>{},["stop"]))},[er,p("nav",tr,[or,l(u.$slots,"sidebar-nav-before",{},void 0,!0),(a(!0),c(M,null,E(r(e),d=>(a(),c("div",{key:d.text,class:"group"},[m(xa,{item:d,depth:0},null,8,["item"])]))),128)),l(u.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):f("",!0)}}),nr=k(sr,[["__scopeId","data-v-575e6a36"]]),ar=_({__name:"VPSkipLink",setup(o){const e=ee(),t=w();j(()=>e.path,()=>t.value.focus());function n({target:s}){const i=document.getElementById(decodeURIComponent(s.hash).slice(1));if(i){const u=()=>{i.removeAttribute("tabindex"),i.removeEventListener("blur",u)};i.setAttribute("tabindex","-1"),i.addEventListener("blur",u),i.focus(),window.scrollTo(0,0)}}return(s,i)=>(a(),c(M,null,[p("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),p("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:n}," Skip to content ")],64))}}),rr=k(ar,[["__scopeId","data-v-0f60ec36"]]),ir=_({__name:"Layout",setup(o){const{isOpen:e,open:t,close:n}=O(),s=ee();j(()=>s.path,n),_t(e,n);const{frontmatter:i}=L(),u=Xe(),h=$(()=>!!u["home-hero-image"]);return Ie("hero-image-slot-exists",h),(d,g)=>{const P=q("Content");return r(i).layout!==!1?(a(),c("div",{key:0,class:T(["Layout",r(i).pageClass])},[l(d.$slots,"layout-top",{},void 0,!0),m(rr),m(tt,{class:"backdrop",show:r(e),onClick:r(n)},null,8,["show","onClick"]),m(Ka,null,{"nav-bar-title-before":v(()=>[l(d.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(d.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[l(d.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[l(d.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":v(()=>[l(d.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[l(d.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),m(Ss,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),m(nr,{open:r(e)},{"sidebar-nav-before":v(()=>[l(d.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":v(()=>[l(d.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),m(rs,null,{"page-top":v(()=>[l(d.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[l(d.$slots,"page-bottom",{},void 0,!0)]),"not-found":v(()=>[l(d.$slots,"not-found",{},void 0,!0)]),"home-hero-before":v(()=>[l(d.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[l(d.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(d.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(d.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(d.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(d.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[l(d.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[l(d.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[l(d.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":v(()=>[l(d.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[l(d.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[l(d.$slots,"doc-after",{},void 0,!0)]),"doc-top":v(()=>[l(d.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[l(d.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":v(()=>[l(d.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[l(d.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[l(d.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(d.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(d.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(d.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),m(ds),l(d.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),b(P,{key:1}))}}}),lr=k(ir,[["__scopeId","data-v-5d98c3a5"]]),ur={Layout:lr,enhanceApp:({app:o})=>{o.component("Badge",Ze)}};export{ur as t}; diff --git a/assets/date.md.CyXixeqG.js b/assets/date.md.CyXixeqG.js new file mode 100644 index 00000000..6b285704 --- /dev/null +++ b/assets/date.md.CyXixeqG.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as a,a1 as o}from"./chunks/framework.DXq9tg-I.js";const y=JSON.parse('{"title":"LocalDate, LocalTime","description":"","frontmatter":{},"headers":[],"relativePath":"date.md","filePath":"date.md"}'),d={name:"date.md"},i=o('

LocalDate, LocalTime

Why?

Serves as an alternative / replacement of Moment.js / Day.js.

It tries to address the shortcomings of Day.js and time-lib.

time-lib was created as a wrapper around Day.js, due to following limitations:

  • Day.js doesn't provide all features that we need without plugins. This creates an "import problem": you cannot just import dayjs, you need to import it from a place that had plugins properly installed and initialized. It immediately creates an "import ambiguity": should I import from dayjs or from my_code/dayjs.ts?
  • Day.js is created as CommonJS module, all plugins has to be explicitly required. There are issues around TypeScript esModuleInterop. Result of it is that we needed to completely fork Day.js types and put it into time-lib.
  • There are more/deeper ESM issues when it's used in ESM context (e.g with Vite).

Next level of reasoning is that we needed our own opinionated API that would use standards that we use, for example:

  • We always use classic Unixtime (in seconds, not milliseconds)
  • We always use classic ISO8601 date without timezone, e.g 1984-06-21

Just the second/millisecond confusion can create serious bugs.

Mixup between similarly-called .toISOString and .toISODate can create very subtle bugs.

So, after multiple issues being accumulated and inability to properly fork Day.js, it was decided to try and simply rewrite Day.js functionality into LocalDate and LocalTime.

Reasons:

  • No milliseconds in the API (not needed)
  • Classic UnixTime, never "millisecond unixtime"
  • No timezone support/confusion, all dates/times are always treated as "local" (inspired by Java LocalDate/LocalDateTime)
  • Ability to parse "timezone-aware ISO8601 string", e.g 1984-06-21T17:15:02+02 into a LocalDate of just 1984-06-21 or LocalTime of 1984-06-21T17:15:02 (try achieving it with Moment.js or Day.js!)
  • .toJSON automatically formats LocalTime as unixtimestamp, LocalDate as ISO8601 date-only string
  • Prevents dayjs(undefined) being dayjs.now()
  • Strict parsing/validation by default. Will validate all input upon creation and will throw parse error on any invalid input. We believe it allows to catch errors sooner.
  • Optimized for performance and code maintenance, not on code size (as Day.js is, which results in its poorer performance in certain cases, and/or in less code maintainability)
  • No arbitrary .format by design. List of well-known format outputs instead.
  • Separate LocalDate class for simplified (and more performant) dealing with "just Dates without time information". Similar to Java's LocalDate. It allows much more simple and robust implementation, compared to dealing with js Date object intricacies (mostly around timezones).

API

API is designed to be closely (but not 100%) compatible with Day.js/Moment.js.

Examples:

day.js (via time-lib)LocalTimeLocalDate
nowdayjs()localTime.now()
todaydayjs().startOf('day')localDate.today()
create from unixtimestampdayjs.unix(ts)localTime(ts)
parse from ISO8601 date stringdayjs(str)localDate(str)
parse from ISO8601 date+time stringdayjs(str)localTime(str)
now plus 1 hourdayjs().add(1, 'hour')localTime().plus(1, 'hour')
today plus 1 daydayjs().startOf('day').add(1, 'day')localDate().plus(1, 'day')
toISODate (just date)dayjs().toISODate()localTime().toISODate()localDate().toISODate()
toISODate with timedayjs().format()localTime().toISODateTime()
diff in daysdayjs().diff(other, 'day')localTime().diff(other, 'day')localDate().diff(other, 'day')
to unixtimestampdayjs().unix()localTime().unix()localDate().unix()
isBeforedayjs().isBefore(other)localTime().isBefore(other)localDate().isBefore(other)

As you can see above - API is kept very similar.

DateInterval

Useful to describe an interval of Dates, e.g [inclusive] interval between 1984-06-21 and 1984-07-11 can be described as 1984-06-21/1984-07-11 (as per ISO8601).

.toJSON automatically stringifies DateInterval into a string.

Create DateInterval: DateInterval.parse('1984-06-21/1984-07-11') or DateInterval.of('1984-06-21', '1984-07-11').

',22),r=[i];function l(s,n,c,m,u,p){return a(),e("div",null,r)}const f=t(d,[["render",l]]);export{y as __pageData,f as default}; diff --git a/assets/date.md.CyXixeqG.lean.js b/assets/date.md.CyXixeqG.lean.js new file mode 100644 index 00000000..8b541895 --- /dev/null +++ b/assets/date.md.CyXixeqG.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as a,a1 as o}from"./chunks/framework.DXq9tg-I.js";const y=JSON.parse('{"title":"LocalDate, LocalTime","description":"","frontmatter":{},"headers":[],"relativePath":"date.md","filePath":"date.md"}'),d={name:"date.md"},i=o("",22),r=[i];function l(s,n,c,m,u,p){return a(),e("div",null,r)}const f=t(d,[["render",l]]);export{y as __pageData,f as default}; diff --git a/assets/decorators.md.C_BRlZ2W.js b/assets/decorators.md.C_BRlZ2W.js new file mode 100644 index 00000000..b3e4169c --- /dev/null +++ b/assets/decorators.md.C_BRlZ2W.js @@ -0,0 +1,57 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const g=JSON.parse('{"title":"Decorators","description":"","frontmatter":{},"headers":[],"relativePath":"decorators.md","filePath":"decorators.md"}'),t={name:"decorators.md"},e=n(`

Decorators

@_Debounce

Wrapper around _debounce.

@_Throttle

Wrapper around _throttle.

@_LogMethod

Allows to Log every execution of the method.

Console-logs when method had started, when it finished, time taken and if error happened.

Supports both sync and async methods.

Awaits if method returns a Promise.

Example output:

>> syncMethodSuccess()
+<< syncMethodSuccess() took 124 ms
+
+>> asyncMethod()
+<< asyncMethodThrow() took 10 ms ERROR: MyError
ts
class C {
+  @_LogMethod()
+  async hello() { ... }
+}

@_Memo

Powerful Memoization decorator.

Simplest usage:

ts
class C {
+  @_Memo()
+  async init() { ... }
+}
+
+await c.init() // first time will run the initialization
+
+await c.init() // second time it'll skip it
+// Allows "max 1 execution" pattern

Memoization caches values for each unique set of input parameters. So, e.g, if you want to hit a somewhat slow/expensive endpoint, you may want to cache it in memory like this:

ts
class C {
+  @_Memo()
+  async getExchangeRates(day: string) { ... }
+}
+
+// First time will hit the endpoint
+await c.getExchangeRates('2021-06-21')
+
+// Second time will immediately return cached result, cause the input is the same
+await c.getExchangeRates('2021-06-21')
+
+// Input has changed, so it's a cache-miss, will hit the endpoint
+await c.getExchangeRates('2021-06-22')

Pay attention that the cache of the returned values is kept forever, so, be mindful of possible memory leaks.

nodejs-lib (link pending) has a LRUMemoCache class that impements LRU cache. Example:

ts
@_Memo({ cacheFactory: () => new LRUMemoCache({...}) })
+async someMethod() {}

@_Retry

Wrapper around pRetry.

@_Timeout

Decoratod method will throw TimeoutError if it hasn't finished in given time.

Wrapper around pTimeout.

ts
class C {
+  @_Timeout({ timeout: 1000 })
+  async hello() {
+    // some logic
+  }
+}
+
+const c = new C()
+await c.hello()
+// will throw if not finished in 1000 ms

@_TryCatch

Wraps the method into a try/catch block, console.error(err) on error, but never re-throws (always suppresses the error).

ts
class C {
+  @_TryCatch() // fine if it fails
+  async logSomeAnalytics() {}
+}

Wrapper around _tryCatch function.

_createPromiseDecorator

Powerful helper to create your own Decorators around async (Promise-returning) methods.

Example of a @TryCatch decorator that will wrap a method with "try/catch", console.error the error and suppress it (by returning undefined in case of any error).

Example usage:

ts
class C {
+  @TryCatch() // fine if it fails
+  async logSomeAnalytics() {}
+}

Example implementation of such a decorator using _createPromiseDecorator:

ts
export const TryCatch = () =>
+  _createPromiseDecorator({
+    decoratorName: 'TryCatch',
+    catchFn: ({ err, target, key }) => {
+      console.error(err)
+      return undefined
+    },
+  })

_createPromiseDecorator allows you to define your "hooks" on different stages of a Promise:

  • beforeFn: before the method execution
  • thenFn: after successful method execution
  • catchFn: after method throws (returns rejected Promise)
  • finallyFn: after method returns resolved or rejected Promise (useful to e.g "hide the blocking loader")

Example of a @BlockingLoader decorator, that wraps the method, shows the BlockingLoader before the method execution and hides it in the end of the execution (regardless if it errored or succeeded):

ts
export const BlockingLoader = () =>
+  _createPromiseDecorator({
+    decoratorName: 'BlockingLoader',
+    beforeFn: () => store.commit('setBlockingLoader'),
+    catchFn: ({ err }) => errorDialog(err),
+    finallyFn: () => store.commit('setBlockingLoader', false),
+  })
`,43),h=[e];function l(p,k,r,d,o,E){return a(),i("div",null,h)}const y=s(t,[["render",l]]);export{g as __pageData,y as default}; diff --git a/assets/decorators.md.C_BRlZ2W.lean.js b/assets/decorators.md.C_BRlZ2W.lean.js new file mode 100644 index 00000000..c6110cfd --- /dev/null +++ b/assets/decorators.md.C_BRlZ2W.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const g=JSON.parse('{"title":"Decorators","description":"","frontmatter":{},"headers":[],"relativePath":"decorators.md","filePath":"decorators.md"}'),t={name:"decorators.md"},e=n("",43),h=[e];function l(p,k,r,d,o,E){return a(),i("div",null,h)}const y=s(t,[["render",l]]);export{g as __pageData,y as default}; diff --git a/assets/error.md.UwDoayCX.js b/assets/error.md.UwDoayCX.js new file mode 100644 index 00000000..02acf587 --- /dev/null +++ b/assets/error.md.UwDoayCX.js @@ -0,0 +1,28 @@ +import{_ as s,c as a,o as e,a1 as i}from"./chunks/framework.DXq9tg-I.js";const u=JSON.parse('{"title":"Error","description":"","frontmatter":{},"headers":[],"relativePath":"error.md","filePath":"error.md"}'),t={name:"error.md"},r=i(`

Error

_tryCatch

Wraps/decorates a passed function with "try/catch", so it never throws, but logs the error (if occured).

ts
const someDangerousFunction = () => { ... }
+
+const fn = _tryCatch(someDangerousFunction)
+
+fn()
+// will log on error, but never throw

Allows to pass onError() function hook, that will be called on error.

ErrorObject

Standartized "Error object" that contains arbitrary data object that can hold additional data.

This data object is defined as a Generic type to ErrorObject, so, e.g. HttpError has HttpErrorData, which has a mandatory httpStatusCode: number property.

Usage example of that:

ts
.catch((err: HttpErrorObject) => {
+  console.log(err.data.httpStatusCode)
+})

AppError

The most basic implementation of an Error that complies with ErrorObject specification. Difference is that ErrorObject is purely a TypeScript interface (around any JS object), but AppError is a sub-class of Error. So, with AppError you can do if (err instanceof AppError) ....

Because AppError implements ErrorObject, it guarantees an err.data object.

This basic contract allows to establish a standartized interface between the Frontend (in frontend-lib) and Backend (in backend-lib) and implement error-handling more efficiently.

HttpError

Subclass of AppError that has some additional properties inside data, namely: httpStatusCode: number.

HttpErrorResponse

This is a standartized "Error response from the Backend" (as implemented in backend-lib). You can check/assert it with _isHttpErrorResponse, and then have all the guarantees and types about the containing error object.

Handling these type of errors is done "automatically" in getKy of the frontend-lib, and in getGot of the backend-lib.

_anyToError

Cast any to Error.

_errorToErrorObject

Cast Error to ErrorObject.

_isHttpErrorResponse

Assert if provided value: any is a HttpErrorResponse.

_isHttpErrorObject

Assert if provided value: any is a HttpErrorObject (an HttpError, same as AppError<HttpErrorData>).

_isErrorObject

Assert if provided value: any is an ErrorObject.

_assert

Asserts that a boolean condition is truthy, otherwise throws an Error.

Evaluates the condition (casts it to Boolean). Expects it to be truthy, otherwise throws AppError.

Should be used NOT for "expected" / user-facing errors, but vice-versa - for completely unexpected and 100% buggy "should never happen" cases.

It'll result in http 500 on the server (cause that's the right code for "unexpected" errors). Pass { httpStatusCode: x } at errorData argument to override the http code (will be picked up by backend-lib).

API is similar to Node's assert(), except:

  1. Throws js-lib's AppError
  2. Has a default message, if not provided
  3. Sets userFriendly flag to true, cause it's always better to have at least SOME clue, rather than fully generic "Oops" error.
ts
function run(err: any) {
+  _assert(err instanceof AppError)
+  // from here TypeScript will know that \`err instanceof AppError === true\`, or \`err: AppError\`
+
+  // Example with custom error message:
+  _assert(err instanceof AppError, 'error should be of type AppError')
+}

_assertEquals

Similar to _assert, but allows to provide 2 values (first 2 arguments) and throws if they are NOT equal.

Does a shallow equality check (!==), use _assertDeepEquals if you need a deep-check.

_assertDeepEquals

Similar to _assertEquals, but does a deep assertion (using _deepEquals).

_assertIsError

Asserts that passed value is instanceof Error.

_assertsIsTypeOf

Asserts that typeof value matches expected type.

_assertsIsString

Asserts that typeof value === 'string

_assertsIsNumber

Asserts that typeof value === 'number

_try

Calls a function, returns a Tuple of [error, value]. Allows to write shorter code that avoids try/catch. Useful e.g. in unit tests.

Similar to pTry, but for sync functions.

ts
const [err, v] = _try(() => someFunction())

pTry

Loosely inspired by await-to-js.

Similar to _try, but for promises.

Async/await wrapper for easy error handling. Wraps async/await calls in try catch blocks and returns a tuple containing the error or the results of the promise

ts
interface ServerResponse {
+  test: number
+}
+
+interface CustomError {
+  code: number
+  data: {
+    title: string
+    body: string
+  }
+}
+
+const p = Promise.resolve({ test: 123 })
+
+const [err, result] = await pTuple<ServerResponse, CustomError>(p)
`,59),n=[r];function h(o,p,l,d,k,c){return e(),a("div",null,n)}const y=s(t,[["render",h]]);export{u as __pageData,y as default}; diff --git a/assets/error.md.UwDoayCX.lean.js b/assets/error.md.UwDoayCX.lean.js new file mode 100644 index 00000000..bb1124e1 --- /dev/null +++ b/assets/error.md.UwDoayCX.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,a1 as i}from"./chunks/framework.DXq9tg-I.js";const u=JSON.parse('{"title":"Error","description":"","frontmatter":{},"headers":[],"relativePath":"error.md","filePath":"error.md"}'),t={name:"error.md"},r=i("",59),n=[r];function h(o,p,l,d,k,c){return e(),a("div",null,n)}const y=s(t,[["render",h]]);export{u as __pageData,y as default}; diff --git a/assets/fetcher.md.DgXAupJQ.js b/assets/fetcher.md.DgXAupJQ.js new file mode 100644 index 00000000..d55aa800 --- /dev/null +++ b/assets/fetcher.md.DgXAupJQ.js @@ -0,0 +1,25 @@ +import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.DXq9tg-I.js";const g=JSON.parse('{"title":"Fetcher","description":"","frontmatter":{},"headers":[],"relativePath":"fetcher.md","filePath":"fetcher.md"}'),t={name:"fetcher.md"},n=e(`

Fetcher

Convenient wrapper around fetch.

Features

  • Works in the Browser and on the Server (Node.js)
  • Convenient API, e.g fetcher.get(), fetcher.post(), etc.
  • Throws HttpError automatically, no need to check if (res.ok)
  • Allows to set timeout
  • Conveniently retries on retry-able errors
  • Allows to conveniently log requests/responses, configurable
  • Allows to convert searchParams object into a query string
  • Allows to define beforeRequest/beforeRetry/afterResponse hooks

Comparison

Fetcher:

tsx
const fetcher = getFetcher()
+
+const result = await fetcher.post('https://example.com', {
+  json: { foo: true },
+})

Ky:

tsx
const result = await ky
+  .post('https://example.com/hello', {
+    json: { foo: true },
+  })
+  .json()

Plain fetch:

tsx
class HTTPError extends Error {}
+
+const response = await fetch('https://example.com', {
+  method: 'POST',
+  body: JSON.stringify({ foo: true }),
+  headers: {
+    'content-type': 'application/json',
+  },
+})
+
+if (!response.ok) {
+  throw new HTTPError(\`Fetch error: \${response.statusText}\`)
+}
+
+const json = await response.json()
+
+console.log(json)

Prior art

Heavily inspired by:

Why

Differences from prior projects:

  • Targets both Browser and Node by design, targeting Node with native fetch support. This is similar to ky plus ky-universal.
  • Incorporates everything from getKy and getGot, so you don’t need multiple layers. For example, with ky you would need: ky, ky-for-people, getKy (frontend-lib). With fetcher you need only fetcher (part of js-lib).

Goals

  • Simplicity. It focuses on the most simple and common use cases, and not on the most advanced or edge cases.
  • Assume native fetch support (Browser and Node), no polyfills. Should work equally well in Browser and Node, ideally without platform-specific quirks.
  • Written in TypeScript, with first-class TypeScript support.
`,19),l=[n];function h(r,p,k,o,d,c){return a(),i("div",null,l)}const y=s(t,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/fetcher.md.DgXAupJQ.lean.js b/assets/fetcher.md.DgXAupJQ.lean.js new file mode 100644 index 00000000..3e543b13 --- /dev/null +++ b/assets/fetcher.md.DgXAupJQ.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.DXq9tg-I.js";const g=JSON.parse('{"title":"Fetcher","description":"","frontmatter":{},"headers":[],"relativePath":"fetcher.md","filePath":"fetcher.md"}'),t={name:"fetcher.md"},n=e("",19),l=[n];function h(r,p,k,o,d,c){return a(),i("div",null,l)}const y=s(t,[["render",h]]);export{g as __pageData,y as default}; diff --git a/assets/httpRequestError.md.IST45OMn.js b/assets/httpRequestError.md.IST45OMn.js new file mode 100644 index 00000000..b45e1814 --- /dev/null +++ b/assets/httpRequestError.md.IST45OMn.js @@ -0,0 +1,22 @@ +import{_ as s,c as a,o as n,a1 as e}from"./chunks/framework.DXq9tg-I.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"httpRequestError.md","filePath":"httpRequestError.md"}'),p={name:"httpRequestError.md"},t=e(`
Backend makes a Fetch call to some API
+API returns error1 with 500 and a message1
+Fetcher wraps error1 with error2 which is a FetcherError
+method
+url
+baseUrl?
+statusCode
+millis
+message: 500 GET /someUrl
+causedBy error1
+
+genericErrorHandler needs to return error2
+it wraps error2 (FetchError) with error3: HttpError
+Maybe there's just no need to do that wrapping?! Return ErrorObject as is
+Requester (Fetcher) would always know httpStatusCode of the error they just received
+
+Why is HttpError needed?
+For the Backend to set the right httpStatusCode
+Maybe it's enough to just have it as AppError with httpStatusCode?
+
+Rename HttpError to HttpRequestError, which is the same as FetchError
+HttpErrorResponse becomes BackendErrorResponseObject (detected by name and message)
`,1),r=[t];function o(l,c,i,h,d,u){return n(),a("div",null,r)}const E=s(p,[["render",o]]);export{m as __pageData,E as default}; diff --git a/assets/httpRequestError.md.IST45OMn.lean.js b/assets/httpRequestError.md.IST45OMn.lean.js new file mode 100644 index 00000000..12f91718 --- /dev/null +++ b/assets/httpRequestError.md.IST45OMn.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as n,a1 as e}from"./chunks/framework.DXq9tg-I.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"httpRequestError.md","filePath":"httpRequestError.md"}'),p={name:"httpRequestError.md"},t=e("",1),r=[t];function o(l,c,i,h,d,u){return n(),a("div",null,r)}const E=s(p,[["render",o]]);export{m as __pageData,E as default}; diff --git a/assets/index.md.DhRJbceH.js b/assets/index.md.DhRJbceH.js new file mode 100644 index 00000000..6170d1a4 --- /dev/null +++ b/assets/index.md.DhRJbceH.js @@ -0,0 +1,9 @@ +import{_ as e,c as s,o as a,a1 as i}from"./chunks/framework.DXq9tg-I.js";const k=JSON.parse('{"title":"js-lib","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),t={name:"index.md"},o=i(`

js-lib

Standard library for universal (browser + Node.js) javascript

npmmin.gz sizeActionsloc

MaintainabilityTest Coveragecode style: prettier

Design

Inspired by Lodash, bluebird, promise-fun and other useful small packages.

Designed to play well with the rest of opinionated "Natural Cycles JS Platform" (link pending). This package is the lowest-level production dependency (not devDependency) of the Platform. Almost everything else depends on it.

All functions in this package are exported in index.ts (flat), no namespacing is used. So, to avoid conflicts and "global import namespace" pollution , all functions are prefixed with an underscore (e.g _.pick becomes _pick), with some exceptions (later). Promise functions are prefixed with p, e.g pMap.

Decorators are _prefixed and PascalCased (e.g @_Debounce). _is to be consistent with other naming in this package. PascalCase is to distinguish decorators from similar functions that are not decorators. Example:\\_debounceis a function (lodash-based),\\_Debounceis a decorator (used as@\\_Debounce). PascalCase convention follows Angular/Ionic convention (but doesn't follow TypeScript documentation convention; we had to pick one).

Interfaces and Classes are named as usual (no prefix, PascalCase, e.g AppError).

Q: Why not just use lodash?

A:

  • We believe Lodash is outdated (many functions are pre-ES6 / obsolete by ES6).
  • Because it has so many outdated functions - its size is bigger, and solutions to tree-shake exist, but complicated.
  • First-class TypeScript support (all code in this repo is TypeScript).

This package is intended to be 0-dependency (exception: tslib from TypeScript), "not bloated", tree-shakeable. Supported by reasonably modern Browsers and Node.js latest LTS.

To fulfil that requirement it exports ESM version (for Browsers) as es2017.

Exports default CJS version for Node as es2019 (with native async/await, for better performance, async stack-traces, etc).

Mutation

All function does NOT mutate the arguments by default.

Many functions support "mutation flag", which can be set to true to perform a mutation.

For example:

ts
const obj = { a: 'a', b: 'b' }
+
+// Non-mutating (default)
+const obj2 = _pick(obj, ['a'])
+// { a: 'a' }
+
+// Mutating (opt-in)
+_pick(obj, ['a'], true)
+// obj was mutated

Highlights

Packaging

  • engines.node >= Node.js LTS
  • main: dist/index.js: commonjs, es2021 - targeting Node.js
  • module: dist-esm/index.js: esm, es2017 - targeting Browsers
  • types: dist/index.d.ts: typescript types
  • /src folder with source *.ts files included
`,25),n=[o];function l(r,d,c,p,h,g){return a(),s("div",null,n)}const b=e(t,[["render",l]]);export{k as __pageData,b as default}; diff --git a/assets/index.md.DhRJbceH.lean.js b/assets/index.md.DhRJbceH.lean.js new file mode 100644 index 00000000..8bc60f1c --- /dev/null +++ b/assets/index.md.DhRJbceH.lean.js @@ -0,0 +1 @@ +import{_ as e,c as s,o as a,a1 as i}from"./chunks/framework.DXq9tg-I.js";const k=JSON.parse('{"title":"js-lib","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),t={name:"index.md"},o=i("",25),n=[o];function l(r,d,c,p,h,g){return a(),s("div",null,n)}const b=e(t,[["render",l]]);export{k as __pageData,b as default}; diff --git a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 new file mode 100644 index 00000000..b6b603d5 Binary files /dev/null and b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ diff --git a/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/assets/inter-italic-cyrillic.By2_1cv3.woff2 new file mode 100644 index 00000000..def40a4f Binary files /dev/null and b/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ diff --git a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 new file mode 100644 index 00000000..e070c3d3 Binary files /dev/null and b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ diff --git a/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/assets/inter-italic-greek.DJ8dCoTZ.woff2 new file mode 100644 index 00000000..a3c16ca4 Binary files /dev/null and b/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ diff --git a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 new file mode 100644 index 00000000..2210a899 Binary files /dev/null and b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ diff --git a/assets/inter-italic-latin.C2AdPX0b.woff2 b/assets/inter-italic-latin.C2AdPX0b.woff2 new file mode 100644 index 00000000..790d62dc Binary files /dev/null and b/assets/inter-italic-latin.C2AdPX0b.woff2 differ diff --git a/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/assets/inter-italic-vietnamese.BSbpV94h.woff2 new file mode 100644 index 00000000..1eec0775 Binary files /dev/null and b/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ diff --git a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 new file mode 100644 index 00000000..2cfe6153 Binary files /dev/null and b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ diff --git a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 new file mode 100644 index 00000000..e3886dd1 Binary files /dev/null and b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ diff --git a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 new file mode 100644 index 00000000..36d67487 Binary files /dev/null and b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ diff --git a/assets/inter-roman-greek.BBVDIX6e.woff2 b/assets/inter-roman-greek.BBVDIX6e.woff2 new file mode 100644 index 00000000..2bed1e85 Binary files /dev/null and b/assets/inter-roman-greek.BBVDIX6e.woff2 differ diff --git a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 new file mode 100644 index 00000000..9a8d1e2b Binary files /dev/null and b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ diff --git a/assets/inter-roman-latin.Di8DUHzh.woff2 b/assets/inter-roman-latin.Di8DUHzh.woff2 new file mode 100644 index 00000000..07d3c53a Binary files /dev/null and b/assets/inter-roman-latin.Di8DUHzh.woff2 differ diff --git a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 new file mode 100644 index 00000000..57bdc22a Binary files /dev/null and b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ diff --git a/assets/json.md.DDfXsvnq.js b/assets/json.md.DDfXsvnq.js new file mode 100644 index 00000000..132ef51b --- /dev/null +++ b/assets/json.md.DDfXsvnq.js @@ -0,0 +1,21 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const y=JSON.parse('{"title":"Json","description":"","frontmatter":{},"headers":[],"relativePath":"json.md","filePath":"json.md"}'),t={name:"json.md"},h=n(`

Json

_jsonParseIfPossible

Attempts to parse object as JSON.

Returns original object if JSON parse failed (silently).

ts
_jsonParseIfPossible('abc') // 'abc' (no change, not a json string)
+_jsonParseIfPossible(null) // null (no change)
+_jsonParseIfPossible({ a: 'a' }) // {a: 'a'} (same object, not a json string)
+_jsonParseIfPossible('{"a": "a"}') // {a: 'a'} gotcha! parsed json string into an object!

_stringify

Inspired by _inspect from nodejs-lib, which is based on util.inpect that is not available in the Browser.

Transforms any to human-readable string (via JSON.stringify pretty).

Safe (no error throwing).

Correclty prints Error, AppError, ErrorObject: error.message + '\\n' + _stringify(error.data)

Enforces max length (default to 1000, pass 0 to skip it).

Logs numbers as-is (as a String), e.g: 6.

Logs strings as-is (without single quotes around, unlike default util.inspect behavior).

Otherwise - just uses JSON.stringify.

Returns empty_string string if empty string is passed.

Returns undefined (not a string, but actual undefined) if undefined is passed (default util.inspect behavior).

ts
_stringify(undefined) // 'undefined'
+_stringify(null) // 'null'
+_stringify(true) // 'true'
+_stringify(false) // 'false'
+_stringify(NaN) // 'null'
+_stringify(Infinity) // 'null'
+_stringify('') // 'empty_string'
+_stringify(' ') // 'empty_string'
+_stringify('ho ho ho') // 'ho ho ho'
+_stringify(15) // '15'
+_stringify(new Error('some msg')) // 'Error: some msg'
+
+// AppError is stringified with it's Data object
+_stringify(new AppError('some msg', { k1: 'v1' }))
+// 'AppError: some msg\\n
+// {
+//   "k1": "v1"
+// }'
`,17),e=[h];function p(l,k,r,d,o,E){return a(),i("div",null,e)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/json.md.DDfXsvnq.lean.js b/assets/json.md.DDfXsvnq.lean.js new file mode 100644 index 00000000..37710f66 --- /dev/null +++ b/assets/json.md.DDfXsvnq.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const y=JSON.parse('{"title":"Json","description":"","frontmatter":{},"headers":[],"relativePath":"json.md","filePath":"json.md"}'),t={name:"json.md"},h=n("",17),e=[h];function p(l,k,r,d,o,E){return a(),i("div",null,e)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/lazy.md.LH9W2JEo.js b/assets/lazy.md.LH9W2JEo.js new file mode 100644 index 00000000..26a61ea1 --- /dev/null +++ b/assets/lazy.md.LH9W2JEo.js @@ -0,0 +1,14 @@ +import{_ as s,c as a,o as i,a1 as e}from"./chunks/framework.DXq9tg-I.js";const g=JSON.parse('{"title":"Lazy","description":"","frontmatter":{},"headers":[],"relativePath":"lazy.md","filePath":"lazy.md"}'),n={name:"lazy.md"},t=e(`

Lazy

_lazyValue

Based on: https://github.com/sindresorhus/lazy-value

ts
const value = _lazyValue(() => expensiveComputation())
+
+value() // calls expensiveComputation() once
+value() // returns cached result
+value() // returns cached result

_defineLazyProperty

Based on: https://github.com/sindresorhus/define-lazy-prop

ts
interface Obj {
+  v: number
+}
+
+const obj = {} as Obj
+
+_defineLazyProperty(obj, 'v', () => expensiveComputation())
+obj.v // runs expensiveComputation() once
+obj.v // cached value
+obj.v // cached value

_defineLazyProps

Like _defineLazyProperty, but allows to define multiple props at once.

`,9),l=[t];function h(p,k,r,d,o,y){return i(),a("div",null,l)}const E=s(n,[["render",h]]);export{g as __pageData,E as default}; diff --git a/assets/lazy.md.LH9W2JEo.lean.js b/assets/lazy.md.LH9W2JEo.lean.js new file mode 100644 index 00000000..09801649 --- /dev/null +++ b/assets/lazy.md.LH9W2JEo.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as i,a1 as e}from"./chunks/framework.DXq9tg-I.js";const g=JSON.parse('{"title":"Lazy","description":"","frontmatter":{},"headers":[],"relativePath":"lazy.md","filePath":"lazy.md"}'),n={name:"lazy.md"},t=e("",9),l=[t];function h(p,k,r,d,o,y){return i(),a("div",null,l)}const E=s(n,[["render",h]]);export{g as __pageData,E as default}; diff --git a/assets/math.md.jsvo53uX.js b/assets/math.md.jsvo53uX.js new file mode 100644 index 00000000..bba06cb0 --- /dev/null +++ b/assets/math.md.jsvo53uX.js @@ -0,0 +1,40 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"Math","description":"","frontmatter":{},"headers":[],"relativePath":"math.md","filePath":"math.md"}'),h={name:"math.md"},t=n(`

Math

_randomInt

Returns a random integer in the provided range. As usual, lower-bound is inclusing, while higher-bound is exclusive. Unusually, both lower and higher bounds are inclusive.

ts
_randomInt(1, 3)
+// 1
+// 3
+// 2

_randomArrayItem

Returns a random item from the given array.

Don't use it on empty array. It'll return undefined in that case, but that is not reflected in function's output type!

ts
const a = [1, 2, 3]
+_randomArrayItem(a)
+// random of 1, 2 or 3

_createDeterministicRandom

Returns a "deterministic Math.random() function".

Useful to make tests that need to use Math.random() deterministic.

ts
const deterministicRandom = _createDeterministicRandom()
+
+deterministicRandom()
+// => 0.9872818551957607
+
+deterministicRandom()
+// => 0.34880331158638

Based on this gist which is based on Robert Jenkins’ 32 bit integer hash function.

_average

Calculate an average of the array of numbers.

ts
_average([1, 2, 3, 4])
+// 2.5

_averageWeighted

Calculate a "weighted average", given the array of numbers and corresponding array of weights.

ts
const numbers = [1, 2]
+const weights = [3, 1]
+_averageWeighted(numbers, weights)
+// 1.25

_median

Calculate a Median of the array of numbers.

ts
_median([1, 2, 3]) // 2
+_median([1, 2, 3, 4]) // 2.5
+_median([1, 1, 1, 3, 999]) // 1

_percentile

Calculate a Percentile of the array of numbers.

ts
const numbers = [1200, 1400]
+_percentile(numbers, 0) // 1200
+_percentile(numbers, 10) // 1220
+_percentile(numbers, 20) // 1240
+_percentile(numbers, 30) // 1260
+_percentile(numbers, 40) // 1280
+_percentile(numbers, 50) // 1300
+_percentile(numbers, 60) // 1320
+_percentile(numbers, 70) // 1340
+_percentile(numbers, 80) // 1360
+_percentile(numbers, 90) // 1380
+_percentile(numbers, 100) // 1400

SimpleMovingAverage

ts
// SMA with the size of 2:
+const sma = new SimpleMovingAverage(2)
+sma.avg // 0 by default, when no numbers were pushed
+
+sma.push(1) // [1]
+sma.avg // 1
+
+sma.push(2) // [1, 2]
+sma.avg // 1.5
+
+sma.push(3) // [1, 2, 3]
+sma.avg // 2.5
`,27),e=[t];function l(k,p,r,d,E,g){return a(),i("div",null,e)}const o=s(h,[["render",l]]);export{c as __pageData,o as default}; diff --git a/assets/math.md.jsvo53uX.lean.js b/assets/math.md.jsvo53uX.lean.js new file mode 100644 index 00000000..e8299d67 --- /dev/null +++ b/assets/math.md.jsvo53uX.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"Math","description":"","frontmatter":{},"headers":[],"relativePath":"math.md","filePath":"math.md"}'),h={name:"math.md"},t=n("",27),e=[t];function l(k,p,r,d,E,g){return a(),i("div",null,e)}const o=s(h,[["render",l]]);export{c as __pageData,o as default}; diff --git a/assets/number.md.C9Shc39b.js b/assets/number.md.C9Shc39b.js new file mode 100644 index 00000000..d4ea5183 --- /dev/null +++ b/assets/number.md.C9Shc39b.js @@ -0,0 +1,36 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const F=JSON.parse('{"title":"Number","description":"","frontmatter":{},"headers":[],"relativePath":"number.md","filePath":"number.md"}'),h={name:"number.md"},k=n(`

Number

_inRange

Checks if the provided number (1st argument) is withing range of 2nd and 3rd argument. As usual, lower-bound is inclusive, while higher-boung is exclusive.

ts
_inRange(-10, 1, 5)
+// false
+
+_inRange(1, 1, 5)
+// true
+
+_inRange(3, 1, 5)
+// true
+
+_inRange(5, 1, 5)
+// false
+
+_inRange(7, 1, 5)
+// false

_clamp

Inspired by Lodash's _clamp.

"Clamps" (fits) the number (first argument) within the min/max ranges of 2nd/3rd arguments (range inclusive).

ts
// range is always [5, 10] in these cases
+_clamp(3, 5, 10) // 5
+_clamp(4, 5, 10) // 5
+_clamp(5, 5, 10) // 5
+_clamp(6, 5, 10) // 6
+_clamp(9, 5, 10) // 9
+_clamp(10, 5, 10) // 10
+_clamp(11, 5, 10) // 10

_toFixed

Same as Number.toFixed, but conveniently casts the output to Number.

ts
_toFixed(1.2345, 2)
+// 1.23
+
+_toFixed(1.1, 2)
+// 1.1
+// not '1.10' !

_toPrecision

Same as Number.toPrecision(), but conveniently casts the output to Number.

ts
_toPrecision(1634.56, 1)
+// 2000
+
+_toPrecision(1234.56, 2)
+// 1600

_round

Round (like Math.round) the Number to the nearest "discriminator" (2nd argument):

ts
_round(1634, 1000) // 2000
+_round(1634, 500) // 1500
+_round(1634, 100) // 1600
+_round(1634, 10) // 1630
+_round(1634, 1) // 1634
+_round(1634.5678, 0.1) // 1634.6
+_round(1634.5678, 0.01) // 1634.57
`,17),t=[k];function l(p,e,E,r,d,g){return a(),i("div",null,t)}const C=s(h,[["render",l]]);export{F as __pageData,C as default}; diff --git a/assets/number.md.C9Shc39b.lean.js b/assets/number.md.C9Shc39b.lean.js new file mode 100644 index 00000000..95b31cfa --- /dev/null +++ b/assets/number.md.C9Shc39b.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const F=JSON.parse('{"title":"Number","description":"","frontmatter":{},"headers":[],"relativePath":"number.md","filePath":"number.md"}'),h={name:"number.md"},k=n("",17),t=[k];function l(p,e,E,r,d,g){return a(),i("div",null,t)}const C=s(h,[["render",l]]);export{F as __pageData,C as default}; diff --git a/assets/object.md.DhcjNafr.js b/assets/object.md.DhcjNafr.js new file mode 100644 index 00000000..275480a4 --- /dev/null +++ b/assets/object.md.DhcjNafr.js @@ -0,0 +1,281 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"Object","description":"","frontmatter":{},"headers":[],"relativePath":"object.md","filePath":"object.md"}'),h={name:"object.md"},l=n(`

Object

_pick

Inspired by Lodash's _.pick.

ts
_pick({ a: 'a', b: 'b', c: 'c' }, ['a', 'b'])
+// { a: 'a', b: 'b' }
+
+_pick({ a: 'a', b: 'b', c: 'c' }, ['a'])
+// { a: 'a' }
+
+_pick({ a: 'a', b: 'b', c: 'c' }, ['d'])
+// {}
+
+_pick({ a: 'a', b: 'b', c: 'c' }, [])
+// {}
+
+// Supports "mutation flag" which would mutate the object and return it (same object):
+const obj = { a: 'a', b: 'b', c: 'c' }
+const obj2 = _pick(obj, ['a'], true)
+obj === obj2 // true

_omit

Inspired by Lodash's _.omit. The opposite of _pick.

ts
_omit({ a: 'a', b: 'b', c: 'c' }, ['a', 'b'])
+// { c: 'c' }
+
+_omit({ a: 'a', b: 'b', c: 'c' }, ['a'])
+// {  b: 'b', c: 'c' }
+
+_omit({ a: 'a', b: 'b', c: 'c' }, ['d'])
+// { a: 'a', b: 'b', c: 'c' }
+
+_omit({ a: 'a', b: 'b', c: 'c' }, [])
+// { a: 'a', b: 'b', c: 'c' }
+
+// Supports "mutation flag" which would mutate the object and return it (same object):
+const obj = { a: 'a', b: 'b', c: 'c' }
+const obj2 = _omit(obj, ['a', 'b'], true)
+obj === obj2 // true

_mask

Similar to _omit, but supports deep object access via dot-notation (a.b). Supports "mutation flag" argument.

ts
const obj = {
+  a: 'a',
+  b: {
+    b1: 'b1',
+    b2: 'b2',
+  },
+}
+
+_mask(obj, ['b.b1'])
+// { a: 'a', b: { b1: 'b1' }}
+
+_mask(obj, ['b.b1'], true)
+// obj was mutated

_filterFalsyValues

Returns an object with all Falsy values filtered out. Non-mutating by default.

ts
_filterFalsyValues({
+  a: 'a',
+  b: '', // falsy
+  c: 0, // falsy
+  d: [], // not falsy
+})
+// { a: 'a', d: [] }

_filterNullishValues

Returns an object with all Nullish (null or undefined) values filtered out. Non-mutating by default.

ts
_filterNullishValues({
+  a: 'a',
+  b: null, // nullish
+  c: undefined, // nullish
+  d: '', // not nullish
+})
+// { a: 'a', d: '' }

_filterUndefinedValues

Returns an object with all undefined values filtered out. null values are kept.

Non-mutating by default.

ts
_filterUndefinedValues({
+  a: 'a',
+  b: null,
+  c: undefined, // removed
+  d: '',
+})
+// { a: 'a', b: null, d: '' }

_filterEmptyArrays

Returns an object will all empty arrays filtered out. Non-mutating by default.

ts
_filterEmptyArrays({
+  a: 'a',
+  b: [], // empty array
+  c: 'c',
+})
+// { a: 'a', c: 'c' }

_filterEmptyValues

Filters the object by removing all key-value pairs where Value is Empty (according to _isEmpty() specification).

ts
_filterEmptyValues({
+  a: 0,
+  b: '',
+  c: [],
+  d: {},
+  e: {
+    f: [],
+  },
+  g: new Set(),
+  h: 'h',
+})
+// {
+//   a: 0,
+//   e: {
+//     f: [],
+//   },
+//   h: 'h',
+//  })

_filterObject

Returns clone of obj without properties that does not pass predicate. Allows filtering by both key and value.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Predicate to keep only even-numbered values
+_filterObject(obj, (_k, v) => v % 2 === 0)
+// { b: 2 }
+
+// Predicate to only keep keys that start with \`a\`
+_filterObject(obj, (k, _v) => k.startsWith('a'))
+// { a: 1 }

_mapKeys

Returns a clone of obj with modified Keys, based on a Mapper function.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Mapper to add \`_odd\` or \`_even\` to the object key, based on its value
+_mapKeys(obj, (k, v) => k + (v % 2 ? '_odd' : '_even'))
+// { a_odd: 1, b_even: 2, c_odd: 3 }

_mapValues

Returns a clone of obj with modified Values, based on a Mapper function.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Mapper to multiply object values by 2
+_mapValues(obj, (_k, v) => v * 2)
+// { a: 2, b: 4, c: 6 }

_mapObject

Returns a clone of obj where both Keys and Values can be modified by a Mapper function. Mapper function needs to return a Tuple [key, value].

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Mapper to multiply object values by 2, and append the value to the end of the key
+_mapObject(obj, (k, v) => {
+  const newValue = v * 2
+  return [k + newValue, newValue]
+})
+// { a2: 2, b4: 4, c6: 6 }

_findKeyByValue

Fiven an object, find a key string for a given value: any.

Inspired by Lodash's _.findKey.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+_findKeyByValue(obj, 1) // 'a'
+_findKeyByValue(obj, 2) // 'b'
+_findKeyByValue(obj, 3) // 'c'
+_findKeyByValue(obj, 4) // undefined

_objectNullValuesToUndefined

Returns a clone of the object where null values are replaced with undefined

ts
const obj = {
+  a: 1, // intact
+  b: null, // replaced with \`undefined\`
+  c: undefined, // intact
+}
+
+_objectNullValuesToUndefined(obj)
+// { a: 1, b: undefined, c: undefined }

_deepCopy

Does a deep copy of an object.

Actually, it is just a semantic function that internally does JSON.parse(JSON.stringify(o)), which is currently the fastest+simplest+relyable way to do a deep copy.

Because it does JSON.parse/stringify - it'll remove undefined values/keys from objects.

ts
const obj = { a: 'a', b: { bb: 'bb' } }
+const obj2 = _deepCopy(obj)
+// Deep copy of obj

_isPrimitive

Returns Boolean indication if passed value is a primitive.

ts
_isPrimitive(5)
+// true
+
+_isPrimitive({ a: 'a' })
+// false

Best specification is the source code:

ts
export function _isPrimitive(v: any): v is null | undefined | number | boolean | string {
+  return (
+    v === null ||
+    v === undefined ||
+    typeof v === 'number' ||
+    typeof v === 'boolean' ||
+    typeof v === 'string'
+  )
+}

_isEmpty

Object is considered empty if it's one of:

  • undefined
  • '' (empty string)
  • [] (empty array)
  • {} (empty object)
  • new Map() (empty Map)
  • new Set() (empty Set)

_undefinedIfEmpty

Returns undefined if it's empty (according to _isEmpty() specification), otherwise returns the original object.

ts
_undefinedIfEmpty('') // undefined, because it's empty
+_undefinedIfEmpty([]) // undefined, because it's empty
+_undefinedIfEmpty(new Map()) // undefined, because it's empty
+_undefinedIfEmpty('a') // 'a', intact
+_undefinedIfEmpty(false) // false, intact

_merge

Deeply merges the second object into the first one. Returns the first object (merged). Mutates the first object!

ts
const obj1 = {
+  a: 'a',
+  b: {
+    bb1: 'bb1',
+  },
+}
+
+const obj2 = {
+  b: {
+    bb2: 'bb2',
+  },
+  c: 'c',
+}
+
+_merge(obj1, obj2)
+// {
+//   a: 'a',
+//   b: {
+//     bb1: 'bb1',
+//     bb2: 'bb2',
+//   },
+//   c: 'c',
+// }

_deepTrim

Deeply traverses the object and trims all String values found.

ts
const o = {
+  a: 'abc ',
+  b: 'c',
+  d: 12,
+  e: {
+    f: '  sd a ',
+  },
+}
+
+_deepTrim(o)
+// {
+//   a: 'abc',
+//   b: 'c',
+//   d: 12,
+//   e: {
+//     f: 'sd a',
+//   },
+// }

_sortObjectDeep

Based on IndigoUnited/js-deep-sort-object.

Deeply traverses the object and makes it "sort-stable" (deterministic). Useful for e.g snapshot-testing, or in any place where sort-stable result is expected. Resulting object is still Equal to the original object.

  • Arrays are sorted order-preserved (!), because array order has a meaning and shouldn't be changed (!).
  • Objects are sorted by their key name.
ts
const obj = {
+  b: 'b',
+  c: ['c3', 'c1', 'c2'],
+  a: 'a',
+}
+
+_sortObjectDeep(obj)
+// {
+//   a: 'a',
+//   b: 'b',
+//   c: ['c1', 'c2', 'c3'],
+// }

_sortObject

Allows to sort object by the list of known keys.

Example:

ts
const obj = {
+  b: 'b',
+  c: 'c',
+  extra: 'extra',
+  a: 'a',
+}
+
+_sortObject(obj, ['a', 'b', 'c'])
+// {
+//   a: 'a',
+//   b: 'b',
+//   c: 'c',
+//   extra: 'extra',
+// }

_deepEquals

Based on epoberezkin/fast-deep-equal.

Performance-optimized function to check if objects (values) are deeply-equal to each other.

ts
const obj1 = {
+  a: 'a',
+  b: {
+    bb: 'bb',
+  },
+}
+
+// Different key order, but still equals
+const obj2 = {
+  b: {
+    bb: 'bb',
+  },
+  a: 'a',
+}
+
+const obj3 = {
+  a: 'a',
+  b: {
+    bb: 'bb3', // not equal!
+  },
+}
+
+_deepEquals(obj1, obj2) // true
+_deepEquals(obj1, obj3) // false
+_deepEquals(obj2, obj3) // false

_invert

Returns an Object with "inverted" keys and values.

ts
const obj = {
+  a: '1',
+  b: '2',
+}
+
+_invert(obj)
+// {
+//   '1': 'a',
+//   '2': 'b',
+// }

_invertMap

Returns a Map with "inverted" keys and values.

ts
const map = new Map<string, number>([
+  ['a', 1],
+  ['b', 2],
+])
+
+_invertMap(map)
+// Map
+//   1 => 'a'
+//   2 => 'b'

_get, _has, _set, _unset

Gets the object value via the famous "dot-notation":

ts
const obj = {
+  a: 'a',
+  b: {
+    bb: 'bb',
+  },
+}
+
+_get(obj, 'b.bb') // 'bb'
+_has(obj, 'b.bb') // true
+_has(obj, 'b.bb2') // false
+_set(obj, 'b.bb2', 'bb2value') // sets obj.b.bb2 to 'bb2Value'
+_unset(obj, 'b.bb') // deletes obj.b.bb

_stringMapValues

Needed due to https://github.com/microsoft/TypeScript/issues/13778
Only affects typings, no runtime effect.

ts
const map: StringMap = {
+  a: 'a',
+  b: 'b',
+}

Before:

ts
const values = Object.values(map)
+// values: (string | undefined)[]

After:

ts
const values = _stringMapValues(map)
+// values: string[]

_stringMapEntries

Needed due to https://github.com/microsoft/TypeScript/issues/13778
Only affects typings, no runtime effect.

ts
const map: StringMap = {
+  a: 'a',
+  b: 'b',
+}

Before:

ts
const entries = Object.entries(map)
+// entries: [string, string | undefined][]

After:

ts
const entries = _stringMapEntries(map)
+// entries: [string, string][]
`,103),p=[l];function t(k,e,E,d,r,g){return a(),i("div",null,p)}const o=s(h,[["render",t]]);export{c as __pageData,o as default}; diff --git a/assets/object.md.DhcjNafr.lean.js b/assets/object.md.DhcjNafr.lean.js new file mode 100644 index 00000000..22e91265 --- /dev/null +++ b/assets/object.md.DhcjNafr.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"Object","description":"","frontmatter":{},"headers":[],"relativePath":"object.md","filePath":"object.md"}'),h={name:"object.md"},l=n("",103),p=[l];function t(k,e,E,d,r,g){return a(),i("div",null,p)}const o=s(h,[["render",t]]);export{c as __pageData,o as default}; diff --git a/assets/promise.md.COsOcisR.js b/assets/promise.md.COsOcisR.js new file mode 100644 index 00000000..989f89ff --- /dev/null +++ b/assets/promise.md.COsOcisR.js @@ -0,0 +1,57 @@ +import{_ as s,c as i,o as a,a1 as t}from"./chunks/framework.DXq9tg-I.js";const y=JSON.parse('{"title":"Promise","description":"","frontmatter":{},"headers":[],"relativePath":"promise.md","filePath":"promise.md"}'),n={name:"promise.md"},e=t(`

Promise

Inspired by bluebird and Sindre's promise-fun packages.

"Copy-pasted" (with small adjustments) here, because:

  1. Bluebird is outdated (pre-ES6)

  2. p-* packages are amazing, but not all of them are needed. Some of them are very much needed though.

  3. To fix issues with Types. Here, everything is TypeScript, so, first class support and sync.

  4. To fix issues with IDE auto-imports, which is still quite bad for "default exported" packages.

Downside is that (as every fork) we lose "auto-update" possibility from these packages. We believe it's not as bad, because packages imported here have mature API and stability (example: pMap).

pMap

Based on p-map

Allows to asynchronously map an array of Promises, with options to:

  • control concurrency (default: Infinity)
  • control error behavior (ErrorMode):
    • THROW_IMMEDIATELY (default)
    • THROW_AGGREGATED: throw AggregateError in the end of execution, if at least 1 error happened
    • SUPPRESS: completely suppress (ignore) errors
ts
const promises = [
+   fetch(...),
+   fetch(...),
+   fetch(...),
+]
+const results = await pMap(promises, async r => { ... }, {
+  concurrency: 2,
+  errorMode: ErrorMode.SUPPRESS,
+})

pProps

Based on p-props

Syntax-sugar to concurrently execute multiple promises and map their results to named properties.

Before:

ts
const [r1, r2, r3] = await Promise.all([
+  fetch(...),
+  fetch(...),
+  fetch(...),
+])

After:

ts
const {r1, r2, r3} = await pProps({
+  r1: fetch(...),
+  r2: fetch(...),
+  r3: fetch(...),
+})

pFilter

Based on p-filter

Allows to asynchrously filter an array of Promises.

ts
const promises = [
+   fetch(...),
+   fetch(...),
+   fetch(...),
+]
+
+const results = await pFilter(promises, async r => (await r.json()).success)

pDefer

Allows to create a "ResolvablePromise", which is a normal native Promise (so, can be awaited, etc), extended with .resolve() and .reject() methods, so you can control it. Similar to jQuery's Deferred, or RxJS's Subject (which is both an Observable and allows to emit values).

Sometimes useful to "promisify" a callback-style API.

ts
async function run(): Promise<string> {
+  const defer = pDefer<string>()
+
+  someOldApi(
+    (result: string) => {
+      defer.resolve(result)
+    },
+    err => defer.reject(err),
+  )
+
+  return await defer.promise
+}

pDelay

Based on p-delay

Just a fancy async/await style setTimeout

Before:

ts
await new Promise(resolve => setTimeout(resolve, 500))

After:

ts
await pDelay(500)

Allows to return a value:

ts
const res = await pDelay(500, 'hello')
+// hello

pRetry

Based on p-retry

Returns a Function (!), enhanced with retry capabilities.

Simplest example:

ts
const save = pRetry(async () => await dao.save())
+
+await save()
+// will retry 3 times, with default delay of 1 second and exponential back-off (x2 delay multiplier)

Advanced example (with options):

ts
const save = pRetry(async () => await dao.save(), {
+  maxAttempts: 5,
+  predicate: err => err?.message.includes('GOAWAY'),
+})
+
+await save()
+// will try up to 5 times, but only if err.message contains GOAWAY

pTimeoutFn

Based on p-timeout

Decorates a Function with a timeout.

Throws an Error if the Function is not resolved in a certain time.

If the Function rejects - passes this rejection further.

ts
const decoratedFn = pTimeout(someFunction, { timeout: 1000 })
+
+await decoratedFn()
+// will throw Timeout error if \`someFunction\` is not finished in 1000 ms.
+// otherwise will pass

pHang

Syntax-sugar for returning a never-resolving ("hung") Promise.

Has semantic meaning, telling us that this Promise is meant to never get resolved or rejected.

Before:

ts
return new Promise()

After:

ts
return pHang()

Useful e.g when you do location.reload() (let's say, you want to reload the page after being logged-in as an Admin) and want your BlockingLoader to never stop spinning:

ts
async function adminLogin(): Promise<void> {
+  location.href = '/admin'
+  return pHang()
+}

pState

Returns Promise's "state" as a String, one of:

  • pending
  • resolved
  • rejected
ts
const p = new Promise()
+await pState(p)
+// 'pending'
+
+const p = new Promise.resolve()
+await pState(p)
+// 'resolved'
`,60),h=[e];function p(l,k,r,d,E,o){return a(),i("div",null,h)}const c=s(n,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/promise.md.COsOcisR.lean.js b/assets/promise.md.COsOcisR.lean.js new file mode 100644 index 00000000..375e395a --- /dev/null +++ b/assets/promise.md.COsOcisR.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as t}from"./chunks/framework.DXq9tg-I.js";const y=JSON.parse('{"title":"Promise","description":"","frontmatter":{},"headers":[],"relativePath":"promise.md","filePath":"promise.md"}'),n={name:"promise.md"},e=t("",60),h=[e];function p(l,k,r,d,E,o){return a(),i("div",null,h)}const c=s(n,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/string.md.BN1pNVqk.js b/assets/string.md.BN1pNVqk.js new file mode 100644 index 00000000..d83298dd --- /dev/null +++ b/assets/string.md.BN1pNVqk.js @@ -0,0 +1,35 @@ +import{_ as s,c as i,o as a,a1 as t}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"String","description":"","frontmatter":{},"headers":[],"relativePath":"string.md","filePath":"string.md"}'),e={name:"string.md"},n=t(`

String

_capitalize

Capitalizes first char, lowercases the rest of the string.

ts
_capitalize('hello') // Hello
+_capitalize('HELLO') // HELLO (no change)
+_capitalize('hello world') // Hello world

_upperFirst

Uppercases first char.

ts
_upperFirst('hello') // Hello
+_upperFirst('HELLO') // HELLO (no change)
+_upperFirst('hELLO') // HELLO

_lowerFirst

Lowercases first char.

ts
_lowerFirst('Hello') // hello
+_lowerFirst('hello') // hello (no change)
+_lowerFirst('HELLO') // hELLO

_camelCase 🐪

Transforms the input string to camelCase 🐪. Implementation adapted from Lodash.

ts
_camelCase('la la la')
+_camelCase('la_la_la')
+_camelCase('la-la-la')
+// laLaLa

_snakeCase 🐍

Transforms the input string to snake_case 🐍. Implementation adapted from Lodash.

ts
_snakeCase('la la la')
+_snakeCase('la-la-la')
+_snakeCase('laLaLa')
+// la_la_la

_kebabCase 🥙

Transforms the input string to kebab-case 🥙. Implementation adapted from Lodash.

ts
_kebabCase('la la la')
+_kebabCase('la_la_la')
+_kebabCase('laLaLa')
+// la-la-la

_split

Like String.split, but with the limited number of tokens.

ts
_split('a_b_c', '_', 2)
+// ['a', 'b_c']

_substringBefore

ts
_substringBefore('file1.test.ts', '.')
+// 'file1'
+
+_substringBefore('file1.test.ts', '.ts')
+// 'file1.test'

_substringBeforeLast

ts
_substringBeforeLast('file1.test.ts', '.')
+// 'file1.test'

_substringAfter

ts
_substringAfter('file1.test.ts', '.')
+// 'test.ts'

_substringAfterLast

ts
_substringAfterLast('file1.test.ts', '.')
+// 'ts'

_substringBetweenLast

ts
const s = '/Users/lalala/someFile.test.ts'
+_substringBetweenLast(s, '/', '.'))
+// 'someFile'

_truncate

Truncates the string to the needed length, putting ... (or a custom "ending") in the end, if needed. The maxLen (second argument) includes the "ending string" (3rd argument).

ts
_truncate('Hello World!', 5) // 'He...'
+_truncate('Hello World!', 6) // 'Hel...'
+_truncate('Hello World!', 100) // 'Hello World!' (no truncation needed)
+
+// Custom "ending"
+_truncate('Hello World!', 5, '|') // 'Hell|'

_truncateMiddle

Truncates the string in the middle.

ts
_truncateMiddle('abcdefghijklmnopqrstuvwxyz', 10)
+// 'abcd...xyz'

_replaceAll

Polyfill for String.prototype.replaceAll.

Based on regex implementation (slightly faster than "split/join" implementation).

_nl2br

Converts \\n (aka new-line) to <br>, to be presented in HTML.

Keeps \\n, so if it's printed in non-HTML environment it still looks ok-ish.

_parseQueryString

Parses location.search string (e.g ?a=1&b=2) into a StringMap, e.g: { a: '1', b: '2' }

Pass location.search to it in the Frontend, or any other string on the Backend (where location.search is not available).

Works both with and without leading ? character.

Yes, there's URLSearchParams existing in the Frontend (not in Node yet), but it's API is not as convenient. And the implementation here is super-small.

Goal of this function is to produce exactly same output as URLSearchParams would.

ts
// Assuming url is http://example.com?a=1&b=2
+
+_parseQueryString(location.search)
+// { a: '1', b: '2' }
`,51),l=[n];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const y=s(e,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/string.md.BN1pNVqk.lean.js b/assets/string.md.BN1pNVqk.lean.js new file mode 100644 index 00000000..c61171bc --- /dev/null +++ b/assets/string.md.BN1pNVqk.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as t}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"String","description":"","frontmatter":{},"headers":[],"relativePath":"string.md","filePath":"string.md"}'),e={name:"string.md"},n=t("",51),l=[n];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const y=s(e,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/style.Ika36brt.css b/assets/style.Ika36brt.css new file mode 100644 index 00000000..72d63ac0 --- /dev/null +++ b/assets/style.Ika36brt.css @@ -0,0 +1 @@ +.badges p{display:flex;gap:10px}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/js-lib/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s}.vp-doc blockquote>p{margin:0;font-size:16px;color:var(--vp-c-text-2);transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-c79a1216]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-c79a1216],.VPBackdrop.fade-leave-to[data-v-c79a1216]{opacity:0}.VPBackdrop.fade-leave-active[data-v-c79a1216]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-c79a1216]{display:none}}.NotFound[data-v-d6be1790]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-d6be1790]{padding:96px 32px 168px}}.code[data-v-d6be1790]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-d6be1790]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-d6be1790]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-d6be1790]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-d6be1790]{padding-top:20px}.link[data-v-d6be1790]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-d6be1790]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-b933a997]{position:relative;z-index:1}.nested[data-v-b933a997]{padding-right:16px;padding-left:16px}.outline-link[data-v-b933a997]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-b933a997]:hover,.outline-link.active[data-v-b933a997]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-b933a997]{padding-left:13px}.VPDocAsideOutline[data-v-a5bbad30]{display:none}.VPDocAsideOutline.has-outline[data-v-a5bbad30]{display:block}.content[data-v-a5bbad30]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-a5bbad30]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-a5bbad30]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-3f215769]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-3f215769]{flex-grow:1}.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-3f215769] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-7e05ebdb]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-7e05ebdb]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-d4a0bba5]{margin-top:64px}.edit-info[data-v-d4a0bba5]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-d4a0bba5]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-d4a0bba5]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-d4a0bba5]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-d4a0bba5]{margin-right:8px}.prev-next[data-v-d4a0bba5]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-d4a0bba5]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-d4a0bba5]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-d4a0bba5]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-d4a0bba5]{margin-left:auto;text-align:right}.desc[data-v-d4a0bba5]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-d4a0bba5]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-39a288b8]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-39a288b8]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-39a288b8]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-39a288b8]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-39a288b8]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-39a288b8]{display:flex;justify-content:center}.VPDoc .aside[data-v-39a288b8]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-39a288b8]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-39a288b8]{max-width:1104px}}.container[data-v-39a288b8]{margin:0 auto;width:100%}.aside[data-v-39a288b8]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-39a288b8]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-39a288b8]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-39a288b8]::-webkit-scrollbar{display:none}.aside-curtain[data-v-39a288b8]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-39a288b8]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-39a288b8]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-39a288b8]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-39a288b8]{order:1;margin:0;min-width:640px}}.content-container[data-v-39a288b8]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-39a288b8]{max-width:688px}.VPButton[data-v-cad61b99]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-cad61b99]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-cad61b99]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-cad61b99]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-cad61b99]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-cad61b99]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-cad61b99]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-cad61b99]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-cad61b99]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-cad61b99]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-cad61b99]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-cad61b99]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-cad61b99]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-8426fc1a]{display:none}.dark .VPImage.light[data-v-8426fc1a]{display:none}.VPHero[data-v-303bb580]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-303bb580]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-303bb580]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-303bb580]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-303bb580]{flex-direction:row}}.main[data-v-303bb580]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-303bb580]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-303bb580]{text-align:left}}@media (min-width: 960px){.main[data-v-303bb580]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-303bb580]{max-width:592px}}.name[data-v-303bb580],.text[data-v-303bb580]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-303bb580],.VPHero.has-image .text[data-v-303bb580]{margin:0 auto}.name[data-v-303bb580]{color:var(--vp-home-hero-name-color)}.clip[data-v-303bb580]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-303bb580],.text[data-v-303bb580]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-303bb580],.text[data-v-303bb580]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-303bb580],.VPHero.has-image .text[data-v-303bb580]{margin:0}}.tagline[data-v-303bb580]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-303bb580]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-303bb580]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-303bb580]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-303bb580]{margin:0}}.actions[data-v-303bb580]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-303bb580]{justify-content:center}@media (min-width: 640px){.actions[data-v-303bb580]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-303bb580]{justify-content:flex-start}}.action[data-v-303bb580]{flex-shrink:0;padding:6px}.image[data-v-303bb580]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-303bb580]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-303bb580]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-303bb580]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-303bb580]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-303bb580]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-303bb580]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-303bb580]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-303bb580]{width:320px;height:320px}}[data-v-303bb580] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-303bb580] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-303bb580] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-a3976bdc]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-a3976bdc]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-a3976bdc]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-a3976bdc]>.VPImage{margin-bottom:20px}.icon[data-v-a3976bdc]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-a3976bdc]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-a3976bdc]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-a3976bdc]{padding-top:8px}.link-text-value[data-v-a3976bdc]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-a3976bdc]{margin-left:6px}.VPFeatures[data-v-a6181336]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-a6181336]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-a6181336]{padding:0 64px}}.container[data-v-a6181336]{margin:0 auto;max-width:1152px}.items[data-v-a6181336]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-a6181336]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-a6181336],.item.grid-4[data-v-a6181336],.item.grid-6[data-v-a6181336]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-a6181336],.item.grid-4[data-v-a6181336]{width:50%}.item.grid-3[data-v-a6181336],.item.grid-6[data-v-a6181336]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-a6181336]{width:25%}}.container[data-v-8e2d4988]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-8e2d4988]{padding:0 48px}}@media (min-width: 960px){.container[data-v-8e2d4988]{width:100%;padding:0 64px}}.vp-doc[data-v-8e2d4988] .VPHomeSponsors,.vp-doc[data-v-8e2d4988] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-8e2d4988] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-8e2d4988] .VPHomeSponsors a,.vp-doc[data-v-8e2d4988] .VPTeamPage a{text-decoration:none}.VPHome[data-v-686f80a6]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-686f80a6]{margin-bottom:128px}}.VPContent[data-v-1428d186]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-1428d186]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-1428d186]{margin:0}@media (min-width: 960px){.VPContent[data-v-1428d186]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-1428d186]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-1428d186]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-e315a0ad]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-e315a0ad]{display:none}.VPFooter[data-v-e315a0ad] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-e315a0ad] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-e315a0ad]{padding:32px}}.container[data-v-e315a0ad]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-e315a0ad],.copyright[data-v-e315a0ad]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-17a5e62e]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-17a5e62e]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-17a5e62e]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-17a5e62e]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-17a5e62e]{color:var(--vp-c-text-1)}.icon[data-v-17a5e62e]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-17a5e62e]{font-size:14px}.icon[data-v-17a5e62e]{font-size:16px}}.open>.icon[data-v-17a5e62e]{transform:rotate(90deg)}.items[data-v-17a5e62e]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-17a5e62e]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-17a5e62e]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-17a5e62e]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-17a5e62e]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-17a5e62e]{transition:all .2s ease-out}.flyout-leave-active[data-v-17a5e62e]{transition:all .15s ease-in}.flyout-enter-from[data-v-17a5e62e],.flyout-leave-to[data-v-17a5e62e]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-a6f0e41e]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-a6f0e41e]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-a6f0e41e]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-a6f0e41e]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-a6f0e41e]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-a6f0e41e]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-a6f0e41e]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-a6f0e41e]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-a6f0e41e]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-a6f0e41e]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-a6f0e41e]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-a6f0e41e]{display:none}}.menu-icon[data-v-a6f0e41e]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-a6f0e41e]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-a6f0e41e]{padding:12px 32px 11px}}.VPSwitch[data-v-1d5665e3]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-1d5665e3]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-1d5665e3]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-1d5665e3]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-1d5665e3] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-1d5665e3] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-d1f28634]{opacity:1}.moon[data-v-d1f28634],.dark .sun[data-v-d1f28634]{opacity:0}.dark .moon[data-v-d1f28634]{opacity:1}.dark .VPSwitchAppearance[data-v-d1f28634] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-e6aabb21]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-e6aabb21]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-43f1e123]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-43f1e123]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-43f1e123]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-43f1e123]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-69e747b5]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-69e747b5]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-69e747b5]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-69e747b5]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-e7ea1737]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-e7ea1737] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-e7ea1737] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-e7ea1737] .group:last-child{padding-bottom:0}.VPMenu[data-v-e7ea1737] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-e7ea1737] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-e7ea1737] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-e7ea1737] .action{padding-left:24px}.VPFlyout[data-v-b6c34ac9]{position:relative}.VPFlyout[data-v-b6c34ac9]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-b6c34ac9]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-b6c34ac9]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-b6c34ac9]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-b6c34ac9]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-b6c34ac9],.button[aria-expanded=true]+.menu[data-v-b6c34ac9]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-b6c34ac9]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-b6c34ac9]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-b6c34ac9]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-b6c34ac9]{margin-right:0;font-size:16px}.text-icon[data-v-b6c34ac9]{margin-left:4px;font-size:14px}.icon[data-v-b6c34ac9]{font-size:20px;transition:fill .25s}.menu[data-v-b6c34ac9]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-eee4e7cb]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-eee4e7cb]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-eee4e7cb]>svg,.VPSocialLink[data-v-eee4e7cb]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-7bc22406]{display:flex;justify-content:center}.VPNavBarExtra[data-v-d0bd9dde]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-d0bd9dde]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-d0bd9dde]{display:none}}.trans-title[data-v-d0bd9dde]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-d0bd9dde],.item.social-links[data-v-d0bd9dde]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-d0bd9dde]{min-width:176px}.appearance-action[data-v-d0bd9dde]{margin-right:-2px}.social-links-list[data-v-d0bd9dde]{margin:-4px -8px}.VPNavBarHamburger[data-v-e5dd9c1c]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-e5dd9c1c]{display:none}}.container[data-v-e5dd9c1c]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-e5dd9c1c]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .middle[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .bottom[data-v-e5dd9c1c]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-e5dd9c1c],.middle[data-v-e5dd9c1c],.bottom[data-v-e5dd9c1c]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(0)}.middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-9c663999]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-9c663999],.VPNavBarMenuLink[data-v-9c663999]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-7f418b0f]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-7f418b0f]{display:flex}}/*! @docsearch/css 3.6.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-0394ad82]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-0394ad82]{display:flex;align-items:center}}.title[data-v-ab179fa1]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-ab179fa1]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-ab179fa1]{border-bottom-color:var(--vp-c-divider)}}[data-v-ab179fa1] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-88af2de4]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-88af2de4]{display:flex;align-items:center}}.title[data-v-88af2de4]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-ccf7ddec]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .5s}.VPNavBar[data-v-ccf7ddec]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-ccf7ddec]:not(.home){background-color:transparent}.VPNavBar[data-v-ccf7ddec]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-ccf7ddec]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-ccf7ddec]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-ccf7ddec]{padding:0}}.container[data-v-ccf7ddec]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-ccf7ddec],.container>.content[data-v-ccf7ddec]{pointer-events:none}.container[data-v-ccf7ddec] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-ccf7ddec]{max-width:100%}}.title[data-v-ccf7ddec]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-ccf7ddec]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-ccf7ddec]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-ccf7ddec]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-ccf7ddec]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-ccf7ddec]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-ccf7ddec]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-ccf7ddec]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-ccf7ddec]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-ccf7ddec]{column-gap:.5rem}}.menu+.translations[data-v-ccf7ddec]:before,.menu+.appearance[data-v-ccf7ddec]:before,.menu+.social-links[data-v-ccf7ddec]:before,.translations+.appearance[data-v-ccf7ddec]:before,.appearance+.social-links[data-v-ccf7ddec]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-ccf7ddec]:before,.translations+.appearance[data-v-ccf7ddec]:before{margin-right:16px}.appearance+.social-links[data-v-ccf7ddec]:before{margin-left:16px}.social-links[data-v-ccf7ddec]{margin-right:-8px}.divider[data-v-ccf7ddec]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-ccf7ddec]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-ccf7ddec]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-ccf7ddec]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-2d7af913]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-2d7af913]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-7f31e1f6]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-7f31e1f6]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-19976ae1]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-19976ae1]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-8133b170]{display:block}.title[data-v-8133b170]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-ff6087d4]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-ff6087d4]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-ff6087d4]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-ff6087d4]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-ff6087d4]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-ff6087d4]{transform:rotate(45deg)}.button[data-v-ff6087d4]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-ff6087d4]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-ff6087d4]{transition:transform .25s}.group[data-v-ff6087d4]:first-child{padding-top:0}.group+.group[data-v-ff6087d4],.group+.item[data-v-ff6087d4]{padding-top:4px}.VPNavScreenTranslations[data-v-858fe1a4]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-858fe1a4]{height:auto}.title[data-v-858fe1a4]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-858fe1a4]{font-size:16px}.icon.lang[data-v-858fe1a4]{margin-right:8px}.icon.chevron[data-v-858fe1a4]{margin-left:4px}.list[data-v-858fe1a4]{padding:4px 0 0 24px}.link[data-v-858fe1a4]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-cc5739dd]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px);right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .5s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-cc5739dd],.VPNavScreen.fade-leave-active[data-v-cc5739dd]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-cc5739dd],.VPNavScreen.fade-leave-active .container[data-v-cc5739dd]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-cc5739dd],.VPNavScreen.fade-leave-to[data-v-cc5739dd]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-cc5739dd],.VPNavScreen.fade-leave-to .container[data-v-cc5739dd]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-cc5739dd]{display:none}}.container[data-v-cc5739dd]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-cc5739dd],.menu+.appearance[data-v-cc5739dd],.translations+.appearance[data-v-cc5739dd]{margin-top:24px}.menu+.social-links[data-v-cc5739dd]{margin-top:16px}.appearance+.social-links[data-v-cc5739dd]{margin-top:16px}.VPNav[data-v-ae24b3ad]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-ae24b3ad]{position:fixed}}.VPSidebarItem.level-0[data-v-b8d55f3b]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-b8d55f3b]{padding-bottom:10px}.item[data-v-b8d55f3b]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-b8d55f3b]{cursor:pointer}.indicator[data-v-b8d55f3b]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-b8d55f3b]{background-color:var(--vp-c-brand-1)}.link[data-v-b8d55f3b]{display:flex;align-items:center;flex-grow:1}.text[data-v-b8d55f3b]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-b8d55f3b]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-b8d55f3b],.VPSidebarItem.level-2 .text[data-v-b8d55f3b],.VPSidebarItem.level-3 .text[data-v-b8d55f3b],.VPSidebarItem.level-4 .text[data-v-b8d55f3b],.VPSidebarItem.level-5 .text[data-v-b8d55f3b]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-b8d55f3b]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-b8d55f3b]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-b8d55f3b]{color:var(--vp-c-brand-1)}.caret[data-v-b8d55f3b]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-b8d55f3b]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-b8d55f3b]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-b8d55f3b]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-b8d55f3b]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-b8d55f3b],.VPSidebarItem.level-2 .items[data-v-b8d55f3b],.VPSidebarItem.level-3 .items[data-v-b8d55f3b],.VPSidebarItem.level-4 .items[data-v-b8d55f3b],.VPSidebarItem.level-5 .items[data-v-b8d55f3b]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-b8d55f3b]{display:none}.VPSidebar[data-v-575e6a36]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-575e6a36]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-575e6a36]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-575e6a36]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-575e6a36]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-575e6a36]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-575e6a36]{outline:0}.group+.group[data-v-575e6a36]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-575e6a36]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSkipLink[data-v-0f60ec36]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-0f60ec36]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-0f60ec36]{top:14px;left:16px}}.Layout[data-v-5d98c3a5]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3d121b4a]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-3d121b4a]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-3d121b4a]{margin:128px 0}}.VPHomeSponsors[data-v-3d121b4a]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-3d121b4a]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-3d121b4a]{padding:0 64px}}.container[data-v-3d121b4a]{margin:0 auto;max-width:1152px}.love[data-v-3d121b4a]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-3d121b4a]{display:inline-block}.message[data-v-3d121b4a]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3d121b4a]{padding-top:32px}.action[data-v-3d121b4a]{padding-top:40px;text-align:center}.VPTeamPage[data-v-7c57f839]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-7c57f839]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-7c57f839-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-7c57f839-s],.VPTeamMembers+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-7c57f839-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-7c57f839-s],.VPTeamMembers+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:96px}}.VPTeamMembers[data-v-7c57f839-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-7c57f839-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-7c57f839-s]{padding:0 64px}}.VPTeamPageTitle[data-v-bf2cbdac]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:80px 64px 48px}}.title[data-v-bf2cbdac]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-bf2cbdac]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-bf2cbdac]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-bf2cbdac]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-b1a88750]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-b1a88750]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-b1a88750]{padding:0 64px}}.title[data-v-b1a88750]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-b1a88750]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-b1a88750]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-b1a88750]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-b1a88750]{padding-top:40px}.VPTeamMembersItem[data-v-f3fa364a]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-f3fa364a]{padding:32px}.VPTeamMembersItem.small .data[data-v-f3fa364a]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-f3fa364a]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-f3fa364a]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-f3fa364a]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-f3fa364a]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-f3fa364a]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-f3fa364a]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-f3fa364a]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-f3fa364a]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-f3fa364a]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-f3fa364a]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-f3fa364a]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-f3fa364a]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-f3fa364a]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-f3fa364a]{text-align:center}.avatar[data-v-f3fa364a]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-f3fa364a]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-f3fa364a]{margin:0;font-weight:600}.affiliation[data-v-f3fa364a]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-f3fa364a]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-f3fa364a]:hover{color:var(--vp-c-brand-1)}.desc[data-v-f3fa364a]{margin:0 auto}.desc[data-v-f3fa364a] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-f3fa364a]{display:flex;justify-content:center;height:56px}.sp-link[data-v-f3fa364a]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-f3fa364a]:hover,.sp .sp-link.link[data-v-f3fa364a]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-f3fa364a]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-6cb0dbc4]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-6cb0dbc4]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-6cb0dbc4]{max-width:876px}.VPTeamMembers.medium .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-6cb0dbc4]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-6cb0dbc4]{max-width:760px}.container[data-v-6cb0dbc4]{display:grid;gap:24px;margin:0 auto;max-width:1152px} diff --git a/assets/time.md.CUXcPkgd.js b/assets/time.md.CUXcPkgd.js new file mode 100644 index 00000000..77ac7b2d --- /dev/null +++ b/assets/time.md.CUXcPkgd.js @@ -0,0 +1,15 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"Time","description":"","frontmatter":{},"headers":[],"relativePath":"time.md","filePath":"time.md"}'),t={name:"time.md"},h=n(`

Time

_ms

Prints a human-string for a given number of milliseconds.

ts
_ms(1) // '1 ms'
+_ms(10) // '10 ms'
+_ms(1005) // '1.005 sec'
+_ms(49123) // '49 sec'
+_ms(60000) // '1m0s'
+_ms(60912) // '1m0s'
+_ms(69123) // '1m9s'
+_ms(3292100) // '54m52s'
+_ms(69642430) // '19h20m'
+_ms(101963481) // '28h'

_since

Useful to measure and human-print the "time elapsed since".

ts
const started = Date.now()
+
+// ... do stuff!
+
+console.log(\`Took \${_since(started)}\`)
+// Took 19m13s

Uses _ms for pretty-printing.

_debounce

Debounce function from Lodash.

See the typescript declaration for Options.

ts
const fn = _debounce(originalFn, 100, { leading: false, trailing: false, maxWait: 300 })

_throttle

Throttle function from Lodash.

See the typescript declaration for Options.

ts
const fn = _throttle(originalFn, 100)
`,16),l=[h];function e(k,p,r,d,E,g){return a(),i("div",null,l)}const y=s(t,[["render",e]]);export{c as __pageData,y as default}; diff --git a/assets/time.md.CUXcPkgd.lean.js b/assets/time.md.CUXcPkgd.lean.js new file mode 100644 index 00000000..1792cfcc --- /dev/null +++ b/assets/time.md.CUXcPkgd.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.DXq9tg-I.js";const c=JSON.parse('{"title":"Time","description":"","frontmatter":{},"headers":[],"relativePath":"time.md","filePath":"time.md"}'),t={name:"time.md"},h=n("",16),l=[h];function e(k,p,r,d,E,g){return a(),i("div",null,l)}const y=s(t,[["render",e]]);export{c as __pageData,y as default}; diff --git a/assets/types.md.BqqA1GCd.js b/assets/types.md.BqqA1GCd.js new file mode 100644 index 00000000..aa47ad02 --- /dev/null +++ b/assets/types.md.BqqA1GCd.js @@ -0,0 +1,11 @@ +import{_ as s,c as i,o as a,a1 as t}from"./chunks/framework.DXq9tg-I.js";const E=JSON.parse('{"title":"Types","description":"","frontmatter":{},"headers":[],"relativePath":"types.md","filePath":"types.md"}'),e={name:"types.md"},h=t(`

Types

Things that should exist in type-fest, but don't (yet).

Some types are copy-pasted from type-fest, because:

  1. To not introduce (another) dependency of this 0-dep lib
  2. To avoid multiple type-fest versions conflicts (that happened many times in the past)

StringMap

ts
const m: StringMap = { a: 'a' }
+// Same as:
+// const m: { [a: string]: string | undefined }
+
+const m: StringMap<number> = { a: 5 }
+// Same as:
+// const m: { [a: string]: number | undefined }

The | undefined part is important!

It allows to set undefined values to StringMap, e.g:

ts
m.name = name1 // where \`name1\` can be undefined

Mapper

ts
export type Mapper<IN = any, OUT = any> = (input: IN, index: number) => OUT

AsyncMapper

ts
export type AsyncMapper<IN = any, OUT = any> = (input: IN, index: number) => OUT | PromiseLike<OUT>

Predicate

ts
export type Predicate<T> = (item: T, index: number) => boolean

Async Predicate

ts
export type AsyncPredicate<T> = (item: T, index: number) => boolean | PromiseLike<boolean>

_passthroughPredicate

Predicate that passes everything (returns true for every item).

ts
_passthroughPredicate(anything) // true
+  [(1, 2, 3)].filter(_passthroughPredicate)
+// [1, 2, 3]

_passNothingPredicate

Predicate that passes nothing (returns false for every item).

ts
_passNothingPredicate(anything) // false
+  [(1, 2, 3)].filter(_passNothingPredicate)
+// []

_noop

Function that takes any arguments and returns undefined. Literally does nothing.

Can be useful to replace some real world functions with mocks.

ts
element.click = _noop

Merge

ReadonlyDeep

Promisable

PromiseValue

`,31),n=[h];function p(l,k,r,d,g,o){return a(),i("div",null,n)}const c=s(e,[["render",p]]);export{E as __pageData,c as default}; diff --git a/assets/types.md.BqqA1GCd.lean.js b/assets/types.md.BqqA1GCd.lean.js new file mode 100644 index 00000000..774078aa --- /dev/null +++ b/assets/types.md.BqqA1GCd.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as t}from"./chunks/framework.DXq9tg-I.js";const E=JSON.parse('{"title":"Types","description":"","frontmatter":{},"headers":[],"relativePath":"types.md","filePath":"types.md"}'),e={name:"types.md"},h=t("",31),n=[h];function p(l,k,r,d,g,o){return a(),i("div",null,n)}const c=s(e,[["render",p]]);export{E as __pageData,c as default}; diff --git a/assets/units.md.C4tvu_If.js b/assets/units.md.C4tvu_If.js new file mode 100644 index 00000000..26d50c1d --- /dev/null +++ b/assets/units.md.C4tvu_If.js @@ -0,0 +1,8 @@ +import{_ as s,c as i,o as a,a1 as h}from"./chunks/framework.DXq9tg-I.js";const b=JSON.parse('{"title":"Units","description":"","frontmatter":{},"headers":[],"relativePath":"units.md","filePath":"units.md"}'),n={name:"units.md"},t=h(`

Units

_kb, _mb, _gb, _hb

Human-prints byte number into kilobytes, megabytes, gigabutes and "human-bytes" (_hb):

ts
_hb(0) // '0 byte(s)'
+_hb(500) // '500 byte(s)'
+_hb(1000) // '1 Kb'
+_hb(1024 ** 2) // '1 Mb'
+_hb(1024 ** 3) // '1 Gb'
+_kb(1000) // 1
+_mb(1024 ** 2) // 1
+_gb(1024 ** 3) // 1
`,4),k=[t];function l(p,e,r,d,E,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{b as __pageData,o as default}; diff --git a/assets/units.md.C4tvu_If.lean.js b/assets/units.md.C4tvu_If.lean.js new file mode 100644 index 00000000..028637d4 --- /dev/null +++ b/assets/units.md.C4tvu_If.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a1 as h}from"./chunks/framework.DXq9tg-I.js";const b=JSON.parse('{"title":"Units","description":"","frontmatter":{},"headers":[],"relativePath":"units.md","filePath":"units.md"}'),n={name:"units.md"},t=h("",4),k=[t];function l(p,e,r,d,E,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{b as __pageData,o as default}; diff --git a/custom.css b/custom.css new file mode 100644 index 00000000..ccb09df6 --- /dev/null +++ b/custom.css @@ -0,0 +1,21 @@ +.app-content button { + border: 1px solid #aaa; + border-radius: 4px; + background-color: #eee; + padding: 4px 16px; + margin: 0 2px; + cursor: pointer; +} + +.app-content button:hover { + background-color: #ddd; +} + +.app-content button[disabled] { + color: #aaa; + cursor: default; +} + +.app-content button[disabled]:hover { + background-color: #eee; +} diff --git a/date.html b/date.html new file mode 100644 index 00000000..166cefd6 --- /dev/null +++ b/date.html @@ -0,0 +1,24 @@ + + + + + + LocalDate, LocalTime | js-lib + + + + + + + + + + + + + +
Skip to content

LocalDate, LocalTime

Why?

Serves as an alternative / replacement of Moment.js / Day.js.

It tries to address the shortcomings of Day.js and time-lib.

time-lib was created as a wrapper around Day.js, due to following limitations:

  • Day.js doesn't provide all features that we need without plugins. This creates an "import problem": you cannot just import dayjs, you need to import it from a place that had plugins properly installed and initialized. It immediately creates an "import ambiguity": should I import from dayjs or from my_code/dayjs.ts?
  • Day.js is created as CommonJS module, all plugins has to be explicitly required. There are issues around TypeScript esModuleInterop. Result of it is that we needed to completely fork Day.js types and put it into time-lib.
  • There are more/deeper ESM issues when it's used in ESM context (e.g with Vite).

Next level of reasoning is that we needed our own opinionated API that would use standards that we use, for example:

  • We always use classic Unixtime (in seconds, not milliseconds)
  • We always use classic ISO8601 date without timezone, e.g 1984-06-21

Just the second/millisecond confusion can create serious bugs.

Mixup between similarly-called .toISOString and .toISODate can create very subtle bugs.

So, after multiple issues being accumulated and inability to properly fork Day.js, it was decided to try and simply rewrite Day.js functionality into LocalDate and LocalTime.

Reasons:

  • No milliseconds in the API (not needed)
  • Classic UnixTime, never "millisecond unixtime"
  • No timezone support/confusion, all dates/times are always treated as "local" (inspired by Java LocalDate/LocalDateTime)
  • Ability to parse "timezone-aware ISO8601 string", e.g 1984-06-21T17:15:02+02 into a LocalDate of just 1984-06-21 or LocalTime of 1984-06-21T17:15:02 (try achieving it with Moment.js or Day.js!)
  • .toJSON automatically formats LocalTime as unixtimestamp, LocalDate as ISO8601 date-only string
  • Prevents dayjs(undefined) being dayjs.now()
  • Strict parsing/validation by default. Will validate all input upon creation and will throw parse error on any invalid input. We believe it allows to catch errors sooner.
  • Optimized for performance and code maintenance, not on code size (as Day.js is, which results in its poorer performance in certain cases, and/or in less code maintainability)
  • No arbitrary .format by design. List of well-known format outputs instead.
  • Separate LocalDate class for simplified (and more performant) dealing with "just Dates without time information". Similar to Java's LocalDate. It allows much more simple and robust implementation, compared to dealing with js Date object intricacies (mostly around timezones).

API

API is designed to be closely (but not 100%) compatible with Day.js/Moment.js.

Examples:

day.js (via time-lib)LocalTimeLocalDate
nowdayjs()localTime.now()
todaydayjs().startOf('day')localDate.today()
create from unixtimestampdayjs.unix(ts)localTime(ts)
parse from ISO8601 date stringdayjs(str)localDate(str)
parse from ISO8601 date+time stringdayjs(str)localTime(str)
now plus 1 hourdayjs().add(1, 'hour')localTime().plus(1, 'hour')
today plus 1 daydayjs().startOf('day').add(1, 'day')localDate().plus(1, 'day')
toISODate (just date)dayjs().toISODate()localTime().toISODate()localDate().toISODate()
toISODate with timedayjs().format()localTime().toISODateTime()
diff in daysdayjs().diff(other, 'day')localTime().diff(other, 'day')localDate().diff(other, 'day')
to unixtimestampdayjs().unix()localTime().unix()localDate().unix()
isBeforedayjs().isBefore(other)localTime().isBefore(other)localDate().isBefore(other)

As you can see above - API is kept very similar.

DateInterval

Useful to describe an interval of Dates, e.g [inclusive] interval between 1984-06-21 and 1984-07-11 can be described as 1984-06-21/1984-07-11 (as per ISO8601).

.toJSON automatically stringifies DateInterval into a string.

Create DateInterval: DateInterval.parse('1984-06-21/1984-07-11') or DateInterval.of('1984-06-21', '1984-07-11').

+ + + + \ No newline at end of file diff --git a/decorators.html b/decorators.html new file mode 100644 index 00000000..eddb9325 --- /dev/null +++ b/decorators.html @@ -0,0 +1,80 @@ + + + + + + Decorators | js-lib + + + + + + + + + + + + + +
Skip to content

Decorators

@_Debounce

Wrapper around _debounce.

@_Throttle

Wrapper around _throttle.

@_LogMethod

Allows to Log every execution of the method.

Console-logs when method had started, when it finished, time taken and if error happened.

Supports both sync and async methods.

Awaits if method returns a Promise.

Example output:

>> syncMethodSuccess()
+<< syncMethodSuccess() took 124 ms
+
+>> asyncMethod()
+<< asyncMethodThrow() took 10 ms ERROR: MyError
ts
class C {
+  @_LogMethod()
+  async hello() { ... }
+}

@_Memo

Powerful Memoization decorator.

Simplest usage:

ts
class C {
+  @_Memo()
+  async init() { ... }
+}
+
+await c.init() // first time will run the initialization
+
+await c.init() // second time it'll skip it
+// Allows "max 1 execution" pattern

Memoization caches values for each unique set of input parameters. So, e.g, if you want to hit a somewhat slow/expensive endpoint, you may want to cache it in memory like this:

ts
class C {
+  @_Memo()
+  async getExchangeRates(day: string) { ... }
+}
+
+// First time will hit the endpoint
+await c.getExchangeRates('2021-06-21')
+
+// Second time will immediately return cached result, cause the input is the same
+await c.getExchangeRates('2021-06-21')
+
+// Input has changed, so it's a cache-miss, will hit the endpoint
+await c.getExchangeRates('2021-06-22')

Pay attention that the cache of the returned values is kept forever, so, be mindful of possible memory leaks.

nodejs-lib (link pending) has a LRUMemoCache class that impements LRU cache. Example:

ts
@_Memo({ cacheFactory: () => new LRUMemoCache({...}) })
+async someMethod() {}

@_Retry

Wrapper around pRetry.

@_Timeout

Decoratod method will throw TimeoutError if it hasn't finished in given time.

Wrapper around pTimeout.

ts
class C {
+  @_Timeout({ timeout: 1000 })
+  async hello() {
+    // some logic
+  }
+}
+
+const c = new C()
+await c.hello()
+// will throw if not finished in 1000 ms

@_TryCatch

Wraps the method into a try/catch block, console.error(err) on error, but never re-throws (always suppresses the error).

ts
class C {
+  @_TryCatch() // fine if it fails
+  async logSomeAnalytics() {}
+}

Wrapper around _tryCatch function.

_createPromiseDecorator

Powerful helper to create your own Decorators around async (Promise-returning) methods.

Example of a @TryCatch decorator that will wrap a method with "try/catch", console.error the error and suppress it (by returning undefined in case of any error).

Example usage:

ts
class C {
+  @TryCatch() // fine if it fails
+  async logSomeAnalytics() {}
+}

Example implementation of such a decorator using _createPromiseDecorator:

ts
export const TryCatch = () =>
+  _createPromiseDecorator({
+    decoratorName: 'TryCatch',
+    catchFn: ({ err, target, key }) => {
+      console.error(err)
+      return undefined
+    },
+  })

_createPromiseDecorator allows you to define your "hooks" on different stages of a Promise:

  • beforeFn: before the method execution
  • thenFn: after successful method execution
  • catchFn: after method throws (returns rejected Promise)
  • finallyFn: after method returns resolved or rejected Promise (useful to e.g "hide the blocking loader")

Example of a @BlockingLoader decorator, that wraps the method, shows the BlockingLoader before the method execution and hides it in the end of the execution (regardless if it errored or succeeded):

ts
export const BlockingLoader = () =>
+  _createPromiseDecorator({
+    decoratorName: 'BlockingLoader',
+    beforeFn: () => store.commit('setBlockingLoader'),
+    catchFn: ({ err }) => errorDialog(err),
+    finallyFn: () => store.commit('setBlockingLoader', false),
+  })
+ + + + \ No newline at end of file diff --git a/error.html b/error.html new file mode 100644 index 00000000..845d68e9 --- /dev/null +++ b/error.html @@ -0,0 +1,51 @@ + + + + + + Error | js-lib + + + + + + + + + + + + + +
Skip to content

Error

_tryCatch

Wraps/decorates a passed function with "try/catch", so it never throws, but logs the error (if occured).

ts
const someDangerousFunction = () => { ... }
+
+const fn = _tryCatch(someDangerousFunction)
+
+fn()
+// will log on error, but never throw

Allows to pass onError() function hook, that will be called on error.

ErrorObject

Standartized "Error object" that contains arbitrary data object that can hold additional data.

This data object is defined as a Generic type to ErrorObject, so, e.g. HttpError has HttpErrorData, which has a mandatory httpStatusCode: number property.

Usage example of that:

ts
.catch((err: HttpErrorObject) => {
+  console.log(err.data.httpStatusCode)
+})

AppError

The most basic implementation of an Error that complies with ErrorObject specification. Difference is that ErrorObject is purely a TypeScript interface (around any JS object), but AppError is a sub-class of Error. So, with AppError you can do if (err instanceof AppError) ....

Because AppError implements ErrorObject, it guarantees an err.data object.

This basic contract allows to establish a standartized interface between the Frontend (in frontend-lib) and Backend (in backend-lib) and implement error-handling more efficiently.

HttpError

Subclass of AppError that has some additional properties inside data, namely: httpStatusCode: number.

HttpErrorResponse

This is a standartized "Error response from the Backend" (as implemented in backend-lib). You can check/assert it with _isHttpErrorResponse, and then have all the guarantees and types about the containing error object.

Handling these type of errors is done "automatically" in getKy of the frontend-lib, and in getGot of the backend-lib.

_anyToError

Cast any to Error.

_errorToErrorObject

Cast Error to ErrorObject.

_isHttpErrorResponse

Assert if provided value: any is a HttpErrorResponse.

_isHttpErrorObject

Assert if provided value: any is a HttpErrorObject (an HttpError, same as AppError<HttpErrorData>).

_isErrorObject

Assert if provided value: any is an ErrorObject.

_assert

Asserts that a boolean condition is truthy, otherwise throws an Error.

Evaluates the condition (casts it to Boolean). Expects it to be truthy, otherwise throws AppError.

Should be used NOT for "expected" / user-facing errors, but vice-versa - for completely unexpected and 100% buggy "should never happen" cases.

It'll result in http 500 on the server (cause that's the right code for "unexpected" errors). Pass { httpStatusCode: x } at errorData argument to override the http code (will be picked up by backend-lib).

API is similar to Node's assert(), except:

  1. Throws js-lib's AppError
  2. Has a default message, if not provided
  3. Sets userFriendly flag to true, cause it's always better to have at least SOME clue, rather than fully generic "Oops" error.
ts
function run(err: any) {
+  _assert(err instanceof AppError)
+  // from here TypeScript will know that `err instanceof AppError === true`, or `err: AppError`
+
+  // Example with custom error message:
+  _assert(err instanceof AppError, 'error should be of type AppError')
+}

_assertEquals

Similar to _assert, but allows to provide 2 values (first 2 arguments) and throws if they are NOT equal.

Does a shallow equality check (!==), use _assertDeepEquals if you need a deep-check.

_assertDeepEquals

Similar to _assertEquals, but does a deep assertion (using _deepEquals).

_assertIsError

Asserts that passed value is instanceof Error.

_assertsIsTypeOf

Asserts that typeof value matches expected type.

_assertsIsString

Asserts that typeof value === 'string

_assertsIsNumber

Asserts that typeof value === 'number

_try

Calls a function, returns a Tuple of [error, value]. Allows to write shorter code that avoids try/catch. Useful e.g. in unit tests.

Similar to pTry, but for sync functions.

ts
const [err, v] = _try(() => someFunction())

pTry

Loosely inspired by await-to-js.

Similar to _try, but for promises.

Async/await wrapper for easy error handling. Wraps async/await calls in try catch blocks and returns a tuple containing the error or the results of the promise

ts
interface ServerResponse {
+  test: number
+}
+
+interface CustomError {
+  code: number
+  data: {
+    title: string
+    body: string
+  }
+}
+
+const p = Promise.resolve({ test: 123 })
+
+const [err, result] = await pTuple<ServerResponse, CustomError>(p)
+ + + + \ No newline at end of file diff --git a/fetcher.html b/fetcher.html new file mode 100644 index 00000000..55daed52 --- /dev/null +++ b/fetcher.html @@ -0,0 +1,48 @@ + + + + + + Fetcher | js-lib + + + + + + + + + + + + + +
Skip to content

Fetcher

Convenient wrapper around fetch.

Features

  • Works in the Browser and on the Server (Node.js)
  • Convenient API, e.g fetcher.get(), fetcher.post(), etc.
  • Throws HttpError automatically, no need to check if (res.ok)
  • Allows to set timeout
  • Conveniently retries on retry-able errors
  • Allows to conveniently log requests/responses, configurable
  • Allows to convert searchParams object into a query string
  • Allows to define beforeRequest/beforeRetry/afterResponse hooks

Comparison

Fetcher:

tsx
const fetcher = getFetcher()
+
+const result = await fetcher.post('https://example.com', {
+  json: { foo: true },
+})

Ky:

tsx
const result = await ky
+  .post('https://example.com/hello', {
+    json: { foo: true },
+  })
+  .json()

Plain fetch:

tsx
class HTTPError extends Error {}
+
+const response = await fetch('https://example.com', {
+  method: 'POST',
+  body: JSON.stringify({ foo: true }),
+  headers: {
+    'content-type': 'application/json',
+  },
+})
+
+if (!response.ok) {
+  throw new HTTPError(`Fetch error: ${response.statusText}`)
+}
+
+const json = await response.json()
+
+console.log(json)

Prior art

Heavily inspired by:

Why

Differences from prior projects:

  • Targets both Browser and Node by design, targeting Node with native fetch support. This is similar to ky plus ky-universal.
  • Incorporates everything from getKy and getGot, so you don’t need multiple layers. For example, with ky you would need: ky, ky-for-people, getKy (frontend-lib). With fetcher you need only fetcher (part of js-lib).

Goals

  • Simplicity. It focuses on the most simple and common use cases, and not on the most advanced or edge cases.
  • Assume native fetch support (Browser and Node), no polyfills. Should work equally well in Browser and Node, ideally without platform-specific quirks.
  • Written in TypeScript, with first-class TypeScript support.
+ + + + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json new file mode 100644 index 00000000..a23b7ec0 --- /dev/null +++ b/hashmap.json @@ -0,0 +1 @@ +{"date.md":"CyXixeqG","fetcher.md":"DgXAupJQ","error.md":"UwDoayCX","lazy.md":"LH9W2JEo","httprequesterror.md":"IST45OMn","array.md":"CCcREjNl","object.md":"DhcjNafr","json.md":"DDfXsvnq","number.md":"C9Shc39b","decorators.md":"C_BRlZ2W","index.md":"DhRJbceH","math.md":"jsvo53uX","types.md":"BqqA1GCd","time.md":"CUXcPkgd","units.md":"C4tvu_If","string.md":"BN1pNVqk","promise.md":"COsOcisR"} diff --git a/httpRequestError.html b/httpRequestError.html new file mode 100644 index 00000000..17a1aeaf --- /dev/null +++ b/httpRequestError.html @@ -0,0 +1,45 @@ + + + + + + js-lib + + + + + + + + + + + + + +
Skip to content
Backend makes a Fetch call to some API
+API returns error1 with 500 and a message1
+Fetcher wraps error1 with error2 which is a FetcherError
+method
+url
+baseUrl?
+statusCode
+millis
+message: 500 GET /someUrl
+causedBy error1
+
+genericErrorHandler needs to return error2
+it wraps error2 (FetchError) with error3: HttpError
+Maybe there's just no need to do that wrapping?! Return ErrorObject as is
+Requester (Fetcher) would always know httpStatusCode of the error they just received
+
+Why is HttpError needed?
+For the Backend to set the right httpStatusCode
+Maybe it's enough to just have it as AppError with httpStatusCode?
+
+Rename HttpError to HttpRequestError, which is the same as FetchError
+HttpErrorResponse becomes BackendErrorResponseObject (detected by name and message)
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..63352108 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ + + + + + + js-lib + + + + + + + + + + + + + +
Skip to content

js-lib

Standard library for universal (browser + Node.js) javascript

npmmin.gz sizeActionsloc

MaintainabilityTest Coveragecode style: prettier

Design

Inspired by Lodash, bluebird, promise-fun and other useful small packages.

Designed to play well with the rest of opinionated "Natural Cycles JS Platform" (link pending). This package is the lowest-level production dependency (not devDependency) of the Platform. Almost everything else depends on it.

All functions in this package are exported in index.ts (flat), no namespacing is used. So, to avoid conflicts and "global import namespace" pollution , all functions are prefixed with an underscore (e.g _.pick becomes _pick), with some exceptions (later). Promise functions are prefixed with p, e.g pMap.

Decorators are _prefixed and PascalCased (e.g @_Debounce). _is to be consistent with other naming in this package. PascalCase is to distinguish decorators from similar functions that are not decorators. Example:\_debounceis a function (lodash-based),\_Debounceis a decorator (used as@\_Debounce). PascalCase convention follows Angular/Ionic convention (but doesn't follow TypeScript documentation convention; we had to pick one).

Interfaces and Classes are named as usual (no prefix, PascalCase, e.g AppError).

Q: Why not just use lodash?

A:

  • We believe Lodash is outdated (many functions are pre-ES6 / obsolete by ES6).
  • Because it has so many outdated functions - its size is bigger, and solutions to tree-shake exist, but complicated.
  • First-class TypeScript support (all code in this repo is TypeScript).

This package is intended to be 0-dependency (exception: tslib from TypeScript), "not bloated", tree-shakeable. Supported by reasonably modern Browsers and Node.js latest LTS.

To fulfil that requirement it exports ESM version (for Browsers) as es2017.

Exports default CJS version for Node as es2019 (with native async/await, for better performance, async stack-traces, etc).

Mutation

All function does NOT mutate the arguments by default.

Many functions support "mutation flag", which can be set to true to perform a mutation.

For example:

ts
const obj = { a: 'a', b: 'b' }
+
+// Non-mutating (default)
+const obj2 = _pick(obj, ['a'])
+// { a: 'a' }
+
+// Mutating (opt-in)
+_pick(obj, ['a'], true)
+// obj was mutated

Highlights

Packaging

  • engines.node >= Node.js LTS
  • main: dist/index.js: commonjs, es2021 - targeting Node.js
  • module: dist-esm/index.js: esm, es2017 - targeting Browsers
  • types: dist/index.d.ts: typescript types
  • /src folder with source *.ts files included
+ + + + \ No newline at end of file diff --git a/json.html b/json.html new file mode 100644 index 00000000..cca665b0 --- /dev/null +++ b/json.html @@ -0,0 +1,44 @@ + + + + + + Json | js-lib + + + + + + + + + + + + + +
Skip to content

Json

_jsonParseIfPossible

Attempts to parse object as JSON.

Returns original object if JSON parse failed (silently).

ts
_jsonParseIfPossible('abc') // 'abc' (no change, not a json string)
+_jsonParseIfPossible(null) // null (no change)
+_jsonParseIfPossible({ a: 'a' }) // {a: 'a'} (same object, not a json string)
+_jsonParseIfPossible('{"a": "a"}') // {a: 'a'} gotcha! parsed json string into an object!

_stringify

Inspired by _inspect from nodejs-lib, which is based on util.inpect that is not available in the Browser.

Transforms any to human-readable string (via JSON.stringify pretty).

Safe (no error throwing).

Correclty prints Error, AppError, ErrorObject: error.message + '\n' + _stringify(error.data)

Enforces max length (default to 1000, pass 0 to skip it).

Logs numbers as-is (as a String), e.g: 6.

Logs strings as-is (without single quotes around, unlike default util.inspect behavior).

Otherwise - just uses JSON.stringify.

Returns empty_string string if empty string is passed.

Returns undefined (not a string, but actual undefined) if undefined is passed (default util.inspect behavior).

ts
_stringify(undefined) // 'undefined'
+_stringify(null) // 'null'
+_stringify(true) // 'true'
+_stringify(false) // 'false'
+_stringify(NaN) // 'null'
+_stringify(Infinity) // 'null'
+_stringify('') // 'empty_string'
+_stringify(' ') // 'empty_string'
+_stringify('ho ho ho') // 'ho ho ho'
+_stringify(15) // '15'
+_stringify(new Error('some msg')) // 'Error: some msg'
+
+// AppError is stringified with it's Data object
+_stringify(new AppError('some msg', { k1: 'v1' }))
+// 'AppError: some msg\n
+// {
+//   "k1": "v1"
+// }'
+ + + + \ No newline at end of file diff --git a/lazy.html b/lazy.html new file mode 100644 index 00000000..358e1508 --- /dev/null +++ b/lazy.html @@ -0,0 +1,37 @@ + + + + + + Lazy | js-lib + + + + + + + + + + + + + +
Skip to content

Lazy

_lazyValue

Based on: https://github.com/sindresorhus/lazy-value

ts
const value = _lazyValue(() => expensiveComputation())
+
+value() // calls expensiveComputation() once
+value() // returns cached result
+value() // returns cached result

_defineLazyProperty

Based on: https://github.com/sindresorhus/define-lazy-prop

ts
interface Obj {
+  v: number
+}
+
+const obj = {} as Obj
+
+_defineLazyProperty(obj, 'v', () => expensiveComputation())
+obj.v // runs expensiveComputation() once
+obj.v // cached value
+obj.v // cached value

_defineLazyProps

Like _defineLazyProperty, but allows to define multiple props at once.

+ + + + \ No newline at end of file diff --git a/math.html b/math.html new file mode 100644 index 00000000..9167958d --- /dev/null +++ b/math.html @@ -0,0 +1,63 @@ + + + + + + Math | js-lib + + + + + + + + + + + + + +
Skip to content

Math

_randomInt

Returns a random integer in the provided range. As usual, lower-bound is inclusing, while higher-bound is exclusive. Unusually, both lower and higher bounds are inclusive.

ts
_randomInt(1, 3)
+// 1
+// 3
+// 2

_randomArrayItem

Returns a random item from the given array.

Don't use it on empty array. It'll return undefined in that case, but that is not reflected in function's output type!

ts
const a = [1, 2, 3]
+_randomArrayItem(a)
+// random of 1, 2 or 3

_createDeterministicRandom

Returns a "deterministic Math.random() function".

Useful to make tests that need to use Math.random() deterministic.

ts
const deterministicRandom = _createDeterministicRandom()
+
+deterministicRandom()
+// => 0.9872818551957607
+
+deterministicRandom()
+// => 0.34880331158638

Based on this gist which is based on Robert Jenkins’ 32 bit integer hash function.

_average

Calculate an average of the array of numbers.

ts
_average([1, 2, 3, 4])
+// 2.5

_averageWeighted

Calculate a "weighted average", given the array of numbers and corresponding array of weights.

ts
const numbers = [1, 2]
+const weights = [3, 1]
+_averageWeighted(numbers, weights)
+// 1.25

_median

Calculate a Median of the array of numbers.

ts
_median([1, 2, 3]) // 2
+_median([1, 2, 3, 4]) // 2.5
+_median([1, 1, 1, 3, 999]) // 1

_percentile

Calculate a Percentile of the array of numbers.

ts
const numbers = [1200, 1400]
+_percentile(numbers, 0) // 1200
+_percentile(numbers, 10) // 1220
+_percentile(numbers, 20) // 1240
+_percentile(numbers, 30) // 1260
+_percentile(numbers, 40) // 1280
+_percentile(numbers, 50) // 1300
+_percentile(numbers, 60) // 1320
+_percentile(numbers, 70) // 1340
+_percentile(numbers, 80) // 1360
+_percentile(numbers, 90) // 1380
+_percentile(numbers, 100) // 1400

SimpleMovingAverage

ts
// SMA with the size of 2:
+const sma = new SimpleMovingAverage(2)
+sma.avg // 0 by default, when no numbers were pushed
+
+sma.push(1) // [1]
+sma.avg // 1
+
+sma.push(2) // [1, 2]
+sma.avg // 1.5
+
+sma.push(3) // [1, 2, 3]
+sma.avg // 2.5
+ + + + \ No newline at end of file diff --git a/number.html b/number.html new file mode 100644 index 00000000..6f46ddc4 --- /dev/null +++ b/number.html @@ -0,0 +1,59 @@ + + + + + + Number | js-lib + + + + + + + + + + + + + +
Skip to content

Number

_inRange

Checks if the provided number (1st argument) is withing range of 2nd and 3rd argument. As usual, lower-bound is inclusive, while higher-boung is exclusive.

ts
_inRange(-10, 1, 5)
+// false
+
+_inRange(1, 1, 5)
+// true
+
+_inRange(3, 1, 5)
+// true
+
+_inRange(5, 1, 5)
+// false
+
+_inRange(7, 1, 5)
+// false

_clamp

Inspired by Lodash's _clamp.

"Clamps" (fits) the number (first argument) within the min/max ranges of 2nd/3rd arguments (range inclusive).

ts
// range is always [5, 10] in these cases
+_clamp(3, 5, 10) // 5
+_clamp(4, 5, 10) // 5
+_clamp(5, 5, 10) // 5
+_clamp(6, 5, 10) // 6
+_clamp(9, 5, 10) // 9
+_clamp(10, 5, 10) // 10
+_clamp(11, 5, 10) // 10

_toFixed

Same as Number.toFixed, but conveniently casts the output to Number.

ts
_toFixed(1.2345, 2)
+// 1.23
+
+_toFixed(1.1, 2)
+// 1.1
+// not '1.10' !

_toPrecision

Same as Number.toPrecision(), but conveniently casts the output to Number.

ts
_toPrecision(1634.56, 1)
+// 2000
+
+_toPrecision(1234.56, 2)
+// 1600

_round

Round (like Math.round) the Number to the nearest "discriminator" (2nd argument):

ts
_round(1634, 1000) // 2000
+_round(1634, 500) // 1500
+_round(1634, 100) // 1600
+_round(1634, 10) // 1630
+_round(1634, 1) // 1634
+_round(1634.5678, 0.1) // 1634.6
+_round(1634.5678, 0.01) // 1634.57
+ + + + \ No newline at end of file diff --git a/object.html b/object.html new file mode 100644 index 00000000..32f529c7 --- /dev/null +++ b/object.html @@ -0,0 +1,304 @@ + + + + + + Object | js-lib + + + + + + + + + + + + + +
Skip to content

Object

_pick

Inspired by Lodash's _.pick.

ts
_pick({ a: 'a', b: 'b', c: 'c' }, ['a', 'b'])
+// { a: 'a', b: 'b' }
+
+_pick({ a: 'a', b: 'b', c: 'c' }, ['a'])
+// { a: 'a' }
+
+_pick({ a: 'a', b: 'b', c: 'c' }, ['d'])
+// {}
+
+_pick({ a: 'a', b: 'b', c: 'c' }, [])
+// {}
+
+// Supports "mutation flag" which would mutate the object and return it (same object):
+const obj = { a: 'a', b: 'b', c: 'c' }
+const obj2 = _pick(obj, ['a'], true)
+obj === obj2 // true

_omit

Inspired by Lodash's _.omit. The opposite of _pick.

ts
_omit({ a: 'a', b: 'b', c: 'c' }, ['a', 'b'])
+// { c: 'c' }
+
+_omit({ a: 'a', b: 'b', c: 'c' }, ['a'])
+// {  b: 'b', c: 'c' }
+
+_omit({ a: 'a', b: 'b', c: 'c' }, ['d'])
+// { a: 'a', b: 'b', c: 'c' }
+
+_omit({ a: 'a', b: 'b', c: 'c' }, [])
+// { a: 'a', b: 'b', c: 'c' }
+
+// Supports "mutation flag" which would mutate the object and return it (same object):
+const obj = { a: 'a', b: 'b', c: 'c' }
+const obj2 = _omit(obj, ['a', 'b'], true)
+obj === obj2 // true

_mask

Similar to _omit, but supports deep object access via dot-notation (a.b). Supports "mutation flag" argument.

ts
const obj = {
+  a: 'a',
+  b: {
+    b1: 'b1',
+    b2: 'b2',
+  },
+}
+
+_mask(obj, ['b.b1'])
+// { a: 'a', b: { b1: 'b1' }}
+
+_mask(obj, ['b.b1'], true)
+// obj was mutated

_filterFalsyValues

Returns an object with all Falsy values filtered out. Non-mutating by default.

ts
_filterFalsyValues({
+  a: 'a',
+  b: '', // falsy
+  c: 0, // falsy
+  d: [], // not falsy
+})
+// { a: 'a', d: [] }

_filterNullishValues

Returns an object with all Nullish (null or undefined) values filtered out. Non-mutating by default.

ts
_filterNullishValues({
+  a: 'a',
+  b: null, // nullish
+  c: undefined, // nullish
+  d: '', // not nullish
+})
+// { a: 'a', d: '' }

_filterUndefinedValues

Returns an object with all undefined values filtered out. null values are kept.

Non-mutating by default.

ts
_filterUndefinedValues({
+  a: 'a',
+  b: null,
+  c: undefined, // removed
+  d: '',
+})
+// { a: 'a', b: null, d: '' }

_filterEmptyArrays

Returns an object will all empty arrays filtered out. Non-mutating by default.

ts
_filterEmptyArrays({
+  a: 'a',
+  b: [], // empty array
+  c: 'c',
+})
+// { a: 'a', c: 'c' }

_filterEmptyValues

Filters the object by removing all key-value pairs where Value is Empty (according to _isEmpty() specification).

ts
_filterEmptyValues({
+  a: 0,
+  b: '',
+  c: [],
+  d: {},
+  e: {
+    f: [],
+  },
+  g: new Set(),
+  h: 'h',
+})
+// {
+//   a: 0,
+//   e: {
+//     f: [],
+//   },
+//   h: 'h',
+//  })

_filterObject

Returns clone of obj without properties that does not pass predicate. Allows filtering by both key and value.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Predicate to keep only even-numbered values
+_filterObject(obj, (_k, v) => v % 2 === 0)
+// { b: 2 }
+
+// Predicate to only keep keys that start with `a`
+_filterObject(obj, (k, _v) => k.startsWith('a'))
+// { a: 1 }

_mapKeys

Returns a clone of obj with modified Keys, based on a Mapper function.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Mapper to add `_odd` or `_even` to the object key, based on its value
+_mapKeys(obj, (k, v) => k + (v % 2 ? '_odd' : '_even'))
+// { a_odd: 1, b_even: 2, c_odd: 3 }

_mapValues

Returns a clone of obj with modified Values, based on a Mapper function.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Mapper to multiply object values by 2
+_mapValues(obj, (_k, v) => v * 2)
+// { a: 2, b: 4, c: 6 }

_mapObject

Returns a clone of obj where both Keys and Values can be modified by a Mapper function. Mapper function needs to return a Tuple [key, value].

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+// Mapper to multiply object values by 2, and append the value to the end of the key
+_mapObject(obj, (k, v) => {
+  const newValue = v * 2
+  return [k + newValue, newValue]
+})
+// { a2: 2, b4: 4, c6: 6 }

_findKeyByValue

Fiven an object, find a key string for a given value: any.

Inspired by Lodash's _.findKey.

ts
const obj = {
+  a: 1,
+  b: 2,
+  c: 3,
+}
+
+_findKeyByValue(obj, 1) // 'a'
+_findKeyByValue(obj, 2) // 'b'
+_findKeyByValue(obj, 3) // 'c'
+_findKeyByValue(obj, 4) // undefined

_objectNullValuesToUndefined

Returns a clone of the object where null values are replaced with undefined

ts
const obj = {
+  a: 1, // intact
+  b: null, // replaced with `undefined`
+  c: undefined, // intact
+}
+
+_objectNullValuesToUndefined(obj)
+// { a: 1, b: undefined, c: undefined }

_deepCopy

Does a deep copy of an object.

Actually, it is just a semantic function that internally does JSON.parse(JSON.stringify(o)), which is currently the fastest+simplest+relyable way to do a deep copy.

Because it does JSON.parse/stringify - it'll remove undefined values/keys from objects.

ts
const obj = { a: 'a', b: { bb: 'bb' } }
+const obj2 = _deepCopy(obj)
+// Deep copy of obj

_isPrimitive

Returns Boolean indication if passed value is a primitive.

ts
_isPrimitive(5)
+// true
+
+_isPrimitive({ a: 'a' })
+// false

Best specification is the source code:

ts
export function _isPrimitive(v: any): v is null | undefined | number | boolean | string {
+  return (
+    v === null ||
+    v === undefined ||
+    typeof v === 'number' ||
+    typeof v === 'boolean' ||
+    typeof v === 'string'
+  )
+}

_isEmpty

Object is considered empty if it's one of:

  • undefined
  • '' (empty string)
  • [] (empty array)
  • {} (empty object)
  • new Map() (empty Map)
  • new Set() (empty Set)

_undefinedIfEmpty

Returns undefined if it's empty (according to _isEmpty() specification), otherwise returns the original object.

ts
_undefinedIfEmpty('') // undefined, because it's empty
+_undefinedIfEmpty([]) // undefined, because it's empty
+_undefinedIfEmpty(new Map()) // undefined, because it's empty
+_undefinedIfEmpty('a') // 'a', intact
+_undefinedIfEmpty(false) // false, intact

_merge

Deeply merges the second object into the first one. Returns the first object (merged). Mutates the first object!

ts
const obj1 = {
+  a: 'a',
+  b: {
+    bb1: 'bb1',
+  },
+}
+
+const obj2 = {
+  b: {
+    bb2: 'bb2',
+  },
+  c: 'c',
+}
+
+_merge(obj1, obj2)
+// {
+//   a: 'a',
+//   b: {
+//     bb1: 'bb1',
+//     bb2: 'bb2',
+//   },
+//   c: 'c',
+// }

_deepTrim

Deeply traverses the object and trims all String values found.

ts
const o = {
+  a: 'abc ',
+  b: 'c',
+  d: 12,
+  e: {
+    f: '  sd a ',
+  },
+}
+
+_deepTrim(o)
+// {
+//   a: 'abc',
+//   b: 'c',
+//   d: 12,
+//   e: {
+//     f: 'sd a',
+//   },
+// }

_sortObjectDeep

Based on IndigoUnited/js-deep-sort-object.

Deeply traverses the object and makes it "sort-stable" (deterministic). Useful for e.g snapshot-testing, or in any place where sort-stable result is expected. Resulting object is still Equal to the original object.

  • Arrays are sorted order-preserved (!), because array order has a meaning and shouldn't be changed (!).
  • Objects are sorted by their key name.
ts
const obj = {
+  b: 'b',
+  c: ['c3', 'c1', 'c2'],
+  a: 'a',
+}
+
+_sortObjectDeep(obj)
+// {
+//   a: 'a',
+//   b: 'b',
+//   c: ['c1', 'c2', 'c3'],
+// }

_sortObject

Allows to sort object by the list of known keys.

Example:

ts
const obj = {
+  b: 'b',
+  c: 'c',
+  extra: 'extra',
+  a: 'a',
+}
+
+_sortObject(obj, ['a', 'b', 'c'])
+// {
+//   a: 'a',
+//   b: 'b',
+//   c: 'c',
+//   extra: 'extra',
+// }

_deepEquals

Based on epoberezkin/fast-deep-equal.

Performance-optimized function to check if objects (values) are deeply-equal to each other.

ts
const obj1 = {
+  a: 'a',
+  b: {
+    bb: 'bb',
+  },
+}
+
+// Different key order, but still equals
+const obj2 = {
+  b: {
+    bb: 'bb',
+  },
+  a: 'a',
+}
+
+const obj3 = {
+  a: 'a',
+  b: {
+    bb: 'bb3', // not equal!
+  },
+}
+
+_deepEquals(obj1, obj2) // true
+_deepEquals(obj1, obj3) // false
+_deepEquals(obj2, obj3) // false

_invert

Returns an Object with "inverted" keys and values.

ts
const obj = {
+  a: '1',
+  b: '2',
+}
+
+_invert(obj)
+// {
+//   '1': 'a',
+//   '2': 'b',
+// }

_invertMap

Returns a Map with "inverted" keys and values.

ts
const map = new Map<string, number>([
+  ['a', 1],
+  ['b', 2],
+])
+
+_invertMap(map)
+// Map
+//   1 => 'a'
+//   2 => 'b'

_get, _has, _set, _unset

Gets the object value via the famous "dot-notation":

ts
const obj = {
+  a: 'a',
+  b: {
+    bb: 'bb',
+  },
+}
+
+_get(obj, 'b.bb') // 'bb'
+_has(obj, 'b.bb') // true
+_has(obj, 'b.bb2') // false
+_set(obj, 'b.bb2', 'bb2value') // sets obj.b.bb2 to 'bb2Value'
+_unset(obj, 'b.bb') // deletes obj.b.bb

_stringMapValues

Needed due to https://github.com/microsoft/TypeScript/issues/13778
Only affects typings, no runtime effect.

ts
const map: StringMap = {
+  a: 'a',
+  b: 'b',
+}

Before:

ts
const values = Object.values(map)
+// values: (string | undefined)[]

After:

ts
const values = _stringMapValues(map)
+// values: string[]

_stringMapEntries

Needed due to https://github.com/microsoft/TypeScript/issues/13778
Only affects typings, no runtime effect.

ts
const map: StringMap = {
+  a: 'a',
+  b: 'b',
+}

Before:

ts
const entries = Object.entries(map)
+// entries: [string, string | undefined][]

After:

ts
const entries = _stringMapEntries(map)
+// entries: [string, string][]
+ + + + \ No newline at end of file diff --git a/promise.html b/promise.html new file mode 100644 index 00000000..c22d172a --- /dev/null +++ b/promise.html @@ -0,0 +1,80 @@ + + + + + + Promise | js-lib + + + + + + + + + + + + + +
Skip to content

Promise

Inspired by bluebird and Sindre's promise-fun packages.

"Copy-pasted" (with small adjustments) here, because:

  1. Bluebird is outdated (pre-ES6)

  2. p-* packages are amazing, but not all of them are needed. Some of them are very much needed though.

  3. To fix issues with Types. Here, everything is TypeScript, so, first class support and sync.

  4. To fix issues with IDE auto-imports, which is still quite bad for "default exported" packages.

Downside is that (as every fork) we lose "auto-update" possibility from these packages. We believe it's not as bad, because packages imported here have mature API and stability (example: pMap).

pMap

Based on p-map

Allows to asynchronously map an array of Promises, with options to:

  • control concurrency (default: Infinity)
  • control error behavior (ErrorMode):
    • THROW_IMMEDIATELY (default)
    • THROW_AGGREGATED: throw AggregateError in the end of execution, if at least 1 error happened
    • SUPPRESS: completely suppress (ignore) errors
ts
const promises = [
+   fetch(...),
+   fetch(...),
+   fetch(...),
+]
+const results = await pMap(promises, async r => { ... }, {
+  concurrency: 2,
+  errorMode: ErrorMode.SUPPRESS,
+})

pProps

Based on p-props

Syntax-sugar to concurrently execute multiple promises and map their results to named properties.

Before:

ts
const [r1, r2, r3] = await Promise.all([
+  fetch(...),
+  fetch(...),
+  fetch(...),
+])

After:

ts
const {r1, r2, r3} = await pProps({
+  r1: fetch(...),
+  r2: fetch(...),
+  r3: fetch(...),
+})

pFilter

Based on p-filter

Allows to asynchrously filter an array of Promises.

ts
const promises = [
+   fetch(...),
+   fetch(...),
+   fetch(...),
+]
+
+const results = await pFilter(promises, async r => (await r.json()).success)

pDefer

Allows to create a "ResolvablePromise", which is a normal native Promise (so, can be awaited, etc), extended with .resolve() and .reject() methods, so you can control it. Similar to jQuery's Deferred, or RxJS's Subject (which is both an Observable and allows to emit values).

Sometimes useful to "promisify" a callback-style API.

ts
async function run(): Promise<string> {
+  const defer = pDefer<string>()
+
+  someOldApi(
+    (result: string) => {
+      defer.resolve(result)
+    },
+    err => defer.reject(err),
+  )
+
+  return await defer.promise
+}

pDelay

Based on p-delay

Just a fancy async/await style setTimeout

Before:

ts
await new Promise(resolve => setTimeout(resolve, 500))

After:

ts
await pDelay(500)

Allows to return a value:

ts
const res = await pDelay(500, 'hello')
+// hello

pRetry

Based on p-retry

Returns a Function (!), enhanced with retry capabilities.

Simplest example:

ts
const save = pRetry(async () => await dao.save())
+
+await save()
+// will retry 3 times, with default delay of 1 second and exponential back-off (x2 delay multiplier)

Advanced example (with options):

ts
const save = pRetry(async () => await dao.save(), {
+  maxAttempts: 5,
+  predicate: err => err?.message.includes('GOAWAY'),
+})
+
+await save()
+// will try up to 5 times, but only if err.message contains GOAWAY

pTimeoutFn

Based on p-timeout

Decorates a Function with a timeout.

Throws an Error if the Function is not resolved in a certain time.

If the Function rejects - passes this rejection further.

ts
const decoratedFn = pTimeout(someFunction, { timeout: 1000 })
+
+await decoratedFn()
+// will throw Timeout error if `someFunction` is not finished in 1000 ms.
+// otherwise will pass

pHang

Syntax-sugar for returning a never-resolving ("hung") Promise.

Has semantic meaning, telling us that this Promise is meant to never get resolved or rejected.

Before:

ts
return new Promise()

After:

ts
return pHang()

Useful e.g when you do location.reload() (let's say, you want to reload the page after being logged-in as an Admin) and want your BlockingLoader to never stop spinning:

ts
async function adminLogin(): Promise<void> {
+  location.href = '/admin'
+  return pHang()
+}

pState

Returns Promise's "state" as a String, one of:

  • pending
  • resolved
  • rejected
ts
const p = new Promise()
+await pState(p)
+// 'pending'
+
+const p = new Promise.resolve()
+await pState(p)
+// 'resolved'
+ + + + \ No newline at end of file diff --git a/string.html b/string.html new file mode 100644 index 00000000..85290f9c --- /dev/null +++ b/string.html @@ -0,0 +1,58 @@ + + + + + + String | js-lib + + + + + + + + + + + + + +
Skip to content

String

_capitalize

Capitalizes first char, lowercases the rest of the string.

ts
_capitalize('hello') // Hello
+_capitalize('HELLO') // HELLO (no change)
+_capitalize('hello world') // Hello world

_upperFirst

Uppercases first char.

ts
_upperFirst('hello') // Hello
+_upperFirst('HELLO') // HELLO (no change)
+_upperFirst('hELLO') // HELLO

_lowerFirst

Lowercases first char.

ts
_lowerFirst('Hello') // hello
+_lowerFirst('hello') // hello (no change)
+_lowerFirst('HELLO') // hELLO

_camelCase 🐪

Transforms the input string to camelCase 🐪. Implementation adapted from Lodash.

ts
_camelCase('la la la')
+_camelCase('la_la_la')
+_camelCase('la-la-la')
+// laLaLa

_snakeCase 🐍

Transforms the input string to snake_case 🐍. Implementation adapted from Lodash.

ts
_snakeCase('la la la')
+_snakeCase('la-la-la')
+_snakeCase('laLaLa')
+// la_la_la

_kebabCase 🥙

Transforms the input string to kebab-case 🥙. Implementation adapted from Lodash.

ts
_kebabCase('la la la')
+_kebabCase('la_la_la')
+_kebabCase('laLaLa')
+// la-la-la

_split

Like String.split, but with the limited number of tokens.

ts
_split('a_b_c', '_', 2)
+// ['a', 'b_c']

_substringBefore

ts
_substringBefore('file1.test.ts', '.')
+// 'file1'
+
+_substringBefore('file1.test.ts', '.ts')
+// 'file1.test'

_substringBeforeLast

ts
_substringBeforeLast('file1.test.ts', '.')
+// 'file1.test'

_substringAfter

ts
_substringAfter('file1.test.ts', '.')
+// 'test.ts'

_substringAfterLast

ts
_substringAfterLast('file1.test.ts', '.')
+// 'ts'

_substringBetweenLast

ts
const s = '/Users/lalala/someFile.test.ts'
+_substringBetweenLast(s, '/', '.'))
+// 'someFile'

_truncate

Truncates the string to the needed length, putting ... (or a custom "ending") in the end, if needed. The maxLen (second argument) includes the "ending string" (3rd argument).

ts
_truncate('Hello World!', 5) // 'He...'
+_truncate('Hello World!', 6) // 'Hel...'
+_truncate('Hello World!', 100) // 'Hello World!' (no truncation needed)
+
+// Custom "ending"
+_truncate('Hello World!', 5, '|') // 'Hell|'

_truncateMiddle

Truncates the string in the middle.

ts
_truncateMiddle('abcdefghijklmnopqrstuvwxyz', 10)
+// 'abcd...xyz'

_replaceAll

Polyfill for String.prototype.replaceAll.

Based on regex implementation (slightly faster than "split/join" implementation).

_nl2br

Converts \n (aka new-line) to <br>, to be presented in HTML.

Keeps \n, so if it's printed in non-HTML environment it still looks ok-ish.

_parseQueryString

Parses location.search string (e.g ?a=1&b=2) into a StringMap, e.g: { a: '1', b: '2' }

Pass location.search to it in the Frontend, or any other string on the Backend (where location.search is not available).

Works both with and without leading ? character.

Yes, there's URLSearchParams existing in the Frontend (not in Node yet), but it's API is not as convenient. And the implementation here is super-small.

Goal of this function is to produce exactly same output as URLSearchParams would.

ts
// Assuming url is http://example.com?a=1&b=2
+
+_parseQueryString(location.search)
+// { a: '1', b: '2' }
+ + + + \ No newline at end of file diff --git a/time.html b/time.html new file mode 100644 index 00000000..73d56439 --- /dev/null +++ b/time.html @@ -0,0 +1,38 @@ + + + + + + Time | js-lib + + + + + + + + + + + + + +
Skip to content

Time

_ms

Prints a human-string for a given number of milliseconds.

ts
_ms(1) // '1 ms'
+_ms(10) // '10 ms'
+_ms(1005) // '1.005 sec'
+_ms(49123) // '49 sec'
+_ms(60000) // '1m0s'
+_ms(60912) // '1m0s'
+_ms(69123) // '1m9s'
+_ms(3292100) // '54m52s'
+_ms(69642430) // '19h20m'
+_ms(101963481) // '28h'

_since

Useful to measure and human-print the "time elapsed since".

ts
const started = Date.now()
+
+// ... do stuff!
+
+console.log(`Took ${_since(started)}`)
+// Took 19m13s

Uses _ms for pretty-printing.

_debounce

Debounce function from Lodash.

See the typescript declaration for Options.

ts
const fn = _debounce(originalFn, 100, { leading: false, trailing: false, maxWait: 300 })

_throttle

Throttle function from Lodash.

See the typescript declaration for Options.

ts
const fn = _throttle(originalFn, 100)
+ + + + \ No newline at end of file diff --git a/types.html b/types.html new file mode 100644 index 00000000..c82da8f4 --- /dev/null +++ b/types.html @@ -0,0 +1,34 @@ + + + + + + Types | js-lib + + + + + + + + + + + + + +
Skip to content

Types

Things that should exist in type-fest, but don't (yet).

Some types are copy-pasted from type-fest, because:

  1. To not introduce (another) dependency of this 0-dep lib
  2. To avoid multiple type-fest versions conflicts (that happened many times in the past)

StringMap

ts
const m: StringMap = { a: 'a' }
+// Same as:
+// const m: { [a: string]: string | undefined }
+
+const m: StringMap<number> = { a: 5 }
+// Same as:
+// const m: { [a: string]: number | undefined }

The | undefined part is important!

It allows to set undefined values to StringMap, e.g:

ts
m.name = name1 // where `name1` can be undefined

Mapper

ts
export type Mapper<IN = any, OUT = any> = (input: IN, index: number) => OUT

AsyncMapper

ts
export type AsyncMapper<IN = any, OUT = any> = (input: IN, index: number) => OUT | PromiseLike<OUT>

Predicate

ts
export type Predicate<T> = (item: T, index: number) => boolean

Async Predicate

ts
export type AsyncPredicate<T> = (item: T, index: number) => boolean | PromiseLike<boolean>

_passthroughPredicate

Predicate that passes everything (returns true for every item).

ts
_passthroughPredicate(anything) // true
+  [(1, 2, 3)].filter(_passthroughPredicate)
+// [1, 2, 3]

_passNothingPredicate

Predicate that passes nothing (returns false for every item).

ts
_passNothingPredicate(anything) // false
+  [(1, 2, 3)].filter(_passNothingPredicate)
+// []

_noop

Function that takes any arguments and returns undefined. Literally does nothing.

Can be useful to replace some real world functions with mocks.

ts
element.click = _noop

Merge

ReadonlyDeep

Promisable

PromiseValue

+ + + + \ No newline at end of file diff --git a/units.html b/units.html new file mode 100644 index 00000000..795604d7 --- /dev/null +++ b/units.html @@ -0,0 +1,31 @@ + + + + + + Units | js-lib + + + + + + + + + + + + + +
Skip to content

Units

_kb, _mb, _gb, _hb

Human-prints byte number into kilobytes, megabytes, gigabutes and "human-bytes" (_hb):

ts
_hb(0) // '0 byte(s)'
+_hb(500) // '500 byte(s)'
+_hb(1000) // '1 Kb'
+_hb(1024 ** 2) // '1 Mb'
+_hb(1024 ** 3) // '1 Gb'
+_kb(1000) // 1
+_mb(1024 ** 2) // 1
+_gb(1024 ** 3) // 1
+ + + + \ No newline at end of file