Laptop-Thing/web/node_modules/.vite/deps/svelte_reactivity.js.map

8 lines
27 KiB
Plaintext
Raw Normal View History

2024-11-27 12:35:48 -05:00
{
"version": 3,
"sources": ["../../svelte/src/reactivity/date.js", "../../svelte/src/reactivity/set.js", "../../svelte/src/reactivity/map.js", "../../svelte/src/reactivity/url-search-params.js", "../../svelte/src/reactivity/url.js"],
"sourcesContent": ["/** @import { Source } from '#client' */\nimport { DESTROYED } from '../internal/client/constants.js';\nimport { derived } from '../internal/client/index.js';\nimport { source, set } from '../internal/client/reactivity/sources.js';\nimport { get } from '../internal/client/runtime.js';\n\nvar inited = false;\n\nexport class SvelteDate extends Date {\n\t#time = source(super.getTime());\n\n\t/** @type {Map<keyof Date, Source<unknown>>} */\n\t#deriveds = new Map();\n\n\t/** @param {any[]} params */\n\tconstructor(...params) {\n\t\t// @ts-ignore\n\t\tsuper(...params);\n\t\tif (!inited) this.#init();\n\t}\n\n\t#init() {\n\t\tinited = true;\n\n\t\tvar proto = SvelteDate.prototype;\n\t\tvar date_proto = Date.prototype;\n\n\t\tvar methods = /** @type {Array<keyof Date & string>} */ (\n\t\t\tObject.getOwnPropertyNames(date_proto)\n\t\t);\n\n\t\tfor (const method of methods) {\n\t\t\tif (method.startsWith('get') || method.startsWith('to') || method === 'valueOf') {\n\t\t\t\t// @ts-ignore\n\t\t\t\tproto[method] = function (...args) {\n\t\t\t\t\t// don't memoize if there are arguments\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tif (args.length > 0) {\n\t\t\t\t\t\tget(this.#time);\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\treturn date_proto[method].apply(this, args);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar d = this.#deriveds.get(method);\n\n\t\t\t\t\tif (d === undefined || (d.f & DESTROYED) !== 0) {\n\t\t\t\t\t\td = derived(() => {\n\t\t\t\t\t\t\tget(this.#time);\n\t\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t\treturn date_proto[method].apply(this, args);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tthis.#deriveds.set(method, d);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn get(d);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (method.startsWith('set')) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tproto[method] = function (...args) {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tvar result = date_proto[method].apply(this, args);\n\t\t\t\t\tset(this.#time, date_proto.getTime.call(this));\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n", "/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { source, set } from '../internal/client/reactivity/sources.js';\nimport { get } from '../internal/client/runtime.js';\nimport { increment } from './utils.js';\n\nvar read_methods = ['forEach', 'isDisjointFrom', 'isSubsetOf', 'isSupersetOf'];\nvar set_like_methods = ['difference', 'intersection', 'symmetricDifference', 'union'];\n\nvar inited = false;\n\n/**\n * @template T\n * @extends {Set<T>}\n */\nexport class SvelteSet extends Set {\n\t/** @type {Map<T, Source<boolean>>} */\n\t#sources = new Map();\n\t#version = source(0);\n\t#size = source(0);\n\n\t/**\n\t * @param {Iterable<T> | null | undefined} [value]\n\t */\n\tconstructor(value) {\n\t\tsuper();\n\n\t\t// If the value is invalid then the native exception will fire here\n\t\tif (DEV) value = new Set(value);\n\n\t\tif (value) {\n\t\t\tfor (var element of value) {\n\t\t\t\tsuper.add(element);\n\t\t\t}\n\t\t\tthis.#size.v = super.size;\n\t\t}\n\n\t\tif (!inited) this.#init();\n\t}\n\n\t// We init as part of the first instance so that we can treeshake this class\n\t#init() {\n\t\tinited = true;\n\n\t\tvar proto = SvelteSet.prototype;\n\t\tvar set_proto = Set.prototype;\n\n\t\tfor (const method of read_methods) {\n\t\t\t// @ts-ignore\n\t\t\tproto[method] = function (...v) {\n\t\t\t\tget(this.#version);\n\t\t\t\t// @ts-ignore\n\t\t\t\treturn set_proto[method].apply(this, v);\n\t\t\t};\n\t\t}\n\n\t\tfor (const method of set_like_methods) {\n\t\t\t// @ts-ignore\n\t\t\tproto[method] = function (...v) {\n\t\t\t\tget(this.#version);\n\t\t\t\t// @ts-ignore\n\t\t\t\tvar set = /** @type {Set<T>} */ (set_proto[method].apply(this, v));\n\t\t\t\treturn new SvelteSet(set);\n\t\t\t};\n\t\t}\n\t}\n\n\t/** @param {T} value */\n\thas(value) {\n\t\tvar has = super.has(value);\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(value);\n\n\t\tif (s === undefined) {\n\t\t\tif (!has) {\n\t\t\t\t// If the value doesn't exist, track the version in case it's added later\n\t\t\t\t// but don't create sources willy-nilly to track all
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAI,SAAS;AANb;AAQO,IAAM,cAAN,MAAM,oBAAmB,KAAK;AAAA;AAAA,EAOpC,eAAe,QAAQ;AAEtB,UAAM,GAAG,MAAM;AATV;AACN,8BAAQ,OAAO,MAAM,QAAQ,CAAC;AAG9B;AAAA,kCAAY,oBAAI,IAAI;AAMnB,QAAI,CAAC,OAAQ,uBAAK,gCAAL;AAAA,EACd;AAmDD;AA7DC;AAGA;AAJM;AAaN,UAAK,WAAG;AACP,WAAS;AAET,MAAI,QAAQ,YAAW;AACvB,MAAI,aAAa,KAAK;AAEtB,MAAI;AAAA;AAAA,IACH,OAAO,oBAAoB,UAAU;AAAA;AAGtC,aAAW,UAAU,SAAS;AAC7B,QAAI,OAAO,WAAW,KAAK,KAAK,OAAO,WAAW,IAAI,KAAK,WAAW,WAAW;AAEhF,YAAM,MAAM,IAAI,YAAa,MAAM;AAGlC,YAAI,KAAK,SAAS,GAAG;AACpB,cAAI,mBAAK,MAAK;AAEd,iBAAO,WAAW,MAAM,EAAE,MAAM,MAAM,IAAI;AAAA,QAC3C;AAEA,YAAI,IAAI,mBAAK,WAAU,IAAI,MAAM;AAEjC,YAAI,MAAM,WAAc,EAAE,IAAI,eAAe,GAAG;AAC/C,cAAI,QAAQ,MAAM;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