diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json index c38c897..75e4380 100644 --- a/.obsidian/appearance.json +++ b/.obsidian/appearance.json @@ -6,7 +6,7 @@ "accentColor": "", "monospaceFontFamily": "FiraCode Nerd Font Mono", "baseFontSizeAction": true, - "baseFontSize": 19, + "baseFontSize": 17, "enabledCssSnippets": [ "obsdian", "wide-dashboard", diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index f0b7ee5..1643eac 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -4,11 +4,9 @@ "better-export-pdf", "calendar", "obsidian-charts", - "obsidian-columns", "dataview", "drawio-obsidian", "obsidian-emoji-toolbar", - "obsidian-excalidraw-plugin", "excel", "extended-graph", "homepage", @@ -21,13 +19,11 @@ "rich-foot", "solve", "obsidian-style-settings", - "terminal", - "obsidian-plugin-todo", "unicode-search", - "workbooks", "obsidian-csv-table", "csv-lite", "background-image", "obsidian-pandoc", - "typst" + "chatgpt-md", + "obsidian-columns" ] \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json index 1de840a..2556f3e 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -39,6 +39,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.10289036731160874, + "scale": 0.09849900300199312, "close": true } \ No newline at end of file diff --git a/.obsidian/plugins/better-export-pdf/main.js b/.obsidian/plugins/better-export-pdf/main.js index 5ac26c0..d9dcd6a 100644 --- a/.obsidian/plugins/better-export-pdf/main.js +++ b/.obsidian/plugins/better-export-pdf/main.js @@ -1,20345 +1,5 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source, please visit the github repository of this plugin -*/ - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __typeError = (msg) => { - throw TypeError(msg); -}; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); -var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); -var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); -var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); -var __privateWrapper = (obj, member, setter, getter) => ({ - set _(value) { - __privateSet(obj, member, value, setter); - }, - get _() { - return __privateGet(obj, member, getter); - } -}); - -// node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js -var require_cjs = __commonJS({ - "node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(exports, module2) { - "use strict"; - var isMergeableObject = function isMergeableObject2(value) { - return isNonNullObject(value) && !isSpecial(value); - }; - function isNonNullObject(value) { - return !!value && typeof value === "object"; - } - function isSpecial(value) { - var stringValue = Object.prototype.toString.call(value); - return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value); - } - var canUseSymbol = typeof Symbol === "function" && Symbol.for; - var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103; - function isReactElement(value) { - return value.$$typeof === REACT_ELEMENT_TYPE; - } - function emptyTarget(val) { - return Array.isArray(val) ? [] : {}; - } - function cloneUnlessOtherwiseSpecified(value, options) { - return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value; - } - function defaultArrayMerge(target, source2, options) { - return target.concat(source2).map(function(element2) { - return cloneUnlessOtherwiseSpecified(element2, options); - }); - } - function getMergeFunction(key, options) { - if (!options.customMerge) { - return deepmerge; - } - var customMerge = options.customMerge(key); - return typeof customMerge === "function" ? customMerge : deepmerge; - } - function getEnumerableOwnPropertySymbols(target) { - return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { - return Object.propertyIsEnumerable.call(target, symbol); - }) : []; - } - function getKeys(target) { - return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)); - } - function propertyIsOnObject(object, property) { - try { - return property in object; - } catch (_) { - return false; - } - } - function propertyIsUnsafe(target, key) { - return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key)); - } - function mergeObject(target, source2, options) { - var destination = {}; - if (options.isMergeableObject(target)) { - getKeys(target).forEach(function(key) { - destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); - }); - } - getKeys(source2).forEach(function(key) { - if (propertyIsUnsafe(target, key)) { - return; - } - if (propertyIsOnObject(target, key) && options.isMergeableObject(source2[key])) { - destination[key] = getMergeFunction(key, options)(target[key], source2[key], options); - } else { - destination[key] = cloneUnlessOtherwiseSpecified(source2[key], options); - } - }); - return destination; - } - function deepmerge(target, source2, options) { - options = options || {}; - options.arrayMerge = options.arrayMerge || defaultArrayMerge; - options.isMergeableObject = options.isMergeableObject || isMergeableObject; - options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; - var sourceIsArray = Array.isArray(source2); - var targetIsArray = Array.isArray(target); - var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; - if (!sourceAndTargetTypesMatch) { - return cloneUnlessOtherwiseSpecified(source2, options); - } else if (sourceIsArray) { - return options.arrayMerge(target, source2, options); - } else { - return mergeObject(target, source2, options); - } - } - deepmerge.all = function deepmergeAll(array, options) { - if (!Array.isArray(array)) { - throw new Error("first argument should be an array"); - } - return array.reduce(function(prev, next2) { - return deepmerge(prev, next2, options); - }, {}); - }; - var deepmerge_1 = deepmerge; - module2.exports = deepmerge_1; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js -var require_common = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js"(exports) { - "use strict"; - var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; - function _has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); - } - exports.assign = function(obj) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source2 = sources.shift(); - if (!source2) { - continue; - } - if (typeof source2 !== "object") { - throw new TypeError(source2 + "must be non-object"); - } - for (var p in source2) { - if (_has(source2, p)) { - obj[p] = source2[p]; - } - } - } - return obj; - }; - exports.shrinkBuf = function(buf, size) { - if (buf.length === size) { - return buf; - } - if (buf.subarray) { - return buf.subarray(0, size); - } - buf.length = size; - return buf; - }; - var fnTyped = { - arraySet: function(dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function(chunks) { - var i, l, len, pos, chunk, result; - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - return result; - } - }; - var fnUntyped = { - arraySet: function(dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function(chunks) { - return [].concat.apply([], chunks); - } - }; - exports.setTyped = function(on2) { - if (on2) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } - }; - exports.setTyped(TYPED_OK); - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js -var require_trees = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js"(exports) { - "use strict"; - var utils = require_common(); - var Z_FIXED = 4; - var Z_BINARY = 0; - var Z_TEXT = 1; - var Z_UNKNOWN = 2; - function zero(buf) { - var len = buf.length; - while (--len >= 0) { - buf[len] = 0; - } - } - var STORED_BLOCK = 0; - var STATIC_TREES = 1; - var DYN_TREES = 2; - var MIN_MATCH = 3; - var MAX_MATCH = 258; - var LENGTH_CODES = 29; - var LITERALS = 256; - var L_CODES = LITERALS + 1 + LENGTH_CODES; - var D_CODES = 30; - var BL_CODES = 19; - var HEAP_SIZE = 2 * L_CODES + 1; - var MAX_BITS = 15; - var Buf_size = 16; - var MAX_BL_BITS = 7; - var END_BLOCK = 256; - var REP_3_6 = 16; - var REPZ_3_10 = 17; - var REPZ_11_138 = 18; - var extra_lbits = ( - /* extra bits for each length code */ - [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0] - ); - var extra_dbits = ( - /* extra bits for each distance code */ - [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13] - ); - var extra_blbits = ( - /* extra bits for each bit length code */ - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] - ); - var bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - var DIST_CODE_LEN = 512; - var static_ltree = new Array((L_CODES + 2) * 2); - zero(static_ltree); - var static_dtree = new Array(D_CODES * 2); - zero(static_dtree); - var _dist_code = new Array(DIST_CODE_LEN); - zero(_dist_code); - var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); - zero(_length_code); - var base_length = new Array(LENGTH_CODES); - zero(base_length); - var base_dist = new Array(D_CODES); - zero(base_dist); - function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - this.static_tree = static_tree; - this.extra_bits = extra_bits; - this.extra_base = extra_base; - this.elems = elems; - this.max_length = max_length; - this.has_stree = static_tree && static_tree.length; - } - var static_l_desc; - var static_d_desc; - var static_bl_desc; - function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; - this.max_code = 0; - this.stat_desc = stat_desc; - } - function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; - } - function put_short(s, w) { - s.pending_buf[s.pending++] = w & 255; - s.pending_buf[s.pending++] = w >>> 8 & 255; - } - function send_bits(s, value, length) { - if (s.bi_valid > Buf_size - length) { - s.bi_buf |= value << s.bi_valid & 65535; - put_short(s, s.bi_buf); - s.bi_buf = value >> Buf_size - s.bi_valid; - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= value << s.bi_valid & 65535; - s.bi_valid += length; - } - } - function send_code(s, c, tree) { - send_bits( - s, - tree[c * 2], - tree[c * 2 + 1] - /*.Len*/ - ); - } - function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; - } - function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 255; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } - } - function gen_bitlen(s, desc) { - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; - var n, m; - var bits; - var xbits; - var f; - var overflow = 0; - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - tree[s.heap[s.heap_max] * 2 + 1] = 0; - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1] = bits; - if (n > max_code) { - continue; - } - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1] + xbits); - } - } - if (overflow === 0) { - return; - } - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { - bits--; - } - s.bl_count[bits]--; - s.bl_count[bits + 1] += 2; - s.bl_count[max_length]--; - overflow -= 2; - } while (overflow > 0); - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { - continue; - } - if (tree[m * 2 + 1] !== bits) { - s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; - tree[m * 2 + 1] = bits; - } - n--; - } - } - } - function gen_codes(tree, max_code, bl_count) { - var next_code = new Array(MAX_BITS + 1); - var code = 0; - var bits; - var n; - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = code + bl_count[bits - 1] << 1; - } - for (n = 0; n <= max_code; n++) { - var len = tree[n * 2 + 1]; - if (len === 0) { - continue; - } - tree[n * 2] = bi_reverse(next_code[len]++, len); - } - } - function tr_static_init() { - var n; - var bits; - var length; - var code; - var dist; - var bl_count = new Array(MAX_BITS + 1); - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < 1 << extra_lbits[code]; n++) { - _length_code[length++] = code; - } - } - _length_code[length - 1] = code; - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < 1 << extra_dbits[code]; n++) { - _dist_code[dist++] = code; - } - } - dist >>= 7; - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < 1 << extra_dbits[code] - 7; n++) { - _dist_code[256 + dist++] = code; - } - } - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1] = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1] = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1] = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1] = 8; - n++; - bl_count[8]++; - } - gen_codes(static_ltree, L_CODES + 1, bl_count); - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1] = 5; - static_dtree[n * 2] = bi_reverse(n, 5); - } - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - } - function init_block(s) { - var n; - for (n = 0; n < L_CODES; n++) { - s.dyn_ltree[n * 2] = 0; - } - for (n = 0; n < D_CODES; n++) { - s.dyn_dtree[n * 2] = 0; - } - for (n = 0; n < BL_CODES; n++) { - s.bl_tree[n * 2] = 0; - } - s.dyn_ltree[END_BLOCK * 2] = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; - } - function bi_windup(s) { - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; - } - function copy_block(s, buf, len, header) { - bi_windup(s); - if (header) { - put_short(s, len); - put_short(s, ~len); - } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; - } - function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m]; - } - function pqdownheap(s, tree, k) { - var v = s.heap[k]; - var j = k << 1; - while (j <= s.heap_len) { - if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - if (smaller(tree, v, s.heap[j], s.depth)) { - break; - } - s.heap[k] = s.heap[j]; - k = j; - j <<= 1; - } - s.heap[k] = v; - } - function compress_block(s, ltree, dtree) { - var dist; - var lc; - var lx = 0; - var code; - var extra; - if (s.last_lit !== 0) { - do { - dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1]; - lc = s.pending_buf[s.l_buf + lx]; - lx++; - if (dist === 0) { - send_code(s, lc, ltree); - } else { - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); - } - dist--; - code = d_code(dist); - send_code(s, code, dtree); - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); - } - } - } while (lx < s.last_lit); - } - send_code(s, END_BLOCK, ltree); - } - function build_tree(s, desc) { - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; - var max_code = -1; - var node; - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - for (n = 0; n < elems; n++) { - if (tree[n * 2] !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - } else { - tree[n * 2 + 1] = 0; - } - } - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0; - tree[node * 2] = 1; - s.depth[node] = 0; - s.opt_len--; - if (has_stree) { - s.static_len -= stree[node * 2 + 1]; - } - } - desc.max_code = max_code; - for (n = s.heap_len >> 1; n >= 1; n--) { - pqdownheap(s, tree, n); - } - node = elems; - do { - n = s.heap[ - 1 - /*SMALLEST*/ - ]; - s.heap[ - 1 - /*SMALLEST*/ - ] = s.heap[s.heap_len--]; - pqdownheap( - s, - tree, - 1 - /*SMALLEST*/ - ); - m = s.heap[ - 1 - /*SMALLEST*/ - ]; - s.heap[--s.heap_max] = n; - s.heap[--s.heap_max] = m; - tree[node * 2] = tree[n * 2] + tree[m * 2]; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1] = tree[m * 2 + 1] = node; - s.heap[ - 1 - /*SMALLEST*/ - ] = node++; - pqdownheap( - s, - tree, - 1 - /*SMALLEST*/ - ); - } while (s.heap_len >= 2); - s.heap[--s.heap_max] = s.heap[ - 1 - /*SMALLEST*/ - ]; - gen_bitlen(s, desc); - gen_codes(tree, max_code, s.bl_count); - } - function scan_tree(s, tree, max_code) { - var n; - var prevlen = -1; - var curlen; - var nextlen = tree[0 * 2 + 1]; - var count = 0; - var max_count = 7; - var min_count = 4; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1] = 65535; - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen === nextlen) { - continue; - } else if (count < min_count) { - s.bl_tree[curlen * 2] += count; - } else if (curlen !== 0) { - if (curlen !== prevlen) { - s.bl_tree[curlen * 2]++; - } - s.bl_tree[REP_3_6 * 2]++; - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]++; - } else { - s.bl_tree[REPZ_11_138 * 2]++; - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - function send_tree(s, tree, max_code) { - var n; - var prevlen = -1; - var curlen; - var nextlen = tree[0 * 2 + 1]; - var count = 0; - var max_count = 7; - var min_count = 4; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen === nextlen) { - continue; - } else if (count < min_count) { - do { - send_code(s, curlen, s.bl_tree); - } while (--count !== 0); - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - function build_bl_tree(s) { - var max_blindex; - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - build_tree(s, s.bl_desc); - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0) { - break; - } - } - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - return max_blindex; - } - function send_all_trees(s, lcodes, dcodes, blcodes) { - var rank; - send_bits(s, lcodes - 257, 5); - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); - for (rank = 0; rank < blcodes; rank++) { - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3); - } - send_tree(s, s.dyn_ltree, lcodes - 1); - send_tree(s, s.dyn_dtree, dcodes - 1); - } - function detect_data_type(s) { - var black_mask = 4093624447; - var n; - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0) { - return Z_BINARY; - } - } - if (s.dyn_ltree[9 * 2] !== 0 || s.dyn_ltree[10 * 2] !== 0 || s.dyn_ltree[13 * 2] !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2] !== 0) { - return Z_TEXT; - } - } - return Z_BINARY; - } - var static_init_done = false; - function _tr_init(s) { - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - s.bi_buf = 0; - s.bi_valid = 0; - init_block(s); - } - function _tr_stored_block(s, buf, stored_len, last2) { - send_bits(s, (STORED_BLOCK << 1) + (last2 ? 1 : 0), 3); - copy_block(s, buf, stored_len, true); - } - function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); - } - function _tr_flush_block(s, buf, stored_len, last2) { - var opt_lenb, static_lenb; - var max_blindex = 0; - if (s.level > 0) { - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - build_tree(s, s.l_desc); - build_tree(s, s.d_desc); - max_blindex = build_bl_tree(s); - opt_lenb = s.opt_len + 3 + 7 >>> 3; - static_lenb = s.static_len + 3 + 7 >>> 3; - if (static_lenb <= opt_lenb) { - opt_lenb = static_lenb; - } - } else { - opt_lenb = static_lenb = stored_len + 5; - } - if (stored_len + 4 <= opt_lenb && buf !== -1) { - _tr_stored_block(s, buf, stored_len, last2); - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - send_bits(s, (STATIC_TREES << 1) + (last2 ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - } else { - send_bits(s, (DYN_TREES << 1) + (last2 ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - init_block(s); - if (last2) { - bi_windup(s); - } - } - function _tr_tally(s, dist, lc) { - s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255; - s.pending_buf[s.l_buf + s.last_lit] = lc & 255; - s.last_lit++; - if (dist === 0) { - s.dyn_ltree[lc * 2]++; - } else { - s.matches++; - dist--; - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++; - s.dyn_dtree[d_code(dist) * 2]++; - } - return s.last_lit === s.lit_bufsize - 1; - } - exports._tr_init = _tr_init; - exports._tr_stored_block = _tr_stored_block; - exports._tr_flush_block = _tr_flush_block; - exports._tr_tally = _tr_tally; - exports._tr_align = _tr_align; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js -var require_adler32 = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js"(exports, module2) { - "use strict"; - function adler32(adler, buf, len, pos) { - var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0; - while (len !== 0) { - n = len > 2e3 ? 2e3 : len; - len -= n; - do { - s1 = s1 + buf[pos++] | 0; - s2 = s2 + s1 | 0; - } while (--n); - s1 %= 65521; - s2 %= 65521; - } - return s1 | s2 << 16 | 0; - } - module2.exports = adler32; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js -var require_crc32 = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js"(exports, module2) { - "use strict"; - function makeTable() { - var c, table = []; - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; - } - table[n] = c; - } - return table; - } - var crcTable = makeTable(); - function crc32(crc, buf, len, pos) { - var t = crcTable, end = pos + len; - crc ^= -1; - for (var i = pos; i < end; i++) { - crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; - } - return crc ^ -1; - } - module2.exports = crc32; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js -var require_messages = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js"(exports, module2) { - "use strict"; - module2.exports = { - 2: "need dictionary", - /* Z_NEED_DICT 2 */ - 1: "stream end", - /* Z_STREAM_END 1 */ - 0: "", - /* Z_OK 0 */ - "-1": "file error", - /* Z_ERRNO (-1) */ - "-2": "stream error", - /* Z_STREAM_ERROR (-2) */ - "-3": "data error", - /* Z_DATA_ERROR (-3) */ - "-4": "insufficient memory", - /* Z_MEM_ERROR (-4) */ - "-5": "buffer error", - /* Z_BUF_ERROR (-5) */ - "-6": "incompatible version" - /* Z_VERSION_ERROR (-6) */ - }; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js -var require_deflate = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js"(exports) { - "use strict"; - var utils = require_common(); - var trees = require_trees(); - var adler32 = require_adler32(); - var crc32 = require_crc32(); - var msg = require_messages(); - var Z_NO_FLUSH = 0; - var Z_PARTIAL_FLUSH = 1; - var Z_FULL_FLUSH = 3; - var Z_FINISH = 4; - var Z_BLOCK = 5; - var Z_OK = 0; - var Z_STREAM_END = 1; - var Z_STREAM_ERROR = -2; - var Z_DATA_ERROR = -3; - var Z_BUF_ERROR = -5; - var Z_DEFAULT_COMPRESSION = -1; - var Z_FILTERED = 1; - var Z_HUFFMAN_ONLY = 2; - var Z_RLE = 3; - var Z_FIXED = 4; - var Z_DEFAULT_STRATEGY = 0; - var Z_UNKNOWN = 2; - var Z_DEFLATED = 8; - var MAX_MEM_LEVEL = 9; - var MAX_WBITS = 15; - var DEF_MEM_LEVEL = 8; - var LENGTH_CODES = 29; - var LITERALS = 256; - var L_CODES = LITERALS + 1 + LENGTH_CODES; - var D_CODES = 30; - var BL_CODES = 19; - var HEAP_SIZE = 2 * L_CODES + 1; - var MAX_BITS = 15; - var MIN_MATCH = 3; - var MAX_MATCH = 258; - var MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1; - var PRESET_DICT = 32; - var INIT_STATE = 42; - var EXTRA_STATE = 69; - var NAME_STATE = 73; - var COMMENT_STATE = 91; - var HCRC_STATE = 103; - var BUSY_STATE = 113; - var FINISH_STATE = 666; - var BS_NEED_MORE = 1; - var BS_BLOCK_DONE = 2; - var BS_FINISH_STARTED = 3; - var BS_FINISH_DONE = 4; - var OS_CODE = 3; - function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; - } - function rank(f) { - return (f << 1) - (f > 4 ? 9 : 0); - } - function zero(buf) { - var len = buf.length; - while (--len >= 0) { - buf[len] = 0; - } - } - function flush_pending(strm) { - var s = strm.state; - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { - return; - } - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } - } - function flush_block_only(s, last2) { - trees._tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last2); - s.block_start = s.strstart; - flush_pending(s.strm); - } - function put_byte(s, b) { - s.pending_buf[s.pending++] = b; - } - function putShortMSB(s, b) { - s.pending_buf[s.pending++] = b >>> 8 & 255; - s.pending_buf[s.pending++] = b & 255; - } - function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - if (len > size) { - len = size; - } - if (len === 0) { - return 0; - } - strm.avail_in -= len; - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - strm.next_in += len; - strm.total_in += len; - return len; - } - function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; - var scan = s.strstart; - var match; - var len; - var best_len = s.prev_length; - var nice_match = s.nice_match; - var limit = s.strstart > s.w_size - MIN_LOOKAHEAD ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0; - var _win = s.window; - var wmask = s.w_mask; - var prev = s.prev; - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - if (nice_match > s.lookahead) { - nice_match = s.lookahead; - } - do { - match = cur_match; - if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { - continue; - } - scan += 2; - match++; - do { - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; - } - function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - do { - more = s.window_size - s.lookahead - s.strstart; - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - s.block_start -= _w_size; - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = m >= _w_size ? m - _w_size : 0; - } while (--n); - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = m >= _w_size ? m - _w_size : 0; - } while (--n); - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask; - while (s.insert) { - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - } - function deflate_stored(s, flush) { - var max_block_size = 65535; - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - for (; ; ) { - if (s.lookahead <= 1) { - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; - } - } - s.strstart += s.lookahead; - s.lookahead = 0; - var max_start = s.block_start + max_block_size; - if (s.strstart === 0 || s.strstart >= max_start) { - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - } - s.insert = 0; - if (flush === Z_FINISH) { - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - return BS_FINISH_DONE; - } - if (s.strstart > s.block_start) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - return BS_NEED_MORE; - } - function deflate_fast(s, flush) { - var hash_head; - var bflush; - for (; ; ) { - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; - } - } - hash_head = 0; - if (s.lookahead >= MIN_MATCH) { - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - } - if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { - s.match_length = longest_match(s, hash_head); - } - if (s.match_length >= MIN_MATCH) { - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - s.lookahead -= s.match_length; - if (s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) { - s.match_length--; - do { - s.strstart++; - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - } while (--s.match_length !== 0); - s.strstart++; - } else { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; - } - } else { - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - } - if (bflush) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - return BS_FINISH_DONE; - } - if (s.last_lit) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - return BS_BLOCK_DONE; - } - function deflate_slow(s, flush) { - var hash_head; - var bflush; - var max_insert; - for (; ; ) { - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; - } - } - hash_head = 0; - if (s.lookahead >= MIN_MATCH) { - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - } - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - if (hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { - s.match_length = longest_match(s, hash_head); - if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096)) { - s.match_length = MIN_MATCH - 1; - } - } - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - if (bflush) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - } else if (s.match_available) { - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - if (bflush) { - flush_block_only(s, false); - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - if (s.match_available) { - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - return BS_FINISH_DONE; - } - if (s.last_lit) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - return BS_BLOCK_DONE; - } - function deflate_rle(s, flush) { - var bflush; - var prev; - var scan, strend; - var _win = s.window; - for (; ; ) { - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; - } - } - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - } - if (s.match_length >= MIN_MATCH) { - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - } - if (bflush) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - } - s.insert = 0; - if (flush === Z_FINISH) { - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - return BS_FINISH_DONE; - } - if (s.last_lit) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - return BS_BLOCK_DONE; - } - function deflate_huff(s, flush) { - var bflush; - for (; ; ) { - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; - } - } - s.match_length = 0; - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - } - s.insert = 0; - if (flush === Z_FINISH) { - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - return BS_FINISH_DONE; - } - if (s.last_lit) { - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } - return BS_BLOCK_DONE; - } - function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; - } - var configuration_table; - configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), - /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), - /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), - /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), - /* 3 */ - new Config(4, 4, 16, 16, deflate_slow), - /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), - /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), - /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), - /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), - /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) - /* 9 max compression */ - ]; - function lm_init(s) { - s.window_size = 2 * s.w_size; - zero(s.head); - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; - } - function DeflateState() { - this.strm = null; - this.status = 0; - this.pending_buf = null; - this.pending_buf_size = 0; - this.pending_out = 0; - this.pending = 0; - this.wrap = 0; - this.gzhead = null; - this.gzindex = 0; - this.method = Z_DEFLATED; - this.last_flush = -1; - this.w_size = 0; - this.w_bits = 0; - this.w_mask = 0; - this.window = null; - this.window_size = 0; - this.prev = null; - this.head = null; - this.ins_h = 0; - this.hash_size = 0; - this.hash_bits = 0; - this.hash_mask = 0; - this.hash_shift = 0; - this.block_start = 0; - this.match_length = 0; - this.prev_match = 0; - this.match_available = 0; - this.strstart = 0; - this.match_start = 0; - this.lookahead = 0; - this.prev_length = 0; - this.max_chain_length = 0; - this.max_lazy_match = 0; - this.level = 0; - this.strategy = 0; - this.good_match = 0; - this.nice_match = 0; - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - this.l_desc = null; - this.d_desc = null; - this.bl_desc = null; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - this.heap = new utils.Buf16(2 * L_CODES + 1); - zero(this.heap); - this.heap_len = 0; - this.heap_max = 0; - this.depth = new utils.Buf16(2 * L_CODES + 1); - zero(this.depth); - this.l_buf = 0; - this.lit_bufsize = 0; - this.last_lit = 0; - this.d_buf = 0; - this.opt_len = 0; - this.static_len = 0; - this.matches = 0; - this.insert = 0; - this.bi_buf = 0; - this.bi_valid = 0; - } - function deflateResetKeep(strm) { - var s; - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - s = strm.state; - s.pending = 0; - s.pending_out = 0; - if (s.wrap < 0) { - s.wrap = -s.wrap; - } - s.status = s.wrap ? INIT_STATE : BUSY_STATE; - strm.adler = s.wrap === 2 ? 0 : 1; - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; - } - function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; - } - function deflateSetHeader(strm, head2) { - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - if (strm.state.wrap !== 2) { - return Z_STREAM_ERROR; - } - strm.state.gzhead = head2; - return Z_OK; - } - function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { - return Z_STREAM_ERROR; - } - var wrap = 1; - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } else if (windowBits > 15) { - wrap = 2; - windowBits -= 16; - } - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - if (windowBits === 8) { - windowBits = 9; - } - var s = new DeflateState(); - strm.state = s; - s.strm = strm; - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - s.lit_bufsize = 1 << memLevel + 6; - s.pending_buf_size = s.lit_bufsize * 4; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - s.d_buf = 1 * s.lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - s.level = level; - s.strategy = strategy; - s.method = method; - return deflateReset(strm); - } - function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); - } - function deflate(strm, flush) { - var old_flush, s; - var beg, val; - if (!strm || !strm.state || flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - s = strm.state; - if (!strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH) { - return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - s.strm = strm; - old_flush = s.last_flush; - s.last_flush = flush; - if (s.status === INIT_STATE) { - if (s.wrap === 2) { - strm.adler = 0; - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } else { - put_byte( - s, - (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 255); - put_byte(s, s.gzhead.time >> 8 & 255); - put_byte(s, s.gzhead.time >> 16 & 255); - put_byte(s, s.gzhead.time >> 24 & 255); - put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); - put_byte(s, s.gzhead.os & 255); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 255); - put_byte(s, s.gzhead.extra.length >> 8 & 255); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } else { - var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8; - var level_flags = -1; - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= level_flags << 6; - if (s.strstart !== 0) { - header |= PRESET_DICT; - } - header += 31 - header % 31; - s.status = BUSY_STATE; - putShortMSB(s, header); - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 65535); - } - strm.adler = 1; - } - } - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra) { - beg = s.pending; - while (s.gzindex < (s.gzhead.extra.length & 65535)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 255); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name) { - beg = s.pending; - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 255; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment) { - beg = s.pending; - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 255); - put_byte(s, strm.adler >> 8 & 255); - strm.adler = 0; - s.status = BUSY_STATE; - } - } else { - s.status = BUSY_STATE; - } - } - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; - return Z_OK; - } - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) { - var bstate = s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : s.strategy === Z_RLE ? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush); - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - } - return Z_OK; - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } else if (flush !== Z_BLOCK) { - trees._tr_stored_block(s, 0, 0, false); - if (flush === Z_FULL_FLUSH) { - zero(s.head); - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; - return Z_OK; - } - } - } - if (flush !== Z_FINISH) { - return Z_OK; - } - if (s.wrap <= 0) { - return Z_STREAM_END; - } - if (s.wrap === 2) { - put_byte(s, strm.adler & 255); - put_byte(s, strm.adler >> 8 & 255); - put_byte(s, strm.adler >> 16 & 255); - put_byte(s, strm.adler >> 24 & 255); - put_byte(s, strm.total_in & 255); - put_byte(s, strm.total_in >> 8 & 255); - put_byte(s, strm.total_in >> 16 & 255); - put_byte(s, strm.total_in >> 24 & 255); - } else { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 65535); - } - flush_pending(strm); - if (s.wrap > 0) { - s.wrap = -s.wrap; - } - return s.pending !== 0 ? Z_OK : Z_STREAM_END; - } - function deflateEnd(strm) { - var status; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - status = strm.state.status; - if (status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE) { - return err(strm, Z_STREAM_ERROR); - } - strm.state = null; - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; - } - function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - var s; - var str, n; - var wrap; - var avail; - var next2; - var input; - var tmpDict; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - s = strm.state; - wrap = s.wrap; - if (wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead) { - return Z_STREAM_ERROR; - } - if (wrap === 1) { - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - s.wrap = 0; - if (dictLength >= s.w_size) { - if (wrap === 0) { - zero(s.head); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - avail = strm.avail_in; - next2 = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next2; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; - } - exports.deflateInit = deflateInit; - exports.deflateInit2 = deflateInit2; - exports.deflateReset = deflateReset; - exports.deflateResetKeep = deflateResetKeep; - exports.deflateSetHeader = deflateSetHeader; - exports.deflate = deflate; - exports.deflateEnd = deflateEnd; - exports.deflateSetDictionary = deflateSetDictionary; - exports.deflateInfo = "pako deflate (from Nodeca project)"; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js -var require_strings = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js"(exports) { - "use strict"; - var utils = require_common(); - var STR_APPLY_OK = true; - var STR_APPLY_UIA_OK = true; - try { - String.fromCharCode.apply(null, [0]); - } catch (__) { - STR_APPLY_OK = false; - } - try { - String.fromCharCode.apply(null, new Uint8Array(1)); - } catch (__) { - STR_APPLY_UIA_OK = false; - } - var _utf8len = new utils.Buf8(256); - for (q = 0; q < 256; q++) { - _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1; - } - var q; - _utf8len[254] = _utf8len[254] = 1; - exports.string2buf = function(str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 64512) === 55296 && m_pos + 1 < str_len) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 64512) === 56320) { - c = 65536 + (c - 55296 << 10) + (c2 - 56320); - m_pos++; - } - } - buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; - } - buf = new utils.Buf8(buf_len); - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 64512) === 55296 && m_pos + 1 < str_len) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 64512) === 56320) { - c = 65536 + (c - 55296 << 10) + (c2 - 56320); - m_pos++; - } - } - if (c < 128) { - buf[i++] = c; - } else if (c < 2048) { - buf[i++] = 192 | c >>> 6; - buf[i++] = 128 | c & 63; - } else if (c < 65536) { - buf[i++] = 224 | c >>> 12; - buf[i++] = 128 | c >>> 6 & 63; - buf[i++] = 128 | c & 63; - } else { - buf[i++] = 240 | c >>> 18; - buf[i++] = 128 | c >>> 12 & 63; - buf[i++] = 128 | c >>> 6 & 63; - buf[i++] = 128 | c & 63; - } - } - return buf; - }; - function buf2binstring(buf, len) { - if (len < 65534) { - if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - var result = ""; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; - } - exports.buf2binstring = function(buf) { - return buf2binstring(buf, buf.length); - }; - exports.binstring2buf = function(str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; - }; - exports.buf2string = function(buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - var utf16buf = new Array(len * 2); - for (out = 0, i = 0; i < len; ) { - c = buf[i++]; - if (c < 128) { - utf16buf[out++] = c; - continue; - } - c_len = _utf8len[c]; - if (c_len > 4) { - utf16buf[out++] = 65533; - i += c_len - 1; - continue; - } - c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; - while (c_len > 1 && i < len) { - c = c << 6 | buf[i++] & 63; - c_len--; - } - if (c_len > 1) { - utf16buf[out++] = 65533; - continue; - } - if (c < 65536) { - utf16buf[out++] = c; - } else { - c -= 65536; - utf16buf[out++] = 55296 | c >> 10 & 1023; - utf16buf[out++] = 56320 | c & 1023; - } - } - return buf2binstring(utf16buf, out); - }; - exports.utf8border = function(buf, max) { - var pos; - max = max || buf.length; - if (max > buf.length) { - max = buf.length; - } - pos = max - 1; - while (pos >= 0 && (buf[pos] & 192) === 128) { - pos--; - } - if (pos < 0) { - return max; - } - if (pos === 0) { - return max; - } - return pos + _utf8len[buf[pos]] > max ? pos : max; - }; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js -var require_zstream = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js"(exports, module2) { - "use strict"; - function ZStream() { - this.input = null; - this.next_in = 0; - this.avail_in = 0; - this.total_in = 0; - this.output = null; - this.next_out = 0; - this.avail_out = 0; - this.total_out = 0; - this.msg = ""; - this.state = null; - this.data_type = 2; - this.adler = 0; - } - module2.exports = ZStream; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js -var require_deflate2 = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js"(exports) { - "use strict"; - var zlib_deflate = require_deflate(); - var utils = require_common(); - var strings = require_strings(); - var msg = require_messages(); - var ZStream = require_zstream(); - var toString = Object.prototype.toString; - var Z_NO_FLUSH = 0; - var Z_FINISH = 4; - var Z_OK = 0; - var Z_STREAM_END = 1; - var Z_SYNC_FLUSH = 2; - var Z_DEFAULT_COMPRESSION = -1; - var Z_DEFAULT_STRATEGY = 0; - var Z_DEFLATED = 8; - function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: "" - }, options || {}); - var opt = this.options; - if (opt.raw && opt.windowBits > 0) { - opt.windowBits = -opt.windowBits; - } else if (opt.gzip && opt.windowBits > 0 && opt.windowBits < 16) { - opt.windowBits += 16; - } - this.err = 0; - this.msg = ""; - this.ended = false; - this.chunks = []; - this.strm = new ZStream(); - this.strm.avail_out = 0; - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - if (status !== Z_OK) { - throw new Error(msg[status]); - } - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - if (opt.dictionary) { - var dict; - if (typeof opt.dictionary === "string") { - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - if (status !== Z_OK) { - throw new Error(msg[status]); - } - this._dict_set = true; - } - } - Deflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - if (this.ended) { - return false; - } - _mode = mode === ~~mode ? mode : mode === true ? Z_FINISH : Z_NO_FLUSH; - if (typeof data === "string") { - strm.input = strings.string2buf(data); - } else if (toString.call(data) === "[object ArrayBuffer]") { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - strm.next_in = 0; - strm.avail_in = strm.input.length; - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)) { - if (this.options.to === "string") { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - return true; - }; - Deflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); - }; - Deflate.prototype.onEnd = function(status) { - if (status === Z_OK) { - if (this.options.to === "string") { - this.result = this.chunks.join(""); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; - }; - function deflate(input, options) { - var deflator = new Deflate(options); - deflator.push(input, true); - if (deflator.err) { - throw deflator.msg || msg[deflator.err]; - } - return deflator.result; - } - function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); - } - function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); - } - exports.Deflate = Deflate; - exports.deflate = deflate; - exports.deflateRaw = deflateRaw; - exports.gzip = gzip; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js -var require_inffast = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js"(exports, module2) { - "use strict"; - var BAD = 30; - var TYPE = 12; - module2.exports = function inflate_fast(strm, start) { - var state2; - var _in; - var last2; - var _out; - var beg; - var end; - var dmax; - var wsize; - var whave; - var wnext; - var s_window; - var hold; - var bits; - var lcode; - var dcode; - var lmask; - var dmask; - var here; - var op; - var len; - var dist; - var from; - var from_source; - var input, output; - state2 = strm.state; - _in = strm.next_in; - input = strm.input; - last2 = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); - dmax = state2.dmax; - wsize = state2.wsize; - whave = state2.whave; - wnext = state2.wnext; - s_window = state2.window; - hold = state2.hold; - bits = state2.bits; - lcode = state2.lencode; - dcode = state2.distcode; - lmask = (1 << state2.lenbits) - 1; - dmask = (1 << state2.distbits) - 1; - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = lcode[hold & lmask]; - dolen: - for (; ; ) { - op = here >>> 24; - hold >>>= op; - bits -= op; - op = here >>> 16 & 255; - if (op === 0) { - output[_out++] = here & 65535; - } else if (op & 16) { - len = here & 65535; - op &= 15; - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & (1 << op) - 1; - hold >>>= op; - bits -= op; - } - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - dodist: - for (; ; ) { - op = here >>> 24; - hold >>>= op; - bits -= op; - op = here >>> 16 & 255; - if (op & 16) { - dist = here & 65535; - op &= 15; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & (1 << op) - 1; - if (dist > dmax) { - strm.msg = "invalid distance too far back"; - state2.mode = BAD; - break top; - } - hold >>>= op; - bits -= op; - op = _out - beg; - if (dist > op) { - op = dist - op; - if (op > whave) { - if (state2.sane) { - strm.msg = "invalid distance too far back"; - state2.mode = BAD; - break top; - } - } - from = 0; - from_source = s_window; - if (wnext === 0) { - from += wsize - op; - if (op < len) { - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; - from_source = output; - } - } else if (wnext < op) { - from += wsize + wnext - op; - op -= wnext; - if (op < len) { - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; - from_source = output; - } - } - } else { - from += wnext - op; - if (op < len) { - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } else { - from = _out - dist; - do { - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } else if ((op & 64) === 0) { - here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; - continue dodist; - } else { - strm.msg = "invalid distance code"; - state2.mode = BAD; - break top; - } - break; - } - } else if ((op & 64) === 0) { - here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; - continue dolen; - } else if (op & 32) { - state2.mode = TYPE; - break top; - } else { - strm.msg = "invalid literal/length code"; - state2.mode = BAD; - break top; - } - break; - } - } while (_in < last2 && _out < end); - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = _in < last2 ? 5 + (last2 - _in) : 5 - (_in - last2); - strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); - state2.hold = hold; - state2.bits = bits; - return; - }; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js -var require_inftrees = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js"(exports, module2) { - "use strict"; - var utils = require_common(); - var MAXBITS = 15; - var ENOUGH_LENS = 852; - var ENOUGH_DISTS = 592; - var CODES = 0; - var LENS = 1; - var DISTS = 2; - var lbase = [ - /* Length codes 257..285 base */ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 13, - 15, - 17, - 19, - 23, - 27, - 31, - 35, - 43, - 51, - 59, - 67, - 83, - 99, - 115, - 131, - 163, - 195, - 227, - 258, - 0, - 0 - ]; - var lext = [ - /* Length codes 257..285 extra */ - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 17, - 17, - 17, - 17, - 18, - 18, - 18, - 18, - 19, - 19, - 19, - 19, - 20, - 20, - 20, - 20, - 21, - 21, - 21, - 21, - 16, - 72, - 78 - ]; - var dbase = [ - /* Distance codes 0..29 base */ - 1, - 2, - 3, - 4, - 5, - 7, - 9, - 13, - 17, - 25, - 33, - 49, - 65, - 97, - 129, - 193, - 257, - 385, - 513, - 769, - 1025, - 1537, - 2049, - 3073, - 4097, - 6145, - 8193, - 12289, - 16385, - 24577, - 0, - 0 - ]; - var dext = [ - /* Distance codes 0..29 extra */ - 16, - 16, - 16, - 16, - 17, - 17, - 18, - 18, - 19, - 19, - 20, - 20, - 21, - 21, - 22, - 22, - 23, - 23, - 24, - 24, - 25, - 25, - 26, - 26, - 27, - 27, - 28, - 28, - 29, - 29, - 64, - 64 - ]; - module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { - var bits = opts.bits; - var len = 0; - var sym = 0; - var min = 0, max = 0; - var root3 = 0; - var curr = 0; - var drop = 0; - var left = 0; - var used = 0; - var huff = 0; - var incr; - var fill2; - var low; - var mask; - var next2; - var base = null; - var base_index = 0; - var end; - var count = new utils.Buf16(MAXBITS + 1); - var offs = new utils.Buf16(MAXBITS + 1); - var extra = null; - var extra_index = 0; - var here_bits, here_op, here_val; - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - root3 = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { - break; - } - } - if (root3 > max) { - root3 = max; - } - if (max === 0) { - table[table_index++] = 1 << 24 | 64 << 16 | 0; - table[table_index++] = 1 << 24 | 64 << 16 | 0; - opts.bits = 1; - return 0; - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { - break; - } - } - if (root3 < min) { - root3 = min; - } - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; - } - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - if (type === CODES) { - base = extra = work; - end = 19; - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - } else { - base = dbase; - extra = dext; - end = -1; - } - huff = 0; - sym = 0; - len = min; - next2 = table_index; - curr = root3; - drop = 0; - low = -1; - used = 1 << root3; - mask = used - 1; - if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { - return 1; - } - for (; ; ) { - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } else { - here_op = 32 + 64; - here_val = 0; - } - incr = 1 << len - drop; - fill2 = 1 << curr; - min = fill2; - do { - fill2 -= incr; - table[next2 + (huff >> drop) + fill2] = here_bits << 24 | here_op << 16 | here_val | 0; - } while (fill2 !== 0); - incr = 1 << len - 1; - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - sym++; - if (--count[len] === 0) { - if (len === max) { - break; - } - len = lens[lens_index + work[sym]]; - } - if (len > root3 && (huff & mask) !== low) { - if (drop === 0) { - drop = root3; - } - next2 += min; - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { - break; - } - curr++; - left <<= 1; - } - used += 1 << curr; - if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { - return 1; - } - low = huff & mask; - table[low] = root3 << 24 | curr << 16 | next2 - table_index | 0; - } - } - if (huff !== 0) { - table[next2 + huff] = len - drop << 24 | 64 << 16 | 0; - } - opts.bits = root3; - return 0; - }; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js -var require_inflate = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js"(exports) { - "use strict"; - var utils = require_common(); - var adler32 = require_adler32(); - var crc32 = require_crc32(); - var inflate_fast = require_inffast(); - var inflate_table = require_inftrees(); - var CODES = 0; - var LENS = 1; - var DISTS = 2; - var Z_FINISH = 4; - var Z_BLOCK = 5; - var Z_TREES = 6; - var Z_OK = 0; - var Z_STREAM_END = 1; - var Z_NEED_DICT = 2; - var Z_STREAM_ERROR = -2; - var Z_DATA_ERROR = -3; - var Z_MEM_ERROR = -4; - var Z_BUF_ERROR = -5; - var Z_DEFLATED = 8; - var HEAD = 1; - var FLAGS = 2; - var TIME = 3; - var OS = 4; - var EXLEN = 5; - var EXTRA = 6; - var NAME = 7; - var COMMENT = 8; - var HCRC = 9; - var DICTID = 10; - var DICT = 11; - var TYPE = 12; - var TYPEDO = 13; - var STORED = 14; - var COPY_ = 15; - var COPY = 16; - var TABLE = 17; - var LENLENS = 18; - var CODELENS = 19; - var LEN_ = 20; - var LEN = 21; - var LENEXT = 22; - var DIST = 23; - var DISTEXT = 24; - var MATCH = 25; - var LIT = 26; - var CHECK = 27; - var LENGTH = 28; - var DONE = 29; - var BAD = 30; - var MEM = 31; - var SYNC = 32; - var ENOUGH_LENS = 852; - var ENOUGH_DISTS = 592; - var MAX_WBITS = 15; - var DEF_WBITS = MAX_WBITS; - function zswap32(q) { - return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24); - } - function InflateState() { - this.mode = 0; - this.last = false; - this.wrap = 0; - this.havedict = false; - this.flags = 0; - this.dmax = 0; - this.check = 0; - this.total = 0; - this.head = null; - this.wbits = 0; - this.wsize = 0; - this.whave = 0; - this.wnext = 0; - this.window = null; - this.hold = 0; - this.bits = 0; - this.length = 0; - this.offset = 0; - this.extra = 0; - this.lencode = null; - this.distcode = null; - this.lenbits = 0; - this.distbits = 0; - this.ncode = 0; - this.nlen = 0; - this.ndist = 0; - this.have = 0; - this.next = null; - this.lens = new utils.Buf16(320); - this.work = new utils.Buf16(288); - this.lendyn = null; - this.distdyn = null; - this.sane = 0; - this.back = 0; - this.was = 0; - } - function inflateResetKeep(strm) { - var state2; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - state2 = strm.state; - strm.total_in = strm.total_out = state2.total = 0; - strm.msg = ""; - if (state2.wrap) { - strm.adler = state2.wrap & 1; - } - state2.mode = HEAD; - state2.last = 0; - state2.havedict = 0; - state2.dmax = 32768; - state2.head = null; - state2.hold = 0; - state2.bits = 0; - state2.lencode = state2.lendyn = new utils.Buf32(ENOUGH_LENS); - state2.distcode = state2.distdyn = new utils.Buf32(ENOUGH_DISTS); - state2.sane = 1; - state2.back = -1; - return Z_OK; - } - function inflateReset(strm) { - var state2; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - state2 = strm.state; - state2.wsize = 0; - state2.whave = 0; - state2.wnext = 0; - return inflateResetKeep(strm); - } - function inflateReset2(strm, windowBits) { - var wrap; - var state2; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - state2 = strm.state; - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state2.window !== null && state2.wbits !== windowBits) { - state2.window = null; - } - state2.wrap = wrap; - state2.wbits = windowBits; - return inflateReset(strm); - } - function inflateInit2(strm, windowBits) { - var ret; - var state2; - if (!strm) { - return Z_STREAM_ERROR; - } - state2 = new InflateState(); - strm.state = state2; - state2.window = null; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null; - } - return ret; - } - function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); - } - var virgin = true; - var lenfix; - var distfix; - function fixedtables(state2) { - if (virgin) { - var sym; - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - sym = 0; - while (sym < 144) { - state2.lens[sym++] = 8; - } - while (sym < 256) { - state2.lens[sym++] = 9; - } - while (sym < 280) { - state2.lens[sym++] = 7; - } - while (sym < 288) { - state2.lens[sym++] = 8; - } - inflate_table(LENS, state2.lens, 0, 288, lenfix, 0, state2.work, { bits: 9 }); - sym = 0; - while (sym < 32) { - state2.lens[sym++] = 5; - } - inflate_table(DISTS, state2.lens, 0, 32, distfix, 0, state2.work, { bits: 5 }); - virgin = false; - } - state2.lencode = lenfix; - state2.lenbits = 9; - state2.distcode = distfix; - state2.distbits = 5; - } - function updatewindow(strm, src, end, copy) { - var dist; - var state2 = strm.state; - if (state2.window === null) { - state2.wsize = 1 << state2.wbits; - state2.wnext = 0; - state2.whave = 0; - state2.window = new utils.Buf8(state2.wsize); - } - if (copy >= state2.wsize) { - utils.arraySet(state2.window, src, end - state2.wsize, state2.wsize, 0); - state2.wnext = 0; - state2.whave = state2.wsize; - } else { - dist = state2.wsize - state2.wnext; - if (dist > copy) { - dist = copy; - } - utils.arraySet(state2.window, src, end - copy, dist, state2.wnext); - copy -= dist; - if (copy) { - utils.arraySet(state2.window, src, end - copy, copy, 0); - state2.wnext = copy; - state2.whave = state2.wsize; - } else { - state2.wnext += dist; - if (state2.wnext === state2.wsize) { - state2.wnext = 0; - } - if (state2.whave < state2.wsize) { - state2.whave += dist; - } - } - } - return 0; - } - function inflate(strm, flush) { - var state2; - var input, output; - var next2; - var put; - var have, left; - var hold; - var bits; - var _in, _out; - var copy; - var from; - var from_source; - var here = 0; - var here_bits, here_op, here_val; - var last_bits, last_op, last_val; - var len; - var ret; - var hbuf = new utils.Buf8(4); - var opts; - var n; - var order = ( - /* permutation of code lengths */ - [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] - ); - if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { - return Z_STREAM_ERROR; - } - state2 = strm.state; - if (state2.mode === TYPE) { - state2.mode = TYPEDO; - } - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next2 = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state2.hold; - bits = state2.bits; - _in = have; - _out = left; - ret = Z_OK; - inf_leave: - for (; ; ) { - switch (state2.mode) { - case HEAD: - if (state2.wrap === 0) { - state2.mode = TYPEDO; - break; - } - while (bits < 16) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (state2.wrap & 2 && hold === 35615) { - state2.check = 0; - hbuf[0] = hold & 255; - hbuf[1] = hold >>> 8 & 255; - state2.check = crc32(state2.check, hbuf, 2, 0); - hold = 0; - bits = 0; - state2.mode = FLAGS; - break; - } - state2.flags = 0; - if (state2.head) { - state2.head.done = false; - } - if (!(state2.wrap & 1) || /* check if zlib header allowed */ - (((hold & 255) << 8) + (hold >> 8)) % 31) { - strm.msg = "incorrect header check"; - state2.mode = BAD; - break; - } - if ((hold & 15) !== Z_DEFLATED) { - strm.msg = "unknown compression method"; - state2.mode = BAD; - break; - } - hold >>>= 4; - bits -= 4; - len = (hold & 15) + 8; - if (state2.wbits === 0) { - state2.wbits = len; - } else if (len > state2.wbits) { - strm.msg = "invalid window size"; - state2.mode = BAD; - break; - } - state2.dmax = 1 << len; - strm.adler = state2.check = 1; - state2.mode = hold & 512 ? DICTID : TYPE; - hold = 0; - bits = 0; - break; - case FLAGS: - while (bits < 16) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.flags = hold; - if ((state2.flags & 255) !== Z_DEFLATED) { - strm.msg = "unknown compression method"; - state2.mode = BAD; - break; - } - if (state2.flags & 57344) { - strm.msg = "unknown header flags set"; - state2.mode = BAD; - break; - } - if (state2.head) { - state2.head.text = hold >> 8 & 1; - } - if (state2.flags & 512) { - hbuf[0] = hold & 255; - hbuf[1] = hold >>> 8 & 255; - state2.check = crc32(state2.check, hbuf, 2, 0); - } - hold = 0; - bits = 0; - state2.mode = TIME; - /* falls through */ - case TIME: - while (bits < 32) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (state2.head) { - state2.head.time = hold; - } - if (state2.flags & 512) { - hbuf[0] = hold & 255; - hbuf[1] = hold >>> 8 & 255; - hbuf[2] = hold >>> 16 & 255; - hbuf[3] = hold >>> 24 & 255; - state2.check = crc32(state2.check, hbuf, 4, 0); - } - hold = 0; - bits = 0; - state2.mode = OS; - /* falls through */ - case OS: - while (bits < 16) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (state2.head) { - state2.head.xflags = hold & 255; - state2.head.os = hold >> 8; - } - if (state2.flags & 512) { - hbuf[0] = hold & 255; - hbuf[1] = hold >>> 8 & 255; - state2.check = crc32(state2.check, hbuf, 2, 0); - } - hold = 0; - bits = 0; - state2.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state2.flags & 1024) { - while (bits < 16) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.length = hold; - if (state2.head) { - state2.head.extra_len = hold; - } - if (state2.flags & 512) { - hbuf[0] = hold & 255; - hbuf[1] = hold >>> 8 & 255; - state2.check = crc32(state2.check, hbuf, 2, 0); - } - hold = 0; - bits = 0; - } else if (state2.head) { - state2.head.extra = null; - } - state2.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state2.flags & 1024) { - copy = state2.length; - if (copy > have) { - copy = have; - } - if (copy) { - if (state2.head) { - len = state2.head.extra_len - state2.length; - if (!state2.head.extra) { - state2.head.extra = new Array(state2.head.extra_len); - } - utils.arraySet( - state2.head.extra, - input, - next2, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - } - if (state2.flags & 512) { - state2.check = crc32(state2.check, input, copy, next2); - } - have -= copy; - next2 += copy; - state2.length -= copy; - } - if (state2.length) { - break inf_leave; - } - } - state2.length = 0; - state2.mode = NAME; - /* falls through */ - case NAME: - if (state2.flags & 2048) { - if (have === 0) { - break inf_leave; - } - copy = 0; - do { - len = input[next2 + copy++]; - if (state2.head && len && state2.length < 65536) { - state2.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - if (state2.flags & 512) { - state2.check = crc32(state2.check, input, copy, next2); - } - have -= copy; - next2 += copy; - if (len) { - break inf_leave; - } - } else if (state2.head) { - state2.head.name = null; - } - state2.length = 0; - state2.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state2.flags & 4096) { - if (have === 0) { - break inf_leave; - } - copy = 0; - do { - len = input[next2 + copy++]; - if (state2.head && len && state2.length < 65536) { - state2.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state2.flags & 512) { - state2.check = crc32(state2.check, input, copy, next2); - } - have -= copy; - next2 += copy; - if (len) { - break inf_leave; - } - } else if (state2.head) { - state2.head.comment = null; - } - state2.mode = HCRC; - /* falls through */ - case HCRC: - if (state2.flags & 512) { - while (bits < 16) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (hold !== (state2.check & 65535)) { - strm.msg = "header crc mismatch"; - state2.mode = BAD; - break; - } - hold = 0; - bits = 0; - } - if (state2.head) { - state2.head.hcrc = state2.flags >> 9 & 1; - state2.head.done = true; - } - strm.adler = state2.check = 0; - state2.mode = TYPE; - break; - case DICTID: - while (bits < 32) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - strm.adler = state2.check = zswap32(hold); - hold = 0; - bits = 0; - state2.mode = DICT; - /* falls through */ - case DICT: - if (state2.havedict === 0) { - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next2; - strm.avail_in = have; - state2.hold = hold; - state2.bits = bits; - return Z_NEED_DICT; - } - strm.adler = state2.check = 1; - state2.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { - break inf_leave; - } - /* falls through */ - case TYPEDO: - if (state2.last) { - hold >>>= bits & 7; - bits -= bits & 7; - state2.mode = CHECK; - break; - } - while (bits < 3) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.last = hold & 1; - hold >>>= 1; - bits -= 1; - switch (hold & 3) { - case 0: - state2.mode = STORED; - break; - case 1: - fixedtables(state2); - state2.mode = LEN_; - if (flush === Z_TREES) { - hold >>>= 2; - bits -= 2; - break inf_leave; - } - break; - case 2: - state2.mode = TABLE; - break; - case 3: - strm.msg = "invalid block type"; - state2.mode = BAD; - } - hold >>>= 2; - bits -= 2; - break; - case STORED: - hold >>>= bits & 7; - bits -= bits & 7; - while (bits < 32) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { - strm.msg = "invalid stored block lengths"; - state2.mode = BAD; - break; - } - state2.length = hold & 65535; - hold = 0; - bits = 0; - state2.mode = COPY_; - if (flush === Z_TREES) { - break inf_leave; - } - /* falls through */ - case COPY_: - state2.mode = COPY; - /* falls through */ - case COPY: - copy = state2.length; - if (copy) { - if (copy > have) { - copy = have; - } - if (copy > left) { - copy = left; - } - if (copy === 0) { - break inf_leave; - } - utils.arraySet(output, input, next2, copy, put); - have -= copy; - next2 += copy; - left -= copy; - put += copy; - state2.length -= copy; - break; - } - state2.mode = TYPE; - break; - case TABLE: - while (bits < 14) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.nlen = (hold & 31) + 257; - hold >>>= 5; - bits -= 5; - state2.ndist = (hold & 31) + 1; - hold >>>= 5; - bits -= 5; - state2.ncode = (hold & 15) + 4; - hold >>>= 4; - bits -= 4; - if (state2.nlen > 286 || state2.ndist > 30) { - strm.msg = "too many length or distance symbols"; - state2.mode = BAD; - break; - } - state2.have = 0; - state2.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state2.have < state2.ncode) { - while (bits < 3) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.lens[order[state2.have++]] = hold & 7; - hold >>>= 3; - bits -= 3; - } - while (state2.have < 19) { - state2.lens[order[state2.have++]] = 0; - } - state2.lencode = state2.lendyn; - state2.lenbits = 7; - opts = { bits: state2.lenbits }; - ret = inflate_table(CODES, state2.lens, 0, 19, state2.lencode, 0, state2.work, opts); - state2.lenbits = opts.bits; - if (ret) { - strm.msg = "invalid code lengths set"; - state2.mode = BAD; - break; - } - state2.have = 0; - state2.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state2.have < state2.nlen + state2.ndist) { - for (; ; ) { - here = state2.lencode[hold & (1 << state2.lenbits) - 1]; - here_bits = here >>> 24; - here_op = here >>> 16 & 255; - here_val = here & 65535; - if (here_bits <= bits) { - break; - } - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (here_val < 16) { - hold >>>= here_bits; - bits -= here_bits; - state2.lens[state2.have++] = here_val; - } else { - if (here_val === 16) { - n = here_bits + 2; - while (bits < n) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - hold >>>= here_bits; - bits -= here_bits; - if (state2.have === 0) { - strm.msg = "invalid bit length repeat"; - state2.mode = BAD; - break; - } - len = state2.lens[state2.have - 1]; - copy = 3 + (hold & 3); - hold >>>= 2; - bits -= 2; - } else if (here_val === 17) { - n = here_bits + 3; - while (bits < n) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - hold >>>= here_bits; - bits -= here_bits; - len = 0; - copy = 3 + (hold & 7); - hold >>>= 3; - bits -= 3; - } else { - n = here_bits + 7; - while (bits < n) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - hold >>>= here_bits; - bits -= here_bits; - len = 0; - copy = 11 + (hold & 127); - hold >>>= 7; - bits -= 7; - } - if (state2.have + copy > state2.nlen + state2.ndist) { - strm.msg = "invalid bit length repeat"; - state2.mode = BAD; - break; - } - while (copy--) { - state2.lens[state2.have++] = len; - } - } - } - if (state2.mode === BAD) { - break; - } - if (state2.lens[256] === 0) { - strm.msg = "invalid code -- missing end-of-block"; - state2.mode = BAD; - break; - } - state2.lenbits = 9; - opts = { bits: state2.lenbits }; - ret = inflate_table(LENS, state2.lens, 0, state2.nlen, state2.lencode, 0, state2.work, opts); - state2.lenbits = opts.bits; - if (ret) { - strm.msg = "invalid literal/lengths set"; - state2.mode = BAD; - break; - } - state2.distbits = 6; - state2.distcode = state2.distdyn; - opts = { bits: state2.distbits }; - ret = inflate_table(DISTS, state2.lens, state2.nlen, state2.ndist, state2.distcode, 0, state2.work, opts); - state2.distbits = opts.bits; - if (ret) { - strm.msg = "invalid distances set"; - state2.mode = BAD; - break; - } - state2.mode = LEN_; - if (flush === Z_TREES) { - break inf_leave; - } - /* falls through */ - case LEN_: - state2.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next2; - strm.avail_in = have; - state2.hold = hold; - state2.bits = bits; - inflate_fast(strm, _out); - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next2 = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state2.hold; - bits = state2.bits; - if (state2.mode === TYPE) { - state2.back = -1; - } - break; - } - state2.back = 0; - for (; ; ) { - here = state2.lencode[hold & (1 << state2.lenbits) - 1]; - here_bits = here >>> 24; - here_op = here >>> 16 & 255; - here_val = here & 65535; - if (here_bits <= bits) { - break; - } - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (here_op && (here_op & 240) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (; ; ) { - here = state2.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; - here_bits = here >>> 24; - here_op = here >>> 16 & 255; - here_val = here & 65535; - if (last_bits + here_bits <= bits) { - break; - } - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - hold >>>= last_bits; - bits -= last_bits; - state2.back += last_bits; - } - hold >>>= here_bits; - bits -= here_bits; - state2.back += here_bits; - state2.length = here_val; - if (here_op === 0) { - state2.mode = LIT; - break; - } - if (here_op & 32) { - state2.back = -1; - state2.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = "invalid literal/length code"; - state2.mode = BAD; - break; - } - state2.extra = here_op & 15; - state2.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state2.extra) { - n = state2.extra; - while (bits < n) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.length += hold & (1 << state2.extra) - 1; - hold >>>= state2.extra; - bits -= state2.extra; - state2.back += state2.extra; - } - state2.was = state2.length; - state2.mode = DIST; - /* falls through */ - case DIST: - for (; ; ) { - here = state2.distcode[hold & (1 << state2.distbits) - 1]; - here_bits = here >>> 24; - here_op = here >>> 16 & 255; - here_val = here & 65535; - if (here_bits <= bits) { - break; - } - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if ((here_op & 240) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (; ; ) { - here = state2.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; - here_bits = here >>> 24; - here_op = here >>> 16 & 255; - here_val = here & 65535; - if (last_bits + here_bits <= bits) { - break; - } - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - hold >>>= last_bits; - bits -= last_bits; - state2.back += last_bits; - } - hold >>>= here_bits; - bits -= here_bits; - state2.back += here_bits; - if (here_op & 64) { - strm.msg = "invalid distance code"; - state2.mode = BAD; - break; - } - state2.offset = here_val; - state2.extra = here_op & 15; - state2.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state2.extra) { - n = state2.extra; - while (bits < n) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - state2.offset += hold & (1 << state2.extra) - 1; - hold >>>= state2.extra; - bits -= state2.extra; - state2.back += state2.extra; - } - if (state2.offset > state2.dmax) { - strm.msg = "invalid distance too far back"; - state2.mode = BAD; - break; - } - state2.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { - break inf_leave; - } - copy = _out - left; - if (state2.offset > copy) { - copy = state2.offset - copy; - if (copy > state2.whave) { - if (state2.sane) { - strm.msg = "invalid distance too far back"; - state2.mode = BAD; - break; - } - } - if (copy > state2.wnext) { - copy -= state2.wnext; - from = state2.wsize - copy; - } else { - from = state2.wnext - copy; - } - if (copy > state2.length) { - copy = state2.length; - } - from_source = state2.window; - } else { - from_source = output; - from = put - state2.offset; - copy = state2.length; - } - if (copy > left) { - copy = left; - } - left -= copy; - state2.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state2.length === 0) { - state2.mode = LEN; - } - break; - case LIT: - if (left === 0) { - break inf_leave; - } - output[put++] = state2.length; - left--; - state2.mode = LEN; - break; - case CHECK: - if (state2.wrap) { - while (bits < 32) { - if (have === 0) { - break inf_leave; - } - have--; - hold |= input[next2++] << bits; - bits += 8; - } - _out -= left; - strm.total_out += _out; - state2.total += _out; - if (_out) { - strm.adler = state2.check = /*UPDATE(state.check, put - _out, _out);*/ - state2.flags ? crc32(state2.check, output, _out, put - _out) : adler32(state2.check, output, _out, put - _out); - } - _out = left; - if ((state2.flags ? hold : zswap32(hold)) !== state2.check) { - strm.msg = "incorrect data check"; - state2.mode = BAD; - break; - } - hold = 0; - bits = 0; - } - state2.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state2.wrap && state2.flags) { - while (bits < 32) { - if (have === 0) { - break inf_leave; - } - have--; - hold += input[next2++] << bits; - bits += 8; - } - if (hold !== (state2.total & 4294967295)) { - strm.msg = "incorrect length check"; - state2.mode = BAD; - break; - } - hold = 0; - bits = 0; - } - state2.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next2; - strm.avail_in = have; - state2.hold = hold; - state2.bits = bits; - if (state2.wsize || _out !== strm.avail_out && state2.mode < BAD && (state2.mode < CHECK || flush !== Z_FINISH)) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state2.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state2.total += _out; - if (state2.wrap && _out) { - strm.adler = state2.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - state2.flags ? crc32(state2.check, output, _out, strm.next_out - _out) : adler32(state2.check, output, _out, strm.next_out - _out); - } - strm.data_type = state2.bits + (state2.last ? 64 : 0) + (state2.mode === TYPE ? 128 : 0) + (state2.mode === LEN_ || state2.mode === COPY_ ? 256 : 0); - if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; - } - function inflateEnd(strm) { - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - var state2 = strm.state; - if (state2.window) { - state2.window = null; - } - strm.state = null; - return Z_OK; - } - function inflateGetHeader(strm, head2) { - var state2; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - state2 = strm.state; - if ((state2.wrap & 2) === 0) { - return Z_STREAM_ERROR; - } - state2.head = head2; - head2.done = false; - return Z_OK; - } - function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - var state2; - var dictid; - var ret; - if (!strm || !strm.state) { - return Z_STREAM_ERROR; - } - state2 = strm.state; - if (state2.wrap !== 0 && state2.mode !== DICT) { - return Z_STREAM_ERROR; - } - if (state2.mode === DICT) { - dictid = 1; - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state2.check) { - return Z_DATA_ERROR; - } - } - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state2.mode = MEM; - return Z_MEM_ERROR; - } - state2.havedict = 1; - return Z_OK; - } - exports.inflateReset = inflateReset; - exports.inflateReset2 = inflateReset2; - exports.inflateResetKeep = inflateResetKeep; - exports.inflateInit = inflateInit; - exports.inflateInit2 = inflateInit2; - exports.inflate = inflate; - exports.inflateEnd = inflateEnd; - exports.inflateGetHeader = inflateGetHeader; - exports.inflateSetDictionary = inflateSetDictionary; - exports.inflateInfo = "pako inflate (from Nodeca project)"; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js -var require_constants = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js"(exports, module2) { - "use strict"; - module2.exports = { - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type - }; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js -var require_gzheader = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js"(exports, module2) { - "use strict"; - function GZheader() { - this.text = 0; - this.time = 0; - this.xflags = 0; - this.os = 0; - this.extra = null; - this.extra_len = 0; - this.name = ""; - this.comment = ""; - this.hcrc = 0; - this.done = false; - } - module2.exports = GZheader; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js -var require_inflate2 = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js"(exports) { - "use strict"; - var zlib_inflate = require_inflate(); - var utils = require_common(); - var strings = require_strings(); - var c = require_constants(); - var msg = require_messages(); - var ZStream = require_zstream(); - var GZheader = require_gzheader(); - var toString = Object.prototype.toString; - function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: "" - }, options || {}); - var opt = this.options; - if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { - opt.windowBits = -15; - } - } - if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { - opt.windowBits += 32; - } - if (opt.windowBits > 15 && opt.windowBits < 48) { - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - this.err = 0; - this.msg = ""; - this.ended = false; - this.chunks = []; - this.strm = new ZStream(); - this.strm.avail_out = 0; - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - this.header = new GZheader(); - zlib_inflate.inflateGetHeader(this.strm, this.header); - if (opt.dictionary) { - if (typeof opt.dictionary === "string") { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } - } - Inflate.prototype.push = function(data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - var allowBufError = false; - if (this.ended) { - return false; - } - _mode = mode === ~~mode ? mode : mode === true ? c.Z_FINISH : c.Z_NO_FLUSH; - if (typeof data === "string") { - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === "[object ArrayBuffer]") { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - strm.next_in = 0; - strm.avail_in = strm.input.length; - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) { - if (this.options.to === "string") { - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { - utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); - } - this.onData(utf8str); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - return true; - }; - Inflate.prototype.onData = function(chunk) { - this.chunks.push(chunk); - }; - Inflate.prototype.onEnd = function(status) { - if (status === c.Z_OK) { - if (this.options.to === "string") { - this.result = this.chunks.join(""); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; - }; - function inflate(input, options) { - var inflator = new Inflate(options); - inflator.push(input, true); - if (inflator.err) { - throw inflator.msg || msg[inflator.err]; - } - return inflator.result; - } - function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); - } - exports.Inflate = Inflate; - exports.inflate = inflate; - exports.inflateRaw = inflateRaw; - exports.ungzip = inflate; - } -}); - -// node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js -var require_pako = __commonJS({ - "node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js"(exports, module2) { - "use strict"; - var assign2 = require_common().assign; - var deflate = require_deflate2(); - var inflate = require_inflate2(); - var constants = require_constants(); - var pako5 = {}; - assign2(pako5, deflate, inflate, constants); - module2.exports = pako5; - } -}); - -// src/main.ts -var main_exports = {}; -__export(main_exports, { - default: () => BetterExportPdfPlugin3 -}); -module.exports = __toCommonJS(main_exports); -var import_obsidian6 = require("obsidian"); - -// src/i18n/index.ts -var import_deepmerge = __toESM(require_cjs()); - -// src/i18n/en.ts -var en_default = { - exportCurrentFile: "Export current file to PDF", - exportCurrentFileWithPrevious: "Export to PDF with previous Settings", - exportDialog: { - filenameAsTitle: "Include file name as title", - pageSize: "Page Size", - margin: "Margin", - downscalePercent: "Downscale Percent", - landscape: "Landscape", - displayHeader: "Display Header", - displayFooter: "Display Footer", - openAfterExport: "Open after export", - cssSnippets: "CSS snippets" - }, - settings: { - showTitle: "Add file name as title", - displayHeader: "Display headers", - displayFooter: "Display footer", - printBackground: "Print background", - maxLevel: "Max headings level of the outline", - displayMetadata: "PDF metadata", - headerTemplate: "Header Template", - footerTemplate: "Footer Template", - isTimestamp: "Add timestamp", - enabledCss: "Enable select css snippets", - concurrency: "Limit concurrency", - debugMode: "Debug Mode" - } -}; - -// src/i18n/zh.ts -var zh_default = { - exportCurrentFile: "\u5BFC\u51FA\u5F53\u524D\u6587\u4EF6\u4E3APDF", - exportCurrentFileWithPrevious: "\u4F7F\u7528\u4E0A\u4E00\u6B21\u8BBE\u7F6E\u5BFC\u51FA\u4E3APDF", - exportDialog: { - filenameAsTitle: "\u5C06\u7B14\u8BB0\u540D\u4F5C\u4E3A\u6807\u9898", - pageSize: "\u7EB8\u5F20\u5C3A\u5BF8", - margin: "\u9875\u8FB9\u8DDD", - downscalePercent: "\u7F29\u653E", - landscape: "\u6A2A\u5411\u6253\u5370", - displayHeader: "\u9875\u7709", - displayFooter: "\u9875\u811A", - openAfterExport: "\u5BFC\u51FA\u540E\u6253\u5F00", - cssSnippets: "CSS\u4EE3\u7801\u7247\u6BB5" - }, - settings: { - showTitle: "\u5C06\u7B14\u8BB0\u540D\u4F5C\u4E3A\u6807\u9898", - displayHeader: "\u663E\u793A\u9875\u7709", - displayFooter: "\u663E\u793A\u9875\u811A", - printBackground: "\u6253\u5370\u80CC\u666F", - maxLevel: "\u6700\u5927\u6807\u9898\u7EA7\u522B", - displayMetadata: "PDF\u5143\u6570\u636E", - headerTemplate: "\u9875\u7709\u6A21\u677F", - footerTemplate: "\u9875\u811A\u6A21\u677F", - isTimestamp: "\u6587\u4EF6\u540D\u6DFB\u52A0\u65F6\u95F4\u6233", - enabledCss: "\u542F\u7528CSS\u7247\u6BB5\u9009\u62E9", - concurrency: "\u9650\u5236\u5E76\u53D1\u6570", - debugMode: "\u8C03\u8BD5\u6A21\u5F0F" - } -}; - -// src/i18n/index.ts -var i18n_default = { - i18n: { - en: en_default, - zh: zh_default - }, - get current() { - var _a3, _b3; - const lang = (_a3 = window.localStorage.getItem("language")) != null ? _a3 : "en"; - return (0, import_deepmerge.default)(this.i18n.en, (_b3 = this.i18n[lang]) != null ? _b3 : {}); - } -}; - -// src/modal.ts -var electron2 = require("electron"); -var fs2 = __toESM(require("fs/promises")); -var import_obsidian4 = require("obsidian"); -var import_path = __toESM(require("path")); - -// src/constant.ts -var PageSize = { - A0: [841, 1189], - A1: [594, 841], - A2: [420, 594], - A3: [297, 420], - A4: [210, 297], - A5: [148, 210], - A6: [105, 148], - Legal: [216, 356], - Letter: [216, 279], - Tabloid: [279, 432], - Ledger: [432, 279] -}; - -// src/pdf.ts -var import_electron = __toESM(require("electron")); -var fs = __toESM(require("fs/promises")); -var import_obsidian2 = require("obsidian"); - -// node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p]; - }; - return extendStatics(d, b); -}; -function __extends(d, b) { - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -var __assign = function() { - __assign = Object.assign || function __assign2(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r2 = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r2[k] = a[j]; - return r2; -} - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/base64.js -var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var lookup = new Uint8Array(256); -for (i = 0; i < chars.length; i++) { - lookup[chars.charCodeAt(i)] = i; -} -var i; -var encodeToBase64 = function(bytes) { - var base64 = ""; - var len = bytes.length; - for (var i = 0; i < len; i += 3) { - base64 += chars[bytes[i] >> 2]; - base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4]; - base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6]; - base64 += chars[bytes[i + 2] & 63]; - } - if (len % 3 === 2) { - base64 = base64.substring(0, base64.length - 1) + "="; - } else if (len % 3 === 1) { - base64 = base64.substring(0, base64.length - 2) + "=="; - } - return base64; -}; -var decodeFromBase64 = function(base64) { - var bufferLength = base64.length * 0.75; - var len = base64.length; - var i; - var p = 0; - var encoded1; - var encoded2; - var encoded3; - var encoded4; - if (base64[base64.length - 1] === "=") { - bufferLength--; - if (base64[base64.length - 2] === "=") { - bufferLength--; - } - } - var bytes = new Uint8Array(bufferLength); - for (i = 0; i < len; i += 4) { - encoded1 = lookup[base64.charCodeAt(i)]; - encoded2 = lookup[base64.charCodeAt(i + 1)]; - encoded3 = lookup[base64.charCodeAt(i + 2)]; - encoded4 = lookup[base64.charCodeAt(i + 3)]; - bytes[p++] = encoded1 << 2 | encoded2 >> 4; - bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; - bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; - } - return bytes; -}; -var DATA_URI_PREFIX_REGEX = /^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i; -var decodeFromBase64DataUri = function(dataUri) { - var trimmedUri = dataUri.trim(); - var prefix = trimmedUri.substring(0, 100); - var res = prefix.match(DATA_URI_PREFIX_REGEX); - if (!res) - return decodeFromBase64(trimmedUri); - var fullMatch = res[0]; - var data = trimmedUri.substring(fullMatch.length); - return decodeFromBase64(data); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/strings.js -var toCharCode = function(character) { - return character.charCodeAt(0); -}; -var toCodePoint = function(character) { - return character.codePointAt(0); -}; -var toHexStringOfMinLength = function(num, minLength) { - return padStart(num.toString(16), minLength, "0").toUpperCase(); -}; -var toHexString = function(num) { - return toHexStringOfMinLength(num, 2); -}; -var charFromCode = function(code) { - return String.fromCharCode(code); -}; -var charFromHexCode = function(hex) { - return charFromCode(parseInt(hex, 16)); -}; -var padStart = function(value, length, padChar) { - var padding = ""; - for (var idx = 0, len = length - value.length; idx < len; idx++) { - padding += padChar; - } - return padding + value; -}; -var copyStringIntoBuffer = function(str, buffer, offset) { - var length = str.length; - for (var idx = 0; idx < length; idx++) { - buffer[offset++] = str.charCodeAt(idx); - } - return length; -}; -var escapeRegExp = function(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -}; -var cleanText = function(text2) { - return text2.replace(/\t|\u0085|\u2028|\u2029/g, " ").replace(/[\b\v]/g, ""); -}; -var escapedNewlineChars = ["\\n", "\\f", "\\r", "\\u000B"]; -var isNewlineChar = function(text2) { - return /^[\n\f\r\u000B]$/.test(text2); -}; -var lineSplit = function(text2) { - return text2.split(/[\n\f\r\u000B]/); -}; -var mergeLines = function(text2) { - return text2.replace(/[\n\f\r\u000B]/g, " "); -}; -var charAtIndex = function(text2, index2) { - var cuFirst = text2.charCodeAt(index2); - var cuSecond; - var nextIndex = index2 + 1; - var length = 1; - if ( - // Check if it's the start of a surrogate pair. - cuFirst >= 55296 && cuFirst <= 56319 && // high surrogate - text2.length > nextIndex - ) { - cuSecond = text2.charCodeAt(nextIndex); - if (cuSecond >= 56320 && cuSecond <= 57343) - length = 2; - } - return [text2.slice(index2, index2 + length), length]; -}; -var charSplit = function(text2) { - var chars3 = []; - for (var idx = 0, len = text2.length; idx < len; ) { - var _a3 = charAtIndex(text2, idx), c = _a3[0], cLen = _a3[1]; - chars3.push(c); - idx += cLen; - } - return chars3; -}; -var buildWordBreakRegex = function(wordBreaks) { - var newlineCharUnion = escapedNewlineChars.join("|"); - var escapedRules = ["$"]; - for (var idx = 0, len = wordBreaks.length; idx < len; idx++) { - var wordBreak = wordBreaks[idx]; - if (isNewlineChar(wordBreak)) { - throw new TypeError("`wordBreak` must not include " + newlineCharUnion); - } - escapedRules.push(wordBreak === "" ? "." : escapeRegExp(wordBreak)); - } - var breakRules = escapedRules.join("|"); - return new RegExp("(" + newlineCharUnion + ")|((.*?)(" + breakRules + "))", "gm"); -}; -var breakTextIntoLines = function(text2, wordBreaks, maxWidth, computeWidthOfText) { - var regex = buildWordBreakRegex(wordBreaks); - var words = cleanText(text2).match(regex); - var currLine = ""; - var currWidth = 0; - var lines = []; - var pushCurrLine = function() { - if (currLine !== "") - lines.push(currLine); - currLine = ""; - currWidth = 0; - }; - for (var idx = 0, len = words.length; idx < len; idx++) { - var word = words[idx]; - if (isNewlineChar(word)) { - pushCurrLine(); - } else { - var width = computeWidthOfText(word); - if (currWidth + width > maxWidth) - pushCurrLine(); - currLine += word; - currWidth += width; - } - } - pushCurrLine(); - return lines; -}; -var dateRegex = /^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/; -var parseDate = function(dateStr) { - var match = dateStr.match(dateRegex); - if (!match) - return void 0; - var year = match[1], _a3 = match[2], month = _a3 === void 0 ? "01" : _a3, _b3 = match[3], day = _b3 === void 0 ? "01" : _b3, _c2 = match[4], hours = _c2 === void 0 ? "00" : _c2, _d = match[5], mins = _d === void 0 ? "00" : _d, _e = match[6], secs = _e === void 0 ? "00" : _e, _f = match[7], offsetSign = _f === void 0 ? "Z" : _f, _g = match[8], offsetHours = _g === void 0 ? "00" : _g, _h = match[9], offsetMins = _h === void 0 ? "00" : _h; - var tzOffset = offsetSign === "Z" ? "Z" : "" + offsetSign + offsetHours + ":" + offsetMins; - var date = /* @__PURE__ */ new Date(year + "-" + month + "-" + day + "T" + hours + ":" + mins + ":" + secs + tzOffset); - return date; -}; -var findLastMatch = function(value, regex) { - var _a3; - var position = 0; - var lastMatch; - while (position < value.length) { - var match = value.substring(position).match(regex); - if (!match) - return { match: lastMatch, pos: position }; - lastMatch = match; - position += ((_a3 = match.index) !== null && _a3 !== void 0 ? _a3 : 0) + match[0].length; - } - return { match: lastMatch, pos: position }; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/arrays.js -var last = function(array) { - return array[array.length - 1]; -}; -var typedArrayFor = function(value) { - if (value instanceof Uint8Array) - return value; - var length = value.length; - var typedArray = new Uint8Array(length); - for (var idx = 0; idx < length; idx++) { - typedArray[idx] = value.charCodeAt(idx); - } - return typedArray; -}; -var mergeIntoTypedArray = function() { - var arrays = []; - for (var _i = 0; _i < arguments.length; _i++) { - arrays[_i] = arguments[_i]; - } - var arrayCount = arrays.length; - var typedArrays = []; - for (var idx = 0; idx < arrayCount; idx++) { - var element2 = arrays[idx]; - typedArrays[idx] = element2 instanceof Uint8Array ? element2 : typedArrayFor(element2); - } - var totalSize = 0; - for (var idx = 0; idx < arrayCount; idx++) { - totalSize += arrays[idx].length; - } - var merged = new Uint8Array(totalSize); - var offset = 0; - for (var arrIdx = 0; arrIdx < arrayCount; arrIdx++) { - var arr = typedArrays[arrIdx]; - for (var byteIdx = 0, arrLen = arr.length; byteIdx < arrLen; byteIdx++) { - merged[offset++] = arr[byteIdx]; - } - } - return merged; -}; -var mergeUint8Arrays = function(arrays) { - var totalSize = 0; - for (var idx = 0, len = arrays.length; idx < len; idx++) { - totalSize += arrays[idx].length; - } - var mergedBuffer = new Uint8Array(totalSize); - var offset = 0; - for (var idx = 0, len = arrays.length; idx < len; idx++) { - var array = arrays[idx]; - mergedBuffer.set(array, offset); - offset += array.length; - } - return mergedBuffer; -}; -var arrayAsString = function(array) { - var str = ""; - for (var idx = 0, len = array.length; idx < len; idx++) { - str += charFromCode(array[idx]); - } - return str; -}; -var byAscendingId = function(a, b) { - return a.id - b.id; -}; -var sortedUniq = function(array, indexer) { - var uniq = []; - for (var idx = 0, len = array.length; idx < len; idx++) { - var curr = array[idx]; - var prev = array[idx - 1]; - if (idx === 0 || indexer(curr) !== indexer(prev)) { - uniq.push(curr); - } - } - return uniq; -}; -var reverseArray = function(array) { - var arrayLen = array.length; - for (var idx = 0, len = Math.floor(arrayLen / 2); idx < len; idx++) { - var leftIdx = idx; - var rightIdx = arrayLen - idx - 1; - var temp = array[idx]; - array[leftIdx] = array[rightIdx]; - array[rightIdx] = temp; - } - return array; -}; -var sum = function(array) { - var total = 0; - for (var idx = 0, len = array.length; idx < len; idx++) { - total += array[idx]; - } - return total; -}; -var range = function(start, end) { - var arr = new Array(end - start); - for (var idx = 0, len = arr.length; idx < len; idx++) { - arr[idx] = start + idx; - } - return arr; -}; -var pluckIndices = function(arr, indices) { - var plucked = new Array(indices.length); - for (var idx = 0, len = indices.length; idx < len; idx++) { - plucked[idx] = arr[indices[idx]]; - } - return plucked; -}; -var canBeConvertedToUint8Array = function(input) { - return input instanceof Uint8Array || input instanceof ArrayBuffer || typeof input === "string"; -}; -var toUint8Array = function(input) { - if (typeof input === "string") { - return decodeFromBase64DataUri(input); - } else if (input instanceof ArrayBuffer) { - return new Uint8Array(input); - } else if (input instanceof Uint8Array) { - return input; - } else { - throw new TypeError("`input` must be one of `string | ArrayBuffer | Uint8Array`"); - } -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/async.js -var waitForTick = function() { - return new Promise(function(resolve) { - setTimeout(function() { - return resolve(); - }, 0); - }); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/unicode.js -var utf16Encode = function(input, byteOrderMark) { - if (byteOrderMark === void 0) { - byteOrderMark = true; - } - var encoded = []; - if (byteOrderMark) - encoded.push(65279); - for (var idx = 0, len = input.length; idx < len; ) { - var codePoint = input.codePointAt(idx); - if (codePoint < 65536) { - encoded.push(codePoint); - idx += 1; - } else if (codePoint < 1114112) { - encoded.push(highSurrogate(codePoint), lowSurrogate(codePoint)); - idx += 2; - } else - throw new Error("Invalid code point: 0x" + toHexString(codePoint)); - } - return new Uint16Array(encoded); -}; -var isWithinBMP = function(codePoint) { - return codePoint >= 0 && codePoint <= 65535; -}; -var hasSurrogates = function(codePoint) { - return codePoint >= 65536 && codePoint <= 1114111; -}; -var highSurrogate = function(codePoint) { - return Math.floor((codePoint - 65536) / 1024) + 55296; -}; -var lowSurrogate = function(codePoint) { - return (codePoint - 65536) % 1024 + 56320; -}; -var ByteOrder; -(function(ByteOrder2) { - ByteOrder2["BigEndian"] = "BigEndian"; - ByteOrder2["LittleEndian"] = "LittleEndian"; -})(ByteOrder || (ByteOrder = {})); -var REPLACEMENT = "\uFFFD".codePointAt(0); -var utf16Decode = function(input, byteOrderMark) { - if (byteOrderMark === void 0) { - byteOrderMark = true; - } - if (input.length <= 1) - return String.fromCodePoint(REPLACEMENT); - var byteOrder = byteOrderMark ? readBOM(input) : ByteOrder.BigEndian; - var idx = byteOrderMark ? 2 : 0; - var codePoints = []; - while (input.length - idx >= 2) { - var first = decodeValues(input[idx++], input[idx++], byteOrder); - if (isHighSurrogate(first)) { - if (input.length - idx < 2) { - codePoints.push(REPLACEMENT); - } else { - var second = decodeValues(input[idx++], input[idx++], byteOrder); - if (isLowSurrogate(second)) { - codePoints.push(first, second); - } else { - codePoints.push(REPLACEMENT); - } - } - } else if (isLowSurrogate(first)) { - idx += 2; - codePoints.push(REPLACEMENT); - } else { - codePoints.push(first); - } - } - if (idx < input.length) - codePoints.push(REPLACEMENT); - return String.fromCodePoint.apply(String, codePoints); -}; -var isHighSurrogate = function(codePoint) { - return codePoint >= 55296 && codePoint <= 56319; -}; -var isLowSurrogate = function(codePoint) { - return codePoint >= 56320 && codePoint <= 57343; -}; -var decodeValues = function(first, second, byteOrder) { - if (byteOrder === ByteOrder.LittleEndian) - return second << 8 | first; - if (byteOrder === ByteOrder.BigEndian) - return first << 8 | second; - throw new Error("Invalid byteOrder: " + byteOrder); -}; -var readBOM = function(bytes) { - return hasUtf16BigEndianBOM(bytes) ? ByteOrder.BigEndian : hasUtf16LittleEndianBOM(bytes) ? ByteOrder.LittleEndian : ByteOrder.BigEndian; -}; -var hasUtf16BigEndianBOM = function(bytes) { - return bytes[0] === 254 && bytes[1] === 255; -}; -var hasUtf16LittleEndianBOM = function(bytes) { - return bytes[0] === 255 && bytes[1] === 254; -}; -var hasUtf16BOM = function(bytes) { - return hasUtf16BigEndianBOM(bytes) || hasUtf16LittleEndianBOM(bytes); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/numbers.js -var numberToString = function(num) { - var numStr = String(num); - if (Math.abs(num) < 1) { - var e = parseInt(num.toString().split("e-")[1]); - if (e) { - var negative = num < 0; - if (negative) - num *= -1; - num *= Math.pow(10, e - 1); - numStr = "0." + new Array(e).join("0") + num.toString().substring(2); - if (negative) - numStr = "-" + numStr; - } - } else { - var e = parseInt(num.toString().split("+")[1]); - if (e > 20) { - e -= 20; - num /= Math.pow(10, e); - numStr = num.toString() + new Array(e + 1).join("0"); - } - } - return numStr; -}; -var sizeInBytes = function(n) { - return Math.ceil(n.toString(2).length / 8); -}; -var bytesFor = function(n) { - var bytes = new Uint8Array(sizeInBytes(n)); - for (var i = 1; i <= bytes.length; i++) { - bytes[i - 1] = n >> (bytes.length - i) * 8; - } - return bytes; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/errors.js -var error = function(msg) { - throw new Error(msg); -}; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/utils.js -var import_pako = __toESM(require_pako()); -var chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var lookup2 = new Uint8Array(256); -for (i = 0; i < chars2.length; i++) { - lookup2[chars2.charCodeAt(i)] = i; -} -var i; -var decodeFromBase642 = function(base64) { - var bufferLength = base64.length * 0.75; - var len = base64.length; - var i; - var p = 0; - var encoded1; - var encoded2; - var encoded3; - var encoded4; - if (base64[base64.length - 1] === "=") { - bufferLength--; - if (base64[base64.length - 2] === "=") { - bufferLength--; - } - } - var bytes = new Uint8Array(bufferLength); - for (i = 0; i < len; i += 4) { - encoded1 = lookup2[base64.charCodeAt(i)]; - encoded2 = lookup2[base64.charCodeAt(i + 1)]; - encoded3 = lookup2[base64.charCodeAt(i + 2)]; - encoded4 = lookup2[base64.charCodeAt(i + 3)]; - bytes[p++] = encoded1 << 2 | encoded2 >> 4; - bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; - bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; - } - return bytes; -}; -var arrayToString = function(array) { - var str = ""; - for (var i = 0; i < array.length; i++) { - str += String.fromCharCode(array[i]); - } - return str; -}; -var decompressJson = function(compressedJson) { - return arrayToString(import_pako.default.inflate(decodeFromBase642(compressedJson))); -}; -var padStart2 = function(value, length, padChar) { - var padding = ""; - for (var idx = 0, len = length - value.length; idx < len; idx++) { - padding += padChar; - } - return padding + value; -}; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Courier-Bold.compressed.json -var Courier_Bold_compressed_default = "eJyFWdtyGjkQ/RVqnnar8Bb4lpg3jEnCxgEvGDtxKg9iphm01oyILrZxKv++mrGd3az6KC8UnNa0+nrUGr5lI11VVLtskF198FaU1Dns9w9OOkf7/ePDrJu90bWbiorCgpH2RpLZO9WqaCReqZ8lnReJqKTa/SwL8DXJctPs9Lxs4oSS+bAuVVjXC7/tG/lAxYV0+SYbOOOpm402wojckVlQ8+T4wVFdUDHXlaifrTs91Q/Z4PNeMLu7t3/U6746POm+7vW/dLNlWGuUrOlCW+mkrrPBXr/X+4/gciPz25qszQbhyeyKjG2XZb3ewR+9Xi/sMdVO5k+ebHemcaHzW/57p3/y+qQbPk967We//TxoP191hoVeUWexs44q25nUuTZbbYSj4o9OZ6hUZ97osZ05WTJ3AQ37jMOqQtblIt9QG7lWycKJuhCmeJGGhSOxffccyqPj/W728eXX4cFJNxvavAmRyQbH++HnGf34vdc/etXNFq54d50NXh+2X6/C137v+CnQH8gZmYdQfP6WXX8MCppQTYMlditCBL53/wfTQ65EFeNfvQ6erlQsqX21akJc1rGs0EoJE+NbMnlToZFAVEFkQ3iABW2uGH3CUK1ojUTgMWEbjfaWeUp5G6N5aCwRw5vddkOM98EVqRlPrBJ2E8OPZHSM6prJkrtnVrqNIWbtOjQrg8o7Zq2VDwxId5x3xMe0lpzBuVaa0WGpkkCkmgaON/3qBVODpaHQiIybXz3ZliTi3DO2D2PoNIZGMXQWQ+MYehNDb2PoXQxNYujPGHofQ+cx9CGGpjE0i6GLGPorhuYxtIihyxhaxtBVDF3H0McY+hRDNzG0CqfQLTmeNlZBBvr0+TnIKbmUuTS5Z1jUN6xtw8nBtEjLb7wxDOesmB5j+JfpIIYLmIZiWC6GZAz9HUMMvTItzESL6VqG9rZMKGOI4QaGXpjY+xi6i6H7GGKYdMeQPl9foBBW3GHark9Vo5OqgEd9oe+ZOPOnc3NcqmZgiUuomehYnt1xZ8daaSPZ8wBoyb0Jx3jOBLBtGyvbiRNOLXw0Sy+DpNKAAhpxq/gXYhD6NdMda6bwwyTH0kwhypI70p5wdhR7Gjia3JEhpvfDLCRKI7YcqYXJnxgv/g3vSthEhNNSEKIfCQByUkpurWQaNXjqNtqjSfHp0OdLOwSAG31E7h03uLRMvlbEtDPoq0rkhqvhlSFu40I7kfP9VoRLFrH+G7YLcypCQLkJ1delML5SwjPb6DIMmQxL54L1gyq+YIfMyKNNsQ4zHj8UnoMDdoZwfoMqkJxX7A6Cj3czWzLdqcC+GuGM9tCa4RobSp5J2gTnk0D5CVA0Pp1RAqn7hC0o5J3kqvkTsGyY6gwBHlqmHtqBh2x77UI9QimVS75PljgMAjXDEljn0QNjvMlZIAju/pF0NH95VcFshSgnB3Ug+LhMkwYoVKOAUS+T2kZIG2DVcYInLXDTQkKUYHelH6kuGcEcbPE26aRPNklKOEQpNcCQHPp6k4jc5UYbRtkM7T4HcVsAvADWLtEGnq/M9t2G9e2Aw8xEM1CCQ4QDWq28cnKrmDHTAwcvgYNh1HJSqEKumdvVDlPDFOwjU8UyTpZZ4tTBohzYUSMaRAmdggBNgKLmzVsYGLjXbyujb6lm70CGSmnB1PsWJHuSYhQfupq/ioxBTRngkEaRuQEP3ICIPb/kAq/Axo6ZUEaQFFSStxwa/eDpiARDND4kqhIE+BG1Btp7hjKCjh6UKYt2xk7MkmMJ8PCMlGNy5XiSdvc6wYjYtIp5pSGBRTo9Z45R6Asw4bQ8HgrYhEJmTFsk6pWvyPfJOj4HiXNGFFQJw1hOCVaYgChNUOGcA6tD0DZCMSdDczMBDa5TFVWDqWn5i/yB+BByqARcGhx6ziqXVD4Ii2TqZmnLi8AS3L8dGqRoBIzwkM0LmXNpOAOKTNKbKciPBvg8XdZJ6RDoHEKO5meuGdDzmOiQMTrt0d63SVfAIDBJtgIwwaUvN7ps8l1r7v0I5lKPRUEV+rcqfaHlDvJH4FSdVBVCjk8IiXp87Jv/Ib90s/dk6gshTfPv8Zfv/wDUfBK2"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Courier-BoldOblique.compressed.json -var Courier_BoldOblique_compressed_default = "eJyFWdtyGjkQ/RVqnnarcAo7vuE3jEnCxgEvGDtxKg9iRgxaa0ZEF9s4lX/fnrGdTVZ9lBcKTmvU96PW8C0bmqqStc9OsqsPwYlSdnaPDvb6naP+3v5+1s3emNpPRCVpwdAEq6TdOTW6mC61+hpksyBo/euCTrOg89MKUSm9/XUNwddSletGcbOcfo+90Cof1KWmdTu7e4S4N+pBFhfK5+vsxNsgu9lwLazIvbRz2Tw7evCyLmQxM5Won809PTUP2cnnnYOj7s7eQa97fNjvHvd2v3SzBS21WtXywjjllakbRb3eT4LLtcpva+lcdkJPZlfSunZZ1uu9ftXr9UjFxHiVP7my2drGh84f+Z+d3f5xv0uf/V77udt+vm4/jzqDwixlZ751XlauM65zYzfGCi+LV53OQOvOrNnHdWbSSXtHKOkZ0apC1eU8X8s2dO0mcy/qQtjiRUoLh2Lz7jmWB4cUto8vv/Zf97vZwOVNhGx2crhHP8/kj987uxShbO6Ld9fZyfF++/WKvu72Dp/i/EF6q3IKxedv2fVH2qAJ1YQscRtBEfje/R8sH3Itqhj/Ggx5utSxpA7VsglxWceywmgtbIxvpM2bio0EoiKRo/AAC9pcMfsJK2stV0gEHhOu2dHdMk/p4GI0p0YTMbzebtaS8Z5cUYbxxGnh1jH8KK2JUVMzWfL3zEq/tpJZu6JuZVB1x6x16oEB5R3nneRjWivO4Nxow+zhZKWASDcNHCv9GgRTg6WV1IiMm8ReriWJOPeM7YMYOo2hYQydxdAoht7E0NsYehdD4xj6K4bex9B5DH2IoUkMTWPoIob+jqFZDM1j6DKGFjF0FUPXMfQxhj7F0E0MLekQupWep40lyUCfPj8HOSVXKlc2DwyLhoa1HZ0cTIu0/MYbw3DOkukxhn+ZDmK4gGkohuViSMXQPzHE0CvTwky0mK5laG/DhDKGGG5g6IWJfYihuxi6jyGGSbcM6fP1BQphyR2m7fpUNXqlC3jUF+aeiTN/OjfHpW4GlriEmoGO5dktd3astLGKPQ/ALnmwdIznTADbtnGqHTnh1MJHswyKJJUBFNCI241/IwahXzHdsWIKnyY5lmYKUZbckfaEs6PY08DR5E5ayfQ+zUKitGLDkRpdASTjxX/hXQqXiHBaCkL0IwFALrVWG6eYRiVP/doENCk+Hfp8aVMAuNFH5MFzg0vL5CstmXYGfVWJ3HI1vLSSU1wYL3K+3wq6ZUnWf8t2YS4LCig3oYa6FDZUWgRGjSlpyGRYOhesH7LiC3bAjDzGFiua8fih8BwcsFOE8woqIrmgWQ2Cj3czWzLdqYFeg3Bmd2pNusVSyTNJG+N8SlB+AhRNSGdUgtR9whYU6k5x1fwJWDZIdYYADy1SD23BQ669dqEekaktF3yfLHAYBGqGBbAuoAdGWMkZEQR3/0g6mr+8qmBUIcrJQR0IPi6TpAEa1Shg1MvkbkO0G2DVUYInHXDTQUJUQLs2j7IuGcEMqHibdDIkmyQlHKCUWmBIDn29SUTucm0ss9kUaZ+BuM0BXgBrF0hB4CuzfbfhQjvgMDPRFJTgAOGAVqugvdpoZswMwMFL4CCNWl4JXagVc7vaYmqYAD0qVSyjZJklTh0syoEdNaJBlNAJCNAYbNS8eaOBgXv9trTmVtbsHcjKUjkw9b4FyR6nGCVQV/NXkRGoKQscMigyN+CBGxCx55dc4BXYyDMTyhCSgk7ylkejHzwdkWCAxodEVYIAP6LWQLqnKCPo6EGZckgzdmKaHEuAh2dSeyZXnidpf28SjIhNq5hXGgpYZNJz5giFvgATTsvjVMCWCpkxbZ6oV74i3yfr+BwkzltRyEpYxnKZYIUxiNIYFc45sJqCthaaORmamwlocJOqqBpMTYvf5A/ERyKHSsCl5NBzVrmk8kGYJ1M3TVteEEtw/3YYkKIhMCJANi9UzqXhDGxkk95MQH4MwGfpsk5KB2DPAeRofuaagn0eEx0yQqc90n2bdAUMAuNkKwATfPpyY8om37Xh3o9gLg1YRFuhf6vSF1ruIH8ETtXJrSjk+IRQqMdHofkf8ks3ey9tfSGUbf49/vL9XxrnGMA="; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Courier-Oblique.compressed.json -var Courier_Oblique_compressed_default = "eJyFWVtT2zgU/isZP+3OhE5Iy/UtDaHNFhI2IdDS4UGxFUeLbKW6AKHT/77Hhnbb1fnUFw98x9K5fzpyvmZDU1Wy9tlxdnUenChlZ3e//+awc7B32D/Kutmpqf1EVJJeGJpglbQ706VWX4JshEHrX4Wdn4SiUnr7q5jga6nKdaPvXBYqVISMvdAqH9Slpjd3dvuEuFP1KIsL5fN1duxtkN1suBZW5F7auWxWjx69rAtZzEwl6hc73741j9nx553+QXenv9frHr456h729m672YJetVrV8sI45ZWpG0W93k+Cy7XK72rpXHZMK7MraV37WtbrvX7V6/VIxcR4lT87s9naxovOH/mfnd2jw6MuPY967XO3ffbb5+v2edAZFGYpO/Ot87JynXGdG7sxVnhZvOp0Blp3Zs1urjOTTtp7QknbiN4qVF3O87VsQ9huMveiLoQtvkvpxaHYvH+J6d4+Be/j9//e9Pe72cDlTZxsdrzfP+pmJ/LH/zu7ewfdbO6L99e0crf98+rlzybY59JblVM8Pn/Nrj/S+iZeEzLEbQSF4Vv3f7B8zLWoYvxLMOToUseSOlTLJs5lHcsKo7WwMb6RNm/qNRKIikSOogMsaBPG7CesrLVcIRFYJlyzo7tjVungYjSnNhMxvN5u1pLxnlxRhvHEaeHWMfwkrYlRUzNZ8g/Mm35tJfPuipqWQdU9865Tjwwo7znvJB/TWnEG50YbZg8nKwVEuuniWOmXIJgaLK2kPmTcJBJzLVPEuWdsH8TQ2xgaxtBJDI1i6DSG3sXQ+xgax9BfMfQhhs5i6DyGJjE0jaGLGPo7hmYxNI+hyxhaxNBVDF3H0McY+hRDNzG0pJPoTnqeNpYkA336sg5ySq5UrmweGBYNDWk7OjiYFmn5jTeG4Zwl02MM/zIdxHAB01AMy8WQiqF/YoihV6aFmWgxXcvQ3oYJZQwx3MDQCxP7EEP3MfQQQwyTbhnS5+sLFMKSO0zb91PV6JUu4FFfmAcmzvzp3ByXuplX4hJqpjqWZ7fc2bHSxir2PAC75MHSMZ4zAWzbxql27oRTCx/NMiiSVAZQQCNuN/6NGIR+xXTHiil8GuRYmilEWXJH2jPOjmLPA0eTO2kl0/s0C4nSig1HanQJkIwX/4V3KVwiwmkpCNGPBAC51FptnGIalTz1axPQpPh86POlTQHgRh+RB88NLi2Tr7Rk2hn0VSVyy9Xw0kpOcWG8yPl+K+iyJVn/LduFOV3GaOBmuDvUpbCh0iIwakxJQybD0rlg/ZAVX7ADZuQxtljRjMcPhWfggJ0inFdQEckFzWoQfLyb2ZLpTg30GoQzu1Nr0lWWSp5J2hjnU4LyE6BoQjqjEqTuE7agUPeKq+ZPwLJBqjMEWLRILdqCRa69dqEekaktF3yfLHAYBGqGBbAuoAUjrOSECIK7fyQdzb9/r2BUIcrJQR0IPi6TpAEa1Shg1MvkbkO0G2DVUYInHXDTQUJUQLs2T7IuGcEMqHiXdDIkmyQlHKCUWmBIDn29SUTucm0ss9kUaZ+BuM0BXgBrF0hB4Cuz/bbhQjvgMDPRFJTgAOGAVqugvdpoZswMwMFL4CCNWl4JXagVc7vaYmqYAD0qVSyjZJklTh0syoEdNaJBlNAJCNAYbNR8eaOBgfv8trTmTtbsHcjKUjkw9b4DyR6nGCVQV/NXkRGoKQscMigyN2DBDYjYy0cu8Als5JkJZQhJQSd5y6PRD56OSDBA40OiKkGAn1BrIN1TlBF09KBMOaQZOzFNjiXAwxOpPZMrz5O0fzAJRsSmVcwnDQUsMuk5c4RCX4AJp+VxKmBLhcyYNk/UK1+RH5J1fAYS560oZCUsY7lMsMIYRGmMCucMWE1BWwvNnAzNzQQ0uElVVA2mpsVv8gfiI5FDJeBScuglq1xS+SDMk6mbpi0viCW4XzsMSNEQGBEgmxcq59JwAjaySW8mID8G4LN0WSelA7DnAHI0P3NNwT5PiQ4ZodMe6b5LugIGgXGyFYAJPn25MWWT79pw30cwlwYsoq3Qr1XpCy13kD8Bp+rkVhRyfEIo1OOj0PwOedvNPkhbXwhlm1+Pb7/9C/NFF2U="; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Courier.compressed.json -var Courier_compressed_default = "eJyFWdtSGzkQ/RXXPO1WmZSBEAJvjnESb8AmGENCKg+ypj3Wohk5ugAmlX9fzUCyW6s+ysuUfVqXvh61Zr4XI1PX1PjiuLg6C05U1Ns/Ojx42TsYHB4eFf3irWn8VNQUB4xMsIpsCwatU1DUSm8T+JpUtW7XP6NShToiEy+0ksOm0nHkIP53b9UDlefKy3Vx7G2gfjFaCyukJzundu74wVNTUnlhatE8a/XmjXkojr/s7O33d/YOBv3D3YP+68HB136xiEOtVg2dG6e8Mk1xvLM7GPxHcLlW8rYh54rjOLO4Iuu6YcVgsP9iMBjELabGK/lkymZrWxt6f8g/e7tHr4/68Xk06J673XOve+53z8PesDRL6s23zlPtepNGGrsxVngqX/R6Q617F+1qrndBjuxdRONu4ziqVE01l2vqHNgtMveiKYUtf0rjwJHYvH/26MGrvX7x6ee/l3uv+sXQydZPtjh+tXfUL07o1/+d3YPDfjH35fvrOHO3+3n1/LN19hl5q2T0x5fvxfWnOL/11zQq4jYiuuFH/38wPUgt6hT/Fkw0dKlTSRPqZevnqkllpdFa2BTfkJVtdiYCUUeRi94BGnQBY9YTlhpNKyQC04RrV3S3zCwdXIrKWFQihdfbzZoY66MpyjCWOC3cOoUfyZoUNQ0TJX/PjPRrS8zYVSxZBlV3zFinHhiQ7jjriPdpoziFpdGGWcNRrYBIt1WcbvotCCYHK0uxDhkzvwVyHVOksWd0H6bQmxQapdBJCo1T6G0KvUuh9yk0SaG/UuhDCp2m0FkKTVNolkLnKfQxhS5SaJ5Clym0SKGrFLpOoU8p9DmFblJoGU+iW/I8bSyjDNTp8zzIKVIpqawMDIuGlrRdPDiYEun4jVeG4ZwlU2MM/zIVxHABU1AMy6WQSqG/U4ihV6aEGW8xVcvQ3oZxZQox3MDQC+P7kEJ3KXSfQgyTbhnS5/MLJMKSO0y78bls9EqX8KgvzT3jZ/50bo9L3fYraQq1XR3Ls1vu7FhpYxV7HoBVZLDxGJeMA7uycarrOmHXwnuzCipKagMooBV3C/9GDFy/YqpjxSR+bORYmilFVXFH2hPOtmJPDUcbO7LE1H7shURlxYYjtdj6E2PFv+5dCpfxcF4KXPQrAEBOWquNU0yhRkv92gTUKT4d+nxqRwdwrY+QwXONS8fkK01MOYO6qoW0XA4vLXEbl8YLyddbGa9axNpv2SqU8SoWG26Gu0NTCRtqLQKzjalik8mwtBSsHVTzCTtkWh5jy1Xs8fim8BQcsDOE8xvUkeSCZncQvL/b3pKpTg32NQhnVo+lGa+yMeWZoE1wPAmknwBJE/IRJRC6z1iDUt0pLps/A82GucoQYNIiN2kLJrnu2oVqhHJLLvg6WWA3CFQMC6BdQBPGeJOTSBDc/SNrqPz5voLZClGOBHkgeL9MswpolKOAUS+zq43QaoBVxxmedMBMBwlRgd21eaSmYgQXYIt3WSNDtkhywiEKqQWKSGjrTcZzl2tjmcVmaPcL4Lc5wEug7QJtEPjM7N5tuNA1OExPNAMpOEQ4oNU6aK82mmkzAzDwEhgYWy2vhC7VirldbTE1TME+Kpcs42yaZU4dLJJAjwbRIAroFDhoAhZq37zFhoF7/ba05pYa9g5kqVIOdL3vQLAnOUYJsar5q8gY5JQFBhnkmRsw4QZ47PklF3gFNvZMhzKCpKCzvOVR6wdPRyQYovYhk5XAwY+oNNDeMxQRdPSgSDm0MzZilm1LgIUnpD0TK8+TtL83GUbEqtXMKw0FNDL5PnOMXF+CDqfj8ZjANiYyo9o8k698Rn7I5vEpCJy3oqRaWEZzyrDCBHhpghLnFGgdnbYWmjkZ2psJKHCTy6gGdE2L38QP+IeQQRXg0mjQc1S5oPJOmGdDN8trXkaW4L52GBCiEVAiQDYvleTCcAIWsllrpiA+BuAX+bTOSodgzSHkaL7nmoF1HjMVMkanPdr7NmsKaAQm2VIAKvj85cZUbbwbw70fwVwasCguhb5W5S+03EH+CIxqsktFl+MTQqEaH4f2O+TXfvGBbHMulG2/Hn/98Q/b2xEO"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Helvetica-Bold.compressed.json -var Helvetica_Bold_compressed_default = "eJyNnVtzG0eyrf8KA0/7RMhzJJK6+U2+zMX2mJYsEuJMzANEtihsgYQMEITaO/Z/P41CV+bKlaug86JQf6uArsrKXNVX8H8m3y9vb7u7+8m3k4t/btazm+7o5PmTZy+PTl88eXk6eTT56/Lu/tfZbTc0+Hu3eOju51ezb75bLq532maxYO2oarPb+aJndRCm3fzm425/Y8N/3M8W86tXdzeLoeXjYXv91/mX7vq3+f3Vx8m396tN92jy/cfZanZ1361+73af/PHLfXd33V2/Wd7O7sY+fvfd8svk239/8+T540ffHB+/ePTk8eOTRy+fHf/n0eR8aLxazO+635br+f18eTf59ptBBuHtx/nVp7tuvZ58+3TgF91qXZpNHj8+/svjx4+Hnfy6HAawG8z3y8/9ajeGo/+6+j9HT16+ePpo9+/z8u/L3b8vH5d/nx+9ul6+745+79f33e366B93V8vV5+Vqdt9d/+Xo6NVicfRm9z3rozfduls9DNTDOF8fzY7uV7Pr7na2+nS0/HD0y/xued9/7r4ZGi2OXv3taHZ3/X+Xq6P58AXrzfv1/Ho+W8279V+Gzv447Op6fnfz+9XHrsxA6cnv98NHZqvrqg4Nv599/vs4Ic+fvHg0eVe3np4cP5q8Wl/tAr0axR862/7m+PHzR5Pf76//Pp18+2QnDv+/2P3/9PF+vv7Z3a/mV0NA//0/k+m7ybfHz4dGvw5dWX+eDXH830d7fHJyssfdl6vF7Nb46fPTPf9jsxzi9X5hytOnz/bK3eb2/W6ibu6ydr1cLGYr4y+GiSn8c7e62qV7FZ4fH++F2e0grYf4mGQdLj0oM557/Xm26u4W3YeWRB+r3Zitd9+4/uQdfzEO9/Nis85duBqqdJZ38bH//LG7y82HocyXYiTrxWz9MQfrz261zHR512V4vxUt7z+uOtH2w3KzEnT+INqu518E7B46MbddiKmnw/xOpNXVcrG8y3jd3c6jZDOw2NlAot0fm9ki45tVN5SzD/PZkyc1abp1sZqqvHz+dJx7kX2vMvouo+8z+sH3/Oz5Hv2YO/NX/2BNhb/l7/p7Tph/5DD/lD/4c97jL156NeT/zB/8NffrLA/ot9zqdf6uN/mDv+d+vc0fPM8fvPBZOx0neppbvcvoMu/xXzn53g+L2afuPtiGhfz9oMU65c9FT7FUnK2v5vOr+epqc5tnbbOz7fWw/nR5j8XfQmfsY7M8nve51VVudZ1bieL8kD94k9HH3OV5Rv+d9/gpt/IStiXhNu/xLqNlRp9F1WerFxa4zpG4z9+1yR98yJWwza2Ek/aOdsc9xfRzV3f5FRPh+MXjmpWrRvtD2Xg/X1w3l/rr5VaYe1idPWL35TjNk+NJrbgPuwND9Fkfs1o7PiyWq7ng667xLVeb1bCMX3kAj0+wbNbzcuCaoluPWnRZ3Wzmg3K7vNdHDju5fPFX5Bh6S5wPc8HE8dNwKCcPB65nNzedSNs9x0MxOuDYzV236kTtD8dCs5vV7DOY2tOaWcNJRCd80MP7frY+EOHD6kofK9gERH04KRg/Pxxizz+v52shDWO9/7jchGPFtOyH5PaZW80eRD3Mrjb36tClePmHRfcla43Kup1drdThzvtVp3Z8vbyfXYWKc2k+zCQGwJQV1qF3trseQqqOUTd3N7PV5nYx24jdLG+Gw8xP4utmOA6Yl9uQsy688sOek+cjW66uPwzHeeHA0I9Q4iLrByCR+x7OYA/Pntoebgen2yxwF7ayzMRie70r+vVaLGCLuGNfeSK3I5KlGNRQn8Mp8ZD34hziH2lK3QliBvryH/PGlyY5qf51cfb86Cj3oC4X1/OHOSS0fyT2zA+YRXF4txsfOj/0ob4Rg3U596IygaHmr/T9hVJx3J6IGdWDfyb2zmeCPuBnAWknfs4weASchBxXJ1YDfX7yvIrjVQ+xK3IdXztjHvgodVx+VR3w8mjlaDRVP9KXw7FTqda3RWOFcCarhAzRw1yzJ/rha9z76ct66rn8s7u7EZn7Ju7Cz+LUID05DhbJocx9xQuJHc02xnrFY/Xznxw5i+rbj8uVGNUZ7d3DQFVgJ3pU8Kd1EaOwWTXRDjxienErFzjWm3KUsxL9jSnoUWzxaKtmgrebxf3886IX/WqU/9s4QEuk4Xjrfj5bXM8/fMhz1bet4de4H09YkSxeGwfT7MCq05auGuO9a9lgK2N+jQHyxZDqHy+/DUcMeA3OToFWy0/dHZ4ImTmuupv5Oh76eonGyYblONdFPdRYb4aqDucjHmw6hrTCbERm2Ur1fzU+8C+q8NOX9di1XOmK18Eszj/ef8zw+6YBLpRv2VjuGybTNVfHlvCqdfhwICtjgP18uVUavG9zhdaMtJae1jK6bu0517Ht++BhCa+Y9bigW9wLA78PJu2euF0ecMTUNfu6240YSWMNX8rjTK8FPvixq0/xCOfFySn4+JDAqyGR1/n7fud8Pa2Tv2gsJD8fXH9/iRPnpxJ2X0eZYrIFt4wYJuetGv8ldtviMETt42wBS0Mt8t2pSaxwnwu1BJgvx8MmT7WvTGCjFLrWgG6imeKAxmlVs6rPRn6XB4iWwbLnlhDXg010KmMbS/731AlbuMhtTs3Or+dXymh/iF8EB2aHDnd/pcNa625j3t4czuuD+3rV+M5XTZOOpwM2A/F73IgPHFD+2Fruad9+iVie3dkBWTwSsG87WAo0QeaXB/e0WN7s5vtuKcK9bJvpJq9jNYOGr2pU8s3Bye1gJfeYN9L3Tq7jdnHnLh80u+e3lrsfN7u7kf95NPm5W939NpuvdveQ/z15tbtbPXn0zenj/zwat/buEdC+nxGNpo7wb8PWU9/au0pAODAUzsL3nOUu4NIbuE1VoPv6Dyg4T1DGkAW2vzoU0L5wEL0OW2+HrZe+VWOGKIzehfMQi/M6ekBh9MBh9EDr6AHR6EGx0QMb6zqwYidILoatF7Y1Hbae2dblsPXkiW/WISGDvgPeDJsnvlU/CCjEAjh8H9AaC0AUC1AsFsAsFsDGWDh5CJmwDVoft/KI+tzzsRGWpiEqDuNUpM65UqsC5WqIata4LNyqnuXv5hI2rurYxFzMJlFFG9dlbTLXtglU4Mapyit/nRHUuyEqeueq8qt6niPKHmBcGYGJ2Q1MIkswrn3BZDYHE9ghTIg2UTF4RUVgGBWhaxhj6zBB+EfVwEQMUd0ZV3ZiYrsy2ViMa3cxmS3GBPYZE6LZVPyQE3KbW/UCNQIhXGg0A3QhQ1TfxsmFnLMLVQVcyBC5kHHpQlU9y9/NLmRcuZCJ2YVMIhcyrl3IZHYhE8iFjJMLVf46I3AhQ+RCzpULVfU8R5RdyLhyIROzC5lELmRcu5DJ7EImsAuZEF2oYnChisCFKkIXMsYuZIJwoaqBCxmi4jOuXMjEdmWyCxnXLmQyu5AJ7EImRBeq+CEn5Da36gVqBEK4EIYGrShyqvQokimRyM4UZLCnyMmjoiiNKjQ5a+yPLSuKyrdii2xeUScHi6K2sdiGvSyqZGhRJFcL4usGB3+LnEyOROV0ocl5Y17Y86KojC+2yO4XdbLAKGofjG3YDKPKjhjVaItBA28MHAwycHTJKLBVRlX4ZWgAphk5GUYUlX3GFl/xFTbSKGo3jW3YUqPKvhrVaK5Be2jUxbbRvm/xQ/ETrusEPRcpGRVK5LdBYrcFEbwWKTktStJnocGZ3A97LErKYVHP/ooquStK2luxBTsrauSrKJGrgvRaUnBUpOSnQVJuCg3OZezZSVFSPop6dlFUyUNR0g6KLdg/UWP3RC16JyjgnEDBN4GiayJmz0RNOCbI4JdIqdpRUl6J+kEvYJ9ESbsktmCPRI0dErXoj6A8yAzfyra9pu1ICVccR4+WaIhMxTiZoXN2wqqADRoiDzQuDbCqZ/m72fqMK98zMZueSeR4xrXdmcxeZwIZnXFyucpfZwT+ZojMzblytqqe54iypxlXhmZidjOTyMqMax8zmU3MBHYwE6J9VQzeVREYV0XoWsbYskwQflU1MCtDVH/GlU2Z2K5MNijj2p1MZmsygX3JhGhKFT/khNzmVr1AjUAIF6p9RRtyRhXuAhkRCOxEJoEVOSMvckGakcln4vvZjlxQfuRqNiTXyJFc0JbkOnuSK2RKLpArmfBaMPAlZ2RMIChnMvlcxJe9yQVlTq5md3KN7MkF7U+us0G5wg7lSrQo4+BRxsCkjKFLOWSbckX4lIlgVM6oQF1QVuXqgfpls3JBu5XrbFeusF+5Eg3L+IPI1a1o1yvWiolwrdoxdC1nZAQukGuBwK5lEriWM3ItF6RrmXwmvp9dywXlWq5m13KNXMsF7Vqus2u5Qq7lArmWCa8FA9dyRq4FgnItk89FfNm1XFCu5Wp2LdfItVzQruU6u5Yr7FquRNcyDq5lDFzLGLqWQ3YtV4RrmQiu5Ywq1AXlWq4eqF92LRe0a7nOruUKu5Yr0bWMP4hc3Yp2vWKtmAjXWo2/6OG7q4RMoGLyK8PsVqMAXlUJOVXF0qdG8Sx9L3tUxcqhqpb9qSrkThVrb6oqO1Pl5EsVkyuN+HUi4EiVkB8ZVm40iucphuxEFSsfqlp2oaqQB1WsHaiq7D+Vs/tUHr1npOA8IwHfGQm6TkXsOZULxxkl8JtKqLIqVl5TtWbNsc9UrF2mquwxlbPDVB79ZaQPKeu2qU2fiR69cJUx19FWDFHhGidjcc7OUhWwFkPkLcaluVT1LH8324tx5S8mZoMxiRzGuLYYk9ljTCCTMU4uU/nrjMBnDJHROFdOU9XzHFH2GuPKbEzMbmMS2Y1x7Tcms+GYwI5jQrScisFzKgLTqQhdxxjbjgnCd6oGxmOIas+4sh4T25XJ5mNcu4/JbD8msP+YEA2o4oeckNvcqheoEYjsQt8N9FXcip8tqDoGIBHSwvUeYiALoiAVRvEpLISmkFq+jnbV9cS3LJ0che4CxwRzWrsLiKYcFBsIMBsIsHEge/LDGPdT34pu+gPGHZDw1h8o7kCjo/4Q4g7Mugts7C6QaJs/jCXvW9OwtSv0575VRwcIuux0/3tsdXJ3ZPzJNUOj/2L4DFEMjVMgjatomphDahLF1TgH1wSOsAkxzIYp1pVfZDTNCEJviOJvPE9ClWgmKk7TUV4IjNNREU9H5TwdlcvpqKKYjirxdFSepqMKaTqqQNNRMU/HyC8ymmaE01ERT0flYjpGiadjxDQdfx1n4oVv1V0BqvEHFEIPHDoEtAYckMUamIUZ2BhhIDW4jnbjPPatOgJAdQSAwgiAwwiA1hEAshEAsxEAG0cApI7AUZ2tJ48N2UyN7Kdxqo59Kw70J5wqQGKgP9FUAY0D/SlMFTAa6E8wVUDiQH+CgTqxcTraxK08zE1jTBs5pk0eEx+SgSJGuxGj3YTR/jzZn/Kc+FY8LipIHAQVng6CCo0HQQXJA8mi0OFRYfV8BlA8Ftqhctzy1LbsWMhRPYFBFA6PnOPhEVB7TTRgO2py5MdGzvzYyNhyNwLfskg7ipF2jpF2apF2xJF2xSPtzCLtyCJtaBPivsn5oc47fp6oU46fJ+ls42eR1aCI/ODTi58nfGaxI70tUGUrLtEFpYU2vIsf6oIECgGpKhrUJAeGGlCMSNXhokYcOZKpyEileosqJD8JVIWkUkGyKmqTmuQy5Qa5YqkFFS+pXMckc0lHGaqbBCp0UlXNU5Nc/tSAnIBUbQrUiP2BZLIKUsk1orppJRJ7CalfLyThMNTgYCE1fIcaHS6k5EYkR2OKIngUCWRXpCbn+mWC1/DKVrx8t0fiyt1O2B3ej5eddptTO0bdbZULWce+aSUODOvScfwFzUE6jZLgfo3nl0m6vPPLRF3Z+SW/o+qIgnDwHVVTMRz4BueLiDAw+Q1OFkSIqtaKU9BbYp8DwWFrv/X4S8wriCAJFEdWVTRjG4xpVCCyUcD4ksJRJlnEOrZoRVy0Otykb4WS56BdwGOD0V5xDgxR9J2ruFcVI14ZxLoijLIxjq8JIrJVa8U06C2xz4HgCBpPsRuO08oJ5lPfirccCop3gwoSNyAKT/ceCo23HQqiWwqF0d2EwsKNhELqeunorZn5Gc45ojDdLlyE75mGrXdhy6/QnE3SxZmzibous6P13Nd3aee+I6oWA9NgiObCOE2IcTUrJuapMYnmxzhPkgk8UybE6TJMc4brDoWBZ6+x7pB6kb97mtG7jGBa00LEPE9wlWiWK+apDi9TwXxHTpMeRZr5KKrpjy1yDkSdEiGKnA1R5ZSIasyLqFFypPc6VfQ4TQ6916maXDT2N23wdw0O+aNfb5RizqSgUzoFjXMKXkSBjEJK+YQSZRNKKpdQz5mEKuURSpxFqHEOoRYzCBXKH3qHLceJc6f9DltucCH3M5X0naSQMerVLiHlbAGVcgUUzpT6pgCkiSHKEeOUIMZVdpiYU8MkygvjnBQmcEaYENPBMOUCvuxDYeAsaLzsQ+pF/u5pRu8ygmlP78YwzxNeJZrtinmq47k5zjgrNPEs0/yzrNKA2+Rs4BaUFCxzbrDOKcJ6zBRWKWFIftuMKadPklUWUaOL5n6nTeVdU4EMY4USjeWcb9SC0o5Uzj57uh/yzhllnAuUay6oLHM155drlFkucE65wtnkSswj55RB4UUejghnTetFHpYvxPdPBXsnGORFft8lCTkXTKMsMM7zX083YfoN0ewbp8k3rubexDz1JtHMG+eJN4Hn3YQ47YZp1vEaBIWB57xxDYLUi/zd04zeZQTTnS5KMM+TXSWa64p5qutTYzDVhmiqjdNUG1dTbWKeapNoqo3zVJvAU21CnGrDNNX44CeFgae68eAnqRf5u6cZvcsIpjo9J8k8T3WVaKorpqn+bZzl8cmE33CGkdXZRUZP1rkQHq1z7M/WOYNH6BzCM3QO7SE6R3UGgflzMmUrXjErKD7RWJC4q1J4uq5WaLx/UhDdDymMboIUFu58FBLvKv4G8zZeTdyh2KDLg7L7iIj0oDo5qHCbEHAeayfG2omxLkOK2f0+QOKRr8LTrZxC44NeBcmHw4tCT38VFh8JLyg+2/UbVscY/dcTfMS0bMVHTAsSj5gWnh4xLTQ+YlqQfMS0KPSIaWH0iGlh4RHT155GPow6tD15M9nfzYet+GxOQeLZnMLTszmFxmdzCpLP5hSFns0prE4RoPjY0ZvRn2GrZj6i4MounMetPN7zxnjP5XjP83h5IkER4z2nZ5HewEQ68WXkzQQfMnwzrhSuXcal+Q2tDyOtVzFh9g1RSIyruJiYg2MSRci4DpPJHCsTKEGMU5bgdWhGlC+N69CkngvUiJXMIRPbseJsMn44VimvTODkMiFmWL7UbghyDa+rUyvOOnVdfZTqg8SQeoYonMZVOE3M4TSJwmlch9NkDqcJlHrGKfUqfysQpZ5zlXpVPReoESuZeia2Y8WpZ/xwrFLqmcCpZ0JMPXy0nTIEUg8fbadWnHrq0fYqpefYjqXAoT3wHJtuIsKsn2PTaiPkjefYtMypqp9jk+rbpsDJe+h5B9nmvCkcjLlO6tjkazFPCR7V/5+Y52SPckr5KFPipwdBZJZiEaTnQOQnUkE0nwLZNximu5z9vfSt+g2A6hkToDApwGEPQGv4AVk4gVkMgY2BA1Lz15G/oPoWSxiQONV4S8UKNJ5qvBVlCQqdarzFAgQUTzV2aHeO98K34rsaBcV3NQoS72oUnt7VKDS+q1EQvatRGL2rUVh4V6OQ+K7GDl0tFzTyeu7qbXafeOZbdZSAqrEgwlECh1EihVNXwHXwgGzwwGzwzj72nz925Zzr2NgyjGqZZ2vZmJqlnJplnho+nQVFTJqdzgLKM2Sns45WcSsPZBW93IV1dzvPU74JpbjJ9rFpeMVGesUmewU/kgqKcJGNcJFNcpFtmPA+buUk7XPm4buILwlRENK7iMxVhNS7iCxRrPK7iCxwbPhdRMbktXj8fkqIXFcfv7OY/TcdvzPXTpyP31kgT07H78TBxQxRrRgnnzauHMHEbAsmkTcYZxswgQ3chOjihsko/LXPhQodmXrFXa4Ftnfj5PHOhdGb2K45Zfmmke8bZ/M3gVeAKqRloArLHAxeEIwfygGxNJjUyIHGImFyK0V4uTDeSAVeOCpfCdQYul5HqioWkyrBimKo4ahybTGx7Zy8yhjXS43JLWNNi44J2li3Odt6gRrlpFajcKCPa1IUOI5R5fUpqjLWsYmIeGzAcY9qCm+UU5CjTKGOIq9k6XLAqRR4VTtwOUA3ESucvhyg1cZq17gcoGVe+fTlAKmi7UeBiz6qvCJGVXpibCKcMTZgf4xqssEop/UyyrRqRpENM6jsaCTGdTS+SNeq5bSmRpVXVlLV+hqbfM1L5FobW/CKG9W07kY5rb5BzmtwfMmuFc60Hkf16xmo1ubY4GAGttbp2OhwmqY1O6oHEzGt30FdNYWDYWus6KGNWtdDA1zdo3BwbdIrfWzytdUnrfpRbaz9sdHhJSofB0T50BK1bdVA3xQOWkM+Sjif4BM953g8ACg+x3OeVn7g6XriOa7xgOiZnfOwmgMLT+qc47rtqNroiRH6IZR6PRnH2nj1xjmN+tCrNy7m8TdevXHOkWi9euNCjEnj1RvjFJ30ysrIG6+sEKdgHXplhUQVtq+8skI6BfDgKyukcigPvLJCGgVVvr2hIsjhlW9vBEqhbb+9ESQV1oNvbwSVQnrg7Y2gcTibb28EhUIpXm3IseIw5lcbHFEAG682OFeha7/a4BIFrfVqgwscLv1qg2MKFL8SQKHgEDVfCUgKBezwKwFJVuH76isBqQUF8yuvBCSdQ3vwlYCkUqAbz8LruHLYxbPwwCjUrWfhQVDhPfAsPGgU0uaz8KBwGBvPwgOn0KVHxzkqHC77iW0IlzMKlwsULhdUuFzN4XKNwuUCh8sVDpcrMVzOKVwmULiMc7jGXw6GYFVCoaqYAlWxClPVcpCqQiGqmANUOYen8hicSik0I6bAjJTCcjGG5IVvxdOVCwwFIHG2d0EhABrP6y7C0IHRNYQLGDKQeJK2Q/6zzGUrzlxB8SzLhbO4FVOhIDHfhae5LjTOc0Hy94KLQrNfWD0/BRSnd4d20/rMt+IpS0E1BIDEdYvC0ylNofH6Q0F00aEwutJQ2DhjQOoIHMXT2YtJekR7h+Kguzw5dqUGkZ6vTs5XuBADOE9jJyarozLdMbu44tm5u6Dy0rfiKXlB4jy88HTyXWg84y5InmYXhc6tC6s5Biheyr2Y5Ke2dyxfiNjRTZjZTc7GTSP1NjL1Njn1+DICKCIpNyIpNyEpp6PrwVbs9RRdD5AYyJRcD2gcyDS4HjDq7hRcD0isoekEH7iboncBEo95Tcm7gMYHuqbCu0ChR7em6F2A4oNx09G7Tn0r3gyYoncBEjcFpuRdQOPl/2nwLmD0q7VT8C4g8Vr+FLzrCRC8Cj0drWv/I2VTtC5A9nYJoPwLbVOyLqT4donj+BNt02BdwPztEmNmXT7UZUi4ZS6SZaMilrIilrki2LpAEbVi1gUoFwZdqJ2Sc/m87Zzr1MZvzgUoJp5zTDynlniO+GaTK56SzjwlndWUNNKHeupz3fepvi9Hwxt/qekSHQ+ZvZEGLL6IAwK+iQPYXsUB5m/cAPRXbgDWd24A2RtpznbW99y34ot8l8n6gKd3+y7R+gDRxIFigwFW8xJQ7bajmS2wl2h9gOLN4stkfcDTscElWh8gOgK4DNYHLFxHv0Trc1RL6CmQW/xl5svR+174VjyfuETvQ5TPJy7J+5CC9wGOpxmXwfuA0WnG5Wh0MARzOmTq1cxL8jrE9GrmpXA7lPitzUv0O2T0hublJP8Y9iVZns/XJjbaiIFuWgPd6IFuxEDZ91BSA3XnQxhfT7206/RgBukmRBLY0/RtiKQKd0s3IpKQfC7fikgKOV66GcECeF96x4y5ckH1jhlL5Ietd8xYZmdM75gxJ4+sHIzSELmlcbJM48o3TczmaRI5qHG2URPYS02IhmqYXNVvMoVS5XtPXANgc4bIaY2T3ToXnmtiNl6XsvuaRhZsnH3YBDbjKizFoJMtmyAty1ThW6axeZnQcDDTk42ZwqZtAjt3upPIgvDwKm1E8+TmJhyMj/J101rxaTm86c34ZK83hQyfbvlVJ1T3/JTGzt+866caCP9X9/2UllYBeedPibQWqHt/QoMVASktCiipdQH1vDSgSqsDSnqBwBa8RqBGywRKtFKABIsFUlovUKIlAyW1aqCeFw5Uae1AiZcP1HgFQS0uIqjQOhJuBgfHELeJRYGBaSOlNQUlWlaCJFYW1PPiEtS8vqBMSwxKvMqgxgsNaEsdkrTcoCYdFRsIU0WZfRW1hrVik+SuKPIChBqvQepRAaGJlQjUjf5QWo9Q+1oA1aqE8oEAttYmbHIogHmFQjEuUkM5TfxXQsqW/66PoXj/yYXd3yTc/5WH3dY2bPl1nrIVr/MUlK7zVNfDHhmibhmXfasqdLCibUZ97gH313ju9Ngx7LQh6rRx2emqQqcr2mbU5x5wp43nTodnlaDnkVP3oyjHEJrAQALfNnjf6B+PK4p5cJDuMDSkNDCU5LCgAQwK6FbSXvaJh4NSHkx9zAdGYoiGYVyOoaowgIq2GfW5B9xv47nT9tgH9NoZddsF2W+ToePGtoL1oh/cdxdy5+0hDOi8M+q8C7Lz4c/Tjx0Nf56eWS/6wZ2Xf55+1MYHJaDrlVDHK5bdhr96PXYQ/up1JH3aN3dX/NXrUam/QAe9NUTdNS77i38kd+we/pFcQn3uAfdZ/ZHcvfR+oAvbc9ny4wRDqpdF8IObijbhq+nv4b1PxxrAZd/o7+G9FwcUoNCN0Pfh8AFY+LWK92OkfauPW3kMOY5XA/VA7LY+Be2T+gGRqzH4sBX3dZWDD0K8xXs1dtx70MeZvKKOj7QeC3zMCIZgSPamqguBaETGD38RjQ2PbaiTPEp1bDNK9uJrRjBUQ7KHVV0IREM1fviLaKj4viR1koeq3pes0nBat1jMaLAGcbgOdT9NX0jIg3bla1/HAzelV11Og3clD39/cjRZf55d7T5yOtJywp3/bM1xlhta/MLh9GxybTstW1f7v10LyE38Ovj3dR2ob9kIHeHQ9nTcA+7YEO298of86W1GvUDUI+OpW7uKG4O03zleSj028hA+sA1bX8JWH7diR1J97yldpx87whd2jyN+yJ/fZvQlo14g6qb0or1EPz4w9pVfTz+O+CF/fpvRl4x6gaiv0kxGSbwmUjus3hI5FtpD4+u2Df6lwfsW5+G0zqpGPV+IG0ckrsEcJ+VBftFW0i+S9prSKBonU1X1a3M8CFB4FCA96O/aavxF476BeSio5bHQayHjOPitkOOIH/Lntxl9yagXiPqrzgdHiV8PGDub3g44Jv4gvmIr2BfBesWoy/I0cNT4Gf2xz+kR/WPiD+IrtoJ9EaxXjPosz/722ocJXiSvpItb8aigoHotHFH+AePC05HDnuKflHUcf9e4IPr14sLo14t3bGlHOWUrHjIVJE6KCk8nGoXGk6KC5ElRUeikqLB46FVQfDr0wyRcgq6IDp1OohDozX6unvjGOGwg40whgTgA9jAg9GkCOsYGSA0AoDpHjvykXVxeaF5aqO1gpEbicA3HMTvOAzctjd6VFAKTYhwMUzCMU0TyZeCbxmXgm4OXgSOEMOkfgdBiDNmBn4DQLVL42j8AoRvEUDZ+/kGrFNao3rTCxCEmVQW6/knNY9+KNsN/SHNPP43utHfcT+hOgKJ9Ok+W/QndCRDfA3LFHdSZXVVyZHfK9ij/SoYWaCyHfiVDN8kjbPxKhlb1uFu/kqFlikbjVzL26iKszouwBi/y6ruQ6+4inwct8knPonHSs2if9MQrAvj1+QchtEC7av8gxNig/v2XbUa9QPT16u/P7qXbCV7pLFux2goSi3rhqQoLjYt6QXJRLwot6oXRlc7CwpXO2wn+2d1bHDEg6N2e3k3qTWXbikddd2mwwNMh1t0k3DA2JP9GxN0k3h42RkdZdxO8GVzJ7uD11LbcHsU9FH335C4+4RURBaH1fFcUczjE012R68CoZ7uiwCHKT3YFDMHKt5LvUrUzz7HD37t7Qohip3/vjsUcu/R7d8x17PLv3bHAsePfuyMMscNLLhQIjp265FKl9JtCT6TAcTzwm0K6iYip/k0hrTbi2/hNIS2nWMvfFJIixj0tITKUaQ6aS8jYoN47gzkwRNE3ruJuYo64SRRr4zrKJnN8TeDImhBjivcbTyPqcyA4gu2bi8sJ3llbhnV4t+V/uGkZdrXMe1nqHaB3EYJd4UXck9iqzx/kPbcdbpmucCoOHUlXOE9E+77xPdyvrzw3Aoeu2DV5uRIpdEs++xEodengsx9LvGpHCLqCV+1OYqs+f5B70H6Kg47FsRekQGdIgT6R0je/jXvIcu5ouF7IDDoXrheeULtefJa7cuCxkXrWgX3IB9OGoAd4fE0f5P2r4+tRQksiBLuvCHafjWvZMK5l27g+T/D84DN+FlA6K6gXzFp3GKPeEuM9RvoqU1+4uug+3Ncv3f//m9NnptYPXscPGa73DIXmN3wjjnGMmrrpG1vEa49BC3ERY1jFsBiuHVJavRostdBZ0WI3t88ErjtUWvzFUtLqTWuthu6oFnnyq+SFMgRp96wHbsUJK6j2EpF1DuB4/f2ZkeugW/o4urF6KFt2KcsRXb8ywV569y9bxq08EHXlvPBU1IXGk+yC5El2Uegku7CYvQXFK+c7ZFfOPWx/hAbrMO51NJcVZhEimx+EjVje11s5ZSO0cv5QL0yu9oYHG+GC7Cra3QjtdrsPzRBNlHFKO+ece3Qvv0ay4uvcklPRnqn2uBiipDQuo2lPSFF6Vr4UqDF+ma0m5pQ1ifLWuE5ekzmDTaA0Nk65zM9O8DT8kZuuc+A4v41TkjvnTHfl0AR5bhtRiQ8nDZTJfSaxDsS5wKjY8xweEUOUDMapGJxzMfBfqngW8XVuycVQORSDISoG4zLW6Y9H0A6WAjXGL4tB/e0IlqgYWn87gmUuhvS3I5hTMaS/HUHT8Eduus6B42IwTsXgnIvBlUMT5PluRBUDXMGiTO4zicUgLl9VJVxUwZKIAidGVLk8SE1FEnUqlSBetz6Vyibfr3uqBC6hg/frVJtUTukGlxYORlAXWPMGl27AxXbwBpdulApP3+DSKhdhUFMpBvWP1sfWrWlIxRlVLlFSU6GS/vU0gLqMXJYuXwqV1de3OBVz6zroXo/Xi2qYEOUHEj0gATbuAcJLjXQKPG6Vv905vuhnyJ/1IU63yIN6YadQlUwT2f0JyvHM3JAlB3G8EBClevY+npa/yOKo7PN3mMOJO1rZigVeUDUbQKLQC0/VXWgs6YKoRAuj+4mFhfuJhcT6fADrfWFk518nvhVvOj4kpwKebkY+oCcBIiMCxX9xzVm1HEB1HI7op8u2MLRTI27N2+zH24YJb6XzbrPdbpseuxXGus1uus0WusWh7Qeyu4Ls9x3KVry1UVB8rm6P8o2OwtM9jj1Nz9UVHO96FER3NAqjmxn9WCsnvhXzqsdaASRSradaARpTrQ+1Asx/ws/ZWCtAYo71qVb6MA99noc+z0PfmIdezkOv56HP89CLeegb81CK4KltWRE4ikXgHIvAqRWBIy4CV7wInFkROLIiMET1XRdEzCpDlFrGKb+MqyQzMWeaSZRuxjnnTODEMyFmn2FKQb7MQqGAdDBEGWmc0tK5yE0Tc4K6lLPUNEpV45yvJnDShms3TyOi9G1cuyExJ3K+dkNcp7S4dkMCJXe+dhM5pzncpINMR0rJjhLlO0oq5VHPWY8qJT5KnPuocfqjFisAFSqC/C6IiBWkG1KqBpSoIIIkagL1XBZBzZWBMhUHSlwfqHGJgAZVgpQKBSVVK6jnckGVKgYlXTTYgusGNSodlKh6xGtAY1L8OYHnmP+EHAASnlj+k2ccMJ9n/UnzCzQ8hfwnziag+Lzxn+DjTGKn2cUTzt0XHp6UNBB2cMY0pOTfI68nm10mcVyG47gc53GZlsblShqXSXFchmlcxmlc+JJUp2kcX5DiGKOUxxn0NNaopvEGOY45SDTuoMHY//O//w/7Vd1G"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Helvetica-BoldOblique.compressed.json -var Helvetica_BoldOblique_compressed_default = "eJyNnVtzG0eyrf8KA0/7RMhzRIq6+U2+zMX2mJYsEuJMzANEtihsgYQMEITaO/Z/P41CV+bKlaug86JQf6uArsrKXNVX8H8m3y9vb7u7+8m3k4t/btazm+7o+PT0xcnRsxdPXzybPJr8dXl3/+vsthsa/L1bPHT386vZN98tF9dn7xfzPzbdrslmseAmR7smR9Bmdjtf9NxqEKbd/Objbve7Dwzb/7ifLeZXr+5uFkPLb45PBrL+6/xLd/3b/P7q4+Tb+9WmezT5/uNsNbu671a/d7vP/vjlvru77q7fLG9nd2Onv/tu+WXy7b+/OX5++uibk5MXj46Pj08fvXx28p9Hk/Oh8Woxv+t+W67n9/Pl3W5Xjx+D8Pbj/OrTXbdeT759OvCLbrUuzSaPH5/85fHjx8NOfl0OQ9gN5/vl5361G8XRf139n6Pjly+ePtr9+7z8+3L378vH5d/nR6+ul++7o9/79X13uz76x93VcvV5uZrdd9d/OTp6tVgcvdl9z/roTbfuVg8D9YDO10ezo/vV7Lq7na0+HS0/HP0yv1ve95+7b4ZGi6NXfzua3V3/3+XqaD58wXrzfj2/ns9W8279l6GzPw67up7f3fx+9bErc1B68vv98JHZ6rqqQ8PvZ5//Pk7J8+MXjybv6tbTJ8NcvFpf7QK9GsUfOtv+5uTx80eT3++v/z6dfHu8E4f/X+z+f/p4P1//7O5X86shoP/+n8n03eTbk+dDo1+Hrqw/z4Y4/u+jPX7y5Mked1+uFrNb46fDPBb+x2Y5xOv9wpSnT5/tlbvN7fvdRN3cZe16uVjMVsZfDBNT+OdudbXL/yo8PznZC7PbQVoP8THJOlx6UGY89/rzbNXdLboPLYk+VrsxW+++cf3JO/5iHO7nxWadu3A1lO0s7+Jj//ljd5ebD0OZL8VI1ovZ+mMO1p/dapnp8q7L8H4rWt5/XHWi7YflZiXo/EG0Xc+/CNg9dGJuuxBTT4f5nUirq+VieZfxurudR8lmYLGzgUS7PzazRcY3q24oZx/ms+PjmjTdulhNVV4+fzrOvci+Vxl9l9H3Gf3ge372fI9+zJ35q3+wpsLf8nf9PSfMP3KYf8of/Dnv8RcvvRryf+YP/pr7dZYH9Ftu9Tp/15v8wd9zv97mD57nD174rJ2OEz3Nrd5ldJn3+K+cfO+HxexTdx9sw0L+ftBinfLnoqdYKs7WV/P51Xx1tbnNs7bZ2fZ6WH+6vMfib6Ez9rFZHs/73Ooqt7rOrURxfsgfvMnoY+7yPKP/znv8lFt5CduScJv3eJfRMqPPouqz1QsLXOdI3Ofv2uQPPuRK2OZWwkl7R7vjnmL6uau7/IqJcPLicc3KVaP9oWy8ny+um0v99XIrzD2szh6x+3Kc5slxXCvuw+7AEH3Wx6zWjg+L5Wou+LprfMvVZjUs41cewJMnWDbreTl0TdGtRy26rG4280G5Xd7rI4edXL74K3IMvSXOh7lg4vhpOJSThwPXs5ubTqTtnuOhGB1w7OauW3Wi9odjodnNavYZTO1pzazhdKITPujhfT9bH4jwYXWljxVsAqI+nBSMnx8Oseef1/O1kIax3n9cbsKxYlr2Q3L7zK1mD6IeZlebe3XoUrz8w6L7krVGZd3OrlbqcOf9qlM7vl7ez65Cxbk0H2YSA2DKCuvQO9tdDyFVx6ibu5vZanO7mG3EbpY3w2HmJ/F1MxwHzMttyFkXXvlhz5PnI1uurj8Mx3nhwNCPUOIi6wcgkfsezmAPz57aHm4Hp9sscBe2sszEYnu9K/r1Wixgi7hjX3kityOSpRjUUJ/DKfGQ9+Ic4h9pSt0JYgb68h/zxpcmOan+dXH2/Ogo96AuF9fzhzkktH8k9swPmEVxeLcbHzo/9KG+EYN1OfeiMoGh5q/0/YVScdyeiBnVg38m9s5ngj7gZwFpJ37OMHgEnIScVCdWA33+5HkVx6seYlfkOr52xjzwUeq4/Ko64OXRytFoqn6kL4djp1Ktb4vGCuFMVgkZooe5Zk/0w9e499OX9dRz+Wd3dyMy903chZ/FqUF6chwskkOZ+4oXEjuabYz1isfq5z85chbVtx+XKzGqM9q7h4GqwE70qOBP6yJGYbNqoh14xPTiVi5wrDflKGcl+htT0KPY4tFWzQRvN4v7+edFL/rVKP+3cYCWSMPx1v18trief/iQ56pvW8OvcT+esCJZvDYOptmBVactXTXGe9eywVbG/BoD5Ish1T9efhuOGPAanJ0CrZafujs8ETJzXHU383U89PUSjZMNy3Gui3qosd4MVR3ORzzYdAxphdmIzLKV6v9qfOBfVOGnL+uxa7nSFa+DWZx/vP+Y4fdNA1wo37Kx3DdMpmuuji3hVevw4UBWxgD7+XKrNHjf5gqtGWktPa1ldN3ac65j2/fBwxJeMetxQbe4FwZ+H0zaPXG7POCIqWv2dbcbMZLGGr6Ux5leC3zwY1ef4hHOiyen4ONDAq+GRF7n7/ud8/W0Tv6isZD8fHD9/SVOnJ9K2H0dZYrJFtwyYpict2r8l9hti8MQtY+zBSwNtch3pyaxwn0u1BJgvhwPmzzVvjKBjVLoWgO6iWaKAxqnVc2qPhv5XR4gWgbLnltCXA820amMbSz531MnbOEitzk1O7+eXymj/SF+ERyYHTrc/ZUOa627jXl7czivD+7rVeM7XzVNOp4O2AzE73EjPnBA+WNruad9+yVieXZnB2TxSMC+7WAp0ASZXx7c02J5s5vvu6UI97Jtppu8jtUMGr6qUck3Bye3g5XcY95I3zu5jtvFnbt80Oye31ruftzs7kb+59Hk525199tsvtrdQ/735NXubvXk0Tenj//zaNzau0dA+35GNJo6wr8NW099a+8qAeHAUDgL33OWu4BLb+A2VYHu6z+g4DxBGUMW2P7qUED7wkH0Omy9HbZe+laNGaIwehfOQyzO6+gBhdEDh9EDraMHRKMHxUYPbKzrwIqdILkYtl7Y1nTYemZbl8PW8bFv1iEhg74D3gybT3yrfhBQiAVw+D6gNRaAKBagWCyAWSyAjbFw8hAyYRu0Pm7lEfW552MjLE1DVBzGqUidc6VWBcrVENWscVm4VT3L380lbFzVsYm5mE2iijauy9pkrm0TqMCNU5VX/jojqHdDVPTOVeVX9TxHlD3AuDICE7MbmESWYFz7gslsDiawQ5gQbaJi8IqKwDAqQtcwxtZhgvCPqoGJGKK6M67sxMR2ZbKxGNfuYjJbjAnsMyZEs6n4ISfkNrfqBWoEQrjQaAboQoaovo2TCzlnF6oKuJAhciHj0oWqepa/m13IuHIhE7MLmUQuZFy7kMnsQiaQCxknF6r8dUbgQobIhZwrF6rqeY4ou5Bx5UImZhcyiVzIuHYhk9mFTGAXMiG6UMXgQhWBC1WELmSMXcgE4UJVAxcyRMVnXLmQie3KZBcyrl3IZHYhE9iFTIguVPFDTshtbtUL1AiEcCEMDVpR5FTpUSRTIpGdKchgT5GTR0VRGlVoctbYH1tWFJVvxRbZvKJODhZFbWOxDXtZVMnQokiuFsTXDQ7+FjmZHInK6UKT88a8sOdFURlfbJHdL+pkgVHUPhjbsBlGlR0xqtEWgwbeGDgYZODoklFgq4yq8MvQAEwzcjKMKCr7jC2+4itspFHUbhrbsKVGlX01qtFcg/bQqItto33f4ofiJ1zXCXouUjIqlMhvg8RuCyJ4LVJyWpSkz0KDM7kf9liUlMOinv0VVXJXlLS3Ygt2VtTIV1EiVwXptaTgqEjJT4Ok3BQanMvYs5OipHwU9eyiqJKHoqQdFFuwf6LG7ola9E5QwDmBgm8CRddEzJ6JmnBMkMEvkVK1o6S8EvWDXsA+iZJ2SWzBHokaOyRq0R9BeZAZvpVte03bkRKuOI4eLdEQmYpxMkPn7IRVARs0RB5oXBpgVc/yd7P1GVe+Z2I2PZPI8YxruzOZvc4EMjrj5HKVv84I/M0QmZtz5WxVPc8RZU8zrgzNxOxmJpGVGdc+ZjKbmAnsYCZE+6oYvKsiMK6K0LWMsWWZIPyqamBWhqj+jCubMrFdmWxQxrU7mczWZAL7kgnRlCp+yAm5za16gRqBEC5U+4o25Iwq3AUyIhDYiUwCK3JGXuSCNCOTz8T3sx25oPzI1WxIrpEjuaAtyXX2JFfIlFwgVzLhtWDgS87ImEBQzmTyuYgve5MLypxcze7kGtmTC9qfXGeDcoUdypVoUcbBo4yBSRlDl3LINuWK8CkTwaicUYG6oKzK1QP1y2blgnYr19muXGG/ciUalvEHkatb0a5XrBUT4Vq1Y+hazsgIXCDXAoFdyyRwLWfkWi5I1zL5THw/u5YLyrVcza7lGrmWC9q1XGfXcoVcywVyLRNeCwau5YxcCwTlWiafi/iya7mgXMvV7FqukWu5oF3LdXYtV9i1XImuZRxcyxi4ljF0LYfsWq4I1zIRXMsZVagLyrVcPVC/7FouaNdynV3LFXYtV6JrGX8QuboV7XrFWjERrrUaf9HDd1cJmUDF5FeG2a1GAbyqEnKqiqVPjeJZ+l72qIqVQ1Ut+1NVyJ0q1t5UVXamysmXKiZXGvHrRMCRKiE/MqzcaBTPUwzZiSpWPlS17EJVIQ+qWDtQVdl/Kmf3qTx6z0jBeUYCvjMSdJ2K2HMqF44zSuA3lVBlVay8pmrNmmOfqVi7TFXZYypnh6k8+stIH1LWbVObPhM9euEqY66jrRiiwjVOxuKcnaUqYC2GyFuMS3Op6ln+brYX48pfTMwGYxI5jHFtMSazx5hAJmOcXKby1xmBzxgio3GunKaq5zmi7DXGldmYmN3GJLIb49pvTGbDMYEdx4RoORWD51QEplMRuo4xth0ThO9UDYzHENWecWU9JrYrk83HuHYfk9l+TGD/MSEaUMUPOSG3uVUvUCMQ2YW+G+iruBU/W1B1DEAipIXrPcRAFkRBKoziU1gITSG1fB3tquvYtyydHIXuAscEc1q7C4imHBQbCDAbCLBxIHvywxj3U9+KbvoDxh2Q8NYfKO5Ao6P+EOIOzLoLbOwukGibP4wl71vTsLUr9Oe+VUcHCLrsdP97bHVyd2T8yTVDo/9i+AxRDI1TII2raJqYQ2oSxdU4B9cEjrAJMcyGKdaVX2Q0zQhCb4jibzxPQpVoJipO01FeCIzTURFPR+U8HZXL6aiimI4q8XRUnqajCmk6qkDTUTFPx8gvMppmhNNREU9H5WI6RomnY8Q0HX8dZ+KFb9VdAarxBxRCDxw6BLQGHJDFGpiFGdgYYSA1uI524zzxrToCQHUEgMIIgMMIgNYRALIRALMRABtHAKSOwFGdrePHhmymRvbTOFUnvhUH+hNOFSAx0J9oqoDGgf4UpgoYDfQnmCogcaA/wUCd2DgdbeJWHuamMaaNHNMmj4kPyUARo92I0W7CaH+e7E95nvhWPC4qSBwEFZ4OggqNB0EFyQPJotDhUWH1fAZQPBbaoXLc8tS27FjIUT2BQRQOj5zj4RFQe000YDtqcuTHRs782MjYcjcC37JIO4qRdo6RdmqRdsSRdsUj7cwi7cgibWgT4r7J+aHOO36eqFOOnyfpbONnkdWgiPzg04ufJ3xmsSO9LVBlKy7RBaWFNryLH+qCBAoBqSoa1CQHhhpQjEjV4aJGHDmSqchIpXqLKiQ/CVSFpFJBsipqk5rkMuUGuWKpBRUvqVzHJHNJRxmqmwQqdFJVzVOTXP7UgJyAVG0K1Ij9gWSyClLJNaK6aSUSewmpXy8k4TDU4GAhNXyHGh0upORGJEdjiiJ4FAlkV6Qm5/plgtfwyla8fLdH4srdTtgd3o+XnXabUztG3W2VC1knvmklDgzr0nH8Bc1BOo2S4H6N55dJurzzy0Rd2fklv6PqiIJw8B1VUzEc+Abni4gwMPkNThZEiKrWilPQW2KfA8Fha7/1+EvMK4ggCRRHVlU0YxuMaVQgslHA+JLCUSZZxDq2aEVctDrcpG+FkuegXcBjg9FecQ4MUfSdq7hXFSNeGcS6IoyyMY6vCSKyVWvFNOgtsc+B4AgaT7EbjtPKCeZT34q3HAqKd4MKEjcgCk/3HgqNtx0KolsKhdHdhMLCjYRC6nrp6K2Z+RnOOaIw3S5chO+Zhq13Ycuv0JxN0sWZs4m6LrOj9dzXd2nnviOqFgPTYIjmwjhNiHE1KybmqTGJ5sc4T5IJPFMmxOkyTHOG6w6FgWevse6QepG/e5rRu4xgWtNCxDxPcJVolivmqQ4vU8F8R06THkWa+Siq6Y8tcg5EnRIhipwNUeWUiGrMi6hRcqT3OlX0OE0Ovdepmlw09jdt8HcNDvmjX2+UYs6koFM6BY1zCl5EgYxCSvmEEmUTSiqXUM+ZhCrlEUqcRahxDqEWMwgVyh96hy3HiXOn/Q5bbnAh9zOV9J2kkDHq1S4h5WwBlXIFFM6U+qYApIkhyhHjlCDGVXaYmFPDJMoL45wUJnBGmBDTwTDlAr7sQ2HgLGi87EPqRf7uaUbvMoJpT+/GMM8TXiWa7Yp5quO5Oc44KzTxLNP8s6zSgNvkbOAWlBQsc26wzinCeswUVilhSH7bjCmnT5JVFlGji+Z+p03lXVOBDGOFEo3lnG/UgtKOVM4+e7of8s4ZZZwLlGsuqCxzNeeXa5RZLnBOucLZ5ErMI+eUQeFFHo4IZ03rRR6WL8T3TwV7JxjkRX7fJQk5F0yjLDDO819PN2H6DdHsG6fJN67m3sQ89SbRzBvniTeB592EOO2GadbxGgSFgee8cQ2C1Iv83dOM3mUE050uSjDPk10lmuuKearrU2Mw1YZoqo3TVBtXU21inmqTaKqN81SbwFNtQpxqwzTV+OAnhYGnuvHgJ6kX+bunGb3LCKY6PSfJPE91lWiqK6ap/m2c5fHJhN9whpHV2UVGT9a5EB6tc+zP1jmDR+gcwjN0Du0hOkd1BoH5czJlK14xKyg+0ViQuKtSeLquVmi8f1IQ3Q8pjG6CFBbufBQS7yr+BvM2Xk3codigy4Oy+4iI9KA6OahwmxBwHmsnxtqJsS5Ditn9PkDika/C062cQuODXgXJh8OLQk9/FRYfCS8oPtv1G1bHGP3XE3zEtGzFR0wLEo+YFp4eMS00PmJakHzEtCj0iGlh9IhpYeER09eeRj6MOrQ9eTPZ382HrfhsTkHi2ZzC07M5hcZncwqSz+YUhZ7NKaxOEaD42NGb0Z9hq2Y+ouDKLpzHrTze88Z4z+V4z/N4eSJBEeM9p2eR3sBEOvFl5M0EHzJ8M64Url3GpfkNrQ8jrVcxYfYNUUiMq7iYmINjEkXIuA6TyRwrEyhBjFOW4HVoRpQvjevQpJ4L1IiVzCET27HibDJ+OFYpr0zg5DIhZli+1G4Icg2vq1Mrzjp1XX2U6oPEkHqGKJzGVThNzOE0icJpXIfTZA6nCZR6xin1Kn8rEKWec5V6VT0XqBErmXomtmPFqWf8cKxS6pnAqWdCTD18tJ0yBFIPH22nVpx66tH2KqXn2E6kwKE98BybbiLCrJ9j02oj5I3n2LTMqaqfY5Pq26bAyXvoeQfZ5rwpHIy5TurY5GsxTwke1f+fmOdkj3JK+ShT4qcHQWSWYhGk50DkJ1JBNJ8C2TcYpruc/b30rfoNgOoZE6AwKcBhD0Br+AFZOIFZDIGNgQNS89eRv6D6FksYkDjVeEvFCjSearwVZQkKnWq8xQIEFE81dmh3jvfCt+K7GgXFdzUKEu9qFJ7e1Sg0vqtREL2rURi9q1FYeFejkPiuxg5dLRc08nru6m12n3jmW3WUgKqxIMJRAodRIoVTV8B18IBs8MBs8M4+9p8/duWc68TYMoxqmWdr2ZiapZyaZZ4aPp0FRUyanc4CyjNkp7OOVnErD2QVvdyFdXc7z1O+CaW4yfaxaXjFRnrFJnsFP5IKinCRjXCRTXKRbZjwPm7lJO1z5uG7iC8JURDSu4jMVYTUu4gsUazyu4gscGz4XUTG5LV4/H5KiFxXH7+zmP03Hb8z106cj99ZIE9Ox+/EwcUMUa0YJ582rhzBxGwLJpE3GGcbMIEN3ITo4obJKPy1z4UKHZl6xV2uBbZ34+TxzoXRm9iuOWX5ppHvG2fzN4FXgCqkZaAKyxwMXhCMH8oBsTSY1MiBxiJhcitFeLkw3kgFXjgqXwnUGLpeR6oqFpMqwYpiqOGocm0xse2cvMoY10uNyS1jTYuOCdpYtznbeoEa5aRWo3Cgj2tSFDiOUeX1Kaoy1rGJiHhswHGPagpvlFOQo0yhjiKvZOlywKkUeFU7cDlANxErnL4coNXGate4HKBlXvn05QCpou1HgYs+qrwiRlV6YmwinDE2YH+MarLBKKf1Msq0akaRDTOo7GgkxnU0vkjXquW0pkaVV1ZS1foam3zNS+RaG1vwihvVtO5GOa2+Qc5rcHzJrhXOtB5H9esZqNbm2OBgBrbW6djocJqmNTuqBxMxrd9BXTWFg2FrrOihjVrXQwNc3aNwcG3SK31s8rXVJ636UW2s/bHR4SUqHwdE+dAStW3VQN8UDlpDPko4n+ATPed4PAAoPsdznlZ+4Ol64jmu8YDomZ3zsJoDC0/qnOO67aja6BMj9EMo9XoyjrXx6o1zGvWhV29czONvvHrjnCPRevXGhRiTxqs3xik66ZWVkTdeWSFOwTr0ygqJKmxfeWWFdArgwVdWSOVQHnhlhTQKqnx7Q0WQwyvf3giUQtt+eyNIKqwH394IKoX0wNsbQeNwNt/eCAqFUrzakGPFYcyvNjiiADZebXCuQtd+tcElClrr1QYXOFz61QbHFCh+JYBCwSFqvhKQFArY4VcCkqzC99VXAlILCuZXXglIOof24CsBSaVAN56F13HlsItn4YFRqFvPwoOgwnvgWXjQKKTNZ+FB4TA2noUHTqFLj45zVDhc9hPbEC5nFC4XKFwuqHC5msPlGoXLBQ6XKxwuV2K4nFO4TKBwGedwjb8cDMGqhEJVMQWqYhWmquUgVYVCVDEHqHIOT+UxOJVSaEZMgRkpheViDMkL34qnKxcYCkDibO+CQgA0ntddhKEDo2sIFzBkIPEkbYf8Z5nLVpy5guJZlgtncSumQkFivgtPc11onOeC5O8FF4Vmv7B6fgooTu8O7ab1mW/FU5aCaggAiesWhadTmkLj9YeC6KJDYXSlobBxxoDUETiKp7MXk/SI9g7FQXd5cuxKDSI9X52cr3AhBnCexk5MVkdlumN2ccWzc3dB5aVvxVPygsR5eOHp5LvQeMZdkDzNLgqdWxdWcwxQvJR7MclPbe9YvhCxo5sws5ucjZtG6m1k6m1y6vFlBFBEUm5EUm5CUk5H14Ot2Ospuh4gMZApuR7QOJBpcD1g1N0puB6QWEPTCT5wN0XvAiQe85qSdwGND3RNhXeBQo9uTdG7AMUH46ajd536VrwZMEXvAiRuCkzJu4DGy//T4F3A6Fdrp+BdQOK1/Cl41zEQvAo9Ha1r/yNlU7QuQPZ2CaD8C21Tsi6k+HaJ4/gTbdNgXcD87RJjZl0+1GVIuGUukmWjIpayIpa5Iti6QBG1YtYFKBcGXaidknP5vO2c69TGb84FKCaec0w8p5Z4jvhmkyueks48JZ3VlDTSh3rqc933qb4vR8Mbf6npEh0Pmb2RBiy+iAMCvokD2F7FAeZv3AD0V24A1nduANkbac521vfct+KLfJfJ+oCnd/su0foA0cSBYoMBVvMSUO22o5ktsJdofYDizeLLZH3A07HBJVofIDoCuAzWByxcR79E63NUS+gpkFv8ZebL0fte+FY8n7hE70OUzycuyfuQgvcBjqcZl8H7gNFpxuVodDAEczpk6tXMS/I6xPRq5qVwO5T4rc1L9Dtk9Ibm5ST/GPYlWZ7P1yY22oiBbloD3eiBbsRA2fdQUgN150MYX0+9tOv0YAbpJkQS2NP0bYikCndLNyKSkHwu34pICjleuhnBAnhfeseMuXJB9Y4ZS+SHrXfMWGZnTO+YMSePrByM0hC5pXGyTOPKN03M5mkSOahxtlET2EtNiIZqmFzVbzKFUuV7T1wDYHOGyGmNk906F55rYjZel7L7mkYWbJx92AQ24yosxaCTLZsgLctU4VumsXmZ0HAw05ONmcKmbQI7d7qTyILw8CptRPPk5iYcjI/yddNa8Wk5vOnN+GSvN4UMn275VSdU9/yUxs7fvOunGgj/V/f9lJZWAXnnT4m0Fqh7f0KDFQEpLQooqXUB9bw0oEqrA0p6gcAWvEagRssESrRSgASLBVJaL1CiJQMltWqgnhcOVGntQImXD9R4BUEtLiKo0DoSbgYHxxC3iUWBgWkjpTUFJVpWgiRWFtTz4hLUvL6gTEsMSrzKoMYLDWhLHZK03KAmHRUbCFNFmX0VtYa1YpPkrijyAoQar0HqUQGhiZUI1I3+UFqPUPtaANWqhPKBALbWJmxyKIB5hUIxLlJDOU38V0LKlv+uj6F4/8mF3d8k3P+Vh93WNmz5dZ6yFa/zFJSu81TXwx4Zom4Zl32rKnSwom1Gfe4B99d47vTYMey0Ieq0cdnpqkKnK9pm1OcecKeN506HZ5Wg55FT96MoxxCawEAC3zZ43+gfjyuKeXCQ7jA0pDQwlOSwoAEMCuhW0l72iYeDUh5MfcwHRmKIhmFcjqGqMICKthn1uQfcb+O50/bYB/TaGXXbBdlvk6HjxraC9aIf3HcXcuftIQzovDPqvAuy8+HP048dDX+enlkv+sGdl3+eftTGByWg65VQxyuW3Ya/ej12EP7qdSR92jd3V/zV61Gpv0AHvTVE3TUu+4t/JHfsHv6RXEJ97gH3Wf2R3L30fqAL23PZ8uMEQ6qXRfCDm4o24avp7+G9T8cawGXf6O/hvRcHFKDQjdD34fABWPi1ivdjpH2rj1t5DDmOVwP1QOy2PgXtk/oBkasx+LAV93WVgw9CvMV7NXbce9DHmbyijo+0Hgt8zAiGYEj2pqoLgWhExg9/EY0Nj22okzxKdWwzSvbia0YwVEOyh1VdCERDNX74i2io+L4kdZKHqt6XrNJwWrdYzGiwBnG4DnU/TV9IyIN25WtfxwM3pVddToN3JQ9/f3I0WX+eXe0+cjrScsKd/2zNSZYbWvzC4fRscm07LVtX+79dC8hN/Dr493UdqG/ZCB3h0PZ03APu2BDtvfKH/OltRr1A1CPjqVu7ihuDtN85Xko9MfIQPrANW1/CVh+3YkdSfe8pXacfO8IXdk8ifsif32b0JaNeIOqm9KK9RD8+MPaVX08/ifghf36b0ZeMeoGor9JMRkm8JlI7rN4SORHaQ+Prtg3+pcH7FufhtM6qRj1fiBtHJK7BnCTlQX7RVtIvkvaa0igaJ1NV9WtzPAhQeBQgPejv2mr8ReO+gXkoqOWx0Gsh4zj4rZCTiB/y57cZfcmoF4j6q84HR4lfDxg7m94OOCH+IL5iK9gXwXrFqMvyNHDU+Bn9sc/pEf0T4g/iK7aCfRGsV4z6LM/+9tqHCV4kr6SLW/GooKB6LRxR/gHjwtORw57in5R1HH/XuCD69eLC6NeLd2xpRzllKx4yFSROigpPJxqFxpOiguRJUVHopKiweOhVUHw69MMkXIKuiA6dnkQh0Jv9XB37xjhsIONMIYE4APYwIPRpAjrGBkgNAKA6R478pF1cXmheWqjtYKRG4nANxzE7zgM3LY3elRQCk2IcDFMwjFNE8mXgm8Zl4JuDl4EjhDDpH4HQYgzZgZ+A0C1S+No/AKEbxFA2fv5BqxTWqN60wsQhJlUFuv5JzRPfijbDf0hzTz+N7rR33E/oToCifTpPlv0J3QkQ3wNyxR3UmV1VcmR3yvYo/0qGFmgsh34lQzfJI2z8SoZW9bhbv5KhZYpG41cy9uoirM6LsAYv8uq7kOvuIp8HLfJJz6Jx0rNon/TEKwL49fkHIbRAu2r/IMTYoP79l21GvUD09ervz+6l2wle6SxbsdoKEot64akKC42LekFyUS8KLeqF0ZXOwsKVztsJ/tndWxwxIOjdnt5N6k1l24pHXXdpsMDTIdbdJNwwNiT/RsTdJN4eNkZHWXcTvBlcye7g9dS23B7FPRR99+QuPuEVEQWh9XxXFHM4xNNdkevAqGe7osAhyk92BQzByreS71K1M8+xw9+7OyZEsdO/d8dijl36vTvmOnb59+5Y4Njx790RhtjhJRcKBMdOXXKpUvpNoWMpcBwP/KaQbiJiqn9TSKuN+DZ+U0jLKdbyN4WkiHFPS4gMZZqD5hIyNqj3zmAODFH0jau4m5gjbhLF2riOsskcXxM4sibEmOL9xtOI+hwIjmD75uJygnfWlmEd3m35H25ahl0t816WegfoXYRgV3gR90ls1ecP8p7bDrdMVzgVh46kK5xPRPu+8T3cr688NwKHrtg1ebkSKXRLPvsRKHXp4LMfS7xqRwi6glftnsRWff4g96D9FAcdi2MvSIHOkAJ9IqVvfhv3kOXc0XC9kBl0LlwvfELtevFZ7sqBx0bqWQf2IR9MG4Ie4PE1fZD3r46vRwktiRDsviLYfTauZcO4lm3j+jzB84PP+FlA6aygXjBr3WGMekuM9xjpq0x94eqi+3Bfv3T//29On5laP3gdP2S43jMUmt/wjTjGMWrqpm9sEa89Bi3ERYxhFcNiuHZIafVqsNRCZ0WL3dw+E7juUGnxF0tJqzettRq6o1rkya+SF8oQpN2zHrgVJ6yg2ktE1jmA4/X3Z0aug27p4+jG6qFs2aUsR3T9ygR76d2/bBm38kDUlfPCU1EXGk+yC5In2UWhk+zCYvYWFK+c75BdOfew/REarMO419FcVphFiGx+EDZieV9v5ZSN0Mr5Q70wudobHmyEC7KraHcjtNvtPjRDNFHGKe2cc+7RvfwayYqvc0tORXum2uNiiJLSuIymPSFF6Vn5UqDG+GW2mphT1iTKW+M6eU3mDDaB0tg45TI/O8HT8Eduus6B4/w2TknunDPdlUMT5LltRCU+nDRQJveZxDoQ5wKjYs9zeEQMUTIYp2JwzsXAf6niWcTXuSUXQ+VQDIaoGIzLWKc/HkE7WArUGL8sBvW3I1iiYmj97QiWuRjS345gTsWQ/nYETcMfuek6B46LwTgVg3MuBlcOTZDnuxFVDHAFizK5zyQWg7h8VZVwUQVLIgqcGFHl8iA1FUnUqVSCeN36VCqbfL/uqRK4hA7er1NtUjmlG1xaOBhBXWDNG1y6ARfbwRtculEqPH2DS6tchEFNpRjUP1ofW7emIRVnVLlESU2FSvrX0wDqMnJZunwpVFZf3+JUzK3roHs9Xi+qYUKUH0j0gATYuAcILzXSKfC4Vf525/iinyF/1oc43SIP6oWdQlUyTWT3JyjHM3NDlhzE8UJAlOrZ+3ha/iKLo7LP32EOJ+5oZSsWeEHVbACJQi88VXehsaQLohItjO4nFhbuJxYS6/MBrPeFkZ1/PfGteNPxITkV8HQz8gE9CRAZESj+i2vOquUAquNwRD9dtoWhnRpxa95mP942THgrnXeb7Xbb9NitMNZtdtNtttAtDm0/kN0VZL/vULbirY2C4nN1e5RvdBSe7nHsaXquruB416MguqNRGN3M6MdaeeJbMa96rBVAItV6qhWgMdX6UCvA/Cf8nI21AiTmWJ9qpQ/z0Od56PM89I156OU89Hoe+jwPvZiHvjEPpQie2pYVgaNYBM6xCJxaETjiInDFi8CZFYEjKwJDVN91QcSsMkSpZZzyy7hKMhNzpplE6Wacc84ETjwTYvYZphTkyywUCkgHQ5SRxiktnYvcNDEnqEs5S02jVDXO+WoCJ224dvM0IkrfxrUbEnMi52s3xHVKi2s3JFBy52s3kXOaw006yHSklOwoUb6jpFIe9Zz1qFLio8S5jxqnP2qxAlChIsjvgohYQbohpWpAiQoiSKImUM9lEdRcGShTcaDE9YEalwhoUCVIqVBQUrWCei4XVKliUNJFgy24blCj0kGJqke8BjQmxZ8TeI75T8gBIOGJ5T95xgHzedafNL9Aw1PIf+JsAorPG/8JPs4kdppdPOHcfeHhSUkDYQdnTENK/j3yerLZZRLHZTiOy3Eel2lpXK6kcZkUx2WYxmWcxoUvSXWaxvEFKY4xSnmcQU9jjWoab5DjmINE4w4ajP0///v/AGoZ428="; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Helvetica-Oblique.compressed.json -var Helvetica_Oblique_compressed_default = "eJyNnVtzG8mxrf+KAk/nRGh8eBWleZPnItsaD0dXWNvhB5BsUdgC0TLAFgjt2P/9AI2uzJUrV7X8olB/q4CuyspaVX0p8H8mP7V3d83yfvLj5P3fu/Xstnl0fPbsydGjJ89Oz55MHk9+bZf3v8/uml2BvzSLr839/Hr2w+XVYv7vrtnL3WLB8iOQZ3fzxZYL7IRpM7/9tD/r35ubeXe3I3+9ny3m18+Xt4td2R+OT3Zk/ev8obn5Y35//Wny4/2qax5Pfvo0W82u75vVm2b/6V8e7pvlTXPzur2bLYfa/vnP7cPkx3/+cHxx9PiHk5Pzx8fHx08ePzs9/tfjybtd4dVivmz+aNfz+3m73J/q6AiEt5/m15+XzXo9+fF8x983q3VfbHJ0dPKno6Oj3Ul+b3eN2Dfop/bLdrVvx6P/c/1/Hx0/e3r+eP/vRf/vs/2/z476fy8ePb9pr5pHb7br++Zu/eivy+t29aVdze6bmz89evR8sXj0ev8960evm3Wz+rqjHs35+tHs0f1qdtPczVafH7UfH/02X7b32y/ND7tCi0fPXzyaLW/+X7t6NN99wbq7Ws9v5rPVvFn/aVfZX3anupkvb99cf2r6Xuhr8uZ+95HZ6qaou4I/zb78ZeiUi+Onjyf/KEfnJ6ePJ8/X1/tArwbx58aOfzg5ung8eXN/85fpTnzS//f97r9Pnx566+/N/Wp+vQvnP/9nMv3H5MeTi53w+64i6y+zXRT/9zHh5uF6Mbszfnp+fuD/7tpdtK4WppyfPzkoy+7uat9Nt8us3bSLxWxl/OmuW3r+pVld79O+CE+eXByE2d1OWu+i4zU7OYEa9P3ttTs9Hb5vtmqWi+ZjTaKPlWrM1vtvXH/2ij89Gz616NY5ONe70TrLp/i0/fKpWebiu6bM25vM14vZ+lMO1rdm1WbaLpsM7zei5P2nVSPKfmy7laDzr6Lsev4gYPO1EX3bhJh6OsyXIq2u20UrIrRu7uZRsh5Y7E0g0ebf3WyR8e2q2Q1m0cydD657oynK8dHxkNEzkX7PM/qzoYuSiT9l9HP+4C+Ojo8P6Ff/YInAi/xdf8lx+qu3bG+Xe/S3fMaXuf2/+dgr2fr3fMbfc70u89f/kUu9yt/1On/wTY7E2/zBd/mD7w09Oxt6eppL/SOjD/mM/5WjerWbyz4398E3XNxpcaDy56KpnD0xU7mez6/nq+vuLvdHt3ft9W76gTESDC5Uxj42y+gqp8S1MGAxbnODPuZStxl9ylWeZ/TfuV6fc6lFzksRLeE6wve+iGGfTXqV6yUcXsS+yx/8mrN3k0s9ZLTN6BtU9czzKybCyZOjkpWrSvmYjeaMfTbezxc3TQ7JYa6/aTcizmF69qngvl+meXIclxH3cb8uRKO1z2zV5PFx0a7mgq+byrdcd6vdPH7tATx+dgzDZj3vV66piWXZoofVbTffKXftvV467OX+i78jU+hLz36cCyYWULuVnFwP3Mxub9WcduC4FqMVx77vmlUDY//0whZDs9vV7Iuf7fS8ZNbuUqKBjAuu1DfzarYeifC4utKLBeuAqO+uCYZa7VbY8y/r+VpIu7bef2q7sFg0ty/zfkhu77nV7Kuo7Oy6uxf44OUfF81D1ioj6252vWrFia9WjTrxTXs/uw4jzqX5ricxAG5oOA69srsLut2aWyxSu+XtbNXdLWadOE17u1tnfhZfN1uFxZP1y13IWRee+7Ln9GJg7erm426hF1aGvkKJk6wvQCL3M1zCGZ6c2xnudk7XLfAUdrUxE1PezX7Qr9diAlvEE1tKtZHbiqRtctnd+NxdEe/yXkwxf01d6k4QM9Cn/5g3PjXJTvWvi73nq6NcgzJd3My/ziGh/SOxZr5gFoPDqx0/5Cs99SGbIikGNln3F180TKCp+Sv9fGGoOK53xIzGg3+m0kMdfcCvAtJJ/Jph5xFwEXJSnFg19KI4+HW56SFORa7j68KYB95KHZffVQV8eNRyNJqqr/Rlc+xSqvZt0VghnMkqIUNmsvlr9kQbivN49rOLoc6L9luzvBWZ+zqewq/iRpOzGx0kQvThVZtIVpW2XnNb/fonR85O8/ZTuxKtuqSzexgqbvCG+FmZxChsNpo4Yy1ienLr73Csu36VsxL1pRS0KNY42WoxwbtucT//stiKelEDPclDA88uyqXJbHU/ny1u5h8/5r7a1q3h93geT9ixZPllNM1GZp0sWTpVhueyZoO1jPk9BsgnQ/oivP+2WzHgTTi7BFq1n5slXgiZOa6a2/k6Ln19iMbOhuk4jwtzjm43qsP1iAe7soZcVSLTUmR8XFZS6r9ohJ89K2vX/lZXvBFmcf7l/lOGPyUDNDNXvnV6PLTxvjJvNNXZsTYLPq8tH0ayMgbYr5dpaNitCK6UuUKtR2pTT20aXdcGZR7Hdu7RZQnPmGVd0CzuxQ2f+2DS7ombdsQR6/G960RLKOYWKrnO9LFAofcr1bjCeVpuWPQ+vkvg1S6R1/n73qR8ffas5Kte0b4cnX9/ix3nlxL2WEeZYrIFt4wYJue16ey3WG2Lwy5qn2YLmBrKIN9fmtCtbuuLMZdfxmWTp9p3OrAyFJpag26jmWKDhm5Vvar77o1cIFoGy5qflR682dmEeujRxi4CK9SW1sXyZ+dm5zfza2W0P8cvgoXZ2HL399g/Xt1Kv70ez2ulurdWltDPqyYdLwesB6jOZsQjC8pfatM9O4XdIpYNtQVZXAnYt40OhUoV7kfPtGhv9/29bEW427qZdlkqQ3n3VZWRfDt+RQszuce8kr5LOY/bzZ1lXjS759fG+C/d/nHkvx5PXjar5R+z+Wr/EPmfk+f7h9WTxz+cHv3r8XB0cI+ADvWMaDB1hC/i0cFVAsKGoXAZj3IVcOoN3Loq0MP4Dyg4T1CGkAV2uDsU0GHgIHoVjt7ujo5P/LAELbDQflDe7Q7P/agEAFAIAHAIANASAEAUAFAsAMCGoR1Y7yhI3u+OLuxoGrQP+wYe+WFpEjKoO+AuhLXLydBVkqGTydDlZOiqydCJZOgsFsCGWDj5ujs6s6NNONrGo9IiQFDzgQ6FcHQaopAYp3HqnAdrUV4IRMPWuBy7Rb0UqFJLOZRNzF1oEvWjcd2ZJnOPmkBj3DgN9MJfZYRD3hiPexfk4C8yOIAhsgHjygtMzIZgErmCcW0NJrM/mMAmYUJ0ioLBLgqa5lJoHMbYPUwQFlK0LncYm4nxsZwUtmJSJScrBmNyLSeT1ZgQ/aZgMJ2CNhltBSIPMp6NaPADNCJDFE7jZETO2YiK8kIgMiLj0oiKeilQpZbSiEzMnW4Sdbpx3ekmc6ebQEZknIyo8FcZoREZYyNyQRpRkcGIDJERGVdGZGI2IpPIiIxrIzKZjcgENiITohEVDEZU0DSXQiMyxkZkgjCionW5w9iIjI/lpDAikyo5WTEik2s5mYzIhGhEBYMRFbTJaCsQGZHxbEQYGnSjyCmwUSRfIpHNKcgvapxsKorSq0KRyxofa4i0rlgi50rUKWGiqLMmluHUiSp5WhTJ2IL4qsLR4qLAPkeqNLtQBhwvcrK9KCrviyWyAUadXDCK2gpjGfbDqLIpRjU6Y9DAHgOfVsqjUUaB3TKqwjJDga6SCmyeUfzu0BA2GvWxoVEx1FhmdGgka41q9NeggckGvqnwbY2T50YxG68TtF2k1CEokeUGiQ0XxBeaktmiJK0WClxqWq+6NFnUcx6hSlmEks4hLMEZhBpZK0pkrCC9khRNFTFbatCkoUIJsFOkZKYoKStFPRspqmSjKGkTxRJsoaixgaIW7RMUME+gU1kWjRMx2yZqwjRB7mQ3s2Gi9J0kF2aJaj3JK0aJJUaSPJkkatEiQQGDBLqRdKspWSNK2RiH1qMrGqKQGyc/dM5mWJQXApENGpceWNRLgSq1lNZnYk4JkygfjOtkMJkzwQTyOuNkdIW/yggtzhj7mwvS3IoMzmaIbM248jQTs6GZRG5mXFuZyexjJrCJmRAdrGCwr4KmuRQalzF2LROEZRWtyx3GZmV8LCeFTZlUycmKQZlcy8lkTSZEXyoYTKmgTUZbgciLjGcjKnVFJ3JGAXWBvAgENiOTXihGduSC9COTLxWrVVZakqu5/12jBHBBZ4DrnAKukC+5QMZkwivB0JocsjeBIs3JdHAnZ2RPLih/cjUblGvkUC5oi3KdPcoVNilXoksZB5syNhXl0KgcslO5IqzKxE50IZuVC6PpKuzKtVq6VgzL9Wq6JstyJXqWcTAtYxvBtoqRb7mQjatUDI3LGQXXBTIuENi4THqhGBmXC9K4TL5UrFZZaVyu5kxwjTLBBZ0JrnMmuELG5QIZlwmvBEPjcsjGBYo0LtPBuJyRcbmgjMvVbFyukXG5oI3LdTYuV9i4XInGZRyMy9hUlEPjcsjG5YowLhM70YVsXC6MpqswLtdq6VoxLter6ZqMy5VoXMbBuIxtBNsqRsblQjau1fBDH16FQiiwBZNlGWbDGoQXmZBZFSytahAvM9HVkyZVtNznRaEeL1j3d1G5twsnayqYjGnArxJBUyqILcm4NKRBBTsqhMyoYGVFRctGVBSyoYK1CRWVLahwNqDCo/0MFMxnINNUBo2nILadwoXpDFKXuocNp+CRxBNmUxSdeBWjKWol8ZLJFB4tZqBgMAPZJLLNhKyl4GwsQ7qjsxiiEBonb3HO5lKUFwKRvRiX/lLUS4EqtZQWY2LuapOor43rzjaZe9sE8hnjZDSFv8oIrcYYe40L0myKDG5jiOzGuPIbE7PhmESOY1xbjsnsOSaw6ZgQXadgsJ2CprkUGo8xdh4ThPUUrcsdxuZjfCwnhf2YVMnJigGZXMvJZEEmRA8qGEyooE1GW4HIh4wnI/rzkJvHfuSdYSjED3joHqMlaoAoYKBYrIBZmIANEXJy+F2vxz+cGBl+uqugn6DQqRErNKDyShyVLJiLD8OfixecihdrTh8wgT7y8w49t+7pj2Jn9qi4OKDQR8BTl/e09BEg6wlg1hPAhp4AUizVkXvBz4MNuLZ3gGd+VFoHCKrstATQv9YiN6DSCRA+QxRD4xRI4yqaJuaQmkRxNc7BNYEjbEIMs2GKdeHvcximuRSE3hDF33juBM59Ol/qjn4fYeyOgrg7CufuKFx2RxFFdxSJu6Pw1B1FSN1RBOqOgrk7Bv4+h2GaS2F3FMTdUbjojkHi7hgwdcevQ0889aNyKkAl/oBC6IFDhYCWgAOyWAOzMAMbIgykBNfRzBYU/VFcQfWotACQWE/1PC2lehpXUT2iFVLPaHHUs7Au6klpgaPSW8eOfIXRH8VFTI/iyv+A8pKm52k1c6C27S/guL7pEa1dekbLlj1r41Guc1upYCsr2OaatHKR1Suijm1c7vcorvR/xTEB0V/tx+W5HZkzOSrRRxQW+wfhb8MIO6w+/oYjDFDJT0AhUsAhUkBLpABZPIBZnwEb8hNICZGjWTzKLZjlFswqLZjJFsxyC2aiBTPRgllqwSy3IK60/paXWHvUhY90uZldpU2dbFOX28QXCaCI1naitV1o7cvJ4Tr83I+i/fVIeF3Pk9f1NHpdj+TFYq+QC/asjDpA0fJeDv525kdx7n+J/oYoz/gvyd+Qgr8BjtP/y+BvwGjSfzn4GxzlOreVCraygm2uCfsbKKKO5m+A4trj5QSviV9O0uXwy5TVwJMrv5yk69+XIqtBIVd+OckXvC8nfK27J9uQLduc1ducvcGAcVyQQF9GqhotVOS7p6YxRKoeTlSIRxbJNMhIpfEWVUgPEiijSaUByapIfSqSRwEXyCOWStCQIZXHCMk8pKPcVoXRsMgxT0W+13B2AlK1KVCh8bazVZBKrhFVMBASyEtIVbZCRbLDUAEyG1K171AhtiCS2Y1IjsYUxW1thLFdkZrs47fJcGP52A/tnjKyeDvZlffxcH9ZeWFH/d3VMz+0e3nA8Kad4/ijr1ky/sT41oL1GwYCUOrz38Ke6mNiHIfanmqS3wsGYQk7js+IcYDkjmPSaqEKOscLd+lSLDhyapfuIJV7LRg+Yxw+F2T48NYRMwgf3jsqLU03j5Igwle0WviCzuEr4jbHgsNnXIQvDM4QxKikUJKsAxoKva8qGNwghBBHJQU6yircoUQ16LlUCn0yQhnN1A1VIxwKDNNU6AZj3AEuyNAX+b1gEO6CMNDGOMQmiOAWrRbWoHNAi7jNseAgGk/h2y154W5DfxQvYnsUr9V7JK5re56ua3sar2t7RFevPaOr156Fq9eexGv1y6Hvz/woLjsvc3+78N5m1Muhjz0u/9gdPbGjD9b/l9jNgKDpTsttBD+l3UYYUPFp6AZD1BfGqUOMq14xMXeNSdQ/xrmTTOCeMiF2l2HqM5y/KQzce5XZm1ToR5y7TyOCHsXp/IIQ9a2azEmiXk6P/QYe9k5Cf0dOnR5F6vkoqu6PJXIORJ0SIYqcDVHllIhqzIuoUXKkndwqepwmY/u4VRFImLRt+VRwSJ20nflCcUqi6mZmpVM6BY1zCjadQUYhpXxCibIJJZVLqOdMQpXyCCXOItQ4h1CLGYQK5Q9tWc1x4typb1jNBSBvaMfmaaKQM7SP8yJTypfKLs6sUq6AwplStgRBmhiiHDFOCWJcZYeJOTVMorwwzklhAmeECTEdDFMu4MY+CgNnQWVbH6nQ/7jl7TQi6HncBXdBiPpc7YEjiXq7YO7qeJsDe5wV6niWqf9ZVmnAZXI2cAlKCpY5N1jnFGE9ZgqrlDAkv63GlNMnySqLqBAkEymQU6RAapECGcYKJRrLOd+oBKUdqZx9tocH8s4ZZZwLlGsuqCxzNeeXa5RZLnBOucLZ5ErMI+eUQWHHHkeEs6a2X49lyJSwhe2UGGRH2NZ2wYwyQm5qY42ywDj3f7nchO43RL1vnDrfuOp7E3PXm0Q9b5w73gTudxNitxumXsfbEBQG7vPKTQhSocfxFsRpRNDfeFfighD1tronQRL1dcHc1eWVUOhqQ9TVxqmrjauuNjF3tUnU1ca5q03grjYhdrVh6mp8sZvCwF1dea2bVOhqfOX5NCLoanwL+oIQdbV6B5ok6uqCqav/GHp5eCX9D+xhZKV3kcUXf0HAe2KA7dVfYP6GL0B/xRdgeccXUOlBYLPQMntDBVB8i7BH4sldz9Pjup7GZ3Q9omduPaOHjD0L7wn2JD5w+wP67fipocYyqT+KD5V6VBIUUX583fP00OlA4Ykr4Pj8ukf0PLpn9L7bnrXxKNe5rVSwlRVsc034cSgooo724BNQfDr+B46OIfqvJvgGfH8U34DvkXgDvufpDfiexjfgeyTfgO8VegO+Z/QGfM/CG/CvJ4e3Hk78KLp2j4Qx9zx5ck+jHfdIvsPUK+TRPSvxBxQd+PVgvqd+FF9tfJ0t14V3NoheYy8BEqP8NfUS0DjKX4teAoXG/+vQS8DC+H8d5ojXYXp4PUwDrn2II+g1mf9Ayy1K6H1DlALGVR6YmJPBJMoI4zotTObcMIESxDhlCd5kPiVE+VK5yUwqZI4hSh/jKodMzIlkEmWTcZ1SJnNemcDJZULMsHwf3dA0B+JDLsVZp26aD1J5sgqpZ4hSz7hKPRNz6plEqWdcp57JnHomUOoZp9TDB+ynhCj1Ko/XSYXUM0SpZ1ylnok59Uyi1DOuU89kTj0TOPVMiKmHLxBQhkxzID7kUpx66u2BIqX3/U6kwGk48r6fLiJSUr/vp9VKelbe99Myp6p+30+qmLb6jYaKKlM4lMFEjgKnc1RlUsciIrVjAU7wqFbSPBZKyR7llPJRpsRPL3rILJ3WQvmh9ok0IKpveRwKvJnwPsg3k7QP8g0/6yTMxXmbF+FUPG1xTEL6SGgWfyyI9NFdfuO1bH9I17I9o2vZnqlr2V7I17I9pmvZnvG1bA/5WraH8Vq2R3Qt+3YwsjM/iiPpbbIs4GnMvEVzAiRHx9tgQ8Diu6Nv0XAczWIjZqIH7Br8iaNaB8x0B8xEB/hlOHyviv8sx98uxP2j1+0CfPgtJCN8jqrQiNbaxXlgleY2urnh+hx5CYNXuxFRaFQUPm2/fGr6ennntbFIK5rT1qre6qq3oqf40h0lUX27dsdyucP84t2LrehQNGgl+of2cIGybu7mOTO6WKgTp+lqcet03DoRN37RGSURt051e5eTfxMPt3QoGoOvnA3nww3WpWTaYZ0E9mK9xzqpImRpl3USkj/nfdZJoWClndYsgGenqx/myr3V1Q9L5OO1qx+W2dHT1Q9z8vbCZ6LZyeVNIKs3Ptq/yvRNq/Vvsn8Tqt3LE4FxMhdf9YSBz4sh/hpVyzRDmMA25MJYqNSE4ZqYNUykqcN4LYx5EilKmkmK0IrCaU4xYbSdanYxrZYStXnG9Fpb04xjQiUz0txThJVitRCkqcgFOR8VWUxKRepE8TQ9mTDaBWqiMq3WBbUpy/RaF+TJy5TKqN0ItlWs1nw1q4ULjjC3RSV9Z5TTPBdlHfdYRkU/lkh9EOU8/0U9BzzqHPaophkx3ZQ5kwLPjiM3ZXQRMVPqmzJarcyalZsyWuYZVN+UkeqsGrI8p0aZZ9ao/gcZJWfZWGI8o/KMG+XvJFSafaPKTkv3BaLbyZsG+ovr7clzc5STO5P8/ZDL2ZpKqDk7FuGZO6rjnSJm8aDnuTzIbfWDeV6P8n8QHTnHxxLjCVmd72Op8QjluT/Ko3mZ1wFBXtWV8fDllQHJen0QCqlVQijQVT+aVwxR/g86V64eYonxzq2uJGKp8c4Vq4qoj3rSpqps68p46PKa492w0DjzozhHvsMFBSAxV76jhQPQOCu+CwsEYHTv+x0sBIDEKe7dhF8/ejdJbx6VJwPY1rRDijm1Wu+QYjG3P+2QYs6RyDukWIgxSTukiFN0KjuLwuMRjJPeWSRFitjIziJZIsdO7yySIkexsrNIqjGeemeREimyY5ts4NESBldtshESBba6yUboOahqk42QOKByk43QYjDVJpssUSDrO1DKAziMYdqBwpyip3egsJjjlnagMOeI5R0oLMRYpR0oxClKlZ0b73h7Ql2hgNV2blRkFb6RnRuVEhTM6s6Nis6hrezcqKgU6NEtC6xy2MOWhcQo1HnLQhJUeOWWhaRRSMWWhaRwGNOWhcQpdJU3/J1zuOyPHTxXjMLlAoXLBRUuV3O4XKNwucDhcoXD5UoMl3MKlwkULuMcruEH3J9nQqEqmAJVsApT0XKQikIhKpgDVDiHp/AYnEIpNAOmwAyUwvJ+CMlTPyrhABR/S/R9CgPw9Fui77H5gOi3RN+HZgMLvyX6Hpvr6EVoz4vYcz2KV1wuXMajmAo9Ev3d89TXPY393CN5y6pXqPd7Fm9O9Sh27x75b8T2R3G7QY9KCACFhgBPmxJ6WhoCyKoLzHoM2NBjQEoLHJUr2zMg5TbQeUGxk5ucmHaPB5FOzEYmZrh/AzjnayPytRH5andkHLXxKDejrdS5lXVuc+X4Tgoootp2ywRQHlNwb8Q6BO9JeM91oWe7nI1dJfU6mXpdTj2+mQCKSMpOJGUXknI6uN65H8XXtaboeoDELogpuR7QuAtiGlwPGO3HmILrAYnbH6YTfHVyit4FSLwkOSXvAhpfh5wK7wKFXnyconcBiq84Tie452eK3gUo2vc0eRfwZMJT9C5AZLXT4F3AwgQ7Re9yVJzqqZG9fupHpU2A4jub02RUwNPvA03ZqADHX9qbBqMCRj+XN0Wj8oa1oUCbm6F+CXpKRgU0V07/EvQ0GBWw+EvQUzQqR2ZU3h9dKNDlhqhfOZySIwHNDdE/YjgNjgRMxD/+RuGebMM42ebxvE3j9sNgZMMPZX1AJ0NmDzSBxbvAIOCtX8B2vxeYP6QE6DdtAZY7tYDsGaSzvaU9PbcjmyodxanSOU6VTm2qdMRTpSs+VTqzqdKRTZWG+mXLmTXCHwUCiwuyD8nUsGz+lbIPaGvIaPr7EHwNC5b4A7L4OyuT+xMgw7LMC9FnGtFcf/iGrNLeRrc3PlsDLuLQiDg0Kg78wGzP5mE4zeO46xFtVv4weCV8RyuC0NYa3OoGt6Jh6RkZSD74ANrjMGCio3115wxXd54AXRyhnbCXrmYlnbaSTlhJel4EknKZTrlMRy6DDy0S44akxxZJkM1UDy6Sxg3Ojy6SktrHDy8SZz/F7YWDWaXthcyVvarthSyR0da2F7LMlpu2FzIn8y0cHcoYD0kTyIuNy/Fqqhi0pvHINYF9yYRkTqaQUxuPF9HGacTyMyv+GlXL5OAmsI27MBYqZeiuCVc3sRbH5O8mVOOYnL4IYPeGyPONs/EXoRXfm6YAE0aDpSYD02rxqE0LptfileYHE3iSSE85WRDTRZFwzjBW81s9e5g6YqtpHjGhMpmYXrXdPK2YQrZLjyMV5harB5JKkwGpPJJUModFPpRUYmq8eCypJJ55QIPJBynNPyipKQj1PAuhShMRSnouwhI8HaFGMxJKNCmBhA6MmK0CNZqdUJJGggWEl6DMdoIaOwZqyWRRpPkKJZqywvPqYBziSbb4vkrV0/SFGs9gQftOONU8FmQxlaE+Eu40oaE2Fu40rYEGMxtSmtxQ4vkNtFafI81yqH0voGquQ3kkYLUZD4ukCyIUeeJDjec+9fqE0MQMCCpOgohHZgU9FWKBcedPEyJqlTkRi4xNDnlmRDFODvudwl8tq/ZHm3DkP5feH8X7cz1K9+GKZeL3FrTJaJs/yKcxns81WDCeq6BNRtv8QT6X8Xyu8M4TnDDwTYVvK9/D549irgR0JVQB6EbSrfwGPjlK+dTlJRw4b0GbjLb5g3w64/lc9i4FnMzYRrCt+Cyfz4V8QnsbAU5obCPYVnyWT+hCPiH8zfuTQDaJbNOn+ETib94PCv5Z65OINhlt8wf5VOrPWh+kqx292luLHcUXG/ZkYefsj+KE16P4/B+E+MzqapLekLia4J8YvEIHBySetF2RXwONT9quhDuDQk/aroIXAws/nHgVOudqgk8XrjD+gFJdr3E5dl7I56B/VpG9TnchzgP+nEvq70l7Ns8D/pxLVr4n/bJF+SYTPqvS+tsOU/5k/WV2vQ/h+UD7L85/R+Qoy6TlSMULb0NfbVTEkbY/egjaNmjU2zzQBqo7zTDXByfk0/gNm/ylD7nUNpfiiqo5epB0ahjm2hYOtcWdiPSlD7nUNpfi2qqdiUVSbz2Xqsm3npWIldfLg8gfKuW3lfKpQbVlw6Cry7ZzVrhFtNY4TV+1kSd4kGW3siy3o7ICKapfxqVmgJTaARo2BPBGn+RBl97q0qkxqOXW8LvOQ23Tu87EoQV5+WXoIZfa5lJcY7UiG6T01utQrfzWKwtQYbGEc/Ygym1FOa60XNYNWnr5dKhcfvmUBai1WAc6exDltqIc11quDQ/ax8nhftSpH8VFWI/K3SdA4l2JnqelWk/juxI9ojciekZvRPQsvBHRk/i2x0eIuJPdeFg063V/8+NpgfFDTW4ovZFzQLqh+Y2cA01v5PQ4t5/fyOmZaH8bj3Kd1es3PZcVbHNN9Os3vSLqSK/f9Ch3CP1F7o95CfQkCgM9rJr21xf9Nks/svsjjuwmHqC4hfIglMvslUD0tcbpu52rE4j9oVKgk9V2h2pVnDj+jTnx5+X0X5b7PIyEEz+KfvEZRwKifDnzmUYCUhgJgONVzucwEoDRtcznYSTAUa5zW6lgKyvY5prwSABF1LGNV4mfcSQMKO9a1wK1pbJnvaKKRtd3rFcK5L6q7FfXKkentl9dym1VGA2L7O36ZnRdYLRZlXSo7UTXMiVJZSP6Qb2bDDeI/Sh6Ro/ET5X3HO8CO40/Vd4j+VPlvUI/Vd4z+qnynoWfKr8bbOiwqrlDGwKEtevpMjR2mRu7rDR2KRu7zI1dVhu7FI1disYuU2PjfcJlaPoyN52XigMNj8SPIqIgVB6Ik5jDkR+HE9eBEQ/DSeAQpUfhEUOw8BKfAsFhU5f4gxR+FekoIopd5TeRSMyxy7+IRFzHLv8eEgscu/RzSBFD7MKPIcVAcOzUDYci5d+KOFICx3HslyJkERHTyu9ESLUS38qvRGg5xVr/SIQSMe75JyJUKFMfVH8gYihQbm1DHxii6BtXcTcxR9wkirVxHWWTOb4mcGRNiDHNjwOWeO+fAsERVPf+D9JuvUB3+/eEbtC3w4n9I5tw5NdKbVhFt3kV3cpVdFmccFXSjVHiUCm8MUroIZ9nKxBVtP7wspW3Gs+ExvVOtxqHmqZbjYo/VCqwrXFq0HeeUML6jtukbjVmCdpDtxozfZCn3WpK7Rh92NnyzbmziLn+eHNuqCbenCP0kM+zFYgqXH9c2o7u5meV604yNIGUTVV5qFZlW1eoeSznVlY23rf5FiQL0KZwC5LZgzjZVjGq+8iT5XKx0d/ROz+PqHwNc9vQSDzuaiQRTs2S7W8k7pscSfCdjiSU7Y6Ebc9j5FcZXQtUCUN5VJh5eeyXlCExnkV8k0ve7Bo+u89cVKOpVK+pVK8Z66Wm3kvxj4WRVunBptaDTa0HP2YkOvS2koHxFhirnzKaC1SJ53wsbvN63OaV2MxrsZnXYvPfGYlSn0djsBCo0uDF+BfZX1aL/C4j0cZl5ZzLStIuR+uyrIzvVqDKidux3m3rvdtWejf9mTqSa53fVsLaVpr4RaAyzZDN/DsXXQlUCdCq0jOr0Z4REVtXTrCunGBdtdP16KkVGv1AJ1Clrt1YtnT1bOkq2cLXVSzXsqWrWUWnJ8L9QuMizvubjPx9eUPbXMoWGcyh+SR9yzX6Vonwt0o2fBOzkP7bp4Z52YUXmcfxGzYZwZorv4bWVl5Da+uvoX2Bip6eF+IPvwxtw0foBF/0dw/fUnt3KOo1sbyOdHjcRl9l6pmri+bjffnSw/9/OL8wtXywX+UcZWwrnayFaoqvXOmPuYUJzfJKadEecol1BY+ccD1yQrQ2pX63OkNfHIbZaljFH/tRvC20wrU7IHGTaEUrdqDx1tAqrNOB0R2fFazOgdgL84aGl+JOARwGy7mR3aLtMEhXsFwDgu0B7M0BOLQGSGkMoNIWR/EgdJTzRThI9VzUPjZ4nZPdmurEDpbhYPhWIEO+IcHzAB+C7+QLxt0syQMP+xS83O47z/wgnMt5h83pUig63WWd6rIudRnNniDkvuxyXw5zpYOv2LxtOBhqDsSrOMByRw2GoiEaj8ZpUBpXI9PEPDxNojFqnAeqCTxaTYhD1jCNW7+xicnBtzvPI/ZhbCQmhmGRHaalFDEl5olhygnjlBjwijETNW6LuMhEN0qOfhOjBRTsPlDIMpPoCIajLTgW3mBiNAi7TZ06mK2i8OwXRXFzMKKcAx56Uig6HVVlJOKJJys6VbSvpMedzCuJFG0G7u1TaLaZRNcRt+wHJfytJkJkPekvNTFX1iP/UBNJZD35zzSxwNaT/koTYbIe+iNNp0yD9RTs1mMk5pNhkU+mpXwyJeaTYcoY45QxsCuBiTKNIi4y0Y2S1mNitJ6C3XoKWWYSrcdwtB7HwnpMjNZjL+OnDmbrEX8biT7h7mJEWQ+8M0Ch6HRUlfWIFwZY0amirSe9LcC8kkjReuBVAQrNNpNoPeI9gaKEp9doQFFgG4oqm1FUpSXFIsKYYgG2p6gmk4pysqook2FFkW0rqJSppEULCyIYWeSUo1FUmRpL5HyNOmVtFDk7o8o5GtQql5YViixqfCwU2gpjETLEIIItBr6scbLIKJJRkqjsMhYh0wzil0p6JQMNqrDRoINfRi4tlV8lkiFle62/SKRLfCd12XDH3iLSZUbTO1mweoVIal8rId7WOFlz7fWhg563VoktVeVNhuEjfP02FEqrfuLwDXpv3TpN3sTxGyobLtfiT4knBb9Hemr5hB4RUoXv9LFBWziHo/3fzGUS7wY6Frf6ivg+kandfy1k/+fjn0VSZlrCMENGpdzoHe7gnmZxUA73hb8O0/zBbL7i3A6oTOiA4jvYzvHFa6f2trUjf3vamb8u7qzsY3Zir04bKonw1NoU9Sa3yd+tB6Tb1Mg2xVfnHeemNqKpjWhqG49yndtKBVtZwTbXJL3X7oqoo7/B7ijHnn5vd1PWjed2FN/v24QVoqO4LHSe3gLchAWgI1/1OfOlnrOyvnNiizpDJaGeWJt80bfBhAIUt/FsUkIBT+vbDScU4LjW3YSEAkar2s2QUHCU69xWKtjKCra5JulneFwRdfQf3XEUF9QbTKhD8B8muH3vAYMPKG7fe0jBB56etz1w8AHHTXMPIfjAaPvetriqH9lodmSu6kjsbNmyqzqNe1i20VWd0SacLbqqk7ghZYvT65GhWKDJjaItS9tsq85lo8SOpG2wVUeirbzhaFts1Y9yndV+oi3bqtNcE71daBtt1VncGLQNtmrIly9D9PGBxAkhalN6IMFcNVg9kGCJmp4fSLDA3cEPJBhTHNLSlWIhinJOGqfEdD4SC5GiLuU8Na0Sp5SxJtTi1ApUaaDMYhPrDeF8Nq6T2uRaWzi9jVf6NiU6vDINuY6UIoASZTxKKj6o5xChSlFCiSOBGncsanEMoEKhUr+rkYOlP8DjASUaEkEaD5YYGEHNYwPleizTCEFtJJatpvW2y9GC+mgDecygpIcNlhhpIw8elOpJwUPoW1mvnttRXIN/C+tVQHkN/o3Xq0Bxveo4Ls2/xfWqM1qafyvrVT/KdW4rFWxlBdtck7RedUXU0derjuK1wjeciRhR/dNMlLhonJqJkpT7Ic1EzLm1eSYioRWo0kDZS2omYqlS2Uqn5ZmIBeq+NBMNvNyvUoiaaJz60Llouom56S7lPjSNwmKc220C92ERWoEqDZR9aGK9IdyHxnUfmlxrC/ehcepD/BWkGqamBo36M2oiFKFADkeUc98GnUIWNI5LELmfUWwreCQIss9DgfGGct8HTfd/KDLWVs6DoEEu/Ot//z8nhUqv"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Helvetica.compressed.json -var Helvetica_compressed_default = "eJyNnVtzG8mxrf+KAk/nRGh8eBWleZPnItsaj0ZXWNvhB5BsUdgE0TLAFgjt2P/9AI2uzJUrV7X8olB/q4CuyspaVX0p8H8mP7V3d83yfvLj5MPfu/Xspnl0enH05Nmjs6dHz84mjye/tsv732d3za7AX5rF1+Z+fjXb426xUHh2N19shTBt5jef92f5e3M97+525K/3s8X86vnyZrEre7Q7Xv86f2iu/5jfX32e/Hi/6prHk58+z1azq/tm9bbZf/aXh/tmed1cv2nvZsuhbn/+c/sw+fGfPxw/efL4h5OT88fHR0dHj5+dHv/r8eT9rvBqMV82f7Tr+f28XU5+/GEng/Du8/zqdtms15Mfz3f8Q7Na98UmR0cnf9p90e4kv7e7Juyb81P7Zbvat+LR/7n6v4+Onz09f7z/96L/99n+32dH/b8Xj55ft5fNo7fb9X1zt3701+VVu/rSrmb3zfWfHj16vlg8erP/nvWjN826WX3dUQvVo/n60ezR/Wp23dzNVreP2k+Pfpsv2/vtl+aHXaHFo+cvHs2W1/+vXT2a775g3V2u59fz2WrerP+0q+wvu1Ndz5c3b68+N30f9DV5e7/7yGx1XdRdwZ9mX/4ydMnF8dPHk3+Uo/OT08eT5+urfaBXg/hzY8c/nBxdPJ68vb/+y3QnPun/+2H336dPD7319+Z+Nb/ahfOf/zOZ/mPy48nFTvh9V5H1l9kuiv/7mHDzcLWY3Rk/PT8/8H937S5alwtTzs+fHJRld3e576abZdau28VitjL+dNctPf/SrK72SV6EJ08uDsLsbietd9Hxmp2cQA36/vbanZ4O3zdbNctF86km0cdKNWbr/Teub73iT8+GTy26dQ7O1W5szvIpPm+/fG6WufiuKfP2OvP1Yrb+nIP1rVm1mbbLJsP7jSh5/3nViLKf2m4l6PyrKLuePwjYfG1E3zYhpp4O86VIq6t20YoIrZu7eZSsBxZ7E0i0+Xc3W2R8s2p2g1k0899ds+6NpijHR8dDRs9E+j3P6M+GLkom/pTRz/mDvzg6Pj6gX/2DJQIv8nf9Jcfpr96yvV3u0d/yGV/m9v/mY69k69/zGX/P9XqVv/6PXOp1/q43+YNvcyTe5Q++zx/8YOjZ2dDT01zqHxl9zGf8rxzVy91cdtvcB99wcafFgcqfi6Zy9sRM5Wo+v5qvrrq73B/d3rXXu+kHxkgwuFAZ+9gso8ucElfCgMW4zQ36lEvdZPQ5V3me0X/net3mUouclyJawnWE730Rwz6b9CrXSzi8iH2XP/g1Z+8ml3rIaJvRN6jqmedXTISTJ0clK1eV8jEbzRn7bLyfL66bHJLDXH/dbkScw/TsU8F9v0zz5DguI+7Tfl2IRmuf2arJ49OiXc0FXzeVb7nqVrt5/MoDePzsGIbNet6vW1MTy7JFD6ubbr5T7tp7vXTYy/0Xf0em0Jee/TQXTCygdis5uR64nt3cqDntwHEtRiuOfd81qwbG/umFLYZmN6vZFz/b6XnJrN0FRAMZF1ypb+blbD0S4XF1pRcL1gFR7y8ZDrFZLOZf1vO1kHZtvf/cdmGxaG5f5v2Q3N5zq9lXUdnZVXcv8MHLPy2ah6xVRtbd7GrVihNfrhp14uv2fnYVRpxL811PYgDc0HAcemV3l3O7NbdYpHbLm9mqu1vMOnGa9ma3zrwVXzdbhcWT9ctdyFkXnvuyZ3fdOnz56vrTbqEXVoa+QomTrC9AIvczvIIzPDm3M9ztnK5b4CnsamMmprzr/aBfr8UEtogntpRqI7cVSdvksrvxubsi3uW9mGL+mrrUnSBmoE//MW98apKd6l8Xe89XR7kGZbq4nn+dQ0L7R2LNfMEsBodXO37IV3rqQzZFUgxssu4vvmiYQFPzV/r5wlBxXO+IGY0H/0ylhzr6gF8FpJP4NcPOI+Ai5KQ4sWroRXHwq3LTQ5yKXMfXhTEPvJU6Lr+rCvjwqOVoNFVf6cvm2KVU7duisUI4k1VChsxk89fsiTYU5/HsZxdDnRftt2Z5IzL3TTyFX8WNJmc3OkiE6MOrNpGsKm294rb69U+OnJ3m3ed2JVr1is7uYai4wVviZ2USo7DZaOKMtYjpya2/w7Hu+lXOStSXUtCiWONkq8UE77rF/fzLYivqRQ30JA8NPLsolyaz1f18trief/qU+2pbt4bf43k8YceS5ZfRNBuZdbJk6VQZnsuaDdYy5vcYIJ8M6Yvw/ttuxYA34ewSaNXeNku8EDJzXDU383Vc+voQjZ0N03EeF+Yc3W5Uh+sRD3ZlDbmqRKalyPi4rKTUf9EIP3tW1q79ra54I8zi/Mv95wx/SgZoZq586/R4aON9Zd5oqrNjbRZ8Xls+jGRlDLBfL9PQsFsRXClzhVqP1Kae2jS6rg3KPI7t3KPLEp4xy7qgWdyLGz73waTdEzftiCPW43vXiZZQzC1Ucp3pY4FC71eqcYXztNyw6H18l8CrXSKv8/e9Tfn67FnJV72ifTk6//4WO84vJeyxjjLFZAtuGTFMzmvT2W+x2haHXdQ+zxYwNZRBvr80oVvd1hdjLr+MyyZPte90YGUoNLUG3UQzxQYN3ap6VffdW7lAtAyWNT8rPXi9swn10KONXQRWqC2ti+XPzs3Or+dXymh/jl8EC7Ox5e7vsX+8upV+ezOe10p1b60soZ9XTTpeDlgPUJ3NiEcWlL/Upnt2CrtFLBtqC7K4ErBvGx0KlSrcj55p0d7s+3vZinC3dTPtslSG8u6rKiP5ZvyKFmZyj3klfZdyHrebO8u8aHbPr43xX7r948h/PZ68bFbLP2bz1f4h8j8nz/cPqyePfzg9+tfj4ejgHgEd6hnRYOoIX8Sjg6sEhA1D4VU8ylXAqTdw66pAD+M/oOA8QRlCFtjh7lBAh4GD6HU4erc7Oj7xwxK0wEL7QXm/Ozz3oxIAQCEAwCEAQEsAAFEAQLEAABuGdmC9oyD5sDu6sKNp0D7uG3jkh6VJyKDugLsQ1i4nQ1dJhk4mQ5eToasmQyeSobNYABti4eTr7ujMjjbhaBuPSosAQc0HOhTC0WmIQmKcxqlzHqxFeSEQDVvjcuwW9ZVAlVrKoWxi7kKTqB+N6840mXvUBBrjxmmgF/46IxzyxnjcuyAHf5HBAQyRDRhXXmBiNgSTyBWMa2swmf3BBDYJE6JTFAx2UdA0l0LjMMbuYYKwkKJ1ucPYTIyP5aSwFZMqOVkxGJNrOZmsxoToNwWD6RS0yWgrEHmQ8WxEgx+gERmicBonI3LORlSUFwKRERmXRlTUVwJVaimNyMTc6SZRpxvXnW4yd7oJZETGyYgKf50RGpExNiIXpBEVGYzIEBmRcWVEJmYjMomMyLg2IpPZiExgIzIhGlHBYEQFTXMpNCJjbEQmCCMqWpc7jI3I+FhOCiMyqZKTFSMyuZaTyYhMiEZUMBhRQZuMtgKRERnPRoShQTeKnAIbRfIlEtmcgvyixsmmoii9KhR5VeNjDZHWFUvkXIk6JUwUddbEMpw6USVPiyIZWxBfVzhaXBTY50iVZhfKgONFTrYXReV9sUQ2wKiTC0ZRW2Esw34YVTbFqEZnDBrYY+DTSnk0yiiwW0ZVWGYo0FVSgc0zit8dGsJGoz42NCqGGsuMDo1krVGN/ho0MNnANxW+rXHy3Chm43WCtouUOgQlstwgseGC+EJTMluUpNVCgVea1qsuTRb1nEeoUhahpHMIS3AGoUbWihIZK0ivJUVTRcyWGjRpqFAC7BQpmSlKykpRz0aKKtkoStpEsQRbKGpsoKhF+wQFzBPoVJZF40TMtomaME2QO9nNbJgofSfJhVmiWk/yilFiiZEkTyaJWrRIUMAggW4k3WpK1ohSNsah9eiKhijkxskPnbMZFuWFQGSDxqUHFvWVQJVaSuszMaeESZQPxnUymMyZYAJ5nXEyusJfZ4QWZ4z9zQVpbkUGZzNEtmZceZqJ2dBMIjczrq3MZPYxE9jETIgOVjDYV0HTXAqNyxi7lgnCsorW5Q5jszI+lpPCpkyq5GTFoEyu5WSyJhOiLxUMplTQJqOtQORFxrMRlbqiEzmjgLpAXgQCm5FJLxQjO3JB+pHJrxSrVVZakqu5/12jBHBBZ4DrnAKukC+5QMZkwmvB0JocsjeBIs3JdHAnZ2RPLih/cjUblGvkUC5oi3KdPcoVNilXoksZB5syNhXl0KgcslO5IqzKxE50IZuVC6PpKuzKtVq6VgzL9Wq6JstyJXqWcTAtYxvBtoqRb7mQjatUDI3LGQXXBTIuENi4THqhGBmXC9K4TH6lWK2y0rhczZngGmWCCzoTXOdMcIWMywUyLhNeC4bG5ZCNCxRpXKaDcTkj43JBGZer2bhcI+NyQRuX62xcrrBxuRKNyzgYl7GpKIfG5ZCNyxVhXCZ2ogvZuFwYTVdhXK7V0rViXK5X0zUZlyvRuIyDcRnbCLZVjIzLhWxcq+GHPrwKhVBgCybLMsyGNQgvMiGzKlha1SC+ykRXT5pU0XKfF4V6vGDd30Xl3i6crKlgMqYBv04ETakgtiTj0pAGFeyoEDKjgpUVFS0bUVHIhgrWJlRUtqDC2YAKj/YzUDCfgUxTGTSegth2ChemM0hd6h42nIJHEk+YTVF04lWMpqiVxEsmU3i0mIGCwQxkk8g2E7KWgrOxDOmOzmKIQmicvMU5m0tRXghE9mJc+ktRXwlUqaW0GBNzV5tEfW1cd7bJ3NsmkM8YJ6Mp/HVGaDXG2GtckGZTZHAbQ2Q3xpXfmJgNxyRyHOPackxmzzGBTceE6DoFg+0UNM2l0HiMsfOYIKynaF3uMDYf42M5KezHpEpOVgzI5FpOJgsyIXpQwWBCBW0y2gpEPmQ8GdGfh9w89iPvDEMhfsBD9xgtUQNEAQPFYgXMwgRsiJCTw+96Pf7hxMjw010F/QSFTo1YoQGVV+KoZMFcfBj+XLzgVLxYc/qACfSRn3fouXVPfxQ7s0fFxQGFPgKeurynpY8AWU8As54ANvQEkGKpjtwLfh5swLW9Azzzo9I6QFBlpyWA/rUWuQGVToDwGaIYGqdAGlfRNDGH1CSKq3EOrgkcYRNimA1TrAv/kMMwzaUg9IYo/sZzJ3Du0/lSd/T7CGN3FMTdUTh3R+GyO4oouqNI3B2Fp+4oQuqOIlB3FMzdMfAPOQzTXAq7oyDujsJFdwwSd8eAqTt+HXriqR+VUwEq8QcUQg8cKgS0BByQxRqYhRnYEGEgJbiOZrag6I/iCqpHpQWAxHqq52kp1dO4iuoRrZB6RoujnoV1UU9KCxyV3jp25CuM/iguYnoUV/4HlJc0PU+rmQO1bX8Bx/VNj2jt0jNatuxZG49yndtKBVtZwTbXpJWLrF4RdWzjcr9HcaX/K44JiP5qPy7P7cicyVGJPqKw2D8IfxtG2GH18TccYYBKfgIKkQIOkQJaIgXI4gHM+gzYkJ9ASogczeJRbsEst2BWacFMtmCWWzATLZiJFsxSC2a5BXGl9be8xNqjLnyky83sKm3qZJu63Ca+SABFtLYTre1Ca19ODtfh534U7a9Hwut6nryup9HreiQvFnuFXLBnZdQBipb3cvC3Mz+Kc/9L9DdEecZ/Sf6GFPwNcJz+XwZ/A0aT/svB3+Ao17mtVLCVFWxzTdjfQBF1NH8DFNceLyd4Tfxyki6HX6asBp5c+eUkXf++FFkNCrnyy0m+4H054WvdPdmGbNnmrN7m7A0GjOOCBPoyUtVooSLfPTWNIVL1cKJCPLJIpkFGKo23qEJ6kEAZTSoNSFZF6lORPAq4QB6xVIKGDKk8RkjmIR3ltiqMhkWOeSryvYazE5CqTYEKjbedrYJUco2ogoGQQF5CqrIVKpIdhgqQ2ZCqfYcKsQWRzG5EcjSmKG5rI4ztitRkH79NhhvLx35o95SRxdvJrnyIh/vLygs76u+unvmh3csDhjftHMcffc2S8SfGtxas3zAQgFKf/xb2VB8T4zjU9lST/EEwCEvYcXxGjAMkdxyTVgtV0DleuEuXYsGRU7t0B6nca8HwGePwuSDDh7eOmEH48N5RaWm6eZQEEb6i1cIXdA5fEbc5Fhw+4yJ8YXCGIEYlhZJkHdBQ6ENVweAGIYQ4KinQUVbhDiWqQc+lUuiTEcpopm6oGuFQYJimQjcY4w5wQYa+yB8Eg3AXhIE2xiE2QQS3aLWwBp0DWsRtjgUH0XgK327JC3cb+qN4EdujeK3eI3Fd2/N0XdvTeF3bI7p67RldvfYsXL32JF6rvxr6/syP4rLzVe5vFz7YjPpq6GOPyz92R0/s6KP1/yvsZkDQdKflNoKf0m4jDKj4NHSDIeoL49QhxlWvmJi7xiTqH+PcSSZwT5kQu8sw9RnO3xQG7r3K7E0q9CPO3acRQY/idH5BiPpWTeYkUS+nx34DD3snob8jp06PIvV8FFX3xxI5B6JOiRBFzoaockpENeZF1Cg50k5uFT1Ok7F93KoIJEzatnwqOKRO2s58oTglUXUzs9IpnYLGOQWbziCjkFI+oUTZhJLKJdRzJqFKeYQSZxFqnEOoxQxChfKHtqzmOHHu1Des5gKQN7Rj8zRRyBnax3mRKeVLZRdnVilXQOFMKVuCIE0MUY4YpwQxrrLDxJwaJlFeGOekMIEzwoSYDoYpF3BjH4WBs6CyrY9U6H/c8nYaEfQ87oK7IER9rvbAkUS9XTB3dbzNgT3OCnU8y9T/LKs04DI5G7gEJQXLnBusc4qwHjOFVUoYkt9VY8rpk2SVRVQIkokUyClSILVIgQxjhRKN5ZxvVILSjlTOPtvDA3nnjDLOBco1F1SWuZrzyzXKLBc4p1zhbHIl5pFzyqCwY48jwllT26/HMmRK2MJ2SgyyI2xru2BGGSE3tbFGWWCc+79cbkL3G6LeN06db1z1vYm5602injfOHW8C97sJsdsNU6/jbQgKA/d55SYEqdDjeAviNCLob7wrcUGIelvdkyCJ+rpg7urySih0tSHqauPU1cZVV5uYu9ok6mrj3NUmcFebELvaMHU1vthNYeCurrzWTSp0Nb7yfBoRdDW+BX1BiLpavQNNEnV1wdTVfwy9PLyS/gf2MLLSu8jii78g4D0xwPbqLzB/wxegv+ILsLzjC6j0ILBZaJm9oQIovkXYI/HkrufpcV1P4zO6HtEzt57RQ8aehfcEexIfuP0B/Xb81FBjmdQfxYdKPSoJiig/vu55euh0oPDEFXB8ft0jeh7dM3rfbc/aeJTr3FYq2MoKtrkm/DgUFFFHe/AJKD4d/wNHxxD91xN8A74/im/A90i8Ad/z9AZ8T+Mb8D2Sb8D3Cr0B3zN6A75n4Q34N5PDWw8nfhRdu0fCmHuePLmn0Y57JN9h6hXy6J6V+AOKDvxmMN9TP4qvNr7JluvCextEb7CXAIlR/oZ6CWgc5W9EL4FC4/9N6CVgYfy/CXPEmzA9vBmmAdc+xhH0hsx/oOUWJfS+IUoB4yoPTMzJYBJlhHGdFiZzbphACWKcsgRvMp8Sonyp3GQmFTLHEKWPcZVDJuZEMomyybhOKZM5r0zg5DIhZli+j25omgPxMZfirFM3zQepPFmF1DNEqWdcpZ6JOfVMotQzrlPPZE49Eyj1jFPq4QP2U0KUepXH66RC6hmi1DOuUs/EnHomUeoZ16lnMqeeCZx6JsTUwxcIKEOmORAfcylOPfX2QJHS+34nUuA0HHnfTxcRKanf99NqJT0r7/tpmVNVv+8nVUxb/UZDRZUpHMpgIkeB0zmqMqljEZHasQAneFQraR4LpWSPckr5KFPipxc9ZJZOa6H8WPtEGhDVtzwOBd5OeB/k20naB/mWn3US5uK8zYtwKp62OCYhfSQ0iz8WRProLr/xWrY/pGvZntG1bM/UtWwv5GvZHtO1bM/4WraHfC3bw3gt2yO6ln03GNmZH8WR9C5ZFvA0Zt6hOQGSo+NdsCFg8d3Rd2g4jmaxETPRA3YN/sRRrQNmugNmogP8Mhy+V8V/luNvF+L+0at2AT78DpIRPkdVaERr7eI8sEpzG93ccH2OvITBq92IKDQqCp+3Xz43fb2889pYpBXNaWtVb3XVW9FTfOmOkqi+XbtjudxhfvHuxVZ0KBq0Ev1De7hAWTd385wZXSzUidN0tbh1Om6diBu/6IySiFunur3Lyb+Jh1s6FI3BV86G8+EG61Iy7bBOAnux3mOdVBGytMs6Ccmf8z7rpFCw0k5rFsCz09UPc+Xe6uqHJfLx2tUPy+zo6eqHOXl74TPR7OTyJpDVGx/tX2X6ptX6N9m/CdXu5YnAOJmLr3rCwOfFEH+NqmWaIUxgG3JhLFRqwnBNzBom0tRhvBbGPIkUJc0kRWhF4TSnmDDaTjW7mFZLido8Y3qtrWnGMaGSGWnuKcJKsVoI0lTkgpyPiiwmpSJ1oniankwY7QI1UZlW64LalGV6rQvy5GVKZdRuBNsqVmu+mtXCBUeY26KSvjPKaZ6Lso57LKOiH0ukPohynv+ingMedQ57VNOMmG7KnEmBZ8eRmzK6iJgp9U0ZrVZmzcpNGS3zDKpvykh1Vg1ZnlOjzDNrVP+DjJKzbCwxnlF5xo3ydxIqzb5RZael+wLR7eRNA/3F9fbkuTnKyZ1J/n7I5WxNJdScHYvwzB3V8U4Rs3jQ81we5Lb6wTyvR/k/iI6c42OJ8YSszvex1HiE8twf5dG8zOuAIK/qynj48sqAZL0+CIXUKiEU6KofzSuGKP8HnStXD7HEeOdWVxKx1HjnilVF1Ec9aVNVtnVlPHR5zfF+WGic+VGcI9/jggKQmCvf08IBaJwV34cFAjC69/0eFgJA4hT3fsKvH72fpDePypMBbGvaIcWcWq13SLGY2592SDHnSOQdUizEmKQdUsQpOpWdReHxCMZJ7yySIkVsZGeRLJFjp3cWSZGjWNlZJNUYT72zSIkU2bFNNvBoCYOrNtkIiQJb3WQj9BxUtclGSBxQuclGaDGYapNNliiQ9R0o5QEcxjDtQGFO0dM7UFjMcUs7UJhzxPIOFBZirNIOFOIUpcrOjfe8PaGuUMBqOzcqsgrfyM6NSgkKZnXnRkXn0FZ2blRUCvTolgVWOexhy0JiFOq8ZSEJKrxyy0LSKKRiy0JSOIxpy0LiFLrKG/7OOVz2xw6eK0bhcoHC5YIKl6s5XK5RuFzgcLnC4XIlhss5hcsECpdxDtfwA+7PM6FQFUyBKliFqWg5SEWhEBXMASqcw1N4DE6hFJoBU2AGSmH5MITkqR+VcACKvyX6IYUBePot0Q/YfED0W6IfQrOBhd8S/YDNdfQitOdF7LkexSsuF17Fo5gKPRL93fPU1z2N/dwjecuqV6j3exZvTvUodu8e+W/E9kdxu0GPSggAhYYAT5sSeloaAsiqC8x6DNjQY0BKCxyVK9szIOU20HlBsZObnJh2jweRTsxGJma4fwM452sj8rUR+Wp3ZBy18Sg3o63UuZV1bnPl+E4KKKLadssEUB5TcG/EOgTvSXjPdaFnu5yNXSX1Opl6XU49vpkAikjKTiRlF5JyOrjeuR/F17Wm6HqAxC6IKbke0LgLYhpcDxjtx5iC6wGJ2x+mE3x1coreBUi8JDkl7wIaX4ecCu8ChV58nKJ3AYqvOE4nuOdnit4FKNr3NHkX8GTCU/QuQGS10+BdwMIEO0XvclSc6qmRvX7qR6VNgOI7m9NkVMDT7wNN2agAx1/amwajAkY/lzdFo/KGtaFAm5uhfgl6SkYFNFdO/xL0NBgVsPhL0FM0KkdmVN4fXSjQ5YaoXzmckiMBzQ3RP2I4DY4ETMQ//kbhnmzDONnm8bxN4/bjYGTDD2V9RCdDZg80gcW7wCDgrV/Adr8XmD+kBOg3bQGWO7WA7Bmks72lPT23I5sqHcWp0jlOlU5tqnTEU6UrPlU6s6nSkU2Vhvply5k1wh8FAosLso/J1LBs/pWyj2hryGj6+xh8DQuW+AOy+Dsrk/sTIMOyzAvRZxrRXH/4hqzS3ka3Nz5bAy7i0Ig4NCoO/MBsz+ZhOM3juOsRbVb+OHglfEcrgtDWGtzqBreiYekZGUg++ADa4zBgoqN9decMV3eeAF0coZ2wl65mJZ22kk5YSXpeBJJymU65TEcugw8tEuOGpMcWSZDNVA8uksYNzo8ukpLaxw8vEmc/xe2Fg1ml7YXMlb2q7YUskdHWtheyzJabthcyJ/MtHB3KGA9JE8iLjcvxaqoYtKbxyDWBfcmEZE6mkFMbjxfRxmnE8jMr/hpVy+TgJrCNuzAWKmXorglXN7EWx+TvJlTjmJy+CGD3hsjzjbPxF6EV35umABNGg6UmA9Nq8ahNC6bX4pXmBxN4kkhPOVkQ00WRcM4wVvNbPXuYOmKraR4xoTKZmF613TytmEK2S48jFeYWqweSSpMBqTySVDKHRT6UVGJqvHgsqSSeeUCDyQcpzT8oqSkI9TwLoUoTEUp6LsISPB2hRjMSSjQpgYQOjJitAjWanVCSRoIFhJegzHaCGjsGaslkUaT5CiWassLz6mAc4km2+L5K1dP0hRrPYEH7TjjVPBZkMZWhPhLuNKGhNhbuNK2BBjMbUprcUOL5DbRWnyPNcqh9L6BqrkN5JGC1GQ+LpAsiFHniQ43nPvX6hNDEDAgqToKIR2YFPRVigXHnTxMiapU5EYuMTQ55ZkQxTg77ncJfLav2R5tw5D+X3h/F+3M9SvfhimXi9xa0yWibP8inMZ7PNVgwnqugTUbb/EE+l/F8rvDOE5ww8E2Fbyvfw+ePYq4EdCVUAehG0q38Bj45SvnU5SUcOG9Bm4y2+YN8OuP5XPYuBZzM2Eawrfgsn8+FfEJ7GwFOaGwj2FZ8lk/oQj4h/M37k0A2iWzTp/hE4m/eDwr+WeuTiDYZbfMH+VTqz1ofpMsdvdxbix3FFxv2ZGHn7I/ihNej+PwfhPjM6nKS3pC4nOCfGLxEBwcknrRdkl8DjU/aLoU7g0JP2i6DFwMLP5x4GTrncoJPFy4x/oBSXa9wOXZeyG3Qb1Vkr9JdiPOAb3NJ/T1pz+Z5wLe5ZOV70i9blG8y4VaV1t92mPIn6y+zq30Izwfaf3H+OyJHWSYtRypeeBv6aqMijrT90UPQtkGj3uaBNlDdaYa5Pjghn8Zv2OQvfciltrkUV1TN0YOkU8Mw17ZwqC3uRKQvfciltrkU11btTCySeuu5VE2+9axErLxeHkT+UCm/rZRPDaotGwZdXbads8ItorXGafqqjTzBgyy7lWW5HZUVSFH9Mi41A6TUDtCwIYA3+iQPuvRWl06NQS23ht91Hmqb3nUmDi3Iyy9DD7nUNpfiGqsV2SClt16HauW3XlmACoslnLMHUW4rynGl5bJu0NLLp0Pl8sunLECtxTrQ2YMotxXluNZybXjQPk0O96NO/SguwnpU7j4BEu9K9Dwt1Xoa35XoEb0R0TN6I6Jn4Y2InsS3PT5BxJ3sxsOiWa/7mx9PC4wfanJD6Y2cA9INzW/kHGh6I6fHuf38Rk7PRPvbeJTrrF6/6bmsYJtrol+/6RVRR3r9pke5Q+gvcn/KS6AnURjoYdW0v77ot1n6kd0fcWQ38QDFLZQHoVxmrwSirzVO3+1cnUDsD5UCnay2O1Sr4sTxb8yJPy+n/7Lc7TASTvwo+sUtjgRE+XLmlkYCUhgJgONVzm0YCcDoWuZ2GAlwlOvcVirYygq2uSY8EkARdWzjVeItjoQB5V3rWqC2VPasV1TR6PqO9UqB3FeV/epa5ejU9qtLua0Ko2GRvV3fjK4LjDarkg61nehapiSpbEQ/qHeT4QaxH0XP6JH4qfKe411gp/Gnynskf6q8V+inyntGP1Xes/BT5XeDDR1WNXdoQ4Cwdj1dhsYuc2OXlcYuZWOXubHLamOXorFL0dhlamy8T7gMTV/mpvNScaDhkfhRRBSEygNxEnM48uNw4jow4mE4CRyi9Cg8YggWXuJTIDhs6hJ/kMKvIh1FRLGr/CYSiTl2+ReRiOvY5d9DYoFjl34OKWKIXfgxpBgIjp264VCk/FsRR0rgOI79UoQsImJa+Z0IqVbiW/mVCC2nWOsfiVAixj3/RIQKZeqD6g9EDAXKrW3oA0MUfeMq7ibmiJtEsTauo2wyx9cEjqwJMab5ccAS7/1TIDiC6t7/QdqtF+hu/57QDfp2OLF/ZBOO/FqpDavoNq+iW7mKLosTrkq6MUocKoU3Rgk95PNsBaKK1h9etvJW45nQuN7pVuNQ03SrUfGHSgW2NU4N+s4TSljfcZvUrcYsQXvoVmOmD/K0W02pHaMPO1u+OXcWMdcfb84N1cSbc4Qe8nm2AlGF649L29Hd/Kxy3UmGJpCyqSoP1aps6wo1j+XcysrG+zbfgmQB2hRuQTJ7ECfbKkZ1H3myXC42+jt65+cRla9hbhsaicddjSTCqVmy/Y3EfZMjCb7TkYSy3ZGw7XmM/DKjK4EqYSiPCjMvj/2SMiTGs4ivc8nrXcNn95mLajSV6jWV6jVjvdTUeyn+sTDSKj3Y1HqwqfXgp4xEh95UMjDeAmP1c0ZzgSrxnI/FbV6P27wSm3ktNvNabP47I1HqdjQGC4EqDV6Mf5H9ZbXI7zISbVxWzrmsJO1ytC7LyvhuBaqcuB3r3bbeu22ld9OfqSO51vltJaxtpYlfBCrTDNnMv3PRlUCVAK0qPbMa7RkRsXXlBOvKCdZVO12Pnlqh0Q90AlXq2o1lS1fPlq6SLXxdxXItW7qaVXR6ItwvNC7ivL/JyN+XN7TNpWyRwRyaT9K3XKNvlQh/q2TDNzEL6b99apiXXXiReRy/YZMRrLnya2ht5TW0tv4a2heo6Ol5If7wy9A2fIRO8EV/9/AttXeHol4Ty+tIh8dt9FWmnrm6aD7dly89/P+H8wtTywf7Vc5RxrbSyVqopvjKlf6YW5jQLK+UFu0hl1hX8MgJ1yMnRGtT6nerM/TFYZithlX8sR/F20IrXLsDEjeJVrRiBxpvDa3COh0Y3fFZweociL0wb2h4Ke4UwGGwnBvZLdoOg3QFyzUg2B7A3hyAQ2uAlMYAKm1xFA9CRzlfhINUz0XtY4PXOdmtqU7sYBkOhm8FMuQbEjwP8CH4Tr5g3M2SPPCwT8HL7b7zzA/CuZx32JwuhaLTXdapLutSl9HsCULuyy735TBXOviKzduGg6HmQLyKAyx31GAoGqLxaJwGpXE1Mk3Mw9MkGqPGeaCawKPVhDhkDdO49RubmBx8u/M8Yh/GRmJiGBbZYVpKEVNinhimnDBOiQGvGDNR47aIi0x0o+ToNzFaQMHuA4UsM4mOYDjagmPhDSZGg7Db1KmD2SoKz35RFDcHI8o54KEnhaLTUVVGIp54sqJTRftKetzJvJJI0Wbg3j6FZptJdB1xy35Qwt9qIkTWk/5SE3NlPfIPNZFE1pP/TBMLbD3przQRJuuhP9J0yjRYT8FuPUZiPhkW+WRayidTYj4ZpowxThkDuxKYKNMo4iIT3ShpPSZG6ynYraeQZSbRegxH63EsrMfEaD32Mn7qYLYe8beR6BPuLkaU9cA7AxSKTkdVWY94YYAVnSraetLbAswriRStB14VoNBsM4nWI94TKEp4eo0GFAW2oaiyGUVVWlIsIowpFmB7imoyqSgnq4oyGVYU2baCSplKWrSwIIKRRU45GkWVqbFEzteoU9ZGkbMzqpyjQa1yaVmhyKLGx0KhrTAWIUMMIthi4MsaJ4uMIhklicouYxEyzSB+qaRXMtCgChsNOvhl5NJS+VUiGVK21/qLRLrEd1KXDXfsLSJdZjS9kwWrV4ik9rUS4m2NkzXXXh866HlrldhSVd5kGD7C129DobTqJw7foPfWrdPkTRy/obLhci3+lHhS8Hukp5ZP6BEhVfhOHxu0hXM42v/NXCbxbqBjcauviB8Smdr910L2fz7+WSRlpiUMM2RUyo3e4Q7uaRYH5XBf+OswzR/M5ivO7YDKhA4ovoPtHF+8dmpvWzvyt6ed+evizso+Zif26rShkghPrU1Rb3Kb/N16QLpNjWxTfHXecW5qI5raiKa28SjXua1UsJUVbHNN0nvtrog6+hvsjnLs6fd2N2XdeG5H8f2+TVghOorLQufpLcBNWAA68lWfM1/qOSvrOye2qDNUEuqJtckXfRtMKEBxG88mJRTwtL7dcEIBjmvdTUgoYLSq3QwJBUe5zm2lgq2sYJtrkn6GxxVRR//RHUdxQb3BhDoE/2GC2/ceMPiA4va9hxR84Ol52wMHH3DcNPcQgg+Mtu9ti6v6kY1mR+aqjsTOli27qtO4h2UbXdUZbcLZoqs6iRtStji9HhmKBZrcKNqytM226lw2SuxI2gZbdSTayhuOtsVW/SjXWe0n2rKtOs010duFttFWncWNQdtgq4Z8+TJEHx9InBCiNqUHEsxVg9UDCZao6fmBBAvcHfxAgjHFIS1dKRaiKOekcUpM5yOxECnqUs5T0ypxShlrQi1OrUCVBsosNrHeEM5n4zqpTa61hdPbeKVvU6LDK9OQ60gpAihRxqOk4oN6DhGqFCWUOBKocceiFscAKhQq9bsaOVj6AzweUKIhEaTxYImBEdQ8NlCuxzKNENRGYtlqWm+7HC2ojzaQxwxKethgiZE28uBBqZ4UPIS+lfXquR3FNfi3sF4FlNfg33i9ChTXq47j0vxbXK86o6X5t7Je9aNc57ZSwVZWsM01SetVV0Qdfb3qKF4rfMOZiBHVP81EiYvGqZkoSbkf0kzEnFubZyISWoEqDZS9pGYiliqVrXRanolYoO5LM9HAy/0qhaiJxqkPnYumm5ib7lLuQ9MoLMa53SZwHxahFajSQNmHJtYbwn1oXPehybW2cB8apz7EX0GqYWpq0Kg/oyZCEQrkcEQ5923QKWRB47gEkfsZxbaCR4Ig+zwUGG8o933QdP+HImNt5TwIGuTCv/73/wO+9kRf"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Times-Bold.compressed.json -var Times_Bold_compressed_default = "eJyFnVtzG0eShf8KA0+7EfKseJXkN9nj0Vj0yNaNEHZiHkCySWEJsmmAIA1PzH/fRqMr8+TJU9CLQv2dYqMrK/NU9Q349+jH9va2uXsYfT86+8dqOb1u9o72Tw5P9o4PTk72R89Gf2vvHt5Nb5uuwafZbbP87od2frnhq/kc+V7h09vZfI1KB8fN7Prr5jOGRj8/TOezi9d31/Ou1fNue/m32R/N5W+zh4uvo+8fFqvm2ejHr9PF9OKhWXxsNn/50x8Pzd1lc/mhvZ3eDcf1ww/tH6Pv//nd/snLZ98d7L98tv/8+fNnrw6P//Vs9LlrvJjP7prf2uXsYdbejb7/rpNB+PR1dnFz1yyXo++PO37WLJZ9s9Hz5wd/6XbUfci79mF2senIj+39erHpw95/Xfz33v6rl8fPNv++6P99tfn31fP+38P+3xd7ry/b82bv43r50Nwu936+u2gX9+1i+tBc/mVv7/V8vvdhs7fl3odm2SweO7oN4my5N917WEwvm9vp4mavvdr7ZXbXPqzvm+/+3nR/9frN3vTu8n/axd6s++Pl6nw5u5xNF7Nm+ZfucH/qPuZydnf98eJr08e/P4qPD92fTBeXRe0a/ji9//swJCcvTp6NvpSto5P9Z6PXy4tNqBed+PLw2eivjW13QX7xbPTx4fLv467tUf/fs+6/+4evtgP2j+ZhMbvoIvrPf4/GX0bfH2wi+647kuX9tAvkf55t8eHh4RY3f1zMp7fGj4+Pt/z3VduF6nzuyvNhR3er2/PNSF3fZe2ync+nC+N9NvTCfbO42CR5UV6Wz5/edtKyi08+tP4Q+jHP2v100dzNm6uaFP/Mjm+63OxxeePKi3KA89XSqAXtoqvNaf6Ir+v7r81dbt51ZdZ6Tw5evBxiP58uv+aj+bNZtJm2d02GD0+i5cPXRSPaXrWrhaCzR9F2OftDwOaxEYPb6Jjeze5EXl208/Yu42VzO4uSjcB8YwSJNr+vpvOMrxdNV8qim7+vmmVvNkV5dVjG3o/9xcHBlr02dHLyYot+yK1+zOiv+Q9/crS/v0V/8z8sqfAmo797mDon69HPuWNv8x+e5oP4xfu9cYcN+kc++nd5X7/mo/8tt3qf9/UBvONkiz7m4/qU//BzRmfCOca52ZeMJvkj/zdn33k3n900D8E3rEjPOy0WKv8dmcrL/WIqF7PZxWxxsbrNw7ba+Paym3xEjfQGFw7GjSpH9dzQURnai9zqMrcSn3yVP/E67+trDtIs7+v/8h/e5D/0Gjbrv81/KFynza3uM/o9d9vNwcpqmY/+Ie9rlQ/iMWfcU24lrHSdj+tPP4hXR55fMREODp6XrFxU2lM2HjyHbHyYzS+rk/1l+yTiHKZnnwoe+qWaJ8d+Ka+rzdoQjdb7rCaPq3m7mAm+bCp7uVgtunn8Yp1TqS+b5axfuwr/365bdFldr2adcts+6KXDRu53/A2ZQl8S52ommFhBdWs5uR64nF5fqzlty3ExRiuOzdg1i8Zr//io6N0S/noxvQdTK3963p0/NKKXHt7z6XJHhHerlQWYDUDU3e67NfbsfjlbCqnr68PXdhUWi2neD8ntI7eYPop6mF6sHtTapffyq3nzR9YqlXU7vVio9c75olEffNk+TC9Cxbk060YSA2DKAuvQD7a57EKqFqmru+vpYnU7n67Ex7TX3TrzRuxuiv2AcbkNOevCa1/3HJpnLy6vuoVeWBn6EiVOsr4Cidw/4Vf4hEP/hNvO6VZz/Ajz5qkzc43LTdEvl7OszCvL85YOtOy9hbQvZd7VZ3dW3OU9jJst5tKQ+tQcM9Cn/5g3PjXJQfXdxdHz1VE6AltIX84eZ5cihJN4ZL5iFsXhh135o8+7/mhNVWiTdX/yRWUCXc279M8LpeI4h8GOnOrB/4ZGyEaC/sBPA9KH+ElD5xFwFhLPMqmjL45eFHG48CE+ilzH14UxD7yXOi7v1AF4edRyNJqqL/Vld+xcqra3aKwQzmyVniGhm8DJE335Gj/9qCyo5u2fzd21yNwPVFF2Gqc66cmxs0h2Ze7r2pAu4oHAUFNf/fwnR85O7T59bReiV7/Sp3sYKlXwMfKTF0P7y4oRfaYP8IjFyS1c4Viu+lXOQhxvTEGPYo2TrRYTvF3NH2b387U4LuqgJ3kcjpJI3XrrYTadX86uxCnWum4N7+LneMKKZPHa2JlmO2adunRRGei7mg3WMuZdpTZ/ph3h9bduxYAX4ewUaNHeNHd4ImTmuGiuZ8u49PUSpbWXT8e5LuxsZNVVdTgf8WDHnPLCrBhaS5Hxuqyk1P+SaR+9KmvX/lJXvBBmcf7pQaxQfqwa4FxOqvvDaD5UTKapzo414XVt+bAjKysB/rNWGvzZ5gq1EalNPbx4t3mk9sm5ju2zdy5LaMbcL+uCZv4gLvg8BJN2T3xqdzhiXuKU3d2uRE/iEXmo5DrTa4FC71ef4grnxTH6eJfAiy6RxaF9TCcxNjFX5t9Tlcd+ihEHzk8l7MaOMsX6QuNnOn80XqvxX+iwSxy6qH2dzmFqKEW+OTWhS902FsrlzZfjsslT7RsDSOsgCwLPz3beHs0UOzQMqxrVqZzrP8oFomWwPsWxayGdTaibHm1lyv+xchAryvwyEF2CzC6U0f614o2Lncvdd3F8/HAr4/Zhd17v/KzXlX2+rpp0PB2wEYj7cSMWE6cvRSrTfc0pbuQC2hZkYSXge9tZCnQIdsVm5yfN2+vNeN+14mJVWzfTVZZKBnW7qlTytTwSu8ICM7nHvJK+d2pXfv3lLi+a3fNrNf7TanM78l/PRqfN4u636WyxuYv8z9Hrze3q0bPvjo//9WzY2rpHQNvjjGgwdYRv4tbWVQLCjqHwa7d15FvlEABBcgRuQxXotv4DCs4TlCFkgW2vDgW0LRxE78PWp27rlW+VmCEKvXfh8yYWz23LBsBR6D1w6D3Q0ntA1HtQrPfAhroOrLcTJGfd1r53f7zZPDR1stl87pulU8jg6AHfd5sHtlt4TuDZdy+OCl6FQ1nlkK0qIVvJkK1yyFbVkK1EyFYiZKsUssfY06dNFtjWOnRwXboECA59oEMjLGFDVMfGqZidc0UX5Y1AVNvGZYEXFarcEJW6cVXvJuaiN4kq37guf5PZA0wgIzBOblD4+4zAFwyROThXDlFUsAlDlPjGVfabmEvAJKoD47oYTOaKMIHLwoRYGwWjpxSGxlIYuosxthgThM8UDcymIOU4RVvlQ2bvMb5rCIQLmVQZgoofmVwbguRMJugheBRRAqMqaJ2Dw5ZlPPvWYB/oW4bIt4yTbzln3yrKG4HIt4xL3yoq+JYh8i3jyrdMzL5lEvmWce1bJrNvmUC+ZZx8q/D3GYFvGSLfcq58q6jgW4aoaIyrojExF41JVDTGddGYzEVjAheNCbFoCkbfKgx9qzD0LWPsWyYI3yoa+FZByreKtsqHzL5lfNcQCN8yqTIEFd8yuTYEybdM0EPwKKIEvlXQOgeHfct49i2MDZpX5ORgUSQbI5G9LMhvapxcLYrS2kIT8LfIyeSiqJwutsh2F3XyvChq44tt2P2iShYYRfLBIL6vcHDEyMkWSVTeGJqAQUZOJRpFVaexRS7WqFPFRlGXbWzDtRtVLuCoxioOGrppENBSg4C+GgU216gKhw0NwGYDV14bGqwqXWPXjeI3h1T4b9R3DWnFiWObnUOaPDmqO4b0sRZhsOjA15XAsllHMTu2E/RrpOTWKJFXB4mdGsQ3mpJLoyQ9GhqAQyMlf0ZJuTPq2ZtRJWdGSfsytmBXRo08GSVyZJDeSwpujJS8OEjKiaEB+DBSKlmUVMGinssVVSpWlHSpYgsuVNS4TFGLRQoKui5g9FzA6LiI2W9RE24LMngtUOW0IK9kV9hlUfrGkAmHRbU+ZBV3xRY7hiw5K2rVIXvUkQRPBbqWAWQ/RSm76dB9tFJD5KPGyUSds4MW5Y1A5J3GpXEWFVzTEFmmceWXJmazNImc0ri2SZPZI00ggzRO7lj4+4zAFw2RKTpXjlhUsENDVFjGVVWZmEvKJKon47qYTOZKMoHLyIRYQwWj5xWGhlcYup0xtjoThM8VDUyuIOVwRVvlQ2ZvM75rCISrmVQZgoqfmVwbguRkJugheBRRAgMraJ2Dw9ZlPPtWOVg0LmfkXC6QdYHA3mXSG8XIvVyQ9mUy+JczMjAXlIO5mi3MNfIwF7SJuc4u5grZmAvkYya8FwyczBlZGQjKy0wGM3NGpeSCqiVXczG5RtXkgi4n17meXOGCciVWlHF0NYNoawbR1xyysbkinM1EsDZjyttMXIlDZ3dzYeeQCH9zrTYkFYdzvTokyeNcqQzJo4oY2JyxtQgUG50L2enKkaHTOSOnc4GcDgR2OpPeKEZO54J0OpPB6ZyR07mgnM7V7HSukdO5oJ3OdXY6V8jpXCCnM+G9YOB0zsjpQFBOZzI4nTMqKxdUWbmay8o1KisXdFm5zmXlCpeVK7GsjKPTGUSnM4hO55CdzhXhdCaC0xlTTmfiShw6O50LO4dEOJ1rtSGpOJ3r1SFJTudKZUgeVcTA6YxtnO6QAmVOlwTo9qAthi9bcTsphFyuYPI4w+xwg/AmE3K3gqW3DSI4WyHkawUrVyta9rSikKMVrP2sqOxmhZOXFUxONuD3iYCLFUIeZlg52CCCfxVCpVKwKpSi5TIpChVJwbpEisoFUjiXR+GxOAaKbjUg9KoBoVMVxD5VuHCpQQKPGohyqEFapUNldyp4R8iFMxVFh7ziSkWthDw5UuEy5I85MuBFA1mngPCKq+C83hpqA23IEPmQcTIi5+xERXkjEHmRcWlGRQU3MkR2ZFz5kYnZkEwiRzKuLclk9iQTyJSMkysV/j4j8CVDZEzOlTMVFazJEBWKcVUpJuZSMYlqxbguFpO5WkzgcjEh1kvB6FGFoUkVhi5ljG3KBOFTRQOjKkg5VdFW+ZDZq4zvGgLhViZVhqDiVybXhiA5lgl6CB5FlMC0Clrn4LBtGU++9UNHX2/WUs9ty5ZejorHAAoxBY7rM6clkoAsSsAsQMCG2AApBe/ocx8p2/L0MxQOF3hISKPlcAHRmINiHQFmHQE2dGRL/lrifmxbFndHFndHMe7OMe5OLe6OPO7OPO7OStydWNwNbUziyPozDluTuGWziyOcO4wO367XecEWDf6MwTJEETNOYTOuYmdiDqBJFEXjHEoTOJ4mxKAapsgWDuEtaJzRRCCKtvEc8iKluPfveMa4F8RxL5zjXriMexFF3IvEcS88xb0IKe5FoLgXzHEfOMZ9QOOMJgJx3AsXcR8kivvfhpC/8q2yT0Al0IBCjIHDJwMtkQVkQQVm8QQ2hBJIiaKjqc3l/VbpAaDSA0ChB8ChB0BLDwBZD4BZD4ANPQBSeuBo+52gXZ8OCol6k/vUlKUkIt2nRvYJXk4OOHe1EV1tRFfbuJWPua0cYCsPsM1H0tK8CIo4xras4QHl2FtJ7G/nyrdhjfI2r1He5jXK28oa5a1co7zNa5S3Yo3yVqxR3qY1ytu8Rnk71MT+sW3ZGsVR6QGguGxxjssWp7ZsceSLE2e+OHFWFidOSg8c0VbugVUAIt2DRvYgVADg3LFGdKwRHWvjVj7mtnKArTzANh8JVwAo4hitAgDlSNOksEGr0GCVO7KqdGQlO7LKHeHTGlBER1Yi2KuQRaej7XWGbQn0W7FseyRqtOepRnsaa7RHdNSgUPX2rIQfUCzV02D1p9nqT7PVn1as/lRa/am2+tNs9afC6k+F1Z8Gqz/NVn9asfpTafWn2epPq1Z/Kqz+NFv9abb605DVpzmrTytZfSqz+jRn9Wk1q09FVp+KrD6VWb054z7yrXjhrEfpslj4KpNQFyRQiZCqqoWa5MKhBlRDpOpyokZcWSRTkZFK9RZVSA8SKKNJpYJkVaQ+NclVwA1yxVILKhlSuUZI5pKOclsVdoZF1jw1+VbH2QlI1aZAjXb3na2CVHKNqIKBkEBeQqqyFWqSHYYakNmQqn2HGrEFkcxuRHI0piiCR5FAdkVqcq5fRsOF8wPbsmvmgOLlchPOwtY4bE3ilp3nOsKTV6Pxy4fLGsmUgoeTh1+GWBxbZywAgPAi8JaGt/YPIqL+197aj+pZRuOMJgJRYNTr7CRVQiTfbC9xwhe6KQYcMfVC9yDFbILgkUAhZFUFMrY5qwnjmjCpChRgUnOYY4NKsEUjDnmuWBlFDn+9YocGg59i+A1R4J2rkBf1LKNxRhOBKLTGc1CLVAlnkDmQRVznGHDwjKewvRttLzNsP7DfssnVkV24chQnWec4szq16dSRT4/OfD3grFy4cmJz4xaVwnwtEPXFOHXIuOqViblrJlH/jHMnTeCemhC7a5j6jDcIGFGf0w0C5qrP6gYBS9TnfIOABe4z3yBgzH0ODvC6KnD/o8pRiKqMRWwiIhIbcFyimqIT5RSjKFOkokjxKvc/XwtEMTJO0TGu4mJijohJFAvjHAUTuP8mxJ4bjn3+dejukW/FmxO/YicBxcc9nKdbGL9irwD5AxzOrC/Ahm4AsSc5DH2KW2XyQhTmLRc2U9axbY3D1pfQchI0m7EApUcEfkWjPSJEYU5Gy1wFXBktSxT6bLQs8CCw0TKm4cAVMSMamMqKmNSzHM9xRl/yH05yKx42tUgepPCmOAxg5DSKUaShjKIaz9giD2rUaWSjyMMbVR7jqMaBjhqNdvrCC8lp3Hd94YVqclYZlXGFf6nsZ1Jpz1lR/dKHQYeXXiExkFJaoERJgZJKCdRzQqBK6YASJwNqnAqoxURAhdKA3rMXlFKg/p59bnAmIz+W9Ivcw0S25WGvvHs+qOV1QRhxQzTcxmmsjauBNjGPskk0xMZ5fE3gwTUhjqxhGlZ8R5gRDWjlHWFSz3I8xxl9yX84ya14+NT7tIMUL7LhELJCI8kyDSjLaly5TR5ebkGjzDIPNus85qzHoWeVMoDkT3WF8iHJKi2o0Vl1xMZV5Ut1b5Pq33DmsJwTyF6hg9RxRknjAqWLCypRXM0p4holhwucFq5wQrgSU8E5JUF4wzYxGvjaG7Ysn4nojgX7Iv52ItrxoMq3UAetXN2B0TREg2mcxtK4GkoT80iaRANpnMfRBB5GE+IoGqZBxKt9jGgIK1f7SD3L8Rxn9CX/4SS34sFTFwAHCU/SjwjR2KWTdOZq7NRJOks0dvkknQUeOz5JZ0xjh28mMKKxq7yZQOpZjuc4oy/5Dye5FY+deop/K/02DNv2mfLfcMQAlcECFMYJeHpO/TccHUA2MMBsTIANwwGkjISj/gkt648/oeXIntByJB4s73l6sLyn8cHyHtHj4z2jx8d7Fh4f74k9N2QoPrW4IX5BqN+KF7t6ZHfOAeVLXD1PV7e2FG+MO47Xu3pEl7p6Rle5NqyNW/mY28oBtvIA23wk6a61K+IY/f60o3ixbYP4qcX3I3wvod+KGdUjkT49T+nT05g+PZLvJfQKJVbPKLF6FhLr/Sg9ffZhhM+r9FvxIZUeiSdTep4eR+lpfAalR/LBk16hp016Fh8x6VF8ruRDcNUP2VA/1Lz0wzBwvp/Pub+fK/39LPv7OfeXBw4U0d/P9NTpBxg4J735H5etje8f2tYkbsVH+D+Qqw+0XESD0TdEITGu4mJiDo5JFCHjOkwmc6xMoAQxTlmSL2o6onzZeVHT1M9535w+xnfFSiSSSZVYVVLK5FqsUnKZEDMsXLeNGTLOSTMRiLJOXaQdpHLnC1LPEIXTuAqniTmcJlE4jetwmszhNIFSzzilXuGQeoYo9Zyr1Cvq57xvTj3ju2IlUs+kSqwqqWdyLVYp9UyIqYdvRB3HDBnnpJkIRKmn3ogqUuVJTRY4tN98UpObiDDvelKT1UrIdz6pyTKn6q4nNUnFtNXP9lRUmcKhzefaZ6Z0juq3Y65SOzbYGfNamsdGu2OeUz7KlPjpoadjlaXjWvpOqgIXRPWhp22DbrjhxbR+y57tcRRfTOuReDGt5+nFtJ7GF9N6RC+m9YxeTOtZeDGtJ/HFtE9DNe+/tC1bkDuKC3LnuCB3agtyR7wgd8UX5M7sdRBHdlpnyE/p+q34TFWP7EsgHMWX3p3jybtTe9Xdkb/G7szj7qzE3Unpgf/hRTuHs/Qt2Z6qOoldanIv7VQVUcgu57KX4VQVGufON6Lzjej81/X91yYe0iwM3Syn2MxPwoy1YRdt7ntb6Sie8gK1MnJEeQmKF5izkpeArJoM2YmiF9giDOkiXgXqURlERGFKcGHZ3M5y5qzCMaxyrFaVWK1krFY5VvzsNigiViuRF6tUFE+hD/6dV/2WebGj9D1XZVpFF04PujEnP9YPurGYnTk96MacPTo/6MZCdOv0oBtx8O10GsBcObg6DWCJvLx2GsAyu3o6DWBO/l44mLwhym3jZPfGleebmC3RJDJA4+yCJnDKmxDz3jDNCIVTcTsOc0PBIhI8SxinqcK5sAYT6xFSM4dpleilOcSEWvR4Nil8lrOF5xXjPLkUoc275WnG+K4giQnHJHJS49pOTWZPNYEmIeM0ExXO01Hhi5xKPDEZp9nJuZqiiirmqSKt8mHyjGV8V9jF3GVSJeyVWczkWtjTfGaCLu6n3GuY3gzRHGdcTHTp6eYyoPrpZq3y1Lfj6WbdREyD+ulmraYpsfJ0s5ZpetRPN0sVp0p9wUKrctqsXrDQDXgK3XnBQjdK06m+YKFVnlqDihNsFLggo8qTbVTllBubiGklNuAJJKppGolyqtYoU81GkafloLKjkRin6Pgya+0D03QdVZ60SVX2GJt8K9JyGo8tdo5FntKjvHss0vQe1Fktb9NUH9U04Qe5rX1cmvyj+u1gq4VAbMDzUlQrs1NslOaoKPMCIaq8TAhqWiwEdVFL7bRwiCovH0iVi4jQRi0lQoNVrUNpWRHVbw+oWmLEBjsHtLbciI12D2heekR5l5k91SKGi5Eo8JIkqmlh8nlYjZw8t62yB0BlugAUYg8cPgFoiTIgixowCxWwIT5ASg04Ks59bMRKYUD4cssJIepwermFueq6ermFJQpCfrmFBQ4Hv9zCmAJTOEWnYA5ReofkRHEKln6HRIoqbNV3SKROAay8QyJVDqV8h0RqFNQgUmSDxuGl9zBOMqXQqvcwhKTCWnkPQ6gUUvkehtA4nOI9DKFQKEGiQILCYcQ3G04IUQDTmw3MVejUmw0sUdDymw0scLj4zQbGFKjCKUoFc4jECwQnWqGA1V4gqMgqfDteIKi0oGBWXyCo6BzaygsEFZUCTTLFm1QOe3js/oQZhTo/dp8EFV752H3SKKTisfukcBjTY/eJU+hMoKAZ53DZz19AuJxRuFygcLmgwuVqDpdrFC4XOFyucLhcieFyTuEygcLlv8NC4Rq+pR+CVQiFqmAKVMEqTEXLQSoKhahgDlDhHJ7CY3AKpdAMmAJTfvohhuVsCMn+9ob+GcYDmT3kDCxeHAIBLwkBtgtBwPzKDkA/ewVYnkgFZFd2nG1+DOHQema/gwAonm+54L9+0G/ZywWOxG8e9Dx9O1JP4y8d9Ej+yEGv0O8b9Cz+tEGP4q8abJBfv+q34ulej+ySpyNx2tfzdK7X03iC1yM6YesZnaX1LJya9SSefp+N/IoSkm3i7h+8Kqgf5ec2Vv41o8DKaXZg8UlqF8Kj1IDxq0aB+zPWzuBRaofwLLVBu8SzPRPdoM11ncMXtmXnnI7iY0vO8QTUqT2g5MgfOHLmTxkZa+OxtiKybS2KrY5iK6KVvhAVJBVI/0pUYP5ugzF/wN5rAi+XeFat4lauFHU1pOeyLFa5LPTFjl4RBcOXNXoWCmZcvHn7yP04eDMw82ZgcchAwCEDbEMGzMcFoCc4wOLNgGysnPU3IXwrvvgwTg4LPL34MEaHBSRffBgHhwXmOWYovj4zHhz25Ni2bLHgyBYKjuIiwTkuEJza4sCRLwyc+aLAWVkQOLHFgKFSC8dA8JWg8WCw/hdN7qXZKyLdy0b2Mngr4Nz5RnS+EZ03X9262XiE18vHo3SRfDzKV8bHgwW+sL2aAwKKb6Q5xzfSnNobaY4oL0Hxd9WclbwEZC+mGfJr1TaIaHw+2P6jOGM0PkDip3DGZHxA4w/gjIXxgUI/ezMOxgcs/NjNhmwu0J74Vlyj9ygttifFL/d90zIAmPklsOg8IKD1ADbvAeYWA9DzDWDxS0BmPM76p8yPbSs+mztJfgk8Pag7Qb8ExI8uu0I/pzFBvwQUfyxjMvjlS98qRw2oxB9Q6Ahw6AjQ0hFAdrjALPTAhsgDKT1wFNcOk+SXk8Ev9/f3bdPzzJktSJHFPHMBrQQorkehtVmMIzcSZ5B8BumG42SEq9HJKK1GJ6O8cJwMrgm7bUUE2lpvw8IRsFeVM57SQYKCc2iTOjAvLmNkn5ORWjdORrhunIzSunGS7BN4WjdORmndOBH2CQqtGyejvG6cjHjdOLH7GeAn6WZNEtgW9e2apAqDTDdskpCsMt+ySQqZZrppwwLYZ35BkbgyUvmCIklkqdUXFElmc80vKBInmy0cvNYQGa5xcl3jynpNzP5rEpmwcXZiE9iOTYiebJiM2W/GhQrle3SEseqNsVWZwI7tgjIyU7N3uyQM3ERyceNs5SYkPy8Km3rh4OyGyN6Ns8cXoRWfl9zehJ2RUr5vGpu/CZUZwPQ0DZjCc4EJPCGkW7oURzE1FGklEE0SxtVMYWKeLkyiOcO4njhM5tnDBJ5CTIjzCN1xLQarbrkqjSeU6k1X1UBMK+q2q9LS5CJvvCqRphh161VoMNEgpbkGJTXdoJ5nHFRp0kFJzzvYgqce1Gj2QYkmIJBgDkJK0xBKNBOhpCYj1PN8hCpNSSjxrIQaT0yoxbkJFZqewr34YBTiLn1W0IwQs8+ixrNV0JQNY4M8ZwVVTFuo08yFEk9eqKX5C0SewkCCWQwpTWQo8VwGWqs/Ps1oqH0rmmpeQ5mnNtQqsxs2SRMcijzHocbTnHosJIdbTHagrjSlKQ8lNeuhnic+VGnuQ0lPf9iCZ0DUeBJELcyDXcX2P7u8/a2Z4myIBkdDFB5lAg6fArQ8iQLI7vsDs5vbwOC37AeCPxW9Refd1vmoXNU+x+E/MrQZ2APfKgMKSHzD0jkNIND4DUvnYsBAoW9YOg8DBCx8zfn50Mntb90M5pp+K+Ioq0XaXiTtwtA/KLrdzeXF8COsjprwOQ0mwIDKiyuIOAEGTglQqBsuYsyLAYW8GFjIiy27gunGSfcx82a5nNlMfjXY64FttXHL0sCR+P2oKzJBoPGXoq6E5YFCvwl1hQYHKP760xXms/eV8mB7afmKUmCbAdd5D9elpplXnhjfquX3RmDL5hVHOFv0dFaGrj/GWUiwLcrZtOWcTVsa0maLYtpsWUybnt2UtYhvxft0N2HlASjfuruhdQbScJ/dcLyjdxOWE8DoC8tuyqx+bFsx6Dd5DneeBuMmzNiO5G933cT52Vn8Sc+bMBsbWsetfNQ5VW7yWzVDFCpv1WiVRnDXWzW6SR7XHW/V6BY02rW3arTMOZDfcJHx4szY9YaLbvKtEeHU2f2Gi27ECVV5w0WrlGb5vQct7AxMzsNiJdv1wx1a1oBwTiwo7BQEXLJsURtsqS3z8XYrG6QhaFXxzMihvfRSpNA2O6whaEUPvD5WFfgbYdTOoF350tzHjKAVBpaQtyqTWFo6bWfHKEet/MW8uSqPSm/3yUK0I1bjd6iyKuyImyQ74gbRbFgls2GZzIbl8GWZLMYnSnpVB2tHpHaE6Vsx2h2gHdHZFZpdcakH5dsRgf9/d3Jo6pByI//60YiHFbvSQsqKXS70ny3i2U/UytwptfB0qWjhD+5FHC9mRK18oNS6mXg+n9bU+LCraHE/vegv5Bwl6dE60AVpdLEZsJe2FZ+s6ZEtKQDZwQEM18AWZQ1jepN33eRd0xLFOeY5UFyMOI6vpi/issMZPTO0YZ7a/VYszB7F0LtATy1tkM/0/VaciXtkAQAU9+9CnP8XZTVkh97mALeVaLYymm0OW1rWuCIC2sYX9hdh1WLoPoTNT7SeG/s9tPcprlQvJq0h6r1xyjHnnMP6jqNhsW9O6Xy/kbkYDnW3MUk5zdPNRuY8PuJmYxSuc5w5/43LIkg3LYdKKBwS3RDVhHEqDOeqOkylEgl3OmNnuVgq9zlJrA8R1071JifJtVHiUsp3OCO/z8OQKqsIv+c/hxqz72XyVoYoaMYp351zjfGXPg01hl/6RC25xtKXPiUuBlB96VOSco2lL31izqOXv/SJhOscZ64x47LG0rdHDTVWONSMIaox41RjzlWNmUo1hl85RZ3lGtNfOcVifYi4xmpfOcVybZS4xtJXThG/z8OQaqwIv+c/xxqLX68CbaPAAYwqVwCpqfbkd7qUCsxXn9RfpWqsXH3Sqhr2+tUn3UBUaeXqk1RTLtSuPin5ujaCqYajqitZf11MqeegYpVGgWs7qlzhpMo6j2242vPVOBWoVPm7rsbJJt9KhOQFu6/GyUa7cyG5Q+VqnFLva8Oc/SLIv9d26N4xnNj1Fxm2l2qMlKATtq+0iji+HBA1fEEgKvaSQMT+OkDk/kpA5OW1gEjtG6oC/jQqr3MasRNnwuIV0CJuvk37KOx3nNpM0mdPdEwnKUDdAMFPCvVb8XpPj6JN9Ehc3+l5uq7T03g9p0d0HadndP2mZ+G6TU/i9ZpHmBS8T1Fvcp/ojsNjNnrnsk/ihsJj8HFHoqt8v+Cx2JJv5WPmFx+NywNs85Hktx5NEcfYxvfRHoN9GDJreNGjpzQcT6FrT7lrT5WuPcmuPeWuPVW79iS69pS79pS79pS7tk5dW4dMW+dMW+dMW1cybS0zba0zbZ0zbS0ybS0ybT3Ce+prHA5A4p76moYDaLynvhbDAQrdU1/jcACK99TXYjj4wscwJuHCR2zJo5MvfDAX4yQvfLCURyxf+CDOYycufEQBRjFdHmCuxlNdHmCJRrZ2eYBlHuN0eYA5jXa6FjAMuXh2cRh1fnYxteexl08uCklkQOW5RaXmPFCPLQqJs0E/tpg0yAn1MKGQVGZUHiUUKuXHjgcJRQvOEvUYoZAoV9RDhF26/Os//w8s8zdF"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Times-BoldItalic.compressed.json -var Times_BoldItalic_compressed_default = "eJyFnV9TG0myxb8K0U/3RjC7NgZj5o0ZZnYGz5pZGyH3bsyDEA3oImhWfxCajf3ut1Xqyjx5Mkt+cbh/p9RdlZV1qrrVJf5T/dg+PjZPi+r76urvy/nortk7PPpwfLh39P7DyUm1X/3cPi0+jR6brsDl5LGZf/dDO735dTGaTsYbdTmdorq3UfdUHj1Opmss0MFhM7m731xwU7Y73pY+fbqbdqW+e3vUkfnPk9fm5vfJYnxffb+YLZv96sf70Ww0XjSzL83msz+9Lpqnm+bmc/s4euqr+cMP7Wv1/b++O3jzZv+7g7cf9k9O3u+fHLz9Y78adGVn08lT83s7nywm7dPmSl0xFS7vJ+OHp2Y+r74/6vhVM5unYtWbNwd/efPmTXeNT+1iMt605Mf2eT3bNGLvf8b/u/f25MPR/ubf4/Tvyebfkzfp33fp3+O905v2utn7sp4vmsf53q9P43b23M5Gi+bmL3t7p9Pp3ufN2eZ7n5t5M3vp6DaYk/neaG8xG900j6PZw157u/fb5KldrJ+b735puk+d/m1v9HTz13a2N+k+PF9ezyc3k9Fs0sz/0lX3p+4yN5Onuy/j+yZ1QKrFl0X3kdHsJqtdwR9Hz7/0ffL+/cl+9TUfHb4/2K9O5+NNpGed+OHdfnXWyHEX4+P96svi5pdhV/Yg/feq++/bg7fb/vp7s5hNxl1E//Wfavi1+v5gE9lPXU3mz6MukP/d3+J3XcwSbl7H09Gj8KOjoy3/97LtQnU9VeVNf6Kn5eP1pqfunrx2006no5nwD+/ebflzMxtvMj4Lx8cftsLosZPmXXi0ZvkzqQapy732PJo1T9PmtiTZj0n1RvPNGecPqhz3yvN0ORcqMRt3A3XkL3G/fr5vnnzxrimTVltykBs5n47m9742fzaz1tP2qfFwsQpKLu5nTVD2tl3OAjp5CcrOJ68BbF6aoG+bOKZPE6iwhGjcTtsnj+fN48RK0gPTjQ842vx7OZp6fDdrupEcNPPfy2aevEZT8KDve637+/fHW3bq0Q8e/ahpe9Cf7MyX+smjn/0H/+aHwC9+UP7qG3buT/9R0du3W/Sbtjuf6+++Ep88uvDn+t2X+oevxGewjvdb9MWf69Kfa+DPdeVrP/SlvvrT1x790yffdTeZPTQLYxsyRq87zY5T/hx5yrF4yngyGU9m4+Wj77XlxrXn3dQTDJHkb6Yy6lMeXQs6PDzsx1jgv75UcOVb/8E73433PkgTj/7Pn+vBl9IhLGn/6K8YmE5ge8/BqPdDaObR3Ndr4Sux9CF88Um48pV49R9c+0r8qejwg+aXTYSDg9zrMJna8ruycTGZ3hSn+pt2FcTZzM46EyzSQk2T421u/+1mYYg+K59ZR3PH7bSdTQI+bwpnGS9n3TQ+XvsuS8NmPklL18D+t6uWeFjdLSed8tgu4pXDRk4n/oZMoc+JczsJWLB+6lZy4XLgZnR3F01pW45LMVpwbPqumTU3/qPdWmh0Nxs9g6nlj153dxFN0EoN7/VoviPCu9XC+ks6wOrdXUGOzXQ6eZ5P5oHUtXVx3y7NWtFN+ya5tedmo5fABkfj5SJauiQvv502r16jkZXx42g8i5Y717MmuvBNuxiNzYhTadL1JAZAlBmOQ61sc9OFNFqjLp/uRrPl43S0DC7T3nXLzIfgdCNsB/TLo8nZk2xwp7rqOXjf53w7u7ntlnlmXagLFDvH6vrDcrnAhV7gncwJs5vHzueWU7yCnGmkTDzjZjPk5/Ng+poW1uZtoZ5tkPTd6OxuiLush16TlZzrUJ2Ybf7p5G+zRiemsEv1dLbvdG3kaiCTxc3kZXITdFJta6bL5WBoaLXth3SdF3xIJ0gagzJVpzsvGiTQVH9KvZ4ZKIp9GKTmNBr0M9RD0hP0Ab0HcBfRO4bOIeAWxN5iUkOPD4+z2D/0CC5FnqOrQpsH2so4Lp+iCujwKOWotVRd50dn0xup0tmsrUI4vVFqhphmAidH1MWrvfrhSR+waftn83QXXP6zvYTew0WN1OTYOUgCUYcXTyOylrUVga6mturdj4+c9tF9OwtadUFX1zAURsEXcok32WwLYRvQBTRidmozjzfmy7TGmQX1pRSUKJY42Wo2wcfldDF5nq6DelEDNcltd+RE6lZbi8loejO5vfV9tS5bwyd7HU3YXcny08402zHrlKVxoaOfSjZIHQqeEo/NX+lE+PCtWzDgEzi5AZq1D80T3gaJOc6au8ncLnx1iNLKS6djPy7kXmTZjWpzN6LBphWkDMyCobU8lmRcFlLqn2Tahyd55Zqec9mnYNLKnxb3vq4/Fg1wGvnWu7xsWxRMpinOjqVZ8LS0fNiRlYUA/1kaGqVKXZR6pDT1lDx3XrpyeRxf7FyW8IyZ1wXNdBE87lkYk1ZPXLU7HDFY6b3PJhe0xNZIQxWuM3UsUOj1PtWucI6P0Me7BJ51iQxVk2nE3cJ8OMj5OgonpI/hIkPuMGzH6T2MfKkTmWJ5ofFrITV/LY3x32j+y3HoonY/msKztzzIN7cm9Jxb+iJyefFlu2zSVPtGB9I6SILA87Pc31gzxQb13Rr16iic67+E613J4PgWRzKss4noG4+2MOX/WKjEkjL/UOz8ZjKOjPasMKHNdrbmk+0frW5huft5d17vXFqfFs55WjTp+HbgovDs8M9g4tSlSGG6LznFQ9iUN9mrzEpAz7ZzKNgq6PPdnVeatneb/n5qg0dVrTdTSR8v5QzqTlUYyXfhTYM8X4GZXGNeSN+ncB6H7w/dFKGeXxrjPy0330X+sV99bGZPv48ms803yP+qTjdfVVf7370/+mO/P9q6h0HbelrUmzrCv22O3sjR1lUMwoahcNEdHelRrgIgSA7DpasM3Y5/g4zzGKUPmWHbp0MGbQcOon9sjqT1l/YoxwyRab0KA3PWgW/9oND6Qdj6gW/9oNj6QdD6vPAzLNkJkqvu6ETaMOyOuqk4H9bd4bEe5SYBgqorhVcCOnyY8bI7eieFlvlsgEyAgMNVgOYAAaIAgSIBAiYBAtYHSMmLacPKHK3tkcRHEcZnS/tCOF4F0aAVTiNXOQ/frMAYFkQDWXg4mrMKQ1oQZbbwKL1F9DkuEiW68DjbReaUF4FGvXAa+pnD+M/oMkDkBMojO8jqwF+OjUH4rvAFFiFSIXwFsxC5FD5nGyJY78gYDCQjdJHMwEoEkZ8I96aSpchZsgb2Iog8RnhkNCJ6txGJLEd47Dsis/mIwA4kgrWhjF98q1cerQNE1iTc+1NvE+hPgsifhJM/KWd/ygr4kyDyJ+GhP2UV/EkQDTDh0QAT0Q8wkWiACY8HmMg8wEQgfxJO/pQ5+FNGlwEif1Ie+VNWB/5y7E/Cd4Uv8CeRCuEr+JPIpfA5fxLB+lPG4E8ZoT9lBv4kiPxJuPenLEX+lDXwJ0HkT8IjfxLR+5NI5E/CY38Smf1JBPYnEaw/ZfziW73yaB0g8ifh3p8wNGhSlpNTWZHsikT2LCODcVlO7mXF0MJMEfAxy2k0WjEakraEH5dWp8FpxXiE2jI8TK1KVmdF8jsjgukZflniZH8kRh5oigwK9WA3tOI34x/4otV3xb/gkLbMzvg7r7SqNUyjgWsajtZpBPBPy8lEreid1OiRnZoC4KmWk7FaMXJXW8JbrNXJZ60Ym60tw45rVbZdq1rvNdpLIU6rAl+XOPmxFb0pK0FLRkqGjBLZsZHYjEEEK0ZKRoxSaMNQAEwYKVkASpEBoO6HP6o0+FGKhz6W4IGPGtkuSmS6IIHlAr2MKdmtkSKzhQKD8OpstCh9I8qByaJajnLBYLHEjig7c0XNWisoYKxA0VYBg6kiJUtFyRsqqJGdggxmipSsFKXISFH3NooqmShKsYViCTZQ1Ng+UbPmCcpLGJNVSNcxJdNEyVtm33r0S0FklsLJKZWzTWYFPFIQGaTw0B2zCtYoiEas8Gi4iujHqkg0UIXHo1RkHqIikAsKJwvMHPwvo8sAkfMpj2wvqwN/OTY84bvCF1idSIXwFUxO5FL4nL2JYL0tYzC2jNDVMgNLE0R+JtybWZYiJ8sa2Jgg8jDhkYGJ6N1LJLIu4bFvicymJQI7lgjWrjJ+8a1eebQOEFmUcO9Pua5oUMrIoVQgiwKBPUokMCll5FIqhDYlMviUMhppKkRDTVU/1lSjwaZCPNpU5+GmCtmVCuRXIoBhCbuMGFkWCJFniTwIrsmupcLOWAa+pVoplgXnUr0YS+ddqljzEg7uJQztSyD4lzIyMBW8g4kWWZiI4GHKyMRUiFxMVW9jqpGPqRAbmersZKqwlalivUz4S9D+VcDWESM/U8EbWq4YGpoyMjQVyNBAYEMTCQxNGRmaCqGhiQyGpowGoQrRIFTVD0LVaBCqEA9C1XkQqkKGpgIZmghgaMIuI0aGBkJkaCIPgmuyoamwM5aBoalWimXB0FQvxtIZmirW0ISDoQlDQxMIhqaMDE0Fb2iiRYYmIhiaMjI0FSJDU9UbmmpkaCrEhqY6G5oqbGiqWEMT/hK0fxWwjaG9YyYxYQFbvdVm/W+UqANlQmaWMVmZYDayXgAby4RMLOPQwnoRDCwTGnIZRwMua364ZYUGW8bxUMsqD7TMybIyJsPqMdhVTy49IasSHBlVLw7cldikMt4RscCgshJHrGBOWS1EzBlT5taWegqm1BO0pB6BIWVCdpSxN6Neiayol8CIMiEbyjgyoax5C8oKGVDGsf1klc0nc7aezK3x9PTFtXXlyNoTWkFl7NdP/SBAvxFEhiOcHEc5W05WwHMEkekID10nq2A7gmgUCY+GkYh+HIlEA0l4PJJE5qEkArmPcLKfzMF/MroMEDmQ8siCsjrwl2MTEr4rfIENiVQIX8GIRC6Fz1mRCNaLMgYzygjdKDOwI0HkR8K9IWUpcqSsgSUJIk8SHpmSiN6VRCJbEh77kshsTCKwM4lgrSnjF9/qlUfrAJE9CXf+9ENHT7ujgyM5yp8FlL0EkAkpcLgC0BxIQBIkYBIfYH1ogOSBrWiQMlCOcgsAmeoCh+oCzdUFRF0OijQEmDQEWN+QLTkzcT/zcT/zcT8rxP0sjPuZj/tZEPezIO5nLu5nPu5nvRkcSXs2PnAoR7XRamuDZzTue9qbLkZGEIVHOMVIeBQoEX20RKKQCee4icDBE8FGUDCFMfMrHwYIaEa1L8WhFR7EN21itPHNiOObOcc38zC+WQzimyWOb+Yuvllw8c0CxTdjjm/Pr3wYML49qn0pF9/MXXx/7kPbT4Y/Y1iR5ZAiI4NSwTiUYrUoZeBECsGKFIoXKcphAzaSuT4d5aYAyi0BZBoCHNoBNDcDkLQCmDQCWN8GILkJira/cdk16uAkI2pjE3RQkxd/hhU6qIk7CHbdWh50XBN1XBN13EQyNh3lugMy1QQOtQSaKwNI6gJMqqKsldVaOrJru4RMTYC75V6iuSaAaMoFReoILN8GAMr5oKj/EVOTEDMzfmd2tCck9wKA7G1AEs6Ns557Uz33fnpesNLz0EXPvYGeB955HtjmuXPMc2+W5/2gP5T2jGyKneOgBxRk3TkNeqA2687NoAdGWXcOgx5IboEiGfRCrN74NsmIRxS3qQnbZIY7YN/UJmhqEzS1tUe+zm2hgm1YwdbXhAcYKEEdZYAB8rHXASZoaQosfUOWhYYsw4YsfUP4fgyUoCHLINhLk1cfq+2TkHd6ZO8sEwpuKhN395OJ2lvJhMK7yKTQDWRiOfyAcvgV6VD+iIkOKCc6Im8/HynRkUKiA7au9NEkOjBypY99osORr3NbqGAbVrD1NeFEByWooyQ6IGuTH/usPpC4S1YDsrVWjrVWKrVWxLVWRWutTCOrLPu9kLU98rVe+9qZqQ7HBQk0REiNRgsV8QOHCtAYIjUeTlSIRxbJNMhIpfFmVUgPEiijSaUByWqQ+lTEjwIu4EcslaAhQyqPEZJ5SFu5LQo7wxKOeSryrYazE5AamwIV2t12tgpSyTWsuiyNMPYSUiNboSLfGsNsNqTGvkOF2IJIZjci2RqTFddFYWdgvHP9Vm0f7b/9IEdyYwfIrORV2DwveHecj4bmqLZH4nyK0MuEmsfZ268OfusbrIXW/mxrfzbcc9/X2e25dzxqKW5Ip3MPPaoDRPWN9qOTFMUBt2FTcY5ItA27l2xKQHBIoBCxGgXKlrkqXXNYEuqiQM0j9VuNjILpB1T4UQ5seUD1BXq7w8AKopAqj4KZ1St/7qFHdYCo6sLLlY4ClbW1L87BEe6u8Kna3vdvlwXpyK6FEsp3zYCCNVHibiGUqF39JESrmcToO6bEzNdLidilzKc8pE4DRG0RTg0SHrVKRN80kah9wrmRInBLRbDNFUxtxi8bGFGb3ZcNzKM2R182sERt9l82sMBt5i8bGHObzQg/LQrcfqtyFKwaxsIWCSJiC3BcrOqiY2UXIytTpKxI8cpfnJ4GiGIknKIjPIqLiD4iIlEshHMUROD2i2BbLti2+aJv7qEe2Uc2F9hIQMFTnAtqGlD7FOfCNAgYPau5gGYAsc+hLvoZCo7s470LPy+poN8TXfSzkR59NSVro9HXRBdV9A3RBRrtISEKszNa5lHAI6NliULvjZYF7gQ2WsbUHbhWZUQdU1irknrl4zn06Kv/YO1LcbdFy9deMtu5oQMtp160InWlFaP+tCV8p1qdetaK3L1W5T62qu1oq1Fvux+eCDn1+64fnoiKXBV6ZVjgXwvnqQvlOSuKv7/Q67BpFRIDKaUFSpQUKEUpgbpPCFQpHVDiZECNUwE1mwioUBrQZviAUgqUN8P7Aldh5Ich/RqeoQ7LcrcX9oj3at4GCD0uiLpbOPW18KijRfS9LBJ1sXDuXxG4c0WwPSuYuhX3+DKiDi3s8SX1ysdz6NFX/8Hal+Lui7bE9pJ9xoVdyAr1JMvUoSxH/cplfPdyCepllrmzWec+Z912PauUASRflhXKBydHaUGFroo9NiwqX4tnq4uf4cxh2SeQ7JmD1FFGSaMCpYsKUaKo6lNENUoOFTgtVOGEUMWmgnJKArNz1jHq+NLOWZavgugOA/Y1+GwdlONODTeY9lp+ugO9KYg6Uzj1pfCoK0X0PSkSdaRw7kcRuBtFsL0omDoRn+Yxoi4sPM0j9crHc+jRV//B2pfizose8PUS3qQfEqK+czfpzKO+i27SWaK+8zfpLHDf8U06Y+o73LrAiPqusHWB1Csfz6FHX/0Ha1+K+y56038r/d5324cjOcqfBZQ7C5DpJ+BwBaC5dwBJxwCTPgHWdweQ3BOK9JWpdGRzLiGbbgkFmZa4S7JEbX4lRKmVGGVVYiahErG5tEH0nuQGNaaTGtulCdnX4rbIb2pJPOx488U0YLvDJSHavZIYbVzZsM2XzUfSLfINMyBbQeVYQaVSE0W8zUYVraMy2ZukSLYlCeKXEv9R4Y6GdGR3NCQU7GhI3O1oSNTuaEgo3NGQFNrRkBjtaEjM7Gj4XG1fDjnUIzsQEgqyPnGX9YnarE8ofNUrKTQeErPvrCVkk/9z76Hv9CinNSLjnCoMzHkGvr2DQnsHYXsHvr3cS6AE7R3Q+P8MvaRkY/Xb7+E+9y6vR7U9krxThPm1pfmRGfS+IAqJ8CguIvrgiEQREh6HSWSOlQiUIMIpS/AR5jtClC+FR5ikDvy5OX2E74pVkEgiFWJVSCmRS7FyySWCzTB8SksZMvSoDhBlXfRItpfy91yQeoIonMKjcIrowykShVN4HE6ROZwiUOoJp9TLHFJPEKWe8ij1sjrw5+bUE74rVkHqiVSIVSH1RC7FyqWeCDb1cC8VZcjQozpAlHrRXqosudcicyXi1yJjNQxw8bXIuAAHe+drkXEhF/j4tchY5YR17+C8CwVO3l3v4IRlBqVrunS26rdjHqW2LbAz5qU0t4V2x9ynvJUp8d3LSWGWDktCXRR4QBRfTtoW6Lo73dBtV7fpyK7CE8q3Q4CChXnibmGeqF2YJ0TL78T0FkFZ3tauxK7IL/vRrO25sDG4dOMWeBgQGaGAePWtiq6+leUBCEj26wlK2/UO5CjXGpBs11Nkt+spx+16SmW7niLdrqdMt+spy9v1lMh2PUHjdrrd1nWoZHtjqmXsJxrfSrkvRRS30tyXAoX7UigsSadIk05Z0Pj79fN9Y6u02cm3fX0sHdmXzRLS1ziEbe5vTyRL5f4WULD7MnG3+zJRu/syIcpLUGhfZmI5LwHZTZgbJPe32vqZadbMt1723CGyU4II8+Zx4jNnacos/SXoVyGUuxf8EpXXcBTxjgNV9N0cZUF/yu8+CFmZo7U98m3wLyPmaRVd2L3Wxpz8OH6tjUXvzO61Nubs0f61NhasW7vX2oiDb7vbAOaRg0e3ASyRl5duA1hmV3e3AczJ3zMHMxREHiic7F545IYieuMXidxfOE8BIrAVimAnA8E0I2ROg1uxmRsyDk7As4RwmiqU74hQMGmo5GcO0Wj6EM5ziAil6PFskjlMKYLIMoSzGWUBZhhBNM0Ij+YaEf2EIxLNOsLjqUdknn9EoElIOM1EmfN0lPnMR4MnJuE0OymPpqisBvNUlpa+NM9YwqNpS8TyfMATmPB4FhOZpzIRSilEk1rGK4/WASq0Opro3LvMeTaI32WOVZ76drzLHBcJpsH4XeZYdVNi4V3mWKbpMX6XOVRxqowfWMRqOG0WH1jEBXgK3fnAIi7kptP4gUWs8tRqVJxRrMCTiFV5srVqOKHYIsHEawvw9GtVNwlb2U0mVqYJ2Yo8LRuVHY1EO0XbnaNFYWek3aRN6jcjHU3gVCCYxm0Jnsyt6qZ0K+/uCze9GxUneSuwc1rVubXdqgrTpBV48rdquASwRYKFgC3AywGrFhYFtpBbGliZFwhW5WWCUd1iwaizUjzdwsGqvHwgNVxEmDLRUsIUWJY+6ZYVVg0XF7bIt2Zit9CwamG5YQu5RYeVdyczL0CMuCoJ66KwM2J+YTLoVyOHR3Ikz6MVyRshiuxzaeX4MFqpPIFWpE+UleljZGX52bESeYS/RWaXCiFqi9+lQjxqVbhLhSRqX7BLhQRuqdulQpja7Hd3RJxaX9jdEYlRHMq7OyKdIlLa3RGpHJt4d0ekUZR4o4OnFKFwo4OXouiUNjp4lSITb3TwGkcl2ujgFYqI2QVAiGLhdwEQj6IQ7gIgidof7AIggVvudgEQpjZHb8/HCkWg+PZ8LEfx2PX2fFyColN+ez7WOValt+djlSJnXxtnRtEKXhtnIYpQ/No4axSV6LVxVjgS/rVx5tR6+bsMpxGj1qtArVchar2qvvWqUetV4Narwq1XxbZeObW+/5H4U0+o5RlTuzOOWp013+asUIsz5vZmzq3N3LY1U9vSq76VH/TIvtV7ha0DFLzVe0WtAmrf6r0yrQFGb/VeQSuA2Ld6N2jzo/rbVxvTkf5oqyC7UFdBfyMrHdmN4gkFe8ETd9vAE7U7wBMKf+wqKbQtPDH7s1YJ2U3fG5Te/337Vg7lORAwCQIw+0QIBHwOBFie/gDTxzkA9ZVTgPmdU0DyOEeZvTfaEvOG8wbRZ5qgwfpLsMgKDcbnCsdA8YdgobT84qki/V1TZVEU5BHBsfTe5rnAkeTuxD70TIgeJW5Ya0/bBhFoS61t4+5tg+7lm3iUop6XG3ZkQS/zi9Mb5u+MN3Rpmr300VkGT3oTd493E7XPdBMKXwxPCj3iTSzojKV5mDvsPXTbhiF6KKA8HgHZn91VjsmpVJJQkSahMqkusL66QOT3dgWlp8zSHn20rMiml3LMLqWSXIo4t1TR1FImmaVIEkvQSOaBIRohIDt3DZ0NAndz1xBNEBDNXUNjgcDM3DVEA1SUR8ARkK3/ad+kZ15v5Ege9CmSB62AzAM/5W6Dx5CtDwrbDR5D43zA9DGpMDE+LaYPRIeVewo6rPyjz2FvfB/kFOJ7gGx3KsfuVCrdqYjyEhTtaGU5LwFJrwoSv9NORLvTzl7aI2t3w4LdDUO7G3q7GxbtbhjY3TCwu2Fod2t75Gu9drWrjUvW3iVr75J1wSXr0CVr75J14JJ14JK1c8nau2Tdu+SBtEdcElDwa5g1uSRQ+7uXdeCSoNAvXNbokoDsb1nWFX5RVlfu27G6cl+J1c4lgbsvv+rKfeNVV/5rrrry323VFX+hVVfuW6waXBIJfl9VV2aRWFd+kVhXfpFYO6M8Vu7WiDUbJZ7FrhHryq8R6ypYI9aV+xqprnCNWFdujVhXfo1YV2aNWFd+jVg7s0TBrxHryq8R68AvUeI1Yl35NWJd+TVi7T2zJs/U4CztkU/nZSF3l2HuLn3usmeCEmT1Msjqpc1qfEzfN889pmdOXhg/pmfRu6J7TM+c/dE/pmfBOqV7TE8cPNNtNmMeuWe02Ywl8tHSZjOW2VHdZjPm5K2Zj3xPs8sKJ6sVHuWsiD5xRaLsFc6JKgJnqwhxyrIbZ07jUrHx5YxxrAtjgxKBbVqFwKtF9IatUuDaIpJ1C2f/FsGZeFbYyTMHOxdEni6cjT0LbXA9Z/EihD4vamD2orHji1CwfdGd94vCE4AIPAtkgaeCzIP5IEvLABWGYDg9iFgeajxRCI9nC5FLI9HNGyLYkUjf5PUxib7JCySaRYrf5AW6n0uib/ICiWeU8Ju8QLPzSvRNnpdgdkFKEwxK0RyDup9mUKWZBqV4ssESPN+gRlMOSjTrgDQKs4TnHpRo+kEpGhao+5GBKg0OlHgAoMZjALXiMOA5CSSyB6OYmQkUtCDE7K6o8RRltGCWQt1PVEYN5irUabpCiWcs1NykBSLPWyDB1IWUZi+UeAIDrY0v76Yx1MKZDAsEkxnKPJ+hVpjSsIib1VDkiQ01nttA4+kNpGCGA3UZ0/JwD6c61HeOaZ7wUIrnPCyxY9S7mQ81M+qvO3Jd5a/srjF4h4L0D3RcYzgABX+K45qaD9T+0Y3roLmg0J/XuDbNA2b+kMZ4M+ikWZujB3sUfWE5lmWmRw8BCs8hW1M8eghQfI78183NWQQ+hDA809aStz/4f3M9zb/5v33B06hWakxaZKNGlFuACF+XAg7Jh1RtGHF+0QaQvEQBTF4tUHZb8R+825DuMtNmPk/PxgU2pgj84UtB9m9WCqbf/tmw2yq/Pn+bHVi01p+Z/Fa5/V2i28g+VRFjVKR/tTQj+gt0t9TV2+njoQ/HNjgPGA5A9hcKHtwkDNx9cf/A8QRsv89/MHMsMPod9wcT6Acf6IdCoB94PlNqw/9QDP+DnbSU2S558F1iRygGvfDOf6xSV+x65z8u4jtoxzv/cQnqttI7/7HMnenfvw/jxV286/37uIjv+ML797Eap0Pp/ftYpiQpvH+/VTeO9yLz8FP2YEDZgxGZM4KQf3lQUdsfbb/t3Rxt3gg/kCMN5OZobY9sZyTkwttilfurZASXyujVf3AdILqycH95Mx9BHQyHihj+WjjPusSpXlb0lYNJEaoGFCoG9DU8wzqmVCWUfIXyxAu1yQiqktGr/+A6QFQD4f7y9LYo1IIUqAwpr8WzrcsK1ZBlX1FZjUAVhUHlhL0Gn11HjKqigq9E/g1YqENGUIWMXv0H1wGi60d/5qmX0Ez6y2cEl8/o1X9wHSC6vHB3+byuKSxrrWy1hKbN7SLL2//3N4r4gepG2mbxePtH7yPNXDA45Sz+mGyRijR5DhJpdsnvS8zjeszt80yr5QuGWr7diFVTnajE82hcuKxugLI42gFmSmgKdtGV9f97IbII7hF/j0KYi/MvLBB2xcM9n6FIH+1js/37SseG2Bd5BMtfV7I42LcmGi79rGJ3qgmm3WfC6UUi4Wa/mVB5w9bgzW9zbd/azGToSO2J5K7F+MwvKS/QAdsLv/Sr7m26vOBSG5AdcC9uUQ3cvZn3wstnwPaFvRezUAamd5jCWnvk69wWKtiGFWx9TdzaVpWgjq19dfDFLF0FSX5vg9/NC5Xemacja/gJ2VfLEwoW9om7aSFRu4RPiJbkidF9fGLmN3wTsevxlUuoVYWPElaVe5SwMgkFKG5TE7YpeBaxMgmlKGgqP7JYmYRa+YRaFRJqFSbUyifUqphQqyChVj6hVj6hVj6hXk3wX33wX33wXwvBfw2D/xoH/9UH/zUI/msQ/LVLobVv2JqnKMJcPPgKxiv4oT/++/9jjgIE"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Times-Italic.compressed.json -var Times_Italic_compressed_default = "eJyNnV1320aWtf+KF6/mXcvpsWTJsnPnTtLdsdNx7ESGMb36gpZgmSNKcEhRCjNr/vsLgqhz9tlnFz03XsaziwDqVNWuDxSg/5l919/cdLd3s29n7/+5Wc+vukcnZ2fHZ49On5+dHs8ez/7W3979PL/phgS/LW669Tc/3s2Xi4udslkuUXnkyvxmsdyiNsCmW1x93l3nn93lYnMzkH36l7dXyyHdN0enfzkd2Ppviz+6y18WdxefZ9/erTbd49l3n+er+cVdt/q12/3+hz/uutvL7vJdfzO/ne7wr3/t/5h9+69vjp69ePzN8dHZ46MnR08eP3/+9N+PZ+dD4tVycdv90q8Xd4v+dnexJ09A+O3z4uL6tluvZ9+eDvx9t1qPyWZPnhz/5cmTJ8NFfu7vFhe77HzXf9mudjl59B8X/+/R0Yvnp493/56N/77Y/fviyfjv0/Hfs0cvL/uP3aNft+u77maI0e1Fv/rSr+Z33eVfHj16uVw+erc72/rRu27dre4Hug/mYv1o/uhuNb/sbuar60f9p0c/LW77u+2X7pt/dMOvXv790fz28j/71aPF8OP15uN6cbmYrxbd+i/D7f4wXOZycXv168XnbiyF8S5+vRt+Ml9dFnVI+N38yz+mgnl2+vTx7EM5Ojk5ejx7ub7YhXo1iM8H8fvOjscgz369u/xHM/v26fH43/fDf8+e7cvrn93danExBPRf/zNrPsy+Pd4F9ufhRtZf5kMc//fxHj99+nSPuz8ulvMb4yfHU/LfN/0QqY9LU06fTMrt5ubjrqCubrN22S+X85Xx5+UqX7rVxa6yF+Hs7PlemN8M0nqITr6z8Q7GEs/al/mqu112n2pS/Jnd3ny9O+P62pRnZ6fTr5abtVGL2cXQRuf5Ep+3Xz53tzn5kJVF7zk5LplcL+frz/lu/uxWfab9bZfh3YNIefd51Ym0n/rNStDFvUi7XvwhYHffibLtdExvF7eiWl30y/4243V3s4iSlcByZwOJdr9v5suMr1bd0JBFNn/fdOvRaoryolToud/7s6OjPXuZ0V8dPTvbo++82h4f79H3+Yc/ZPS3/MO/Z/SPHKYfvT2enOzRq3xfrz37p8/26Kfc9P6Zf/hzvok3+e5/yane5lTvchn8mu/rt3yu83yu9/num5zqQz59m9F/eVSH3mFEH4fO7Lq7C7ZhbfTjoMV2yr+LnnJS8jFfXywWF4vVxeYmh2KzM+310POIJjL6W7gZ96mMPuYqcSH8N6fqcl4/5R9eZfQ5/3CR0X/nK17nVMtc/iJawnSE7X0RrT4X2iqjdb4vEftNztB9bkIPOdUfGW3zTfzpqaxoh/rVUa08LbVyVUlPPdzJEdTGu8XyssuX3nf1l/2DiHPonb0nuBvHaV45jkr+P+0Ghuiz9put6js+LfvVQvB1VznLxWY1dOMXHsDjoxNoNuvFOHhNrb6MWnSzutosBuWmv9Mjh508nvgrcmVw8Wmh8i360WEoqIYDl/OrK9Wl7TkOxWjAsSu7btV52z899rHQ/Go1/wKmVn76cZhEdCKXHt6P8/WBCB9WKyGyAoj6c6uhy+Xiy3rhDXWYLnhW7z73mzBUTL1+qNtecKv5vfDf+cXmTo1cRiv/tOz+yBo1rIJv5hcrNdr5uOrUhS/7u/lFaHAuLYaCxACYssJm6Dc7TOmGEbcYom5ur+arzc1yvhGX6a+GUea1ON0c8+HFchNqrPGXPuY5PptqQL+6/DQM8sKo0IcnsYf10UfkL4p/vvELPD16Yhe4GVxus8QrmC/PRXd3uWvw67XovJaVkXkfuZ29F0PooW0O0+GhzotC+zGVp3fLsfp51x8rjXdLskT9dLHofGSU7sDG0JeL+8WlKKQ23pkPlkXL8NuOP/JRnviRd4/UBK2jHudd1EYgq/mUfr3QThynMPidU2Pw31RKaEM/8BlAuojPFwaDgAlInGBSRs+emTiteIhLkeX4mJDqgeUyxMVnAuoGvHnU6mh0VB/lq7P5NKp2tuiqEM7sk15DQjaBkyH60DVe/eRsusqy/7O7vRKXfxcv4TM4lUmvHAcbiRC9eXEvYiPZeCNQ1JRXn/vkyNllfvvcr0Su3tDVPQyVUvuVeLmry0rYzukCHrHYs4XFjfVmHOGsxP3GKuhRrPFoq2aCN5vl3eLLcivuizLolTwWR+n4hrHW3WK+vFx8+pTLaptt2JpgvI5X2EOV5YeD1exAr1OXLioFfVuzQa4x7ilzORr6kfoVXHobBgy4/mbTn1V/3d3iJMjMcdVdLdZx2OtNtDLw+lG0C5uJbIZWHeYiHmwaQFrDrESm56pu7bJSpf6LTPvkRRm4jqtccQ3McvnDnRihfFc1wKXyLW9uFZPpqr1jrRd8WRs+HKiVlQD/WWsatZt6UyuRWtdT89x17cr1Lv7NwWEJ21IZF3TLO7HYcxdM2gvpoT/giPUhzs1G5IT6cAuVHGd6W6DQ+yw1jnDOTtHHhwq8GiqyuLVf0wymKMtYI33VU/a/NsOIBffiebmN8kBHeWJ9PvZjZe74Y627/Im6vxKGIWif50tYeCttfDcziQ3ci+KQyd/GUZPXtK+UHw2DLAi17vkqeilmaCpVVah6EPqrHO5aBdYzHKtgg0uoxx09NS13Qn0Tm5j+5LRMsIdu80L57PeVsebq4Gj351g+fruV0e67w9VaXsustXLOl1WP1rOkN5WFwz8PjCd/qPX2dG1fHZZZsfFYGAj42Q42hXgLvrh78ErL/mpX3re9GMX3dS/dZKk05eFUlZZ8dXDO0N2Jhw5/Vqrv7cFufAh56iHc8mtt/IfN7kHkvx/PXner21/mi9Xu8fG/Zi93j6lnj795+uTfj6ejvXsEtL/PiCZPR/j33dGpHe1dJSDMGApvhqMTO8+bcguAoHIEbkUV6L79BxScJyhTyALbLw4FtG84iN6Go992OTqzI4sZoJh7E86Ho1M7z3nJPaCQe+CQe6Al94Ao96BY7oFN7Tqw0U6QvB+Ojp5YETbD4Qs7andJ/ciy5Ahv3SjsB8AAbYajY7vwppwNUAgQcLgK0BIgQBQgUCxAwCxAwKYAObkPWXsIR9t4lOOzzfGZEmF7NUSN1ji1XOfcfIsCbdgQNWTjsjUXFZq0IWrXxlXjNjG3cJOomRvXbd1kbvAmUKs3Tk2/8LcZgQkYIidwruygqOAJhsgYjCt3MDFbhEnkE8a1WZjMjmEC24YJ0TsKRgMpDFykoDa3APYT4/VGo5ylaGAvhshjjCujMTG7jUlkOca175jM5mMCO5AJ0YYKvs8RechoK1Al1MKfJptAfzJE/mSc/Mk5+1NRwJ8MkT8Zl/5UVPAnQ+RPxpU/mZj9ySTyJ+Pan0xmfzKB/Mk4+VPhbzMCfzJE/uRc+VNRwZ8MkT8ZV/5kYvYnk8ifjGt/Mpn9yQT2JxOiPxWM/lQY+FNBbW4B7E/G641G+VPRwJ8MkT8ZV/5kYvYnk8ifjGt/Mpn9yQT2JxOiPxV8nyPykNFWoEqohT9haNCkIieniiLZFYnsWUEG44qc3CuK0sJCEvCxyMnMoqgcLabIthZ18rYoaoOLadjlokpWF0XyuyC+rXBwvsjJ/khUHhiSgBFGTm4YRWWJMUX2xaiTOUZRO2RMwzYZVfbKqEbDDBq6ZhDAOgNvKy2UTTSKX2neyk5DAvDUyMlYo6jcNabIFht18tkoarONadhxo8q2G9XovUG7rwTyocK3NX6o1IQpO0FLRkqGjBLZcZDYjEEEK0ZKRoyStGFIACaMlCwYJWXAqGf7RZXMFyVtvZiCjRc1sl2UyHRBeispGC5SstsgKbOFBGC1SMloUVI2i3o2WVTJYlHSBosp2F5RY3NFLVorKGisgMFWgbayhbGlonSwaSo7BRnMFClZKUrKSFHPNooqmShK2kIxBRsoamyfqEXzBOVehuxB0q2m9XIRljnlHv3SEJmlcXJK52yTRQGPNEQGaVy6Y1HBGg2RLxpXpmhidkSTyA6Nay80mY3QBHJB42SBhb/NCMzPEDmfc2V7RQXPM0SGZ1y5nYnZ6kwinzOuTc5kdjgT2N5MiN5WMBpbYeBqBbW5BbCfGa83GuVkRQMbM0QeZlwZmInZvUwi6zKufctkNi0T2LFMiHZV8H2OyENGW4EqoRb+VO4VDcoZOZQLZFEgsEeZBCbljFzKBWlTJoNPOSOjckE5lavZqlwjr3JBm5Xr7FaukF25QH5lwlvBwLGckWWBoDzLZDAtZ+RaLijbcjX7lmtkXC5o53KdrcsV9i5XonkZR/cyCPZlrBUthA3MhQPNSlmYieBhzsjEXFAu5mq2MdfIx1zQRuY6O5krbGWuRC8zfi+C8yDYVrFa5IWhlRtDQ3NGhuYCGRoIbGgmgaE5I0NzQRqayWBozsjQXFCG5mo2NNfI0FzQhuY6G5orZGgukKGZ8FYwMDRnZGggKEMzGQzNGRmaC8rQXM2G5hoZmgva0FxnQ3OFDc2VaGjG0dAMgqEZa0ULYUNz4UCzUoZmIhiaMzI0F5ShuZoNzTUyNBe0obnOhuYKG5or0dCM34vgPAi2VawWeWFoq+n7JO5AhZCZFUxWZpiNbBLAxgohEytYWtgkgoEVQvZVsDKvomXrKgoZV8HatorKplU4WVbBZFgTfpsImFUhZFWGlVFNIthUIWRSBSuLKlo2qKKQPRWszamobE2FszEVHm1pomhKEwJLmkibajjbUcHVJqGsaJLAiAohGypYmVDRsgUVhQyoYG0/RWXzKZytp/BoPBO9T2F4SGSbiY6tsJupEaDfGCLDMU6O45wtpyjgOYbIdIxL1ykq2I4h8h3jynhMzM5jElmPce09JrP5mEDuY5zsp/C3GYEBGSIHcq4sqKjgQYbIhIwrFzIx25BJ5EPGtRGZzE5kAluRCdGLCkYzKgzcqKA2twD2I+P1RqMcqWhgSYbIk4wrUzIxu5JJZEvGtS+ZzMZkAjuTCdGaCr7PEXnIaCtQJdTZn/460Je7K/uRBdFR8RJAMaTOMZpOLZCOPEjOPD7OSmiclIbt6HyslHZUcgAo3C5wuF2g5XYBUZGDYhkBZhkBNmVkT76f4r733+8x7oCih3+f4g4cMgK0ZASQ3S4wu11g0+0CKXF39N689PvJBvyojUexF/me2v1EJ9PFyBii8BinGBlXgTIxR8skCplxjpsJHDwTYgQNUxgLf5/D0GTUCkShNS7iO77DGONbEMe3cI5v4TK+RRTxLRLHt/AU3yKk+BaB4lswx3fi73MYmoxagTi+haf4/m0K7dHRqR2aFwErIUUWDQoEdCjAZlHA3IkAuhUBLF4EqIQN2G6keeZHJSuASk4AhYwAh3wALdkAZLkAZpkANuUBSMmCo/0HLodMPTUUE3Q5U10Z+iHSmepkpuCF24BzXjuR107kdbGrYn5kFdJRHIw7xzrq1Ibgjnx47czuxFnvw7/x0LtaZ9TXuhA6W8fe2zpL3a1L0N86LJMAZFajnU1fMA0VYmWDofEoDp1GVCoEojAN2Auvpua/N4NX2PoBlSYDSMykXlHTBxrnT69CwwfmhedsajJA4iTp1dTon1p+5rFbeIWNHpDoDF5Rowcau4BXodEDI+N/BY0eSLT7V9Doj4108SiOcF9hm0eUR7ivqM0jhTYPOA58X4U2D4wGvq+mlgZH+Z77yg328gb7fCfcyEAR92hNDFAcib/CBuZoEwpnkyvUplJ7NrL2bHLt4fkYKKJebUS92oR69Xq2XwnZT33HoziLH5GYwI88zd1HGqftI5Iz9lGhyfrISvgBlfA76kIeuhjr11jREeXwv6aKjhQqOuBYKq9DRQdGsX89VfQTy0EfLfN1qujAkz++xooOSC4tvQ4VHVhcUHqNFd3RJh7lu95U7noj73qT75prNSjirjfk96+hVjvZxqN819t8d6Grw3ZBAjURUlVroSS54VACakOk6uZEibhlkUyNjFRqb1GFyk8CtUJSqUGyKtomJcnNlBPkFkspqPGSyu2YZG7SUe5rFYkbOqmq9VCSr1VVdgJSdfOiRNzSSCarIJVcI6qbqnAwMNJWKMnXAsNmQ+r/JTDJgkhmNyI5GlMUt1XhYGCyc/002y/tH/uRDfMAhZG8C7v1gv24fnfUhKM2pGzjsvOI0qLyjorl7J+mDD+1RJZLQNjE9xTfuT8mRJmsvHNPKmQX30cn1OYfcu7V++gkqTjga9iUR46Ieg17kmKVgOCQQCFiVQUqpoFwRaGpCW3tVBxAUnMYYwIVzNygZHw4sPUGNSWY7A4Da4hC6lwFs6gQxoKajNr8Qw6a8RyuIqlAFW2b88jBMZ7C8vNseoZyZkd2d47sGYqjOIFzjnlwahM4Rz5Nc+ZTSWflGYoTm7ntUWlSLwWivBinDBlXuTIxZ80kyp9xzqQJnFMTYnYNU57xYQMjynN62MBc5Vk9bGCJ8pwfNrDAeeaHDYw5z6GFv6wKnP+ochSiKmMRk4iIxAQcl6im6EQ5xSjKFKkoUrzKg9OXAlGMjFN0jKu4mJgjYhLFwjhHwQTOvwkx54Zjnt9M2d178BvMKaCSSUBxhuc8PXN+g7kC5HMzZ747wVnZmODEJmaGfrNR4BvsnBCFfsmFsUuyoyYcfQgp26D59gZHaUb7Bo12uttktMwp1tpoWcxRT0bLnOOfjZaFWBLJaIlDmaSxauKqdMJYNaImow/5h21OxcWmhq+TFF7nhgKMnEoxilSUUVTlGVPkQo06lWwUuXijymUc1VjQUaPSTh+eOBHR43I/9OEJleR9pVSaCv9QOU9bSc+1ov79hb0OL61CxUBK1QIlqhQoqSqBeq4QqFJ1QIkrA2pcFVCLFQEVqgb0MvxJihNXgfrL8DnBexn5RtIP8gytTMvFXntHfK+W1wChxA1RcRunsjauCtrEXMomUREb5/I1gQvXhFiyhqlY8R3fkxgGLtDKO76kvs/xbDL6kH/Y5lRcfPKV2L0U17iwCFmhkmSZCpRlVa6cJhcvp6BSZpkLm3Uuc9Zj0bNKNYBkqAisUH1IsqoWlOh9tcSaqvKhera2+huuOSznCmTvzEHVcUaVxgWqLi6oiuJqriKuUeVwgauFK1whXIlVwTlVgvDm7AlFhAu+9uYsy+9FdBvBPojftiIdF6p+wXSvldUdKE1DVJjGqSyNq6I0MZekSVSQxrkcTeBiNCGWomEqRFzNO4lh4CKsrOaR+j7Hs8noQ/5hm1Nx4akFvknCSfqUtTRJZ05lpyfpLOayS5N05lx2eZLOQiy7NEknDmWXXl1IXJUd7uuneDYZfcg/bHMqLju503+UfpmK7YUfld8CKoUFKJQTcLgC0FI6gKxggFmZAJuKA0gpCUe7zUbP/ajkAFDJAaCQA+CQA6AlB4AsB8AsB8CmHAApOXBE+yR3KCbocqbsyTUinalOZio8mAac89qJvHYir308yvfcV26wlzfY5zvhp8agiHu058OAcvB5U+LbGb7RMB7FNxpGJN5oGHl6o2Gk8Y2GEck3GkaF3mgYGb3RMLLwRsO7Gb4+Nh7F57UjEk+vR54e3o40PqcekXw4PSr0RHpk8fn8iOJD+XdTrOEo3/V55a7P5V2f57vmWIMi7vqcHp6/g1g7GV/Eel6OmnDUxiOrPY6wluxpWfiCMjREITGu4mJiDo5JFCHjOkwmc6xMoGI2TmVd+LlAlSzKojexnkWuBMYPZzFVBxO4TpgQKwYukVLBNhm1AlFlUeuhk1QeMkGNMUThNK7CaWIOp0kUTuM6nCZzOE2gGmOcakzh5wJVsihrjIn1LHKNMX44i6nGmMA1xoRYY/D9IyrYJqNWIKox6v2jIqWthOUm9FZCrcoAV7cS6gQc7INbCXWiFHi9lVCrXM+Cel4VDgZG17yY5GuBSbUwqv+XwOQaGeVUL6NMtTPtupFVqakJbVXgWlvddbNPMEy09hPMJ3YUZzkjsmmlI7HxdeRpLjTSuMV1RLRldWT00vbIwvvaI4n7VX+bmpzn502MwW+pcQGXAbFmBIiHla74sNKZvbfjyF7bMbSbmbw4tiObITqyGaKjOEN0jjNEpzZDdOQzRGc+Q3RWZohObIZo6KJfwirAnuxnXGcnhcRfdDmXNuFCFGqXc6xdQGHCBSexSufIK50zkfnP2y+fu9uQjUXIpr2rBoiWPnasD2ftc977SnH2sjj7XJw8cQNFFLRN3ADlUrWJm+d+FbK1yrmnl8n2SLxMthPW3c2i1JxnRjchzSZfYiMWsUae1q9GGpeuRsRb6V2h9ayRifLchFWsHXkIYdrGo5IHQLjLbk9xv9bkaGm/FnPyY71fi8XszGm/FnP26Lxfi4Xo1mm/FnHw7TTEZq4cXA2xWSIvrw2xWWZXT0Ns5uTvhYPJGyIfME52b1yZhInZKUwiuzDOzmACW6EJsTMwTN5ROHULjkPfULA4AfcSxqmrcC76CxNzp+FS7jlMo+7DOPchJtSix71J4YscIu5XjLMZFaHPl+NuxvihaiQ6HJMq1ajS9Zhcq2XcCRmv1Cbujgpf5Whwx2SceifnqosqquinirTJqbnHMq66LRNz32USdWDGdS9mMndlJtSqEHVqBT/kiG8Foj7OuOjo0ibd0hvoTbpa5a7vwCZdnUR0g3qTrlZTl1jZpKtl6h71Jl2pYlepVxW0KrvN6qqCTsBd6MFVBZ0odad6VUGr3LUGFTvYKLAPRpU726hKr4xJhGPGBOybUU32GOXUmUSZOuQospEGlTtnEmMXnV4FladM3bV+FbSiqq67+ipoJYHoxvWroPr3qUuvvAoqz52696AuaqFOXX1Uk1vHdzBrN5M6/6h+vVqrgUBMcLBa1wYFMdHhup8GCFE9WLvTYCGoq1o808Ahqjx8IFUOIkIaNZSIr47WfpmGFVGVg4uYRAwxYgIeaES1MtyIidKgI8qHKzMPQIL4UCvLbVXgIUn99b8xwfk0GtkvzZ7jEARQ/L7NeRpsAE+L0ec4rABEK8rnYQABLKwdn+NQwVFx7v0HSs5n6ZslZZEd85re0WBOudbvaLCY85/e0WDOkcjvaLAQY5Le0SBO0SmYQ5RehZhOo1+FkCJF7MCrEDJFjp1+FUKKHMXKqxBSjfHUr0IokSIbNA4vvU4wnU69TiAkCmz1dQKh56Cq1wmExAGVrxMILQZTvU6QJQokKBxG3KA/nSdt0GdO0dMb9FnMcUsb9JlzxPIGfRZirNIGfeIUpYI5RGIf/HSi2j74ikxxO7gPvpImR7G2D74ic0yr++AreoxwbR+8linepHLYw+7x6YR593gSKMiV3eNJzYHNu8eTwMEUu8eTEgOYd4+zQEEzzuGyv+cA4XJG4XKBwuWCCperOVyuUbhc4HC5wuFyJYbLOYXLBAqXcQ7X9DV6CFYhFKqCKVAFqzAVLQepKBSigjlAhXN4Co/BKZRCM2EKzEQpLO+nkDx7YkclHIBKKACFMACHEAAt2QdkWQdm2QY2ZRlIya6j3fLWUz8qOQAUPxnlPH23YqT26SdH/DU9V/xLUM7KHBSQfZLR0Li3+OjIDm0pDph/FdcZfRXXBVyKA+xfxXUGX8V1CF/FdWhfxXXkX8U1Fqen76H6HR2/KIh+04kM23JPYJUMhy/NAoX1HExtn5p15J+adaaiYKs0p5a/3dLMfo44HsVp44hinXOe5pAjtTrnyGuWM/8QrrE+3msvwtrXQtjrOtOLOpM+PwuSqk7++Vlgour4Tm+vKbji4RndxKMc8rigARwrilOrEI4oj6B4VXEmCqMsR+xJE+y1yfbaZHttKvbaSHttsr02wl4bYa9Nstcm22sz2eu+u2jQXgGJr642ZK9A41dXG2GvoNBXVxu0V0Dxq6vNDJf2m1laz29maRG/Sd4KPK1rNrO0Rt/M8sJ8M8ur8c2Ml+CbWVp3b5KpNmCqnib+osu5pAX0Jhkq8LRU3rCfQuK4KN7M8kp4M8vL3w266f6DU80MF7qbWVrdbmZ5SbuZ4Tp2M0uL102yPeCyOPtcnHpBupnlVehmlpaem1lab27Q7xzlBd5mhqu6zSwt5TbJ7oCnRdtmllZqG2F3oNCabDPLC7HNjFdfd2RcWTXr8OVUR2jGI21n+ES3RZcEFJ/dtsklgaentC26JCB6HtsGlwQWnry26JKOxmesp3ZkvbCj2Ak7xz7YqXXBjrgHdsU7YGfW/zqy7teQu0mbXbLNLtlWXLKVLtlml2yFS7bCJdvkkm12yTa5ZJtcsg0u2WaXbLNLthWXbKVLttol2+ySrXDJVrhkO0tPBtsZjjnbWRpzjkiMOUeexpwjjWPOEdGYs53lMWcbrLfN1ttWrLeV1ttm622r1tsK622z9bbZettsva203nayXk+zydnbVLK3kdnb5Oyx9YIisrcR9WMTGwc+oJlMKT2gYU6Wqh/QsJjNNT2gYc42mx/QsBANNz2gIQ7Wm17PY65MWL2exxLZce31PJbZmNPreczJoguf55JmszZOjm1c1VkTc8U1iWqvca6oJnBtNUFXWTZ1f+4W2iU/jqPU4gRs9MbJ7Z0fiJDwfZey+ZtGPYBx7gZMqEWPO4TCFwJR12Bc9Q8m5k7CJOopjHN3YQL3GUXoc7649zB+qDREP2JSpb5WehSTa9WZ+xbjlWrLvUzhoqsp0ian5k7H+KGoiO7HpEpUKh2RybWopC7JhNjI+StwTxKl3kl+BS5Lqo+qfQUuq9RT6a/AZY37K/UVuKxQrwUSdFxIqe9CSXVfqOceDFXqxFDS/Rim4K4MNerNUKIODaS5rCXcraFEPRtKqlmgnlsGqtQ4UOIGgBq3AdSqzYC7u/AYP9iDeMCff6PPxF0fStT7BelwFEUfGNTcDaJMPSFK3BmidiDI3CWCtNCUOkaUVN+Ieu4eUaUeEiXuJFHjfhK0XmaZe0uUvlJ6os9Etd4GKj0npjjQSrj/RKneFLgXBUl0pKBu5G+4O0XpK2ETnSqq9bBVulZMcSBsqYNFLZjL4Asz/+bMeGTPDR3FjaaTUDrtK4HoHMbliabEeCJDdCLj8kRhD9hVjdMpoyjPC9G70pTOiZI8Y9k+dCUQncu4PJFt8bhSjE7lgjyX7X+4UozO5YI817Rl4CoTOk/B8izlQ2dXAtF5jKsTfURTODHkf/L8IzZzQPHhlHN8OOXUHk45kn/Z/GNovsDo75l/hOa6Jxe7jssGRLuj66Bdx9xPgs0C/ZcFXedU+hz2TqGfo6DrnKpyjmEMsFzO6SwGr1VKfab9iGb/J0guPy7LXyE5OskyabgKcGTEd8aEugUo3oYL/gj6tKD7cPQQjrwe7Y78z6SMR3HzyYjSJpMyOONMoBufEKLsVNyYVM5Y4fcZPWQE+Sxom/PAOTaes83v8h5FDNk2RNk2LrOdXvqcMlT4fUYPGUG28d1FygNnW767OElqy/OR0DAAsruTog6F3EpdcorifYU/VDiGB/m2kuEUqCDmaIlJz1FSIFKqCxeSjJIab055Bule0gdJITpAtzJ7HBmURFx8cpUCAxJGBjGHBjUdG0iRggPavcYPGmN8AG91PlOEUMsh4n3eRxFDaNJAjbkMSdowPmWw8PuMHjKCEBS0zXngrBvP2U5bh4+IQ8bzuDIJMut5G/KUKxPuBXsQDLJvbCsywwFwIUcg7QY+Ig4RyKPhJMgI5J3FU85MuBfsQTCIgLGtyAxHwIUUgU8p7zsyNJdlt17vlkKeGfw0K+9C744Wdi/jEQ1eP+XsfqIx2X4KepWuvyNdPLJlTUe23RNQ/obryHFlEyhu9nQcP+06IvqA68joA65xtiNmOtVZzlUOVPkpx6XgTiCKkHEKk3MRKxNzwFzKUTONQmec42cCBzEvBVxVlgKuDi4FmMqB1W+dTz/Kb51rgUJdeeu8ooqw1986ryTIRVB561yrXBy1t86lfFUVqIBIlcVUeYd6X1jXoRCuc+Svc7ivKzG+loG91tG8ziG8FnG7FsHasT4e5XvuKzfYyxvs852k/dSuiHv03dSO7MmKoW08yne9zXdXazAs0MkONpikilh9rcGkBLmIDzYYVjmohxsMyX1VOBgWWUnqn0zQCQ5mq1KLap9M0DLVrconE6S6rQoHA5PrYRlC7kdbt7hSMSGcxRcUTgpCWUl01Afb67PX9TWD68vQbn+Ul8z7tEjDXJ42LMbsUWXxuz+0+N1/ffG7zxP+PZeL4r2aUQtJXomnzXual8r7ylJ5f3CpvA8zrT2it0qv6gpdiWV5QUoE1xWr9n1t1b4/vGrfx0nUnpU/7nIlEJ3duDx5UeHceU2+r6zJ9wfX5HtsZ3tU+v/aum7USRzZsvt0V/T9/8vrQviTmb/EGPEQyfmd1uIlxTlX+nf2gRellZ5PanHdO6dYmz9FXC6otHJBqZU1d62KeW1M8WV+0VVis/vJ0/yTu3hSkcLrxhDe/VuPp3YUt7qMyCqgI7HrZeRpt8tI4y6XEdHelZF5j++svO3oJG5f2aGLWXlzZTyySbqjUkKIrGAAlpnLPtqrqVJ7AqvLjuKVunzxLl88Dr+A4zICUBhoAbYNDo58Y4Mzi6qzq3hUyhcQ1SETbH/HsdWf3UjsxMrChl+A4hvaziG3QO3NbEf8QXdX/H1tZ/ZNe0f2QrYhnxV5Wf8esuojoRUaAKA4xF7F5o5QGHVxMGx+aR8xc2qIeh8xi7lJpn3EzLlx5n3ELMRmmvYRE4cGa4gajnFqPc65/aZHeFPBFn6Zk3Jzxp3LjCr3x61b71xmMbdzuXOZNWrxeecyC9z2cajMiFygMlQmlf0AdxWfxEJnZ9C7ilnMHpF2FTPXbpF3FbNAvpF2FRNPDlKE33OYwEsMkaEYJ1dxztbiivIX/GL11PzSF6uZk7/oL1azmP0lfbGaOftL/mI1C9Ff0heriYO/GKL2a5zar3P2l/SsfCr2wi9zUvYX/EY2o8r9sb/ob2SzmP1FfiObNfKX/I1sFthfcOMAI/KXysYBUtlf8EPZJ7HQ2V/0h7JZzP6SPpTNXPtL/lA2C+Qv6UPZxJO/FOH3HCbwF0PkL8bJX5yzv7gi/SWs9KDLRIG9JqrsOFGVvhOTCPeJCdiDopqcKMrJj6JMrhRF9qb4jATKMArsA1FlNyA1eZZ+MFMqVFAvaz9LLpbWp7VwMCfJ1w6sT+skwuPq69M6BftdZX1ay8n70gMdLbAPHnqgI9MkT0wL4yeqyiV/PLAwrpMIr9QL41qt+GZlYVzL7KF6YVyq2U+D/Hst3OitUWCHjSr7LKnJbUkXnjstBo2vbe03DBixW4nY7DVi8RV509BQoxK/G2+YvgVv3L0z8mKakcaPwhf8WyYWVsIxXkHc/UG2/R+tLWT3l9hOQkx3f4LtLKSxv71GGAK0V+7BWvcvjdxjddujh5ToISfaQqL9Bzy2mGhCPNElzMnF9r2s4I/+/b//H63X5Vs="; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Times-Roman.compressed.json -var Times_Roman_compressed_default = "eJyFnVtzG0mOhf+Kgk+7Ee5ZSdbN/aa+ebzuMdvupmjORD9QUlnmmmJpSMoSZ2L++9YNwMEBkn5xuL6TdUkkgLxUFvXv0Y/1/X212o6+H1397XEzv6sOTl6+Onx1cHry6uXJ6MXol3q1fTe/r5oCfyzuq813H+r7+aoVHpdLFA5UmN8vljuUGjitFnef27tIqTfb+XJxc7m6WzbFDpvjzS+L5+r2t8X25vPo++36sXox+vHzfD2/2Vbr36v21J+ft9XqtrrVGzWP9sMP9fPo+398d3R28eK746OLF0eHh4cvLl5d/PliNGkKr5eLVfVbvVlsF/Vq9P13jQzCH58XN19W1WYz+v604VfVetMVGx0eHv+luVBzk3f1dnHT1uTH+mG3bitx8F83/31w9Ori9EX773n376v231eH3b8vu3/PDy5v6+vq4PfdZlvdbw7erG7q9UO9nm+r278cHFwulwcf2qs1dqs21fprQ3szLjYH84Pten5b3c/XXw7qTwe/Llb1dvdQfffXqjnr8vXBfHX7P/X6YNGcvHm83ixuF/P1otr8pXncn5vb3C5Wd7/ffK66Buie4vdtc8p8fStqU/DH+cNfhzY5Ozt+MfooRyetJS43N62p14148fLF6KdKjxsjn78Y/b69/et09P3xRfffq+a/Fyd9e/2t2q4XN41B//Hv0fRjU6S93LvmQTYP88aO/3nR45cvX/a4er5Zzu+Vnxxe9Pyfj3VjqeulKqeHw4VWj/fXbUPdraJ2Wy+X87XyC7nLQ7W+ab1chPPz4Tbz+0baNNaJT9Y9QdfiUXuYr6vVsvpUkvxp+njzTXvFzRdTzk6Gs5aPG6Vqs5smOOfxFp93D5+rVSzeVGVRW02OpZKb5XzzOT7Nv6p1HWm9qiLcPiUlt5/XVVL2U/24Tujia1J2s3hOYPW1Stq2ym26WsADa5Vv6mW9SixR3S+8pC2wbNNAoNU/H+fLiO/WVRPIVs2TkxNxmmrTpRpRXh0fDW0P3nd83LNLRWdn5z36IaIf44k/Wamj4fo/21OenvXol3ji64j+Gh3sjaEmtXXof+OJb+ND/GqhJyf+LZ74LqJxfPrfYqn30Tgf4om/x+f6I15rEtGVtZq05zSW+hjRLN7x79Gq101n9qXaurShnnndaD5O+TyfU07OXklOuVksbhbrm0fLohocj23S3jQ9T5J5u/zmHka9eB6vdB1L3ST5N5ZK7vwpnngX0edopEVE/xdP/BJLWQhr5k+slSSdJO09RPTPWEfLDRpCm/hcST57jOhr9LinWCrJpLvYHP8ydHFo/uUd4VhbHTpTX556uJMj8MbtYnlb7Opv66fEzq53tp5g243TzDmOJOw/tQNDzLNW56zv+LSs14uEb6rCVW4e1003fmMGPJLad2GzWXQD1yT996MWZ01z8sdFo9zX23zk0Mrdhb8hk+kl7X1aJCwZPzUDuXQ4cDu/u6uSnrvnOBSjAUfbdtW6gtg/tbHQ/G49f4CkJqdeN9OHKqmlmfd6vtlj4f1qYfylDeD1bs7Q22a5XDxsFptEauq6/Vw/urFi6Padc1vLredfk3iY3zxuE9zn8k/L6jlqhci6n9+s6+TG1+squ/FtvZ3fuIgzadG0JBrAEhrGoT1sdduYNBujPq7u5uvH++X8MblNfdcMM78kl5tjPaBd7p3P6uDi0kY9x+eDz9fr20/NMM+NC22A4vtYG394rjcY2w1eHh3qDe6bPPe4dHeQzDRPRqO3bchvNkn3tSyMzevCc9bJILqJzmZC3Hh90mpvQoNax+z9zzp/7zXWMaVNapfzbWdjo/AEOoq+XXxdgDvbKf7JbLichIY9duGkSXKSdRYUg9pVdzMvChKoaryk3c8FiuFyQ8wpGuwc/3TWEnSCzQHCTWzG0GQImIL4KSZV9PxMxWHNI7kV5RwbFXo/sFrmdnmXPYCFR8lHfUq1cX52NZtIla7m0yqYMyZK8xBXTeCUEW3wSnc/H+6yrP9Vre6STPKhEFGvs0qac+wNkn2ee1nqRtaFJr3hutrsJ1pOxyR/fK7XSa3GdHczA0WBTvOIX0iyLZhtQjcwi/muzS1vbB67Mc46eV7vgmbFEqe0Kknw/nG5XTwsd8lz+QqCk/vmkI6vGW1tF/Pl7eJTMsHalVPDO38fc9jEWSw29rrZnl6nLN0U0t2qlAapQSGnzFM/fkMXwsW3ZsCAK3A6AVrXX6oVToM0Oa6ru8XGD3wtRAsjrzcxLs50LvLYRLWbjZixCyPIdcEyNceSxmXBpf7uLXZ68kpGrt06l18F01r+vLURiiXZYgJcZnnr5fHgvdtCkqmKvWNJuCwNH/Z4pTewzZZLoVG697jUIqWuh3Ou9iOlO5fjeLx3WMI9powLquU2We7ZuiRtOfGp3pMR40hPzrt/TGrin8hMlY4zLRbI9DZP9SOc81PM440DrxtHhkfTbiRMYaRtloWO5G06yNAZhm+4V7JuoK90spxYnpC9KYT+m1KI/0pPLWZojPZ5voSeQWK8nZnQMrc2xb6x88qPmszTvtF+hUioSt3znc+lWKGhVbNG9fnMeDbcVQfOZzjqYE2WyF541BRalgnn+XiDks2pZvPbxU2WZ38q9GfrvbV559vHHpdGuzbc3OvWe+91WfCFy2KOzmcDY38dy8NJv2kjkUJvX0oUX9Lxs47H3EDArrY3FPwj2PLu3jst67u2vVd1Moqvy7n0MUoSys2lCpF8t3fOUEFHbjYvuO8q7cbh9WHoISzll2L858f2VeSfL0Zvq/Xqt/li3b5A/sfosn1RPXrx3cnhny+Goz57ONQ/p0dDTkf42h/1WcUhrBgK4+bo9FSP5BEAgXM4rk3laB//DrnM45TBZI71i0MO9YGD6L07+qM5Ojo60kMxmmOu/qBM3KUm0QCTggEmqQEm0QCTogEmiQFk6OdYl1GQXLWVeKmH0+bwlbbprBUPVZxJnZDBwwOGfQHOSF+bw/MTOXpq73YsRzt/JDcDBPca6FAIA0ARRYFyCgXjHA+ivE4QRYbyNDxEhRhRRH6iPHMWFaPHqERuozz3HZXZgVSgMFJOsST8fUQYVco4tExI40vkSbw8R5ryfRZMYk6lggUL0adyyYIhDlXwwSgYI1IYhKUgjE1lHKAqJFEqWhqqIkK8CoKgFbRLEIWv8hjDQyhhDCuiGFZOMWycY1iU1wmiGFaexrCoEMOKyAOVZx6oYvRAlcgDleceqDJ7oAoUw8ophoW/jwhjWBnHsAlpDIs8iZfnGFa+z4JJDKtUsGAhhlUuWTDEsAo+hgVjDAuDGBaEMayMY1iFJIZFS2NYRIhhQRDDgnYJohhWHmMY2wkD2XOKZi9SSJPIce3k1yVOEe7FNMxdEYh1z8ldvZj5rC8RHdfr5L1ezF3Yl2E/9iqlAy9STnDi+wLH7OAFThGkpnnClZkUbskZw4vfbIIkd3h9XxMUsogvs7cJQj7xqk8qTsPM4gRIL45jjvECJxqvJtnGFUhTjisBecdxSD6O70qc0pAXYy4ygpkIKeUhlCgLOYlzEIivc0r5B6U0+0AByD1Iye1Rypwe9ejyqJLDo5S7O5ZgZ0eNsg1KlGtAep9SzDOIOcs4Lc0xUGKS3orzC0rfMHSSW1AtG7qQV7DEHkOHnIKazyigYD4BDNkEKOYSxJxJUEvyCMhpFgEdcghQyCBAdzml7IFSzB1D42DiUERZQzmlDOOcL0R5nSDKFMrTNCEq5AhF5LfKM6dVMXqsSuSuynNfVZkdVQVKB8opFwh/HxFmAWWcAkxI41/kSbw8R77yfRZMYl6lggUL0a5yyYIhzlXwQS4YI1wYhLcgjG1lHNgqJFEtWhrSIkI8C4JgFrRLEIWx8hjDYjgMYmMUxSZQGIPAcazS64xRJJuQhrLKEMvGyBVNyHzR1OiMppE3mpC7o+nsj6ZQSJtAMa3C+4RhVBvksAYljWvVJ8ktOLJN2GvOJLZNK5mzEN2mF80Z4tsUH+DKMcIVQogrwxg3yEFuShLlKqZhrirEuTIIdGW7jFGomxBjXWyFsW6MYt0EinUQONZVep0xinUT0lhXGWLdGDmnCZlzmhqd0zRyThNy5zSdndMUinUTKNZVeJ8wjHWDHOugpLGu+iS5Bce6CXvNmcS6aSVzFmLd9KI5Q6yb4mNdOca6Qoh1ZRjrBjnWTUliXcU01lWFWFfWxvopheguY9pMLGBD9Np6+CjbAkoIxblginLFHOOD8DoSim/BaXQPIsS2EHJFwZkjihbdUBRyQsG5C4rKDiicolkwxfKA3weCcSyIo1h5GsODOgmX5vgVvMdoSeyKkhutELeiFowWYla4j9iBYrwOCKJ1IBirgjhShSdxOkhplA4axOhAoDceyC4S6okFx3548BgMTkUUncopPI1zfIryOkEUocrTEBUVYlQR+ZvyzOFUjB6nErmc8tznVGanU4FCVTnFqvD3EWG0KuNwNSGNV5En8fIcscr3WTCJWZUKFixErcolC4a4VcEHrmCMXGEQuoIwdpVx8KqQRK9oafiKCPErCAJY0C5BFMLKQwz/0NDL5qivcnck5wKSeAPk2hc43AGotCogbTFg2ljAhnYCIs5vaNJZVo+sIRS5xwXumkapPC4g8j9QtCLAtCLAhor05KfB7id25DPmT2h3QK4iwKEiQKUigPRxgenjAhseF4jY3dCVO2rj5KUezTS4fsLgABSywLCb11lGEZlHOdlIeWYoFaO1VCKTKWe7qcDGU8FbUDGZUfhVRGBQQbNoLDat8sS+3XcA3r6C2L7C2b7CU/uKmNhXJLav8GBfEYJ9RSD7Cmb7DvwqIrTvgGbRWMG+woN9fxlM2+fsX9CqgMSggJwtgcMdgIoFAanxgKndgA0mAyLWMtSOwY60PnNNpoakBoB8fjWO+dWo5ldDlkWNWRY1JlnUiNTAUP/jUC++uzgUUju9jnWqCxWo0wrUsQI1dxCmJFWrZWAHKNZj+NUqqcj/Du51ZkdSEUDSOIBc3YBD3YBK3QBpDYBp4wAbGgeIVKpHb0f9MPylHelow5AfWhjHoYVRHVoYoqYAxQYdxqQpAOkIQ1F7dHyqR/LUgGRMjQgrAhwqglQ/5HBY6gdIawFMm8NYrWOkt+j0gJJB3FtyeqB+EPc2cXpQaHj3Fp0ekB/LtehRQ6A78qHaoSRUOx5CtaM+VDuUhmqnUKh2jLJQx1wWasnOWX4X/WMXG91NtjAuSKAQITWLFioSA4cKUAyRmocTFeLIIpmCjFSKN69WJYtxFJJKAclqEptU5FstlkUslaDgJZXjmGQOaS9DdJNAgU5qFvNUJIY/FaBMQGqeFKgQ5weSKVWQSlnDq5BASKBcQmqWVqhIzDBUgJINqXneoUKcgkjmbESyT0xe3JVcidMVqSEOfh3160r9EkJ3JMGGyK0lmdAtsRweyuFUB5+/jmRhRUVYUzHm5uyK3UqK3a17/6BPvfNj+V+pegPFb1iGK4VPWALPauu+7hgeFb/uGOrtv+7wxYIF8q87vJbZAj/boHqyVbLPNgZJJpfZHUTbxeJ8B+XJHZzzQROQQA3BatYcvgw2ilegabwwK54SmonkpLF8idSgIXxTGwXjFsN3KDAkVzSuIjKr8cygoqIphYERBc2SYsFwKiQmEy0zlmi7WE82kPJgmncjXA7tjnxv2iG/HNqhpFfteOhKO+r7zw5Rf9gxWg7tmFsO7YjvDN9J8F4miOqinCqkPKuVirFqKlH9lHMlVeCaquCrq5jqjOuGjKjOYd2QeVbnbN2QJapzXDdkgevM64aMuc4uyi+LAtffq2wFr6a28EUSi/gCbBevBut4OdjIy2QpL5K95B3IZYLIRsrJOsozu6gYLaIS2UI5W0EFrr8KvuaKfZ3HrrrjWNNxrOS4UL9xWrVxrNU4qdA4qcs4VGOc16DtpfqF2zF2UIiS177joVs61aOpu+pHV3LmStqKryHsKnoaE+24kGjHhUQ73pdox+VEOy4k2nEp0Y5LiXacJ9pxIdEqhzYJI+PAs9bBkTHZcxpv9zGeOIsncrNlI+VBcl8TQQN6Tq3oRWpKL2bt6UvERvU6tawXuXm9ym3sVd/QXqPWDp/7nSTW43bf97FfVuSq0CrTwnN8LFxnVrgOe0Xxg7dBh09FwDGQklugRE6BUuYSqEeHQJXcASV2BtTYFVDzjoAKuQF9i3US7MQuUP4SKxa4Si0/Te/+Mb3CLL0CN3vh66RBlQ8LoMUVUXMrp7ZWnjW0irGVVaImVs7tqwI3rgq+ZRVTs+KXNSfeDNyghe9qSL2K9pzG232MJ87iidx82Tcog+RX1bAJWaGWZJkalOWsXblMbF4uQa3MMjc269zmrPumZ5U8gGRwBFbIH4KcuQUVuiq22LT4RB+LV5sVr8aew3J0IP3UAFzHGDmNCeQuJmSOYmp0EdPIOUxgtzCFHcIU7wrGyQnctzgnZBFu+NKXOCxfJdadJvf8mJw7S87lRk2/Vhk0Wd2B1lREjamc2lJ51pQqxpZUiRpSObejCtyMKvhWVEyNiCt6J94M3ISFFT1Sr6I9p/F2H+OJs3giN162wjdIcZI+LkzSx4VJ+njfJH1cnqSPC5P0cWmSPi5N0sf5JH1cmqTjTt0TbwZuu8I+XVKvoj2n8XYf44mzeCK3XbantZd+G5qtX479DVsMkDQWINdOwMNe1d+wdQBpwwDTNgE2NAcQaQlDtvmpO/JvDDvkNz91KHlz2PHwurCj/h1hh+idX8foRV/H3Nu9jvhNQy2SzU/DZuIW6T6igb0f4ZbZ7shvme1QsmW242HLbEf9ltkOpVtmO4W2zHaMtsx2zG2Z/TDqN0mc2JHfs9ihZFtix8OOxI76zYgdoqcGhXYodkzeUwPy+w8/DJF9ZkcS1IhcPJswcdeZxPpOCvWdpPWdxPpyK4GS1HdCmzE/QCsZaRPQhR61uad/u/JhyDFndqQb2AzhrrSeykIOtL4iMonyzC4qRuOoRBZSnptJZbaVCuQgyslLcGHtjBD5S2FhjdRJvDa7j/J9tkocSaWCrQoupXLJVsG5VPAehmuHFx6Br+FCIfkRe122UDhI8vYFXE8RmVN5Zk4VozlVInMqz82pMptTBXI95eR6wsH1FJHrGc9cT9RJvDa7nvJ9tkpcT6WCrQqup3LJVsH1VPCuh5v1LzwC18PN+uRH7HrZZn2RwvZAeYh8e2CupgYubg/MC7Cx924PzAsFw+fbA3OVHTbsEDlLBXbefTtE0jKT0j2DO3v12zbPXNsX2Gvzkpv7QvttHl3ey+T4YevMRSZgEISdM6lfh4Ao7pvpC/wxGqYZL/VIpxmGdJphyE8zjOM0w6hOMwzZNMOYTTOMyTTDiE4zFLXRfHShRzr6NuRH38Zx9G1UR9+GePRtio2+jen3CIZ0aqHIvqnojuSpAYndAbmKAA8R0FHv9h0iN+6Y2h0uONgdiM8bLer/wrVMWXvST5f6rUotac84V103GQOSxILIfcFjPGy97ilsHIbC+mGPIdpW3TH7sEfZ8HfPZSbbosVIpvzdkV896RCtW7SsdgasYwvXhebEPcNApUaAyC9B0boCE78EJK1qSOe31ohrV611rP1aGhGR6xJMsL+NLtmtpe0+4xM70i7BkO8HjKPrG1XXN8Rp3hQLCmOW0I1JFlfy5Cy380exvXexXXGz1ZDRwmYr5pSP881WLMbMHDZbMeccHTdbseCzddhsRRzydpgGMM8yeDYNYIlyeWkawDJn9TANYE75Xfg8tjRneuWU7pVnSULFmPhVouyvnLsAFbgfUMF3BoqpRxBO3YJh1zcIhhStiHoJ5dRVGI9f7ZgYOw2TYs+hGnUfyrkPUYE7EhG4NxEOXYoiyqzKuXMRoY6twt2M8n1ulHQ4KlGvozzvelTm/kcF6oSUU08knLsj4etoDe6YlFPvZDzrokRN+imRoLNSRD2W8qzbUjH2XSpRB6Y878VU5q5MBe7PVPCdmuCn2BK7BBWcLevowg5b6Q3yHba5yl3fnh22eZGkG8x32OZq6BILO2xzmbrHfIdtqmJXmS9Y5GrabRYXLPIC3IXuXbDIC4XuNF+wyFXuWp06L3lY6Ga9yp2tV9Nc6YskHa8vwN2vV0Mn7OXQFXuZOmQvcrfsVO6cSfRdtP+CEro2L3B37VXutEnNum5fJOnAqUDSjfsS/pNcVu33HlI5dOxODt27U7GT9wL3VV4NHb7/ZLPU9qHz9+q33TobCPgCPBzwamFQ4AuFoYGXeYDgVR4mODUMFpy6LtkzDBy8ysMHUtNBhCuTDSVcARxQeIGHFV5NBxe+SDLE8AV4oOHVwnDDFwqDDi+HoYeXaQDixKdSS++Kwt4QiAOTyTAaObEjvx49wXEHoGRdekIjDKC+N5i4sQQwWkaewKgBiM/wsn6O1QjfTjCnCuXfTrAYqxa+nWDOlYzfTrDgqxu+nRh4+OYg5VT7/JuDVMzsUPzmINXJIoVvDlKVbZN+c5BqZCXafp9QslC2/T6RMusUtt8nKlkm3X6faGyVZPt9opBFcG86I7JF2JvOPLNCtjedJap/3JvOAtec96Yzpjone7oLClmgtKe7IGf22LOnu1CCrFPc013Q2VaFPd0FlSznNjMHRtaKm5mDkFko3cwcNLJKspk5KGyJsJk5cKq9/pL0Zcao9iZQ7U3Iam9qrL1pVHsTuPamcO1N8bU3TrUffqn3MhKquWCqt+Cs1qLFOotCNRbM9RXOtRXu6yrU1/RqqOXwS61XWEVkulcTmF9fAAFXFQDrWgIwWxwAaBsYAcoORkC6OGCs/Y3jIzvyW0w75IfsJoydTWgvSIeSxux4aMiO+kbsULrXoFOoaTvmd3J0KLYd7E/tDrXtgKkRgPm3rMbxdxKN6nq4IZs3G7N2gztJuwHSX0pUJBOkfurWk2Hz7fErQVSHKqmrLTgAyqtapVV16wl44WiCKjFBlZlAVwmGH99oWbs2cGZHunXDkP9ZLeP4G0JG9eexDNlvYhmjnxpsWe2NbL/oCMxHOgg4ozKqywSGeKUQrmErAsZ0URDK6eRfke3GtmI43TZvaufY5xrqOrEG5L3EOHqJUfUGQ1RDUMxPjNm6kjH5SdGOTCUx9603dYkZmAY3MGouEzAxA9bEDMwSM0DzboAS4IA0MRvrFrHtyO+Sn4b0Cjzskp9iegWU7pKfuvQKTF3MkD62Ilthno7CsvJ0FNaSpyG3Ag/LD1PMrYBojWw6iovC0xGvBE8xsxqSWHh5bqTPrP2a5XRIrHZGFWupaRVRXssq9IZTTqtQ2HeSU5dVgSWV16R6puGycCctfA8+denPWO2uWse6ZwunU859RmNz5uui01FcDJ2OwgrodBSWPaeY+awRMfFZY7eJ71RP08QHyP95AePhs6QpJj5A/PcETLE/JWDM/oqAMfkDAkraBb7zl3qk6doQpuWOzny+nCX5cpbky1kpX87yfDlL8uUsy5ezLF/OYr6cJflyNsIfMZ1hvgSUvD2ZUb4E6t+CzJJ8CQrtc5hhvgTkf2x0NuTLYZQzw4SJTFsAGOV+E3DXqlH/w8ozlzOBwYdQBvVLKEP+p5VnkDX78JqNwnh0NqRNuEyVVFYTp2OFylZpZf2IFEpHI1SJEarMCDYi7UepsyF79u8nZpg9AdEfAJkN2fPoSK9rg0dgvrogYAwb9XtvZkkCxWvQ67sZZlAsp1MORTx4nFEOtaZ/9IZ6pHnHLGRRFMIsY4ZpFFCopEk00Zi5PIoF/VxrpuvnkFrCy4EgcIbMXw8ENcmV4QVBEELWjK8IgkL5M7wkYAEyafjWjXmWU7Nv3Vii7Fr61o1lzrPhWzfmlHGFY9pVxulIBU7AKqSJSdWYnVSiVKSc85EKISmpQulZOeVo4RSthn22Fp5VO+RtFTh5m7DPUEkaNynJ5SoWrBiyugpFK4b8LgIkeUWU6ZVzuhcBc74yTvwqpNlf1dgFqET9gPJCZ6A69wgqcLegAvUNwkMHIULSS4j0mNg89BcqpJ2GqrHnUIm6D+WFPkR17khUCL2JKtSl0EtFybXZW8VM476l+F4xK5D0MNmbxUwL/Uz6bjETqbfJ3i4mGvQ5SKnbQSnreVCPnQ+q1P+glHdBWIJ7IdSoI0KJ+iKQsDtCzIkWNe6UUEvTLRaIGRdVyqsocWpFLWRXFKmbQslWkYJGWcMpvsMCqXCt0G2hxj2X075hzaT/cmrShaFetnboyFDbZ+3QnYEGPRpS6tRQ4n4NNOzaEHPvhlrawWGB2MehSt0cSoWeDotwZ4ca93eoUZcHUuj1QEs6PlAf8wYK3R9qaQ+IBWIniCr1gygVukIswr0haqFDRNH3iU3Ydn9fsu8F2qN241r/YlFSHhYQBKWG5IelBEEpt9sHijoO5eGRoTRQKCvbR6CgICiluwWgmDIo5/629VDO/W3roRz8dd2hFPx13aEM/gnPoRD+Cc++1DV6br+4ez245LEdiScCSt6yXZPfAfVv2a4TPwOF3r9dO7cCNniTka9arZtRvxYKRxpNhnBc1FNxsV2C6ALK41Xw2w9GdJXs2w+R5M8Ru+sY5CuZEq/Vd5L9Hy24vV7K3y3os5hTvdRW0H7uqTvyOwM6lO0MUM/Toyd39OxK7vyRr1puZenG8fkU0UMqT5/UpRqPniJ6jifuEkRVKHuLDDmwHoqoHsrTeogK9cAPkwg9xxN3CaJ6lP3VDY9cZRznGjkxr1bI3gl/KvDnwnV2Jc71dWKsNHQKdzmlCqOUVpc7n0CfUvqcXmGXU6okSkkVbdzq6oiYK4laXksogdUE/JTj5/wiuwLmqqIW6ypd912CqI7K0/q5YYFHTxE9xxN3CaK6KI/10LHFXcaoJiakVfFjF2JPCXtOzt1ljOpjQqyQDoLuMkYVMiGtkB9kEXtK2HNy7i5jVCETQoU+jWS2r0d+Z0eHbG6vKNns0fGw2aOjfrNHh2hLR8fohw875n74sCN+l0eLmmhaVptNN5VU+Ekt2B4tdITWHfmR5CcadfQTy7vBNnagk1IlYhkj/nW8Ynwbr1BfxiuxN+6KbLqrSN63KxCT9ESmHvNIfA0U+2ooTuqiWqiQKr5Wiqlqyql+yl0llfqaxs9JU+5rXfiYNBUTC5Q/JU11b43Sh6SpSpbJPyNNNWcl/VNgeuDsEf78VwsXLi0t4tB0URgOLdJxwyL2Q4skny+SlNgeWbR3Rz5DdcjWywzFDNXxkKF66lbFFPvE1SFKXB2jxNWy2h/FZ64LD1inD1jHJwnrS6Ykz1j7/XId8pnUdydJR5J3IV/il8bD9QpfGucqteC+L43zItFse740zkuQjUtfGucy+0D86jcX9poldZLyV795gb3VKnhR6avfXCbfKnz1m6q7kiOx85W/Be0LLIdRU3+XpVul61H8OnUQ5GfYDUleOtEje85kzJiPFleYNocrxbn6qjBXX5Xn6iucYg8XjpPnVWHyvCpPnlfeRHj5QqOxwLf6RqOtcHVwuJWgXSzFl1ceLlyPcB2udiPqWi5+qEc+CGu+ZE+xOYfrxgWa2rWwP5Fvk7ZwL4XudbhhYbWhjqsKyXX4/uVVhV6nvnx4hHQNoObZfrgC37w02+9VHDAM940T19rNUv2JfLt0ltpL9B0h3JIUuDMpu+LV+DlYjo/jBkbDgyQT3dpPaulcvm0+qe01SX9wP8yIxx7t4ol8s+yvyg4SxvtwL3wbcOzRLp7I90pTQCc9uAs8xHMf8tOG1xCFVWove03OWFaf5Fvdi1SQ58hV/0kCq8l2di4CdcoL+E3urNKudpZpMz/L7qMGFv1O+E7NjbXHUnvM9C0b7TfQHuvsM80+u5SN8m2LwP+HL6HQ5Ubtm7LTw4ibB5xvc22pTu6xDwuv0dJVUsIP/pzmYyTWYZ0/p/6kS6bJRCHV3MMmJboJ7mnEfruB1/SGmSZvu3LVP05S4mF+U+Wm6ax9ETG1RyzxVWveWFf3pZwoudPTuiNd2zOU3aIVdBvHsV5M39n2lZOG49u6d2QXHtEDlN6ReZUfJez5G56Hf79yeB73ruvCI3qe0rsur/LzhB9AlOdJf7JLnsqJ+Gxe4Cf0av6c+c9eHWc3pmcefLRL0ER81CjWFTWP/Vqa13D9ySu6fuaxrZx5TpuDlMtqmae6TubwH2o3Jbo6QTixtYj2t6eEdH96ypH2t+BfeSI2JQwG6pUmzLsFz37E1B3porYhaQpAfseEcdwxYVR3TBiyfRHGbF+EMdkXYUTMbUgi4EyJze66Iz/h65C2BaD4Z6c6HqaFPcWFIMP+r1F1iP4aVcfor1G1rNZQ6o78y4UOJdtUOh62qXTUb1PpULpNpVNom0rHpEsGpLZXpHHeG/9phK+CntChAPlXQU/BoYCHkfUTOhQgWlx6cg4FzL0KekKHMuQd6mmEK29Po7Dc9hQaB3hagTpWIF9CexrFdbOnUVgsexqFFbKn2DjPLjKeY2Q8x8h4LkTGcxoZz3lkPMfIeE4i4zmJjF1ojl2s2I5HDIS5eLLlNip40p//+X+DG1I7"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Symbol.compressed.json -var Symbol_compressed_default = "eJx9WFlv2zgQ/iuGnnYBt5DkS85bmk13g27SoEkPbNEHWqIlIhSpklSuov99R7JIkSLtFyGZjxzN8c0h/4oueF1jpqKz6Mt1K1GJZ4s4S+PZYrvdbqJ59J4zdYNqDAfuXuodp52spdSToZrQl6n0KyZl1Sm/xgVpa5BcKURJfs5KCgdj+F++J8+4uCUqr6IzJVo8jy4qJFCusLjD3d27BucE0cGYd+/4c3T2/U2SxfM36XYxT+JtDI8k/jGPPrMCC0oYvuWSKMJZdPYmiWMLuK9I/sCwlNHZCuRfsJD9sSiOk7dxnMFbbrgieefGBW9eROfA7I/8z1myzVbz7rnpn9vuCW/unpvZecF3eHb3IhWu5eyK5Vw0XCCFi7ezc0pnvRo5E1hi8QhCeM0lHCoIK+/yCvdR67zrfd2THPA7VfzzNTrbpv2fX+BPeH8fm2usBMnBg++/oq/forO08+QGNMgGgeG/5wfxYrE4iPFzTlFt5JtkkLeMPIL/EFoNreJBE2vrXReako3YcqvVEXCTKWJdzPS7Gizyjk/mZZvsAKC66d7FCgMtF4NC2eaVqpDyLW+QwIzi/TGoD6tvPQL7BJEPNVKVb39DW2mkJnY5FALyD9eEhU6DL4SPrqTaS0mRrHyDXrHgvpQz7AvVU+CkqgQOnN3zVgSkkFVfKslzQIgfMfPFOBxWRiyDjcs5p5wFIoFr4kImprQrP59WP1ubiVpcCgxlNLq5XC4PwM8Wy77EvSs5ZyU0EpuFaXqAzmlTjVlerzcH8TuskH/4oiLj0WQQ/oWpdXadJAfxZSOJ7exmPfD01lYSD8K/kU0288JLS7Mh+hW337dINCPA5MRX8QE1jXU8Wx/E/6J6V4zyLBtCdd36Km4Cso+QTOG4N6T5dvRusxxsu6/scK5Wgw2fKovZ20HxHSnrQDjv0WjEejvw7/MkxmMD6ZQkvnEfa1xayperg/ibZfN2kN1K4lvxHw4lZAfD6QErpy1lOt2QF4H3XATa8HDP7VnrVWY6SoNZQfKWokBRt90Ak7mt2GACwTVE8bNPE+Tw3VTIzkmQqRuLqsvtUGaFw3cTcjzJxSod3tjYSnQgS4fvpgyc8KaDZuLwXR8FtYlv8YPD9rHBuGxfbQYG1q1vL2v9+3zC9nF0EF+BqoLBFBbbjRfSYbsJprLYboxtpx1Fj23esXoMhqlx7rB9uR2OPxP/aCMDmX61/Vhm8cha7HA91bzbWUR1z0/m8tLUKSyJ1qWNHqeXrTUf16lb76Or6XIzTmWFA4mHyeLOkUS3+H23UpJQPAnbE0bUS2CSUi6IdWM13Mhpu/OlBUE1t/YbA1QYCeWLYVsrRh+SeDm0RCQEf9pxa3Xpds4RcpJhqNVDbXPkzqTpOJcK/mT1VO17gUtn57C3J3cpMlUucW77Px3hRwZ83VJFGvriJ6YRHJboLmnWPUNXWAC7FbQg+/0IrjUL4RMFBxhYkEdSBLxiXB0xD8TkEZorywPXoP0I/jxhXGzWKEoJUFgeiTvs3srq2eO9Hq2Aeq92S9eDIgeYwIeawKoVY+KyVOumuBmpY0r+CgrgQVn7ohl9n6aIoc4TJjB0lEDWvmaGa05ETrGfPRd3lm1jI64b9SKtBJlbhAFTgEhuqWoUvlhCFdwRBW613cNWqnGYyDAdj+OQfdnugpBWHUa14jAKbbN2tlDrfR6mXUT9p7F3peyGvHNBb0UCl933GHgmyN6Hc/0R6+KZxiG7Ba6ReJjg6RiAos0DpTRsHWNz1s284Mr58DI+UF52N8B7vyIGzP4+nGJcWLXiNMtiR0/0S0BPtExAj3ZNwE42zh11e6duTZS/YlZaK6DebfrkOsb4aURMnsqiA+viHpPowDrwsoX1y6moRTZ20cMXtmpOgFYf8sGd8kFrRw4ptuCQagu2lJvwmpXEUu2DNSlOoEf12vY4aXOZkG6WY8OC4hzrwHRcjVhWepjd4KdYKK7jrx5H89WjRxPWoycydlS3jZ/I2VS/G9yp9gB6PG1T1aY4YAp3LfPHPPqABbtFRHS/jf34/T82FAfb"; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/ZapfDingbats.compressed.json -var ZapfDingbats_compressed_default = "eJxtmNtu20YQhl+F4FULyMGeD7pz3AY1ChtG7NpFA18w1NomIlECSRcxgrx7SVk7+wOdG8H5OJydf2Z2d5gf9cV+t0v9VK/r+6vXsXlOlbHe28paq229qj/t++m62aXZ4J/m8PRb1z9/baZxefK63Z6eXN5dVMvTCh83u277xr/6kLrnl2XNq7TpXnczuZyabdee98/b2VzM/x4/dd/T5qab2pd6PQ2vaVVfvDRD005puE3Lu7eH1HbN9hTjx4/77/X6y5lcnUmjVzHIVVDicVX/1W/SsO36dLMfu6nb9/X6TAoBD+5euvZbn8axXtuZ36dhPJrVQqgPQoh5hev91LWLkIv94W1Ygq9+aX+tZAx2tfz64284/sblN/rqfLP/mqrbt3FKu7G67Nv9cNgPzZQ2H6rz7bb6vLgZq89pTMO/M/xfEqturJpqSM/d7GJIm2oamk3aNcO3av80O5xh3yyKmm1193ZIT02bqovTKjP+MAf++7zsZvZ3276kYyWWXB0z99S18/PbafPHQ71W4fjn/fxnFO+ZvkrT0LVzTr78qB/+nk38bHM9exgP8zr1z9U7jt6840YW5uSJKcZOCaBBnKgm5mU8MVNYyMwWFvO7Ukagkmgg6sDWQ5yFFqjzUrLEaQ3BEmiwNsMSaZS0vgWfOkPHWQowNeTUc0kumnxZvsgPxlGai6VTGUqAVCTQ6QkWnc77DKEiLktSUBJKqHIQZ86d8gCpHYoiEzMsb1ubYy8vW50DChB5ZhGqrijD0EqUIeiaEHIfCg5Kpuu0ApiToaGPSY0uaQsyr65L2oKi1yFt1PLaQ3lzfXTgXodGoJYzglndSLDMPg1sTPJpQJHJigw0QrGERqD9YhyTOgONQDUyuF1zaxuokc/BW2ztXCMrGZ9WMW1oQZHIXWNBkSCfRZEL5BMUiZw6CzVSFCfUSGZFNjIldoKDkonTKQiJIGzWmFd3BizJJ9SINoLDriOfUCOZS+zg+KGD1qGiLNMLxtJD1/ns00ON6EzyUCM6vbxhoBKaqbG3DFQCNiL1iHccBPV0DHhQH/JW8EW90dkyFKGywCJU0WkVSvSGeiSUODWFFD0HYdPQVoiRgfPMA+/nnRgiAyNYSjpWNQcNSMrtFCUH4ZIRpSCWocFCSuhCEY6hoUClc0WC52BJlCYYLQdhN+hygRRRlo5BKRRLS6oihSqh+ZzzRGG1Mo4Iz1LoP0qsxDGFzk0JE42ji0jCPejomJKCuwil4m5CiRMEUMVSzVLDUstSx1Juc0oVWMpqY295qVltmtWmWW2a1aZZbZrVplltmtWmWW2G1WZYbYbVZlhthtVmWG2G1WZYbYbVZlhtltVmWW2W1WZZbZbVZlltltVmWW2W1QYjQCh7E2aAQHeGhCFgPoNoy8KNb2wxBhmGKBxoUZXlLGsLI6AsftEDHV0wIURVbANLcTKlGGBIKPOAxCmhePCKUwFzAmpDFRQvjA9R06Hq8TONvshgKDCuRAZTXigUxjxNFfKRo3CLhnIJBMFRvMZpqpNBMlQJzGT5WFQMVQI/AikPMIhEU1aDjqJvQwmjSHB05cC9jbYwc5UtAHNLhDw41ha+lEqF4JaH3gmB61SYcqInxTDmQK8v08vjqv4zDf1N0w3Lf4A8/vwPpfK11w=="; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Font.js -var compressedJsonForFontName = { - "Courier": Courier_compressed_default, - "Courier-Bold": Courier_Bold_compressed_default, - "Courier-Oblique": Courier_Oblique_compressed_default, - "Courier-BoldOblique": Courier_BoldOblique_compressed_default, - "Helvetica": Helvetica_compressed_default, - "Helvetica-Bold": Helvetica_Bold_compressed_default, - "Helvetica-Oblique": Helvetica_Oblique_compressed_default, - "Helvetica-BoldOblique": Helvetica_BoldOblique_compressed_default, - "Times-Roman": Times_Roman_compressed_default, - "Times-Bold": Times_Bold_compressed_default, - "Times-Italic": Times_Italic_compressed_default, - "Times-BoldItalic": Times_BoldItalic_compressed_default, - "Symbol": Symbol_compressed_default, - "ZapfDingbats": ZapfDingbats_compressed_default -}; -var FontNames; -(function(FontNames2) { - FontNames2["Courier"] = "Courier"; - FontNames2["CourierBold"] = "Courier-Bold"; - FontNames2["CourierOblique"] = "Courier-Oblique"; - FontNames2["CourierBoldOblique"] = "Courier-BoldOblique"; - FontNames2["Helvetica"] = "Helvetica"; - FontNames2["HelveticaBold"] = "Helvetica-Bold"; - FontNames2["HelveticaOblique"] = "Helvetica-Oblique"; - FontNames2["HelveticaBoldOblique"] = "Helvetica-BoldOblique"; - FontNames2["TimesRoman"] = "Times-Roman"; - FontNames2["TimesRomanBold"] = "Times-Bold"; - FontNames2["TimesRomanItalic"] = "Times-Italic"; - FontNames2["TimesRomanBoldItalic"] = "Times-BoldItalic"; - FontNames2["Symbol"] = "Symbol"; - FontNames2["ZapfDingbats"] = "ZapfDingbats"; -})(FontNames || (FontNames = {})); -var fontCache = {}; -var Font = ( - /** @class */ - function() { - function Font2() { - var _this = this; - this.getWidthOfGlyph = function(glyphName) { - return _this.CharWidths[glyphName]; - }; - this.getXAxisKerningForPair = function(leftGlyphName, rightGlyphName) { - return (_this.KernPairXAmounts[leftGlyphName] || {})[rightGlyphName]; - }; - } - Font2.load = function(fontName) { - var cachedFont = fontCache[fontName]; - if (cachedFont) - return cachedFont; - var json = decompressJson(compressedJsonForFontName[fontName]); - var font = Object.assign(new Font2(), JSON.parse(json)); - font.CharWidths = font.CharMetrics.reduce(function(acc, metric) { - acc[metric.N] = metric.WX; - return acc; - }, {}); - font.KernPairXAmounts = font.KernPairs.reduce(function(acc, _a3) { - var name1 = _a3[0], name2 = _a3[1], width = _a3[2]; - if (!acc[name1]) - acc[name1] = {}; - acc[name1][name2] = width; - return acc; - }, {}); - fontCache[fontName] = font; - return font; - }; - return Font2; - }() -); - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/all-encodings.compressed.json -var all_encodings_compressed_default = "eJztWsuy48iN/Ret74KZfHtX47meqfGjPHaXx4/wgpJ4JbooUU1JVXXb0f9u4JwESF13R7TD29koIpFi8gCJBHDA/Pvm+nraTuPmZ3/f5HHzs7/k8WlzvXS7fvPXp02eqyR/2vRfd2N3gqhUUfm0Od9P236+DoczxLWK66fNpZ93/fkGWaOy5mnTnUR67c57lRaZSItM/tnN/XnsX/DfIqg0JOk8HI4UK4BCAFzG+xWCQgXF02Y3nU4dJJVKKrx5mPgKBVMImOvYXY+QKJRCoHzXzxMErQrap810hqaloioF1e0L5kvFUwqe23Hu+Q+1TinWeZnuMwSKrRRsL8Nn/kOxlYLtOnzFWE1Viqmu/eceVioVaylYe1OwVKilQD0PCYgiLRtVcJz4kEItW13mNLi0UsCVAB77KyxTKeJKEPff3rsREkVcCeLD3He3HqArBV0J6G/v/fU2cK1WH23l0e3c7T71N9uUVv/c5i73bWlVs1Y0u5/3srO7aQb2EPUB+eUTva0TYgG5mGbbzZSUkJTpn75ygF4PThhq1SMGMds4HYZdN54n/rdWc8rv02bfH9I2hbqGsKbPnIYzHSc0qmTIxI6nuwpiAIQmU8F4Gy7jK8RwntAI1v3wedj39FmFECp508s4zUOyGmwpKrwbL8eOIlVU//Yf/S1J9C212Pa/uuSwbVDYlWzxf/aj/UtfWgm258t1GG1X1BVawfdnX0xdoRbjPCdBVGs1svo3R/tPVD1r2YL3k0kUfC04f9ldLkmk0NVwv+pO232SKXa126/vHAO5wPxNGivsRsZ/HDhWzLVg/iBuOSfMUTGrTX+b/qSIG0H8u+NEl1J4jcD7/XBI9kDcUYN/0/FNCDuNAP64skYOeLrykUsjElWC9+cmAEAB9NtrEijCplaE/YHvKuC5Iup8zxBAWtFrayakC2QC8uCbhggSskx9zXYNQSRkeuZWQBFKQowabNIfS/qeqOgSOFTINcC4DKcnE70H2zqElJAJ3k++dwgrIRPA47J5iCwr724RWELINFBTAAWiCL7SOogrIQj6abWBOH8hCPoL/4a4EoJgn9MWIq40lcY52cJAGbCHMgkpA3g9t7e0sRWgB1HnvjJYRez6yrSTlYJvRZmdCQhe80Pa24roNYL75uLo10WyKYHVeFLjYnImilM0qPDOJOKWNGlFCJsIrw/qsNv7OPY3SnNYSQ9DP46DLHylvGCcEFU08Nz6JIVx9Chd+93ENNhEWroSuC8SAi0WNznNpqH9+c5k1RQ0nIbi9/LnTzdmoKZAaAwaib/0g0Ti29wxG8gUgLey/O8eHmmqt4eiKTNYo416LPrLkcIWa2u06eZ5+mLBXCaoTp4m7pckBm41P8Qe0mUG6DUCYWY/fTmnCQbwkCa2043vrhA2gqakncwM3aGfe9GAj1Vw9qiuzPW2o4Or4PcxhmUu4atwAGKMy8wCscJhiDFfJh1lhY2K6mo250DrTJXOC82EUgVIkTMmOd0moqC5Dd24H15e0hRKJS0Cvg7Xm9RKgz9ErdWrTpfb6zV5Wx2ytwlDZLplUQ/8Ye72Qyq5RI5kqY4t6fe0iHOItdCYbo8zKOi0vLjvjrdjZ2IYRAPUZZ72910SI7vEiL9LaHSvrZFkipKOf02y8gc9vEbmKHQjRP95uH6ShZI9c9pao41otTPLICMETXSC5jLNupbP8bxo2Dy/DOfh9prk8BKNk935MPIo1jiKUSNQqiVSVSozBWYan5nmNMGz1+r6AleO8KJJwXdk2H8XwgVVP31AticBhdvqIZPwNPcvqWhqah74iIB6GsYuvbdGeYFS93yY775hPNh6giUlzNNXr/eaJmNYKrnLKznOt4ZsEQ6f5ZCfWVvJFK2Xs5BcP8ND23r5uJqDyaPmM90Oscl9a87aIC3HLCxz+uOzNFgOhA+P4XRq8hPTjP3Xhzn4oiYIm1svybSpOX03zDuJX4kqyAx3rrKZdZ3XNMggGh9lsUt/Fm+7m+1bGCxqOttPN/fOFiExKh+xnb1d0gz8qiiXmS0r5YxLaaULN/TaOsu4WEgTS3Fd1TCvlsvj9F1/PvQpPzHAZqiN9yZEntcyaDfet0mGOKLl5LGX6EMhU5ZGkf3QnVIWqvJA5FoG7KbLK1BcBcyLTfNYZGr7g8ar+WEWm63VgmSefX/q5k+r6Rplrdo/Heb+q00gKzcWUiVy3pY5RkGL7kept7/zSRS8Uc+Kw+nOV5ukqeu1KqtZ2Ds2a6yrWZghX/NS7q3OwQZ5WM0tgGCBPK7muPM6B2fP8wditayKMKG5YzW7rIvzkJcPs8vKOBGaRJxo+boMocrFfe407G0SJlJS7pO+KOrwqKkAcw4lp28Xi28vU7AM2Lfz9gUITKM8fJlcnoRtlJIvkwsSRtD2kXkuC8M2ytbX08vSME4ZHqd9cTQgojL5hXr60uhDxDJfTy7WQ3kXy2I9q+t+L7V+d3nZD+fDtrtdf7iZ8gPUNhVNSLOdFKmrqgg5UGR5ktUWkERW4ETnYSnQpK5PsqU2k3I5yZbCTGhJki0lmbJ2ypxOd8rYKXM23Slnp6yxclZkVZK1li1EVlMWmY0yyJokC5bIRdYm6sDCW/9X54knZEYnurpKJCEzNtHVdYqTmdGJrm6SiJRMsdWJmTS1MYWuSZwAHg3D5dSJO6tnpqPiNXIHapSQHkL9WNCyDwEZymTtQzyGcfx/rQVukWUP4RgGS29oG5RieEMSVKm67GISoHZUs0g6TKImlZMdbde2cDMFUCZBSBWevKlNIlRrBNQkEVpt0CXUSYTWGvzG1q5TldeFIklgFfiMvQ6tNXgMtk5IM+qSAjbJSpOh4wdUtYnQYgOqxkRosgFVayK02SJsYCJ02tRw9HkVodUG00UTodcG4+UmQrdN0dPhVYR2m8KPBhX1t/bkumgaofzWplwXDT2Oo9K2Lhp6dogUvT+HBpGC98fQxlDs/lSVCr/OVGZ7CGY3lXEIKyD3fylyrQS63P4VjTl0uRkGJxB+l5th2CBS5LkZhg0iRZ6bYdgPUqC5aYMEh8CSmzrsCinU3PRBKkNYyQ0qTgSiSmFQcSAQVAqDimSFmFIYVPaKFGphUNktUqiFQUVaUvLVFbaHSEZK47vC0LNfpOgLQ8+OkaIvDD2SjZbOXWHokWBQgJeGHkmlwaEz9EglKHFKQ48og8qmNPQgJEp0u9LQg4mAjJeGnm0rRV8aeratFH1p6EE8tBnQlYYebSutwLrS0KNrhRZYZegRbpV3dpWhR8tKSU9XGXr2rJTsdJXBTz0ruLjhT00rVaAyBVLTSjWoTIPUs1IVKlOBbSulAV1lOrBzpZS2q0wJNq8yhH7TovIOb1cb5tSXUny14Ut9KUYQUyS1phRgbaDZmEIiFrKThCnpIMMYGrZh0JBo7M01e+H65sZeUpPp6ZsbX4+dcH1xa1YgxYsIAWYF9rXBI1p/L9tiiL6ZmYGtrYpZybaz8caUCA1iA4iIPcEN0ZAQIuq70g2ZPCOQ7R+yE5riIjTojfMRESbsge1zHMhgsSlk5PR4u0WnQDraMOdEE7JTj7dbhAqpw4K3W4wKGZv3eHtempBkA+nHQldgrwXHM1jwCgj0pB7BwlcIbI7BnhbAAmsvHNJgISyw+MIxDRbEAqsvHNRgYSyw/GqZSE0j1l84rMFCWWABhuMaLJgFVmA4sMHCWUi8CRpZQAvkSzizwUJaIE/CoQ0W1ALpEU5tsLDGDzqg6yI0jaKzfxGaRuRBOLjBglsgAcpYHZhG5D04usECXCDdQd0WLMQFshwc6GBBLqQOETSyMBdIa3DMgwW6QD6Dcx4s1AXyDpSRYmoTsrpmzWKQyDJw0GWjTci2GCBZIAtkFDj+wSJZIJPA+Q8WygIJRCQkw8meFCJAsGAWCu8BiNAsjzTAXkKwEBfYg2IQqM3y7EFFauT/ZAcUGlk0DAU7nyzETPeSHBIa1aZmSe4IjWpTsyRphEa1qVmSTFMjU7Mki4ZGreEsSZ+hUWO6s7+bc4/8cdJlaNSYQdjTRbEbM3+c5BgaWTgOSA7stkSLiqFiCwbgLUiHinQX4C1Kh4pEl+BN94oEl+DNdBWJLcH74yS0AG8RPeCjRmRZ3JiR0ZWKrItbW7MmZWVlbG+vSVWxHY2tyW+lJTUy0yEVgdTKmmYlNplKagSDCMFlTIaH8GmVMWkpIj6sMsQv+Ae3UmUIX3AP6q0yRC94x/IOBC84B4+VyhC7yHTIELQRhGgM32hchmAM14hMRCpEMIZrNC6DJvAMWkxl0ASOQYOpDJqACrX+EmgCX9EQ8f3T5stwlggXf/otCfss8O19uvX7LfqmP3Z1AiRPP2JPY2pA/vTbFIhHqhFedB2s0/2v3bIAG1z14yH8CVcvwJFFoePr5cgbDv9/G+Pfvo2BUIP6ix0r8EO9ZYARuKFeMMAIvFA/gWMESqifiTACG9QrBTpCBFGK9wuMQKz0UgJGoH+C7L8xAvPTL40Y4au7gPkfjEAB9SYBRmB/eokAIxA/vT6AETifXh7ACHRPrwroqAFX0i/5GIEmCZb/xQj8Tu8LYARqp5cFMAKr03sCGIHQ6SUBjMDlBMsfMLIP//+HERicXlzACORNsPxJR2iW4I4FRj92EQa8TTuGInY3/vHrMSBwuoPX3TDot4c7osKPXJtBm0XLvsPc0XfRZkHNhxE4nLZsMQJ902/jDOQIkriXkAL7JhEyNh1ZemtZ98IxCZvebeCYZE3AHjkmUdMPGRyTpAm6v3FMgqY3EjgmOdPPZhyTmOlFBIwZxHEPgWNeJ9BbBxyz+af9c45J2PRMcEyyph8EOSZP03PMMTmaXjLgmN0+vWLAMfBpFfeZY7838AVjNilxLYJj4NOy7ZVjUju9zcHxv3/FiVcKULCpf9yGcb9qEOPL/6pp7GyO2cU+S7N2AaOzDMHKBXxO4/goyYBiZ3S7+yxxf0fNKud0r31a0gnddp4+9WfTpHJOt/r4yfIlfVDq5z7dgWABg8amf4SBnLxZQ9A0718keFqMZSGDNurhPoxjf5r84LGeQY/77d0vb3QvyYc1DTrd9nWo56movd196uyqy792faz2prfkJHyAHPiBONTe+kZ2ephrlhb4Ll0HSRfRNOLxqk5onB1LWu4kCPAGRmicIDOZ6j67Ro0T5V2/F6t1lDpTlkz6iMTpspj/JI53H83+jZNmt/+ybY2TZ1lRctmcUldonEDLxLEbGV5aZ9AwRnqAJmydSFu6c2dunU6/8yDIL5Og0+8W67VOp98xsL6kr1H8FglO/W45Uq1z6ncPXto6rX432zlpnVW/e6bAGfXPV0aOmXPqZwcbM+fUzw42Zs6pnx/BxsyJ9fMaV8ycW79fre3c+v1qbefW79+u7QT7/ePazrGf+UE7Zk6wf+Mmi8EJ9ocFQnCC/WGBEJxgf3gDgddNNIp/WC3Mb12i24cHXIEfkcs3FzGDM/UPnnJjcKb+cQXOmfrHFThn6h/fgItO1z8+4IjO2P+0LBOdsX9znHgBKUYn7Id+Pkklvh3TCgtpX9DFhbSvll1I+1t0C3NfTBcX5v4IeSHv5sYxX7g7H86dt+/Wbpw7c+8XsLkz934Bmztz79+AzZ2+9w+4cmfww2ptZ/DDam1n8MPbtZ3GDw9rs9ui3KZPblw4tz8vJiuc208LhMK5/bRAKJzbT28gFE7wp9XCTvCnR1zO8ZeLw7Fwjj8tTlw4x78v0Ern+PcFWukc//4GWulE//6AonSu/7paxrn+zZ2YnRclRK/rBXJsCAjxh2cKEAWVJ02ku/wOoFv2+12XkmnODwHgW4uQGVbZ0uM7mAJ1b/68/JlpUMnWdy5MF6/Vd5eL19YYSPd6FqPwBkNQo/h2NQxdQQ3bn/dpCxrGrqCW7U8rKZl/mfi0Xytk3Am66ZhYbg4y+KAVslDwbXdNL2d5qU5hnYBlTZaa6hs2t1qWdaeeTptcLco+hl5R7w4H5uOGcQbtEkpT18GusOI2xT9dYcVJf7zCSjmbD+Iud2s1NPRb9E+0UICmizb8ZK/+5JOLOulSqwaw5VJr2vB8dSFn89fvv/8H0oq1dA=="; - -// node_modules/.pnpm/@pdf-lib+standard-fonts@1.0.0/node_modules/@pdf-lib/standard-fonts/es/Encoding.js -var decompressedEncodings = decompressJson(all_encodings_compressed_default); -var allUnicodeMappings = JSON.parse(decompressedEncodings); -var Encoding = ( - /** @class */ - /* @__PURE__ */ function() { - function Encoding2(name, unicodeMappings) { - var _this = this; - this.canEncodeUnicodeCodePoint = function(codePoint) { - return codePoint in _this.unicodeMappings; - }; - this.encodeUnicodeCodePoint = function(codePoint) { - var mapped = _this.unicodeMappings[codePoint]; - if (!mapped) { - var str = String.fromCharCode(codePoint); - var hexCode = "0x" + padStart2(codePoint.toString(16), 4, "0"); - var msg = _this.name + ' cannot encode "' + str + '" (' + hexCode + ")"; - throw new Error(msg); - } - return { code: mapped[0], name: mapped[1] }; - }; - this.name = name; - this.supportedCodePoints = Object.keys(unicodeMappings).map(Number).sort(function(a, b) { - return a - b; - }); - this.unicodeMappings = unicodeMappings; - } - return Encoding2; - }() -); -var Encodings = { - Symbol: new Encoding("Symbol", allUnicodeMappings.symbol), - ZapfDingbats: new Encoding("ZapfDingbats", allUnicodeMappings.zapfdingbats), - WinAnsi: new Encoding("WinAnsi", allUnicodeMappings.win1252) -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/objects.js -var values = function(obj) { - return Object.keys(obj).map(function(k) { - return obj[k]; - }); -}; -var StandardFontValues = values(FontNames); -var isStandardFont = function(input) { - return StandardFontValues.includes(input); -}; -var rectanglesAreEqual = function(a, b) { - return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/validators.js -var backtick = function(val) { - return "`" + val + "`"; -}; -var singleQuote = function(val) { - return "'" + val + "'"; -}; -var formatValue = function(value) { - var type = typeof value; - if (type === "string") - return singleQuote(value); - else if (type === "undefined") - return backtick(value); - else - return value; -}; -var createValueErrorMsg = function(value, valueName, values2) { - var allowedValues = new Array(values2.length); - for (var idx = 0, len = values2.length; idx < len; idx++) { - var v = values2[idx]; - allowedValues[idx] = formatValue(v); - } - var joinedValues = allowedValues.join(" or "); - return backtick(valueName) + " must be one of " + joinedValues + ", but was actually " + formatValue(value); -}; -var assertIsOneOf = function(value, valueName, allowedValues) { - if (!Array.isArray(allowedValues)) { - allowedValues = values(allowedValues); - } - for (var idx = 0, len = allowedValues.length; idx < len; idx++) { - if (value === allowedValues[idx]) - return; - } - throw new TypeError(createValueErrorMsg(value, valueName, allowedValues)); -}; -var assertIsOneOfOrUndefined = function(value, valueName, allowedValues) { - if (!Array.isArray(allowedValues)) { - allowedValues = values(allowedValues); - } - assertIsOneOf(value, valueName, allowedValues.concat(void 0)); -}; -var assertIsSubset = function(values2, valueName, allowedValues) { - if (!Array.isArray(allowedValues)) { - allowedValues = values(allowedValues); - } - for (var idx = 0, len = values2.length; idx < len; idx++) { - assertIsOneOf(values2[idx], valueName, allowedValues); - } -}; -var getType = function(val) { - if (val === null) - return "null"; - if (val === void 0) - return "undefined"; - if (typeof val === "string") - return "string"; - if (isNaN(val)) - return "NaN"; - if (typeof val === "number") - return "number"; - if (typeof val === "boolean") - return "boolean"; - if (typeof val === "symbol") - return "symbol"; - if (typeof val === "bigint") - return "bigint"; - if (val.constructor && val.constructor.name) - return val.constructor.name; - if (val.name) - return val.name; - if (val.constructor) - return String(val.constructor); - return String(val); -}; -var isType = function(value, type) { - if (type === "null") - return value === null; - if (type === "undefined") - return value === void 0; - if (type === "string") - return typeof value === "string"; - if (type === "number") - return typeof value === "number" && !isNaN(value); - if (type === "boolean") - return typeof value === "boolean"; - if (type === "symbol") - return typeof value === "symbol"; - if (type === "bigint") - return typeof value === "bigint"; - if (type === Date) - return value instanceof Date; - if (type === Array) - return value instanceof Array; - if (type === Uint8Array) - return value instanceof Uint8Array; - if (type === ArrayBuffer) - return value instanceof ArrayBuffer; - if (type === Function) - return value instanceof Function; - return value instanceof type[0]; -}; -var createTypeErrorMsg = function(value, valueName, types) { - var allowedTypes = new Array(types.length); - for (var idx = 0, len = types.length; idx < len; idx++) { - var type = types[idx]; - if (type === "null") - allowedTypes[idx] = backtick("null"); - if (type === "undefined") - allowedTypes[idx] = backtick("undefined"); - if (type === "string") - allowedTypes[idx] = backtick("string"); - else if (type === "number") - allowedTypes[idx] = backtick("number"); - else if (type === "boolean") - allowedTypes[idx] = backtick("boolean"); - else if (type === "symbol") - allowedTypes[idx] = backtick("symbol"); - else if (type === "bigint") - allowedTypes[idx] = backtick("bigint"); - else if (type === Array) - allowedTypes[idx] = backtick("Array"); - else if (type === Uint8Array) - allowedTypes[idx] = backtick("Uint8Array"); - else if (type === ArrayBuffer) - allowedTypes[idx] = backtick("ArrayBuffer"); - else - allowedTypes[idx] = backtick(type[1]); - } - var joinedTypes = allowedTypes.join(" or "); - return backtick(valueName) + " must be of type " + joinedTypes + ", but was actually of type " + backtick(getType(value)); -}; -var assertIs = function(value, valueName, types) { - for (var idx = 0, len = types.length; idx < len; idx++) { - if (isType(value, types[idx])) - return; - } - throw new TypeError(createTypeErrorMsg(value, valueName, types)); -}; -var assertOrUndefined = function(value, valueName, types) { - assertIs(value, valueName, types.concat("undefined")); -}; -var assertEachIs = function(values2, valueName, types) { - for (var idx = 0, len = values2.length; idx < len; idx++) { - assertIs(values2[idx], valueName, types); - } -}; -var assertRange = function(value, valueName, min, max) { - assertIs(value, valueName, ["number"]); - assertIs(min, "min", ["number"]); - assertIs(max, "max", ["number"]); - max = Math.max(min, max); - if (value < min || value > max) { - throw new Error(backtick(valueName) + " must be at least " + min + " and at most " + max + ", but was actually " + value); - } -}; -var assertRangeOrUndefined = function(value, valueName, min, max) { - assertIs(value, valueName, ["number", "undefined"]); - if (typeof value === "number") - assertRange(value, valueName, min, max); -}; -var assertMultiple = function(value, valueName, multiplier) { - assertIs(value, valueName, ["number"]); - if (value % multiplier !== 0) { - throw new Error(backtick(valueName) + " must be a multiple of " + multiplier + ", but was actually " + value); - } -}; -var assertInteger = function(value, valueName) { - if (!Number.isInteger(value)) { - throw new Error(backtick(valueName) + " must be an integer, but was actually " + value); - } -}; -var assertPositive = function(value, valueName) { - if (![1, 0].includes(Math.sign(value))) { - throw new Error(backtick(valueName) + " must be a positive number or 0, but was actually " + value); - } -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/pdfDocEncoding.js -var pdfDocEncodingToUnicode = new Uint16Array(256); -for (idx = 0; idx < 256; idx++) { - pdfDocEncodingToUnicode[idx] = idx; -} -var idx; -pdfDocEncodingToUnicode[22] = toCharCode(""); -pdfDocEncodingToUnicode[24] = toCharCode("\u02D8"); -pdfDocEncodingToUnicode[25] = toCharCode("\u02C7"); -pdfDocEncodingToUnicode[26] = toCharCode("\u02C6"); -pdfDocEncodingToUnicode[27] = toCharCode("\u02D9"); -pdfDocEncodingToUnicode[28] = toCharCode("\u02DD"); -pdfDocEncodingToUnicode[29] = toCharCode("\u02DB"); -pdfDocEncodingToUnicode[30] = toCharCode("\u02DA"); -pdfDocEncodingToUnicode[31] = toCharCode("\u02DC"); -pdfDocEncodingToUnicode[127] = toCharCode("\uFFFD"); -pdfDocEncodingToUnicode[128] = toCharCode("\u2022"); -pdfDocEncodingToUnicode[129] = toCharCode("\u2020"); -pdfDocEncodingToUnicode[130] = toCharCode("\u2021"); -pdfDocEncodingToUnicode[131] = toCharCode("\u2026"); -pdfDocEncodingToUnicode[132] = toCharCode("\u2014"); -pdfDocEncodingToUnicode[133] = toCharCode("\u2013"); -pdfDocEncodingToUnicode[134] = toCharCode("\u0192"); -pdfDocEncodingToUnicode[135] = toCharCode("\u2044"); -pdfDocEncodingToUnicode[136] = toCharCode("\u2039"); -pdfDocEncodingToUnicode[137] = toCharCode("\u203A"); -pdfDocEncodingToUnicode[138] = toCharCode("\u2212"); -pdfDocEncodingToUnicode[139] = toCharCode("\u2030"); -pdfDocEncodingToUnicode[140] = toCharCode("\u201E"); -pdfDocEncodingToUnicode[141] = toCharCode("\u201C"); -pdfDocEncodingToUnicode[142] = toCharCode("\u201D"); -pdfDocEncodingToUnicode[143] = toCharCode("\u2018"); -pdfDocEncodingToUnicode[144] = toCharCode("\u2019"); -pdfDocEncodingToUnicode[145] = toCharCode("\u201A"); -pdfDocEncodingToUnicode[146] = toCharCode("\u2122"); -pdfDocEncodingToUnicode[147] = toCharCode("\uFB01"); -pdfDocEncodingToUnicode[148] = toCharCode("\uFB02"); -pdfDocEncodingToUnicode[149] = toCharCode("\u0141"); -pdfDocEncodingToUnicode[150] = toCharCode("\u0152"); -pdfDocEncodingToUnicode[151] = toCharCode("\u0160"); -pdfDocEncodingToUnicode[152] = toCharCode("\u0178"); -pdfDocEncodingToUnicode[153] = toCharCode("\u017D"); -pdfDocEncodingToUnicode[154] = toCharCode("\u0131"); -pdfDocEncodingToUnicode[155] = toCharCode("\u0142"); -pdfDocEncodingToUnicode[156] = toCharCode("\u0153"); -pdfDocEncodingToUnicode[157] = toCharCode("\u0161"); -pdfDocEncodingToUnicode[158] = toCharCode("\u017E"); -pdfDocEncodingToUnicode[159] = toCharCode("\uFFFD"); -pdfDocEncodingToUnicode[160] = toCharCode("\u20AC"); -pdfDocEncodingToUnicode[173] = toCharCode("\uFFFD"); -var pdfDocEncodingDecode = function(bytes) { - var codePoints = new Array(bytes.length); - for (var idx = 0, len = bytes.length; idx < len; idx++) { - codePoints[idx] = pdfDocEncodingToUnicode[bytes[idx]]; - } - return String.fromCodePoint.apply(String, codePoints); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/Cache.js -var Cache = ( - /** @class */ - function() { - function Cache2(populate) { - this.populate = populate; - this.value = void 0; - } - Cache2.prototype.getValue = function() { - return this.value; - }; - Cache2.prototype.access = function() { - if (!this.value) - this.value = this.populate(); - return this.value; - }; - Cache2.prototype.invalidate = function() { - this.value = void 0; - }; - Cache2.populatedBy = function(populate) { - return new Cache2(populate); - }; - return Cache2; - }() -); -var Cache_default = Cache; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/errors.js -var MethodNotImplementedError = ( - /** @class */ - function(_super) { - __extends(MethodNotImplementedError2, _super); - function MethodNotImplementedError2(className, methodName) { - var _this = this; - var msg = "Method " + className + "." + methodName + "() not implemented"; - _this = _super.call(this, msg) || this; - return _this; - } - return MethodNotImplementedError2; - }(Error) -); -var PrivateConstructorError = ( - /** @class */ - function(_super) { - __extends(PrivateConstructorError2, _super); - function PrivateConstructorError2(className) { - var _this = this; - var msg = "Cannot construct " + className + " - it has a private constructor"; - _this = _super.call(this, msg) || this; - return _this; - } - return PrivateConstructorError2; - }(Error) -); -var UnexpectedObjectTypeError = ( - /** @class */ - function(_super) { - __extends(UnexpectedObjectTypeError2, _super); - function UnexpectedObjectTypeError2(expected, actual) { - var _this = this; - var name = function(t) { - var _a3, _b3; - return (_a3 = t === null || t === void 0 ? void 0 : t.name) !== null && _a3 !== void 0 ? _a3 : (_b3 = t === null || t === void 0 ? void 0 : t.constructor) === null || _b3 === void 0 ? void 0 : _b3.name; - }; - var expectedTypes = Array.isArray(expected) ? expected.map(name) : [name(expected)]; - var msg = "Expected instance of " + expectedTypes.join(" or ") + ", " + ("but got instance of " + (actual ? name(actual) : actual)); - _this = _super.call(this, msg) || this; - return _this; - } - return UnexpectedObjectTypeError2; - }(Error) -); -var UnsupportedEncodingError = ( - /** @class */ - function(_super) { - __extends(UnsupportedEncodingError2, _super); - function UnsupportedEncodingError2(encoding) { - var _this = this; - var msg = encoding + " stream encoding not supported"; - _this = _super.call(this, msg) || this; - return _this; - } - return UnsupportedEncodingError2; - }(Error) -); -var ReparseError = ( - /** @class */ - function(_super) { - __extends(ReparseError2, _super); - function ReparseError2(className, methodName) { - var _this = this; - var msg = "Cannot call " + className + "." + methodName + "() more than once"; - _this = _super.call(this, msg) || this; - return _this; - } - return ReparseError2; - }(Error) -); -var MissingCatalogError = ( - /** @class */ - function(_super) { - __extends(MissingCatalogError2, _super); - function MissingCatalogError2(ref) { - var _this = this; - var msg = "Missing catalog (ref=" + ref + ")"; - _this = _super.call(this, msg) || this; - return _this; - } - return MissingCatalogError2; - }(Error) -); -var MissingPageContentsEmbeddingError = ( - /** @class */ - function(_super) { - __extends(MissingPageContentsEmbeddingError2, _super); - function MissingPageContentsEmbeddingError2() { - var _this = this; - var msg = "Can't embed page with missing Contents"; - _this = _super.call(this, msg) || this; - return _this; - } - return MissingPageContentsEmbeddingError2; - }(Error) -); -var UnrecognizedStreamTypeError = ( - /** @class */ - function(_super) { - __extends(UnrecognizedStreamTypeError2, _super); - function UnrecognizedStreamTypeError2(stream2) { - var _a3, _b3, _c2; - var _this = this; - var streamType = (_c2 = (_b3 = (_a3 = stream2 === null || stream2 === void 0 ? void 0 : stream2.contructor) === null || _a3 === void 0 ? void 0 : _a3.name) !== null && _b3 !== void 0 ? _b3 : stream2 === null || stream2 === void 0 ? void 0 : stream2.name) !== null && _c2 !== void 0 ? _c2 : stream2; - var msg = "Unrecognized stream type: " + streamType; - _this = _super.call(this, msg) || this; - return _this; - } - return UnrecognizedStreamTypeError2; - }(Error) -); -var PageEmbeddingMismatchedContextError = ( - /** @class */ - function(_super) { - __extends(PageEmbeddingMismatchedContextError2, _super); - function PageEmbeddingMismatchedContextError2() { - var _this = this; - var msg = "Found mismatched contexts while embedding pages. All pages in the array passed to `PDFDocument.embedPages()` must be from the same document."; - _this = _super.call(this, msg) || this; - return _this; - } - return PageEmbeddingMismatchedContextError2; - }(Error) -); -var PDFArrayIsNotRectangleError = ( - /** @class */ - function(_super) { - __extends(PDFArrayIsNotRectangleError2, _super); - function PDFArrayIsNotRectangleError2(size) { - var _this = this; - var msg = "Attempted to convert PDFArray with " + size + " elements to rectangle, but must have exactly 4 elements."; - _this = _super.call(this, msg) || this; - return _this; - } - return PDFArrayIsNotRectangleError2; - }(Error) -); -var InvalidPDFDateStringError = ( - /** @class */ - function(_super) { - __extends(InvalidPDFDateStringError2, _super); - function InvalidPDFDateStringError2(value) { - var _this = this; - var msg = 'Attempted to convert "' + value + '" to a date, but it does not match the PDF date string format.'; - _this = _super.call(this, msg) || this; - return _this; - } - return InvalidPDFDateStringError2; - }(Error) -); -var InvalidTargetIndexError = ( - /** @class */ - function(_super) { - __extends(InvalidTargetIndexError2, _super); - function InvalidTargetIndexError2(targetIndex, Count) { - var _this = this; - var msg = "Invalid targetIndex specified: targetIndex=" + targetIndex + " must be less than Count=" + Count; - _this = _super.call(this, msg) || this; - return _this; - } - return InvalidTargetIndexError2; - }(Error) -); -var CorruptPageTreeError = ( - /** @class */ - function(_super) { - __extends(CorruptPageTreeError2, _super); - function CorruptPageTreeError2(targetIndex, operation) { - var _this = this; - var msg = "Failed to " + operation + " at targetIndex=" + targetIndex + " due to corrupt page tree: It is likely that one or more 'Count' entries are invalid"; - _this = _super.call(this, msg) || this; - return _this; - } - return CorruptPageTreeError2; - }(Error) -); -var IndexOutOfBoundsError = ( - /** @class */ - function(_super) { - __extends(IndexOutOfBoundsError2, _super); - function IndexOutOfBoundsError2(index2, min, max) { - var _this = this; - var msg = "index should be at least " + min + " and at most " + max + ", but was actually " + index2; - _this = _super.call(this, msg) || this; - return _this; - } - return IndexOutOfBoundsError2; - }(Error) -); -var InvalidAcroFieldValueError = ( - /** @class */ - function(_super) { - __extends(InvalidAcroFieldValueError2, _super); - function InvalidAcroFieldValueError2() { - var _this = this; - var msg = "Attempted to set invalid field value"; - _this = _super.call(this, msg) || this; - return _this; - } - return InvalidAcroFieldValueError2; - }(Error) -); -var MultiSelectValueError = ( - /** @class */ - function(_super) { - __extends(MultiSelectValueError2, _super); - function MultiSelectValueError2() { - var _this = this; - var msg = "Attempted to select multiple values for single-select field"; - _this = _super.call(this, msg) || this; - return _this; - } - return MultiSelectValueError2; - }(Error) -); -var MissingDAEntryError = ( - /** @class */ - function(_super) { - __extends(MissingDAEntryError2, _super); - function MissingDAEntryError2(fieldName) { - var _this = this; - var msg = "No /DA (default appearance) entry found for field: " + fieldName; - _this = _super.call(this, msg) || this; - return _this; - } - return MissingDAEntryError2; - }(Error) -); -var MissingTfOperatorError = ( - /** @class */ - function(_super) { - __extends(MissingTfOperatorError2, _super); - function MissingTfOperatorError2(fieldName) { - var _this = this; - var msg = "No Tf operator found for DA of field: " + fieldName; - _this = _super.call(this, msg) || this; - return _this; - } - return MissingTfOperatorError2; - }(Error) -); -var NumberParsingError = ( - /** @class */ - function(_super) { - __extends(NumberParsingError2, _super); - function NumberParsingError2(pos, value) { - var _this = this; - var msg = "Failed to parse number " + ("(line:" + pos.line + " col:" + pos.column + " offset=" + pos.offset + '): "' + value + '"'); - _this = _super.call(this, msg) || this; - return _this; - } - return NumberParsingError2; - }(Error) -); -var PDFParsingError = ( - /** @class */ - function(_super) { - __extends(PDFParsingError2, _super); - function PDFParsingError2(pos, details) { - var _this = this; - var msg = "Failed to parse PDF document " + ("(line:" + pos.line + " col:" + pos.column + " offset=" + pos.offset + "): " + details); - _this = _super.call(this, msg) || this; - return _this; - } - return PDFParsingError2; - }(Error) -); -var NextByteAssertionError = ( - /** @class */ - function(_super) { - __extends(NextByteAssertionError2, _super); - function NextByteAssertionError2(pos, expectedByte, actualByte) { - var _this = this; - var msg = "Expected next byte to be " + expectedByte + " but it was actually " + actualByte; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return NextByteAssertionError2; - }(PDFParsingError) -); -var PDFObjectParsingError = ( - /** @class */ - function(_super) { - __extends(PDFObjectParsingError2, _super); - function PDFObjectParsingError2(pos, byte) { - var _this = this; - var msg = "Failed to parse PDF object starting with the following byte: " + byte; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return PDFObjectParsingError2; - }(PDFParsingError) -); -var PDFInvalidObjectParsingError = ( - /** @class */ - function(_super) { - __extends(PDFInvalidObjectParsingError2, _super); - function PDFInvalidObjectParsingError2(pos) { - var _this = this; - var msg = "Failed to parse invalid PDF object"; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return PDFInvalidObjectParsingError2; - }(PDFParsingError) -); -var PDFStreamParsingError = ( - /** @class */ - function(_super) { - __extends(PDFStreamParsingError2, _super); - function PDFStreamParsingError2(pos) { - var _this = this; - var msg = "Failed to parse PDF stream"; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return PDFStreamParsingError2; - }(PDFParsingError) -); -var UnbalancedParenthesisError = ( - /** @class */ - function(_super) { - __extends(UnbalancedParenthesisError2, _super); - function UnbalancedParenthesisError2(pos) { - var _this = this; - var msg = "Failed to parse PDF literal string due to unbalanced parenthesis"; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return UnbalancedParenthesisError2; - }(PDFParsingError) -); -var StalledParserError = ( - /** @class */ - function(_super) { - __extends(StalledParserError2, _super); - function StalledParserError2(pos) { - var _this = this; - var msg = "Parser stalled"; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return StalledParserError2; - }(PDFParsingError) -); -var MissingPDFHeaderError = ( - /** @class */ - function(_super) { - __extends(MissingPDFHeaderError2, _super); - function MissingPDFHeaderError2(pos) { - var _this = this; - var msg = "No PDF header found"; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return MissingPDFHeaderError2; - }(PDFParsingError) -); -var MissingKeywordError = ( - /** @class */ - function(_super) { - __extends(MissingKeywordError2, _super); - function MissingKeywordError2(pos, keyword) { - var _this = this; - var msg = "Did not find expected keyword '" + arrayAsString(keyword) + "'"; - _this = _super.call(this, pos, msg) || this; - return _this; - } - return MissingKeywordError2; - }(PDFParsingError) -); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/syntax/CharCodes.js -var CharCodes; -(function(CharCodes2) { - CharCodes2[CharCodes2["Null"] = 0] = "Null"; - CharCodes2[CharCodes2["Backspace"] = 8] = "Backspace"; - CharCodes2[CharCodes2["Tab"] = 9] = "Tab"; - CharCodes2[CharCodes2["Newline"] = 10] = "Newline"; - CharCodes2[CharCodes2["FormFeed"] = 12] = "FormFeed"; - CharCodes2[CharCodes2["CarriageReturn"] = 13] = "CarriageReturn"; - CharCodes2[CharCodes2["Space"] = 32] = "Space"; - CharCodes2[CharCodes2["ExclamationPoint"] = 33] = "ExclamationPoint"; - CharCodes2[CharCodes2["Hash"] = 35] = "Hash"; - CharCodes2[CharCodes2["Percent"] = 37] = "Percent"; - CharCodes2[CharCodes2["LeftParen"] = 40] = "LeftParen"; - CharCodes2[CharCodes2["RightParen"] = 41] = "RightParen"; - CharCodes2[CharCodes2["Plus"] = 43] = "Plus"; - CharCodes2[CharCodes2["Minus"] = 45] = "Minus"; - CharCodes2[CharCodes2["Dash"] = 45] = "Dash"; - CharCodes2[CharCodes2["Period"] = 46] = "Period"; - CharCodes2[CharCodes2["ForwardSlash"] = 47] = "ForwardSlash"; - CharCodes2[CharCodes2["Zero"] = 48] = "Zero"; - CharCodes2[CharCodes2["One"] = 49] = "One"; - CharCodes2[CharCodes2["Two"] = 50] = "Two"; - CharCodes2[CharCodes2["Three"] = 51] = "Three"; - CharCodes2[CharCodes2["Four"] = 52] = "Four"; - CharCodes2[CharCodes2["Five"] = 53] = "Five"; - CharCodes2[CharCodes2["Six"] = 54] = "Six"; - CharCodes2[CharCodes2["Seven"] = 55] = "Seven"; - CharCodes2[CharCodes2["Eight"] = 56] = "Eight"; - CharCodes2[CharCodes2["Nine"] = 57] = "Nine"; - CharCodes2[CharCodes2["LessThan"] = 60] = "LessThan"; - CharCodes2[CharCodes2["GreaterThan"] = 62] = "GreaterThan"; - CharCodes2[CharCodes2["A"] = 65] = "A"; - CharCodes2[CharCodes2["D"] = 68] = "D"; - CharCodes2[CharCodes2["E"] = 69] = "E"; - CharCodes2[CharCodes2["F"] = 70] = "F"; - CharCodes2[CharCodes2["O"] = 79] = "O"; - CharCodes2[CharCodes2["P"] = 80] = "P"; - CharCodes2[CharCodes2["R"] = 82] = "R"; - CharCodes2[CharCodes2["LeftSquareBracket"] = 91] = "LeftSquareBracket"; - CharCodes2[CharCodes2["BackSlash"] = 92] = "BackSlash"; - CharCodes2[CharCodes2["RightSquareBracket"] = 93] = "RightSquareBracket"; - CharCodes2[CharCodes2["a"] = 97] = "a"; - CharCodes2[CharCodes2["b"] = 98] = "b"; - CharCodes2[CharCodes2["d"] = 100] = "d"; - CharCodes2[CharCodes2["e"] = 101] = "e"; - CharCodes2[CharCodes2["f"] = 102] = "f"; - CharCodes2[CharCodes2["i"] = 105] = "i"; - CharCodes2[CharCodes2["j"] = 106] = "j"; - CharCodes2[CharCodes2["l"] = 108] = "l"; - CharCodes2[CharCodes2["m"] = 109] = "m"; - CharCodes2[CharCodes2["n"] = 110] = "n"; - CharCodes2[CharCodes2["o"] = 111] = "o"; - CharCodes2[CharCodes2["r"] = 114] = "r"; - CharCodes2[CharCodes2["s"] = 115] = "s"; - CharCodes2[CharCodes2["t"] = 116] = "t"; - CharCodes2[CharCodes2["u"] = 117] = "u"; - CharCodes2[CharCodes2["x"] = 120] = "x"; - CharCodes2[CharCodes2["LeftCurly"] = 123] = "LeftCurly"; - CharCodes2[CharCodes2["RightCurly"] = 125] = "RightCurly"; - CharCodes2[CharCodes2["Tilde"] = 126] = "Tilde"; -})(CharCodes || (CharCodes = {})); -var CharCodes_default = CharCodes; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/PDFContext.js -var import_pako3 = __toESM(require_pako()); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/document/PDFHeader.js -var PDFHeader = ( - /** @class */ - function() { - function PDFHeader2(major, minor) { - this.major = String(major); - this.minor = String(minor); - } - PDFHeader2.prototype.toString = function() { - var bc = charFromCode(129); - return "%PDF-" + this.major + "." + this.minor + "\n%" + bc + bc + bc + bc; - }; - PDFHeader2.prototype.sizeInBytes = function() { - return 12 + this.major.length + this.minor.length; - }; - PDFHeader2.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - buffer[offset++] = CharCodes_default.Percent; - buffer[offset++] = CharCodes_default.P; - buffer[offset++] = CharCodes_default.D; - buffer[offset++] = CharCodes_default.F; - buffer[offset++] = CharCodes_default.Dash; - offset += copyStringIntoBuffer(this.major, buffer, offset); - buffer[offset++] = CharCodes_default.Period; - offset += copyStringIntoBuffer(this.minor, buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.Percent; - buffer[offset++] = 129; - buffer[offset++] = 129; - buffer[offset++] = 129; - buffer[offset++] = 129; - return offset - initialOffset; - }; - PDFHeader2.forVersion = function(major, minor) { - return new PDFHeader2(major, minor); - }; - return PDFHeader2; - }() -); -var PDFHeader_default = PDFHeader; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFObject.js -var PDFObject = ( - /** @class */ - function() { - function PDFObject2() { - } - PDFObject2.prototype.clone = function(_context) { - throw new MethodNotImplementedError(this.constructor.name, "clone"); - }; - PDFObject2.prototype.toString = function() { - throw new MethodNotImplementedError(this.constructor.name, "toString"); - }; - PDFObject2.prototype.sizeInBytes = function() { - throw new MethodNotImplementedError(this.constructor.name, "sizeInBytes"); - }; - PDFObject2.prototype.copyBytesInto = function(_buffer, _offset) { - throw new MethodNotImplementedError(this.constructor.name, "copyBytesInto"); - }; - return PDFObject2; - }() -); -var PDFObject_default = PDFObject; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFNumber.js -var PDFNumber = ( - /** @class */ - function(_super) { - __extends(PDFNumber2, _super); - function PDFNumber2(value) { - var _this = _super.call(this) || this; - _this.numberValue = value; - _this.stringValue = numberToString(value); - return _this; - } - PDFNumber2.prototype.asNumber = function() { - return this.numberValue; - }; - PDFNumber2.prototype.value = function() { - return this.numberValue; - }; - PDFNumber2.prototype.clone = function() { - return PDFNumber2.of(this.numberValue); - }; - PDFNumber2.prototype.toString = function() { - return this.stringValue; - }; - PDFNumber2.prototype.sizeInBytes = function() { - return this.stringValue.length; - }; - PDFNumber2.prototype.copyBytesInto = function(buffer, offset) { - offset += copyStringIntoBuffer(this.stringValue, buffer, offset); - return this.stringValue.length; - }; - PDFNumber2.of = function(value) { - return new PDFNumber2(value); - }; - return PDFNumber2; - }(PDFObject_default) -); -var PDFNumber_default = PDFNumber; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFArray.js -var PDFArray = ( - /** @class */ - function(_super) { - __extends(PDFArray3, _super); - function PDFArray3(context) { - var _this = _super.call(this) || this; - _this.array = []; - _this.context = context; - return _this; - } - PDFArray3.prototype.size = function() { - return this.array.length; - }; - PDFArray3.prototype.push = function(object) { - this.array.push(object); - }; - PDFArray3.prototype.insert = function(index2, object) { - this.array.splice(index2, 0, object); - }; - PDFArray3.prototype.indexOf = function(object) { - var index2 = this.array.indexOf(object); - return index2 === -1 ? void 0 : index2; - }; - PDFArray3.prototype.remove = function(index2) { - this.array.splice(index2, 1); - }; - PDFArray3.prototype.set = function(idx, object) { - this.array[idx] = object; - }; - PDFArray3.prototype.get = function(index2) { - return this.array[index2]; - }; - PDFArray3.prototype.lookupMaybe = function(index2) { - var _a3; - var types = []; - for (var _i = 1; _i < arguments.length; _i++) { - types[_i - 1] = arguments[_i]; - } - return (_a3 = this.context).lookupMaybe.apply(_a3, __spreadArrays([this.get(index2)], types)); - }; - PDFArray3.prototype.lookup = function(index2) { - var _a3; - var types = []; - for (var _i = 1; _i < arguments.length; _i++) { - types[_i - 1] = arguments[_i]; - } - return (_a3 = this.context).lookup.apply(_a3, __spreadArrays([this.get(index2)], types)); - }; - PDFArray3.prototype.asRectangle = function() { - if (this.size() !== 4) - throw new PDFArrayIsNotRectangleError(this.size()); - var lowerLeftX = this.lookup(0, PDFNumber_default).asNumber(); - var lowerLeftY = this.lookup(1, PDFNumber_default).asNumber(); - var upperRightX = this.lookup(2, PDFNumber_default).asNumber(); - var upperRightY = this.lookup(3, PDFNumber_default).asNumber(); - var x = lowerLeftX; - var y = lowerLeftY; - var width = upperRightX - lowerLeftX; - var height = upperRightY - lowerLeftY; - return { x, y, width, height }; - }; - PDFArray3.prototype.asArray = function() { - return this.array.slice(); - }; - PDFArray3.prototype.clone = function(context) { - var clone = PDFArray3.withContext(context || this.context); - for (var idx = 0, len = this.size(); idx < len; idx++) { - clone.push(this.array[idx]); - } - return clone; - }; - PDFArray3.prototype.toString = function() { - var arrayString = "[ "; - for (var idx = 0, len = this.size(); idx < len; idx++) { - arrayString += this.get(idx).toString(); - arrayString += " "; - } - arrayString += "]"; - return arrayString; - }; - PDFArray3.prototype.sizeInBytes = function() { - var size = 3; - for (var idx = 0, len = this.size(); idx < len; idx++) { - size += this.get(idx).sizeInBytes() + 1; - } - return size; - }; - PDFArray3.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - buffer[offset++] = CharCodes_default.LeftSquareBracket; - buffer[offset++] = CharCodes_default.Space; - for (var idx = 0, len = this.size(); idx < len; idx++) { - offset += this.get(idx).copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Space; - } - buffer[offset++] = CharCodes_default.RightSquareBracket; - return offset - initialOffset; - }; - PDFArray3.prototype.scalePDFNumbers = function(x, y) { - for (var idx = 0, len = this.size(); idx < len; idx++) { - var el = this.lookup(idx); - if (el instanceof PDFNumber_default) { - var factor = idx % 2 === 0 ? x : y; - this.set(idx, PDFNumber_default.of(el.asNumber() * factor)); - } - } - }; - PDFArray3.withContext = function(context) { - return new PDFArray3(context); - }; - return PDFArray3; - }(PDFObject_default) -); -var PDFArray_default = PDFArray; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFBool.js -var ENFORCER = {}; -var PDFBool = ( - /** @class */ - function(_super) { - __extends(PDFBool2, _super); - function PDFBool2(enforcer, value) { - var _this = this; - if (enforcer !== ENFORCER) - throw new PrivateConstructorError("PDFBool"); - _this = _super.call(this) || this; - _this.value = value; - return _this; - } - PDFBool2.prototype.asBoolean = function() { - return this.value; - }; - PDFBool2.prototype.clone = function() { - return this; - }; - PDFBool2.prototype.toString = function() { - return String(this.value); - }; - PDFBool2.prototype.sizeInBytes = function() { - return this.value ? 4 : 5; - }; - PDFBool2.prototype.copyBytesInto = function(buffer, offset) { - if (this.value) { - buffer[offset++] = CharCodes_default.t; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.u; - buffer[offset++] = CharCodes_default.e; - return 4; - } else { - buffer[offset++] = CharCodes_default.f; - buffer[offset++] = CharCodes_default.a; - buffer[offset++] = CharCodes_default.l; - buffer[offset++] = CharCodes_default.s; - buffer[offset++] = CharCodes_default.e; - return 5; - } - }; - PDFBool2.True = new PDFBool2(ENFORCER, true); - PDFBool2.False = new PDFBool2(ENFORCER, false); - return PDFBool2; - }(PDFObject_default) -); -var PDFBool_default = PDFBool; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/syntax/Delimiters.js -var IsDelimiter = new Uint8Array(256); -IsDelimiter[CharCodes_default.LeftParen] = 1; -IsDelimiter[CharCodes_default.RightParen] = 1; -IsDelimiter[CharCodes_default.LessThan] = 1; -IsDelimiter[CharCodes_default.GreaterThan] = 1; -IsDelimiter[CharCodes_default.LeftSquareBracket] = 1; -IsDelimiter[CharCodes_default.RightSquareBracket] = 1; -IsDelimiter[CharCodes_default.LeftCurly] = 1; -IsDelimiter[CharCodes_default.RightCurly] = 1; -IsDelimiter[CharCodes_default.ForwardSlash] = 1; -IsDelimiter[CharCodes_default.Percent] = 1; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/syntax/Whitespace.js -var IsWhitespace = new Uint8Array(256); -IsWhitespace[CharCodes_default.Null] = 1; -IsWhitespace[CharCodes_default.Tab] = 1; -IsWhitespace[CharCodes_default.Newline] = 1; -IsWhitespace[CharCodes_default.FormFeed] = 1; -IsWhitespace[CharCodes_default.CarriageReturn] = 1; -IsWhitespace[CharCodes_default.Space] = 1; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/syntax/Irregular.js -var IsIrregular = new Uint8Array(256); -for (idx = 0, len = 256; idx < len; idx++) { - IsIrregular[idx] = IsWhitespace[idx] || IsDelimiter[idx] ? 1 : 0; -} -var idx; -var len; -IsIrregular[CharCodes_default.Hash] = 1; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFName.js -var decodeName = function(name) { - return name.replace(/#([\dABCDEF]{2})/g, function(_, hex) { - return charFromHexCode(hex); - }); -}; -var isRegularChar = function(charCode) { - return charCode >= CharCodes_default.ExclamationPoint && charCode <= CharCodes_default.Tilde && !IsIrregular[charCode]; -}; -var ENFORCER2 = {}; -var pool = /* @__PURE__ */ new Map(); -var PDFName = ( - /** @class */ - function(_super) { - __extends(PDFName2, _super); - function PDFName2(enforcer, name) { - var _this = this; - if (enforcer !== ENFORCER2) - throw new PrivateConstructorError("PDFName"); - _this = _super.call(this) || this; - var encodedName = "/"; - for (var idx = 0, len = name.length; idx < len; idx++) { - var character = name[idx]; - var code = toCharCode(character); - encodedName += isRegularChar(code) ? character : "#" + toHexString(code); - } - _this.encodedName = encodedName; - return _this; - } - PDFName2.prototype.asBytes = function() { - var bytes = []; - var hex = ""; - var escaped = false; - var pushByte = function(byte2) { - if (byte2 !== void 0) - bytes.push(byte2); - escaped = false; - }; - for (var idx = 1, len = this.encodedName.length; idx < len; idx++) { - var char = this.encodedName[idx]; - var byte = toCharCode(char); - var nextChar = this.encodedName[idx + 1]; - if (!escaped) { - if (byte === CharCodes_default.Hash) - escaped = true; - else - pushByte(byte); - } else { - if (byte >= CharCodes_default.Zero && byte <= CharCodes_default.Nine || byte >= CharCodes_default.a && byte <= CharCodes_default.f || byte >= CharCodes_default.A && byte <= CharCodes_default.F) { - hex += char; - if (hex.length === 2 || !(nextChar >= "0" && nextChar <= "9" || nextChar >= "a" && nextChar <= "f" || nextChar >= "A" && nextChar <= "F")) { - pushByte(parseInt(hex, 16)); - hex = ""; - } - } else { - pushByte(byte); - } - } - } - return new Uint8Array(bytes); - }; - PDFName2.prototype.decodeText = function() { - var bytes = this.asBytes(); - return String.fromCharCode.apply(String, Array.from(bytes)); - }; - PDFName2.prototype.asString = function() { - return this.encodedName; - }; - PDFName2.prototype.value = function() { - return this.encodedName; - }; - PDFName2.prototype.clone = function() { - return this; - }; - PDFName2.prototype.toString = function() { - return this.encodedName; - }; - PDFName2.prototype.sizeInBytes = function() { - return this.encodedName.length; - }; - PDFName2.prototype.copyBytesInto = function(buffer, offset) { - offset += copyStringIntoBuffer(this.encodedName, buffer, offset); - return this.encodedName.length; - }; - PDFName2.of = function(name) { - var decodedValue = decodeName(name); - var instance = pool.get(decodedValue); - if (!instance) { - instance = new PDFName2(ENFORCER2, decodedValue); - pool.set(decodedValue, instance); - } - return instance; - }; - PDFName2.Length = PDFName2.of("Length"); - PDFName2.FlateDecode = PDFName2.of("FlateDecode"); - PDFName2.Resources = PDFName2.of("Resources"); - PDFName2.Font = PDFName2.of("Font"); - PDFName2.XObject = PDFName2.of("XObject"); - PDFName2.ExtGState = PDFName2.of("ExtGState"); - PDFName2.Contents = PDFName2.of("Contents"); - PDFName2.Type = PDFName2.of("Type"); - PDFName2.Parent = PDFName2.of("Parent"); - PDFName2.MediaBox = PDFName2.of("MediaBox"); - PDFName2.Page = PDFName2.of("Page"); - PDFName2.Annots = PDFName2.of("Annots"); - PDFName2.TrimBox = PDFName2.of("TrimBox"); - PDFName2.ArtBox = PDFName2.of("ArtBox"); - PDFName2.BleedBox = PDFName2.of("BleedBox"); - PDFName2.CropBox = PDFName2.of("CropBox"); - PDFName2.Rotate = PDFName2.of("Rotate"); - PDFName2.Title = PDFName2.of("Title"); - PDFName2.Author = PDFName2.of("Author"); - PDFName2.Subject = PDFName2.of("Subject"); - PDFName2.Creator = PDFName2.of("Creator"); - PDFName2.Keywords = PDFName2.of("Keywords"); - PDFName2.Producer = PDFName2.of("Producer"); - PDFName2.CreationDate = PDFName2.of("CreationDate"); - PDFName2.ModDate = PDFName2.of("ModDate"); - return PDFName2; - }(PDFObject_default) -); -var PDFName_default = PDFName; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFNull.js -var PDFNull = ( - /** @class */ - function(_super) { - __extends(PDFNull2, _super); - function PDFNull2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFNull2.prototype.asNull = function() { - return null; - }; - PDFNull2.prototype.clone = function() { - return this; - }; - PDFNull2.prototype.toString = function() { - return "null"; - }; - PDFNull2.prototype.sizeInBytes = function() { - return 4; - }; - PDFNull2.prototype.copyBytesInto = function(buffer, offset) { - buffer[offset++] = CharCodes_default.n; - buffer[offset++] = CharCodes_default.u; - buffer[offset++] = CharCodes_default.l; - buffer[offset++] = CharCodes_default.l; - return 4; - }; - return PDFNull2; - }(PDFObject_default) -); -var PDFNull_default = new PDFNull(); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFDict.js -var PDFDict = ( - /** @class */ - function(_super) { - __extends(PDFDict2, _super); - function PDFDict2(map, context) { - var _this = _super.call(this) || this; - _this.dict = map; - _this.context = context; - return _this; - } - PDFDict2.prototype.keys = function() { - return Array.from(this.dict.keys()); - }; - PDFDict2.prototype.values = function() { - return Array.from(this.dict.values()); - }; - PDFDict2.prototype.entries = function() { - return Array.from(this.dict.entries()); - }; - PDFDict2.prototype.set = function(key, value) { - this.dict.set(key, value); - }; - PDFDict2.prototype.get = function(key, preservePDFNull) { - if (preservePDFNull === void 0) { - preservePDFNull = false; - } - var value = this.dict.get(key); - if (value === PDFNull_default && !preservePDFNull) - return void 0; - return value; - }; - PDFDict2.prototype.has = function(key) { - var value = this.dict.get(key); - return value !== void 0 && value !== PDFNull_default; - }; - PDFDict2.prototype.lookupMaybe = function(key) { - var _a3; - var types = []; - for (var _i = 1; _i < arguments.length; _i++) { - types[_i - 1] = arguments[_i]; - } - var preservePDFNull = types.includes(PDFNull_default); - var value = (_a3 = this.context).lookupMaybe.apply(_a3, __spreadArrays([this.get(key, preservePDFNull)], types)); - if (value === PDFNull_default && !preservePDFNull) - return void 0; - return value; - }; - PDFDict2.prototype.lookup = function(key) { - var _a3; - var types = []; - for (var _i = 1; _i < arguments.length; _i++) { - types[_i - 1] = arguments[_i]; - } - var preservePDFNull = types.includes(PDFNull_default); - var value = (_a3 = this.context).lookup.apply(_a3, __spreadArrays([this.get(key, preservePDFNull)], types)); - if (value === PDFNull_default && !preservePDFNull) - return void 0; - return value; - }; - PDFDict2.prototype.delete = function(key) { - return this.dict.delete(key); - }; - PDFDict2.prototype.asMap = function() { - return new Map(this.dict); - }; - PDFDict2.prototype.uniqueKey = function(tag) { - if (tag === void 0) { - tag = ""; - } - var existingKeys = this.keys(); - var key = PDFName_default.of(this.context.addRandomSuffix(tag, 10)); - while (existingKeys.includes(key)) { - key = PDFName_default.of(this.context.addRandomSuffix(tag, 10)); - } - return key; - }; - PDFDict2.prototype.clone = function(context) { - var clone = PDFDict2.withContext(context || this.context); - var entries = this.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - clone.set(key, value); - } - return clone; - }; - PDFDict2.prototype.toString = function() { - var dictString = "<<\n"; - var entries = this.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - dictString += key.toString() + " " + value.toString() + "\n"; - } - dictString += ">>"; - return dictString; - }; - PDFDict2.prototype.sizeInBytes = function() { - var size = 5; - var entries = this.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - size += key.sizeInBytes() + value.sizeInBytes() + 2; - } - return size; - }; - PDFDict2.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - buffer[offset++] = CharCodes_default.LessThan; - buffer[offset++] = CharCodes_default.LessThan; - buffer[offset++] = CharCodes_default.Newline; - var entries = this.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - offset += key.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Space; - offset += value.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - } - buffer[offset++] = CharCodes_default.GreaterThan; - buffer[offset++] = CharCodes_default.GreaterThan; - return offset - initialOffset; - }; - PDFDict2.withContext = function(context) { - return new PDFDict2(/* @__PURE__ */ new Map(), context); - }; - PDFDict2.fromMapWithContext = function(map, context) { - return new PDFDict2(map, context); - }; - return PDFDict2; - }(PDFObject_default) -); -var PDFDict_default = PDFDict; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFStream.js -var PDFStream = ( - /** @class */ - function(_super) { - __extends(PDFStream2, _super); - function PDFStream2(dict) { - var _this = _super.call(this) || this; - _this.dict = dict; - return _this; - } - PDFStream2.prototype.clone = function(_context) { - throw new MethodNotImplementedError(this.constructor.name, "clone"); - }; - PDFStream2.prototype.getContentsString = function() { - throw new MethodNotImplementedError(this.constructor.name, "getContentsString"); - }; - PDFStream2.prototype.getContents = function() { - throw new MethodNotImplementedError(this.constructor.name, "getContents"); - }; - PDFStream2.prototype.getContentsSize = function() { - throw new MethodNotImplementedError(this.constructor.name, "getContentsSize"); - }; - PDFStream2.prototype.updateDict = function() { - var contentsSize = this.getContentsSize(); - this.dict.set(PDFName_default.Length, PDFNumber_default.of(contentsSize)); - }; - PDFStream2.prototype.sizeInBytes = function() { - this.updateDict(); - return this.dict.sizeInBytes() + this.getContentsSize() + 18; - }; - PDFStream2.prototype.toString = function() { - this.updateDict(); - var streamString = this.dict.toString(); - streamString += "\nstream\n"; - streamString += this.getContentsString(); - streamString += "\nendstream"; - return streamString; - }; - PDFStream2.prototype.copyBytesInto = function(buffer, offset) { - this.updateDict(); - var initialOffset = offset; - offset += this.dict.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.s; - buffer[offset++] = CharCodes_default.t; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.a; - buffer[offset++] = CharCodes_default.m; - buffer[offset++] = CharCodes_default.Newline; - var contents = this.getContents(); - for (var idx = 0, len = contents.length; idx < len; idx++) { - buffer[offset++] = contents[idx]; - } - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.n; - buffer[offset++] = CharCodes_default.d; - buffer[offset++] = CharCodes_default.s; - buffer[offset++] = CharCodes_default.t; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.a; - buffer[offset++] = CharCodes_default.m; - return offset - initialOffset; - }; - return PDFStream2; - }(PDFObject_default) -); -var PDFStream_default = PDFStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFRawStream.js -var PDFRawStream = ( - /** @class */ - function(_super) { - __extends(PDFRawStream2, _super); - function PDFRawStream2(dict, contents) { - var _this = _super.call(this, dict) || this; - _this.contents = contents; - return _this; - } - PDFRawStream2.prototype.asUint8Array = function() { - return this.contents.slice(); - }; - PDFRawStream2.prototype.clone = function(context) { - return PDFRawStream2.of(this.dict.clone(context), this.contents.slice()); - }; - PDFRawStream2.prototype.getContentsString = function() { - return arrayAsString(this.contents); - }; - PDFRawStream2.prototype.getContents = function() { - return this.contents; - }; - PDFRawStream2.prototype.getContentsSize = function() { - return this.contents.length; - }; - PDFRawStream2.of = function(dict, contents) { - return new PDFRawStream2(dict, contents); - }; - return PDFRawStream2; - }(PDFStream_default) -); -var PDFRawStream_default = PDFRawStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFRef.js -var ENFORCER3 = {}; -var pool2 = /* @__PURE__ */ new Map(); -var PDFRef = ( - /** @class */ - function(_super) { - __extends(PDFRef3, _super); - function PDFRef3(enforcer, objectNumber, generationNumber) { - var _this = this; - if (enforcer !== ENFORCER3) - throw new PrivateConstructorError("PDFRef"); - _this = _super.call(this) || this; - _this.objectNumber = objectNumber; - _this.generationNumber = generationNumber; - _this.tag = objectNumber + " " + generationNumber + " R"; - return _this; - } - PDFRef3.prototype.clone = function() { - return this; - }; - PDFRef3.prototype.toString = function() { - return this.tag; - }; - PDFRef3.prototype.sizeInBytes = function() { - return this.tag.length; - }; - PDFRef3.prototype.copyBytesInto = function(buffer, offset) { - offset += copyStringIntoBuffer(this.tag, buffer, offset); - return this.tag.length; - }; - PDFRef3.of = function(objectNumber, generationNumber) { - if (generationNumber === void 0) { - generationNumber = 0; - } - var tag = objectNumber + " " + generationNumber + " R"; - var instance = pool2.get(tag); - if (!instance) { - instance = new PDFRef3(ENFORCER3, objectNumber, generationNumber); - pool2.set(tag, instance); - } - return instance; - }; - return PDFRef3; - }(PDFObject_default) -); -var PDFRef_default = PDFRef; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/operators/PDFOperator.js -var PDFOperator = ( - /** @class */ - function() { - function PDFOperator2(name, args) { - this.name = name; - this.args = args || []; - } - PDFOperator2.prototype.clone = function(context) { - var args = new Array(this.args.length); - for (var idx = 0, len = args.length; idx < len; idx++) { - var arg = this.args[idx]; - args[idx] = arg instanceof PDFObject_default ? arg.clone(context) : arg; - } - return PDFOperator2.of(this.name, args); - }; - PDFOperator2.prototype.toString = function() { - var value = ""; - for (var idx = 0, len = this.args.length; idx < len; idx++) { - value += String(this.args[idx]) + " "; - } - value += this.name; - return value; - }; - PDFOperator2.prototype.sizeInBytes = function() { - var size = 0; - for (var idx = 0, len = this.args.length; idx < len; idx++) { - var arg = this.args[idx]; - size += (arg instanceof PDFObject_default ? arg.sizeInBytes() : arg.length) + 1; - } - size += this.name.length; - return size; - }; - PDFOperator2.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - for (var idx = 0, len = this.args.length; idx < len; idx++) { - var arg = this.args[idx]; - if (arg instanceof PDFObject_default) { - offset += arg.copyBytesInto(buffer, offset); - } else { - offset += copyStringIntoBuffer(arg, buffer, offset); - } - buffer[offset++] = CharCodes_default.Space; - } - offset += copyStringIntoBuffer(this.name, buffer, offset); - return offset - initialOffset; - }; - PDFOperator2.of = function(name, args) { - return new PDFOperator2(name, args); - }; - return PDFOperator2; - }() -); -var PDFOperator_default = PDFOperator; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/operators/PDFOperatorNames.js -var PDFOperatorNames; -(function(PDFOperatorNames2) { - PDFOperatorNames2["NonStrokingColor"] = "sc"; - PDFOperatorNames2["NonStrokingColorN"] = "scn"; - PDFOperatorNames2["NonStrokingColorRgb"] = "rg"; - PDFOperatorNames2["NonStrokingColorGray"] = "g"; - PDFOperatorNames2["NonStrokingColorCmyk"] = "k"; - PDFOperatorNames2["NonStrokingColorspace"] = "cs"; - PDFOperatorNames2["StrokingColor"] = "SC"; - PDFOperatorNames2["StrokingColorN"] = "SCN"; - PDFOperatorNames2["StrokingColorRgb"] = "RG"; - PDFOperatorNames2["StrokingColorGray"] = "G"; - PDFOperatorNames2["StrokingColorCmyk"] = "K"; - PDFOperatorNames2["StrokingColorspace"] = "CS"; - PDFOperatorNames2["BeginMarkedContentSequence"] = "BDC"; - PDFOperatorNames2["BeginMarkedContent"] = "BMC"; - PDFOperatorNames2["EndMarkedContent"] = "EMC"; - PDFOperatorNames2["MarkedContentPointWithProps"] = "DP"; - PDFOperatorNames2["MarkedContentPoint"] = "MP"; - PDFOperatorNames2["DrawObject"] = "Do"; - PDFOperatorNames2["ConcatTransformationMatrix"] = "cm"; - PDFOperatorNames2["PopGraphicsState"] = "Q"; - PDFOperatorNames2["PushGraphicsState"] = "q"; - PDFOperatorNames2["SetFlatness"] = "i"; - PDFOperatorNames2["SetGraphicsStateParams"] = "gs"; - PDFOperatorNames2["SetLineCapStyle"] = "J"; - PDFOperatorNames2["SetLineDashPattern"] = "d"; - PDFOperatorNames2["SetLineJoinStyle"] = "j"; - PDFOperatorNames2["SetLineMiterLimit"] = "M"; - PDFOperatorNames2["SetLineWidth"] = "w"; - PDFOperatorNames2["SetTextMatrix"] = "Tm"; - PDFOperatorNames2["SetRenderingIntent"] = "ri"; - PDFOperatorNames2["AppendRectangle"] = "re"; - PDFOperatorNames2["BeginInlineImage"] = "BI"; - PDFOperatorNames2["BeginInlineImageData"] = "ID"; - PDFOperatorNames2["EndInlineImage"] = "EI"; - PDFOperatorNames2["ClipEvenOdd"] = "W*"; - PDFOperatorNames2["ClipNonZero"] = "W"; - PDFOperatorNames2["CloseAndStroke"] = "s"; - PDFOperatorNames2["CloseFillEvenOddAndStroke"] = "b*"; - PDFOperatorNames2["CloseFillNonZeroAndStroke"] = "b"; - PDFOperatorNames2["ClosePath"] = "h"; - PDFOperatorNames2["AppendBezierCurve"] = "c"; - PDFOperatorNames2["CurveToReplicateFinalPoint"] = "y"; - PDFOperatorNames2["CurveToReplicateInitialPoint"] = "v"; - PDFOperatorNames2["EndPath"] = "n"; - PDFOperatorNames2["FillEvenOddAndStroke"] = "B*"; - PDFOperatorNames2["FillEvenOdd"] = "f*"; - PDFOperatorNames2["FillNonZeroAndStroke"] = "B"; - PDFOperatorNames2["FillNonZero"] = "f"; - PDFOperatorNames2["LegacyFillNonZero"] = "F"; - PDFOperatorNames2["LineTo"] = "l"; - PDFOperatorNames2["MoveTo"] = "m"; - PDFOperatorNames2["ShadingFill"] = "sh"; - PDFOperatorNames2["StrokePath"] = "S"; - PDFOperatorNames2["BeginText"] = "BT"; - PDFOperatorNames2["EndText"] = "ET"; - PDFOperatorNames2["MoveText"] = "Td"; - PDFOperatorNames2["MoveTextSetLeading"] = "TD"; - PDFOperatorNames2["NextLine"] = "T*"; - PDFOperatorNames2["SetCharacterSpacing"] = "Tc"; - PDFOperatorNames2["SetFontAndSize"] = "Tf"; - PDFOperatorNames2["SetTextHorizontalScaling"] = "Tz"; - PDFOperatorNames2["SetTextLineHeight"] = "TL"; - PDFOperatorNames2["SetTextRenderingMode"] = "Tr"; - PDFOperatorNames2["SetTextRise"] = "Ts"; - PDFOperatorNames2["SetWordSpacing"] = "Tw"; - PDFOperatorNames2["ShowText"] = "Tj"; - PDFOperatorNames2["ShowTextAdjusted"] = "TJ"; - PDFOperatorNames2["ShowTextLine"] = "'"; - PDFOperatorNames2["ShowTextLineAndSpace"] = '"'; - PDFOperatorNames2["Type3D0"] = "d0"; - PDFOperatorNames2["Type3D1"] = "d1"; - PDFOperatorNames2["BeginCompatibilitySection"] = "BX"; - PDFOperatorNames2["EndCompatibilitySection"] = "EX"; -})(PDFOperatorNames || (PDFOperatorNames = {})); -var PDFOperatorNames_default = PDFOperatorNames; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFFlateStream.js -var import_pako2 = __toESM(require_pako()); -var PDFFlateStream = ( - /** @class */ - function(_super) { - __extends(PDFFlateStream2, _super); - function PDFFlateStream2(dict, encode) { - var _this = _super.call(this, dict) || this; - _this.computeContents = function() { - var unencodedContents = _this.getUnencodedContents(); - return _this.encode ? import_pako2.default.deflate(unencodedContents) : unencodedContents; - }; - _this.encode = encode; - if (encode) - dict.set(PDFName_default.of("Filter"), PDFName_default.of("FlateDecode")); - _this.contentsCache = Cache_default.populatedBy(_this.computeContents); - return _this; - } - PDFFlateStream2.prototype.getContents = function() { - return this.contentsCache.access(); - }; - PDFFlateStream2.prototype.getContentsSize = function() { - return this.contentsCache.access().length; - }; - PDFFlateStream2.prototype.getUnencodedContents = function() { - throw new MethodNotImplementedError(this.constructor.name, "getUnencodedContents"); - }; - return PDFFlateStream2; - }(PDFStream_default) -); -var PDFFlateStream_default = PDFFlateStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFContentStream.js -var PDFContentStream = ( - /** @class */ - function(_super) { - __extends(PDFContentStream2, _super); - function PDFContentStream2(dict, operators, encode) { - if (encode === void 0) { - encode = true; - } - var _this = _super.call(this, dict, encode) || this; - _this.operators = operators; - return _this; - } - PDFContentStream2.prototype.push = function() { - var _a3; - var operators = []; - for (var _i = 0; _i < arguments.length; _i++) { - operators[_i] = arguments[_i]; - } - (_a3 = this.operators).push.apply(_a3, operators); - }; - PDFContentStream2.prototype.clone = function(context) { - var operators = new Array(this.operators.length); - for (var idx = 0, len = this.operators.length; idx < len; idx++) { - operators[idx] = this.operators[idx].clone(context); - } - var _a3 = this, dict = _a3.dict, encode = _a3.encode; - return PDFContentStream2.of(dict.clone(context), operators, encode); - }; - PDFContentStream2.prototype.getContentsString = function() { - var value = ""; - for (var idx = 0, len = this.operators.length; idx < len; idx++) { - value += this.operators[idx] + "\n"; - } - return value; - }; - PDFContentStream2.prototype.getUnencodedContents = function() { - var buffer = new Uint8Array(this.getUnencodedContentsSize()); - var offset = 0; - for (var idx = 0, len = this.operators.length; idx < len; idx++) { - offset += this.operators[idx].copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - } - return buffer; - }; - PDFContentStream2.prototype.getUnencodedContentsSize = function() { - var size = 0; - for (var idx = 0, len = this.operators.length; idx < len; idx++) { - size += this.operators[idx].sizeInBytes() + 1; - } - return size; - }; - PDFContentStream2.of = function(dict, operators, encode) { - if (encode === void 0) { - encode = true; - } - return new PDFContentStream2(dict, operators, encode); - }; - return PDFContentStream2; - }(PDFFlateStream_default) -); -var PDFContentStream_default = PDFContentStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/rng.js -var SimpleRNG = ( - /** @class */ - function() { - function SimpleRNG2(seed) { - this.seed = seed; - } - SimpleRNG2.prototype.nextInt = function() { - var x = Math.sin(this.seed++) * 1e4; - return x - Math.floor(x); - }; - SimpleRNG2.withSeed = function(seed) { - return new SimpleRNG2(seed); - }; - return SimpleRNG2; - }() -); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/PDFContext.js -var byAscendingObjectNumber = function(_a3, _b3) { - var a = _a3[0]; - var b = _b3[0]; - return a.objectNumber - b.objectNumber; -}; -var PDFContext = ( - /** @class */ - function() { - function PDFContext2() { - this.largestObjectNumber = 0; - this.header = PDFHeader_default.forVersion(1, 7); - this.trailerInfo = {}; - this.indirectObjects = /* @__PURE__ */ new Map(); - this.rng = SimpleRNG.withSeed(1); - } - PDFContext2.prototype.assign = function(ref, object) { - this.indirectObjects.set(ref, object); - if (ref.objectNumber > this.largestObjectNumber) { - this.largestObjectNumber = ref.objectNumber; - } - }; - PDFContext2.prototype.nextRef = function() { - this.largestObjectNumber += 1; - return PDFRef_default.of(this.largestObjectNumber); - }; - PDFContext2.prototype.register = function(object) { - var ref = this.nextRef(); - this.assign(ref, object); - return ref; - }; - PDFContext2.prototype.delete = function(ref) { - return this.indirectObjects.delete(ref); - }; - PDFContext2.prototype.lookupMaybe = function(ref) { - var types = []; - for (var _i = 1; _i < arguments.length; _i++) { - types[_i - 1] = arguments[_i]; - } - var preservePDFNull = types.includes(PDFNull_default); - var result = ref instanceof PDFRef_default ? this.indirectObjects.get(ref) : ref; - if (!result || result === PDFNull_default && !preservePDFNull) - return void 0; - for (var idx = 0, len = types.length; idx < len; idx++) { - var type = types[idx]; - if (type === PDFNull_default) { - if (result === PDFNull_default) - return result; - } else { - if (result instanceof type) - return result; - } - } - throw new UnexpectedObjectTypeError(types, result); - }; - PDFContext2.prototype.lookup = function(ref) { - var types = []; - for (var _i = 1; _i < arguments.length; _i++) { - types[_i - 1] = arguments[_i]; - } - var result = ref instanceof PDFRef_default ? this.indirectObjects.get(ref) : ref; - if (types.length === 0) - return result; - for (var idx = 0, len = types.length; idx < len; idx++) { - var type = types[idx]; - if (type === PDFNull_default) { - if (result === PDFNull_default) - return result; - } else { - if (result instanceof type) - return result; - } - } - throw new UnexpectedObjectTypeError(types, result); - }; - PDFContext2.prototype.getObjectRef = function(pdfObject) { - var entries = Array.from(this.indirectObjects.entries()); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], ref = _a3[0], object = _a3[1]; - if (object === pdfObject) { - return ref; - } - } - return void 0; - }; - PDFContext2.prototype.enumerateIndirectObjects = function() { - return Array.from(this.indirectObjects.entries()).sort(byAscendingObjectNumber); - }; - PDFContext2.prototype.obj = function(literal) { - if (literal instanceof PDFObject_default) { - return literal; - } else if (literal === null || literal === void 0) { - return PDFNull_default; - } else if (typeof literal === "string") { - return PDFName_default.of(literal); - } else if (typeof literal === "number") { - return PDFNumber_default.of(literal); - } else if (typeof literal === "boolean") { - return literal ? PDFBool_default.True : PDFBool_default.False; - } else if (Array.isArray(literal)) { - var array = PDFArray_default.withContext(this); - for (var idx = 0, len = literal.length; idx < len; idx++) { - array.push(this.obj(literal[idx])); - } - return array; - } else { - var dict = PDFDict_default.withContext(this); - var keys = Object.keys(literal); - for (var idx = 0, len = keys.length; idx < len; idx++) { - var key = keys[idx]; - var value = literal[key]; - if (value !== void 0) - dict.set(PDFName_default.of(key), this.obj(value)); - } - return dict; - } - }; - PDFContext2.prototype.stream = function(contents, dict) { - if (dict === void 0) { - dict = {}; - } - return PDFRawStream_default.of(this.obj(dict), typedArrayFor(contents)); - }; - PDFContext2.prototype.flateStream = function(contents, dict) { - if (dict === void 0) { - dict = {}; - } - return this.stream(import_pako3.default.deflate(typedArrayFor(contents)), __assign(__assign({}, dict), { Filter: "FlateDecode" })); - }; - PDFContext2.prototype.contentStream = function(operators, dict) { - if (dict === void 0) { - dict = {}; - } - return PDFContentStream_default.of(this.obj(dict), operators); - }; - PDFContext2.prototype.formXObject = function(operators, dict) { - if (dict === void 0) { - dict = {}; - } - return this.contentStream(operators, __assign(__assign({ BBox: this.obj([0, 0, 0, 0]), Matrix: this.obj([1, 0, 0, 1, 0, 0]) }, dict), { Type: "XObject", Subtype: "Form" })); - }; - PDFContext2.prototype.getPushGraphicsStateContentStream = function() { - if (this.pushGraphicsStateContentStreamRef) { - return this.pushGraphicsStateContentStreamRef; - } - var dict = this.obj({}); - var op = PDFOperator_default.of(PDFOperatorNames_default.PushGraphicsState); - var stream2 = PDFContentStream_default.of(dict, [op]); - this.pushGraphicsStateContentStreamRef = this.register(stream2); - return this.pushGraphicsStateContentStreamRef; - }; - PDFContext2.prototype.getPopGraphicsStateContentStream = function() { - if (this.popGraphicsStateContentStreamRef) { - return this.popGraphicsStateContentStreamRef; - } - var dict = this.obj({}); - var op = PDFOperator_default.of(PDFOperatorNames_default.PopGraphicsState); - var stream2 = PDFContentStream_default.of(dict, [op]); - this.popGraphicsStateContentStreamRef = this.register(stream2); - return this.popGraphicsStateContentStreamRef; - }; - PDFContext2.prototype.addRandomSuffix = function(prefix, suffixLength) { - if (suffixLength === void 0) { - suffixLength = 4; - } - return prefix + "-" + Math.floor(this.rng.nextInt() * Math.pow(10, suffixLength)); - }; - PDFContext2.create = function() { - return new PDFContext2(); - }; - return PDFContext2; - }() -); -var PDFContext_default = PDFContext; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFPageLeaf.js -var PDFPageLeaf = ( - /** @class */ - function(_super) { - __extends(PDFPageLeaf2, _super); - function PDFPageLeaf2(map, context, autoNormalizeCTM) { - if (autoNormalizeCTM === void 0) { - autoNormalizeCTM = true; - } - var _this = _super.call(this, map, context) || this; - _this.normalized = false; - _this.autoNormalizeCTM = autoNormalizeCTM; - return _this; - } - PDFPageLeaf2.prototype.clone = function(context) { - var clone = PDFPageLeaf2.fromMapWithContext(/* @__PURE__ */ new Map(), context || this.context, this.autoNormalizeCTM); - var entries = this.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - clone.set(key, value); - } - return clone; - }; - PDFPageLeaf2.prototype.Parent = function() { - return this.lookupMaybe(PDFName_default.Parent, PDFDict_default); - }; - PDFPageLeaf2.prototype.Contents = function() { - return this.lookup(PDFName_default.of("Contents")); - }; - PDFPageLeaf2.prototype.Annots = function() { - return this.lookupMaybe(PDFName_default.Annots, PDFArray_default); - }; - PDFPageLeaf2.prototype.BleedBox = function() { - return this.lookupMaybe(PDFName_default.BleedBox, PDFArray_default); - }; - PDFPageLeaf2.prototype.TrimBox = function() { - return this.lookupMaybe(PDFName_default.TrimBox, PDFArray_default); - }; - PDFPageLeaf2.prototype.ArtBox = function() { - return this.lookupMaybe(PDFName_default.ArtBox, PDFArray_default); - }; - PDFPageLeaf2.prototype.Resources = function() { - var dictOrRef = this.getInheritableAttribute(PDFName_default.Resources); - return this.context.lookupMaybe(dictOrRef, PDFDict_default); - }; - PDFPageLeaf2.prototype.MediaBox = function() { - var arrayOrRef = this.getInheritableAttribute(PDFName_default.MediaBox); - return this.context.lookup(arrayOrRef, PDFArray_default); - }; - PDFPageLeaf2.prototype.CropBox = function() { - var arrayOrRef = this.getInheritableAttribute(PDFName_default.CropBox); - return this.context.lookupMaybe(arrayOrRef, PDFArray_default); - }; - PDFPageLeaf2.prototype.Rotate = function() { - var numberOrRef = this.getInheritableAttribute(PDFName_default.Rotate); - return this.context.lookupMaybe(numberOrRef, PDFNumber_default); - }; - PDFPageLeaf2.prototype.getInheritableAttribute = function(name) { - var attribute; - this.ascend(function(node) { - if (!attribute) - attribute = node.get(name); - }); - return attribute; - }; - PDFPageLeaf2.prototype.setParent = function(parentRef) { - this.set(PDFName_default.Parent, parentRef); - }; - PDFPageLeaf2.prototype.addContentStream = function(contentStreamRef) { - var Contents = this.normalizedEntries().Contents || this.context.obj([]); - this.set(PDFName_default.Contents, Contents); - Contents.push(contentStreamRef); - }; - PDFPageLeaf2.prototype.wrapContentStreams = function(startStream, endStream) { - var Contents = this.Contents(); - if (Contents instanceof PDFArray_default) { - Contents.insert(0, startStream); - Contents.push(endStream); - return true; - } - return false; - }; - PDFPageLeaf2.prototype.addAnnot = function(annotRef) { - var Annots = this.normalizedEntries().Annots; - Annots.push(annotRef); - }; - PDFPageLeaf2.prototype.removeAnnot = function(annotRef) { - var Annots = this.normalizedEntries().Annots; - var index2 = Annots.indexOf(annotRef); - if (index2 !== void 0) { - Annots.remove(index2); - } - }; - PDFPageLeaf2.prototype.setFontDictionary = function(name, fontDictRef) { - var Font2 = this.normalizedEntries().Font; - Font2.set(name, fontDictRef); - }; - PDFPageLeaf2.prototype.newFontDictionaryKey = function(tag) { - var Font2 = this.normalizedEntries().Font; - return Font2.uniqueKey(tag); - }; - PDFPageLeaf2.prototype.newFontDictionary = function(tag, fontDictRef) { - var key = this.newFontDictionaryKey(tag); - this.setFontDictionary(key, fontDictRef); - return key; - }; - PDFPageLeaf2.prototype.setXObject = function(name, xObjectRef) { - var XObject = this.normalizedEntries().XObject; - XObject.set(name, xObjectRef); - }; - PDFPageLeaf2.prototype.newXObjectKey = function(tag) { - var XObject = this.normalizedEntries().XObject; - return XObject.uniqueKey(tag); - }; - PDFPageLeaf2.prototype.newXObject = function(tag, xObjectRef) { - var key = this.newXObjectKey(tag); - this.setXObject(key, xObjectRef); - return key; - }; - PDFPageLeaf2.prototype.setExtGState = function(name, extGStateRef) { - var ExtGState = this.normalizedEntries().ExtGState; - ExtGState.set(name, extGStateRef); - }; - PDFPageLeaf2.prototype.newExtGStateKey = function(tag) { - var ExtGState = this.normalizedEntries().ExtGState; - return ExtGState.uniqueKey(tag); - }; - PDFPageLeaf2.prototype.newExtGState = function(tag, extGStateRef) { - var key = this.newExtGStateKey(tag); - this.setExtGState(key, extGStateRef); - return key; - }; - PDFPageLeaf2.prototype.ascend = function(visitor) { - visitor(this); - var Parent = this.Parent(); - if (Parent) - Parent.ascend(visitor); - }; - PDFPageLeaf2.prototype.normalize = function() { - if (this.normalized) - return; - var context = this.context; - var contentsRef = this.get(PDFName_default.Contents); - var contents = this.context.lookup(contentsRef); - if (contents instanceof PDFStream_default) { - this.set(PDFName_default.Contents, context.obj([contentsRef])); - } - if (this.autoNormalizeCTM) { - this.wrapContentStreams(this.context.getPushGraphicsStateContentStream(), this.context.getPopGraphicsStateContentStream()); - } - var dictOrRef = this.getInheritableAttribute(PDFName_default.Resources); - var Resources = context.lookupMaybe(dictOrRef, PDFDict_default) || context.obj({}); - this.set(PDFName_default.Resources, Resources); - var Font2 = Resources.lookupMaybe(PDFName_default.Font, PDFDict_default) || context.obj({}); - Resources.set(PDFName_default.Font, Font2); - var XObject = Resources.lookupMaybe(PDFName_default.XObject, PDFDict_default) || context.obj({}); - Resources.set(PDFName_default.XObject, XObject); - var ExtGState = Resources.lookupMaybe(PDFName_default.ExtGState, PDFDict_default) || context.obj({}); - Resources.set(PDFName_default.ExtGState, ExtGState); - var Annots = this.Annots() || context.obj([]); - this.set(PDFName_default.Annots, Annots); - this.normalized = true; - }; - PDFPageLeaf2.prototype.normalizedEntries = function() { - this.normalize(); - var Annots = this.Annots(); - var Resources = this.Resources(); - var Contents = this.Contents(); - return { - Annots, - Resources, - Contents, - Font: Resources.lookup(PDFName_default.Font, PDFDict_default), - XObject: Resources.lookup(PDFName_default.XObject, PDFDict_default), - ExtGState: Resources.lookup(PDFName_default.ExtGState, PDFDict_default) - }; - }; - PDFPageLeaf2.InheritableEntries = [ - "Resources", - "MediaBox", - "CropBox", - "Rotate" - ]; - PDFPageLeaf2.withContextAndParent = function(context, parent) { - var dict = /* @__PURE__ */ new Map(); - dict.set(PDFName_default.Type, PDFName_default.Page); - dict.set(PDFName_default.Parent, parent); - dict.set(PDFName_default.Resources, context.obj({})); - dict.set(PDFName_default.MediaBox, context.obj([0, 0, 612, 792])); - return new PDFPageLeaf2(dict, context, false); - }; - PDFPageLeaf2.fromMapWithContext = function(map, context, autoNormalizeCTM) { - if (autoNormalizeCTM === void 0) { - autoNormalizeCTM = true; - } - return new PDFPageLeaf2(map, context, autoNormalizeCTM); - }; - return PDFPageLeaf2; - }(PDFDict_default) -); -var PDFPageLeaf_default = PDFPageLeaf; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/PDFObjectCopier.js -var PDFObjectCopier = ( - /** @class */ - function() { - function PDFObjectCopier2(src, dest) { - var _this = this; - this.traversedObjects = /* @__PURE__ */ new Map(); - this.copy = function(object) { - return object instanceof PDFPageLeaf_default ? _this.copyPDFPage(object) : object instanceof PDFDict_default ? _this.copyPDFDict(object) : object instanceof PDFArray_default ? _this.copyPDFArray(object) : object instanceof PDFStream_default ? _this.copyPDFStream(object) : object instanceof PDFRef_default ? _this.copyPDFIndirectObject(object) : object.clone(); - }; - this.copyPDFPage = function(originalPage) { - var clonedPage = originalPage.clone(); - var InheritableEntries = PDFPageLeaf_default.InheritableEntries; - for (var idx = 0, len = InheritableEntries.length; idx < len; idx++) { - var key = PDFName_default.of(InheritableEntries[idx]); - var value = clonedPage.getInheritableAttribute(key); - if (!clonedPage.get(key) && value) - clonedPage.set(key, value); - } - clonedPage.delete(PDFName_default.of("Parent")); - return _this.copyPDFDict(clonedPage); - }; - this.copyPDFDict = function(originalDict) { - if (_this.traversedObjects.has(originalDict)) { - return _this.traversedObjects.get(originalDict); - } - var clonedDict = originalDict.clone(_this.dest); - _this.traversedObjects.set(originalDict, clonedDict); - var entries = originalDict.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - clonedDict.set(key, _this.copy(value)); - } - return clonedDict; - }; - this.copyPDFArray = function(originalArray) { - if (_this.traversedObjects.has(originalArray)) { - return _this.traversedObjects.get(originalArray); - } - var clonedArray = originalArray.clone(_this.dest); - _this.traversedObjects.set(originalArray, clonedArray); - for (var idx = 0, len = originalArray.size(); idx < len; idx++) { - var value = originalArray.get(idx); - clonedArray.set(idx, _this.copy(value)); - } - return clonedArray; - }; - this.copyPDFStream = function(originalStream) { - if (_this.traversedObjects.has(originalStream)) { - return _this.traversedObjects.get(originalStream); - } - var clonedStream = originalStream.clone(_this.dest); - _this.traversedObjects.set(originalStream, clonedStream); - var entries = originalStream.dict.entries(); - for (var idx = 0, len = entries.length; idx < len; idx++) { - var _a3 = entries[idx], key = _a3[0], value = _a3[1]; - clonedStream.dict.set(key, _this.copy(value)); - } - return clonedStream; - }; - this.copyPDFIndirectObject = function(ref) { - var alreadyMapped = _this.traversedObjects.has(ref); - if (!alreadyMapped) { - var newRef = _this.dest.nextRef(); - _this.traversedObjects.set(ref, newRef); - var dereferencedValue = _this.src.lookup(ref); - if (dereferencedValue) { - var cloned = _this.copy(dereferencedValue); - _this.dest.assign(newRef, cloned); - } - } - return _this.traversedObjects.get(ref); - }; - this.src = src; - this.dest = dest; - } - PDFObjectCopier2.for = function(src, dest) { - return new PDFObjectCopier2(src, dest); - }; - return PDFObjectCopier2; - }() -); -var PDFObjectCopier_default = PDFObjectCopier; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/document/PDFCrossRefSection.js -var PDFCrossRefSection = ( - /** @class */ - function() { - function PDFCrossRefSection2(firstEntry) { - this.subsections = firstEntry ? [[firstEntry]] : []; - this.chunkIdx = 0; - this.chunkLength = firstEntry ? 1 : 0; - } - PDFCrossRefSection2.prototype.addEntry = function(ref, offset) { - this.append({ ref, offset, deleted: false }); - }; - PDFCrossRefSection2.prototype.addDeletedEntry = function(ref, nextFreeObjectNumber) { - this.append({ ref, offset: nextFreeObjectNumber, deleted: true }); - }; - PDFCrossRefSection2.prototype.toString = function() { - var section = "xref\n"; - for (var rangeIdx = 0, rangeLen = this.subsections.length; rangeIdx < rangeLen; rangeIdx++) { - var range2 = this.subsections[rangeIdx]; - section += range2[0].ref.objectNumber + " " + range2.length + "\n"; - for (var entryIdx = 0, entryLen = range2.length; entryIdx < entryLen; entryIdx++) { - var entry = range2[entryIdx]; - section += padStart(String(entry.offset), 10, "0"); - section += " "; - section += padStart(String(entry.ref.generationNumber), 5, "0"); - section += " "; - section += entry.deleted ? "f" : "n"; - section += " \n"; - } - } - return section; - }; - PDFCrossRefSection2.prototype.sizeInBytes = function() { - var size = 5; - for (var idx = 0, len = this.subsections.length; idx < len; idx++) { - var subsection = this.subsections[idx]; - var subsectionLength = subsection.length; - var firstEntry = subsection[0]; - size += 2; - size += String(firstEntry.ref.objectNumber).length; - size += String(subsectionLength).length; - size += 20 * subsectionLength; - } - return size; - }; - PDFCrossRefSection2.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - buffer[offset++] = CharCodes_default.x; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.f; - buffer[offset++] = CharCodes_default.Newline; - offset += this.copySubsectionsIntoBuffer(this.subsections, buffer, offset); - return offset - initialOffset; - }; - PDFCrossRefSection2.prototype.copySubsectionsIntoBuffer = function(subsections, buffer, offset) { - var initialOffset = offset; - var length = subsections.length; - for (var idx = 0; idx < length; idx++) { - var subsection = this.subsections[idx]; - var firstObjectNumber = String(subsection[0].ref.objectNumber); - offset += copyStringIntoBuffer(firstObjectNumber, buffer, offset); - buffer[offset++] = CharCodes_default.Space; - var rangeLength = String(subsection.length); - offset += copyStringIntoBuffer(rangeLength, buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - offset += this.copyEntriesIntoBuffer(subsection, buffer, offset); - } - return offset - initialOffset; - }; - PDFCrossRefSection2.prototype.copyEntriesIntoBuffer = function(entries, buffer, offset) { - var length = entries.length; - for (var idx = 0; idx < length; idx++) { - var entry = entries[idx]; - var entryOffset = padStart(String(entry.offset), 10, "0"); - offset += copyStringIntoBuffer(entryOffset, buffer, offset); - buffer[offset++] = CharCodes_default.Space; - var entryGen = padStart(String(entry.ref.generationNumber), 5, "0"); - offset += copyStringIntoBuffer(entryGen, buffer, offset); - buffer[offset++] = CharCodes_default.Space; - buffer[offset++] = entry.deleted ? CharCodes_default.f : CharCodes_default.n; - buffer[offset++] = CharCodes_default.Space; - buffer[offset++] = CharCodes_default.Newline; - } - return 20 * length; - }; - PDFCrossRefSection2.prototype.append = function(currEntry) { - if (this.chunkLength === 0) { - this.subsections.push([currEntry]); - this.chunkIdx = 0; - this.chunkLength = 1; - return; - } - var chunk = this.subsections[this.chunkIdx]; - var prevEntry = chunk[this.chunkLength - 1]; - if (currEntry.ref.objectNumber - prevEntry.ref.objectNumber > 1) { - this.subsections.push([currEntry]); - this.chunkIdx += 1; - this.chunkLength = 1; - } else { - chunk.push(currEntry); - this.chunkLength += 1; - } - }; - PDFCrossRefSection2.create = function() { - return new PDFCrossRefSection2({ - ref: PDFRef_default.of(0, 65535), - offset: 0, - deleted: true - }); - }; - PDFCrossRefSection2.createEmpty = function() { - return new PDFCrossRefSection2(); - }; - return PDFCrossRefSection2; - }() -); -var PDFCrossRefSection_default = PDFCrossRefSection; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/document/PDFTrailer.js -var PDFTrailer = ( - /** @class */ - function() { - function PDFTrailer2(lastXRefOffset) { - this.lastXRefOffset = String(lastXRefOffset); - } - PDFTrailer2.prototype.toString = function() { - return "startxref\n" + this.lastXRefOffset + "\n%%EOF"; - }; - PDFTrailer2.prototype.sizeInBytes = function() { - return 16 + this.lastXRefOffset.length; - }; - PDFTrailer2.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - buffer[offset++] = CharCodes_default.s; - buffer[offset++] = CharCodes_default.t; - buffer[offset++] = CharCodes_default.a; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.t; - buffer[offset++] = CharCodes_default.x; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.f; - buffer[offset++] = CharCodes_default.Newline; - offset += copyStringIntoBuffer(this.lastXRefOffset, buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.Percent; - buffer[offset++] = CharCodes_default.Percent; - buffer[offset++] = CharCodes_default.E; - buffer[offset++] = CharCodes_default.O; - buffer[offset++] = CharCodes_default.F; - return offset - initialOffset; - }; - PDFTrailer2.forLastCrossRefSectionOffset = function(offset) { - return new PDFTrailer2(offset); - }; - return PDFTrailer2; - }() -); -var PDFTrailer_default = PDFTrailer; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/document/PDFTrailerDict.js -var PDFTrailerDict = ( - /** @class */ - function() { - function PDFTrailerDict2(dict) { - this.dict = dict; - } - PDFTrailerDict2.prototype.toString = function() { - return "trailer\n" + this.dict.toString(); - }; - PDFTrailerDict2.prototype.sizeInBytes = function() { - return 8 + this.dict.sizeInBytes(); - }; - PDFTrailerDict2.prototype.copyBytesInto = function(buffer, offset) { - var initialOffset = offset; - buffer[offset++] = CharCodes_default.t; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.a; - buffer[offset++] = CharCodes_default.i; - buffer[offset++] = CharCodes_default.l; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.r; - buffer[offset++] = CharCodes_default.Newline; - offset += this.dict.copyBytesInto(buffer, offset); - return offset - initialOffset; - }; - PDFTrailerDict2.of = function(dict) { - return new PDFTrailerDict2(dict); - }; - return PDFTrailerDict2; - }() -); -var PDFTrailerDict_default = PDFTrailerDict; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFObjectStream.js -var PDFObjectStream = ( - /** @class */ - function(_super) { - __extends(PDFObjectStream2, _super); - function PDFObjectStream2(context, objects, encode) { - if (encode === void 0) { - encode = true; - } - var _this = _super.call(this, context.obj({}), encode) || this; - _this.objects = objects; - _this.offsets = _this.computeObjectOffsets(); - _this.offsetsString = _this.computeOffsetsString(); - _this.dict.set(PDFName_default.of("Type"), PDFName_default.of("ObjStm")); - _this.dict.set(PDFName_default.of("N"), PDFNumber_default.of(_this.objects.length)); - _this.dict.set(PDFName_default.of("First"), PDFNumber_default.of(_this.offsetsString.length)); - return _this; - } - PDFObjectStream2.prototype.getObjectsCount = function() { - return this.objects.length; - }; - PDFObjectStream2.prototype.clone = function(context) { - return PDFObjectStream2.withContextAndObjects(context || this.dict.context, this.objects.slice(), this.encode); - }; - PDFObjectStream2.prototype.getContentsString = function() { - var value = this.offsetsString; - for (var idx = 0, len = this.objects.length; idx < len; idx++) { - var _a3 = this.objects[idx], object = _a3[1]; - value += object + "\n"; - } - return value; - }; - PDFObjectStream2.prototype.getUnencodedContents = function() { - var buffer = new Uint8Array(this.getUnencodedContentsSize()); - var offset = copyStringIntoBuffer(this.offsetsString, buffer, 0); - for (var idx = 0, len = this.objects.length; idx < len; idx++) { - var _a3 = this.objects[idx], object = _a3[1]; - offset += object.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - } - return buffer; - }; - PDFObjectStream2.prototype.getUnencodedContentsSize = function() { - return this.offsetsString.length + last(this.offsets)[1] + last(this.objects)[1].sizeInBytes() + 1; - }; - PDFObjectStream2.prototype.computeOffsetsString = function() { - var offsetsString = ""; - for (var idx = 0, len = this.offsets.length; idx < len; idx++) { - var _a3 = this.offsets[idx], objectNumber = _a3[0], offset = _a3[1]; - offsetsString += objectNumber + " " + offset + " "; - } - return offsetsString; - }; - PDFObjectStream2.prototype.computeObjectOffsets = function() { - var offset = 0; - var offsets = new Array(this.objects.length); - for (var idx = 0, len = this.objects.length; idx < len; idx++) { - var _a3 = this.objects[idx], ref = _a3[0], object = _a3[1]; - offsets[idx] = [ref.objectNumber, offset]; - offset += object.sizeInBytes() + 1; - } - return offsets; - }; - PDFObjectStream2.withContextAndObjects = function(context, objects, encode) { - if (encode === void 0) { - encode = true; - } - return new PDFObjectStream2(context, objects, encode); - }; - return PDFObjectStream2; - }(PDFFlateStream_default) -); -var PDFObjectStream_default = PDFObjectStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/writers/PDFWriter.js -var PDFWriter = ( - /** @class */ - function() { - function PDFWriter2(context, objectsPerTick) { - var _this = this; - this.parsedObjects = 0; - this.shouldWaitForTick = function(n) { - _this.parsedObjects += n; - return _this.parsedObjects % _this.objectsPerTick === 0; - }; - this.context = context; - this.objectsPerTick = objectsPerTick; - } - PDFWriter2.prototype.serializeToBuffer = function() { - return __awaiter(this, void 0, void 0, function() { - var _a3, size, header, indirectObjects, xref, trailerDict, trailer, offset, buffer, idx, len, _b3, ref, object, objectNumber, generationNumber, n; - return __generator(this, function(_c2) { - switch (_c2.label) { - case 0: - return [4, this.computeBufferSize()]; - case 1: - _a3 = _c2.sent(), size = _a3.size, header = _a3.header, indirectObjects = _a3.indirectObjects, xref = _a3.xref, trailerDict = _a3.trailerDict, trailer = _a3.trailer; - offset = 0; - buffer = new Uint8Array(size); - offset += header.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.Newline; - idx = 0, len = indirectObjects.length; - _c2.label = 2; - case 2: - if (!(idx < len)) return [3, 5]; - _b3 = indirectObjects[idx], ref = _b3[0], object = _b3[1]; - objectNumber = String(ref.objectNumber); - offset += copyStringIntoBuffer(objectNumber, buffer, offset); - buffer[offset++] = CharCodes_default.Space; - generationNumber = String(ref.generationNumber); - offset += copyStringIntoBuffer(generationNumber, buffer, offset); - buffer[offset++] = CharCodes_default.Space; - buffer[offset++] = CharCodes_default.o; - buffer[offset++] = CharCodes_default.b; - buffer[offset++] = CharCodes_default.j; - buffer[offset++] = CharCodes_default.Newline; - offset += object.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.e; - buffer[offset++] = CharCodes_default.n; - buffer[offset++] = CharCodes_default.d; - buffer[offset++] = CharCodes_default.o; - buffer[offset++] = CharCodes_default.b; - buffer[offset++] = CharCodes_default.j; - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.Newline; - n = object instanceof PDFObjectStream_default ? object.getObjectsCount() : 1; - if (!this.shouldWaitForTick(n)) return [3, 4]; - return [4, waitForTick()]; - case 3: - _c2.sent(); - _c2.label = 4; - case 4: - idx++; - return [3, 2]; - case 5: - if (xref) { - offset += xref.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - } - if (trailerDict) { - offset += trailerDict.copyBytesInto(buffer, offset); - buffer[offset++] = CharCodes_default.Newline; - buffer[offset++] = CharCodes_default.Newline; - } - offset += trailer.copyBytesInto(buffer, offset); - return [2, buffer]; - } - }); - }); - }; - PDFWriter2.prototype.computeIndirectObjectSize = function(_a3) { - var ref = _a3[0], object = _a3[1]; - var refSize = ref.sizeInBytes() + 3; - var objectSize = object.sizeInBytes() + 9; - return refSize + objectSize; - }; - PDFWriter2.prototype.createTrailerDict = function() { - return this.context.obj({ - Size: this.context.largestObjectNumber + 1, - Root: this.context.trailerInfo.Root, - Encrypt: this.context.trailerInfo.Encrypt, - Info: this.context.trailerInfo.Info, - ID: this.context.trailerInfo.ID - }); - }; - PDFWriter2.prototype.computeBufferSize = function() { - return __awaiter(this, void 0, void 0, function() { - var header, size, xref, indirectObjects, idx, len, indirectObject, ref, xrefOffset, trailerDict, trailer; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - header = PDFHeader_default.forVersion(1, 7); - size = header.sizeInBytes() + 2; - xref = PDFCrossRefSection_default.create(); - indirectObjects = this.context.enumerateIndirectObjects(); - idx = 0, len = indirectObjects.length; - _a3.label = 1; - case 1: - if (!(idx < len)) return [3, 4]; - indirectObject = indirectObjects[idx]; - ref = indirectObject[0]; - xref.addEntry(ref, size); - size += this.computeIndirectObjectSize(indirectObject); - if (!this.shouldWaitForTick(1)) return [3, 3]; - return [4, waitForTick()]; - case 2: - _a3.sent(); - _a3.label = 3; - case 3: - idx++; - return [3, 1]; - case 4: - xrefOffset = size; - size += xref.sizeInBytes() + 1; - trailerDict = PDFTrailerDict_default.of(this.createTrailerDict()); - size += trailerDict.sizeInBytes() + 2; - trailer = PDFTrailer_default.forLastCrossRefSectionOffset(xrefOffset); - size += trailer.sizeInBytes(); - return [2, { size, header, indirectObjects, xref, trailerDict, trailer }]; - } - }); - }); - }; - PDFWriter2.forContext = function(context, objectsPerTick) { - return new PDFWriter2(context, objectsPerTick); - }; - return PDFWriter2; - }() -); -var PDFWriter_default = PDFWriter; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFInvalidObject.js -var PDFInvalidObject = ( - /** @class */ - function(_super) { - __extends(PDFInvalidObject2, _super); - function PDFInvalidObject2(data) { - var _this = _super.call(this) || this; - _this.data = data; - return _this; - } - PDFInvalidObject2.prototype.clone = function() { - return PDFInvalidObject2.of(this.data.slice()); - }; - PDFInvalidObject2.prototype.toString = function() { - return "PDFInvalidObject(" + this.data.length + " bytes)"; - }; - PDFInvalidObject2.prototype.sizeInBytes = function() { - return this.data.length; - }; - PDFInvalidObject2.prototype.copyBytesInto = function(buffer, offset) { - var length = this.data.length; - for (var idx = 0; idx < length; idx++) { - buffer[offset++] = this.data[idx]; - } - return length; - }; - PDFInvalidObject2.of = function(data) { - return new PDFInvalidObject2(data); - }; - return PDFInvalidObject2; - }(PDFObject_default) -); -var PDFInvalidObject_default = PDFInvalidObject; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFCrossRefStream.js -var EntryType; -(function(EntryType2) { - EntryType2[EntryType2["Deleted"] = 0] = "Deleted"; - EntryType2[EntryType2["Uncompressed"] = 1] = "Uncompressed"; - EntryType2[EntryType2["Compressed"] = 2] = "Compressed"; -})(EntryType || (EntryType = {})); -var PDFCrossRefStream = ( - /** @class */ - function(_super) { - __extends(PDFCrossRefStream2, _super); - function PDFCrossRefStream2(dict, entries, encode) { - if (encode === void 0) { - encode = true; - } - var _this = _super.call(this, dict, encode) || this; - _this.computeIndex = function() { - var subsections = []; - var subsectionLength = 0; - for (var idx = 0, len = _this.entries.length; idx < len; idx++) { - var currEntry = _this.entries[idx]; - var prevEntry = _this.entries[idx - 1]; - if (idx === 0) { - subsections.push(currEntry.ref.objectNumber); - } else if (currEntry.ref.objectNumber - prevEntry.ref.objectNumber > 1) { - subsections.push(subsectionLength); - subsections.push(currEntry.ref.objectNumber); - subsectionLength = 0; - } - subsectionLength += 1; - } - subsections.push(subsectionLength); - return subsections; - }; - _this.computeEntryTuples = function() { - var entryTuples = new Array(_this.entries.length); - for (var idx = 0, len = _this.entries.length; idx < len; idx++) { - var entry = _this.entries[idx]; - if (entry.type === EntryType.Deleted) { - var type = entry.type, nextFreeObjectNumber = entry.nextFreeObjectNumber, ref = entry.ref; - entryTuples[idx] = [type, nextFreeObjectNumber, ref.generationNumber]; - } - if (entry.type === EntryType.Uncompressed) { - var type = entry.type, offset = entry.offset, ref = entry.ref; - entryTuples[idx] = [type, offset, ref.generationNumber]; - } - if (entry.type === EntryType.Compressed) { - var type = entry.type, objectStreamRef = entry.objectStreamRef, index2 = entry.index; - entryTuples[idx] = [type, objectStreamRef.objectNumber, index2]; - } - } - return entryTuples; - }; - _this.computeMaxEntryByteWidths = function() { - var entryTuples = _this.entryTuplesCache.access(); - var widths = [0, 0, 0]; - for (var idx = 0, len = entryTuples.length; idx < len; idx++) { - var _a3 = entryTuples[idx], first = _a3[0], second = _a3[1], third = _a3[2]; - var firstSize = sizeInBytes(first); - var secondSize = sizeInBytes(second); - var thirdSize = sizeInBytes(third); - if (firstSize > widths[0]) - widths[0] = firstSize; - if (secondSize > widths[1]) - widths[1] = secondSize; - if (thirdSize > widths[2]) - widths[2] = thirdSize; - } - return widths; - }; - _this.entries = entries || []; - _this.entryTuplesCache = Cache_default.populatedBy(_this.computeEntryTuples); - _this.maxByteWidthsCache = Cache_default.populatedBy(_this.computeMaxEntryByteWidths); - _this.indexCache = Cache_default.populatedBy(_this.computeIndex); - dict.set(PDFName_default.of("Type"), PDFName_default.of("XRef")); - return _this; - } - PDFCrossRefStream2.prototype.addDeletedEntry = function(ref, nextFreeObjectNumber) { - var type = EntryType.Deleted; - this.entries.push({ type, ref, nextFreeObjectNumber }); - this.entryTuplesCache.invalidate(); - this.maxByteWidthsCache.invalidate(); - this.indexCache.invalidate(); - this.contentsCache.invalidate(); - }; - PDFCrossRefStream2.prototype.addUncompressedEntry = function(ref, offset) { - var type = EntryType.Uncompressed; - this.entries.push({ type, ref, offset }); - this.entryTuplesCache.invalidate(); - this.maxByteWidthsCache.invalidate(); - this.indexCache.invalidate(); - this.contentsCache.invalidate(); - }; - PDFCrossRefStream2.prototype.addCompressedEntry = function(ref, objectStreamRef, index2) { - var type = EntryType.Compressed; - this.entries.push({ type, ref, objectStreamRef, index: index2 }); - this.entryTuplesCache.invalidate(); - this.maxByteWidthsCache.invalidate(); - this.indexCache.invalidate(); - this.contentsCache.invalidate(); - }; - PDFCrossRefStream2.prototype.clone = function(context) { - var _a3 = this, dict = _a3.dict, entries = _a3.entries, encode = _a3.encode; - return PDFCrossRefStream2.of(dict.clone(context), entries.slice(), encode); - }; - PDFCrossRefStream2.prototype.getContentsString = function() { - var entryTuples = this.entryTuplesCache.access(); - var byteWidths = this.maxByteWidthsCache.access(); - var value = ""; - for (var entryIdx = 0, entriesLen = entryTuples.length; entryIdx < entriesLen; entryIdx++) { - var _a3 = entryTuples[entryIdx], first = _a3[0], second = _a3[1], third = _a3[2]; - var firstBytes = reverseArray(bytesFor(first)); - var secondBytes = reverseArray(bytesFor(second)); - var thirdBytes = reverseArray(bytesFor(third)); - for (var idx = byteWidths[0] - 1; idx >= 0; idx--) { - value += (firstBytes[idx] || 0).toString(2); - } - for (var idx = byteWidths[1] - 1; idx >= 0; idx--) { - value += (secondBytes[idx] || 0).toString(2); - } - for (var idx = byteWidths[2] - 1; idx >= 0; idx--) { - value += (thirdBytes[idx] || 0).toString(2); - } - } - return value; - }; - PDFCrossRefStream2.prototype.getUnencodedContents = function() { - var entryTuples = this.entryTuplesCache.access(); - var byteWidths = this.maxByteWidthsCache.access(); - var buffer = new Uint8Array(this.getUnencodedContentsSize()); - var offset = 0; - for (var entryIdx = 0, entriesLen = entryTuples.length; entryIdx < entriesLen; entryIdx++) { - var _a3 = entryTuples[entryIdx], first = _a3[0], second = _a3[1], third = _a3[2]; - var firstBytes = reverseArray(bytesFor(first)); - var secondBytes = reverseArray(bytesFor(second)); - var thirdBytes = reverseArray(bytesFor(third)); - for (var idx = byteWidths[0] - 1; idx >= 0; idx--) { - buffer[offset++] = firstBytes[idx] || 0; - } - for (var idx = byteWidths[1] - 1; idx >= 0; idx--) { - buffer[offset++] = secondBytes[idx] || 0; - } - for (var idx = byteWidths[2] - 1; idx >= 0; idx--) { - buffer[offset++] = thirdBytes[idx] || 0; - } - } - return buffer; - }; - PDFCrossRefStream2.prototype.getUnencodedContentsSize = function() { - var byteWidths = this.maxByteWidthsCache.access(); - var entryWidth = sum(byteWidths); - return entryWidth * this.entries.length; - }; - PDFCrossRefStream2.prototype.updateDict = function() { - _super.prototype.updateDict.call(this); - var byteWidths = this.maxByteWidthsCache.access(); - var index2 = this.indexCache.access(); - var context = this.dict.context; - this.dict.set(PDFName_default.of("W"), context.obj(byteWidths)); - this.dict.set(PDFName_default.of("Index"), context.obj(index2)); - }; - PDFCrossRefStream2.create = function(dict, encode) { - if (encode === void 0) { - encode = true; - } - var stream2 = new PDFCrossRefStream2(dict, [], encode); - stream2.addDeletedEntry(PDFRef_default.of(0, 65535), 0); - return stream2; - }; - PDFCrossRefStream2.of = function(dict, entries, encode) { - if (encode === void 0) { - encode = true; - } - return new PDFCrossRefStream2(dict, entries, encode); - }; - return PDFCrossRefStream2; - }(PDFFlateStream_default) -); -var PDFCrossRefStream_default = PDFCrossRefStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/writers/PDFStreamWriter.js -var PDFStreamWriter = ( - /** @class */ - function(_super) { - __extends(PDFStreamWriter2, _super); - function PDFStreamWriter2(context, objectsPerTick, encodeStreams, objectsPerStream) { - var _this = _super.call(this, context, objectsPerTick) || this; - _this.encodeStreams = encodeStreams; - _this.objectsPerStream = objectsPerStream; - return _this; - } - PDFStreamWriter2.prototype.computeBufferSize = function() { - return __awaiter(this, void 0, void 0, function() { - var objectNumber, header, size, xrefStream, uncompressedObjects, compressedObjects, objectStreamRefs, indirectObjects, idx, len, indirectObject, ref, object, shouldNotCompress, chunk, objectStreamRef, idx, len, chunk, ref, objectStream, xrefStreamRef, xrefOffset, trailer; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - objectNumber = this.context.largestObjectNumber + 1; - header = PDFHeader_default.forVersion(1, 7); - size = header.sizeInBytes() + 2; - xrefStream = PDFCrossRefStream_default.create(this.createTrailerDict(), this.encodeStreams); - uncompressedObjects = []; - compressedObjects = []; - objectStreamRefs = []; - indirectObjects = this.context.enumerateIndirectObjects(); - idx = 0, len = indirectObjects.length; - _a3.label = 1; - case 1: - if (!(idx < len)) return [3, 6]; - indirectObject = indirectObjects[idx]; - ref = indirectObject[0], object = indirectObject[1]; - shouldNotCompress = ref === this.context.trailerInfo.Encrypt || object instanceof PDFStream_default || object instanceof PDFInvalidObject_default || ref.generationNumber !== 0; - if (!shouldNotCompress) return [3, 4]; - uncompressedObjects.push(indirectObject); - xrefStream.addUncompressedEntry(ref, size); - size += this.computeIndirectObjectSize(indirectObject); - if (!this.shouldWaitForTick(1)) return [3, 3]; - return [4, waitForTick()]; - case 2: - _a3.sent(); - _a3.label = 3; - case 3: - return [3, 5]; - case 4: - chunk = last(compressedObjects); - objectStreamRef = last(objectStreamRefs); - if (!chunk || chunk.length % this.objectsPerStream === 0) { - chunk = []; - compressedObjects.push(chunk); - objectStreamRef = PDFRef_default.of(objectNumber++); - objectStreamRefs.push(objectStreamRef); - } - xrefStream.addCompressedEntry(ref, objectStreamRef, chunk.length); - chunk.push(indirectObject); - _a3.label = 5; - case 5: - idx++; - return [3, 1]; - case 6: - idx = 0, len = compressedObjects.length; - _a3.label = 7; - case 7: - if (!(idx < len)) return [3, 10]; - chunk = compressedObjects[idx]; - ref = objectStreamRefs[idx]; - objectStream = PDFObjectStream_default.withContextAndObjects(this.context, chunk, this.encodeStreams); - xrefStream.addUncompressedEntry(ref, size); - size += this.computeIndirectObjectSize([ref, objectStream]); - uncompressedObjects.push([ref, objectStream]); - if (!this.shouldWaitForTick(chunk.length)) return [3, 9]; - return [4, waitForTick()]; - case 8: - _a3.sent(); - _a3.label = 9; - case 9: - idx++; - return [3, 7]; - case 10: - xrefStreamRef = PDFRef_default.of(objectNumber++); - xrefStream.dict.set(PDFName_default.of("Size"), PDFNumber_default.of(objectNumber)); - xrefStream.addUncompressedEntry(xrefStreamRef, size); - xrefOffset = size; - size += this.computeIndirectObjectSize([xrefStreamRef, xrefStream]); - uncompressedObjects.push([xrefStreamRef, xrefStream]); - trailer = PDFTrailer_default.forLastCrossRefSectionOffset(xrefOffset); - size += trailer.sizeInBytes(); - return [2, { size, header, indirectObjects: uncompressedObjects, trailer }]; - } - }); - }); - }; - PDFStreamWriter2.forContext = function(context, objectsPerTick, encodeStreams, objectsPerStream) { - if (encodeStreams === void 0) { - encodeStreams = true; - } - if (objectsPerStream === void 0) { - objectsPerStream = 50; - } - return new PDFStreamWriter2(context, objectsPerTick, encodeStreams, objectsPerStream); - }; - return PDFStreamWriter2; - }(PDFWriter_default) -); -var PDFStreamWriter_default = PDFStreamWriter; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFHexString.js -var PDFHexString = ( - /** @class */ - function(_super) { - __extends(PDFHexString2, _super); - function PDFHexString2(value) { - var _this = _super.call(this) || this; - _this.value = value; - return _this; - } - PDFHexString2.prototype.asBytes = function() { - var hex = this.value + (this.value.length % 2 === 1 ? "0" : ""); - var hexLength = hex.length; - var bytes = new Uint8Array(hex.length / 2); - var hexOffset = 0; - var bytesOffset = 0; - while (hexOffset < hexLength) { - var byte = parseInt(hex.substring(hexOffset, hexOffset + 2), 16); - bytes[bytesOffset] = byte; - hexOffset += 2; - bytesOffset += 1; - } - return bytes; - }; - PDFHexString2.prototype.decodeText = function() { - var bytes = this.asBytes(); - if (hasUtf16BOM(bytes)) - return utf16Decode(bytes); - return pdfDocEncodingDecode(bytes); - }; - PDFHexString2.prototype.decodeDate = function() { - var text2 = this.decodeText(); - var date = parseDate(text2); - if (!date) - throw new InvalidPDFDateStringError(text2); - return date; - }; - PDFHexString2.prototype.asString = function() { - return this.value; - }; - PDFHexString2.prototype.clone = function() { - return PDFHexString2.of(this.value); - }; - PDFHexString2.prototype.toString = function() { - return "<" + this.value + ">"; - }; - PDFHexString2.prototype.sizeInBytes = function() { - return this.value.length + 2; - }; - PDFHexString2.prototype.copyBytesInto = function(buffer, offset) { - buffer[offset++] = CharCodes_default.LessThan; - offset += copyStringIntoBuffer(this.value, buffer, offset); - buffer[offset++] = CharCodes_default.GreaterThan; - return this.value.length + 2; - }; - PDFHexString2.of = function(value) { - return new PDFHexString2(value); - }; - PDFHexString2.fromText = function(value) { - var encoded = utf16Encode(value); - var hex = ""; - for (var idx = 0, len = encoded.length; idx < len; idx++) { - hex += toHexStringOfMinLength(encoded[idx], 4); - } - return new PDFHexString2(hex); - }; - return PDFHexString2; - }(PDFObject_default) -); -var PDFHexString_default = PDFHexString; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/StandardFontEmbedder.js -var StandardFontEmbedder = ( - /** @class */ - function() { - function StandardFontEmbedder2(fontName, customName) { - this.encoding = fontName === FontNames.ZapfDingbats ? Encodings.ZapfDingbats : fontName === FontNames.Symbol ? Encodings.Symbol : Encodings.WinAnsi; - this.font = Font.load(fontName); - this.fontName = this.font.FontName; - this.customName = customName; - } - StandardFontEmbedder2.prototype.encodeText = function(text2) { - var glyphs = this.encodeTextAsGlyphs(text2); - var hexCodes = new Array(glyphs.length); - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - hexCodes[idx] = toHexString(glyphs[idx].code); - } - return PDFHexString_default.of(hexCodes.join("")); - }; - StandardFontEmbedder2.prototype.widthOfTextAtSize = function(text2, size) { - var glyphs = this.encodeTextAsGlyphs(text2); - var totalWidth = 0; - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - var left = glyphs[idx].name; - var right = (glyphs[idx + 1] || {}).name; - var kernAmount = this.font.getXAxisKerningForPair(left, right) || 0; - totalWidth += this.widthOfGlyph(left) + kernAmount; - } - var scale2 = size / 1e3; - return totalWidth * scale2; - }; - StandardFontEmbedder2.prototype.heightOfFontAtSize = function(size, options) { - if (options === void 0) { - options = {}; - } - var _a3 = options.descender, descender = _a3 === void 0 ? true : _a3; - var _b3 = this.font, Ascender = _b3.Ascender, Descender = _b3.Descender, FontBBox = _b3.FontBBox; - var yTop = Ascender || FontBBox[3]; - var yBottom = Descender || FontBBox[1]; - var height = yTop - yBottom; - if (!descender) - height += Descender || 0; - return height / 1e3 * size; - }; - StandardFontEmbedder2.prototype.sizeOfFontAtHeight = function(height) { - var _a3 = this.font, Ascender = _a3.Ascender, Descender = _a3.Descender, FontBBox = _a3.FontBBox; - var yTop = Ascender || FontBBox[3]; - var yBottom = Descender || FontBBox[1]; - return 1e3 * height / (yTop - yBottom); - }; - StandardFontEmbedder2.prototype.embedIntoContext = function(context, ref) { - var fontDict = context.obj({ - Type: "Font", - Subtype: "Type1", - BaseFont: this.customName || this.fontName, - Encoding: this.encoding === Encodings.WinAnsi ? "WinAnsiEncoding" : void 0 - }); - if (ref) { - context.assign(ref, fontDict); - return ref; - } else { - return context.register(fontDict); - } - }; - StandardFontEmbedder2.prototype.widthOfGlyph = function(glyphName) { - return this.font.getWidthOfGlyph(glyphName) || 250; - }; - StandardFontEmbedder2.prototype.encodeTextAsGlyphs = function(text2) { - var codePoints = Array.from(text2); - var glyphs = new Array(codePoints.length); - for (var idx = 0, len = codePoints.length; idx < len; idx++) { - var codePoint = toCodePoint(codePoints[idx]); - glyphs[idx] = this.encoding.encodeUnicodeCodePoint(codePoint); - } - return glyphs; - }; - StandardFontEmbedder2.for = function(fontName, customName) { - return new StandardFontEmbedder2(fontName, customName); - }; - return StandardFontEmbedder2; - }() -); -var StandardFontEmbedder_default = StandardFontEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/CMap.js -var createCmap = function(glyphs, glyphId) { - var bfChars = new Array(glyphs.length); - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - var glyph = glyphs[idx]; - var id = cmapHexFormat(cmapHexString(glyphId(glyph))); - var unicode = cmapHexFormat.apply(void 0, glyph.codePoints.map(cmapCodePointFormat)); - bfChars[idx] = [id, unicode]; - } - return fillCmapTemplate(bfChars); -}; -var fillCmapTemplate = function(bfChars) { - return "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n" + bfChars.length + " beginbfchar\n" + bfChars.map(function(_a3) { - var glyphId = _a3[0], codePoint = _a3[1]; - return glyphId + " " + codePoint; - }).join("\n") + "\nendbfchar\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"; -}; -var cmapHexFormat = function() { - var values2 = []; - for (var _i = 0; _i < arguments.length; _i++) { - values2[_i] = arguments[_i]; - } - return "<" + values2.join("") + ">"; -}; -var cmapHexString = function(value) { - return toHexStringOfMinLength(value, 4); -}; -var cmapCodePointFormat = function(codePoint) { - if (isWithinBMP(codePoint)) - return cmapHexString(codePoint); - if (hasSurrogates(codePoint)) { - var hs = highSurrogate(codePoint); - var ls = lowSurrogate(codePoint); - return "" + cmapHexString(hs) + cmapHexString(ls); - } - var hex = toHexString(codePoint); - var msg = "0x" + hex + " is not a valid UTF-8 or UTF-16 codepoint."; - throw new Error(msg); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/FontFlags.js -var makeFontFlags = function(options) { - var flags = 0; - var flipBit = function(bit) { - flags |= 1 << bit - 1; - }; - if (options.fixedPitch) - flipBit(1); - if (options.serif) - flipBit(2); - if (options.symbolic) - flipBit(3); - if (options.script) - flipBit(4); - if (options.nonsymbolic) - flipBit(6); - if (options.italic) - flipBit(7); - if (options.allCap) - flipBit(17); - if (options.smallCap) - flipBit(18); - if (options.forceBold) - flipBit(19); - return flags; -}; -var deriveFontFlags = function(font) { - var familyClass = font["OS/2"] ? font["OS/2"].sFamilyClass : 0; - var flags = makeFontFlags({ - fixedPitch: font.post.isFixedPitch, - serif: 1 <= familyClass && familyClass <= 7, - symbolic: true, - script: familyClass === 10, - italic: font.head.macStyle.italic - }); - return flags; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/objects/PDFString.js -var PDFString = ( - /** @class */ - function(_super) { - __extends(PDFString2, _super); - function PDFString2(value) { - var _this = _super.call(this) || this; - _this.value = value; - return _this; - } - PDFString2.prototype.asBytes = function() { - var bytes = []; - var octal = ""; - var escaped = false; - var pushByte = function(byte2) { - if (byte2 !== void 0) - bytes.push(byte2); - escaped = false; - }; - for (var idx = 0, len = this.value.length; idx < len; idx++) { - var char = this.value[idx]; - var byte = toCharCode(char); - var nextChar = this.value[idx + 1]; - if (!escaped) { - if (byte === CharCodes_default.BackSlash) - escaped = true; - else - pushByte(byte); - } else { - if (byte === CharCodes_default.Newline) - pushByte(); - else if (byte === CharCodes_default.CarriageReturn) - pushByte(); - else if (byte === CharCodes_default.n) - pushByte(CharCodes_default.Newline); - else if (byte === CharCodes_default.r) - pushByte(CharCodes_default.CarriageReturn); - else if (byte === CharCodes_default.t) - pushByte(CharCodes_default.Tab); - else if (byte === CharCodes_default.b) - pushByte(CharCodes_default.Backspace); - else if (byte === CharCodes_default.f) - pushByte(CharCodes_default.FormFeed); - else if (byte === CharCodes_default.LeftParen) - pushByte(CharCodes_default.LeftParen); - else if (byte === CharCodes_default.RightParen) - pushByte(CharCodes_default.RightParen); - else if (byte === CharCodes_default.Backspace) - pushByte(CharCodes_default.BackSlash); - else if (byte >= CharCodes_default.Zero && byte <= CharCodes_default.Seven) { - octal += char; - if (octal.length === 3 || !(nextChar >= "0" && nextChar <= "7")) { - pushByte(parseInt(octal, 8)); - octal = ""; - } - } else { - pushByte(byte); - } - } - } - return new Uint8Array(bytes); - }; - PDFString2.prototype.decodeText = function() { - var bytes = this.asBytes(); - if (hasUtf16BOM(bytes)) - return utf16Decode(bytes); - return pdfDocEncodingDecode(bytes); - }; - PDFString2.prototype.decodeDate = function() { - var text2 = this.decodeText(); - var date = parseDate(text2); - if (!date) - throw new InvalidPDFDateStringError(text2); - return date; - }; - PDFString2.prototype.asString = function() { - return this.value; - }; - PDFString2.prototype.clone = function() { - return PDFString2.of(this.value); - }; - PDFString2.prototype.toString = function() { - return "(" + this.value + ")"; - }; - PDFString2.prototype.sizeInBytes = function() { - return this.value.length + 2; - }; - PDFString2.prototype.copyBytesInto = function(buffer, offset) { - buffer[offset++] = CharCodes_default.LeftParen; - offset += copyStringIntoBuffer(this.value, buffer, offset); - buffer[offset++] = CharCodes_default.RightParen; - return this.value.length + 2; - }; - PDFString2.of = function(value) { - return new PDFString2(value); - }; - PDFString2.fromDate = function(date) { - var year = padStart(String(date.getUTCFullYear()), 4, "0"); - var month = padStart(String(date.getUTCMonth() + 1), 2, "0"); - var day = padStart(String(date.getUTCDate()), 2, "0"); - var hours = padStart(String(date.getUTCHours()), 2, "0"); - var mins = padStart(String(date.getUTCMinutes()), 2, "0"); - var secs = padStart(String(date.getUTCSeconds()), 2, "0"); - return new PDFString2("D:" + year + month + day + hours + mins + secs + "Z"); - }; - return PDFString2; - }(PDFObject_default) -); -var PDFString_default = PDFString; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/CustomFontEmbedder.js -var CustomFontEmbedder = ( - /** @class */ - function() { - function CustomFontEmbedder2(font, fontData, customName, fontFeatures) { - var _this = this; - this.allGlyphsInFontSortedById = function() { - var glyphs = new Array(_this.font.characterSet.length); - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - var codePoint = _this.font.characterSet[idx]; - glyphs[idx] = _this.font.glyphForCodePoint(codePoint); - } - return sortedUniq(glyphs.sort(byAscendingId), function(g) { - return g.id; - }); - }; - this.font = font; - this.scale = 1e3 / this.font.unitsPerEm; - this.fontData = fontData; - this.fontName = this.font.postscriptName || "Font"; - this.customName = customName; - this.fontFeatures = fontFeatures; - this.baseFontName = ""; - this.glyphCache = Cache_default.populatedBy(this.allGlyphsInFontSortedById); - } - CustomFontEmbedder2.for = function(fontkit, fontData, customName, fontFeatures) { - return __awaiter(this, void 0, void 0, function() { - var font; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, fontkit.create(fontData)]; - case 1: - font = _a3.sent(); - return [2, new CustomFontEmbedder2(font, fontData, customName, fontFeatures)]; - } - }); - }); - }; - CustomFontEmbedder2.prototype.encodeText = function(text2) { - var glyphs = this.font.layout(text2, this.fontFeatures).glyphs; - var hexCodes = new Array(glyphs.length); - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - hexCodes[idx] = toHexStringOfMinLength(glyphs[idx].id, 4); - } - return PDFHexString_default.of(hexCodes.join("")); - }; - CustomFontEmbedder2.prototype.widthOfTextAtSize = function(text2, size) { - var glyphs = this.font.layout(text2, this.fontFeatures).glyphs; - var totalWidth = 0; - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - totalWidth += glyphs[idx].advanceWidth * this.scale; - } - var scale2 = size / 1e3; - return totalWidth * scale2; - }; - CustomFontEmbedder2.prototype.heightOfFontAtSize = function(size, options) { - if (options === void 0) { - options = {}; - } - var _a3 = options.descender, descender = _a3 === void 0 ? true : _a3; - var _b3 = this.font, ascent = _b3.ascent, descent = _b3.descent, bbox = _b3.bbox; - var yTop = (ascent || bbox.maxY) * this.scale; - var yBottom = (descent || bbox.minY) * this.scale; - var height = yTop - yBottom; - if (!descender) - height -= Math.abs(descent) || 0; - return height / 1e3 * size; - }; - CustomFontEmbedder2.prototype.sizeOfFontAtHeight = function(height) { - var _a3 = this.font, ascent = _a3.ascent, descent = _a3.descent, bbox = _a3.bbox; - var yTop = (ascent || bbox.maxY) * this.scale; - var yBottom = (descent || bbox.minY) * this.scale; - return 1e3 * height / (yTop - yBottom); - }; - CustomFontEmbedder2.prototype.embedIntoContext = function(context, ref) { - this.baseFontName = this.customName || context.addRandomSuffix(this.fontName); - return this.embedFontDict(context, ref); - }; - CustomFontEmbedder2.prototype.embedFontDict = function(context, ref) { - return __awaiter(this, void 0, void 0, function() { - var cidFontDictRef, unicodeCMapRef, fontDict; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, this.embedCIDFontDict(context)]; - case 1: - cidFontDictRef = _a3.sent(); - unicodeCMapRef = this.embedUnicodeCmap(context); - fontDict = context.obj({ - Type: "Font", - Subtype: "Type0", - BaseFont: this.baseFontName, - Encoding: "Identity-H", - DescendantFonts: [cidFontDictRef], - ToUnicode: unicodeCMapRef - }); - if (ref) { - context.assign(ref, fontDict); - return [2, ref]; - } else { - return [2, context.register(fontDict)]; - } - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - CustomFontEmbedder2.prototype.isCFF = function() { - return this.font.cff; - }; - CustomFontEmbedder2.prototype.embedCIDFontDict = function(context) { - return __awaiter(this, void 0, void 0, function() { - var fontDescriptorRef, cidFontDict; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, this.embedFontDescriptor(context)]; - case 1: - fontDescriptorRef = _a3.sent(); - cidFontDict = context.obj({ - Type: "Font", - Subtype: this.isCFF() ? "CIDFontType0" : "CIDFontType2", - CIDToGIDMap: "Identity", - BaseFont: this.baseFontName, - CIDSystemInfo: { - Registry: PDFString_default.of("Adobe"), - Ordering: PDFString_default.of("Identity"), - Supplement: 0 - }, - FontDescriptor: fontDescriptorRef, - W: this.computeWidths() - }); - return [2, context.register(cidFontDict)]; - } - }); - }); - }; - CustomFontEmbedder2.prototype.embedFontDescriptor = function(context) { - return __awaiter(this, void 0, void 0, function() { - var fontStreamRef, scale2, _a3, italicAngle, ascent, descent, capHeight, xHeight, _b3, minX, minY, maxX, maxY, fontDescriptor; - var _c2; - return __generator(this, function(_d) { - switch (_d.label) { - case 0: - return [4, this.embedFontStream(context)]; - case 1: - fontStreamRef = _d.sent(); - scale2 = this.scale; - _a3 = this.font, italicAngle = _a3.italicAngle, ascent = _a3.ascent, descent = _a3.descent, capHeight = _a3.capHeight, xHeight = _a3.xHeight; - _b3 = this.font.bbox, minX = _b3.minX, minY = _b3.minY, maxX = _b3.maxX, maxY = _b3.maxY; - fontDescriptor = context.obj((_c2 = { - Type: "FontDescriptor", - FontName: this.baseFontName, - Flags: deriveFontFlags(this.font), - FontBBox: [minX * scale2, minY * scale2, maxX * scale2, maxY * scale2], - ItalicAngle: italicAngle, - Ascent: ascent * scale2, - Descent: descent * scale2, - CapHeight: (capHeight || ascent) * scale2, - XHeight: (xHeight || 0) * scale2, - // Not sure how to compute/find this, nor is anybody else really: - // https://stackoverflow.com/questions/35485179/stemv-value-of-the-truetype-font - StemV: 0 - }, _c2[this.isCFF() ? "FontFile3" : "FontFile2"] = fontStreamRef, _c2)); - return [2, context.register(fontDescriptor)]; - } - }); - }); - }; - CustomFontEmbedder2.prototype.serializeFont = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a3) { - return [2, this.fontData]; - }); - }); - }; - CustomFontEmbedder2.prototype.embedFontStream = function(context) { - return __awaiter(this, void 0, void 0, function() { - var fontStream, _a3, _b3; - return __generator(this, function(_c2) { - switch (_c2.label) { - case 0: - _b3 = (_a3 = context).flateStream; - return [4, this.serializeFont()]; - case 1: - fontStream = _b3.apply(_a3, [_c2.sent(), { - Subtype: this.isCFF() ? "CIDFontType0C" : void 0 - }]); - return [2, context.register(fontStream)]; - } - }); - }); - }; - CustomFontEmbedder2.prototype.embedUnicodeCmap = function(context) { - var cmap = createCmap(this.glyphCache.access(), this.glyphId.bind(this)); - var cmapStream = context.flateStream(cmap); - return context.register(cmapStream); - }; - CustomFontEmbedder2.prototype.glyphId = function(glyph) { - return glyph ? glyph.id : -1; - }; - CustomFontEmbedder2.prototype.computeWidths = function() { - var glyphs = this.glyphCache.access(); - var widths = []; - var currSection = []; - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - var currGlyph = glyphs[idx]; - var prevGlyph = glyphs[idx - 1]; - var currGlyphId = this.glyphId(currGlyph); - var prevGlyphId = this.glyphId(prevGlyph); - if (idx === 0) { - widths.push(currGlyphId); - } else if (currGlyphId - prevGlyphId !== 1) { - widths.push(currSection); - widths.push(currGlyphId); - currSection = []; - } - currSection.push(currGlyph.advanceWidth * this.scale); - } - widths.push(currSection); - return widths; - }; - return CustomFontEmbedder2; - }() -); -var CustomFontEmbedder_default = CustomFontEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/CustomFontSubsetEmbedder.js -var CustomFontSubsetEmbedder = ( - /** @class */ - function(_super) { - __extends(CustomFontSubsetEmbedder2, _super); - function CustomFontSubsetEmbedder2(font, fontData, customFontName, fontFeatures) { - var _this = _super.call(this, font, fontData, customFontName, fontFeatures) || this; - _this.subset = _this.font.createSubset(); - _this.glyphs = []; - _this.glyphCache = Cache_default.populatedBy(function() { - return _this.glyphs; - }); - _this.glyphIdMap = /* @__PURE__ */ new Map(); - return _this; - } - CustomFontSubsetEmbedder2.for = function(fontkit, fontData, customFontName, fontFeatures) { - return __awaiter(this, void 0, void 0, function() { - var font; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, fontkit.create(fontData)]; - case 1: - font = _a3.sent(); - return [2, new CustomFontSubsetEmbedder2(font, fontData, customFontName, fontFeatures)]; - } - }); - }); - }; - CustomFontSubsetEmbedder2.prototype.encodeText = function(text2) { - var glyphs = this.font.layout(text2, this.fontFeatures).glyphs; - var hexCodes = new Array(glyphs.length); - for (var idx = 0, len = glyphs.length; idx < len; idx++) { - var glyph = glyphs[idx]; - var subsetGlyphId = this.subset.includeGlyph(glyph); - this.glyphs[subsetGlyphId - 1] = glyph; - this.glyphIdMap.set(glyph.id, subsetGlyphId); - hexCodes[idx] = toHexStringOfMinLength(subsetGlyphId, 4); - } - this.glyphCache.invalidate(); - return PDFHexString_default.of(hexCodes.join("")); - }; - CustomFontSubsetEmbedder2.prototype.isCFF = function() { - return this.subset.cff; - }; - CustomFontSubsetEmbedder2.prototype.glyphId = function(glyph) { - return glyph ? this.glyphIdMap.get(glyph.id) : -1; - }; - CustomFontSubsetEmbedder2.prototype.serializeFont = function() { - var _this = this; - return new Promise(function(resolve, reject) { - var parts = []; - _this.subset.encodeStream().on("data", function(bytes) { - return parts.push(bytes); - }).on("end", function() { - return resolve(mergeUint8Arrays(parts)); - }).on("error", function(err) { - return reject(err); - }); - }); - }; - return CustomFontSubsetEmbedder2; - }(CustomFontEmbedder_default) -); -var CustomFontSubsetEmbedder_default = CustomFontSubsetEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/FileEmbedder.js -var AFRelationship; -(function(AFRelationship2) { - AFRelationship2["Source"] = "Source"; - AFRelationship2["Data"] = "Data"; - AFRelationship2["Alternative"] = "Alternative"; - AFRelationship2["Supplement"] = "Supplement"; - AFRelationship2["EncryptedPayload"] = "EncryptedPayload"; - AFRelationship2["FormData"] = "EncryptedPayload"; - AFRelationship2["Schema"] = "Schema"; - AFRelationship2["Unspecified"] = "Unspecified"; -})(AFRelationship || (AFRelationship = {})); -var FileEmbedder = ( - /** @class */ - function() { - function FileEmbedder2(fileData, fileName, options) { - if (options === void 0) { - options = {}; - } - this.fileData = fileData; - this.fileName = fileName; - this.options = options; - } - FileEmbedder2.for = function(bytes, fileName, options) { - if (options === void 0) { - options = {}; - } - return new FileEmbedder2(bytes, fileName, options); - }; - FileEmbedder2.prototype.embedIntoContext = function(context, ref) { - return __awaiter(this, void 0, void 0, function() { - var _a3, mimeType, description, creationDate, modificationDate, afRelationship, embeddedFileStream, embeddedFileStreamRef, fileSpecDict; - return __generator(this, function(_b3) { - _a3 = this.options, mimeType = _a3.mimeType, description = _a3.description, creationDate = _a3.creationDate, modificationDate = _a3.modificationDate, afRelationship = _a3.afRelationship; - embeddedFileStream = context.flateStream(this.fileData, { - Type: "EmbeddedFile", - Subtype: mimeType !== null && mimeType !== void 0 ? mimeType : void 0, - Params: { - Size: this.fileData.length, - CreationDate: creationDate ? PDFString_default.fromDate(creationDate) : void 0, - ModDate: modificationDate ? PDFString_default.fromDate(modificationDate) : void 0 - } - }); - embeddedFileStreamRef = context.register(embeddedFileStream); - fileSpecDict = context.obj({ - Type: "Filespec", - F: PDFString_default.of(this.fileName), - UF: PDFHexString_default.fromText(this.fileName), - EF: { F: embeddedFileStreamRef }, - Desc: description ? PDFHexString_default.fromText(description) : void 0, - AFRelationship: afRelationship !== null && afRelationship !== void 0 ? afRelationship : void 0 - }); - if (ref) { - context.assign(ref, fileSpecDict); - return [2, ref]; - } else { - return [2, context.register(fileSpecDict)]; - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - return FileEmbedder2; - }() -); -var FileEmbedder_default = FileEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/JpegEmbedder.js -var MARKERS = [ - 65472, - 65473, - 65474, - 65475, - 65477, - 65478, - 65479, - 65480, - 65481, - 65482, - 65483, - 65484, - 65485, - 65486, - 65487 -]; -var ColorSpace; -(function(ColorSpace2) { - ColorSpace2["DeviceGray"] = "DeviceGray"; - ColorSpace2["DeviceRGB"] = "DeviceRGB"; - ColorSpace2["DeviceCMYK"] = "DeviceCMYK"; -})(ColorSpace || (ColorSpace = {})); -var ChannelToColorSpace = { - 1: ColorSpace.DeviceGray, - 3: ColorSpace.DeviceRGB, - 4: ColorSpace.DeviceCMYK -}; -var JpegEmbedder = ( - /** @class */ - function() { - function JpegEmbedder2(imageData, bitsPerComponent, width, height, colorSpace) { - this.imageData = imageData; - this.bitsPerComponent = bitsPerComponent; - this.width = width; - this.height = height; - this.colorSpace = colorSpace; - } - JpegEmbedder2.for = function(imageData) { - return __awaiter(this, void 0, void 0, function() { - var dataView, soi, pos, marker, bitsPerComponent, height, width, channelByte, channelName, colorSpace; - return __generator(this, function(_a3) { - dataView = new DataView(imageData.buffer); - soi = dataView.getUint16(0); - if (soi !== 65496) - throw new Error("SOI not found in JPEG"); - pos = 2; - while (pos < dataView.byteLength) { - marker = dataView.getUint16(pos); - pos += 2; - if (MARKERS.includes(marker)) - break; - pos += dataView.getUint16(pos); - } - if (!MARKERS.includes(marker)) - throw new Error("Invalid JPEG"); - pos += 2; - bitsPerComponent = dataView.getUint8(pos++); - height = dataView.getUint16(pos); - pos += 2; - width = dataView.getUint16(pos); - pos += 2; - channelByte = dataView.getUint8(pos++); - channelName = ChannelToColorSpace[channelByte]; - if (!channelName) - throw new Error("Unknown JPEG channel."); - colorSpace = channelName; - return [2, new JpegEmbedder2(imageData, bitsPerComponent, width, height, colorSpace)]; - }); - }); - }; - JpegEmbedder2.prototype.embedIntoContext = function(context, ref) { - return __awaiter(this, void 0, void 0, function() { - var xObject; - return __generator(this, function(_a3) { - xObject = context.stream(this.imageData, { - Type: "XObject", - Subtype: "Image", - BitsPerComponent: this.bitsPerComponent, - Width: this.width, - Height: this.height, - ColorSpace: this.colorSpace, - Filter: "DCTDecode", - // CMYK JPEG streams in PDF are typically stored complemented, - // with 1 as 'off' and 0 as 'on' (PDF 32000-1:2008, 8.6.4.4). - // - // Standalone CMYK JPEG (usually exported by Photoshop) are - // stored inverse, with 0 as 'off' and 1 as 'on', like RGB. - // - // Applying a swap here as a hedge that most bytes passing - // through this method will benefit from it. - Decode: this.colorSpace === ColorSpace.DeviceCMYK ? [1, 0, 1, 0, 1, 0, 1, 0] : void 0 - }); - if (ref) { - context.assign(ref, xObject); - return [2, ref]; - } else { - return [2, context.register(xObject)]; - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - return JpegEmbedder2; - }() -); -var JpegEmbedder_default = JpegEmbedder; - -// node_modules/.pnpm/@pdf-lib+upng@1.0.1/node_modules/@pdf-lib/upng/UPNG.js -var import_pako4 = __toESM(require_pako()); -var UPNG = {}; -UPNG.toRGBA8 = function(out) { - var w = out.width, h = out.height; - if (out.tabs.acTL == null) return [UPNG.toRGBA8.decodeImage(out.data, w, h, out).buffer]; - var frms = []; - if (out.frames[0].data == null) out.frames[0].data = out.data; - var len = w * h * 4, img = new Uint8Array(len), empty = new Uint8Array(len), prev = new Uint8Array(len); - for (var i = 0; i < out.frames.length; i++) { - var frm = out.frames[i]; - var fx = frm.rect.x, fy = frm.rect.y, fw = frm.rect.width, fh = frm.rect.height; - var fdata = UPNG.toRGBA8.decodeImage(frm.data, fw, fh, out); - if (i != 0) for (var j = 0; j < len; j++) prev[j] = img[j]; - if (frm.blend == 0) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 0); - else if (frm.blend == 1) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 1); - frms.push(img.buffer.slice(0)); - if (frm.dispose == 0) { - } else if (frm.dispose == 1) UPNG._copyTile(empty, fw, fh, img, w, h, fx, fy, 0); - else if (frm.dispose == 2) for (var j = 0; j < len; j++) img[j] = prev[j]; - } - return frms; -}; -UPNG.toRGBA8.decodeImage = function(data, w, h, out) { - var area = w * h, bpp = UPNG.decode._getBPP(out); - var bpl = Math.ceil(w * bpp / 8); - var bf = new Uint8Array(area * 4), bf32 = new Uint32Array(bf.buffer); - var ctype = out.ctype, depth = out.depth; - var rs = UPNG._bin.readUshort; - var time = Date.now(); - if (ctype == 6) { - var qarea = area << 2; - if (depth == 8) for (var i = 0; i < qarea; i += 4) { - bf[i] = data[i]; - bf[i + 1] = data[i + 1]; - bf[i + 2] = data[i + 2]; - bf[i + 3] = data[i + 3]; - } - if (depth == 16) for (var i = 0; i < qarea; i++) { - bf[i] = data[i << 1]; - } - } else if (ctype == 2) { - var ts = out.tabs["tRNS"]; - if (ts == null) { - if (depth == 8) for (var i = 0; i < area; i++) { - var ti = i * 3; - bf32[i] = 255 << 24 | data[ti + 2] << 16 | data[ti + 1] << 8 | data[ti]; - } - if (depth == 16) for (var i = 0; i < area; i++) { - var ti = i * 6; - bf32[i] = 255 << 24 | data[ti + 4] << 16 | data[ti + 2] << 8 | data[ti]; - } - } else { - var tr = ts[0], tg = ts[1], tb = ts[2]; - if (depth == 8) for (var i = 0; i < area; i++) { - var qi = i << 2, ti = i * 3; - bf32[i] = 255 << 24 | data[ti + 2] << 16 | data[ti + 1] << 8 | data[ti]; - if (data[ti] == tr && data[ti + 1] == tg && data[ti + 2] == tb) bf[qi + 3] = 0; - } - if (depth == 16) for (var i = 0; i < area; i++) { - var qi = i << 2, ti = i * 6; - bf32[i] = 255 << 24 | data[ti + 4] << 16 | data[ti + 2] << 8 | data[ti]; - if (rs(data, ti) == tr && rs(data, ti + 2) == tg && rs(data, ti + 4) == tb) bf[qi + 3] = 0; - } - } - } else if (ctype == 3) { - var p = out.tabs["PLTE"], ap = out.tabs["tRNS"], tl = ap ? ap.length : 0; - if (depth == 1) for (var y = 0; y < h; y++) { - var s0 = y * bpl, t0 = y * w; - for (var i = 0; i < w; i++) { - var qi = t0 + i << 2, j = data[s0 + (i >> 3)] >> 7 - ((i & 7) << 0) & 1, cj = 3 * j; - bf[qi] = p[cj]; - bf[qi + 1] = p[cj + 1]; - bf[qi + 2] = p[cj + 2]; - bf[qi + 3] = j < tl ? ap[j] : 255; - } - } - if (depth == 2) for (var y = 0; y < h; y++) { - var s0 = y * bpl, t0 = y * w; - for (var i = 0; i < w; i++) { - var qi = t0 + i << 2, j = data[s0 + (i >> 2)] >> 6 - ((i & 3) << 1) & 3, cj = 3 * j; - bf[qi] = p[cj]; - bf[qi + 1] = p[cj + 1]; - bf[qi + 2] = p[cj + 2]; - bf[qi + 3] = j < tl ? ap[j] : 255; - } - } - if (depth == 4) for (var y = 0; y < h; y++) { - var s0 = y * bpl, t0 = y * w; - for (var i = 0; i < w; i++) { - var qi = t0 + i << 2, j = data[s0 + (i >> 1)] >> 4 - ((i & 1) << 2) & 15, cj = 3 * j; - bf[qi] = p[cj]; - bf[qi + 1] = p[cj + 1]; - bf[qi + 2] = p[cj + 2]; - bf[qi + 3] = j < tl ? ap[j] : 255; - } - } - if (depth == 8) for (var i = 0; i < area; i++) { - var qi = i << 2, j = data[i], cj = 3 * j; - bf[qi] = p[cj]; - bf[qi + 1] = p[cj + 1]; - bf[qi + 2] = p[cj + 2]; - bf[qi + 3] = j < tl ? ap[j] : 255; - } - } else if (ctype == 4) { - if (depth == 8) for (var i = 0; i < area; i++) { - var qi = i << 2, di = i << 1, gr = data[di]; - bf[qi] = gr; - bf[qi + 1] = gr; - bf[qi + 2] = gr; - bf[qi + 3] = data[di + 1]; - } - if (depth == 16) for (var i = 0; i < area; i++) { - var qi = i << 2, di = i << 2, gr = data[di]; - bf[qi] = gr; - bf[qi + 1] = gr; - bf[qi + 2] = gr; - bf[qi + 3] = data[di + 2]; - } - } else if (ctype == 0) { - var tr = out.tabs["tRNS"] ? out.tabs["tRNS"] : -1; - for (var y = 0; y < h; y++) { - var off = y * bpl, to = y * w; - if (depth == 1) for (var x = 0; x < w; x++) { - var gr = 255 * (data[off + (x >>> 3)] >>> 7 - (x & 7) & 1), al = gr == tr * 255 ? 0 : 255; - bf32[to + x] = al << 24 | gr << 16 | gr << 8 | gr; - } - else if (depth == 2) for (var x = 0; x < w; x++) { - var gr = 85 * (data[off + (x >>> 2)] >>> 6 - ((x & 3) << 1) & 3), al = gr == tr * 85 ? 0 : 255; - bf32[to + x] = al << 24 | gr << 16 | gr << 8 | gr; - } - else if (depth == 4) for (var x = 0; x < w; x++) { - var gr = 17 * (data[off + (x >>> 1)] >>> 4 - ((x & 1) << 2) & 15), al = gr == tr * 17 ? 0 : 255; - bf32[to + x] = al << 24 | gr << 16 | gr << 8 | gr; - } - else if (depth == 8) for (var x = 0; x < w; x++) { - var gr = data[off + x], al = gr == tr ? 0 : 255; - bf32[to + x] = al << 24 | gr << 16 | gr << 8 | gr; - } - else if (depth == 16) for (var x = 0; x < w; x++) { - var gr = data[off + (x << 1)], al = rs(data, off + (x << i)) == tr ? 0 : 255; - bf32[to + x] = al << 24 | gr << 16 | gr << 8 | gr; - } - } - } - return bf; -}; -UPNG.decode = function(buff) { - var data = new Uint8Array(buff), offset = 8, bin = UPNG._bin, rUs = bin.readUshort, rUi = bin.readUint; - var out = { tabs: {}, frames: [] }; - var dd = new Uint8Array(data.length), doff = 0; - var fd, foff = 0; - var mgck = [137, 80, 78, 71, 13, 10, 26, 10]; - for (var i = 0; i < 8; i++) if (data[i] != mgck[i]) throw "The input is not a PNG file!"; - while (offset < data.length) { - var len = bin.readUint(data, offset); - offset += 4; - var type = bin.readASCII(data, offset, 4); - offset += 4; - if (type == "IHDR") { - UPNG.decode._IHDR(data, offset, out); - } else if (type == "IDAT") { - for (var i = 0; i < len; i++) dd[doff + i] = data[offset + i]; - doff += len; - } else if (type == "acTL") { - out.tabs[type] = { num_frames: rUi(data, offset), num_plays: rUi(data, offset + 4) }; - fd = new Uint8Array(data.length); - } else if (type == "fcTL") { - if (foff != 0) { - var fr = out.frames[out.frames.length - 1]; - fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); - foff = 0; - } - var rct = { x: rUi(data, offset + 12), y: rUi(data, offset + 16), width: rUi(data, offset + 4), height: rUi(data, offset + 8) }; - var del = rUs(data, offset + 22); - del = rUs(data, offset + 20) / (del == 0 ? 100 : del); - var frm = { rect: rct, delay: Math.round(del * 1e3), dispose: data[offset + 24], blend: data[offset + 25] }; - out.frames.push(frm); - } else if (type == "fdAT") { - for (var i = 0; i < len - 4; i++) fd[foff + i] = data[offset + i + 4]; - foff += len - 4; - } else if (type == "pHYs") { - out.tabs[type] = [bin.readUint(data, offset), bin.readUint(data, offset + 4), data[offset + 8]]; - } else if (type == "cHRM") { - out.tabs[type] = []; - for (var i = 0; i < 8; i++) out.tabs[type].push(bin.readUint(data, offset + i * 4)); - } else if (type == "tEXt") { - if (out.tabs[type] == null) out.tabs[type] = {}; - var nz = bin.nextZero(data, offset); - var keyw = bin.readASCII(data, offset, nz - offset); - var text2 = bin.readASCII(data, nz + 1, offset + len - nz - 1); - out.tabs[type][keyw] = text2; - } else if (type == "iTXt") { - if (out.tabs[type] == null) out.tabs[type] = {}; - var nz = 0, off = offset; - nz = bin.nextZero(data, off); - var keyw = bin.readASCII(data, off, nz - off); - off = nz + 1; - var cflag = data[off], cmeth = data[off + 1]; - off += 2; - nz = bin.nextZero(data, off); - var ltag = bin.readASCII(data, off, nz - off); - off = nz + 1; - nz = bin.nextZero(data, off); - var tkeyw = bin.readUTF8(data, off, nz - off); - off = nz + 1; - var text2 = bin.readUTF8(data, off, len - (off - offset)); - out.tabs[type][keyw] = text2; - } else if (type == "PLTE") { - out.tabs[type] = bin.readBytes(data, offset, len); - } else if (type == "hIST") { - var pl = out.tabs["PLTE"].length / 3; - out.tabs[type] = []; - for (var i = 0; i < pl; i++) out.tabs[type].push(rUs(data, offset + i * 2)); - } else if (type == "tRNS") { - if (out.ctype == 3) out.tabs[type] = bin.readBytes(data, offset, len); - else if (out.ctype == 0) out.tabs[type] = rUs(data, offset); - else if (out.ctype == 2) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)]; - } else if (type == "gAMA") out.tabs[type] = bin.readUint(data, offset) / 1e5; - else if (type == "sRGB") out.tabs[type] = data[offset]; - else if (type == "bKGD") { - if (out.ctype == 0 || out.ctype == 4) out.tabs[type] = [rUs(data, offset)]; - else if (out.ctype == 2 || out.ctype == 6) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)]; - else if (out.ctype == 3) out.tabs[type] = data[offset]; - } else if (type == "IEND") { - break; - } - offset += len; - var crc = bin.readUint(data, offset); - offset += 4; - } - if (foff != 0) { - var fr = out.frames[out.frames.length - 1]; - fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); - foff = 0; - } - out.data = UPNG.decode._decompress(out, dd, out.width, out.height); - delete out.compress; - delete out.interlace; - delete out.filter; - return out; -}; -UPNG.decode._decompress = function(out, dd, w, h) { - var time = Date.now(); - var bpp = UPNG.decode._getBPP(out), bpl = Math.ceil(w * bpp / 8), buff = new Uint8Array((bpl + 1 + out.interlace) * h); - dd = UPNG.decode._inflate(dd, buff); - var time = Date.now(); - if (out.interlace == 0) dd = UPNG.decode._filterZero(dd, out, 0, w, h); - else if (out.interlace == 1) dd = UPNG.decode._readInterlace(dd, out); - return dd; -}; -UPNG.decode._inflate = function(data, buff) { - var out = UPNG["inflateRaw"](new Uint8Array(data.buffer, 2, data.length - 6), buff); - return out; -}; -UPNG.inflateRaw = function() { - var H = {}; - H.H = {}; - H.H.N = function(N, W) { - var R = Uint8Array, i = 0, m = 0, J = 0, h = 0, Q = 0, X = 0, u = 0, w = 0, d = 0, v, C; - if (N[0] == 3 && N[1] == 0) return W ? W : new R(0); - var V = H.H, n = V.b, A = V.e, l = V.R, M = V.n, I = V.A, e = V.Z, b = V.m, Z = W == null; - if (Z) W = new R(N.length >>> 2 << 3); - while (i == 0) { - i = n(N, d, 1); - m = n(N, d + 1, 2); - d += 3; - if (m == 0) { - if ((d & 7) != 0) d += 8 - (d & 7); - var D = (d >>> 3) + 4, q = N[D - 4] | N[D - 3] << 8; - if (Z) W = H.H.W(W, w + q); - W.set(new R(N.buffer, N.byteOffset + D, q), w); - d = D + q << 3; - w += q; - continue; - } - if (Z) W = H.H.W(W, w + (1 << 17)); - if (m == 1) { - v = b.J; - C = b.h; - X = (1 << 9) - 1; - u = (1 << 5) - 1; - } - if (m == 2) { - J = A(N, d, 5) + 257; - h = A(N, d + 5, 5) + 1; - Q = A(N, d + 10, 4) + 4; - d += 14; - var E = d, j = 1; - for (var c = 0; c < 38; c += 2) { - b.Q[c] = 0; - b.Q[c + 1] = 0; - } - for (var c = 0; c < Q; c++) { - var K = A(N, d + c * 3, 3); - b.Q[(b.X[c] << 1) + 1] = K; - if (K > j) j = K; - } - d += 3 * Q; - M(b.Q, j); - I(b.Q, j, b.u); - v = b.w; - C = b.d; - d = l(b.u, (1 << j) - 1, J + h, N, d, b.v); - var r2 = V.V(b.v, 0, J, b.C); - X = (1 << r2) - 1; - var S = V.V(b.v, J, h, b.D); - u = (1 << S) - 1; - M(b.C, r2); - I(b.C, r2, v); - M(b.D, S); - I(b.D, S, C); - } - while (true) { - var T = v[e(N, d) & X]; - d += T & 15; - var p = T >>> 4; - if (p >>> 8 == 0) { - W[w++] = p; - } else if (p == 256) { - break; - } else { - var z = w + p - 254; - if (p > 264) { - var _ = b.q[p - 257]; - z = w + (_ >>> 3) + A(N, d, _ & 7); - d += _ & 7; - } - var $ = C[e(N, d) & u]; - d += $ & 15; - var s = $ >>> 4, Y = b.c[s], a = (Y >>> 4) + n(N, d, Y & 15); - d += Y & 15; - while (w < z) { - W[w] = W[w++ - a]; - W[w] = W[w++ - a]; - W[w] = W[w++ - a]; - W[w] = W[w++ - a]; - } - w = z; - } - } - } - return W.length == w ? W : W.slice(0, w); - }; - H.H.W = function(N, W) { - var R = N.length; - if (W <= R) return N; - var V = new Uint8Array(R << 1); - V.set(N, 0); - return V; - }; - H.H.R = function(N, W, R, V, n, A) { - var l = H.H.e, M = H.H.Z, I = 0; - while (I < R) { - var e = N[M(V, n) & W]; - n += e & 15; - var b = e >>> 4; - if (b <= 15) { - A[I] = b; - I++; - } else { - var Z = 0, m = 0; - if (b == 16) { - m = 3 + l(V, n, 2); - n += 2; - Z = A[I - 1]; - } else if (b == 17) { - m = 3 + l(V, n, 3); - n += 3; - } else if (b == 18) { - m = 11 + l(V, n, 7); - n += 7; - } - var J = I + m; - while (I < J) { - A[I] = Z; - I++; - } - } - } - return n; - }; - H.H.V = function(N, W, R, V) { - var n = 0, A = 0, l = V.length >>> 1; - while (A < R) { - var M = N[A + W]; - V[A << 1] = 0; - V[(A << 1) + 1] = M; - if (M > n) n = M; - A++; - } - while (A < l) { - V[A << 1] = 0; - V[(A << 1) + 1] = 0; - A++; - } - return n; - }; - H.H.n = function(N, W) { - var R = H.H.m, V = N.length, n, A, l, M, I, e = R.j; - for (var M = 0; M <= W; M++) e[M] = 0; - for (M = 1; M < V; M += 2) e[N[M]]++; - var b = R.K; - n = 0; - e[0] = 0; - for (A = 1; A <= W; A++) { - n = n + e[A - 1] << 1; - b[A] = n; - } - for (l = 0; l < V; l += 2) { - I = N[l + 1]; - if (I != 0) { - N[l] = b[I]; - b[I]++; - } - } - }; - H.H.A = function(N, W, R) { - var V = N.length, n = H.H.m, A = n.r; - for (var l = 0; l < V; l += 2) if (N[l + 1] != 0) { - var M = l >> 1, I = N[l + 1], e = M << 4 | I, b = W - I, Z = N[l] << b, m = Z + (1 << b); - while (Z != m) { - var J = A[Z] >>> 15 - W; - R[J] = e; - Z++; - } - } - }; - H.H.l = function(N, W) { - var R = H.H.m.r, V = 15 - W; - for (var n = 0; n < N.length; n += 2) { - var A = N[n] << W - N[n + 1]; - N[n] = R[A] >>> V; - } - }; - H.H.M = function(N, W, R) { - R = R << (W & 7); - var V = W >>> 3; - N[V] |= R; - N[V + 1] |= R >>> 8; - }; - H.H.I = function(N, W, R) { - R = R << (W & 7); - var V = W >>> 3; - N[V] |= R; - N[V + 1] |= R >>> 8; - N[V + 2] |= R >>> 16; - }; - H.H.e = function(N, W, R) { - return (N[W >>> 3] | N[(W >>> 3) + 1] << 8) >>> (W & 7) & (1 << R) - 1; - }; - H.H.b = function(N, W, R) { - return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7) & (1 << R) - 1; - }; - H.H.Z = function(N, W) { - return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7); - }; - H.H.i = function(N, W) { - return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16 | N[(W >>> 3) + 3] << 24) >>> (W & 7); - }; - H.H.m = function() { - var N = Uint16Array, W = Uint32Array; - return { K: new N(16), j: new N(16), X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], q: new N(32), p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], c: new W(32), J: new N(512), _: [], h: new N(32), $: [], w: new N(32768), C: [], v: [], d: new N(32768), D: [], u: new N(512), Q: [], r: new N(1 << 15), s: new W(286), Y: new W(30), a: new W(19), t: new W(15e3), k: new N(1 << 16), g: new N(1 << 15) }; - }(); - (function() { - var N = H.H.m, W = 1 << 15; - for (var R = 0; R < W; R++) { - var V = R; - V = (V & 2863311530) >>> 1 | (V & 1431655765) << 1; - V = (V & 3435973836) >>> 2 | (V & 858993459) << 2; - V = (V & 4042322160) >>> 4 | (V & 252645135) << 4; - V = (V & 4278255360) >>> 8 | (V & 16711935) << 8; - N.r[R] = (V >>> 16 | V << 16) >>> 17; - } - function n(A, l, M) { - while (l-- != 0) A.push(0, M); - } - for (var R = 0; R < 32; R++) { - N.q[R] = N.S[R] << 3 | N.T[R]; - N.c[R] = N.p[R] << 4 | N.z[R]; - } - n(N._, 144, 8); - n(N._, 255 - 143, 9); - n(N._, 279 - 255, 7); - n(N._, 287 - 279, 8); - H.H.n(N._, 9); - H.H.A(N._, 9, N.J); - H.H.l(N._, 9); - n(N.$, 32, 5); - H.H.n(N.$, 5); - H.H.A(N.$, 5, N.h); - H.H.l(N.$, 5); - n(N.Q, 19, 0); - n(N.C, 286, 0); - n(N.D, 30, 0); - n(N.v, 320, 0); - })(); - return H.H.N; -}(); -UPNG.decode._readInterlace = function(data, out) { - var w = out.width, h = out.height; - var bpp = UPNG.decode._getBPP(out), cbpp = bpp >> 3, bpl = Math.ceil(w * bpp / 8); - var img = new Uint8Array(h * bpl); - var di = 0; - var starting_row = [0, 0, 4, 0, 2, 0, 1]; - var starting_col = [0, 4, 0, 2, 0, 1, 0]; - var row_increment = [8, 8, 8, 4, 4, 2, 2]; - var col_increment = [8, 8, 4, 4, 2, 2, 1]; - var pass = 0; - while (pass < 7) { - var ri = row_increment[pass], ci = col_increment[pass]; - var sw = 0, sh = 0; - var cr = starting_row[pass]; - while (cr < h) { - cr += ri; - sh++; - } - var cc = starting_col[pass]; - while (cc < w) { - cc += ci; - sw++; - } - var bpll = Math.ceil(sw * bpp / 8); - UPNG.decode._filterZero(data, out, di, sw, sh); - var y = 0, row = starting_row[pass]; - while (row < h) { - var col = starting_col[pass]; - var cdi = di + y * bpll << 3; - while (col < w) { - if (bpp == 1) { - var val = data[cdi >> 3]; - val = val >> 7 - (cdi & 7) & 1; - img[row * bpl + (col >> 3)] |= val << 7 - ((col & 7) << 0); - } - if (bpp == 2) { - var val = data[cdi >> 3]; - val = val >> 6 - (cdi & 7) & 3; - img[row * bpl + (col >> 2)] |= val << 6 - ((col & 3) << 1); - } - if (bpp == 4) { - var val = data[cdi >> 3]; - val = val >> 4 - (cdi & 7) & 15; - img[row * bpl + (col >> 1)] |= val << 4 - ((col & 1) << 2); - } - if (bpp >= 8) { - var ii = row * bpl + col * cbpp; - for (var j = 0; j < cbpp; j++) img[ii + j] = data[(cdi >> 3) + j]; - } - cdi += bpp; - col += ci; - } - y++; - row += ri; - } - if (sw * sh != 0) di += sh * (1 + bpll); - pass = pass + 1; - } - return img; -}; -UPNG.decode._getBPP = function(out) { - var noc = [1, null, 3, 1, 2, null, 4][out.ctype]; - return noc * out.depth; -}; -UPNG.decode._filterZero = function(data, out, off, w, h) { - var bpp = UPNG.decode._getBPP(out), bpl = Math.ceil(w * bpp / 8), paeth = UPNG.decode._paeth; - bpp = Math.ceil(bpp / 8); - var i = 0, di = 1, type = data[off], x = 0; - if (type > 1) data[off] = [0, 0, 1][type - 2]; - if (type == 3) for (x = bpp; x < bpl; x++) data[x + 1] = data[x + 1] + (data[x + 1 - bpp] >>> 1) & 255; - for (var y = 0; y < h; y++) { - i = off + y * bpl; - di = i + y + 1; - type = data[di - 1]; - x = 0; - if (type == 0) for (; x < bpl; x++) data[i + x] = data[di + x]; - else if (type == 1) { - for (; x < bpp; x++) data[i + x] = data[di + x]; - for (; x < bpl; x++) data[i + x] = data[di + x] + data[i + x - bpp]; - } else if (type == 2) { - for (; x < bpl; x++) data[i + x] = data[di + x] + data[i + x - bpl]; - } else if (type == 3) { - for (; x < bpp; x++) data[i + x] = data[di + x] + (data[i + x - bpl] >>> 1); - for (; x < bpl; x++) data[i + x] = data[di + x] + (data[i + x - bpl] + data[i + x - bpp] >>> 1); - } else { - for (; x < bpp; x++) data[i + x] = data[di + x] + paeth(0, data[i + x - bpl], 0); - for (; x < bpl; x++) data[i + x] = data[di + x] + paeth(data[i + x - bpp], data[i + x - bpl], data[i + x - bpp - bpl]); - } - } - return data; -}; -UPNG.decode._paeth = function(a, b, c) { - var p = a + b - c, pa = p - a, pb = p - b, pc = p - c; - if (pa * pa <= pb * pb && pa * pa <= pc * pc) return a; - else if (pb * pb <= pc * pc) return b; - return c; -}; -UPNG.decode._IHDR = function(data, offset, out) { - var bin = UPNG._bin; - out.width = bin.readUint(data, offset); - offset += 4; - out.height = bin.readUint(data, offset); - offset += 4; - out.depth = data[offset]; - offset++; - out.ctype = data[offset]; - offset++; - out.compress = data[offset]; - offset++; - out.filter = data[offset]; - offset++; - out.interlace = data[offset]; - offset++; -}; -UPNG._bin = { - nextZero: function(data, p) { - while (data[p] != 0) p++; - return p; - }, - readUshort: function(buff, p) { - return buff[p] << 8 | buff[p + 1]; - }, - writeUshort: function(buff, p, n) { - buff[p] = n >> 8 & 255; - buff[p + 1] = n & 255; - }, - readUint: function(buff, p) { - return buff[p] * (256 * 256 * 256) + (buff[p + 1] << 16 | buff[p + 2] << 8 | buff[p + 3]); - }, - writeUint: function(buff, p, n) { - buff[p] = n >> 24 & 255; - buff[p + 1] = n >> 16 & 255; - buff[p + 2] = n >> 8 & 255; - buff[p + 3] = n & 255; - }, - readASCII: function(buff, p, l) { - var s = ""; - for (var i = 0; i < l; i++) s += String.fromCharCode(buff[p + i]); - return s; - }, - writeASCII: function(data, p, s) { - for (var i = 0; i < s.length; i++) data[p + i] = s.charCodeAt(i); - }, - readBytes: function(buff, p, l) { - var arr = []; - for (var i = 0; i < l; i++) arr.push(buff[p + i]); - return arr; - }, - pad: function(n) { - return n.length < 2 ? "0" + n : n; - }, - readUTF8: function(buff, p, l) { - var s = "", ns; - for (var i = 0; i < l; i++) s += "%" + UPNG._bin.pad(buff[p + i].toString(16)); - try { - ns = decodeURIComponent(s); - } catch (e) { - return UPNG._bin.readASCII(buff, p, l); - } - return ns; - } -}; -UPNG._copyTile = function(sb, sw, sh, tb, tw, th, xoff, yoff, mode) { - var w = Math.min(sw, tw), h = Math.min(sh, th); - var si = 0, ti = 0; - for (var y = 0; y < h; y++) - for (var x = 0; x < w; x++) { - if (xoff >= 0 && yoff >= 0) { - si = y * sw + x << 2; - ti = (yoff + y) * tw + xoff + x << 2; - } else { - si = (-yoff + y) * sw - xoff + x << 2; - ti = y * tw + x << 2; - } - if (mode == 0) { - tb[ti] = sb[si]; - tb[ti + 1] = sb[si + 1]; - tb[ti + 2] = sb[si + 2]; - tb[ti + 3] = sb[si + 3]; - } else if (mode == 1) { - var fa = sb[si + 3] * (1 / 255), fr = sb[si] * fa, fg = sb[si + 1] * fa, fb = sb[si + 2] * fa; - var ba = tb[ti + 3] * (1 / 255), br = tb[ti] * ba, bg = tb[ti + 1] * ba, bb = tb[ti + 2] * ba; - var ifa = 1 - fa, oa = fa + ba * ifa, ioa = oa == 0 ? 0 : 1 / oa; - tb[ti + 3] = 255 * oa; - tb[ti + 0] = (fr + br * ifa) * ioa; - tb[ti + 1] = (fg + bg * ifa) * ioa; - tb[ti + 2] = (fb + bb * ifa) * ioa; - } else if (mode == 2) { - var fa = sb[si + 3], fr = sb[si], fg = sb[si + 1], fb = sb[si + 2]; - var ba = tb[ti + 3], br = tb[ti], bg = tb[ti + 1], bb = tb[ti + 2]; - if (fa == ba && fr == br && fg == bg && fb == bb) { - tb[ti] = 0; - tb[ti + 1] = 0; - tb[ti + 2] = 0; - tb[ti + 3] = 0; - } else { - tb[ti] = fr; - tb[ti + 1] = fg; - tb[ti + 2] = fb; - tb[ti + 3] = fa; - } - } else if (mode == 3) { - var fa = sb[si + 3], fr = sb[si], fg = sb[si + 1], fb = sb[si + 2]; - var ba = tb[ti + 3], br = tb[ti], bg = tb[ti + 1], bb = tb[ti + 2]; - if (fa == ba && fr == br && fg == bg && fb == bb) continue; - if (fa < 220 && ba > 20) return false; - } - } - return true; -}; -UPNG.encode = function(bufs, w, h, ps, dels, tabs, forbidPlte) { - if (ps == null) ps = 0; - if (forbidPlte == null) forbidPlte = false; - var nimg = UPNG.encode.compress(bufs, w, h, ps, [false, false, false, 0, forbidPlte]); - UPNG.encode.compressPNG(nimg, -1); - return UPNG.encode._main(nimg, w, h, dels, tabs); -}; -UPNG.encodeLL = function(bufs, w, h, cc, ac, depth, dels, tabs) { - var nimg = { ctype: 0 + (cc == 1 ? 0 : 2) + (ac == 0 ? 0 : 4), depth, frames: [] }; - var time = Date.now(); - var bipp = (cc + ac) * depth, bipl = bipp * w; - for (var i = 0; i < bufs.length; i++) - nimg.frames.push({ rect: { x: 0, y: 0, width: w, height: h }, img: new Uint8Array(bufs[i]), blend: 0, dispose: 1, bpp: Math.ceil(bipp / 8), bpl: Math.ceil(bipl / 8) }); - UPNG.encode.compressPNG(nimg, 0, true); - var out = UPNG.encode._main(nimg, w, h, dels, tabs); - return out; -}; -UPNG.encode._main = function(nimg, w, h, dels, tabs) { - if (tabs == null) tabs = {}; - var crc = UPNG.crc.crc, wUi = UPNG._bin.writeUint, wUs = UPNG._bin.writeUshort, wAs = UPNG._bin.writeASCII; - var offset = 8, anim = nimg.frames.length > 1, pltAlpha = false; - var leng = 8 + (16 + 5 + 4) + (anim ? 20 : 0); - if (tabs["sRGB"] != null) leng += 8 + 1 + 4; - if (tabs["pHYs"] != null) leng += 8 + 9 + 4; - if (nimg.ctype == 3) { - var dl = nimg.plte.length; - for (var i = 0; i < dl; i++) if (nimg.plte[i] >>> 24 != 255) pltAlpha = true; - leng += 8 + dl * 3 + 4 + (pltAlpha ? 8 + dl * 1 + 4 : 0); - } - for (var j = 0; j < nimg.frames.length; j++) { - var fr = nimg.frames[j]; - if (anim) leng += 38; - leng += fr.cimg.length + 12; - if (j != 0) leng += 4; - } - leng += 12; - var data = new Uint8Array(leng); - var wr = [137, 80, 78, 71, 13, 10, 26, 10]; - for (var i = 0; i < 8; i++) data[i] = wr[i]; - wUi(data, offset, 13); - offset += 4; - wAs(data, offset, "IHDR"); - offset += 4; - wUi(data, offset, w); - offset += 4; - wUi(data, offset, h); - offset += 4; - data[offset] = nimg.depth; - offset++; - data[offset] = nimg.ctype; - offset++; - data[offset] = 0; - offset++; - data[offset] = 0; - offset++; - data[offset] = 0; - offset++; - wUi(data, offset, crc(data, offset - 17, 17)); - offset += 4; - if (tabs["sRGB"] != null) { - wUi(data, offset, 1); - offset += 4; - wAs(data, offset, "sRGB"); - offset += 4; - data[offset] = tabs["sRGB"]; - offset++; - wUi(data, offset, crc(data, offset - 5, 5)); - offset += 4; - } - if (tabs["pHYs"] != null) { - wUi(data, offset, 9); - offset += 4; - wAs(data, offset, "pHYs"); - offset += 4; - wUi(data, offset, tabs["pHYs"][0]); - offset += 4; - wUi(data, offset, tabs["pHYs"][1]); - offset += 4; - data[offset] = tabs["pHYs"][2]; - offset++; - wUi(data, offset, crc(data, offset - 13, 13)); - offset += 4; - } - if (anim) { - wUi(data, offset, 8); - offset += 4; - wAs(data, offset, "acTL"); - offset += 4; - wUi(data, offset, nimg.frames.length); - offset += 4; - wUi(data, offset, tabs["loop"] != null ? tabs["loop"] : 0); - offset += 4; - wUi(data, offset, crc(data, offset - 12, 12)); - offset += 4; - } - if (nimg.ctype == 3) { - var dl = nimg.plte.length; - wUi(data, offset, dl * 3); - offset += 4; - wAs(data, offset, "PLTE"); - offset += 4; - for (var i = 0; i < dl; i++) { - var ti = i * 3, c = nimg.plte[i], r2 = c & 255, g = c >>> 8 & 255, b = c >>> 16 & 255; - data[offset + ti + 0] = r2; - data[offset + ti + 1] = g; - data[offset + ti + 2] = b; - } - offset += dl * 3; - wUi(data, offset, crc(data, offset - dl * 3 - 4, dl * 3 + 4)); - offset += 4; - if (pltAlpha) { - wUi(data, offset, dl); - offset += 4; - wAs(data, offset, "tRNS"); - offset += 4; - for (var i = 0; i < dl; i++) data[offset + i] = nimg.plte[i] >>> 24 & 255; - offset += dl; - wUi(data, offset, crc(data, offset - dl - 4, dl + 4)); - offset += 4; - } - } - var fi = 0; - for (var j = 0; j < nimg.frames.length; j++) { - var fr = nimg.frames[j]; - if (anim) { - wUi(data, offset, 26); - offset += 4; - wAs(data, offset, "fcTL"); - offset += 4; - wUi(data, offset, fi++); - offset += 4; - wUi(data, offset, fr.rect.width); - offset += 4; - wUi(data, offset, fr.rect.height); - offset += 4; - wUi(data, offset, fr.rect.x); - offset += 4; - wUi(data, offset, fr.rect.y); - offset += 4; - wUs(data, offset, dels[j]); - offset += 2; - wUs(data, offset, 1e3); - offset += 2; - data[offset] = fr.dispose; - offset++; - data[offset] = fr.blend; - offset++; - wUi(data, offset, crc(data, offset - 30, 30)); - offset += 4; - } - var imgd = fr.cimg, dl = imgd.length; - wUi(data, offset, dl + (j == 0 ? 0 : 4)); - offset += 4; - var ioff = offset; - wAs(data, offset, j == 0 ? "IDAT" : "fdAT"); - offset += 4; - if (j != 0) { - wUi(data, offset, fi++); - offset += 4; - } - data.set(imgd, offset); - offset += dl; - wUi(data, offset, crc(data, ioff, offset - ioff)); - offset += 4; - } - wUi(data, offset, 0); - offset += 4; - wAs(data, offset, "IEND"); - offset += 4; - wUi(data, offset, crc(data, offset - 4, 4)); - offset += 4; - return data.buffer; -}; -UPNG.encode.compressPNG = function(out, filter, levelZero) { - for (var i = 0; i < out.frames.length; i++) { - var frm = out.frames[i], nw = frm.rect.width, nh = frm.rect.height; - var fdata = new Uint8Array(nh * frm.bpl + nh); - frm.cimg = UPNG.encode._filterZero(frm.img, nh, frm.bpp, frm.bpl, fdata, filter, levelZero); - } -}; -UPNG.encode.compress = function(bufs, w, h, ps, prms) { - var onlyBlend = prms[0], evenCrd = prms[1], forbidPrev = prms[2], minBits = prms[3], forbidPlte = prms[4]; - var ctype = 6, depth = 8, alphaAnd = 255; - for (var j = 0; j < bufs.length; j++) { - var img = new Uint8Array(bufs[j]), ilen = img.length; - for (var i = 0; i < ilen; i += 4) alphaAnd &= img[i + 3]; - } - var gotAlpha = alphaAnd != 255; - var frms = UPNG.encode.framize(bufs, w, h, onlyBlend, evenCrd, forbidPrev); - var cmap = {}, plte = [], inds = []; - if (ps != 0) { - var nbufs = []; - for (var i = 0; i < frms.length; i++) nbufs.push(frms[i].img.buffer); - var abuf = UPNG.encode.concatRGBA(nbufs), qres = UPNG.quantize(abuf, ps); - var cof = 0, bb = new Uint8Array(qres.abuf); - for (var i = 0; i < frms.length; i++) { - var ti = frms[i].img, bln = ti.length; - inds.push(new Uint8Array(qres.inds.buffer, cof >> 2, bln >> 2)); - for (var j = 0; j < bln; j += 4) { - ti[j] = bb[cof + j]; - ti[j + 1] = bb[cof + j + 1]; - ti[j + 2] = bb[cof + j + 2]; - ti[j + 3] = bb[cof + j + 3]; - } - cof += bln; - } - for (var i = 0; i < qres.plte.length; i++) plte.push(qres.plte[i].est.rgba); - } else { - for (var j = 0; j < frms.length; j++) { - var frm = frms[j], img32 = new Uint32Array(frm.img.buffer), nw = frm.rect.width, ilen = img32.length; - var ind = new Uint8Array(ilen); - inds.push(ind); - for (var i = 0; i < ilen; i++) { - var c = img32[i]; - if (i != 0 && c == img32[i - 1]) ind[i] = ind[i - 1]; - else if (i > nw && c == img32[i - nw]) ind[i] = ind[i - nw]; - else { - var cmc = cmap[c]; - if (cmc == null) { - cmap[c] = cmc = plte.length; - plte.push(c); - if (plte.length >= 300) break; - } - ind[i] = cmc; - } - } - } - } - var cc = plte.length; - if (cc <= 256 && forbidPlte == false) { - if (cc <= 2) depth = 1; - else if (cc <= 4) depth = 2; - else if (cc <= 16) depth = 4; - else depth = 8; - depth = Math.max(depth, minBits); - } - for (var j = 0; j < frms.length; j++) { - var frm = frms[j], nx = frm.rect.x, ny = frm.rect.y, nw = frm.rect.width, nh = frm.rect.height; - var cimg = frm.img, cimg32 = new Uint32Array(cimg.buffer); - var bpl = 4 * nw, bpp = 4; - if (cc <= 256 && forbidPlte == false) { - bpl = Math.ceil(depth * nw / 8); - var nimg = new Uint8Array(bpl * nh); - var inj = inds[j]; - for (var y = 0; y < nh; y++) { - var i = y * bpl, ii = y * nw; - if (depth == 8) for (var x = 0; x < nw; x++) nimg[i + x] = inj[ii + x]; - else if (depth == 4) for (var x = 0; x < nw; x++) nimg[i + (x >> 1)] |= inj[ii + x] << 4 - (x & 1) * 4; - else if (depth == 2) for (var x = 0; x < nw; x++) nimg[i + (x >> 2)] |= inj[ii + x] << 6 - (x & 3) * 2; - else if (depth == 1) for (var x = 0; x < nw; x++) nimg[i + (x >> 3)] |= inj[ii + x] << 7 - (x & 7) * 1; - } - cimg = nimg; - ctype = 3; - bpp = 1; - } else if (gotAlpha == false && frms.length == 1) { - var nimg = new Uint8Array(nw * nh * 3), area = nw * nh; - for (var i = 0; i < area; i++) { - var ti = i * 3, qi = i * 4; - nimg[ti] = cimg[qi]; - nimg[ti + 1] = cimg[qi + 1]; - nimg[ti + 2] = cimg[qi + 2]; - } - cimg = nimg; - ctype = 2; - bpp = 3; - bpl = 3 * nw; - } - frm.img = cimg; - frm.bpl = bpl; - frm.bpp = bpp; - } - return { ctype, depth, plte, frames: frms }; -}; -UPNG.encode.framize = function(bufs, w, h, alwaysBlend, evenCrd, forbidPrev) { - var frms = []; - for (var j = 0; j < bufs.length; j++) { - var cimg = new Uint8Array(bufs[j]), cimg32 = new Uint32Array(cimg.buffer); - var nimg; - var nx = 0, ny = 0, nw = w, nh = h, blend = alwaysBlend ? 1 : 0; - if (j != 0) { - var tlim = forbidPrev || alwaysBlend || j == 1 || frms[j - 2].dispose != 0 ? 1 : 2, tstp = 0, tarea = 1e9; - for (var it = 0; it < tlim; it++) { - var pimg = new Uint8Array(bufs[j - 1 - it]), p32 = new Uint32Array(bufs[j - 1 - it]); - var mix = w, miy = h, max = -1, may = -1; - for (var y = 0; y < h; y++) for (var x = 0; x < w; x++) { - var i = y * w + x; - if (cimg32[i] != p32[i]) { - if (x < mix) mix = x; - if (x > max) max = x; - if (y < miy) miy = y; - if (y > may) may = y; - } - } - if (max == -1) mix = miy = max = may = 0; - if (evenCrd) { - if ((mix & 1) == 1) mix--; - if ((miy & 1) == 1) miy--; - } - var sarea = (max - mix + 1) * (may - miy + 1); - if (sarea < tarea) { - tarea = sarea; - tstp = it; - nx = mix; - ny = miy; - nw = max - mix + 1; - nh = may - miy + 1; - } - } - var pimg = new Uint8Array(bufs[j - 1 - tstp]); - if (tstp == 1) frms[j - 1].dispose = 2; - nimg = new Uint8Array(nw * nh * 4); - UPNG._copyTile(pimg, w, h, nimg, nw, nh, -nx, -ny, 0); - blend = UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 3) ? 1 : 0; - if (blend == 1) UPNG.encode._prepareDiff(cimg, w, h, nimg, { x: nx, y: ny, width: nw, height: nh }); - else UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 0); - } else nimg = cimg.slice(0); - frms.push({ rect: { x: nx, y: ny, width: nw, height: nh }, img: nimg, blend, dispose: 0 }); - } - if (alwaysBlend) for (var j = 0; j < frms.length; j++) { - var frm = frms[j]; - if (frm.blend == 1) continue; - var r0 = frm.rect, r1 = frms[j - 1].rect; - var miX = Math.min(r0.x, r1.x), miY = Math.min(r0.y, r1.y); - var maX = Math.max(r0.x + r0.width, r1.x + r1.width), maY = Math.max(r0.y + r0.height, r1.y + r1.height); - var r2 = { x: miX, y: miY, width: maX - miX, height: maY - miY }; - frms[j - 1].dispose = 1; - if (j - 1 != 0) - UPNG.encode._updateFrame(bufs, w, h, frms, j - 1, r2, evenCrd); - UPNG.encode._updateFrame(bufs, w, h, frms, j, r2, evenCrd); - } - var area = 0; - if (bufs.length != 1) for (var i = 0; i < frms.length; i++) { - var frm = frms[i]; - area += frm.rect.width * frm.rect.height; - } - return frms; -}; -UPNG.encode._updateFrame = function(bufs, w, h, frms, i, r2, evenCrd) { - var U8 = Uint8Array, U32 = Uint32Array; - var pimg = new U8(bufs[i - 1]), pimg32 = new U32(bufs[i - 1]), nimg = i + 1 < bufs.length ? new U8(bufs[i + 1]) : null; - var cimg = new U8(bufs[i]), cimg32 = new U32(cimg.buffer); - var mix = w, miy = h, max = -1, may = -1; - for (var y = 0; y < r2.height; y++) for (var x = 0; x < r2.width; x++) { - var cx2 = r2.x + x, cy2 = r2.y + y; - var j = cy2 * w + cx2, cc = cimg32[j]; - if (cc == 0 || frms[i - 1].dispose == 0 && pimg32[j] == cc && (nimg == null || nimg[j * 4 + 3] != 0)) { - } else { - if (cx2 < mix) mix = cx2; - if (cx2 > max) max = cx2; - if (cy2 < miy) miy = cy2; - if (cy2 > may) may = cy2; - } - } - if (max == -1) mix = miy = max = may = 0; - if (evenCrd) { - if ((mix & 1) == 1) mix--; - if ((miy & 1) == 1) miy--; - } - r2 = { x: mix, y: miy, width: max - mix + 1, height: may - miy + 1 }; - var fr = frms[i]; - fr.rect = r2; - fr.blend = 1; - fr.img = new Uint8Array(r2.width * r2.height * 4); - if (frms[i - 1].dispose == 0) { - UPNG._copyTile(pimg, w, h, fr.img, r2.width, r2.height, -r2.x, -r2.y, 0); - UPNG.encode._prepareDiff(cimg, w, h, fr.img, r2); - } else - UPNG._copyTile(cimg, w, h, fr.img, r2.width, r2.height, -r2.x, -r2.y, 0); -}; -UPNG.encode._prepareDiff = function(cimg, w, h, nimg, rec) { - UPNG._copyTile(cimg, w, h, nimg, rec.width, rec.height, -rec.x, -rec.y, 2); -}; -UPNG.encode._filterZero = function(img, h, bpp, bpl, data, filter, levelZero) { - var fls = [], ftry = [0, 1, 2, 3, 4]; - if (filter != -1) ftry = [filter]; - else if (h * bpl > 5e5 || bpp == 1) ftry = [0]; - var opts; - if (levelZero) opts = { level: 0 }; - var CMPR = levelZero && UZIP != null ? UZIP : import_pako4.default; - for (var i = 0; i < ftry.length; i++) { - for (var y = 0; y < h; y++) UPNG.encode._filterLine(data, img, y, bpl, bpp, ftry[i]); - fls.push(CMPR["deflate"](data, opts)); - } - var ti, tsize = 1e9; - for (var i = 0; i < fls.length; i++) if (fls[i].length < tsize) { - ti = i; - tsize = fls[i].length; - } - return fls[ti]; -}; -UPNG.encode._filterLine = function(data, img, y, bpl, bpp, type) { - var i = y * bpl, di = i + y, paeth = UPNG.decode._paeth; - data[di] = type; - di++; - if (type == 0) { - if (bpl < 500) for (var x = 0; x < bpl; x++) data[di + x] = img[i + x]; - else data.set(new Uint8Array(img.buffer, i, bpl), di); - } else if (type == 1) { - for (var x = 0; x < bpp; x++) data[di + x] = img[i + x]; - for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x] - img[i + x - bpp] + 256 & 255; - } else if (y == 0) { - for (var x = 0; x < bpp; x++) data[di + x] = img[i + x]; - if (type == 2) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x]; - if (type == 3) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x] - (img[i + x - bpp] >> 1) + 256 & 255; - if (type == 4) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x] - paeth(img[i + x - bpp], 0, 0) + 256 & 255; - } else { - if (type == 2) { - for (var x = 0; x < bpl; x++) data[di + x] = img[i + x] + 256 - img[i + x - bpl] & 255; - } - if (type == 3) { - for (var x = 0; x < bpp; x++) data[di + x] = img[i + x] + 256 - (img[i + x - bpl] >> 1) & 255; - for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x] + 256 - (img[i + x - bpl] + img[i + x - bpp] >> 1) & 255; - } - if (type == 4) { - for (var x = 0; x < bpp; x++) data[di + x] = img[i + x] + 256 - paeth(0, img[i + x - bpl], 0) & 255; - for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x] + 256 - paeth(img[i + x - bpp], img[i + x - bpl], img[i + x - bpp - bpl]) & 255; - } - } -}; -UPNG.crc = { - table: function() { - var tab = new Uint32Array(256); - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 0; k < 8; k++) { - if (c & 1) c = 3988292384 ^ c >>> 1; - else c = c >>> 1; - } - tab[n] = c; - } - return tab; - }(), - update: function(c, buf, off, len) { - for (var i = 0; i < len; i++) c = UPNG.crc.table[(c ^ buf[off + i]) & 255] ^ c >>> 8; - return c; - }, - crc: function(b, o, l) { - return UPNG.crc.update(4294967295, b, o, l) ^ 4294967295; - } -}; -UPNG.quantize = function(abuf, ps) { - var oimg = new Uint8Array(abuf), nimg = oimg.slice(0), nimg32 = new Uint32Array(nimg.buffer); - var KD = UPNG.quantize.getKDtree(nimg, ps); - var root3 = KD[0], leafs = KD[1]; - var planeDst = UPNG.quantize.planeDst; - var sb = oimg, tb = nimg32, len = sb.length; - var inds = new Uint8Array(oimg.length >> 2); - for (var i = 0; i < len; i += 4) { - var r2 = sb[i] * (1 / 255), g = sb[i + 1] * (1 / 255), b = sb[i + 2] * (1 / 255), a = sb[i + 3] * (1 / 255); - var nd = UPNG.quantize.getNearest(root3, r2, g, b, a); - inds[i >> 2] = nd.ind; - tb[i >> 2] = nd.est.rgba; - } - return { abuf: nimg.buffer, inds, plte: leafs }; -}; -UPNG.quantize.getKDtree = function(nimg, ps, err) { - if (err == null) err = 1e-4; - var nimg32 = new Uint32Array(nimg.buffer); - var root3 = { i0: 0, i1: nimg.length, bst: null, est: null, tdst: 0, left: null, right: null }; - root3.bst = UPNG.quantize.stats(nimg, root3.i0, root3.i1); - root3.est = UPNG.quantize.estats(root3.bst); - var leafs = [root3]; - while (leafs.length < ps) { - var maxL = 0, mi = 0; - for (var i = 0; i < leafs.length; i++) if (leafs[i].est.L > maxL) { - maxL = leafs[i].est.L; - mi = i; - } - if (maxL < err) break; - var node = leafs[mi]; - var s0 = UPNG.quantize.splitPixels(nimg, nimg32, node.i0, node.i1, node.est.e, node.est.eMq255); - var s0wrong = node.i0 >= s0 || node.i1 <= s0; - if (s0wrong) { - node.est.L = 0; - continue; - } - var ln = { i0: node.i0, i1: s0, bst: null, est: null, tdst: 0, left: null, right: null }; - ln.bst = UPNG.quantize.stats(nimg, ln.i0, ln.i1); - ln.est = UPNG.quantize.estats(ln.bst); - var rn = { i0: s0, i1: node.i1, bst: null, est: null, tdst: 0, left: null, right: null }; - rn.bst = { R: [], m: [], N: node.bst.N - ln.bst.N }; - for (var i = 0; i < 16; i++) rn.bst.R[i] = node.bst.R[i] - ln.bst.R[i]; - for (var i = 0; i < 4; i++) rn.bst.m[i] = node.bst.m[i] - ln.bst.m[i]; - rn.est = UPNG.quantize.estats(rn.bst); - node.left = ln; - node.right = rn; - leafs[mi] = ln; - leafs.push(rn); - } - leafs.sort(function(a, b) { - return b.bst.N - a.bst.N; - }); - for (var i = 0; i < leafs.length; i++) leafs[i].ind = i; - return [root3, leafs]; -}; -UPNG.quantize.getNearest = function(nd, r2, g, b, a) { - if (nd.left == null) { - nd.tdst = UPNG.quantize.dist(nd.est.q, r2, g, b, a); - return nd; - } - var planeDst = UPNG.quantize.planeDst(nd.est, r2, g, b, a); - var node0 = nd.left, node1 = nd.right; - if (planeDst > 0) { - node0 = nd.right; - node1 = nd.left; - } - var ln = UPNG.quantize.getNearest(node0, r2, g, b, a); - if (ln.tdst <= planeDst * planeDst) return ln; - var rn = UPNG.quantize.getNearest(node1, r2, g, b, a); - return rn.tdst < ln.tdst ? rn : ln; -}; -UPNG.quantize.planeDst = function(est, r2, g, b, a) { - var e = est.e; - return e[0] * r2 + e[1] * g + e[2] * b + e[3] * a - est.eMq; -}; -UPNG.quantize.dist = function(q, r2, g, b, a) { - var d0 = r2 - q[0], d1 = g - q[1], d2 = b - q[2], d3 = a - q[3]; - return d0 * d0 + d1 * d1 + d2 * d2 + d3 * d3; -}; -UPNG.quantize.splitPixels = function(nimg, nimg32, i0, i1, e, eMq) { - var vecDot = UPNG.quantize.vecDot; - i1 -= 4; - var shfs = 0; - while (i0 < i1) { - while (vecDot(nimg, i0, e) <= eMq) i0 += 4; - while (vecDot(nimg, i1, e) > eMq) i1 -= 4; - if (i0 >= i1) break; - var t = nimg32[i0 >> 2]; - nimg32[i0 >> 2] = nimg32[i1 >> 2]; - nimg32[i1 >> 2] = t; - i0 += 4; - i1 -= 4; - } - while (vecDot(nimg, i0, e) > eMq) i0 -= 4; - return i0 + 4; -}; -UPNG.quantize.vecDot = function(nimg, i, e) { - return nimg[i] * e[0] + nimg[i + 1] * e[1] + nimg[i + 2] * e[2] + nimg[i + 3] * e[3]; -}; -UPNG.quantize.stats = function(nimg, i0, i1) { - var R = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - var m = [0, 0, 0, 0]; - var N = i1 - i0 >> 2; - for (var i = i0; i < i1; i += 4) { - var r2 = nimg[i] * (1 / 255), g = nimg[i + 1] * (1 / 255), b = nimg[i + 2] * (1 / 255), a = nimg[i + 3] * (1 / 255); - m[0] += r2; - m[1] += g; - m[2] += b; - m[3] += a; - R[0] += r2 * r2; - R[1] += r2 * g; - R[2] += r2 * b; - R[3] += r2 * a; - R[5] += g * g; - R[6] += g * b; - R[7] += g * a; - R[10] += b * b; - R[11] += b * a; - R[15] += a * a; - } - R[4] = R[1]; - R[8] = R[2]; - R[9] = R[6]; - R[12] = R[3]; - R[13] = R[7]; - R[14] = R[11]; - return { R, m, N }; -}; -UPNG.quantize.estats = function(stats) { - var R = stats.R, m = stats.m, N = stats.N; - var m0 = m[0], m1 = m[1], m2 = m[2], m3 = m[3], iN = N == 0 ? 0 : 1 / N; - var Rj = [ - R[0] - m0 * m0 * iN, - R[1] - m0 * m1 * iN, - R[2] - m0 * m2 * iN, - R[3] - m0 * m3 * iN, - R[4] - m1 * m0 * iN, - R[5] - m1 * m1 * iN, - R[6] - m1 * m2 * iN, - R[7] - m1 * m3 * iN, - R[8] - m2 * m0 * iN, - R[9] - m2 * m1 * iN, - R[10] - m2 * m2 * iN, - R[11] - m2 * m3 * iN, - R[12] - m3 * m0 * iN, - R[13] - m3 * m1 * iN, - R[14] - m3 * m2 * iN, - R[15] - m3 * m3 * iN - ]; - var A = Rj, M = UPNG.M4; - var b = [0.5, 0.5, 0.5, 0.5], mi = 0, tmi = 0; - if (N != 0) - for (var i = 0; i < 10; i++) { - b = M.multVec(A, b); - tmi = Math.sqrt(M.dot(b, b)); - b = M.sml(1 / tmi, b); - if (Math.abs(tmi - mi) < 1e-9) break; - mi = tmi; - } - var q = [m0 * iN, m1 * iN, m2 * iN, m3 * iN]; - var eMq255 = M.dot(M.sml(255, q), b); - return { - Cov: Rj, - q, - e: b, - L: mi, - eMq255, - eMq: M.dot(b, q), - rgba: (Math.round(255 * q[3]) << 24 | Math.round(255 * q[2]) << 16 | Math.round(255 * q[1]) << 8 | Math.round(255 * q[0]) << 0) >>> 0 - }; -}; -UPNG.M4 = { - multVec: function(m, v) { - return [ - m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3], - m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3], - m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3], - m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3] - ]; - }, - dot: function(x, y) { - return x[0] * y[0] + x[1] * y[1] + x[2] * y[2] + x[3] * y[3]; - }, - sml: function(a, y) { - return [a * y[0], a * y[1], a * y[2], a * y[3]]; - } -}; -UPNG.encode.concatRGBA = function(bufs) { - var tlen = 0; - for (var i = 0; i < bufs.length; i++) tlen += bufs[i].byteLength; - var nimg = new Uint8Array(tlen), noff = 0; - for (var i = 0; i < bufs.length; i++) { - var img = new Uint8Array(bufs[i]), il = img.length; - for (var j = 0; j < il; j += 4) { - var r2 = img[j], g = img[j + 1], b = img[j + 2], a = img[j + 3]; - if (a == 0) r2 = g = b = 0; - nimg[noff + j] = r2; - nimg[noff + j + 1] = g; - nimg[noff + j + 2] = b; - nimg[noff + j + 3] = a; - } - noff += il; - } - return nimg.buffer; -}; -var UPNG_default = UPNG; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/utils/png.js -var getImageType = function(ctype) { - if (ctype === 0) - return PngType.Greyscale; - if (ctype === 2) - return PngType.Truecolour; - if (ctype === 3) - return PngType.IndexedColour; - if (ctype === 4) - return PngType.GreyscaleWithAlpha; - if (ctype === 6) - return PngType.TruecolourWithAlpha; - throw new Error("Unknown color type: " + ctype); -}; -var splitAlphaChannel = function(rgbaChannel) { - var pixelCount = Math.floor(rgbaChannel.length / 4); - var rgbChannel = new Uint8Array(pixelCount * 3); - var alphaChannel = new Uint8Array(pixelCount * 1); - var rgbaOffset = 0; - var rgbOffset = 0; - var alphaOffset = 0; - while (rgbaOffset < rgbaChannel.length) { - rgbChannel[rgbOffset++] = rgbaChannel[rgbaOffset++]; - rgbChannel[rgbOffset++] = rgbaChannel[rgbaOffset++]; - rgbChannel[rgbOffset++] = rgbaChannel[rgbaOffset++]; - alphaChannel[alphaOffset++] = rgbaChannel[rgbaOffset++]; - } - return { rgbChannel, alphaChannel }; -}; -var PngType; -(function(PngType2) { - PngType2["Greyscale"] = "Greyscale"; - PngType2["Truecolour"] = "Truecolour"; - PngType2["IndexedColour"] = "IndexedColour"; - PngType2["GreyscaleWithAlpha"] = "GreyscaleWithAlpha"; - PngType2["TruecolourWithAlpha"] = "TruecolourWithAlpha"; -})(PngType || (PngType = {})); -var PNG = ( - /** @class */ - function() { - function PNG2(pngData) { - var upng = UPNG_default.decode(pngData); - var frames = UPNG_default.toRGBA8(upng); - if (frames.length > 1) - throw new Error("Animated PNGs are not supported"); - var frame = new Uint8Array(frames[0]); - var _a3 = splitAlphaChannel(frame), rgbChannel = _a3.rgbChannel, alphaChannel = _a3.alphaChannel; - this.rgbChannel = rgbChannel; - var hasAlphaValues = alphaChannel.some(function(a) { - return a < 255; - }); - if (hasAlphaValues) - this.alphaChannel = alphaChannel; - this.type = getImageType(upng.ctype); - this.width = upng.width; - this.height = upng.height; - this.bitsPerComponent = 8; - } - PNG2.load = function(pngData) { - return new PNG2(pngData); - }; - return PNG2; - }() -); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/PngEmbedder.js -var PngEmbedder = ( - /** @class */ - function() { - function PngEmbedder2(png) { - this.image = png; - this.bitsPerComponent = png.bitsPerComponent; - this.width = png.width; - this.height = png.height; - this.colorSpace = "DeviceRGB"; - } - PngEmbedder2.for = function(imageData) { - return __awaiter(this, void 0, void 0, function() { - var png; - return __generator(this, function(_a3) { - png = PNG.load(imageData); - return [2, new PngEmbedder2(png)]; - }); - }); - }; - PngEmbedder2.prototype.embedIntoContext = function(context, ref) { - return __awaiter(this, void 0, void 0, function() { - var SMask, xObject; - return __generator(this, function(_a3) { - SMask = this.embedAlphaChannel(context); - xObject = context.flateStream(this.image.rgbChannel, { - Type: "XObject", - Subtype: "Image", - BitsPerComponent: this.image.bitsPerComponent, - Width: this.image.width, - Height: this.image.height, - ColorSpace: this.colorSpace, - SMask - }); - if (ref) { - context.assign(ref, xObject); - return [2, ref]; - } else { - return [2, context.register(xObject)]; - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - PngEmbedder2.prototype.embedAlphaChannel = function(context) { - if (!this.image.alphaChannel) - return void 0; - var xObject = context.flateStream(this.image.alphaChannel, { - Type: "XObject", - Subtype: "Image", - Height: this.image.height, - Width: this.image.width, - BitsPerComponent: this.image.bitsPerComponent, - ColorSpace: "DeviceGray", - Decode: [0, 1] - }); - return context.register(xObject); - }; - return PngEmbedder2; - }() -); -var PngEmbedder_default = PngEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/Stream.js -var Stream = ( - /** @class */ - function() { - function Stream2(buffer, start, length) { - this.bytes = buffer; - this.start = start || 0; - this.pos = this.start; - this.end = !!start && !!length ? start + length : this.bytes.length; - } - Object.defineProperty(Stream2.prototype, "length", { - get: function() { - return this.end - this.start; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Stream2.prototype, "isEmpty", { - get: function() { - return this.length === 0; - }, - enumerable: false, - configurable: true - }); - Stream2.prototype.getByte = function() { - if (this.pos >= this.end) { - return -1; - } - return this.bytes[this.pos++]; - }; - Stream2.prototype.getUint16 = function() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }; - Stream2.prototype.getInt32 = function() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }; - Stream2.prototype.getBytes = function(length, forceClamped) { - if (forceClamped === void 0) { - forceClamped = false; - } - var bytes = this.bytes; - var pos = this.pos; - var strEnd = this.end; - if (!length) { - var subarray = bytes.subarray(pos, strEnd); - return forceClamped ? new Uint8ClampedArray(subarray) : subarray; - } else { - var end = pos + length; - if (end > strEnd) { - end = strEnd; - } - this.pos = end; - var subarray = bytes.subarray(pos, end); - return forceClamped ? new Uint8ClampedArray(subarray) : subarray; - } - }; - Stream2.prototype.peekByte = function() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }; - Stream2.prototype.peekBytes = function(length, forceClamped) { - if (forceClamped === void 0) { - forceClamped = false; - } - var bytes = this.getBytes(length, forceClamped); - this.pos -= bytes.length; - return bytes; - }; - Stream2.prototype.skip = function(n) { - if (!n) { - n = 1; - } - this.pos += n; - }; - Stream2.prototype.reset = function() { - this.pos = this.start; - }; - Stream2.prototype.moveStart = function() { - this.start = this.pos; - }; - Stream2.prototype.makeSubStream = function(start, length) { - return new Stream2(this.bytes, start, length); - }; - Stream2.prototype.decode = function() { - return this.bytes; - }; - return Stream2; - }() -); -var Stream_default = Stream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/DecodeStream.js -var emptyBuffer = new Uint8Array(0); -var DecodeStream = ( - /** @class */ - function() { - function DecodeStream2(maybeMinBufferLength) { - this.pos = 0; - this.bufferLength = 0; - this.eof = false; - this.buffer = emptyBuffer; - this.minBufferLength = 512; - if (maybeMinBufferLength) { - while (this.minBufferLength < maybeMinBufferLength) { - this.minBufferLength *= 2; - } - } - } - Object.defineProperty(DecodeStream2.prototype, "isEmpty", { - get: function() { - while (!this.eof && this.bufferLength === 0) { - this.readBlock(); - } - return this.bufferLength === 0; - }, - enumerable: false, - configurable: true - }); - DecodeStream2.prototype.getByte = function() { - var pos = this.pos; - while (this.bufferLength <= pos) { - if (this.eof) { - return -1; - } - this.readBlock(); - } - return this.buffer[this.pos++]; - }; - DecodeStream2.prototype.getUint16 = function() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }; - DecodeStream2.prototype.getInt32 = function() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }; - DecodeStream2.prototype.getBytes = function(length, forceClamped) { - if (forceClamped === void 0) { - forceClamped = false; - } - var end; - var pos = this.pos; - if (length) { - this.ensureBuffer(pos + length); - end = pos + length; - while (!this.eof && this.bufferLength < end) { - this.readBlock(); - } - var bufEnd = this.bufferLength; - if (end > bufEnd) { - end = bufEnd; - } - } else { - while (!this.eof) { - this.readBlock(); - } - end = this.bufferLength; - } - this.pos = end; - var subarray = this.buffer.subarray(pos, end); - return forceClamped && !(subarray instanceof Uint8ClampedArray) ? new Uint8ClampedArray(subarray) : subarray; - }; - DecodeStream2.prototype.peekByte = function() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }; - DecodeStream2.prototype.peekBytes = function(length, forceClamped) { - if (forceClamped === void 0) { - forceClamped = false; - } - var bytes = this.getBytes(length, forceClamped); - this.pos -= bytes.length; - return bytes; - }; - DecodeStream2.prototype.skip = function(n) { - if (!n) { - n = 1; - } - this.pos += n; - }; - DecodeStream2.prototype.reset = function() { - this.pos = 0; - }; - DecodeStream2.prototype.makeSubStream = function(start, length) { - var end = start + length; - while (this.bufferLength <= end && !this.eof) { - this.readBlock(); - } - return new Stream_default( - this.buffer, - start, - length - /* dict */ - ); - }; - DecodeStream2.prototype.decode = function() { - while (!this.eof) - this.readBlock(); - return this.buffer.subarray(0, this.bufferLength); - }; - DecodeStream2.prototype.readBlock = function() { - throw new MethodNotImplementedError(this.constructor.name, "readBlock"); - }; - DecodeStream2.prototype.ensureBuffer = function(requested) { - var buffer = this.buffer; - if (requested <= buffer.byteLength) { - return buffer; - } - var size = this.minBufferLength; - while (size < requested) { - size *= 2; - } - var buffer2 = new Uint8Array(size); - buffer2.set(buffer); - return this.buffer = buffer2; - }; - return DecodeStream2; - }() -); -var DecodeStream_default = DecodeStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/Ascii85Stream.js -var isSpace = function(ch) { - return ch === 32 || ch === 9 || ch === 13 || ch === 10; -}; -var Ascii85Stream = ( - /** @class */ - function(_super) { - __extends(Ascii85Stream2, _super); - function Ascii85Stream2(stream2, maybeLength) { - var _this = _super.call(this, maybeLength) || this; - _this.stream = stream2; - _this.input = new Uint8Array(5); - if (maybeLength) { - maybeLength = 0.8 * maybeLength; - } - return _this; - } - Ascii85Stream2.prototype.readBlock = function() { - var TILDA_CHAR = 126; - var Z_LOWER_CHAR = 122; - var EOF = -1; - var stream2 = this.stream; - var c = stream2.getByte(); - while (isSpace(c)) { - c = stream2.getByte(); - } - if (c === EOF || c === TILDA_CHAR) { - this.eof = true; - return; - } - var bufferLength = this.bufferLength; - var buffer; - var i; - if (c === Z_LOWER_CHAR) { - buffer = this.ensureBuffer(bufferLength + 4); - for (i = 0; i < 4; ++i) { - buffer[bufferLength + i] = 0; - } - this.bufferLength += 4; - } else { - var input = this.input; - input[0] = c; - for (i = 1; i < 5; ++i) { - c = stream2.getByte(); - while (isSpace(c)) { - c = stream2.getByte(); - } - input[i] = c; - if (c === EOF || c === TILDA_CHAR) { - break; - } - } - buffer = this.ensureBuffer(bufferLength + i - 1); - this.bufferLength += i - 1; - if (i < 5) { - for (; i < 5; ++i) { - input[i] = 33 + 84; - } - this.eof = true; - } - var t = 0; - for (i = 0; i < 5; ++i) { - t = t * 85 + (input[i] - 33); - } - for (i = 3; i >= 0; --i) { - buffer[bufferLength + i] = t & 255; - t >>= 8; - } - } - }; - return Ascii85Stream2; - }(DecodeStream_default) -); -var Ascii85Stream_default = Ascii85Stream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/AsciiHexStream.js -var AsciiHexStream = ( - /** @class */ - function(_super) { - __extends(AsciiHexStream2, _super); - function AsciiHexStream2(stream2, maybeLength) { - var _this = _super.call(this, maybeLength) || this; - _this.stream = stream2; - _this.firstDigit = -1; - if (maybeLength) { - maybeLength = 0.5 * maybeLength; - } - return _this; - } - AsciiHexStream2.prototype.readBlock = function() { - var UPSTREAM_BLOCK_SIZE = 8e3; - var bytes = this.stream.getBytes(UPSTREAM_BLOCK_SIZE); - if (!bytes.length) { - this.eof = true; - return; - } - var maxDecodeLength = bytes.length + 1 >> 1; - var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength); - var bufferLength = this.bufferLength; - var firstDigit = this.firstDigit; - for (var i = 0, ii = bytes.length; i < ii; i++) { - var ch = bytes[i]; - var digit = void 0; - if (ch >= 48 && ch <= 57) { - digit = ch & 15; - } else if (ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102) { - digit = (ch & 15) + 9; - } else if (ch === 62) { - this.eof = true; - break; - } else { - continue; - } - if (firstDigit < 0) { - firstDigit = digit; - } else { - buffer[bufferLength++] = firstDigit << 4 | digit; - firstDigit = -1; - } - } - if (firstDigit >= 0 && this.eof) { - buffer[bufferLength++] = firstDigit << 4; - firstDigit = -1; - } - this.firstDigit = firstDigit; - this.bufferLength = bufferLength; - }; - return AsciiHexStream2; - }(DecodeStream_default) -); -var AsciiHexStream_default = AsciiHexStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/FlateStream.js -var codeLenCodeMap = new Int32Array([ - 16, - 17, - 18, - 0, - 8, - 7, - 9, - 6, - 10, - 5, - 11, - 4, - 12, - 3, - 13, - 2, - 14, - 1, - 15 -]); -var lengthDecode = new Int32Array([ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 65547, - 65549, - 65551, - 65553, - 131091, - 131095, - 131099, - 131103, - 196643, - 196651, - 196659, - 196667, - 262211, - 262227, - 262243, - 262259, - 327811, - 327843, - 327875, - 327907, - 258, - 258, - 258 -]); -var distDecode = new Int32Array([ - 1, - 2, - 3, - 4, - 65541, - 65543, - 131081, - 131085, - 196625, - 196633, - 262177, - 262193, - 327745, - 327777, - 393345, - 393409, - 459009, - 459137, - 524801, - 525057, - 590849, - 591361, - 657409, - 658433, - 724993, - 727041, - 794625, - 798721, - 868353, - 876545 -]); -var fixedLitCodeTab = [new Int32Array([ - 459008, - 524368, - 524304, - 524568, - 459024, - 524400, - 524336, - 590016, - 459016, - 524384, - 524320, - 589984, - 524288, - 524416, - 524352, - 590048, - 459012, - 524376, - 524312, - 589968, - 459028, - 524408, - 524344, - 590032, - 459020, - 524392, - 524328, - 59e4, - 524296, - 524424, - 524360, - 590064, - 459010, - 524372, - 524308, - 524572, - 459026, - 524404, - 524340, - 590024, - 459018, - 524388, - 524324, - 589992, - 524292, - 524420, - 524356, - 590056, - 459014, - 524380, - 524316, - 589976, - 459030, - 524412, - 524348, - 590040, - 459022, - 524396, - 524332, - 590008, - 524300, - 524428, - 524364, - 590072, - 459009, - 524370, - 524306, - 524570, - 459025, - 524402, - 524338, - 590020, - 459017, - 524386, - 524322, - 589988, - 524290, - 524418, - 524354, - 590052, - 459013, - 524378, - 524314, - 589972, - 459029, - 524410, - 524346, - 590036, - 459021, - 524394, - 524330, - 590004, - 524298, - 524426, - 524362, - 590068, - 459011, - 524374, - 524310, - 524574, - 459027, - 524406, - 524342, - 590028, - 459019, - 524390, - 524326, - 589996, - 524294, - 524422, - 524358, - 590060, - 459015, - 524382, - 524318, - 589980, - 459031, - 524414, - 524350, - 590044, - 459023, - 524398, - 524334, - 590012, - 524302, - 524430, - 524366, - 590076, - 459008, - 524369, - 524305, - 524569, - 459024, - 524401, - 524337, - 590018, - 459016, - 524385, - 524321, - 589986, - 524289, - 524417, - 524353, - 590050, - 459012, - 524377, - 524313, - 589970, - 459028, - 524409, - 524345, - 590034, - 459020, - 524393, - 524329, - 590002, - 524297, - 524425, - 524361, - 590066, - 459010, - 524373, - 524309, - 524573, - 459026, - 524405, - 524341, - 590026, - 459018, - 524389, - 524325, - 589994, - 524293, - 524421, - 524357, - 590058, - 459014, - 524381, - 524317, - 589978, - 459030, - 524413, - 524349, - 590042, - 459022, - 524397, - 524333, - 590010, - 524301, - 524429, - 524365, - 590074, - 459009, - 524371, - 524307, - 524571, - 459025, - 524403, - 524339, - 590022, - 459017, - 524387, - 524323, - 589990, - 524291, - 524419, - 524355, - 590054, - 459013, - 524379, - 524315, - 589974, - 459029, - 524411, - 524347, - 590038, - 459021, - 524395, - 524331, - 590006, - 524299, - 524427, - 524363, - 590070, - 459011, - 524375, - 524311, - 524575, - 459027, - 524407, - 524343, - 590030, - 459019, - 524391, - 524327, - 589998, - 524295, - 524423, - 524359, - 590062, - 459015, - 524383, - 524319, - 589982, - 459031, - 524415, - 524351, - 590046, - 459023, - 524399, - 524335, - 590014, - 524303, - 524431, - 524367, - 590078, - 459008, - 524368, - 524304, - 524568, - 459024, - 524400, - 524336, - 590017, - 459016, - 524384, - 524320, - 589985, - 524288, - 524416, - 524352, - 590049, - 459012, - 524376, - 524312, - 589969, - 459028, - 524408, - 524344, - 590033, - 459020, - 524392, - 524328, - 590001, - 524296, - 524424, - 524360, - 590065, - 459010, - 524372, - 524308, - 524572, - 459026, - 524404, - 524340, - 590025, - 459018, - 524388, - 524324, - 589993, - 524292, - 524420, - 524356, - 590057, - 459014, - 524380, - 524316, - 589977, - 459030, - 524412, - 524348, - 590041, - 459022, - 524396, - 524332, - 590009, - 524300, - 524428, - 524364, - 590073, - 459009, - 524370, - 524306, - 524570, - 459025, - 524402, - 524338, - 590021, - 459017, - 524386, - 524322, - 589989, - 524290, - 524418, - 524354, - 590053, - 459013, - 524378, - 524314, - 589973, - 459029, - 524410, - 524346, - 590037, - 459021, - 524394, - 524330, - 590005, - 524298, - 524426, - 524362, - 590069, - 459011, - 524374, - 524310, - 524574, - 459027, - 524406, - 524342, - 590029, - 459019, - 524390, - 524326, - 589997, - 524294, - 524422, - 524358, - 590061, - 459015, - 524382, - 524318, - 589981, - 459031, - 524414, - 524350, - 590045, - 459023, - 524398, - 524334, - 590013, - 524302, - 524430, - 524366, - 590077, - 459008, - 524369, - 524305, - 524569, - 459024, - 524401, - 524337, - 590019, - 459016, - 524385, - 524321, - 589987, - 524289, - 524417, - 524353, - 590051, - 459012, - 524377, - 524313, - 589971, - 459028, - 524409, - 524345, - 590035, - 459020, - 524393, - 524329, - 590003, - 524297, - 524425, - 524361, - 590067, - 459010, - 524373, - 524309, - 524573, - 459026, - 524405, - 524341, - 590027, - 459018, - 524389, - 524325, - 589995, - 524293, - 524421, - 524357, - 590059, - 459014, - 524381, - 524317, - 589979, - 459030, - 524413, - 524349, - 590043, - 459022, - 524397, - 524333, - 590011, - 524301, - 524429, - 524365, - 590075, - 459009, - 524371, - 524307, - 524571, - 459025, - 524403, - 524339, - 590023, - 459017, - 524387, - 524323, - 589991, - 524291, - 524419, - 524355, - 590055, - 459013, - 524379, - 524315, - 589975, - 459029, - 524411, - 524347, - 590039, - 459021, - 524395, - 524331, - 590007, - 524299, - 524427, - 524363, - 590071, - 459011, - 524375, - 524311, - 524575, - 459027, - 524407, - 524343, - 590031, - 459019, - 524391, - 524327, - 589999, - 524295, - 524423, - 524359, - 590063, - 459015, - 524383, - 524319, - 589983, - 459031, - 524415, - 524351, - 590047, - 459023, - 524399, - 524335, - 590015, - 524303, - 524431, - 524367, - 590079 -]), 9]; -var fixedDistCodeTab = [new Int32Array([ - 327680, - 327696, - 327688, - 327704, - 327684, - 327700, - 327692, - 327708, - 327682, - 327698, - 327690, - 327706, - 327686, - 327702, - 327694, - 0, - 327681, - 327697, - 327689, - 327705, - 327685, - 327701, - 327693, - 327709, - 327683, - 327699, - 327691, - 327707, - 327687, - 327703, - 327695, - 0 -]), 5]; -var FlateStream = ( - /** @class */ - function(_super) { - __extends(FlateStream2, _super); - function FlateStream2(stream2, maybeLength) { - var _this = _super.call(this, maybeLength) || this; - _this.stream = stream2; - var cmf = stream2.getByte(); - var flg = stream2.getByte(); - if (cmf === -1 || flg === -1) { - throw new Error("Invalid header in flate stream: " + cmf + ", " + flg); - } - if ((cmf & 15) !== 8) { - throw new Error("Unknown compression method in flate stream: " + cmf + ", " + flg); - } - if (((cmf << 8) + flg) % 31 !== 0) { - throw new Error("Bad FCHECK in flate stream: " + cmf + ", " + flg); - } - if (flg & 32) { - throw new Error("FDICT bit set in flate stream: " + cmf + ", " + flg); - } - _this.codeSize = 0; - _this.codeBuf = 0; - return _this; - } - FlateStream2.prototype.readBlock = function() { - var buffer; - var len; - var str = this.stream; - var hdr = this.getBits(3); - if (hdr & 1) { - this.eof = true; - } - hdr >>= 1; - if (hdr === 0) { - var b = void 0; - if ((b = str.getByte()) === -1) { - throw new Error("Bad block header in flate stream"); - } - var blockLen = b; - if ((b = str.getByte()) === -1) { - throw new Error("Bad block header in flate stream"); - } - blockLen |= b << 8; - if ((b = str.getByte()) === -1) { - throw new Error("Bad block header in flate stream"); - } - var check = b; - if ((b = str.getByte()) === -1) { - throw new Error("Bad block header in flate stream"); - } - check |= b << 8; - if (check !== (~blockLen & 65535) && (blockLen !== 0 || check !== 0)) { - throw new Error("Bad uncompressed block length in flate stream"); - } - this.codeBuf = 0; - this.codeSize = 0; - var bufferLength = this.bufferLength; - buffer = this.ensureBuffer(bufferLength + blockLen); - var end = bufferLength + blockLen; - this.bufferLength = end; - if (blockLen === 0) { - if (str.peekByte() === -1) { - this.eof = true; - } - } else { - for (var n = bufferLength; n < end; ++n) { - if ((b = str.getByte()) === -1) { - this.eof = true; - break; - } - buffer[n] = b; - } - } - return; - } - var litCodeTable; - var distCodeTable; - if (hdr === 1) { - litCodeTable = fixedLitCodeTab; - distCodeTable = fixedDistCodeTab; - } else if (hdr === 2) { - var numLitCodes = this.getBits(5) + 257; - var numDistCodes = this.getBits(5) + 1; - var numCodeLenCodes = this.getBits(4) + 4; - var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length); - var i = void 0; - for (i = 0; i < numCodeLenCodes; ++i) { - codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3); - } - var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); - len = 0; - i = 0; - var codes = numLitCodes + numDistCodes; - var codeLengths = new Uint8Array(codes); - var bitsLength = void 0; - var bitsOffset = void 0; - var what = void 0; - while (i < codes) { - var code = this.getCode(codeLenCodeTab); - if (code === 16) { - bitsLength = 2; - bitsOffset = 3; - what = len; - } else if (code === 17) { - bitsLength = 3; - bitsOffset = 3; - what = len = 0; - } else if (code === 18) { - bitsLength = 7; - bitsOffset = 11; - what = len = 0; - } else { - codeLengths[i++] = len = code; - continue; - } - var repeatLength = this.getBits(bitsLength) + bitsOffset; - while (repeatLength-- > 0) { - codeLengths[i++] = what; - } - } - litCodeTable = this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes)); - distCodeTable = this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes)); - } else { - throw new Error("Unknown block type in flate stream"); - } - buffer = this.buffer; - var limit = buffer ? buffer.length : 0; - var pos = this.bufferLength; - while (true) { - var code1 = this.getCode(litCodeTable); - if (code1 < 256) { - if (pos + 1 >= limit) { - buffer = this.ensureBuffer(pos + 1); - limit = buffer.length; - } - buffer[pos++] = code1; - continue; - } - if (code1 === 256) { - this.bufferLength = pos; - return; - } - code1 -= 257; - code1 = lengthDecode[code1]; - var code2 = code1 >> 16; - if (code2 > 0) { - code2 = this.getBits(code2); - } - len = (code1 & 65535) + code2; - code1 = this.getCode(distCodeTable); - code1 = distDecode[code1]; - code2 = code1 >> 16; - if (code2 > 0) { - code2 = this.getBits(code2); - } - var dist = (code1 & 65535) + code2; - if (pos + len >= limit) { - buffer = this.ensureBuffer(pos + len); - limit = buffer.length; - } - for (var k = 0; k < len; ++k, ++pos) { - buffer[pos] = buffer[pos - dist]; - } - } - }; - FlateStream2.prototype.getBits = function(bits) { - var str = this.stream; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var b; - while (codeSize < bits) { - if ((b = str.getByte()) === -1) { - throw new Error("Bad encoding in flate stream"); - } - codeBuf |= b << codeSize; - codeSize += 8; - } - b = codeBuf & (1 << bits) - 1; - this.codeBuf = codeBuf >> bits; - this.codeSize = codeSize -= bits; - return b; - }; - FlateStream2.prototype.getCode = function(table) { - var str = this.stream; - var codes = table[0]; - var maxLen = table[1]; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var b; - while (codeSize < maxLen) { - if ((b = str.getByte()) === -1) { - break; - } - codeBuf |= b << codeSize; - codeSize += 8; - } - var code = codes[codeBuf & (1 << maxLen) - 1]; - if (typeof codes === "number") { - console.log("FLATE:", code); - } - var codeLen = code >> 16; - var codeVal = code & 65535; - if (codeLen < 1 || codeSize < codeLen) { - throw new Error("Bad encoding in flate stream"); - } - this.codeBuf = codeBuf >> codeLen; - this.codeSize = codeSize - codeLen; - return codeVal; - }; - FlateStream2.prototype.generateHuffmanTable = function(lengths) { - var n = lengths.length; - var maxLen = 0; - var i; - for (i = 0; i < n; ++i) { - if (lengths[i] > maxLen) { - maxLen = lengths[i]; - } - } - var size = 1 << maxLen; - var codes = new Int32Array(size); - for (var len = 1, code = 0, skip = 2; len <= maxLen; ++len, code <<= 1, skip <<= 1) { - for (var val = 0; val < n; ++val) { - if (lengths[val] === len) { - var code2 = 0; - var t = code; - for (i = 0; i < len; ++i) { - code2 = code2 << 1 | t & 1; - t >>= 1; - } - for (i = code2; i < size; i += skip) { - codes[i] = len << 16 | val; - } - ++code; - } - } - } - return [codes, maxLen]; - }; - return FlateStream2; - }(DecodeStream_default) -); -var FlateStream_default = FlateStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/LZWStream.js -var LZWStream = ( - /** @class */ - function(_super) { - __extends(LZWStream2, _super); - function LZWStream2(stream2, maybeLength, earlyChange) { - var _this = _super.call(this, maybeLength) || this; - _this.stream = stream2; - _this.cachedData = 0; - _this.bitsCached = 0; - var maxLzwDictionarySize = 4096; - var lzwState = { - earlyChange, - codeLength: 9, - nextCode: 258, - dictionaryValues: new Uint8Array(maxLzwDictionarySize), - dictionaryLengths: new Uint16Array(maxLzwDictionarySize), - dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize), - currentSequence: new Uint8Array(maxLzwDictionarySize), - currentSequenceLength: 0 - }; - for (var i = 0; i < 256; ++i) { - lzwState.dictionaryValues[i] = i; - lzwState.dictionaryLengths[i] = 1; - } - _this.lzwState = lzwState; - return _this; - } - LZWStream2.prototype.readBlock = function() { - var blockSize = 512; - var estimatedDecodedSize = blockSize * 2; - var decodedSizeDelta = blockSize; - var i; - var j; - var q; - var lzwState = this.lzwState; - if (!lzwState) { - return; - } - var earlyChange = lzwState.earlyChange; - var nextCode = lzwState.nextCode; - var dictionaryValues = lzwState.dictionaryValues; - var dictionaryLengths = lzwState.dictionaryLengths; - var dictionaryPrevCodes = lzwState.dictionaryPrevCodes; - var codeLength = lzwState.codeLength; - var prevCode = lzwState.prevCode; - var currentSequence = lzwState.currentSequence; - var currentSequenceLength = lzwState.currentSequenceLength; - var decodedLength = 0; - var currentBufferLength = this.bufferLength; - var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); - for (i = 0; i < blockSize; i++) { - var code = this.readBits(codeLength); - var hasPrev = currentSequenceLength > 0; - if (!code || code < 256) { - currentSequence[0] = code; - currentSequenceLength = 1; - } else if (code >= 258) { - if (code < nextCode) { - currentSequenceLength = dictionaryLengths[code]; - for (j = currentSequenceLength - 1, q = code; j >= 0; j--) { - currentSequence[j] = dictionaryValues[q]; - q = dictionaryPrevCodes[q]; - } - } else { - currentSequence[currentSequenceLength++] = currentSequence[0]; - } - } else if (code === 256) { - codeLength = 9; - nextCode = 258; - currentSequenceLength = 0; - continue; - } else { - this.eof = true; - delete this.lzwState; - break; - } - if (hasPrev) { - dictionaryPrevCodes[nextCode] = prevCode; - dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1; - dictionaryValues[nextCode] = currentSequence[0]; - nextCode++; - codeLength = nextCode + earlyChange & nextCode + earlyChange - 1 ? codeLength : Math.min(Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1, 12) | 0; - } - prevCode = code; - decodedLength += currentSequenceLength; - if (estimatedDecodedSize < decodedLength) { - do { - estimatedDecodedSize += decodedSizeDelta; - } while (estimatedDecodedSize < decodedLength); - buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); - } - for (j = 0; j < currentSequenceLength; j++) { - buffer[currentBufferLength++] = currentSequence[j]; - } - } - lzwState.nextCode = nextCode; - lzwState.codeLength = codeLength; - lzwState.prevCode = prevCode; - lzwState.currentSequenceLength = currentSequenceLength; - this.bufferLength = currentBufferLength; - }; - LZWStream2.prototype.readBits = function(n) { - var bitsCached = this.bitsCached; - var cachedData = this.cachedData; - while (bitsCached < n) { - var c = this.stream.getByte(); - if (c === -1) { - this.eof = true; - return null; - } - cachedData = cachedData << 8 | c; - bitsCached += 8; - } - this.bitsCached = bitsCached -= n; - this.cachedData = cachedData; - return cachedData >>> bitsCached & (1 << n) - 1; - }; - return LZWStream2; - }(DecodeStream_default) -); -var LZWStream_default = LZWStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/RunLengthStream.js -var RunLengthStream = ( - /** @class */ - function(_super) { - __extends(RunLengthStream2, _super); - function RunLengthStream2(stream2, maybeLength) { - var _this = _super.call(this, maybeLength) || this; - _this.stream = stream2; - return _this; - } - RunLengthStream2.prototype.readBlock = function() { - var repeatHeader = this.stream.getBytes(2); - if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) { - this.eof = true; - return; - } - var buffer; - var bufferLength = this.bufferLength; - var n = repeatHeader[0]; - if (n < 128) { - buffer = this.ensureBuffer(bufferLength + n + 1); - buffer[bufferLength++] = repeatHeader[1]; - if (n > 0) { - var source2 = this.stream.getBytes(n); - buffer.set(source2, bufferLength); - bufferLength += n; - } - } else { - n = 257 - n; - var b = repeatHeader[1]; - buffer = this.ensureBuffer(bufferLength + n + 1); - for (var i = 0; i < n; i++) { - buffer[bufferLength++] = b; - } - } - this.bufferLength = bufferLength; - }; - return RunLengthStream2; - }(DecodeStream_default) -); -var RunLengthStream_default = RunLengthStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/streams/decode.js -var decodeStream = function(stream2, encoding, params) { - if (encoding === PDFName_default.of("FlateDecode")) { - return new FlateStream_default(stream2); - } - if (encoding === PDFName_default.of("LZWDecode")) { - var earlyChange = 1; - if (params instanceof PDFDict_default) { - var EarlyChange = params.lookup(PDFName_default.of("EarlyChange")); - if (EarlyChange instanceof PDFNumber_default) { - earlyChange = EarlyChange.asNumber(); - } - } - return new LZWStream_default(stream2, void 0, earlyChange); - } - if (encoding === PDFName_default.of("ASCII85Decode")) { - return new Ascii85Stream_default(stream2); - } - if (encoding === PDFName_default.of("ASCIIHexDecode")) { - return new AsciiHexStream_default(stream2); - } - if (encoding === PDFName_default.of("RunLengthDecode")) { - return new RunLengthStream_default(stream2); - } - throw new UnsupportedEncodingError(encoding.asString()); -}; -var decodePDFRawStream = function(_a3) { - var dict = _a3.dict, contents = _a3.contents; - var stream2 = new Stream_default(contents); - var Filter = dict.lookup(PDFName_default.of("Filter")); - var DecodeParms = dict.lookup(PDFName_default.of("DecodeParms")); - if (Filter instanceof PDFName_default) { - stream2 = decodeStream(stream2, Filter, DecodeParms); - } else if (Filter instanceof PDFArray_default) { - for (var idx = 0, len = Filter.size(); idx < len; idx++) { - stream2 = decodeStream(stream2, Filter.lookup(idx, PDFName_default), DecodeParms && DecodeParms.lookupMaybe(idx, PDFDict_default)); - } - } else if (!!Filter) { - throw new UnexpectedObjectTypeError([PDFName_default, PDFArray_default], Filter); - } - return stream2; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/PDFPageEmbedder.js -var fullPageBoundingBox = function(page) { - var mediaBox = page.MediaBox(); - var width = mediaBox.lookup(2, PDFNumber_default).asNumber() - mediaBox.lookup(0, PDFNumber_default).asNumber(); - var height = mediaBox.lookup(3, PDFNumber_default).asNumber() - mediaBox.lookup(1, PDFNumber_default).asNumber(); - return { left: 0, bottom: 0, right: width, top: height }; -}; -var boundingBoxAdjustedMatrix = function(bb) { - return [1, 0, 0, 1, -bb.left, -bb.bottom]; -}; -var PDFPageEmbedder = ( - /** @class */ - function() { - function PDFPageEmbedder2(page, boundingBox, transformationMatrix) { - this.page = page; - var bb = boundingBox !== null && boundingBox !== void 0 ? boundingBox : fullPageBoundingBox(page); - this.width = bb.right - bb.left; - this.height = bb.top - bb.bottom; - this.boundingBox = bb; - this.transformationMatrix = transformationMatrix !== null && transformationMatrix !== void 0 ? transformationMatrix : boundingBoxAdjustedMatrix(bb); - } - PDFPageEmbedder2.for = function(page, boundingBox, transformationMatrix) { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a3) { - return [2, new PDFPageEmbedder2(page, boundingBox, transformationMatrix)]; - }); - }); - }; - PDFPageEmbedder2.prototype.embedIntoContext = function(context, ref) { - return __awaiter(this, void 0, void 0, function() { - var _a3, Contents, Resources, decodedContents, _b3, left, bottom, right, top, xObject; - return __generator(this, function(_c2) { - _a3 = this.page.normalizedEntries(), Contents = _a3.Contents, Resources = _a3.Resources; - if (!Contents) - throw new MissingPageContentsEmbeddingError(); - decodedContents = this.decodeContents(Contents); - _b3 = this.boundingBox, left = _b3.left, bottom = _b3.bottom, right = _b3.right, top = _b3.top; - xObject = context.flateStream(decodedContents, { - Type: "XObject", - Subtype: "Form", - FormType: 1, - BBox: [left, bottom, right, top], - Matrix: this.transformationMatrix, - Resources - }); - if (ref) { - context.assign(ref, xObject); - return [2, ref]; - } else { - return [2, context.register(xObject)]; - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - PDFPageEmbedder2.prototype.decodeContents = function(contents) { - var newline = Uint8Array.of(CharCodes_default.Newline); - var decodedContents = []; - for (var idx = 0, len = contents.size(); idx < len; idx++) { - var stream2 = contents.lookup(idx, PDFStream_default); - var content = void 0; - if (stream2 instanceof PDFRawStream_default) { - content = decodePDFRawStream(stream2).decode(); - } else if (stream2 instanceof PDFContentStream_default) { - content = stream2.getUnencodedContents(); - } else { - throw new UnrecognizedStreamTypeError(stream2); - } - decodedContents.push(content, newline); - } - return mergeIntoTypedArray.apply(void 0, decodedContents); - }; - return PDFPageEmbedder2; - }() -); -var PDFPageEmbedder_default = PDFPageEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/interactive/ViewerPreferences.js -var asEnum = function(rawValue, enumType) { - if (rawValue === void 0) - return void 0; - return enumType[rawValue]; -}; -var NonFullScreenPageMode; -(function(NonFullScreenPageMode2) { - NonFullScreenPageMode2["UseNone"] = "UseNone"; - NonFullScreenPageMode2["UseOutlines"] = "UseOutlines"; - NonFullScreenPageMode2["UseThumbs"] = "UseThumbs"; - NonFullScreenPageMode2["UseOC"] = "UseOC"; -})(NonFullScreenPageMode || (NonFullScreenPageMode = {})); -var ReadingDirection; -(function(ReadingDirection2) { - ReadingDirection2["L2R"] = "L2R"; - ReadingDirection2["R2L"] = "R2L"; -})(ReadingDirection || (ReadingDirection = {})); -var PrintScaling; -(function(PrintScaling2) { - PrintScaling2["None"] = "None"; - PrintScaling2["AppDefault"] = "AppDefault"; -})(PrintScaling || (PrintScaling = {})); -var Duplex; -(function(Duplex2) { - Duplex2["Simplex"] = "Simplex"; - Duplex2["DuplexFlipShortEdge"] = "DuplexFlipShortEdge"; - Duplex2["DuplexFlipLongEdge"] = "DuplexFlipLongEdge"; -})(Duplex || (Duplex = {})); -var ViewerPreferences = ( - /** @class */ - function() { - function ViewerPreferences2(dict) { - this.dict = dict; - } - ViewerPreferences2.prototype.lookupBool = function(key) { - var returnObj = this.dict.lookup(PDFName_default.of(key)); - if (returnObj instanceof PDFBool_default) - return returnObj; - return void 0; - }; - ViewerPreferences2.prototype.lookupName = function(key) { - var returnObj = this.dict.lookup(PDFName_default.of(key)); - if (returnObj instanceof PDFName_default) - return returnObj; - return void 0; - }; - ViewerPreferences2.prototype.HideToolbar = function() { - return this.lookupBool("HideToolbar"); - }; - ViewerPreferences2.prototype.HideMenubar = function() { - return this.lookupBool("HideMenubar"); - }; - ViewerPreferences2.prototype.HideWindowUI = function() { - return this.lookupBool("HideWindowUI"); - }; - ViewerPreferences2.prototype.FitWindow = function() { - return this.lookupBool("FitWindow"); - }; - ViewerPreferences2.prototype.CenterWindow = function() { - return this.lookupBool("CenterWindow"); - }; - ViewerPreferences2.prototype.DisplayDocTitle = function() { - return this.lookupBool("DisplayDocTitle"); - }; - ViewerPreferences2.prototype.NonFullScreenPageMode = function() { - return this.lookupName("NonFullScreenPageMode"); - }; - ViewerPreferences2.prototype.Direction = function() { - return this.lookupName("Direction"); - }; - ViewerPreferences2.prototype.PrintScaling = function() { - return this.lookupName("PrintScaling"); - }; - ViewerPreferences2.prototype.Duplex = function() { - return this.lookupName("Duplex"); - }; - ViewerPreferences2.prototype.PickTrayByPDFSize = function() { - return this.lookupBool("PickTrayByPDFSize"); - }; - ViewerPreferences2.prototype.PrintPageRange = function() { - var PrintPageRange = this.dict.lookup(PDFName_default.of("PrintPageRange")); - if (PrintPageRange instanceof PDFArray_default) - return PrintPageRange; - return void 0; - }; - ViewerPreferences2.prototype.NumCopies = function() { - var NumCopies = this.dict.lookup(PDFName_default.of("NumCopies")); - if (NumCopies instanceof PDFNumber_default) - return NumCopies; - return void 0; - }; - ViewerPreferences2.prototype.getHideToolbar = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.HideToolbar()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean()) !== null && _b3 !== void 0 ? _b3 : false; - }; - ViewerPreferences2.prototype.getHideMenubar = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.HideMenubar()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean()) !== null && _b3 !== void 0 ? _b3 : false; - }; - ViewerPreferences2.prototype.getHideWindowUI = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.HideWindowUI()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean()) !== null && _b3 !== void 0 ? _b3 : false; - }; - ViewerPreferences2.prototype.getFitWindow = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.FitWindow()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean()) !== null && _b3 !== void 0 ? _b3 : false; - }; - ViewerPreferences2.prototype.getCenterWindow = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.CenterWindow()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean()) !== null && _b3 !== void 0 ? _b3 : false; - }; - ViewerPreferences2.prototype.getDisplayDocTitle = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.DisplayDocTitle()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean()) !== null && _b3 !== void 0 ? _b3 : false; - }; - ViewerPreferences2.prototype.getNonFullScreenPageMode = function() { - var _a3, _b3; - var mode = (_a3 = this.NonFullScreenPageMode()) === null || _a3 === void 0 ? void 0 : _a3.decodeText(); - return (_b3 = asEnum(mode, NonFullScreenPageMode)) !== null && _b3 !== void 0 ? _b3 : NonFullScreenPageMode.UseNone; - }; - ViewerPreferences2.prototype.getReadingDirection = function() { - var _a3, _b3; - var direction = (_a3 = this.Direction()) === null || _a3 === void 0 ? void 0 : _a3.decodeText(); - return (_b3 = asEnum(direction, ReadingDirection)) !== null && _b3 !== void 0 ? _b3 : ReadingDirection.L2R; - }; - ViewerPreferences2.prototype.getPrintScaling = function() { - var _a3, _b3; - var scaling = (_a3 = this.PrintScaling()) === null || _a3 === void 0 ? void 0 : _a3.decodeText(); - return (_b3 = asEnum(scaling, PrintScaling)) !== null && _b3 !== void 0 ? _b3 : PrintScaling.AppDefault; - }; - ViewerPreferences2.prototype.getDuplex = function() { - var _a3; - var duplex = (_a3 = this.Duplex()) === null || _a3 === void 0 ? void 0 : _a3.decodeText(); - return asEnum(duplex, Duplex); - }; - ViewerPreferences2.prototype.getPickTrayByPDFSize = function() { - var _a3; - return (_a3 = this.PickTrayByPDFSize()) === null || _a3 === void 0 ? void 0 : _a3.asBoolean(); - }; - ViewerPreferences2.prototype.getPrintPageRange = function() { - var rng = this.PrintPageRange(); - if (!rng) - return []; - var pageRanges = []; - for (var i = 0; i < rng.size(); i += 2) { - var start = rng.lookup(i, PDFNumber_default).asNumber(); - var end = rng.lookup(i + 1, PDFNumber_default).asNumber(); - pageRanges.push({ start, end }); - } - return pageRanges; - }; - ViewerPreferences2.prototype.getNumCopies = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.NumCopies()) === null || _a3 === void 0 ? void 0 : _a3.asNumber()) !== null && _b3 !== void 0 ? _b3 : 1; - }; - ViewerPreferences2.prototype.setHideToolbar = function(hideToolbar) { - var HideToolbar = this.dict.context.obj(hideToolbar); - this.dict.set(PDFName_default.of("HideToolbar"), HideToolbar); - }; - ViewerPreferences2.prototype.setHideMenubar = function(hideMenubar) { - var HideMenubar = this.dict.context.obj(hideMenubar); - this.dict.set(PDFName_default.of("HideMenubar"), HideMenubar); - }; - ViewerPreferences2.prototype.setHideWindowUI = function(hideWindowUI) { - var HideWindowUI = this.dict.context.obj(hideWindowUI); - this.dict.set(PDFName_default.of("HideWindowUI"), HideWindowUI); - }; - ViewerPreferences2.prototype.setFitWindow = function(fitWindow) { - var FitWindow = this.dict.context.obj(fitWindow); - this.dict.set(PDFName_default.of("FitWindow"), FitWindow); - }; - ViewerPreferences2.prototype.setCenterWindow = function(centerWindow) { - var CenterWindow = this.dict.context.obj(centerWindow); - this.dict.set(PDFName_default.of("CenterWindow"), CenterWindow); - }; - ViewerPreferences2.prototype.setDisplayDocTitle = function(displayTitle) { - var DisplayDocTitle = this.dict.context.obj(displayTitle); - this.dict.set(PDFName_default.of("DisplayDocTitle"), DisplayDocTitle); - }; - ViewerPreferences2.prototype.setNonFullScreenPageMode = function(nonFullScreenPageMode) { - assertIsOneOf(nonFullScreenPageMode, "nonFullScreenPageMode", NonFullScreenPageMode); - var mode = PDFName_default.of(nonFullScreenPageMode); - this.dict.set(PDFName_default.of("NonFullScreenPageMode"), mode); - }; - ViewerPreferences2.prototype.setReadingDirection = function(readingDirection) { - assertIsOneOf(readingDirection, "readingDirection", ReadingDirection); - var direction = PDFName_default.of(readingDirection); - this.dict.set(PDFName_default.of("Direction"), direction); - }; - ViewerPreferences2.prototype.setPrintScaling = function(printScaling) { - assertIsOneOf(printScaling, "printScaling", PrintScaling); - var scaling = PDFName_default.of(printScaling); - this.dict.set(PDFName_default.of("PrintScaling"), scaling); - }; - ViewerPreferences2.prototype.setDuplex = function(duplex) { - assertIsOneOf(duplex, "duplex", Duplex); - var dup = PDFName_default.of(duplex); - this.dict.set(PDFName_default.of("Duplex"), dup); - }; - ViewerPreferences2.prototype.setPickTrayByPDFSize = function(pickTrayByPDFSize) { - var PickTrayByPDFSize = this.dict.context.obj(pickTrayByPDFSize); - this.dict.set(PDFName_default.of("PickTrayByPDFSize"), PickTrayByPDFSize); - }; - ViewerPreferences2.prototype.setPrintPageRange = function(printPageRange) { - if (!Array.isArray(printPageRange)) - printPageRange = [printPageRange]; - var flatRange = []; - for (var idx = 0, len = printPageRange.length; idx < len; idx++) { - flatRange.push(printPageRange[idx].start); - flatRange.push(printPageRange[idx].end); - } - assertEachIs(flatRange, "printPageRange", ["number"]); - var pageRanges = this.dict.context.obj(flatRange); - this.dict.set(PDFName_default.of("PrintPageRange"), pageRanges); - }; - ViewerPreferences2.prototype.setNumCopies = function(numCopies) { - assertRange(numCopies, "numCopies", 1, Number.MAX_VALUE); - assertInteger(numCopies, "numCopies"); - var NumCopies = this.dict.context.obj(numCopies); - this.dict.set(PDFName_default.of("NumCopies"), NumCopies); - }; - ViewerPreferences2.fromDict = function(dict) { - return new ViewerPreferences2(dict); - }; - ViewerPreferences2.create = function(context) { - var dict = context.obj({}); - return new ViewerPreferences2(dict); - }; - return ViewerPreferences2; - }() -); -var ViewerPreferences_default = ViewerPreferences; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroField.js -var tfRegex = /\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+Tf/; -var PDFAcroField = ( - /** @class */ - function() { - function PDFAcroField2(dict, ref) { - this.dict = dict; - this.ref = ref; - } - PDFAcroField2.prototype.T = function() { - return this.dict.lookupMaybe(PDFName_default.of("T"), PDFString_default, PDFHexString_default); - }; - PDFAcroField2.prototype.Ff = function() { - var numberOrRef = this.getInheritableAttribute(PDFName_default.of("Ff")); - return this.dict.context.lookupMaybe(numberOrRef, PDFNumber_default); - }; - PDFAcroField2.prototype.V = function() { - var valueOrRef = this.getInheritableAttribute(PDFName_default.of("V")); - return this.dict.context.lookup(valueOrRef); - }; - PDFAcroField2.prototype.Kids = function() { - return this.dict.lookupMaybe(PDFName_default.of("Kids"), PDFArray_default); - }; - PDFAcroField2.prototype.DA = function() { - var da = this.dict.lookup(PDFName_default.of("DA")); - if (da instanceof PDFString_default || da instanceof PDFHexString_default) - return da; - return void 0; - }; - PDFAcroField2.prototype.setKids = function(kids) { - this.dict.set(PDFName_default.of("Kids"), this.dict.context.obj(kids)); - }; - PDFAcroField2.prototype.getParent = function() { - var parentRef = this.dict.get(PDFName_default.of("Parent")); - if (parentRef instanceof PDFRef_default) { - var parent_1 = this.dict.lookup(PDFName_default.of("Parent"), PDFDict_default); - return new PDFAcroField2(parent_1, parentRef); - } - return void 0; - }; - PDFAcroField2.prototype.setParent = function(parent) { - if (!parent) - this.dict.delete(PDFName_default.of("Parent")); - else - this.dict.set(PDFName_default.of("Parent"), parent); - }; - PDFAcroField2.prototype.getFullyQualifiedName = function() { - var parent = this.getParent(); - if (!parent) - return this.getPartialName(); - return parent.getFullyQualifiedName() + "." + this.getPartialName(); - }; - PDFAcroField2.prototype.getPartialName = function() { - var _a3; - return (_a3 = this.T()) === null || _a3 === void 0 ? void 0 : _a3.decodeText(); - }; - PDFAcroField2.prototype.setPartialName = function(partialName) { - if (!partialName) - this.dict.delete(PDFName_default.of("T")); - else - this.dict.set(PDFName_default.of("T"), PDFHexString_default.fromText(partialName)); - }; - PDFAcroField2.prototype.setDefaultAppearance = function(appearance) { - this.dict.set(PDFName_default.of("DA"), PDFString_default.of(appearance)); - }; - PDFAcroField2.prototype.getDefaultAppearance = function() { - var DA = this.DA(); - if (DA instanceof PDFHexString_default) { - return DA.decodeText(); - } - return DA === null || DA === void 0 ? void 0 : DA.asString(); - }; - PDFAcroField2.prototype.setFontSize = function(fontSize) { - var _a3; - var name = (_a3 = this.getFullyQualifiedName()) !== null && _a3 !== void 0 ? _a3 : ""; - var da = this.getDefaultAppearance(); - if (!da) - throw new MissingDAEntryError(name); - var daMatch = findLastMatch(da, tfRegex); - if (!daMatch.match) - throw new MissingTfOperatorError(name); - var daStart = da.slice(0, daMatch.pos - daMatch.match[0].length); - var daEnd = daMatch.pos <= da.length ? da.slice(daMatch.pos) : ""; - var fontName = daMatch.match[1]; - var modifiedDa = daStart + " /" + fontName + " " + fontSize + " Tf " + daEnd; - this.setDefaultAppearance(modifiedDa); - }; - PDFAcroField2.prototype.getFlags = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.Ff()) === null || _a3 === void 0 ? void 0 : _a3.asNumber()) !== null && _b3 !== void 0 ? _b3 : 0; - }; - PDFAcroField2.prototype.setFlags = function(flags) { - this.dict.set(PDFName_default.of("Ff"), PDFNumber_default.of(flags)); - }; - PDFAcroField2.prototype.hasFlag = function(flag3) { - var flags = this.getFlags(); - return (flags & flag3) !== 0; - }; - PDFAcroField2.prototype.setFlag = function(flag3) { - var flags = this.getFlags(); - this.setFlags(flags | flag3); - }; - PDFAcroField2.prototype.clearFlag = function(flag3) { - var flags = this.getFlags(); - this.setFlags(flags & ~flag3); - }; - PDFAcroField2.prototype.setFlagTo = function(flag3, enable) { - if (enable) - this.setFlag(flag3); - else - this.clearFlag(flag3); - }; - PDFAcroField2.prototype.getInheritableAttribute = function(name) { - var attribute; - this.ascend(function(node) { - if (!attribute) - attribute = node.dict.get(name); - }); - return attribute; - }; - PDFAcroField2.prototype.ascend = function(visitor) { - visitor(this); - var parent = this.getParent(); - if (parent) - parent.ascend(visitor); - }; - return PDFAcroField2; - }() -); -var PDFAcroField_default = PDFAcroField; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/annotation/BorderStyle.js -var BorderStyle = ( - /** @class */ - function() { - function BorderStyle2(dict) { - this.dict = dict; - } - BorderStyle2.prototype.W = function() { - var W = this.dict.lookup(PDFName_default.of("W")); - if (W instanceof PDFNumber_default) - return W; - return void 0; - }; - BorderStyle2.prototype.getWidth = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.W()) === null || _a3 === void 0 ? void 0 : _a3.asNumber()) !== null && _b3 !== void 0 ? _b3 : 1; - }; - BorderStyle2.prototype.setWidth = function(width) { - var W = this.dict.context.obj(width); - this.dict.set(PDFName_default.of("W"), W); - }; - BorderStyle2.fromDict = function(dict) { - return new BorderStyle2(dict); - }; - return BorderStyle2; - }() -); -var BorderStyle_default = BorderStyle; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/annotation/PDFAnnotation.js -var PDFAnnotation = ( - /** @class */ - function() { - function PDFAnnotation2(dict) { - this.dict = dict; - } - PDFAnnotation2.prototype.Rect = function() { - return this.dict.lookup(PDFName_default.of("Rect"), PDFArray_default); - }; - PDFAnnotation2.prototype.AP = function() { - return this.dict.lookupMaybe(PDFName_default.of("AP"), PDFDict_default); - }; - PDFAnnotation2.prototype.F = function() { - var numberOrRef = this.dict.lookup(PDFName_default.of("F")); - return this.dict.context.lookupMaybe(numberOrRef, PDFNumber_default); - }; - PDFAnnotation2.prototype.getRectangle = function() { - var _a3; - var Rect = this.Rect(); - return (_a3 = Rect === null || Rect === void 0 ? void 0 : Rect.asRectangle()) !== null && _a3 !== void 0 ? _a3 : { x: 0, y: 0, width: 0, height: 0 }; - }; - PDFAnnotation2.prototype.setRectangle = function(rect) { - var x = rect.x, y = rect.y, width = rect.width, height = rect.height; - var Rect = this.dict.context.obj([x, y, x + width, y + height]); - this.dict.set(PDFName_default.of("Rect"), Rect); - }; - PDFAnnotation2.prototype.getAppearanceState = function() { - var AS = this.dict.lookup(PDFName_default.of("AS")); - if (AS instanceof PDFName_default) - return AS; - return void 0; - }; - PDFAnnotation2.prototype.setAppearanceState = function(state2) { - this.dict.set(PDFName_default.of("AS"), state2); - }; - PDFAnnotation2.prototype.setAppearances = function(appearances) { - this.dict.set(PDFName_default.of("AP"), appearances); - }; - PDFAnnotation2.prototype.ensureAP = function() { - var AP = this.AP(); - if (!AP) { - AP = this.dict.context.obj({}); - this.dict.set(PDFName_default.of("AP"), AP); - } - return AP; - }; - PDFAnnotation2.prototype.getNormalAppearance = function() { - var AP = this.ensureAP(); - var N = AP.get(PDFName_default.of("N")); - if (N instanceof PDFRef_default || N instanceof PDFDict_default) - return N; - throw new Error("Unexpected N type: " + (N === null || N === void 0 ? void 0 : N.constructor.name)); - }; - PDFAnnotation2.prototype.setNormalAppearance = function(appearance) { - var AP = this.ensureAP(); - AP.set(PDFName_default.of("N"), appearance); - }; - PDFAnnotation2.prototype.setRolloverAppearance = function(appearance) { - var AP = this.ensureAP(); - AP.set(PDFName_default.of("R"), appearance); - }; - PDFAnnotation2.prototype.setDownAppearance = function(appearance) { - var AP = this.ensureAP(); - AP.set(PDFName_default.of("D"), appearance); - }; - PDFAnnotation2.prototype.removeRolloverAppearance = function() { - var AP = this.AP(); - AP === null || AP === void 0 ? void 0 : AP.delete(PDFName_default.of("R")); - }; - PDFAnnotation2.prototype.removeDownAppearance = function() { - var AP = this.AP(); - AP === null || AP === void 0 ? void 0 : AP.delete(PDFName_default.of("D")); - }; - PDFAnnotation2.prototype.getAppearances = function() { - var AP = this.AP(); - if (!AP) - return void 0; - var N = AP.lookup(PDFName_default.of("N"), PDFDict_default, PDFStream_default); - var R = AP.lookupMaybe(PDFName_default.of("R"), PDFDict_default, PDFStream_default); - var D = AP.lookupMaybe(PDFName_default.of("D"), PDFDict_default, PDFStream_default); - return { normal: N, rollover: R, down: D }; - }; - PDFAnnotation2.prototype.getFlags = function() { - var _a3, _b3; - return (_b3 = (_a3 = this.F()) === null || _a3 === void 0 ? void 0 : _a3.asNumber()) !== null && _b3 !== void 0 ? _b3 : 0; - }; - PDFAnnotation2.prototype.setFlags = function(flags) { - this.dict.set(PDFName_default.of("F"), PDFNumber_default.of(flags)); - }; - PDFAnnotation2.prototype.hasFlag = function(flag3) { - var flags = this.getFlags(); - return (flags & flag3) !== 0; - }; - PDFAnnotation2.prototype.setFlag = function(flag3) { - var flags = this.getFlags(); - this.setFlags(flags | flag3); - }; - PDFAnnotation2.prototype.clearFlag = function(flag3) { - var flags = this.getFlags(); - this.setFlags(flags & ~flag3); - }; - PDFAnnotation2.prototype.setFlagTo = function(flag3, enable) { - if (enable) - this.setFlag(flag3); - else - this.clearFlag(flag3); - }; - PDFAnnotation2.fromDict = function(dict) { - return new PDFAnnotation2(dict); - }; - return PDFAnnotation2; - }() -); -var PDFAnnotation_default = PDFAnnotation; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/annotation/AppearanceCharacteristics.js -var AppearanceCharacteristics = ( - /** @class */ - function() { - function AppearanceCharacteristics2(dict) { - this.dict = dict; - } - AppearanceCharacteristics2.prototype.R = function() { - var R = this.dict.lookup(PDFName_default.of("R")); - if (R instanceof PDFNumber_default) - return R; - return void 0; - }; - AppearanceCharacteristics2.prototype.BC = function() { - var BC = this.dict.lookup(PDFName_default.of("BC")); - if (BC instanceof PDFArray_default) - return BC; - return void 0; - }; - AppearanceCharacteristics2.prototype.BG = function() { - var BG = this.dict.lookup(PDFName_default.of("BG")); - if (BG instanceof PDFArray_default) - return BG; - return void 0; - }; - AppearanceCharacteristics2.prototype.CA = function() { - var CA = this.dict.lookup(PDFName_default.of("CA")); - if (CA instanceof PDFHexString_default || CA instanceof PDFString_default) - return CA; - return void 0; - }; - AppearanceCharacteristics2.prototype.RC = function() { - var RC = this.dict.lookup(PDFName_default.of("RC")); - if (RC instanceof PDFHexString_default || RC instanceof PDFString_default) - return RC; - return void 0; - }; - AppearanceCharacteristics2.prototype.AC = function() { - var AC = this.dict.lookup(PDFName_default.of("AC")); - if (AC instanceof PDFHexString_default || AC instanceof PDFString_default) - return AC; - return void 0; - }; - AppearanceCharacteristics2.prototype.getRotation = function() { - var _a3; - return (_a3 = this.R()) === null || _a3 === void 0 ? void 0 : _a3.asNumber(); - }; - AppearanceCharacteristics2.prototype.getBorderColor = function() { - var BC = this.BC(); - if (!BC) - return void 0; - var components = []; - for (var idx = 0, len = BC === null || BC === void 0 ? void 0 : BC.size(); idx < len; idx++) { - var component2 = BC.get(idx); - if (component2 instanceof PDFNumber_default) - components.push(component2.asNumber()); - } - return components; - }; - AppearanceCharacteristics2.prototype.getBackgroundColor = function() { - var BG = this.BG(); - if (!BG) - return void 0; - var components = []; - for (var idx = 0, len = BG === null || BG === void 0 ? void 0 : BG.size(); idx < len; idx++) { - var component2 = BG.get(idx); - if (component2 instanceof PDFNumber_default) - components.push(component2.asNumber()); - } - return components; - }; - AppearanceCharacteristics2.prototype.getCaptions = function() { - var CA = this.CA(); - var RC = this.RC(); - var AC = this.AC(); - return { - normal: CA === null || CA === void 0 ? void 0 : CA.decodeText(), - rollover: RC === null || RC === void 0 ? void 0 : RC.decodeText(), - down: AC === null || AC === void 0 ? void 0 : AC.decodeText() - }; - }; - AppearanceCharacteristics2.prototype.setRotation = function(rotation) { - var R = this.dict.context.obj(rotation); - this.dict.set(PDFName_default.of("R"), R); - }; - AppearanceCharacteristics2.prototype.setBorderColor = function(color) { - var BC = this.dict.context.obj(color); - this.dict.set(PDFName_default.of("BC"), BC); - }; - AppearanceCharacteristics2.prototype.setBackgroundColor = function(color) { - var BG = this.dict.context.obj(color); - this.dict.set(PDFName_default.of("BG"), BG); - }; - AppearanceCharacteristics2.prototype.setCaptions = function(captions) { - var CA = PDFHexString_default.fromText(captions.normal); - this.dict.set(PDFName_default.of("CA"), CA); - if (captions.rollover) { - var RC = PDFHexString_default.fromText(captions.rollover); - this.dict.set(PDFName_default.of("RC"), RC); - } else { - this.dict.delete(PDFName_default.of("RC")); - } - if (captions.down) { - var AC = PDFHexString_default.fromText(captions.down); - this.dict.set(PDFName_default.of("AC"), AC); - } else { - this.dict.delete(PDFName_default.of("AC")); - } - }; - AppearanceCharacteristics2.fromDict = function(dict) { - return new AppearanceCharacteristics2(dict); - }; - return AppearanceCharacteristics2; - }() -); -var AppearanceCharacteristics_default = AppearanceCharacteristics; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/annotation/PDFWidgetAnnotation.js -var PDFWidgetAnnotation = ( - /** @class */ - function(_super) { - __extends(PDFWidgetAnnotation2, _super); - function PDFWidgetAnnotation2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFWidgetAnnotation2.prototype.MK = function() { - var MK = this.dict.lookup(PDFName_default.of("MK")); - if (MK instanceof PDFDict_default) - return MK; - return void 0; - }; - PDFWidgetAnnotation2.prototype.BS = function() { - var BS = this.dict.lookup(PDFName_default.of("BS")); - if (BS instanceof PDFDict_default) - return BS; - return void 0; - }; - PDFWidgetAnnotation2.prototype.DA = function() { - var da = this.dict.lookup(PDFName_default.of("DA")); - if (da instanceof PDFString_default || da instanceof PDFHexString_default) - return da; - return void 0; - }; - PDFWidgetAnnotation2.prototype.P = function() { - var P = this.dict.get(PDFName_default.of("P")); - if (P instanceof PDFRef_default) - return P; - return void 0; - }; - PDFWidgetAnnotation2.prototype.setP = function(page) { - this.dict.set(PDFName_default.of("P"), page); - }; - PDFWidgetAnnotation2.prototype.setDefaultAppearance = function(appearance) { - this.dict.set(PDFName_default.of("DA"), PDFString_default.of(appearance)); - }; - PDFWidgetAnnotation2.prototype.getDefaultAppearance = function() { - var DA = this.DA(); - if (DA instanceof PDFHexString_default) { - return DA.decodeText(); - } - return DA === null || DA === void 0 ? void 0 : DA.asString(); - }; - PDFWidgetAnnotation2.prototype.getAppearanceCharacteristics = function() { - var MK = this.MK(); - if (MK) - return AppearanceCharacteristics_default.fromDict(MK); - return void 0; - }; - PDFWidgetAnnotation2.prototype.getOrCreateAppearanceCharacteristics = function() { - var MK = this.MK(); - if (MK) - return AppearanceCharacteristics_default.fromDict(MK); - var ac = AppearanceCharacteristics_default.fromDict(this.dict.context.obj({})); - this.dict.set(PDFName_default.of("MK"), ac.dict); - return ac; - }; - PDFWidgetAnnotation2.prototype.getBorderStyle = function() { - var BS = this.BS(); - if (BS) - return BorderStyle_default.fromDict(BS); - return void 0; - }; - PDFWidgetAnnotation2.prototype.getOrCreateBorderStyle = function() { - var BS = this.BS(); - if (BS) - return BorderStyle_default.fromDict(BS); - var bs = BorderStyle_default.fromDict(this.dict.context.obj({})); - this.dict.set(PDFName_default.of("BS"), bs.dict); - return bs; - }; - PDFWidgetAnnotation2.prototype.getOnValue = function() { - var _a3; - var normal2 = (_a3 = this.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal; - if (normal2 instanceof PDFDict_default) { - var keys = normal2.keys(); - for (var idx = 0, len = keys.length; idx < len; idx++) { - var key = keys[idx]; - if (key !== PDFName_default.of("Off")) - return key; - } - } - return void 0; - }; - PDFWidgetAnnotation2.fromDict = function(dict) { - return new PDFWidgetAnnotation2(dict); - }; - PDFWidgetAnnotation2.create = function(context, parent) { - var dict = context.obj({ - Type: "Annot", - Subtype: "Widget", - Rect: [0, 0, 0, 0], - Parent: parent - }); - return new PDFWidgetAnnotation2(dict); - }; - return PDFWidgetAnnotation2; - }(PDFAnnotation_default) -); -var PDFWidgetAnnotation_default = PDFWidgetAnnotation; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroTerminal.js -var PDFAcroTerminal = ( - /** @class */ - function(_super) { - __extends(PDFAcroTerminal2, _super); - function PDFAcroTerminal2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroTerminal2.prototype.FT = function() { - var nameOrRef = this.getInheritableAttribute(PDFName_default.of("FT")); - return this.dict.context.lookup(nameOrRef, PDFName_default); - }; - PDFAcroTerminal2.prototype.getWidgets = function() { - var kidDicts = this.Kids(); - if (!kidDicts) - return [PDFWidgetAnnotation_default.fromDict(this.dict)]; - var widgets = new Array(kidDicts.size()); - for (var idx = 0, len = kidDicts.size(); idx < len; idx++) { - var dict = kidDicts.lookup(idx, PDFDict_default); - widgets[idx] = PDFWidgetAnnotation_default.fromDict(dict); - } - return widgets; - }; - PDFAcroTerminal2.prototype.addWidget = function(ref) { - var Kids = this.normalizedEntries().Kids; - Kids.push(ref); - }; - PDFAcroTerminal2.prototype.removeWidget = function(idx) { - var kidDicts = this.Kids(); - if (!kidDicts) { - if (idx !== 0) - throw new IndexOutOfBoundsError(idx, 0, 0); - this.setKids([]); - } else { - if (idx < 0 || idx > kidDicts.size()) { - throw new IndexOutOfBoundsError(idx, 0, kidDicts.size()); - } - kidDicts.remove(idx); - } - }; - PDFAcroTerminal2.prototype.normalizedEntries = function() { - var Kids = this.Kids(); - if (!Kids) { - Kids = this.dict.context.obj([this.ref]); - this.dict.set(PDFName_default.of("Kids"), Kids); - } - return { Kids }; - }; - PDFAcroTerminal2.fromDict = function(dict, ref) { - return new PDFAcroTerminal2(dict, ref); - }; - return PDFAcroTerminal2; - }(PDFAcroField_default) -); -var PDFAcroTerminal_default = PDFAcroTerminal; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroButton.js -var PDFAcroButton = ( - /** @class */ - function(_super) { - __extends(PDFAcroButton2, _super); - function PDFAcroButton2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroButton2.prototype.Opt = function() { - return this.dict.lookupMaybe(PDFName_default.of("Opt"), PDFString_default, PDFHexString_default, PDFArray_default); - }; - PDFAcroButton2.prototype.setOpt = function(opt) { - this.dict.set(PDFName_default.of("Opt"), this.dict.context.obj(opt)); - }; - PDFAcroButton2.prototype.getExportValues = function() { - var opt = this.Opt(); - if (!opt) - return void 0; - if (opt instanceof PDFString_default || opt instanceof PDFHexString_default) { - return [opt]; - } - var values2 = []; - for (var idx = 0, len = opt.size(); idx < len; idx++) { - var value = opt.lookup(idx); - if (value instanceof PDFString_default || value instanceof PDFHexString_default) { - values2.push(value); - } - } - return values2; - }; - PDFAcroButton2.prototype.removeExportValue = function(idx) { - var opt = this.Opt(); - if (!opt) - return; - if (opt instanceof PDFString_default || opt instanceof PDFHexString_default) { - if (idx !== 0) - throw new IndexOutOfBoundsError(idx, 0, 0); - this.setOpt([]); - } else { - if (idx < 0 || idx > opt.size()) { - throw new IndexOutOfBoundsError(idx, 0, opt.size()); - } - opt.remove(idx); - } - }; - PDFAcroButton2.prototype.normalizeExportValues = function() { - var _a3, _b3, _c2, _d; - var exportValues = (_a3 = this.getExportValues()) !== null && _a3 !== void 0 ? _a3 : []; - var Opt = []; - var widgets = this.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var exportVal = (_b3 = exportValues[idx]) !== null && _b3 !== void 0 ? _b3 : PDFHexString_default.fromText((_d = (_c2 = widget.getOnValue()) === null || _c2 === void 0 ? void 0 : _c2.decodeText()) !== null && _d !== void 0 ? _d : ""); - Opt.push(exportVal); - } - this.setOpt(Opt); - }; - PDFAcroButton2.prototype.addOpt = function(opt, useExistingOptIdx) { - var _a3; - this.normalizeExportValues(); - var optText = opt.decodeText(); - var existingIdx; - if (useExistingOptIdx) { - var exportValues = (_a3 = this.getExportValues()) !== null && _a3 !== void 0 ? _a3 : []; - for (var idx = 0, len = exportValues.length; idx < len; idx++) { - var exportVal = exportValues[idx]; - if (exportVal.decodeText() === optText) - existingIdx = idx; - } - } - var Opt = this.Opt(); - Opt.push(opt); - return existingIdx !== null && existingIdx !== void 0 ? existingIdx : Opt.size() - 1; - }; - PDFAcroButton2.prototype.addWidgetWithOpt = function(widget, opt, useExistingOptIdx) { - var optIdx = this.addOpt(opt, useExistingOptIdx); - var apStateValue = PDFName_default.of(String(optIdx)); - this.addWidget(widget); - return apStateValue; - }; - return PDFAcroButton2; - }(PDFAcroTerminal_default) -); -var PDFAcroButton_default = PDFAcroButton; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroCheckBox.js -var PDFAcroCheckBox = ( - /** @class */ - function(_super) { - __extends(PDFAcroCheckBox2, _super); - function PDFAcroCheckBox2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroCheckBox2.prototype.setValue = function(value) { - var _a3; - var onValue = (_a3 = this.getOnValue()) !== null && _a3 !== void 0 ? _a3 : PDFName_default.of("Yes"); - if (value !== onValue && value !== PDFName_default.of("Off")) { - throw new InvalidAcroFieldValueError(); - } - this.dict.set(PDFName_default.of("V"), value); - var widgets = this.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var state2 = widget.getOnValue() === value ? value : PDFName_default.of("Off"); - widget.setAppearanceState(state2); - } - }; - PDFAcroCheckBox2.prototype.getValue = function() { - var v = this.V(); - if (v instanceof PDFName_default) - return v; - return PDFName_default.of("Off"); - }; - PDFAcroCheckBox2.prototype.getOnValue = function() { - var widget = this.getWidgets()[0]; - return widget === null || widget === void 0 ? void 0 : widget.getOnValue(); - }; - PDFAcroCheckBox2.fromDict = function(dict, ref) { - return new PDFAcroCheckBox2(dict, ref); - }; - PDFAcroCheckBox2.create = function(context) { - var dict = context.obj({ - FT: "Btn", - Kids: [] - }); - var ref = context.register(dict); - return new PDFAcroCheckBox2(dict, ref); - }; - return PDFAcroCheckBox2; - }(PDFAcroButton_default) -); -var PDFAcroCheckBox_default = PDFAcroCheckBox; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/flags.js -var flag = function(bitIndex) { - return 1 << bitIndex; -}; -var AcroFieldFlags; -(function(AcroFieldFlags2) { - AcroFieldFlags2[AcroFieldFlags2["ReadOnly"] = flag(1 - 1)] = "ReadOnly"; - AcroFieldFlags2[AcroFieldFlags2["Required"] = flag(2 - 1)] = "Required"; - AcroFieldFlags2[AcroFieldFlags2["NoExport"] = flag(3 - 1)] = "NoExport"; -})(AcroFieldFlags || (AcroFieldFlags = {})); -var AcroButtonFlags; -(function(AcroButtonFlags2) { - AcroButtonFlags2[AcroButtonFlags2["NoToggleToOff"] = flag(15 - 1)] = "NoToggleToOff"; - AcroButtonFlags2[AcroButtonFlags2["Radio"] = flag(16 - 1)] = "Radio"; - AcroButtonFlags2[AcroButtonFlags2["PushButton"] = flag(17 - 1)] = "PushButton"; - AcroButtonFlags2[AcroButtonFlags2["RadiosInUnison"] = flag(26 - 1)] = "RadiosInUnison"; -})(AcroButtonFlags || (AcroButtonFlags = {})); -var AcroTextFlags; -(function(AcroTextFlags2) { - AcroTextFlags2[AcroTextFlags2["Multiline"] = flag(13 - 1)] = "Multiline"; - AcroTextFlags2[AcroTextFlags2["Password"] = flag(14 - 1)] = "Password"; - AcroTextFlags2[AcroTextFlags2["FileSelect"] = flag(21 - 1)] = "FileSelect"; - AcroTextFlags2[AcroTextFlags2["DoNotSpellCheck"] = flag(23 - 1)] = "DoNotSpellCheck"; - AcroTextFlags2[AcroTextFlags2["DoNotScroll"] = flag(24 - 1)] = "DoNotScroll"; - AcroTextFlags2[AcroTextFlags2["Comb"] = flag(25 - 1)] = "Comb"; - AcroTextFlags2[AcroTextFlags2["RichText"] = flag(26 - 1)] = "RichText"; -})(AcroTextFlags || (AcroTextFlags = {})); -var AcroChoiceFlags; -(function(AcroChoiceFlags2) { - AcroChoiceFlags2[AcroChoiceFlags2["Combo"] = flag(18 - 1)] = "Combo"; - AcroChoiceFlags2[AcroChoiceFlags2["Edit"] = flag(19 - 1)] = "Edit"; - AcroChoiceFlags2[AcroChoiceFlags2["Sort"] = flag(20 - 1)] = "Sort"; - AcroChoiceFlags2[AcroChoiceFlags2["MultiSelect"] = flag(22 - 1)] = "MultiSelect"; - AcroChoiceFlags2[AcroChoiceFlags2["DoNotSpellCheck"] = flag(23 - 1)] = "DoNotSpellCheck"; - AcroChoiceFlags2[AcroChoiceFlags2["CommitOnSelChange"] = flag(27 - 1)] = "CommitOnSelChange"; -})(AcroChoiceFlags || (AcroChoiceFlags = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroChoice.js -var PDFAcroChoice = ( - /** @class */ - function(_super) { - __extends(PDFAcroChoice2, _super); - function PDFAcroChoice2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroChoice2.prototype.setValues = function(values2) { - if (this.hasFlag(AcroChoiceFlags.Combo) && !this.hasFlag(AcroChoiceFlags.Edit) && !this.valuesAreValid(values2)) { - throw new InvalidAcroFieldValueError(); - } - if (values2.length === 0) { - this.dict.delete(PDFName_default.of("V")); - } - if (values2.length === 1) { - this.dict.set(PDFName_default.of("V"), values2[0]); - } - if (values2.length > 1) { - if (!this.hasFlag(AcroChoiceFlags.MultiSelect)) { - throw new MultiSelectValueError(); - } - this.dict.set(PDFName_default.of("V"), this.dict.context.obj(values2)); - } - this.updateSelectedIndices(values2); - }; - PDFAcroChoice2.prototype.valuesAreValid = function(values2) { - var options = this.getOptions(); - var _loop_1 = function(idx2, len2) { - var val = values2[idx2].decodeText(); - if (!options.find(function(o) { - return val === (o.display || o.value).decodeText(); - })) { - return { value: false }; - } - }; - for (var idx = 0, len = values2.length; idx < len; idx++) { - var state_1 = _loop_1(idx, len); - if (typeof state_1 === "object") - return state_1.value; - } - return true; - }; - PDFAcroChoice2.prototype.updateSelectedIndices = function(values2) { - if (values2.length > 1) { - var indices = new Array(values2.length); - var options = this.getOptions(); - var _loop_2 = function(idx2, len2) { - var val = values2[idx2].decodeText(); - indices[idx2] = options.findIndex(function(o) { - return val === (o.display || o.value).decodeText(); - }); - }; - for (var idx = 0, len = values2.length; idx < len; idx++) { - _loop_2(idx, len); - } - this.dict.set(PDFName_default.of("I"), this.dict.context.obj(indices.sort())); - } else { - this.dict.delete(PDFName_default.of("I")); - } - }; - PDFAcroChoice2.prototype.getValues = function() { - var v = this.V(); - if (v instanceof PDFString_default || v instanceof PDFHexString_default) - return [v]; - if (v instanceof PDFArray_default) { - var values2 = []; - for (var idx = 0, len = v.size(); idx < len; idx++) { - var value = v.lookup(idx); - if (value instanceof PDFString_default || value instanceof PDFHexString_default) { - values2.push(value); - } - } - return values2; - } - return []; - }; - PDFAcroChoice2.prototype.Opt = function() { - return this.dict.lookupMaybe(PDFName_default.of("Opt"), PDFString_default, PDFHexString_default, PDFArray_default); - }; - PDFAcroChoice2.prototype.setOptions = function(options) { - var newOpt = new Array(options.length); - for (var idx = 0, len = options.length; idx < len; idx++) { - var _a3 = options[idx], value = _a3.value, display = _a3.display; - newOpt[idx] = this.dict.context.obj([value, display || value]); - } - this.dict.set(PDFName_default.of("Opt"), this.dict.context.obj(newOpt)); - }; - PDFAcroChoice2.prototype.getOptions = function() { - var Opt = this.Opt(); - if (Opt instanceof PDFString_default || Opt instanceof PDFHexString_default) { - return [{ value: Opt, display: Opt }]; - } - if (Opt instanceof PDFArray_default) { - var res = []; - for (var idx = 0, len = Opt.size(); idx < len; idx++) { - var item = Opt.lookup(idx); - if (item instanceof PDFString_default || item instanceof PDFHexString_default) { - res.push({ value: item, display: item }); - } - if (item instanceof PDFArray_default) { - if (item.size() > 0) { - var first = item.lookup(0, PDFString_default, PDFHexString_default); - var second = item.lookupMaybe(1, PDFString_default, PDFHexString_default); - res.push({ value: first, display: second || first }); - } - } - } - return res; - } - return []; - }; - return PDFAcroChoice2; - }(PDFAcroTerminal_default) -); -var PDFAcroChoice_default = PDFAcroChoice; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroComboBox.js -var PDFAcroComboBox = ( - /** @class */ - function(_super) { - __extends(PDFAcroComboBox2, _super); - function PDFAcroComboBox2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroComboBox2.fromDict = function(dict, ref) { - return new PDFAcroComboBox2(dict, ref); - }; - PDFAcroComboBox2.create = function(context) { - var dict = context.obj({ - FT: "Ch", - Ff: AcroChoiceFlags.Combo, - Kids: [] - }); - var ref = context.register(dict); - return new PDFAcroComboBox2(dict, ref); - }; - return PDFAcroComboBox2; - }(PDFAcroChoice_default) -); -var PDFAcroComboBox_default = PDFAcroComboBox; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroNonTerminal.js -var PDFAcroNonTerminal = ( - /** @class */ - function(_super) { - __extends(PDFAcroNonTerminal2, _super); - function PDFAcroNonTerminal2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroNonTerminal2.prototype.addField = function(field) { - var Kids = this.normalizedEntries().Kids; - Kids === null || Kids === void 0 ? void 0 : Kids.push(field); - }; - PDFAcroNonTerminal2.prototype.normalizedEntries = function() { - var Kids = this.Kids(); - if (!Kids) { - Kids = this.dict.context.obj([]); - this.dict.set(PDFName_default.of("Kids"), Kids); - } - return { Kids }; - }; - PDFAcroNonTerminal2.fromDict = function(dict, ref) { - return new PDFAcroNonTerminal2(dict, ref); - }; - PDFAcroNonTerminal2.create = function(context) { - var dict = context.obj({}); - var ref = context.register(dict); - return new PDFAcroNonTerminal2(dict, ref); - }; - return PDFAcroNonTerminal2; - }(PDFAcroField_default) -); -var PDFAcroNonTerminal_default = PDFAcroNonTerminal; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroSignature.js -var PDFAcroSignature = ( - /** @class */ - function(_super) { - __extends(PDFAcroSignature2, _super); - function PDFAcroSignature2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroSignature2.fromDict = function(dict, ref) { - return new PDFAcroSignature2(dict, ref); - }; - return PDFAcroSignature2; - }(PDFAcroTerminal_default) -); -var PDFAcroSignature_default = PDFAcroSignature; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroText.js -var PDFAcroText = ( - /** @class */ - function(_super) { - __extends(PDFAcroText2, _super); - function PDFAcroText2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroText2.prototype.MaxLen = function() { - var maxLen = this.dict.lookup(PDFName_default.of("MaxLen")); - if (maxLen instanceof PDFNumber_default) - return maxLen; - return void 0; - }; - PDFAcroText2.prototype.Q = function() { - var q = this.dict.lookup(PDFName_default.of("Q")); - if (q instanceof PDFNumber_default) - return q; - return void 0; - }; - PDFAcroText2.prototype.setMaxLength = function(maxLength) { - this.dict.set(PDFName_default.of("MaxLen"), PDFNumber_default.of(maxLength)); - }; - PDFAcroText2.prototype.removeMaxLength = function() { - this.dict.delete(PDFName_default.of("MaxLen")); - }; - PDFAcroText2.prototype.getMaxLength = function() { - var _a3; - return (_a3 = this.MaxLen()) === null || _a3 === void 0 ? void 0 : _a3.asNumber(); - }; - PDFAcroText2.prototype.setQuadding = function(quadding) { - this.dict.set(PDFName_default.of("Q"), PDFNumber_default.of(quadding)); - }; - PDFAcroText2.prototype.getQuadding = function() { - var _a3; - return (_a3 = this.Q()) === null || _a3 === void 0 ? void 0 : _a3.asNumber(); - }; - PDFAcroText2.prototype.setValue = function(value) { - this.dict.set(PDFName_default.of("V"), value); - }; - PDFAcroText2.prototype.removeValue = function() { - this.dict.delete(PDFName_default.of("V")); - }; - PDFAcroText2.prototype.getValue = function() { - var v = this.V(); - if (v instanceof PDFString_default || v instanceof PDFHexString_default) - return v; - return void 0; - }; - PDFAcroText2.fromDict = function(dict, ref) { - return new PDFAcroText2(dict, ref); - }; - PDFAcroText2.create = function(context) { - var dict = context.obj({ - FT: "Tx", - Kids: [] - }); - var ref = context.register(dict); - return new PDFAcroText2(dict, ref); - }; - return PDFAcroText2; - }(PDFAcroTerminal_default) -); -var PDFAcroText_default = PDFAcroText; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroPushButton.js -var PDFAcroPushButton = ( - /** @class */ - function(_super) { - __extends(PDFAcroPushButton2, _super); - function PDFAcroPushButton2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroPushButton2.fromDict = function(dict, ref) { - return new PDFAcroPushButton2(dict, ref); - }; - PDFAcroPushButton2.create = function(context) { - var dict = context.obj({ - FT: "Btn", - Ff: AcroButtonFlags.PushButton, - Kids: [] - }); - var ref = context.register(dict); - return new PDFAcroPushButton2(dict, ref); - }; - return PDFAcroPushButton2; - }(PDFAcroButton_default) -); -var PDFAcroPushButton_default = PDFAcroPushButton; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroRadioButton.js -var PDFAcroRadioButton = ( - /** @class */ - function(_super) { - __extends(PDFAcroRadioButton2, _super); - function PDFAcroRadioButton2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroRadioButton2.prototype.setValue = function(value) { - var onValues = this.getOnValues(); - if (!onValues.includes(value) && value !== PDFName_default.of("Off")) { - throw new InvalidAcroFieldValueError(); - } - this.dict.set(PDFName_default.of("V"), value); - var widgets = this.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var state2 = widget.getOnValue() === value ? value : PDFName_default.of("Off"); - widget.setAppearanceState(state2); - } - }; - PDFAcroRadioButton2.prototype.getValue = function() { - var v = this.V(); - if (v instanceof PDFName_default) - return v; - return PDFName_default.of("Off"); - }; - PDFAcroRadioButton2.prototype.getOnValues = function() { - var widgets = this.getWidgets(); - var onValues = []; - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var onValue = widgets[idx].getOnValue(); - if (onValue) - onValues.push(onValue); - } - return onValues; - }; - PDFAcroRadioButton2.fromDict = function(dict, ref) { - return new PDFAcroRadioButton2(dict, ref); - }; - PDFAcroRadioButton2.create = function(context) { - var dict = context.obj({ - FT: "Btn", - Ff: AcroButtonFlags.Radio, - Kids: [] - }); - var ref = context.register(dict); - return new PDFAcroRadioButton2(dict, ref); - }; - return PDFAcroRadioButton2; - }(PDFAcroButton_default) -); -var PDFAcroRadioButton_default = PDFAcroRadioButton; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroListBox.js -var PDFAcroListBox = ( - /** @class */ - function(_super) { - __extends(PDFAcroListBox2, _super); - function PDFAcroListBox2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFAcroListBox2.fromDict = function(dict, ref) { - return new PDFAcroListBox2(dict, ref); - }; - PDFAcroListBox2.create = function(context) { - var dict = context.obj({ - FT: "Ch", - Kids: [] - }); - var ref = context.register(dict); - return new PDFAcroListBox2(dict, ref); - }; - return PDFAcroListBox2; - }(PDFAcroChoice_default) -); -var PDFAcroListBox_default = PDFAcroListBox; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/utils.js -var createPDFAcroFields = function(kidDicts) { - if (!kidDicts) - return []; - var kids = []; - for (var idx = 0, len = kidDicts.size(); idx < len; idx++) { - var ref = kidDicts.get(idx); - var dict = kidDicts.lookup(idx); - if (ref instanceof PDFRef_default && dict instanceof PDFDict_default) { - kids.push([createPDFAcroField(dict, ref), ref]); - } - } - return kids; -}; -var createPDFAcroField = function(dict, ref) { - var isNonTerminal = isNonTerminalAcroField(dict); - if (isNonTerminal) - return PDFAcroNonTerminal_default.fromDict(dict, ref); - return createPDFAcroTerminal(dict, ref); -}; -var isNonTerminalAcroField = function(dict) { - var kids = dict.lookup(PDFName_default.of("Kids")); - if (kids instanceof PDFArray_default) { - for (var idx = 0, len = kids.size(); idx < len; idx++) { - var kid = kids.lookup(idx); - var kidIsField = kid instanceof PDFDict_default && kid.has(PDFName_default.of("T")); - if (kidIsField) - return true; - } - } - return false; -}; -var createPDFAcroTerminal = function(dict, ref) { - var ftNameOrRef = getInheritableAttribute(dict, PDFName_default.of("FT")); - var type = dict.context.lookup(ftNameOrRef, PDFName_default); - if (type === PDFName_default.of("Btn")) - return createPDFAcroButton(dict, ref); - if (type === PDFName_default.of("Ch")) - return createPDFAcroChoice(dict, ref); - if (type === PDFName_default.of("Tx")) - return PDFAcroText_default.fromDict(dict, ref); - if (type === PDFName_default.of("Sig")) - return PDFAcroSignature_default.fromDict(dict, ref); - return PDFAcroTerminal_default.fromDict(dict, ref); -}; -var createPDFAcroButton = function(dict, ref) { - var _a3; - var ffNumberOrRef = getInheritableAttribute(dict, PDFName_default.of("Ff")); - var ffNumber = dict.context.lookupMaybe(ffNumberOrRef, PDFNumber_default); - var flags = (_a3 = ffNumber === null || ffNumber === void 0 ? void 0 : ffNumber.asNumber()) !== null && _a3 !== void 0 ? _a3 : 0; - if (flagIsSet(flags, AcroButtonFlags.PushButton)) { - return PDFAcroPushButton_default.fromDict(dict, ref); - } else if (flagIsSet(flags, AcroButtonFlags.Radio)) { - return PDFAcroRadioButton_default.fromDict(dict, ref); - } else { - return PDFAcroCheckBox_default.fromDict(dict, ref); - } -}; -var createPDFAcroChoice = function(dict, ref) { - var _a3; - var ffNumberOrRef = getInheritableAttribute(dict, PDFName_default.of("Ff")); - var ffNumber = dict.context.lookupMaybe(ffNumberOrRef, PDFNumber_default); - var flags = (_a3 = ffNumber === null || ffNumber === void 0 ? void 0 : ffNumber.asNumber()) !== null && _a3 !== void 0 ? _a3 : 0; - if (flagIsSet(flags, AcroChoiceFlags.Combo)) { - return PDFAcroComboBox_default.fromDict(dict, ref); - } else { - return PDFAcroListBox_default.fromDict(dict, ref); - } -}; -var flagIsSet = function(flags, flag3) { - return (flags & flag3) !== 0; -}; -var getInheritableAttribute = function(startNode, name) { - var attribute; - ascend(startNode, function(node) { - if (!attribute) - attribute = node.get(name); - }); - return attribute; -}; -var ascend = function(startNode, visitor) { - visitor(startNode); - var Parent = startNode.lookupMaybe(PDFName_default.of("Parent"), PDFDict_default); - if (Parent) - ascend(Parent, visitor); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/acroform/PDFAcroForm.js -var PDFAcroForm = ( - /** @class */ - function() { - function PDFAcroForm2(dict) { - this.dict = dict; - } - PDFAcroForm2.prototype.Fields = function() { - var fields = this.dict.lookup(PDFName_default.of("Fields")); - if (fields instanceof PDFArray_default) - return fields; - return void 0; - }; - PDFAcroForm2.prototype.getFields = function() { - var Fields = this.normalizedEntries().Fields; - var fields = new Array(Fields.size()); - for (var idx = 0, len = Fields.size(); idx < len; idx++) { - var ref = Fields.get(idx); - var dict = Fields.lookup(idx, PDFDict_default); - fields[idx] = [createPDFAcroField(dict, ref), ref]; - } - return fields; - }; - PDFAcroForm2.prototype.getAllFields = function() { - var allFields = []; - var pushFields = function(fields) { - if (!fields) - return; - for (var idx = 0, len = fields.length; idx < len; idx++) { - var field = fields[idx]; - allFields.push(field); - var fieldModel = field[0]; - if (fieldModel instanceof PDFAcroNonTerminal_default) { - pushFields(createPDFAcroFields(fieldModel.Kids())); - } - } - }; - pushFields(this.getFields()); - return allFields; - }; - PDFAcroForm2.prototype.addField = function(field) { - var Fields = this.normalizedEntries().Fields; - Fields === null || Fields === void 0 ? void 0 : Fields.push(field); - }; - PDFAcroForm2.prototype.removeField = function(field) { - var parent = field.getParent(); - var fields = parent === void 0 ? this.normalizedEntries().Fields : parent.Kids(); - var index2 = fields === null || fields === void 0 ? void 0 : fields.indexOf(field.ref); - if (fields === void 0 || index2 === void 0) { - throw new Error("Tried to remove inexistent field " + field.getFullyQualifiedName()); - } - fields.remove(index2); - if (parent !== void 0 && fields.size() === 0) { - this.removeField(parent); - } - }; - PDFAcroForm2.prototype.normalizedEntries = function() { - var Fields = this.Fields(); - if (!Fields) { - Fields = this.dict.context.obj([]); - this.dict.set(PDFName_default.of("Fields"), Fields); - } - return { Fields }; - }; - PDFAcroForm2.fromDict = function(dict) { - return new PDFAcroForm2(dict); - }; - PDFAcroForm2.create = function(context) { - var dict = context.obj({ Fields: [] }); - return new PDFAcroForm2(dict); - }; - return PDFAcroForm2; - }() -); -var PDFAcroForm_default = PDFAcroForm; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFCatalog.js -var PDFCatalog = ( - /** @class */ - function(_super) { - __extends(PDFCatalog2, _super); - function PDFCatalog2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFCatalog2.prototype.Pages = function() { - return this.lookup(PDFName_default.of("Pages"), PDFDict_default); - }; - PDFCatalog2.prototype.AcroForm = function() { - return this.lookupMaybe(PDFName_default.of("AcroForm"), PDFDict_default); - }; - PDFCatalog2.prototype.getAcroForm = function() { - var dict = this.AcroForm(); - if (!dict) - return void 0; - return PDFAcroForm_default.fromDict(dict); - }; - PDFCatalog2.prototype.getOrCreateAcroForm = function() { - var acroForm = this.getAcroForm(); - if (!acroForm) { - acroForm = PDFAcroForm_default.create(this.context); - var acroFormRef = this.context.register(acroForm.dict); - this.set(PDFName_default.of("AcroForm"), acroFormRef); - } - return acroForm; - }; - PDFCatalog2.prototype.ViewerPreferences = function() { - return this.lookupMaybe(PDFName_default.of("ViewerPreferences"), PDFDict_default); - }; - PDFCatalog2.prototype.getViewerPreferences = function() { - var dict = this.ViewerPreferences(); - if (!dict) - return void 0; - return ViewerPreferences_default.fromDict(dict); - }; - PDFCatalog2.prototype.getOrCreateViewerPreferences = function() { - var viewerPrefs = this.getViewerPreferences(); - if (!viewerPrefs) { - viewerPrefs = ViewerPreferences_default.create(this.context); - var viewerPrefsRef = this.context.register(viewerPrefs.dict); - this.set(PDFName_default.of("ViewerPreferences"), viewerPrefsRef); - } - return viewerPrefs; - }; - PDFCatalog2.prototype.insertLeafNode = function(leafRef, index2) { - var pagesRef = this.get(PDFName_default.of("Pages")); - var maybeParentRef = this.Pages().insertLeafNode(leafRef, index2); - return maybeParentRef || pagesRef; - }; - PDFCatalog2.prototype.removeLeafNode = function(index2) { - this.Pages().removeLeafNode(index2); - }; - PDFCatalog2.withContextAndPages = function(context, pages) { - var dict = /* @__PURE__ */ new Map(); - dict.set(PDFName_default.of("Type"), PDFName_default.of("Catalog")); - dict.set(PDFName_default.of("Pages"), pages); - return new PDFCatalog2(dict, context); - }; - PDFCatalog2.fromMapWithContext = function(map, context) { - return new PDFCatalog2(map, context); - }; - return PDFCatalog2; - }(PDFDict_default) -); -var PDFCatalog_default = PDFCatalog; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/structures/PDFPageTree.js -var PDFPageTree = ( - /** @class */ - function(_super) { - __extends(PDFPageTree2, _super); - function PDFPageTree2() { - return _super !== null && _super.apply(this, arguments) || this; - } - PDFPageTree2.prototype.Parent = function() { - return this.lookup(PDFName_default.of("Parent")); - }; - PDFPageTree2.prototype.Kids = function() { - return this.lookup(PDFName_default.of("Kids"), PDFArray_default); - }; - PDFPageTree2.prototype.Count = function() { - return this.lookup(PDFName_default.of("Count"), PDFNumber_default); - }; - PDFPageTree2.prototype.pushTreeNode = function(treeRef) { - var Kids = this.Kids(); - Kids.push(treeRef); - }; - PDFPageTree2.prototype.pushLeafNode = function(leafRef) { - var Kids = this.Kids(); - this.insertLeafKid(Kids.size(), leafRef); - }; - PDFPageTree2.prototype.insertLeafNode = function(leafRef, targetIndex) { - var Kids = this.Kids(); - var Count = this.Count().asNumber(); - if (targetIndex > Count) { - throw new InvalidTargetIndexError(targetIndex, Count); - } - var leafsRemainingUntilTarget = targetIndex; - for (var idx = 0, len = Kids.size(); idx < len; idx++) { - if (leafsRemainingUntilTarget === 0) { - this.insertLeafKid(idx, leafRef); - return void 0; - } - var kidRef = Kids.get(idx); - var kid = this.context.lookup(kidRef); - if (kid instanceof PDFPageTree2) { - if (kid.Count().asNumber() > leafsRemainingUntilTarget) { - return kid.insertLeafNode(leafRef, leafsRemainingUntilTarget) || kidRef; - } else { - leafsRemainingUntilTarget -= kid.Count().asNumber(); - } - } - if (kid instanceof PDFPageLeaf_default) { - leafsRemainingUntilTarget -= 1; - } - } - if (leafsRemainingUntilTarget === 0) { - this.insertLeafKid(Kids.size(), leafRef); - return void 0; - } - throw new CorruptPageTreeError(targetIndex, "insertLeafNode"); - }; - PDFPageTree2.prototype.removeLeafNode = function(targetIndex, prune) { - if (prune === void 0) { - prune = true; - } - var Kids = this.Kids(); - var Count = this.Count().asNumber(); - if (targetIndex >= Count) { - throw new InvalidTargetIndexError(targetIndex, Count); - } - var leafsRemainingUntilTarget = targetIndex; - for (var idx = 0, len = Kids.size(); idx < len; idx++) { - var kidRef = Kids.get(idx); - var kid = this.context.lookup(kidRef); - if (kid instanceof PDFPageTree2) { - if (kid.Count().asNumber() > leafsRemainingUntilTarget) { - kid.removeLeafNode(leafsRemainingUntilTarget, prune); - if (prune && kid.Kids().size() === 0) - Kids.remove(idx); - return; - } else { - leafsRemainingUntilTarget -= kid.Count().asNumber(); - } - } - if (kid instanceof PDFPageLeaf_default) { - if (leafsRemainingUntilTarget === 0) { - this.removeKid(idx); - return; - } else { - leafsRemainingUntilTarget -= 1; - } - } - } - throw new CorruptPageTreeError(targetIndex, "removeLeafNode"); - }; - PDFPageTree2.prototype.ascend = function(visitor) { - visitor(this); - var Parent = this.Parent(); - if (Parent) - Parent.ascend(visitor); - }; - PDFPageTree2.prototype.traverse = function(visitor) { - var Kids = this.Kids(); - for (var idx = 0, len = Kids.size(); idx < len; idx++) { - var kidRef = Kids.get(idx); - var kid = this.context.lookup(kidRef); - if (kid instanceof PDFPageTree2) - kid.traverse(visitor); - visitor(kid, kidRef); - } - }; - PDFPageTree2.prototype.insertLeafKid = function(kidIdx, leafRef) { - var Kids = this.Kids(); - this.ascend(function(node) { - var newCount = node.Count().asNumber() + 1; - node.set(PDFName_default.of("Count"), PDFNumber_default.of(newCount)); - }); - Kids.insert(kidIdx, leafRef); - }; - PDFPageTree2.prototype.removeKid = function(kidIdx) { - var Kids = this.Kids(); - var kid = Kids.lookup(kidIdx); - if (kid instanceof PDFPageLeaf_default) { - this.ascend(function(node) { - var newCount = node.Count().asNumber() - 1; - node.set(PDFName_default.of("Count"), PDFNumber_default.of(newCount)); - }); - } - Kids.remove(kidIdx); - }; - PDFPageTree2.withContext = function(context, parent) { - var dict = /* @__PURE__ */ new Map(); - dict.set(PDFName_default.of("Type"), PDFName_default.of("Pages")); - dict.set(PDFName_default.of("Kids"), context.obj([])); - dict.set(PDFName_default.of("Count"), context.obj(0)); - if (parent) - dict.set(PDFName_default.of("Parent"), parent); - return new PDFPageTree2(dict, context); - }; - PDFPageTree2.fromMapWithContext = function(map, context) { - return new PDFPageTree2(map, context); - }; - return PDFPageTree2; - }(PDFDict_default) -); -var PDFPageTree_default = PDFPageTree; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/syntax/Numeric.js -var IsDigit = new Uint8Array(256); -IsDigit[CharCodes_default.Zero] = 1; -IsDigit[CharCodes_default.One] = 1; -IsDigit[CharCodes_default.Two] = 1; -IsDigit[CharCodes_default.Three] = 1; -IsDigit[CharCodes_default.Four] = 1; -IsDigit[CharCodes_default.Five] = 1; -IsDigit[CharCodes_default.Six] = 1; -IsDigit[CharCodes_default.Seven] = 1; -IsDigit[CharCodes_default.Eight] = 1; -IsDigit[CharCodes_default.Nine] = 1; -var IsNumericPrefix = new Uint8Array(256); -IsNumericPrefix[CharCodes_default.Period] = 1; -IsNumericPrefix[CharCodes_default.Plus] = 1; -IsNumericPrefix[CharCodes_default.Minus] = 1; -var IsNumeric = new Uint8Array(256); -for (idx = 0, len = 256; idx < len; idx++) { - IsNumeric[idx] = IsDigit[idx] || IsNumericPrefix[idx] ? 1 : 0; -} -var idx; -var len; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/parser/BaseParser.js -var Newline = CharCodes_default.Newline; -var CarriageReturn = CharCodes_default.CarriageReturn; -var BaseParser = ( - /** @class */ - function() { - function BaseParser2(bytes, capNumbers) { - if (capNumbers === void 0) { - capNumbers = false; - } - this.bytes = bytes; - this.capNumbers = capNumbers; - } - BaseParser2.prototype.parseRawInt = function() { - var value = ""; - while (!this.bytes.done()) { - var byte = this.bytes.peek(); - if (!IsDigit[byte]) - break; - value += charFromCode(this.bytes.next()); - } - var numberValue = Number(value); - if (!value || !isFinite(numberValue)) { - throw new NumberParsingError(this.bytes.position(), value); - } - return numberValue; - }; - BaseParser2.prototype.parseRawNumber = function() { - var value = ""; - while (!this.bytes.done()) { - var byte = this.bytes.peek(); - if (!IsNumeric[byte]) - break; - value += charFromCode(this.bytes.next()); - if (byte === CharCodes_default.Period) - break; - } - while (!this.bytes.done()) { - var byte = this.bytes.peek(); - if (!IsDigit[byte]) - break; - value += charFromCode(this.bytes.next()); - } - var numberValue = Number(value); - if (!value || !isFinite(numberValue)) { - throw new NumberParsingError(this.bytes.position(), value); - } - if (numberValue > Number.MAX_SAFE_INTEGER) { - if (this.capNumbers) { - var msg = "Parsed number that is too large for some PDF readers: " + value + ", using Number.MAX_SAFE_INTEGER instead."; - console.warn(msg); - return Number.MAX_SAFE_INTEGER; - } else { - var msg = "Parsed number that is too large for some PDF readers: " + value + ", not capping."; - console.warn(msg); - } - } - return numberValue; - }; - BaseParser2.prototype.skipWhitespace = function() { - while (!this.bytes.done() && IsWhitespace[this.bytes.peek()]) { - this.bytes.next(); - } - }; - BaseParser2.prototype.skipLine = function() { - while (!this.bytes.done()) { - var byte = this.bytes.peek(); - if (byte === Newline || byte === CarriageReturn) - return; - this.bytes.next(); - } - }; - BaseParser2.prototype.skipComment = function() { - if (this.bytes.peek() !== CharCodes_default.Percent) - return false; - while (!this.bytes.done()) { - var byte = this.bytes.peek(); - if (byte === Newline || byte === CarriageReturn) - return true; - this.bytes.next(); - } - return true; - }; - BaseParser2.prototype.skipWhitespaceAndComments = function() { - this.skipWhitespace(); - while (this.skipComment()) - this.skipWhitespace(); - }; - BaseParser2.prototype.matchKeyword = function(keyword) { - var initialOffset = this.bytes.offset(); - for (var idx = 0, len = keyword.length; idx < len; idx++) { - if (this.bytes.done() || this.bytes.next() !== keyword[idx]) { - this.bytes.moveTo(initialOffset); - return false; - } - } - return true; - }; - return BaseParser2; - }() -); -var BaseParser_default = BaseParser; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/parser/ByteStream.js -var ByteStream = ( - /** @class */ - function() { - function ByteStream2(bytes) { - this.idx = 0; - this.line = 0; - this.column = 0; - this.bytes = bytes; - this.length = this.bytes.length; - } - ByteStream2.prototype.moveTo = function(offset) { - this.idx = offset; - }; - ByteStream2.prototype.next = function() { - var byte = this.bytes[this.idx++]; - if (byte === CharCodes_default.Newline) { - this.line += 1; - this.column = 0; - } else { - this.column += 1; - } - return byte; - }; - ByteStream2.prototype.assertNext = function(expected) { - if (this.peek() !== expected) { - throw new NextByteAssertionError(this.position(), expected, this.peek()); - } - return this.next(); - }; - ByteStream2.prototype.peek = function() { - return this.bytes[this.idx]; - }; - ByteStream2.prototype.peekAhead = function(steps) { - return this.bytes[this.idx + steps]; - }; - ByteStream2.prototype.peekAt = function(offset) { - return this.bytes[offset]; - }; - ByteStream2.prototype.done = function() { - return this.idx >= this.length; - }; - ByteStream2.prototype.offset = function() { - return this.idx; - }; - ByteStream2.prototype.slice = function(start, end) { - return this.bytes.slice(start, end); - }; - ByteStream2.prototype.position = function() { - return { line: this.line, column: this.column, offset: this.idx }; - }; - ByteStream2.of = function(bytes) { - return new ByteStream2(bytes); - }; - ByteStream2.fromPDFRawStream = function(rawStream) { - return ByteStream2.of(decodePDFRawStream(rawStream).decode()); - }; - return ByteStream2; - }() -); -var ByteStream_default = ByteStream; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/syntax/Keywords.js -var Space = CharCodes_default.Space; -var CarriageReturn2 = CharCodes_default.CarriageReturn; -var Newline2 = CharCodes_default.Newline; -var stream = [ - CharCodes_default.s, - CharCodes_default.t, - CharCodes_default.r, - CharCodes_default.e, - CharCodes_default.a, - CharCodes_default.m -]; -var endstream = [ - CharCodes_default.e, - CharCodes_default.n, - CharCodes_default.d, - CharCodes_default.s, - CharCodes_default.t, - CharCodes_default.r, - CharCodes_default.e, - CharCodes_default.a, - CharCodes_default.m -]; -var Keywords = { - header: [ - CharCodes_default.Percent, - CharCodes_default.P, - CharCodes_default.D, - CharCodes_default.F, - CharCodes_default.Dash - ], - eof: [ - CharCodes_default.Percent, - CharCodes_default.Percent, - CharCodes_default.E, - CharCodes_default.O, - CharCodes_default.F - ], - obj: [CharCodes_default.o, CharCodes_default.b, CharCodes_default.j], - endobj: [ - CharCodes_default.e, - CharCodes_default.n, - CharCodes_default.d, - CharCodes_default.o, - CharCodes_default.b, - CharCodes_default.j - ], - xref: [CharCodes_default.x, CharCodes_default.r, CharCodes_default.e, CharCodes_default.f], - trailer: [ - CharCodes_default.t, - CharCodes_default.r, - CharCodes_default.a, - CharCodes_default.i, - CharCodes_default.l, - CharCodes_default.e, - CharCodes_default.r - ], - startxref: [ - CharCodes_default.s, - CharCodes_default.t, - CharCodes_default.a, - CharCodes_default.r, - CharCodes_default.t, - CharCodes_default.x, - CharCodes_default.r, - CharCodes_default.e, - CharCodes_default.f - ], - true: [CharCodes_default.t, CharCodes_default.r, CharCodes_default.u, CharCodes_default.e], - false: [CharCodes_default.f, CharCodes_default.a, CharCodes_default.l, CharCodes_default.s, CharCodes_default.e], - null: [CharCodes_default.n, CharCodes_default.u, CharCodes_default.l, CharCodes_default.l], - stream, - streamEOF1: __spreadArrays(stream, [Space, CarriageReturn2, Newline2]), - streamEOF2: __spreadArrays(stream, [CarriageReturn2, Newline2]), - streamEOF3: __spreadArrays(stream, [CarriageReturn2]), - streamEOF4: __spreadArrays(stream, [Newline2]), - endstream, - EOF1endstream: __spreadArrays([CarriageReturn2, Newline2], endstream), - EOF2endstream: __spreadArrays([CarriageReturn2], endstream), - EOF3endstream: __spreadArrays([Newline2], endstream) -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/parser/PDFObjectParser.js -var PDFObjectParser = ( - /** @class */ - function(_super) { - __extends(PDFObjectParser2, _super); - function PDFObjectParser2(byteStream, context, capNumbers) { - if (capNumbers === void 0) { - capNumbers = false; - } - var _this = _super.call(this, byteStream, capNumbers) || this; - _this.context = context; - return _this; - } - PDFObjectParser2.prototype.parseObject = function() { - this.skipWhitespaceAndComments(); - if (this.matchKeyword(Keywords.true)) - return PDFBool_default.True; - if (this.matchKeyword(Keywords.false)) - return PDFBool_default.False; - if (this.matchKeyword(Keywords.null)) - return PDFNull_default; - var byte = this.bytes.peek(); - if (byte === CharCodes_default.LessThan && this.bytes.peekAhead(1) === CharCodes_default.LessThan) { - return this.parseDictOrStream(); - } - if (byte === CharCodes_default.LessThan) - return this.parseHexString(); - if (byte === CharCodes_default.LeftParen) - return this.parseString(); - if (byte === CharCodes_default.ForwardSlash) - return this.parseName(); - if (byte === CharCodes_default.LeftSquareBracket) - return this.parseArray(); - if (IsNumeric[byte]) - return this.parseNumberOrRef(); - throw new PDFObjectParsingError(this.bytes.position(), byte); - }; - PDFObjectParser2.prototype.parseNumberOrRef = function() { - var firstNum = this.parseRawNumber(); - this.skipWhitespaceAndComments(); - var lookaheadStart = this.bytes.offset(); - if (IsDigit[this.bytes.peek()]) { - var secondNum = this.parseRawNumber(); - this.skipWhitespaceAndComments(); - if (this.bytes.peek() === CharCodes_default.R) { - this.bytes.assertNext(CharCodes_default.R); - return PDFRef_default.of(firstNum, secondNum); - } - } - this.bytes.moveTo(lookaheadStart); - return PDFNumber_default.of(firstNum); - }; - PDFObjectParser2.prototype.parseHexString = function() { - var value = ""; - this.bytes.assertNext(CharCodes_default.LessThan); - while (!this.bytes.done() && this.bytes.peek() !== CharCodes_default.GreaterThan) { - value += charFromCode(this.bytes.next()); - } - this.bytes.assertNext(CharCodes_default.GreaterThan); - return PDFHexString_default.of(value); - }; - PDFObjectParser2.prototype.parseString = function() { - var nestingLvl = 0; - var isEscaped = false; - var value = ""; - while (!this.bytes.done()) { - var byte = this.bytes.next(); - value += charFromCode(byte); - if (!isEscaped) { - if (byte === CharCodes_default.LeftParen) - nestingLvl += 1; - if (byte === CharCodes_default.RightParen) - nestingLvl -= 1; - } - if (byte === CharCodes_default.BackSlash) { - isEscaped = !isEscaped; - } else if (isEscaped) { - isEscaped = false; - } - if (nestingLvl === 0) { - return PDFString_default.of(value.substring(1, value.length - 1)); - } - } - throw new UnbalancedParenthesisError(this.bytes.position()); - }; - PDFObjectParser2.prototype.parseName = function() { - this.bytes.assertNext(CharCodes_default.ForwardSlash); - var name = ""; - while (!this.bytes.done()) { - var byte = this.bytes.peek(); - if (IsWhitespace[byte] || IsDelimiter[byte]) - break; - name += charFromCode(byte); - this.bytes.next(); - } - return PDFName_default.of(name); - }; - PDFObjectParser2.prototype.parseArray = function() { - this.bytes.assertNext(CharCodes_default.LeftSquareBracket); - this.skipWhitespaceAndComments(); - var pdfArray = PDFArray_default.withContext(this.context); - while (this.bytes.peek() !== CharCodes_default.RightSquareBracket) { - var element2 = this.parseObject(); - pdfArray.push(element2); - this.skipWhitespaceAndComments(); - } - this.bytes.assertNext(CharCodes_default.RightSquareBracket); - return pdfArray; - }; - PDFObjectParser2.prototype.parseDict = function() { - this.bytes.assertNext(CharCodes_default.LessThan); - this.bytes.assertNext(CharCodes_default.LessThan); - this.skipWhitespaceAndComments(); - var dict = /* @__PURE__ */ new Map(); - while (!this.bytes.done() && this.bytes.peek() !== CharCodes_default.GreaterThan && this.bytes.peekAhead(1) !== CharCodes_default.GreaterThan) { - var key = this.parseName(); - var value = this.parseObject(); - dict.set(key, value); - this.skipWhitespaceAndComments(); - } - this.skipWhitespaceAndComments(); - this.bytes.assertNext(CharCodes_default.GreaterThan); - this.bytes.assertNext(CharCodes_default.GreaterThan); - var Type = dict.get(PDFName_default.of("Type")); - if (Type === PDFName_default.of("Catalog")) { - return PDFCatalog_default.fromMapWithContext(dict, this.context); - } else if (Type === PDFName_default.of("Pages")) { - return PDFPageTree_default.fromMapWithContext(dict, this.context); - } else if (Type === PDFName_default.of("Page")) { - return PDFPageLeaf_default.fromMapWithContext(dict, this.context); - } else { - return PDFDict_default.fromMapWithContext(dict, this.context); - } - }; - PDFObjectParser2.prototype.parseDictOrStream = function() { - var startPos = this.bytes.position(); - var dict = this.parseDict(); - this.skipWhitespaceAndComments(); - if (!this.matchKeyword(Keywords.streamEOF1) && !this.matchKeyword(Keywords.streamEOF2) && !this.matchKeyword(Keywords.streamEOF3) && !this.matchKeyword(Keywords.streamEOF4) && !this.matchKeyword(Keywords.stream)) { - return dict; - } - var start = this.bytes.offset(); - var end; - var Length = dict.get(PDFName_default.of("Length")); - if (Length instanceof PDFNumber_default) { - end = start + Length.asNumber(); - this.bytes.moveTo(end); - this.skipWhitespaceAndComments(); - if (!this.matchKeyword(Keywords.endstream)) { - this.bytes.moveTo(start); - end = this.findEndOfStreamFallback(startPos); - } - } else { - end = this.findEndOfStreamFallback(startPos); - } - var contents = this.bytes.slice(start, end); - return PDFRawStream_default.of(dict, contents); - }; - PDFObjectParser2.prototype.findEndOfStreamFallback = function(startPos) { - var nestingLvl = 1; - var end = this.bytes.offset(); - while (!this.bytes.done()) { - end = this.bytes.offset(); - if (this.matchKeyword(Keywords.stream)) { - nestingLvl += 1; - } else if (this.matchKeyword(Keywords.EOF1endstream) || this.matchKeyword(Keywords.EOF2endstream) || this.matchKeyword(Keywords.EOF3endstream) || this.matchKeyword(Keywords.endstream)) { - nestingLvl -= 1; - } else { - this.bytes.next(); - } - if (nestingLvl === 0) - break; - } - if (nestingLvl !== 0) - throw new PDFStreamParsingError(startPos); - return end; - }; - PDFObjectParser2.forBytes = function(bytes, context, capNumbers) { - return new PDFObjectParser2(ByteStream_default.of(bytes), context, capNumbers); - }; - PDFObjectParser2.forByteStream = function(byteStream, context, capNumbers) { - if (capNumbers === void 0) { - capNumbers = false; - } - return new PDFObjectParser2(byteStream, context, capNumbers); - }; - return PDFObjectParser2; - }(BaseParser_default) -); -var PDFObjectParser_default = PDFObjectParser; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/parser/PDFObjectStreamParser.js -var PDFObjectStreamParser = ( - /** @class */ - function(_super) { - __extends(PDFObjectStreamParser2, _super); - function PDFObjectStreamParser2(rawStream, shouldWaitForTick) { - var _this = _super.call(this, ByteStream_default.fromPDFRawStream(rawStream), rawStream.dict.context) || this; - var dict = rawStream.dict; - _this.alreadyParsed = false; - _this.shouldWaitForTick = shouldWaitForTick || function() { - return false; - }; - _this.firstOffset = dict.lookup(PDFName_default.of("First"), PDFNumber_default).asNumber(); - _this.objectCount = dict.lookup(PDFName_default.of("N"), PDFNumber_default).asNumber(); - return _this; - } - PDFObjectStreamParser2.prototype.parseIntoContext = function() { - return __awaiter(this, void 0, void 0, function() { - var offsetsAndObjectNumbers, idx, len, _a3, objectNumber, offset, object, ref; - return __generator(this, function(_b3) { - switch (_b3.label) { - case 0: - if (this.alreadyParsed) { - throw new ReparseError("PDFObjectStreamParser", "parseIntoContext"); - } - this.alreadyParsed = true; - offsetsAndObjectNumbers = this.parseOffsetsAndObjectNumbers(); - idx = 0, len = offsetsAndObjectNumbers.length; - _b3.label = 1; - case 1: - if (!(idx < len)) return [3, 4]; - _a3 = offsetsAndObjectNumbers[idx], objectNumber = _a3.objectNumber, offset = _a3.offset; - this.bytes.moveTo(this.firstOffset + offset); - object = this.parseObject(); - ref = PDFRef_default.of(objectNumber, 0); - this.context.assign(ref, object); - if (!this.shouldWaitForTick()) return [3, 3]; - return [4, waitForTick()]; - case 2: - _b3.sent(); - _b3.label = 3; - case 3: - idx++; - return [3, 1]; - case 4: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFObjectStreamParser2.prototype.parseOffsetsAndObjectNumbers = function() { - var offsetsAndObjectNumbers = []; - for (var idx = 0, len = this.objectCount; idx < len; idx++) { - this.skipWhitespaceAndComments(); - var objectNumber = this.parseRawInt(); - this.skipWhitespaceAndComments(); - var offset = this.parseRawInt(); - offsetsAndObjectNumbers.push({ objectNumber, offset }); - } - return offsetsAndObjectNumbers; - }; - PDFObjectStreamParser2.forStream = function(rawStream, shouldWaitForTick) { - return new PDFObjectStreamParser2(rawStream, shouldWaitForTick); - }; - return PDFObjectStreamParser2; - }(PDFObjectParser_default) -); -var PDFObjectStreamParser_default = PDFObjectStreamParser; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/parser/PDFXRefStreamParser.js -var PDFXRefStreamParser = ( - /** @class */ - function() { - function PDFXRefStreamParser2(rawStream) { - this.alreadyParsed = false; - this.dict = rawStream.dict; - this.bytes = ByteStream_default.fromPDFRawStream(rawStream); - this.context = this.dict.context; - var Size = this.dict.lookup(PDFName_default.of("Size"), PDFNumber_default); - var Index = this.dict.lookup(PDFName_default.of("Index")); - if (Index instanceof PDFArray_default) { - this.subsections = []; - for (var idx = 0, len = Index.size(); idx < len; idx += 2) { - var firstObjectNumber = Index.lookup(idx + 0, PDFNumber_default).asNumber(); - var length_1 = Index.lookup(idx + 1, PDFNumber_default).asNumber(); - this.subsections.push({ firstObjectNumber, length: length_1 }); - } - } else { - this.subsections = [{ firstObjectNumber: 0, length: Size.asNumber() }]; - } - var W = this.dict.lookup(PDFName_default.of("W"), PDFArray_default); - this.byteWidths = [-1, -1, -1]; - for (var idx = 0, len = W.size(); idx < len; idx++) { - this.byteWidths[idx] = W.lookup(idx, PDFNumber_default).asNumber(); - } - } - PDFXRefStreamParser2.prototype.parseIntoContext = function() { - if (this.alreadyParsed) { - throw new ReparseError("PDFXRefStreamParser", "parseIntoContext"); - } - this.alreadyParsed = true; - this.context.trailerInfo = { - Root: this.dict.get(PDFName_default.of("Root")), - Encrypt: this.dict.get(PDFName_default.of("Encrypt")), - Info: this.dict.get(PDFName_default.of("Info")), - ID: this.dict.get(PDFName_default.of("ID")) - }; - var entries = this.parseEntries(); - return entries; - }; - PDFXRefStreamParser2.prototype.parseEntries = function() { - var entries = []; - var _a3 = this.byteWidths, typeFieldWidth = _a3[0], offsetFieldWidth = _a3[1], genFieldWidth = _a3[2]; - for (var subsectionIdx = 0, subsectionLen = this.subsections.length; subsectionIdx < subsectionLen; subsectionIdx++) { - var _b3 = this.subsections[subsectionIdx], firstObjectNumber = _b3.firstObjectNumber, length_2 = _b3.length; - for (var objIdx = 0; objIdx < length_2; objIdx++) { - var type = 0; - for (var idx = 0, len = typeFieldWidth; idx < len; idx++) { - type = type << 8 | this.bytes.next(); - } - var offset = 0; - for (var idx = 0, len = offsetFieldWidth; idx < len; idx++) { - offset = offset << 8 | this.bytes.next(); - } - var generationNumber = 0; - for (var idx = 0, len = genFieldWidth; idx < len; idx++) { - generationNumber = generationNumber << 8 | this.bytes.next(); - } - if (typeFieldWidth === 0) - type = 1; - var objectNumber = firstObjectNumber + objIdx; - var entry = { - ref: PDFRef_default.of(objectNumber, generationNumber), - offset, - deleted: type === 0, - inObjectStream: type === 2 - }; - entries.push(entry); - } - } - return entries; - }; - PDFXRefStreamParser2.forStream = function(rawStream) { - return new PDFXRefStreamParser2(rawStream); - }; - return PDFXRefStreamParser2; - }() -); -var PDFXRefStreamParser_default = PDFXRefStreamParser; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/parser/PDFParser.js -var PDFParser = ( - /** @class */ - function(_super) { - __extends(PDFParser2, _super); - function PDFParser2(pdfBytes, objectsPerTick, throwOnInvalidObject, capNumbers) { - if (objectsPerTick === void 0) { - objectsPerTick = Infinity; - } - if (throwOnInvalidObject === void 0) { - throwOnInvalidObject = false; - } - if (capNumbers === void 0) { - capNumbers = false; - } - var _this = _super.call(this, ByteStream_default.of(pdfBytes), PDFContext_default.create(), capNumbers) || this; - _this.alreadyParsed = false; - _this.parsedObjects = 0; - _this.shouldWaitForTick = function() { - _this.parsedObjects += 1; - return _this.parsedObjects % _this.objectsPerTick === 0; - }; - _this.objectsPerTick = objectsPerTick; - _this.throwOnInvalidObject = throwOnInvalidObject; - return _this; - } - PDFParser2.prototype.parseDocument = function() { - return __awaiter(this, void 0, void 0, function() { - var prevOffset, offset; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - if (this.alreadyParsed) { - throw new ReparseError("PDFParser", "parseDocument"); - } - this.alreadyParsed = true; - this.context.header = this.parseHeader(); - _a3.label = 1; - case 1: - if (!!this.bytes.done()) return [3, 3]; - return [4, this.parseDocumentSection()]; - case 2: - _a3.sent(); - offset = this.bytes.offset(); - if (offset === prevOffset) { - throw new StalledParserError(this.bytes.position()); - } - prevOffset = offset; - return [3, 1]; - case 3: - this.maybeRecoverRoot(); - if (this.context.lookup(PDFRef_default.of(0))) { - console.warn("Removing parsed object: 0 0 R"); - this.context.delete(PDFRef_default.of(0)); - } - return [2, this.context]; - } - }); - }); - }; - PDFParser2.prototype.maybeRecoverRoot = function() { - var isValidCatalog = function(obj) { - return obj instanceof PDFDict_default && obj.lookup(PDFName_default.of("Type")) === PDFName_default.of("Catalog"); - }; - var catalog = this.context.lookup(this.context.trailerInfo.Root); - if (!isValidCatalog(catalog)) { - var indirectObjects = this.context.enumerateIndirectObjects(); - for (var idx = 0, len = indirectObjects.length; idx < len; idx++) { - var _a3 = indirectObjects[idx], ref = _a3[0], object = _a3[1]; - if (isValidCatalog(object)) { - this.context.trailerInfo.Root = ref; - } - } - } - }; - PDFParser2.prototype.parseHeader = function() { - while (!this.bytes.done()) { - if (this.matchKeyword(Keywords.header)) { - var major = this.parseRawInt(); - this.bytes.assertNext(CharCodes_default.Period); - var minor = this.parseRawInt(); - var header = PDFHeader_default.forVersion(major, minor); - this.skipBinaryHeaderComment(); - return header; - } - this.bytes.next(); - } - throw new MissingPDFHeaderError(this.bytes.position()); - }; - PDFParser2.prototype.parseIndirectObjectHeader = function() { - this.skipWhitespaceAndComments(); - var objectNumber = this.parseRawInt(); - this.skipWhitespaceAndComments(); - var generationNumber = this.parseRawInt(); - this.skipWhitespaceAndComments(); - if (!this.matchKeyword(Keywords.obj)) { - throw new MissingKeywordError(this.bytes.position(), Keywords.obj); - } - return PDFRef_default.of(objectNumber, generationNumber); - }; - PDFParser2.prototype.matchIndirectObjectHeader = function() { - var initialOffset = this.bytes.offset(); - try { - this.parseIndirectObjectHeader(); - return true; - } catch (e) { - this.bytes.moveTo(initialOffset); - return false; - } - }; - PDFParser2.prototype.parseIndirectObject = function() { - return __awaiter(this, void 0, void 0, function() { - var ref, object; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - ref = this.parseIndirectObjectHeader(); - this.skipWhitespaceAndComments(); - object = this.parseObject(); - this.skipWhitespaceAndComments(); - this.matchKeyword(Keywords.endobj); - if (!(object instanceof PDFRawStream_default && object.dict.lookup(PDFName_default.of("Type")) === PDFName_default.of("ObjStm"))) return [3, 2]; - return [4, PDFObjectStreamParser_default.forStream(object, this.shouldWaitForTick).parseIntoContext()]; - case 1: - _a3.sent(); - return [3, 3]; - case 2: - if (object instanceof PDFRawStream_default && object.dict.lookup(PDFName_default.of("Type")) === PDFName_default.of("XRef")) { - PDFXRefStreamParser_default.forStream(object).parseIntoContext(); - } else { - this.context.assign(ref, object); - } - _a3.label = 3; - case 3: - return [2, ref]; - } - }); - }); - }; - PDFParser2.prototype.tryToParseInvalidIndirectObject = function() { - var startPos = this.bytes.position(); - var msg = "Trying to parse invalid object: " + JSON.stringify(startPos) + ")"; - if (this.throwOnInvalidObject) - throw new Error(msg); - console.warn(msg); - var ref = this.parseIndirectObjectHeader(); - console.warn("Invalid object ref: " + ref); - this.skipWhitespaceAndComments(); - var start = this.bytes.offset(); - var failed = true; - while (!this.bytes.done()) { - if (this.matchKeyword(Keywords.endobj)) { - failed = false; - } - if (!failed) - break; - this.bytes.next(); - } - if (failed) - throw new PDFInvalidObjectParsingError(startPos); - var end = this.bytes.offset() - Keywords.endobj.length; - var object = PDFInvalidObject_default.of(this.bytes.slice(start, end)); - this.context.assign(ref, object); - return ref; - }; - PDFParser2.prototype.parseIndirectObjects = function() { - return __awaiter(this, void 0, void 0, function() { - var initialOffset, e_1; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - this.skipWhitespaceAndComments(); - _a3.label = 1; - case 1: - if (!(!this.bytes.done() && IsDigit[this.bytes.peek()])) return [3, 8]; - initialOffset = this.bytes.offset(); - _a3.label = 2; - case 2: - _a3.trys.push([2, 4, , 5]); - return [4, this.parseIndirectObject()]; - case 3: - _a3.sent(); - return [3, 5]; - case 4: - e_1 = _a3.sent(); - this.bytes.moveTo(initialOffset); - this.tryToParseInvalidIndirectObject(); - return [3, 5]; - case 5: - this.skipWhitespaceAndComments(); - this.skipJibberish(); - if (!this.shouldWaitForTick()) return [3, 7]; - return [4, waitForTick()]; - case 6: - _a3.sent(); - _a3.label = 7; - case 7: - return [3, 1]; - case 8: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFParser2.prototype.maybeParseCrossRefSection = function() { - this.skipWhitespaceAndComments(); - if (!this.matchKeyword(Keywords.xref)) - return; - this.skipWhitespaceAndComments(); - var objectNumber = -1; - var xref = PDFCrossRefSection_default.createEmpty(); - while (!this.bytes.done() && IsDigit[this.bytes.peek()]) { - var firstInt = this.parseRawInt(); - this.skipWhitespaceAndComments(); - var secondInt = this.parseRawInt(); - this.skipWhitespaceAndComments(); - var byte = this.bytes.peek(); - if (byte === CharCodes_default.n || byte === CharCodes_default.f) { - var ref = PDFRef_default.of(objectNumber, secondInt); - if (this.bytes.next() === CharCodes_default.n) { - xref.addEntry(ref, firstInt); - } else { - xref.addDeletedEntry(ref, firstInt); - } - objectNumber += 1; - } else { - objectNumber = firstInt; - } - this.skipWhitespaceAndComments(); - } - return xref; - }; - PDFParser2.prototype.maybeParseTrailerDict = function() { - this.skipWhitespaceAndComments(); - if (!this.matchKeyword(Keywords.trailer)) - return; - this.skipWhitespaceAndComments(); - var dict = this.parseDict(); - var context = this.context; - context.trailerInfo = { - Root: dict.get(PDFName_default.of("Root")) || context.trailerInfo.Root, - Encrypt: dict.get(PDFName_default.of("Encrypt")) || context.trailerInfo.Encrypt, - Info: dict.get(PDFName_default.of("Info")) || context.trailerInfo.Info, - ID: dict.get(PDFName_default.of("ID")) || context.trailerInfo.ID - }; - }; - PDFParser2.prototype.maybeParseTrailer = function() { - this.skipWhitespaceAndComments(); - if (!this.matchKeyword(Keywords.startxref)) - return; - this.skipWhitespaceAndComments(); - var offset = this.parseRawInt(); - this.skipWhitespace(); - this.matchKeyword(Keywords.eof); - this.skipWhitespaceAndComments(); - this.matchKeyword(Keywords.eof); - this.skipWhitespaceAndComments(); - return PDFTrailer_default.forLastCrossRefSectionOffset(offset); - }; - PDFParser2.prototype.parseDocumentSection = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, this.parseIndirectObjects()]; - case 1: - _a3.sent(); - this.maybeParseCrossRefSection(); - this.maybeParseTrailerDict(); - this.maybeParseTrailer(); - this.skipJibberish(); - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFParser2.prototype.skipJibberish = function() { - this.skipWhitespaceAndComments(); - while (!this.bytes.done()) { - var initialOffset = this.bytes.offset(); - var byte = this.bytes.peek(); - var isAlphaNumeric = byte >= CharCodes_default.Space && byte <= CharCodes_default.Tilde; - if (isAlphaNumeric) { - if (this.matchKeyword(Keywords.xref) || this.matchKeyword(Keywords.trailer) || this.matchKeyword(Keywords.startxref) || this.matchIndirectObjectHeader()) { - this.bytes.moveTo(initialOffset); - break; - } - } - this.bytes.next(); - } - }; - PDFParser2.prototype.skipBinaryHeaderComment = function() { - this.skipWhitespaceAndComments(); - try { - var initialOffset = this.bytes.offset(); - this.parseIndirectObjectHeader(); - this.bytes.moveTo(initialOffset); - } catch (e) { - this.bytes.next(); - this.skipWhitespaceAndComments(); - } - }; - PDFParser2.forBytesWithOptions = function(pdfBytes, objectsPerTick, throwOnInvalidObject, capNumbers) { - return new PDFParser2(pdfBytes, objectsPerTick, throwOnInvalidObject, capNumbers); - }; - return PDFParser2; - }(PDFObjectParser_default) -); -var PDFParser_default = PDFParser; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/annotation/flags.js -var flag2 = function(bitIndex) { - return 1 << bitIndex; -}; -var AnnotationFlags; -(function(AnnotationFlags2) { - AnnotationFlags2[AnnotationFlags2["Invisible"] = flag2(1 - 1)] = "Invisible"; - AnnotationFlags2[AnnotationFlags2["Hidden"] = flag2(2 - 1)] = "Hidden"; - AnnotationFlags2[AnnotationFlags2["Print"] = flag2(3 - 1)] = "Print"; - AnnotationFlags2[AnnotationFlags2["NoZoom"] = flag2(4 - 1)] = "NoZoom"; - AnnotationFlags2[AnnotationFlags2["NoRotate"] = flag2(5 - 1)] = "NoRotate"; - AnnotationFlags2[AnnotationFlags2["NoView"] = flag2(6 - 1)] = "NoView"; - AnnotationFlags2[AnnotationFlags2["ReadOnly"] = flag2(7 - 1)] = "ReadOnly"; - AnnotationFlags2[AnnotationFlags2["Locked"] = flag2(8 - 1)] = "Locked"; - AnnotationFlags2[AnnotationFlags2["ToggleNoView"] = flag2(9 - 1)] = "ToggleNoView"; - AnnotationFlags2[AnnotationFlags2["LockedContents"] = flag2(10 - 1)] = "LockedContents"; -})(AnnotationFlags || (AnnotationFlags = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/objects.js -var asPDFName = function(name) { - return name instanceof PDFName_default ? name : PDFName_default.of(name); -}; -var asPDFNumber = function(num) { - return num instanceof PDFNumber_default ? num : PDFNumber_default.of(num); -}; -var asNumber = function(num) { - return num instanceof PDFNumber_default ? num.asNumber() : num; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/rotations.js -var RotationTypes; -(function(RotationTypes2) { - RotationTypes2["Degrees"] = "degrees"; - RotationTypes2["Radians"] = "radians"; -})(RotationTypes || (RotationTypes = {})); -var degrees = function(degreeAngle) { - assertIs(degreeAngle, "degreeAngle", ["number"]); - return { type: RotationTypes.Degrees, angle: degreeAngle }; -}; -var Radians = RotationTypes.Radians; -var Degrees = RotationTypes.Degrees; -var degreesToRadians = function(degree) { - return degree * Math.PI / 180; -}; -var radiansToDegrees = function(radian) { - return radian * 180 / Math.PI; -}; -var toRadians = function(rotation) { - return rotation.type === Radians ? rotation.angle : rotation.type === Degrees ? degreesToRadians(rotation.angle) : error("Invalid rotation: " + JSON.stringify(rotation)); -}; -var toDegrees = function(rotation) { - return rotation.type === Radians ? radiansToDegrees(rotation.angle) : rotation.type === Degrees ? rotation.angle : error("Invalid rotation: " + JSON.stringify(rotation)); -}; -var reduceRotation = function(degreeAngle) { - if (degreeAngle === void 0) { - degreeAngle = 0; - } - var quadrants = degreeAngle / 90 % 4; - if (quadrants === 0) - return 0; - if (quadrants === 1) - return 90; - if (quadrants === 2) - return 180; - if (quadrants === 3) - return 270; - return 0; -}; -var adjustDimsForRotation = function(dims, degreeAngle) { - if (degreeAngle === void 0) { - degreeAngle = 0; - } - var rotation = reduceRotation(degreeAngle); - return rotation === 90 || rotation === 270 ? { width: dims.height, height: dims.width } : { width: dims.width, height: dims.height }; -}; -var rotateRectangle = function(rectangle, borderWidth, degreeAngle) { - if (borderWidth === void 0) { - borderWidth = 0; - } - if (degreeAngle === void 0) { - degreeAngle = 0; - } - var x = rectangle.x, y = rectangle.y, w = rectangle.width, h = rectangle.height; - var r2 = reduceRotation(degreeAngle); - var b = borderWidth / 2; - if (r2 === 0) - return { x: x - b, y: y - b, width: w, height: h }; - else if (r2 === 90) - return { x: x - h + b, y: y - b, width: h, height: w }; - else if (r2 === 180) - return { x: x - w + b, y: y - h + b, width: w, height: h }; - else if (r2 === 270) - return { x: x - b, y: y - w + b, width: h, height: w }; - else - return { x: x - b, y: y - b, width: w, height: h }; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/operators.js -var clip = function() { - return PDFOperator_default.of(PDFOperatorNames_default.ClipNonZero); -}; -var cos = Math.cos; -var sin = Math.sin; -var tan = Math.tan; -var concatTransformationMatrix = function(a, b, c, d, e, f) { - return PDFOperator_default.of(PDFOperatorNames_default.ConcatTransformationMatrix, [ - asPDFNumber(a), - asPDFNumber(b), - asPDFNumber(c), - asPDFNumber(d), - asPDFNumber(e), - asPDFNumber(f) - ]); -}; -var translate = function(xPos, yPos) { - return concatTransformationMatrix(1, 0, 0, 1, xPos, yPos); -}; -var scale = function(xPos, yPos) { - return concatTransformationMatrix(xPos, 0, 0, yPos, 0, 0); -}; -var rotateRadians = function(angle) { - return concatTransformationMatrix(cos(asNumber(angle)), sin(asNumber(angle)), -sin(asNumber(angle)), cos(asNumber(angle)), 0, 0); -}; -var rotateDegrees = function(angle) { - return rotateRadians(degreesToRadians(asNumber(angle))); -}; -var skewRadians = function(xSkewAngle, ySkewAngle) { - return concatTransformationMatrix(1, tan(asNumber(xSkewAngle)), tan(asNumber(ySkewAngle)), 1, 0, 0); -}; -var setDashPattern = function(dashArray, dashPhase) { - return PDFOperator_default.of(PDFOperatorNames_default.SetLineDashPattern, [ - "[" + dashArray.map(asPDFNumber).join(" ") + "]", - asPDFNumber(dashPhase) - ]); -}; -var LineCapStyle; -(function(LineCapStyle2) { - LineCapStyle2[LineCapStyle2["Butt"] = 0] = "Butt"; - LineCapStyle2[LineCapStyle2["Round"] = 1] = "Round"; - LineCapStyle2[LineCapStyle2["Projecting"] = 2] = "Projecting"; -})(LineCapStyle || (LineCapStyle = {})); -var setLineCap = function(style) { - return PDFOperator_default.of(PDFOperatorNames_default.SetLineCapStyle, [asPDFNumber(style)]); -}; -var LineJoinStyle; -(function(LineJoinStyle2) { - LineJoinStyle2[LineJoinStyle2["Miter"] = 0] = "Miter"; - LineJoinStyle2[LineJoinStyle2["Round"] = 1] = "Round"; - LineJoinStyle2[LineJoinStyle2["Bevel"] = 2] = "Bevel"; -})(LineJoinStyle || (LineJoinStyle = {})); -var setGraphicsState = function(state2) { - return PDFOperator_default.of(PDFOperatorNames_default.SetGraphicsStateParams, [asPDFName(state2)]); -}; -var pushGraphicsState = function() { - return PDFOperator_default.of(PDFOperatorNames_default.PushGraphicsState); -}; -var popGraphicsState = function() { - return PDFOperator_default.of(PDFOperatorNames_default.PopGraphicsState); -}; -var setLineWidth = function(width) { - return PDFOperator_default.of(PDFOperatorNames_default.SetLineWidth, [asPDFNumber(width)]); -}; -var appendBezierCurve = function(x1, y1, x2, y2, x3, y3) { - return PDFOperator_default.of(PDFOperatorNames_default.AppendBezierCurve, [ - asPDFNumber(x1), - asPDFNumber(y1), - asPDFNumber(x2), - asPDFNumber(y2), - asPDFNumber(x3), - asPDFNumber(y3) - ]); -}; -var appendQuadraticCurve = function(x1, y1, x2, y2) { - return PDFOperator_default.of(PDFOperatorNames_default.CurveToReplicateInitialPoint, [ - asPDFNumber(x1), - asPDFNumber(y1), - asPDFNumber(x2), - asPDFNumber(y2) - ]); -}; -var closePath = function() { - return PDFOperator_default.of(PDFOperatorNames_default.ClosePath); -}; -var moveTo = function(xPos, yPos) { - return PDFOperator_default.of(PDFOperatorNames_default.MoveTo, [asPDFNumber(xPos), asPDFNumber(yPos)]); -}; -var lineTo = function(xPos, yPos) { - return PDFOperator_default.of(PDFOperatorNames_default.LineTo, [asPDFNumber(xPos), asPDFNumber(yPos)]); -}; -var stroke = function() { - return PDFOperator_default.of(PDFOperatorNames_default.StrokePath); -}; -var fill = function() { - return PDFOperator_default.of(PDFOperatorNames_default.FillNonZero); -}; -var fillAndStroke = function() { - return PDFOperator_default.of(PDFOperatorNames_default.FillNonZeroAndStroke); -}; -var endPath = function() { - return PDFOperator_default.of(PDFOperatorNames_default.EndPath); -}; -var nextLine = function() { - return PDFOperator_default.of(PDFOperatorNames_default.NextLine); -}; -var showText = function(text2) { - return PDFOperator_default.of(PDFOperatorNames_default.ShowText, [text2]); -}; -var beginText = function() { - return PDFOperator_default.of(PDFOperatorNames_default.BeginText); -}; -var endText = function() { - return PDFOperator_default.of(PDFOperatorNames_default.EndText); -}; -var setFontAndSize = function(name, size) { - return PDFOperator_default.of(PDFOperatorNames_default.SetFontAndSize, [asPDFName(name), asPDFNumber(size)]); -}; -var setLineHeight = function(lineHeight) { - return PDFOperator_default.of(PDFOperatorNames_default.SetTextLineHeight, [asPDFNumber(lineHeight)]); -}; -var TextRenderingMode; -(function(TextRenderingMode2) { - TextRenderingMode2[TextRenderingMode2["Fill"] = 0] = "Fill"; - TextRenderingMode2[TextRenderingMode2["Outline"] = 1] = "Outline"; - TextRenderingMode2[TextRenderingMode2["FillAndOutline"] = 2] = "FillAndOutline"; - TextRenderingMode2[TextRenderingMode2["Invisible"] = 3] = "Invisible"; - TextRenderingMode2[TextRenderingMode2["FillAndClip"] = 4] = "FillAndClip"; - TextRenderingMode2[TextRenderingMode2["OutlineAndClip"] = 5] = "OutlineAndClip"; - TextRenderingMode2[TextRenderingMode2["FillAndOutlineAndClip"] = 6] = "FillAndOutlineAndClip"; - TextRenderingMode2[TextRenderingMode2["Clip"] = 7] = "Clip"; -})(TextRenderingMode || (TextRenderingMode = {})); -var setTextMatrix = function(a, b, c, d, e, f) { - return PDFOperator_default.of(PDFOperatorNames_default.SetTextMatrix, [ - asPDFNumber(a), - asPDFNumber(b), - asPDFNumber(c), - asPDFNumber(d), - asPDFNumber(e), - asPDFNumber(f) - ]); -}; -var rotateAndSkewTextRadiansAndTranslate = function(rotationAngle, xSkewAngle, ySkewAngle, x, y) { - return setTextMatrix(cos(asNumber(rotationAngle)), sin(asNumber(rotationAngle)) + tan(asNumber(xSkewAngle)), -sin(asNumber(rotationAngle)) + tan(asNumber(ySkewAngle)), cos(asNumber(rotationAngle)), x, y); -}; -var drawObject = function(name) { - return PDFOperator_default.of(PDFOperatorNames_default.DrawObject, [asPDFName(name)]); -}; -var setFillingGrayscaleColor = function(gray) { - return PDFOperator_default.of(PDFOperatorNames_default.NonStrokingColorGray, [asPDFNumber(gray)]); -}; -var setStrokingGrayscaleColor = function(gray) { - return PDFOperator_default.of(PDFOperatorNames_default.StrokingColorGray, [asPDFNumber(gray)]); -}; -var setFillingRgbColor = function(red, green, blue) { - return PDFOperator_default.of(PDFOperatorNames_default.NonStrokingColorRgb, [ - asPDFNumber(red), - asPDFNumber(green), - asPDFNumber(blue) - ]); -}; -var setStrokingRgbColor = function(red, green, blue) { - return PDFOperator_default.of(PDFOperatorNames_default.StrokingColorRgb, [ - asPDFNumber(red), - asPDFNumber(green), - asPDFNumber(blue) - ]); -}; -var setFillingCmykColor = function(cyan, magenta, yellow, key) { - return PDFOperator_default.of(PDFOperatorNames_default.NonStrokingColorCmyk, [ - asPDFNumber(cyan), - asPDFNumber(magenta), - asPDFNumber(yellow), - asPDFNumber(key) - ]); -}; -var setStrokingCmykColor = function(cyan, magenta, yellow, key) { - return PDFOperator_default.of(PDFOperatorNames_default.StrokingColorCmyk, [ - asPDFNumber(cyan), - asPDFNumber(magenta), - asPDFNumber(yellow), - asPDFNumber(key) - ]); -}; -var beginMarkedContent = function(tag) { - return PDFOperator_default.of(PDFOperatorNames_default.BeginMarkedContent, [asPDFName(tag)]); -}; -var endMarkedContent = function() { - return PDFOperator_default.of(PDFOperatorNames_default.EndMarkedContent); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/colors.js -var ColorTypes; -(function(ColorTypes2) { - ColorTypes2["Grayscale"] = "Grayscale"; - ColorTypes2["RGB"] = "RGB"; - ColorTypes2["CMYK"] = "CMYK"; -})(ColorTypes || (ColorTypes = {})); -var grayscale = function(gray) { - assertRange(gray, "gray", 0, 1); - return { type: ColorTypes.Grayscale, gray }; -}; -var rgb = function(red, green, blue) { - assertRange(red, "red", 0, 1); - assertRange(green, "green", 0, 1); - assertRange(blue, "blue", 0, 1); - return { type: ColorTypes.RGB, red, green, blue }; -}; -var cmyk = function(cyan, magenta, yellow, key) { - assertRange(cyan, "cyan", 0, 1); - assertRange(magenta, "magenta", 0, 1); - assertRange(yellow, "yellow", 0, 1); - assertRange(key, "key", 0, 1); - return { type: ColorTypes.CMYK, cyan, magenta, yellow, key }; -}; -var Grayscale = ColorTypes.Grayscale; -var RGB = ColorTypes.RGB; -var CMYK = ColorTypes.CMYK; -var setFillingColor = function(color) { - return color.type === Grayscale ? setFillingGrayscaleColor(color.gray) : color.type === RGB ? setFillingRgbColor(color.red, color.green, color.blue) : color.type === CMYK ? setFillingCmykColor(color.cyan, color.magenta, color.yellow, color.key) : error("Invalid color: " + JSON.stringify(color)); -}; -var setStrokingColor = function(color) { - return color.type === Grayscale ? setStrokingGrayscaleColor(color.gray) : color.type === RGB ? setStrokingRgbColor(color.red, color.green, color.blue) : color.type === CMYK ? setStrokingCmykColor(color.cyan, color.magenta, color.yellow, color.key) : error("Invalid color: " + JSON.stringify(color)); -}; -var componentsToColor = function(comps, scale2) { - if (scale2 === void 0) { - scale2 = 1; - } - return (comps === null || comps === void 0 ? void 0 : comps.length) === 1 ? grayscale(comps[0] * scale2) : (comps === null || comps === void 0 ? void 0 : comps.length) === 3 ? rgb(comps[0] * scale2, comps[1] * scale2, comps[2] * scale2) : (comps === null || comps === void 0 ? void 0 : comps.length) === 4 ? cmyk(comps[0] * scale2, comps[1] * scale2, comps[2] * scale2, comps[3] * scale2) : void 0; -}; -var colorToComponents = function(color) { - return color.type === Grayscale ? [color.gray] : color.type === RGB ? [color.red, color.green, color.blue] : color.type === CMYK ? [color.cyan, color.magenta, color.yellow, color.key] : error("Invalid color: " + JSON.stringify(color)); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/svgPath.js -var cx = 0; -var cy = 0; -var px = 0; -var py = 0; -var sx = 0; -var sy = 0; -var parameters = /* @__PURE__ */ new Map([ - ["A", 7], - ["a", 7], - ["C", 6], - ["c", 6], - ["H", 1], - ["h", 1], - ["L", 2], - ["l", 2], - ["M", 2], - ["m", 2], - ["Q", 4], - ["q", 4], - ["S", 4], - ["s", 4], - ["T", 2], - ["t", 2], - ["V", 1], - ["v", 1], - ["Z", 0], - ["z", 0] -]); -var parse = function(path3) { - var cmd; - var ret = []; - var args = []; - var curArg = ""; - var foundDecimal = false; - var params = 0; - for (var _i = 0, path_1 = path3; _i < path_1.length; _i++) { - var c = path_1[_i]; - if (parameters.has(c)) { - params = parameters.get(c); - if (cmd) { - if (curArg.length > 0) { - args[args.length] = +curArg; - } - ret[ret.length] = { cmd, args }; - args = []; - curArg = ""; - foundDecimal = false; - } - cmd = c; - } else if ([" ", ","].includes(c) || c === "-" && curArg.length > 0 && curArg[curArg.length - 1] !== "e" || c === "." && foundDecimal) { - if (curArg.length === 0) { - continue; - } - if (args.length === params) { - ret[ret.length] = { cmd, args }; - args = [+curArg]; - if (cmd === "M") { - cmd = "L"; - } - if (cmd === "m") { - cmd = "l"; - } - } else { - args[args.length] = +curArg; - } - foundDecimal = c === "."; - curArg = ["-", "."].includes(c) ? c : ""; - } else { - curArg += c; - if (c === ".") { - foundDecimal = true; - } - } - } - if (curArg.length > 0) { - if (args.length === params) { - ret[ret.length] = { cmd, args }; - args = [+curArg]; - if (cmd === "M") { - cmd = "L"; - } - if (cmd === "m") { - cmd = "l"; - } - } else { - args[args.length] = +curArg; - } - } - ret[ret.length] = { cmd, args }; - return ret; -}; -var apply = function(commands) { - cx = cy = px = py = sx = sy = 0; - var cmds = []; - for (var i = 0; i < commands.length; i++) { - var c = commands[i]; - if (c.cmd && typeof runners[c.cmd] === "function") { - var cmd = runners[c.cmd](c.args); - if (Array.isArray(cmd)) { - cmds = cmds.concat(cmd); - } else { - cmds.push(cmd); - } - } - } - return cmds; -}; -var runners = { - M: function(a) { - cx = a[0]; - cy = a[1]; - px = py = null; - sx = cx; - sy = cy; - return moveTo(cx, cy); - }, - m: function(a) { - cx += a[0]; - cy += a[1]; - px = py = null; - sx = cx; - sy = cy; - return moveTo(cx, cy); - }, - C: function(a) { - cx = a[4]; - cy = a[5]; - px = a[2]; - py = a[3]; - return appendBezierCurve(a[0], a[1], a[2], a[3], a[4], a[5]); - }, - c: function(a) { - var cmd = appendBezierCurve(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy, a[4] + cx, a[5] + cy); - px = cx + a[2]; - py = cy + a[3]; - cx += a[4]; - cy += a[5]; - return cmd; - }, - S: function(a) { - if (px === null || py === null) { - px = cx; - py = cy; - } - var cmd = appendBezierCurve(cx - (px - cx), cy - (py - cy), a[0], a[1], a[2], a[3]); - px = a[0]; - py = a[1]; - cx = a[2]; - cy = a[3]; - return cmd; - }, - s: function(a) { - if (px === null || py === null) { - px = cx; - py = cy; - } - var cmd = appendBezierCurve(cx - (px - cx), cy - (py - cy), cx + a[0], cy + a[1], cx + a[2], cy + a[3]); - px = cx + a[0]; - py = cy + a[1]; - cx += a[2]; - cy += a[3]; - return cmd; - }, - Q: function(a) { - px = a[0]; - py = a[1]; - cx = a[2]; - cy = a[3]; - return appendQuadraticCurve(a[0], a[1], cx, cy); - }, - q: function(a) { - var cmd = appendQuadraticCurve(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy); - px = cx + a[0]; - py = cy + a[1]; - cx += a[2]; - cy += a[3]; - return cmd; - }, - T: function(a) { - if (px === null || py === null) { - px = cx; - py = cy; - } else { - px = cx - (px - cx); - py = cy - (py - cy); - } - var cmd = appendQuadraticCurve(px, py, a[0], a[1]); - px = cx - (px - cx); - py = cy - (py - cy); - cx = a[0]; - cy = a[1]; - return cmd; - }, - t: function(a) { - if (px === null || py === null) { - px = cx; - py = cy; - } else { - px = cx - (px - cx); - py = cy - (py - cy); - } - var cmd = appendQuadraticCurve(px, py, cx + a[0], cy + a[1]); - cx += a[0]; - cy += a[1]; - return cmd; - }, - A: function(a) { - var cmds = solveArc(cx, cy, a); - cx = a[5]; - cy = a[6]; - return cmds; - }, - a: function(a) { - a[5] += cx; - a[6] += cy; - var cmds = solveArc(cx, cy, a); - cx = a[5]; - cy = a[6]; - return cmds; - }, - L: function(a) { - cx = a[0]; - cy = a[1]; - px = py = null; - return lineTo(cx, cy); - }, - l: function(a) { - cx += a[0]; - cy += a[1]; - px = py = null; - return lineTo(cx, cy); - }, - H: function(a) { - cx = a[0]; - px = py = null; - return lineTo(cx, cy); - }, - h: function(a) { - cx += a[0]; - px = py = null; - return lineTo(cx, cy); - }, - V: function(a) { - cy = a[0]; - px = py = null; - return lineTo(cx, cy); - }, - v: function(a) { - cy += a[0]; - px = py = null; - return lineTo(cx, cy); - }, - Z: function() { - var cmd = closePath(); - cx = sx; - cy = sy; - return cmd; - }, - z: function() { - var cmd = closePath(); - cx = sx; - cy = sy; - return cmd; - } -}; -var solveArc = function(x, y, coords) { - var rx = coords[0], ry = coords[1], rot = coords[2], large = coords[3], sweep = coords[4], ex = coords[5], ey = coords[6]; - var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y); - var cmds = []; - for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { - var seg = segs_1[_i]; - var bez = segmentToBezier.apply(void 0, seg); - cmds.push(appendBezierCurve.apply(void 0, bez)); - } - return cmds; -}; -var arcToSegments = function(x, y, rx, ry, large, sweep, rotateX, ox, oy) { - var th = rotateX * (Math.PI / 180); - var sinTh = Math.sin(th); - var cosTh = Math.cos(th); - rx = Math.abs(rx); - ry = Math.abs(ry); - px = cosTh * (ox - x) * 0.5 + sinTh * (oy - y) * 0.5; - py = cosTh * (oy - y) * 0.5 - sinTh * (ox - x) * 0.5; - var pl = px * px / (rx * rx) + py * py / (ry * ry); - if (pl > 1) { - pl = Math.sqrt(pl); - rx *= pl; - ry *= pl; - } - var a00 = cosTh / rx; - var a01 = sinTh / rx; - var a10 = -sinTh / ry; - var a11 = cosTh / ry; - var x0 = a00 * ox + a01 * oy; - var y0 = a10 * ox + a11 * oy; - var x1 = a00 * x + a01 * y; - var y1 = a10 * x + a11 * y; - var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0); - var sfactorSq = 1 / d - 0.25; - if (sfactorSq < 0) { - sfactorSq = 0; - } - var sfactor = Math.sqrt(sfactorSq); - if (sweep === large) { - sfactor = -sfactor; - } - var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0); - var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0); - var th0 = Math.atan2(y0 - yc, x0 - xc); - var th1 = Math.atan2(y1 - yc, x1 - xc); - var thArc = th1 - th0; - if (thArc < 0 && sweep === 1) { - thArc += 2 * Math.PI; - } else if (thArc > 0 && sweep === 0) { - thArc -= 2 * Math.PI; - } - var segments = Math.ceil(Math.abs(thArc / (Math.PI * 0.5 + 1e-3))); - var result = []; - for (var i = 0; i < segments; i++) { - var th2 = th0 + i * thArc / segments; - var th3 = th0 + (i + 1) * thArc / segments; - result[i] = [xc, yc, th2, th3, rx, ry, sinTh, cosTh]; - } - return result; -}; -var segmentToBezier = function(cx1, cy1, th0, th1, rx, ry, sinTh, cosTh) { - var a00 = cosTh * rx; - var a01 = -sinTh * ry; - var a10 = sinTh * rx; - var a11 = cosTh * ry; - var thHalf = 0.5 * (th1 - th0); - var t = 8 / 3 * Math.sin(thHalf * 0.5) * Math.sin(thHalf * 0.5) / Math.sin(thHalf); - var x1 = cx1 + Math.cos(th0) - t * Math.sin(th0); - var y1 = cy1 + Math.sin(th0) + t * Math.cos(th0); - var x3 = cx1 + Math.cos(th1); - var y3 = cy1 + Math.sin(th1); - var x2 = x3 + t * Math.sin(th1); - var y2 = y3 - t * Math.cos(th1); - var result = [ - a00 * x1 + a01 * y1, - a10 * x1 + a11 * y1, - a00 * x2 + a01 * y2, - a10 * x2 + a11 * y2, - a00 * x3 + a01 * y3, - a10 * x3 + a11 * y3 - ]; - return result; -}; -var svgPathToOperators = function(path3) { - return apply(parse(path3)); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/operations.js -var drawLinesOfText = function(lines, options) { - var operators = [ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - beginText(), - setFillingColor(options.color), - setFontAndSize(options.font, options.size), - setLineHeight(options.lineHeight), - rotateAndSkewTextRadiansAndTranslate(toRadians(options.rotate), toRadians(options.xSkew), toRadians(options.ySkew), options.x, options.y) - ].filter(Boolean); - for (var idx = 0, len = lines.length; idx < len; idx++) { - operators.push(showText(lines[idx]), nextLine()); - } - operators.push(endText(), popGraphicsState()); - return operators; -}; -var drawImage = function(name, options) { - return [ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - translate(options.x, options.y), - rotateRadians(toRadians(options.rotate)), - scale(options.width, options.height), - skewRadians(toRadians(options.xSkew), toRadians(options.ySkew)), - drawObject(name), - popGraphicsState() - ].filter(Boolean); -}; -var drawPage = function(name, options) { - return [ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - translate(options.x, options.y), - rotateRadians(toRadians(options.rotate)), - scale(options.xScale, options.yScale), - skewRadians(toRadians(options.xSkew), toRadians(options.ySkew)), - drawObject(name), - popGraphicsState() - ].filter(Boolean); -}; -var drawLine = function(options) { - var _a3, _b3; - return [ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - options.color && setStrokingColor(options.color), - setLineWidth(options.thickness), - setDashPattern((_a3 = options.dashArray) !== null && _a3 !== void 0 ? _a3 : [], (_b3 = options.dashPhase) !== null && _b3 !== void 0 ? _b3 : 0), - moveTo(options.start.x, options.start.y), - options.lineCap && setLineCap(options.lineCap), - moveTo(options.start.x, options.start.y), - lineTo(options.end.x, options.end.y), - stroke(), - popGraphicsState() - ].filter(Boolean); -}; -var drawRectangle = function(options) { - var _a3, _b3; - return [ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - options.color && setFillingColor(options.color), - options.borderColor && setStrokingColor(options.borderColor), - setLineWidth(options.borderWidth), - options.borderLineCap && setLineCap(options.borderLineCap), - setDashPattern((_a3 = options.borderDashArray) !== null && _a3 !== void 0 ? _a3 : [], (_b3 = options.borderDashPhase) !== null && _b3 !== void 0 ? _b3 : 0), - translate(options.x, options.y), - rotateRadians(toRadians(options.rotate)), - skewRadians(toRadians(options.xSkew), toRadians(options.ySkew)), - moveTo(0, 0), - lineTo(0, options.height), - lineTo(options.width, options.height), - lineTo(options.width, 0), - closePath(), - // prettier-ignore - options.color && options.borderWidth ? fillAndStroke() : options.color ? fill() : options.borderColor ? stroke() : closePath(), - popGraphicsState() - ].filter(Boolean); -}; -var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3); -var drawEllipsePath = function(config) { - var x = asNumber(config.x); - var y = asNumber(config.y); - var xScale = asNumber(config.xScale); - var yScale = asNumber(config.yScale); - x -= xScale; - y -= yScale; - var ox = xScale * KAPPA; - var oy = yScale * KAPPA; - var xe = x + xScale * 2; - var ye = y + yScale * 2; - var xm = x + xScale; - var ym = y + yScale; - return [ - pushGraphicsState(), - moveTo(x, ym), - appendBezierCurve(x, ym - oy, xm - ox, y, xm, y), - appendBezierCurve(xm + ox, y, xe, ym - oy, xe, ym), - appendBezierCurve(xe, ym + oy, xm + ox, ye, xm, ye), - appendBezierCurve(xm - ox, ye, x, ym + oy, x, ym), - popGraphicsState() - ]; -}; -var drawEllipseCurves = function(config) { - var centerX = asNumber(config.x); - var centerY = asNumber(config.y); - var xScale = asNumber(config.xScale); - var yScale = asNumber(config.yScale); - var x = -xScale; - var y = -yScale; - var ox = xScale * KAPPA; - var oy = yScale * KAPPA; - var xe = x + xScale * 2; - var ye = y + yScale * 2; - var xm = x + xScale; - var ym = y + yScale; - return [ - translate(centerX, centerY), - rotateRadians(toRadians(config.rotate)), - moveTo(x, ym), - appendBezierCurve(x, ym - oy, xm - ox, y, xm, y), - appendBezierCurve(xm + ox, y, xe, ym - oy, xe, ym), - appendBezierCurve(xe, ym + oy, xm + ox, ye, xm, ye), - appendBezierCurve(xm - ox, ye, x, ym + oy, x, ym) - ]; -}; -var drawEllipse = function(options) { - var _a3, _b3, _c2; - return __spreadArrays([ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - options.color && setFillingColor(options.color), - options.borderColor && setStrokingColor(options.borderColor), - setLineWidth(options.borderWidth), - options.borderLineCap && setLineCap(options.borderLineCap), - setDashPattern((_a3 = options.borderDashArray) !== null && _a3 !== void 0 ? _a3 : [], (_b3 = options.borderDashPhase) !== null && _b3 !== void 0 ? _b3 : 0) - ], options.rotate === void 0 ? drawEllipsePath({ - x: options.x, - y: options.y, - xScale: options.xScale, - yScale: options.yScale - }) : drawEllipseCurves({ - x: options.x, - y: options.y, - xScale: options.xScale, - yScale: options.yScale, - rotate: (_c2 = options.rotate) !== null && _c2 !== void 0 ? _c2 : degrees(0) - }), [ - // prettier-ignore - options.color && options.borderWidth ? fillAndStroke() : options.color ? fill() : options.borderColor ? stroke() : closePath(), - popGraphicsState() - ]).filter(Boolean); -}; -var drawSvgPath = function(path3, options) { - var _a3, _b3, _c2; - return __spreadArrays([ - pushGraphicsState(), - options.graphicsState && setGraphicsState(options.graphicsState), - translate(options.x, options.y), - rotateRadians(toRadians((_a3 = options.rotate) !== null && _a3 !== void 0 ? _a3 : degrees(0))), - // SVG path Y axis is opposite pdf-lib's - options.scale ? scale(options.scale, -options.scale) : scale(1, -1), - options.color && setFillingColor(options.color), - options.borderColor && setStrokingColor(options.borderColor), - options.borderWidth && setLineWidth(options.borderWidth), - options.borderLineCap && setLineCap(options.borderLineCap), - setDashPattern((_b3 = options.borderDashArray) !== null && _b3 !== void 0 ? _b3 : [], (_c2 = options.borderDashPhase) !== null && _c2 !== void 0 ? _c2 : 0) - ], svgPathToOperators(path3), [ - // prettier-ignore - options.color && options.borderWidth ? fillAndStroke() : options.color ? fill() : options.borderColor ? stroke() : closePath(), - popGraphicsState() - ]).filter(Boolean); -}; -var drawCheckMark = function(options) { - var size = asNumber(options.size); - var p2x = -1 + 0.75; - var p2y = -1 + 0.51; - var p3y = 1 - 0.525; - var p3x = 1 - 0.31; - var p1x = -1 + 0.325; - var p1y = -((p1x - p2x) * (p3x - p2x)) / (p3y - p2y) + p2y; - return [ - pushGraphicsState(), - options.color && setStrokingColor(options.color), - setLineWidth(options.thickness), - translate(options.x, options.y), - moveTo(p1x * size, p1y * size), - lineTo(p2x * size, p2y * size), - lineTo(p3x * size, p3y * size), - stroke(), - popGraphicsState() - ].filter(Boolean); -}; -var rotateInPlace = function(options) { - return options.rotation === 0 ? [ - translate(0, 0), - rotateDegrees(0) - ] : options.rotation === 90 ? [ - translate(options.width, 0), - rotateDegrees(90) - ] : options.rotation === 180 ? [ - translate(options.width, options.height), - rotateDegrees(180) - ] : options.rotation === 270 ? [ - translate(0, options.height), - rotateDegrees(270) - ] : []; -}; -var drawCheckBox = function(options) { - var outline = drawRectangle({ - x: options.x, - y: options.y, - width: options.width, - height: options.height, - borderWidth: options.borderWidth, - color: options.color, - borderColor: options.borderColor, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - if (!options.filled) - return outline; - var width = asNumber(options.width); - var height = asNumber(options.height); - var checkMarkSize = Math.min(width, height) / 2; - var checkMark = drawCheckMark({ - x: width / 2, - y: height / 2, - size: checkMarkSize, - thickness: options.thickness, - color: options.markColor - }); - return __spreadArrays([pushGraphicsState()], outline, checkMark, [popGraphicsState()]); -}; -var drawRadioButton = function(options) { - var width = asNumber(options.width); - var height = asNumber(options.height); - var outlineScale = Math.min(width, height) / 2; - var outline = drawEllipse({ - x: options.x, - y: options.y, - xScale: outlineScale, - yScale: outlineScale, - color: options.color, - borderColor: options.borderColor, - borderWidth: options.borderWidth - }); - if (!options.filled) - return outline; - var dot = drawEllipse({ - x: options.x, - y: options.y, - xScale: outlineScale * 0.45, - yScale: outlineScale * 0.45, - color: options.dotColor, - borderColor: void 0, - borderWidth: 0 - }); - return __spreadArrays([pushGraphicsState()], outline, dot, [popGraphicsState()]); -}; -var drawButton = function(options) { - var x = asNumber(options.x); - var y = asNumber(options.y); - var width = asNumber(options.width); - var height = asNumber(options.height); - var background = drawRectangle({ - x, - y, - width, - height, - borderWidth: options.borderWidth, - color: options.color, - borderColor: options.borderColor, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - var lines = drawTextLines(options.textLines, { - color: options.textColor, - font: options.font, - size: options.fontSize, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - return __spreadArrays([pushGraphicsState()], background, lines, [popGraphicsState()]); -}; -var drawTextLines = function(lines, options) { - var operators = [ - beginText(), - setFillingColor(options.color), - setFontAndSize(options.font, options.size) - ]; - for (var idx = 0, len = lines.length; idx < len; idx++) { - var _a3 = lines[idx], encoded = _a3.encoded, x = _a3.x, y = _a3.y; - operators.push(rotateAndSkewTextRadiansAndTranslate(toRadians(options.rotate), toRadians(options.xSkew), toRadians(options.ySkew), x, y), showText(encoded)); - } - operators.push(endText()); - return operators; -}; -var drawTextField = function(options) { - var x = asNumber(options.x); - var y = asNumber(options.y); - var width = asNumber(options.width); - var height = asNumber(options.height); - var borderWidth = asNumber(options.borderWidth); - var padding = asNumber(options.padding); - var clipX = x + borderWidth / 2 + padding; - var clipY = y + borderWidth / 2 + padding; - var clipWidth = width - (borderWidth / 2 + padding) * 2; - var clipHeight = height - (borderWidth / 2 + padding) * 2; - var clippingArea = [ - moveTo(clipX, clipY), - lineTo(clipX, clipY + clipHeight), - lineTo(clipX + clipWidth, clipY + clipHeight), - lineTo(clipX + clipWidth, clipY), - closePath(), - clip(), - endPath() - ]; - var background = drawRectangle({ - x, - y, - width, - height, - borderWidth: options.borderWidth, - color: options.color, - borderColor: options.borderColor, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - var lines = drawTextLines(options.textLines, { - color: options.textColor, - font: options.font, - size: options.fontSize, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - var markedContent = __spreadArrays([ - beginMarkedContent("Tx"), - pushGraphicsState() - ], lines, [ - popGraphicsState(), - endMarkedContent() - ]); - return __spreadArrays([ - pushGraphicsState() - ], background, clippingArea, markedContent, [ - popGraphicsState() - ]); -}; -var drawOptionList = function(options) { - var x = asNumber(options.x); - var y = asNumber(options.y); - var width = asNumber(options.width); - var height = asNumber(options.height); - var lineHeight = asNumber(options.lineHeight); - var borderWidth = asNumber(options.borderWidth); - var padding = asNumber(options.padding); - var clipX = x + borderWidth / 2 + padding; - var clipY = y + borderWidth / 2 + padding; - var clipWidth = width - (borderWidth / 2 + padding) * 2; - var clipHeight = height - (borderWidth / 2 + padding) * 2; - var clippingArea = [ - moveTo(clipX, clipY), - lineTo(clipX, clipY + clipHeight), - lineTo(clipX + clipWidth, clipY + clipHeight), - lineTo(clipX + clipWidth, clipY), - closePath(), - clip(), - endPath() - ]; - var background = drawRectangle({ - x, - y, - width, - height, - borderWidth: options.borderWidth, - color: options.color, - borderColor: options.borderColor, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - var highlights = []; - for (var idx = 0, len = options.selectedLines.length; idx < len; idx++) { - var line = options.textLines[options.selectedLines[idx]]; - highlights.push.apply(highlights, drawRectangle({ - x: line.x - padding, - y: line.y - (lineHeight - line.height) / 2, - width: width - borderWidth, - height: line.height + (lineHeight - line.height) / 2, - borderWidth: 0, - color: options.selectedColor, - borderColor: void 0, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - })); - } - var lines = drawTextLines(options.textLines, { - color: options.textColor, - font: options.font, - size: options.fontSize, - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }); - var markedContent = __spreadArrays([ - beginMarkedContent("Tx"), - pushGraphicsState() - ], lines, [ - popGraphicsState(), - endMarkedContent() - ]); - return __spreadArrays([ - pushGraphicsState() - ], background, highlights, clippingArea, markedContent, [ - popGraphicsState() - ]); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/errors.js -var EncryptedPDFError = ( - /** @class */ - function(_super) { - __extends(EncryptedPDFError2, _super); - function EncryptedPDFError2() { - var _this = this; - var msg = "Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways."; - _this = _super.call(this, msg) || this; - return _this; - } - return EncryptedPDFError2; - }(Error) -); -var FontkitNotRegisteredError = ( - /** @class */ - function(_super) { - __extends(FontkitNotRegisteredError2, _super); - function FontkitNotRegisteredError2() { - var _this = this; - var msg = "Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts."; - _this = _super.call(this, msg) || this; - return _this; - } - return FontkitNotRegisteredError2; - }(Error) -); -var ForeignPageError = ( - /** @class */ - function(_super) { - __extends(ForeignPageError2, _super); - function ForeignPageError2() { - var _this = this; - var msg = "A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them."; - _this = _super.call(this, msg) || this; - return _this; - } - return ForeignPageError2; - }(Error) -); -var RemovePageFromEmptyDocumentError = ( - /** @class */ - function(_super) { - __extends(RemovePageFromEmptyDocumentError2, _super); - function RemovePageFromEmptyDocumentError2() { - var _this = this; - var msg = "PDFDocument has no pages so `PDFDocument.removePage` cannot be called"; - _this = _super.call(this, msg) || this; - return _this; - } - return RemovePageFromEmptyDocumentError2; - }(Error) -); -var NoSuchFieldError = ( - /** @class */ - function(_super) { - __extends(NoSuchFieldError2, _super); - function NoSuchFieldError2(name) { - var _this = this; - var msg = 'PDFDocument has no form field with the name "' + name + '"'; - _this = _super.call(this, msg) || this; - return _this; - } - return NoSuchFieldError2; - }(Error) -); -var UnexpectedFieldTypeError = ( - /** @class */ - function(_super) { - __extends(UnexpectedFieldTypeError2, _super); - function UnexpectedFieldTypeError2(name, expected, actual) { - var _a3, _b3; - var _this = this; - var expectedType = expected === null || expected === void 0 ? void 0 : expected.name; - var actualType = (_b3 = (_a3 = actual === null || actual === void 0 ? void 0 : actual.constructor) === null || _a3 === void 0 ? void 0 : _a3.name) !== null && _b3 !== void 0 ? _b3 : actual; - var msg = 'Expected field "' + name + '" to be of type ' + expectedType + ", " + ("but it is actually of type " + actualType); - _this = _super.call(this, msg) || this; - return _this; - } - return UnexpectedFieldTypeError2; - }(Error) -); -var MissingOnValueCheckError = ( - /** @class */ - function(_super) { - __extends(MissingOnValueCheckError2, _super); - function MissingOnValueCheckError2(onValue) { - var _this = this; - var msg = 'Failed to select check box due to missing onValue: "' + onValue + '"'; - _this = _super.call(this, msg) || this; - return _this; - } - return MissingOnValueCheckError2; - }(Error) -); -var FieldAlreadyExistsError = ( - /** @class */ - function(_super) { - __extends(FieldAlreadyExistsError2, _super); - function FieldAlreadyExistsError2(name) { - var _this = this; - var msg = 'A field already exists with the specified name: "' + name + '"'; - _this = _super.call(this, msg) || this; - return _this; - } - return FieldAlreadyExistsError2; - }(Error) -); -var InvalidFieldNamePartError = ( - /** @class */ - function(_super) { - __extends(InvalidFieldNamePartError2, _super); - function InvalidFieldNamePartError2(namePart) { - var _this = this; - var msg = 'Field name contains invalid component: "' + namePart + '"'; - _this = _super.call(this, msg) || this; - return _this; - } - return InvalidFieldNamePartError2; - }(Error) -); -var FieldExistsAsNonTerminalError = ( - /** @class */ - function(_super) { - __extends(FieldExistsAsNonTerminalError2, _super); - function FieldExistsAsNonTerminalError2(name) { - var _this = this; - var msg = 'A non-terminal field already exists with the specified name: "' + name + '"'; - _this = _super.call(this, msg) || this; - return _this; - } - return FieldExistsAsNonTerminalError2; - }(Error) -); -var RichTextFieldReadError = ( - /** @class */ - function(_super) { - __extends(RichTextFieldReadError2, _super); - function RichTextFieldReadError2(fieldName) { - var _this = this; - var msg = "Reading rich text fields is not supported: Attempted to read rich text field: " + fieldName; - _this = _super.call(this, msg) || this; - return _this; - } - return RichTextFieldReadError2; - }(Error) -); -var CombedTextLayoutError = ( - /** @class */ - function(_super) { - __extends(CombedTextLayoutError2, _super); - function CombedTextLayoutError2(lineLength, cellCount) { - var _this = this; - var msg = "Failed to layout combed text as lineLength=" + lineLength + " is greater than cellCount=" + cellCount; - _this = _super.call(this, msg) || this; - return _this; - } - return CombedTextLayoutError2; - }(Error) -); -var ExceededMaxLengthError = ( - /** @class */ - function(_super) { - __extends(ExceededMaxLengthError2, _super); - function ExceededMaxLengthError2(textLength, maxLength, name) { - var _this = this; - var msg = "Attempted to set text with length=" + textLength + " for TextField with maxLength=" + maxLength + " and name=" + name; - _this = _super.call(this, msg) || this; - return _this; - } - return ExceededMaxLengthError2; - }(Error) -); -var InvalidMaxLengthError = ( - /** @class */ - function(_super) { - __extends(InvalidMaxLengthError2, _super); - function InvalidMaxLengthError2(textLength, maxLength, name) { - var _this = this; - var msg = "Attempted to set maxLength=" + maxLength + ", which is less than " + textLength + ", the length of this field's current value (name=" + name + ")"; - _this = _super.call(this, msg) || this; - return _this; - } - return InvalidMaxLengthError2; - }(Error) -); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/text/alignment.js -var TextAlignment; -(function(TextAlignment2) { - TextAlignment2[TextAlignment2["Left"] = 0] = "Left"; - TextAlignment2[TextAlignment2["Center"] = 1] = "Center"; - TextAlignment2[TextAlignment2["Right"] = 2] = "Right"; -})(TextAlignment || (TextAlignment = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/text/layout.js -var MIN_FONT_SIZE = 4; -var MAX_FONT_SIZE = 500; -var computeFontSize = function(lines, font, bounds, multiline) { - if (multiline === void 0) { - multiline = false; - } - var fontSize = MIN_FONT_SIZE; - while (fontSize < MAX_FONT_SIZE) { - var linesUsed = 0; - for (var lineIdx = 0, lineLen = lines.length; lineIdx < lineLen; lineIdx++) { - linesUsed += 1; - var line = lines[lineIdx]; - var words = line.split(" "); - var spaceInLineRemaining = bounds.width; - for (var idx = 0, len = words.length; idx < len; idx++) { - var isLastWord = idx === len - 1; - var word = isLastWord ? words[idx] : words[idx] + " "; - var widthOfWord = font.widthOfTextAtSize(word, fontSize); - spaceInLineRemaining -= widthOfWord; - if (spaceInLineRemaining <= 0) { - linesUsed += 1; - spaceInLineRemaining = bounds.width - widthOfWord; - } - } - } - if (!multiline && linesUsed > lines.length) - return fontSize - 1; - var height = font.heightAtSize(fontSize); - var lineHeight = height + height * 0.2; - var totalHeight = lineHeight * linesUsed; - if (totalHeight > Math.abs(bounds.height)) - return fontSize - 1; - fontSize += 1; - } - return fontSize; -}; -var computeCombedFontSize = function(line, font, bounds, cellCount) { - var cellWidth = bounds.width / cellCount; - var cellHeight = bounds.height; - var fontSize = MIN_FONT_SIZE; - var chars3 = charSplit(line); - while (fontSize < MAX_FONT_SIZE) { - for (var idx = 0, len = chars3.length; idx < len; idx++) { - var c = chars3[idx]; - var tooLong = font.widthOfTextAtSize(c, fontSize) > cellWidth * 0.75; - if (tooLong) - return fontSize - 1; - } - var height = font.heightAtSize(fontSize, { descender: false }); - if (height > cellHeight) - return fontSize - 1; - fontSize += 1; - } - return fontSize; -}; -var lastIndexOfWhitespace = function(line) { - for (var idx = line.length; idx > 0; idx--) { - if (/\s/.test(line[idx])) - return idx; - } - return void 0; -}; -var splitOutLines = function(input, maxWidth, font, fontSize) { - var _a3; - var lastWhitespaceIdx = input.length; - while (lastWhitespaceIdx > 0) { - var line = input.substring(0, lastWhitespaceIdx); - var encoded = font.encodeText(line); - var width = font.widthOfTextAtSize(line, fontSize); - if (width < maxWidth) { - var remainder = input.substring(lastWhitespaceIdx) || void 0; - return { line, encoded, width, remainder }; - } - lastWhitespaceIdx = (_a3 = lastIndexOfWhitespace(line)) !== null && _a3 !== void 0 ? _a3 : 0; - } - return { - line: input, - encoded: font.encodeText(input), - width: font.widthOfTextAtSize(input, fontSize), - remainder: void 0 - }; -}; -var layoutMultilineText = function(text2, _a3) { - var alignment = _a3.alignment, fontSize = _a3.fontSize, font = _a3.font, bounds = _a3.bounds; - var lines = lineSplit(cleanText(text2)); - if (fontSize === void 0 || fontSize === 0) { - fontSize = computeFontSize(lines, font, bounds, true); - } - var height = font.heightAtSize(fontSize); - var lineHeight = height + height * 0.2; - var textLines = []; - var minX = bounds.x; - var minY = bounds.y; - var maxX = bounds.x + bounds.width; - var maxY = bounds.y + bounds.height; - var y = bounds.y + bounds.height; - for (var idx = 0, len = lines.length; idx < len; idx++) { - var prevRemainder = lines[idx]; - while (prevRemainder !== void 0) { - var _b3 = splitOutLines(prevRemainder, bounds.width, font, fontSize), line = _b3.line, encoded = _b3.encoded, width = _b3.width, remainder = _b3.remainder; - var x = alignment === TextAlignment.Left ? bounds.x : alignment === TextAlignment.Center ? bounds.x + bounds.width / 2 - width / 2 : alignment === TextAlignment.Right ? bounds.x + bounds.width - width : bounds.x; - y -= lineHeight; - if (x < minX) - minX = x; - if (y < minY) - minY = y; - if (x + width > maxX) - maxX = x + width; - if (y + height > maxY) - maxY = y + height; - textLines.push({ text: line, encoded, width, height, x, y }); - prevRemainder = remainder === null || remainder === void 0 ? void 0 : remainder.trim(); - } - } - return { - fontSize, - lineHeight, - lines: textLines, - bounds: { - x: minX, - y: minY, - width: maxX - minX, - height: maxY - minY - } - }; -}; -var layoutCombedText = function(text2, _a3) { - var fontSize = _a3.fontSize, font = _a3.font, bounds = _a3.bounds, cellCount = _a3.cellCount; - var line = mergeLines(cleanText(text2)); - if (line.length > cellCount) { - throw new CombedTextLayoutError(line.length, cellCount); - } - if (fontSize === void 0 || fontSize === 0) { - fontSize = computeCombedFontSize(line, font, bounds, cellCount); - } - var cellWidth = bounds.width / cellCount; - var height = font.heightAtSize(fontSize, { descender: false }); - var y = bounds.y + (bounds.height / 2 - height / 2); - var cells = []; - var minX = bounds.x; - var minY = bounds.y; - var maxX = bounds.x + bounds.width; - var maxY = bounds.y + bounds.height; - var cellOffset = 0; - var charOffset = 0; - while (cellOffset < cellCount) { - var _b3 = charAtIndex(line, charOffset), char = _b3[0], charLength = _b3[1]; - var encoded = font.encodeText(char); - var width = font.widthOfTextAtSize(char, fontSize); - var cellCenter = bounds.x + (cellWidth * cellOffset + cellWidth / 2); - var x = cellCenter - width / 2; - if (x < minX) - minX = x; - if (y < minY) - minY = y; - if (x + width > maxX) - maxX = x + width; - if (y + height > maxY) - maxY = y + height; - cells.push({ text: line, encoded, width, height, x, y }); - cellOffset += 1; - charOffset += charLength; - } - return { - fontSize, - cells, - bounds: { - x: minX, - y: minY, - width: maxX - minX, - height: maxY - minY - } - }; -}; -var layoutSinglelineText = function(text2, _a3) { - var alignment = _a3.alignment, fontSize = _a3.fontSize, font = _a3.font, bounds = _a3.bounds; - var line = mergeLines(cleanText(text2)); - if (fontSize === void 0 || fontSize === 0) { - fontSize = computeFontSize([line], font, bounds); - } - var encoded = font.encodeText(line); - var width = font.widthOfTextAtSize(line, fontSize); - var height = font.heightAtSize(fontSize, { descender: false }); - var x = alignment === TextAlignment.Left ? bounds.x : alignment === TextAlignment.Center ? bounds.x + bounds.width / 2 - width / 2 : alignment === TextAlignment.Right ? bounds.x + bounds.width - width : bounds.x; - var y = bounds.y + (bounds.height / 2 - height / 2); - return { - fontSize, - line: { text: line, encoded, width, height, x, y }, - bounds: { x, y, width, height } - }; -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/appearances.js -var normalizeAppearance = function(appearance) { - if ("normal" in appearance) - return appearance; - return { normal: appearance }; -}; -var tfRegex2 = /\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/; -var getDefaultFontSize = function(field) { - var _a3, _b3; - var da = (_a3 = field.getDefaultAppearance()) !== null && _a3 !== void 0 ? _a3 : ""; - var daMatch = (_b3 = findLastMatch(da, tfRegex2).match) !== null && _b3 !== void 0 ? _b3 : []; - var defaultFontSize = Number(daMatch[2]); - return isFinite(defaultFontSize) ? defaultFontSize : void 0; -}; -var colorRegex = /(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/; -var getDefaultColor = function(field) { - var _a3; - var da = (_a3 = field.getDefaultAppearance()) !== null && _a3 !== void 0 ? _a3 : ""; - var daMatch = findLastMatch(da, colorRegex).match; - var _b3 = daMatch !== null && daMatch !== void 0 ? daMatch : [], c1 = _b3[1], c2 = _b3[2], c3 = _b3[3], c4 = _b3[4], colorSpace = _b3[5]; - if (colorSpace === "g" && c1) { - return grayscale(Number(c1)); - } - if (colorSpace === "rg" && c1 && c2 && c3) { - return rgb(Number(c1), Number(c2), Number(c3)); - } - if (colorSpace === "k" && c1 && c2 && c3 && c4) { - return cmyk(Number(c1), Number(c2), Number(c3), Number(c4)); - } - return void 0; -}; -var updateDefaultAppearance = function(field, color, font, fontSize) { - var _a3; - if (fontSize === void 0) { - fontSize = 0; - } - var da = [ - setFillingColor(color).toString(), - setFontAndSize((_a3 = font === null || font === void 0 ? void 0 : font.name) !== null && _a3 !== void 0 ? _a3 : "dummy__noop", fontSize).toString() - ].join("\n"); - field.setDefaultAppearance(da); -}; -var defaultCheckBoxAppearanceProvider = function(checkBox, widget) { - var _a3, _b3, _c2; - var widgetColor = getDefaultColor(widget); - var fieldColor = getDefaultColor(checkBox.acroField); - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var borderWidth = (_a3 = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _a3 !== void 0 ? _a3 : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var _d = adjustDimsForRotation(rectangle, rotation), width = _d.width, height = _d.height; - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var black = rgb(0, 0, 0); - var borderColor = (_b3 = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBorderColor())) !== null && _b3 !== void 0 ? _b3 : black; - var normalBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor()); - var downBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor(), 0.8); - var textColor = (_c2 = widgetColor !== null && widgetColor !== void 0 ? widgetColor : fieldColor) !== null && _c2 !== void 0 ? _c2 : black; - if (widgetColor) { - updateDefaultAppearance(widget, textColor); - } else { - updateDefaultAppearance(checkBox.acroField, textColor); - } - var options = { - x: 0 + borderWidth / 2, - y: 0 + borderWidth / 2, - width: width - borderWidth, - height: height - borderWidth, - thickness: 1.5, - borderWidth, - borderColor, - markColor: textColor - }; - return { - normal: { - on: __spreadArrays(rotate, drawCheckBox(__assign(__assign({}, options), { color: normalBackgroundColor, filled: true }))), - off: __spreadArrays(rotate, drawCheckBox(__assign(__assign({}, options), { color: normalBackgroundColor, filled: false }))) - }, - down: { - on: __spreadArrays(rotate, drawCheckBox(__assign(__assign({}, options), { color: downBackgroundColor, filled: true }))), - off: __spreadArrays(rotate, drawCheckBox(__assign(__assign({}, options), { color: downBackgroundColor, filled: false }))) - } - }; -}; -var defaultRadioGroupAppearanceProvider = function(radioGroup, widget) { - var _a3, _b3, _c2; - var widgetColor = getDefaultColor(widget); - var fieldColor = getDefaultColor(radioGroup.acroField); - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var borderWidth = (_a3 = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _a3 !== void 0 ? _a3 : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var _d = adjustDimsForRotation(rectangle, rotation), width = _d.width, height = _d.height; - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var black = rgb(0, 0, 0); - var borderColor = (_b3 = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBorderColor())) !== null && _b3 !== void 0 ? _b3 : black; - var normalBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor()); - var downBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor(), 0.8); - var textColor = (_c2 = widgetColor !== null && widgetColor !== void 0 ? widgetColor : fieldColor) !== null && _c2 !== void 0 ? _c2 : black; - if (widgetColor) { - updateDefaultAppearance(widget, textColor); - } else { - updateDefaultAppearance(radioGroup.acroField, textColor); - } - var options = { - x: width / 2, - y: height / 2, - width: width - borderWidth, - height: height - borderWidth, - borderWidth, - borderColor, - dotColor: textColor - }; - return { - normal: { - on: __spreadArrays(rotate, drawRadioButton(__assign(__assign({}, options), { color: normalBackgroundColor, filled: true }))), - off: __spreadArrays(rotate, drawRadioButton(__assign(__assign({}, options), { color: normalBackgroundColor, filled: false }))) - }, - down: { - on: __spreadArrays(rotate, drawRadioButton(__assign(__assign({}, options), { color: downBackgroundColor, filled: true }))), - off: __spreadArrays(rotate, drawRadioButton(__assign(__assign({}, options), { color: downBackgroundColor, filled: false }))) - } - }; -}; -var defaultButtonAppearanceProvider = function(button, widget, font) { - var _a3, _b3, _c2, _d, _e; - var widgetColor = getDefaultColor(widget); - var fieldColor = getDefaultColor(button.acroField); - var widgetFontSize = getDefaultFontSize(widget); - var fieldFontSize = getDefaultFontSize(button.acroField); - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var captions = ap === null || ap === void 0 ? void 0 : ap.getCaptions(); - var normalText = (_a3 = captions === null || captions === void 0 ? void 0 : captions.normal) !== null && _a3 !== void 0 ? _a3 : ""; - var downText = (_c2 = (_b3 = captions === null || captions === void 0 ? void 0 : captions.down) !== null && _b3 !== void 0 ? _b3 : normalText) !== null && _c2 !== void 0 ? _c2 : ""; - var borderWidth = (_d = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _d !== void 0 ? _d : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var _f = adjustDimsForRotation(rectangle, rotation), width = _f.width, height = _f.height; - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var black = rgb(0, 0, 0); - var borderColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBorderColor()); - var normalBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor()); - var downBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor(), 0.8); - var bounds = { - x: borderWidth, - y: borderWidth, - width: width - borderWidth * 2, - height: height - borderWidth * 2 - }; - var normalLayout = layoutSinglelineText(normalText, { - alignment: TextAlignment.Center, - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds - }); - var downLayout = layoutSinglelineText(downText, { - alignment: TextAlignment.Center, - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds - }); - var fontSize = Math.min(normalLayout.fontSize, downLayout.fontSize); - var textColor = (_e = widgetColor !== null && widgetColor !== void 0 ? widgetColor : fieldColor) !== null && _e !== void 0 ? _e : black; - if (widgetColor || widgetFontSize !== void 0) { - updateDefaultAppearance(widget, textColor, font, fontSize); - } else { - updateDefaultAppearance(button.acroField, textColor, font, fontSize); - } - var options = { - x: 0 + borderWidth / 2, - y: 0 + borderWidth / 2, - width: width - borderWidth, - height: height - borderWidth, - borderWidth, - borderColor, - textColor, - font: font.name, - fontSize - }; - return { - normal: __spreadArrays(rotate, drawButton(__assign(__assign({}, options), { color: normalBackgroundColor, textLines: [normalLayout.line] }))), - down: __spreadArrays(rotate, drawButton(__assign(__assign({}, options), { color: downBackgroundColor, textLines: [downLayout.line] }))) - }; -}; -var defaultTextFieldAppearanceProvider = function(textField, widget, font) { - var _a3, _b3, _c2, _d; - var widgetColor = getDefaultColor(widget); - var fieldColor = getDefaultColor(textField.acroField); - var widgetFontSize = getDefaultFontSize(widget); - var fieldFontSize = getDefaultFontSize(textField.acroField); - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var text2 = (_a3 = textField.getText()) !== null && _a3 !== void 0 ? _a3 : ""; - var borderWidth = (_b3 = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _b3 !== void 0 ? _b3 : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var _e = adjustDimsForRotation(rectangle, rotation), width = _e.width, height = _e.height; - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var black = rgb(0, 0, 0); - var borderColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBorderColor()); - var normalBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor()); - var textLines; - var fontSize; - var padding = textField.isCombed() ? 0 : 1; - var bounds = { - x: borderWidth + padding, - y: borderWidth + padding, - width: width - (borderWidth + padding) * 2, - height: height - (borderWidth + padding) * 2 - }; - if (textField.isMultiline()) { - var layout = layoutMultilineText(text2, { - alignment: textField.getAlignment(), - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds - }); - textLines = layout.lines; - fontSize = layout.fontSize; - } else if (textField.isCombed()) { - var layout = layoutCombedText(text2, { - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds, - cellCount: (_c2 = textField.getMaxLength()) !== null && _c2 !== void 0 ? _c2 : 0 - }); - textLines = layout.cells; - fontSize = layout.fontSize; - } else { - var layout = layoutSinglelineText(text2, { - alignment: textField.getAlignment(), - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds - }); - textLines = [layout.line]; - fontSize = layout.fontSize; - } - var textColor = (_d = widgetColor !== null && widgetColor !== void 0 ? widgetColor : fieldColor) !== null && _d !== void 0 ? _d : black; - if (widgetColor || widgetFontSize !== void 0) { - updateDefaultAppearance(widget, textColor, font, fontSize); - } else { - updateDefaultAppearance(textField.acroField, textColor, font, fontSize); - } - var options = { - x: 0 + borderWidth / 2, - y: 0 + borderWidth / 2, - width: width - borderWidth, - height: height - borderWidth, - borderWidth: borderWidth !== null && borderWidth !== void 0 ? borderWidth : 0, - borderColor, - textColor, - font: font.name, - fontSize, - color: normalBackgroundColor, - textLines, - padding - }; - return __spreadArrays(rotate, drawTextField(options)); -}; -var defaultDropdownAppearanceProvider = function(dropdown, widget, font) { - var _a3, _b3, _c2; - var widgetColor = getDefaultColor(widget); - var fieldColor = getDefaultColor(dropdown.acroField); - var widgetFontSize = getDefaultFontSize(widget); - var fieldFontSize = getDefaultFontSize(dropdown.acroField); - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var text2 = (_a3 = dropdown.getSelected()[0]) !== null && _a3 !== void 0 ? _a3 : ""; - var borderWidth = (_b3 = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _b3 !== void 0 ? _b3 : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var _d = adjustDimsForRotation(rectangle, rotation), width = _d.width, height = _d.height; - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var black = rgb(0, 0, 0); - var borderColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBorderColor()); - var normalBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor()); - var padding = 1; - var bounds = { - x: borderWidth + padding, - y: borderWidth + padding, - width: width - (borderWidth + padding) * 2, - height: height - (borderWidth + padding) * 2 - }; - var _e = layoutSinglelineText(text2, { - alignment: TextAlignment.Left, - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds - }), line = _e.line, fontSize = _e.fontSize; - var textColor = (_c2 = widgetColor !== null && widgetColor !== void 0 ? widgetColor : fieldColor) !== null && _c2 !== void 0 ? _c2 : black; - if (widgetColor || widgetFontSize !== void 0) { - updateDefaultAppearance(widget, textColor, font, fontSize); - } else { - updateDefaultAppearance(dropdown.acroField, textColor, font, fontSize); - } - var options = { - x: 0 + borderWidth / 2, - y: 0 + borderWidth / 2, - width: width - borderWidth, - height: height - borderWidth, - borderWidth: borderWidth !== null && borderWidth !== void 0 ? borderWidth : 0, - borderColor, - textColor, - font: font.name, - fontSize, - color: normalBackgroundColor, - textLines: [line], - padding - }; - return __spreadArrays(rotate, drawTextField(options)); -}; -var defaultOptionListAppearanceProvider = function(optionList, widget, font) { - var _a3, _b3; - var widgetColor = getDefaultColor(widget); - var fieldColor = getDefaultColor(optionList.acroField); - var widgetFontSize = getDefaultFontSize(widget); - var fieldFontSize = getDefaultFontSize(optionList.acroField); - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var borderWidth = (_a3 = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _a3 !== void 0 ? _a3 : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var _c2 = adjustDimsForRotation(rectangle, rotation), width = _c2.width, height = _c2.height; - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var black = rgb(0, 0, 0); - var borderColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBorderColor()); - var normalBackgroundColor = componentsToColor(ap === null || ap === void 0 ? void 0 : ap.getBackgroundColor()); - var options = optionList.getOptions(); - var selected = optionList.getSelected(); - if (optionList.isSorted()) - options.sort(); - var text2 = ""; - for (var idx = 0, len = options.length; idx < len; idx++) { - text2 += options[idx]; - if (idx < len - 1) - text2 += "\n"; - } - var padding = 1; - var bounds = { - x: borderWidth + padding, - y: borderWidth + padding, - width: width - (borderWidth + padding) * 2, - height: height - (borderWidth + padding) * 2 - }; - var _d = layoutMultilineText(text2, { - alignment: TextAlignment.Left, - fontSize: widgetFontSize !== null && widgetFontSize !== void 0 ? widgetFontSize : fieldFontSize, - font, - bounds - }), lines = _d.lines, fontSize = _d.fontSize, lineHeight = _d.lineHeight; - var selectedLines = []; - for (var idx = 0, len = lines.length; idx < len; idx++) { - var line = lines[idx]; - if (selected.includes(line.text)) - selectedLines.push(idx); - } - var blue = rgb(153 / 255, 193 / 255, 218 / 255); - var textColor = (_b3 = widgetColor !== null && widgetColor !== void 0 ? widgetColor : fieldColor) !== null && _b3 !== void 0 ? _b3 : black; - if (widgetColor || widgetFontSize !== void 0) { - updateDefaultAppearance(widget, textColor, font, fontSize); - } else { - updateDefaultAppearance(optionList.acroField, textColor, font, fontSize); - } - return __spreadArrays(rotate, drawOptionList({ - x: 0 + borderWidth / 2, - y: 0 + borderWidth / 2, - width: width - borderWidth, - height: height - borderWidth, - borderWidth: borderWidth !== null && borderWidth !== void 0 ? borderWidth : 0, - borderColor, - textColor, - font: font.name, - fontSize, - color: normalBackgroundColor, - textLines: lines, - lineHeight, - selectedColor: blue, - selectedLines, - padding - })); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFEmbeddedPage.js -var PDFEmbeddedPage = ( - /** @class */ - function() { - function PDFEmbeddedPage2(ref, doc, embedder) { - this.alreadyEmbedded = false; - assertIs(ref, "ref", [[PDFRef_default, "PDFRef"]]); - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - assertIs(embedder, "embedder", [[PDFPageEmbedder_default, "PDFPageEmbedder"]]); - this.ref = ref; - this.doc = doc; - this.width = embedder.width; - this.height = embedder.height; - this.embedder = embedder; - } - PDFEmbeddedPage2.prototype.scale = function(factor) { - assertIs(factor, "factor", ["number"]); - return { width: this.width * factor, height: this.height * factor }; - }; - PDFEmbeddedPage2.prototype.size = function() { - return this.scale(1); - }; - PDFEmbeddedPage2.prototype.embed = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - if (!!this.alreadyEmbedded) return [3, 2]; - return [4, this.embedder.embedIntoContext(this.doc.context, this.ref)]; - case 1: - _a3.sent(); - this.alreadyEmbedded = true; - _a3.label = 2; - case 2: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFEmbeddedPage2.of = function(ref, doc, embedder) { - return new PDFEmbeddedPage2(ref, doc, embedder); - }; - return PDFEmbeddedPage2; - }() -); -var PDFEmbeddedPage_default = PDFEmbeddedPage; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFFont.js -var PDFFont = ( - /** @class */ - function() { - function PDFFont2(ref, doc, embedder) { - this.modified = true; - assertIs(ref, "ref", [[PDFRef_default, "PDFRef"]]); - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - assertIs(embedder, "embedder", [ - [CustomFontEmbedder_default, "CustomFontEmbedder"], - [StandardFontEmbedder_default, "StandardFontEmbedder"] - ]); - this.ref = ref; - this.doc = doc; - this.name = embedder.fontName; - this.embedder = embedder; - } - PDFFont2.prototype.encodeText = function(text2) { - assertIs(text2, "text", ["string"]); - this.modified = true; - return this.embedder.encodeText(text2); - }; - PDFFont2.prototype.widthOfTextAtSize = function(text2, size) { - assertIs(text2, "text", ["string"]); - assertIs(size, "size", ["number"]); - return this.embedder.widthOfTextAtSize(text2, size); - }; - PDFFont2.prototype.heightAtSize = function(size, options) { - var _a3; - assertIs(size, "size", ["number"]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.descender, "options.descender", ["boolean"]); - return this.embedder.heightOfFontAtSize(size, { - descender: (_a3 = options === null || options === void 0 ? void 0 : options.descender) !== null && _a3 !== void 0 ? _a3 : true - }); - }; - PDFFont2.prototype.sizeAtHeight = function(height) { - assertIs(height, "height", ["number"]); - return this.embedder.sizeOfFontAtHeight(height); - }; - PDFFont2.prototype.getCharacterSet = function() { - if (this.embedder instanceof StandardFontEmbedder_default) { - return this.embedder.encoding.supportedCodePoints; - } else { - return this.embedder.font.characterSet; - } - }; - PDFFont2.prototype.embed = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - if (!this.modified) return [3, 2]; - return [4, this.embedder.embedIntoContext(this.doc.context, this.ref)]; - case 1: - _a3.sent(); - this.modified = false; - _a3.label = 2; - case 2: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFFont2.of = function(ref, doc, embedder) { - return new PDFFont2(ref, doc, embedder); - }; - return PDFFont2; - }() -); -var PDFFont_default = PDFFont; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFImage.js -var PDFImage = ( - /** @class */ - function() { - function PDFImage2(ref, doc, embedder) { - assertIs(ref, "ref", [[PDFRef_default, "PDFRef"]]); - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - assertIs(embedder, "embedder", [ - [JpegEmbedder_default, "JpegEmbedder"], - [PngEmbedder_default, "PngEmbedder"] - ]); - this.ref = ref; - this.doc = doc; - this.width = embedder.width; - this.height = embedder.height; - this.embedder = embedder; - } - PDFImage2.prototype.scale = function(factor) { - assertIs(factor, "factor", ["number"]); - return { width: this.width * factor, height: this.height * factor }; - }; - PDFImage2.prototype.scaleToFit = function(width, height) { - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var imgWidthScale = width / this.width; - var imgHeightScale = height / this.height; - var scale2 = Math.min(imgWidthScale, imgHeightScale); - return this.scale(scale2); - }; - PDFImage2.prototype.size = function() { - return this.scale(1); - }; - PDFImage2.prototype.embed = function() { - return __awaiter(this, void 0, void 0, function() { - var _a3, doc, ref; - return __generator(this, function(_b3) { - switch (_b3.label) { - case 0: - if (!this.embedder) - return [ - 2 - /*return*/ - ]; - if (!this.embedTask) { - _a3 = this, doc = _a3.doc, ref = _a3.ref; - this.embedTask = this.embedder.embedIntoContext(doc.context, ref); - } - return [4, this.embedTask]; - case 1: - _b3.sent(); - this.embedder = void 0; - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFImage2.of = function(ref, doc, embedder) { - return new PDFImage2(ref, doc, embedder); - }; - return PDFImage2; - }() -); -var PDFImage_default = PDFImage; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/image/alignment.js -var ImageAlignment; -(function(ImageAlignment2) { - ImageAlignment2[ImageAlignment2["Left"] = 0] = "Left"; - ImageAlignment2[ImageAlignment2["Center"] = 1] = "Center"; - ImageAlignment2[ImageAlignment2["Right"] = 2] = "Right"; -})(ImageAlignment || (ImageAlignment = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFField.js -var assertFieldAppearanceOptions = function(options) { - assertOrUndefined(options === null || options === void 0 ? void 0 : options.x, "options.x", ["number"]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.y, "options.y", ["number"]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.width, "options.width", ["number"]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.height, "options.height", ["number"]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.textColor, "options.textColor", [ - [Object, "Color"] - ]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.backgroundColor, "options.backgroundColor", [ - [Object, "Color"] - ]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.borderColor, "options.borderColor", [ - [Object, "Color"] - ]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.borderWidth, "options.borderWidth", ["number"]); - assertOrUndefined(options === null || options === void 0 ? void 0 : options.rotate, "options.rotate", [[Object, "Rotation"]]); -}; -var PDFField = ( - /** @class */ - function() { - function PDFField2(acroField, ref, doc) { - assertIs(acroField, "acroField", [[PDFAcroTerminal_default, "PDFAcroTerminal"]]); - assertIs(ref, "ref", [[PDFRef_default, "PDFRef"]]); - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - this.acroField = acroField; - this.ref = ref; - this.doc = doc; - } - PDFField2.prototype.getName = function() { - var _a3; - return (_a3 = this.acroField.getFullyQualifiedName()) !== null && _a3 !== void 0 ? _a3 : ""; - }; - PDFField2.prototype.isReadOnly = function() { - return this.acroField.hasFlag(AcroFieldFlags.ReadOnly); - }; - PDFField2.prototype.enableReadOnly = function() { - this.acroField.setFlagTo(AcroFieldFlags.ReadOnly, true); - }; - PDFField2.prototype.disableReadOnly = function() { - this.acroField.setFlagTo(AcroFieldFlags.ReadOnly, false); - }; - PDFField2.prototype.isRequired = function() { - return this.acroField.hasFlag(AcroFieldFlags.Required); - }; - PDFField2.prototype.enableRequired = function() { - this.acroField.setFlagTo(AcroFieldFlags.Required, true); - }; - PDFField2.prototype.disableRequired = function() { - this.acroField.setFlagTo(AcroFieldFlags.Required, false); - }; - PDFField2.prototype.isExported = function() { - return !this.acroField.hasFlag(AcroFieldFlags.NoExport); - }; - PDFField2.prototype.enableExporting = function() { - this.acroField.setFlagTo(AcroFieldFlags.NoExport, false); - }; - PDFField2.prototype.disableExporting = function() { - this.acroField.setFlagTo(AcroFieldFlags.NoExport, true); - }; - PDFField2.prototype.needsAppearancesUpdate = function() { - throw new MethodNotImplementedError(this.constructor.name, "needsAppearancesUpdate"); - }; - PDFField2.prototype.defaultUpdateAppearances = function(_font) { - throw new MethodNotImplementedError(this.constructor.name, "defaultUpdateAppearances"); - }; - PDFField2.prototype.markAsDirty = function() { - this.doc.getForm().markFieldAsDirty(this.ref); - }; - PDFField2.prototype.markAsClean = function() { - this.doc.getForm().markFieldAsClean(this.ref); - }; - PDFField2.prototype.isDirty = function() { - return this.doc.getForm().fieldIsDirty(this.ref); - }; - PDFField2.prototype.createWidget = function(options) { - var _a3; - var textColor = options.textColor; - var backgroundColor = options.backgroundColor; - var borderColor = options.borderColor; - var borderWidth = options.borderWidth; - var degreesAngle = toDegrees(options.rotate); - var caption = options.caption; - var x = options.x; - var y = options.y; - var width = options.width + borderWidth; - var height = options.height + borderWidth; - var hidden = Boolean(options.hidden); - var pageRef = options.page; - assertMultiple(degreesAngle, "degreesAngle", 90); - var widget = PDFWidgetAnnotation_default.create(this.doc.context, this.ref); - var rect = rotateRectangle({ x, y, width, height }, borderWidth, degreesAngle); - widget.setRectangle(rect); - if (pageRef) - widget.setP(pageRef); - var ac = widget.getOrCreateAppearanceCharacteristics(); - if (backgroundColor) { - ac.setBackgroundColor(colorToComponents(backgroundColor)); - } - ac.setRotation(degreesAngle); - if (caption) - ac.setCaptions({ normal: caption }); - if (borderColor) - ac.setBorderColor(colorToComponents(borderColor)); - var bs = widget.getOrCreateBorderStyle(); - if (borderWidth !== void 0) - bs.setWidth(borderWidth); - widget.setFlagTo(AnnotationFlags.Print, true); - widget.setFlagTo(AnnotationFlags.Hidden, hidden); - widget.setFlagTo(AnnotationFlags.Invisible, false); - if (textColor) { - var da = (_a3 = this.acroField.getDefaultAppearance()) !== null && _a3 !== void 0 ? _a3 : ""; - var newDa = da + "\n" + setFillingColor(textColor).toString(); - this.acroField.setDefaultAppearance(newDa); - } - return widget; - }; - PDFField2.prototype.updateWidgetAppearanceWithFont = function(widget, font, _a3) { - var normal2 = _a3.normal, rollover = _a3.rollover, down = _a3.down; - this.updateWidgetAppearances(widget, { - normal: this.createAppearanceStream(widget, normal2, font), - rollover: rollover && this.createAppearanceStream(widget, rollover, font), - down: down && this.createAppearanceStream(widget, down, font) - }); - }; - PDFField2.prototype.updateOnOffWidgetAppearance = function(widget, onValue, _a3) { - var normal2 = _a3.normal, rollover = _a3.rollover, down = _a3.down; - this.updateWidgetAppearances(widget, { - normal: this.createAppearanceDict(widget, normal2, onValue), - rollover: rollover && this.createAppearanceDict(widget, rollover, onValue), - down: down && this.createAppearanceDict(widget, down, onValue) - }); - }; - PDFField2.prototype.updateWidgetAppearances = function(widget, _a3) { - var normal2 = _a3.normal, rollover = _a3.rollover, down = _a3.down; - widget.setNormalAppearance(normal2); - if (rollover) { - widget.setRolloverAppearance(rollover); - } else { - widget.removeRolloverAppearance(); - } - if (down) { - widget.setDownAppearance(down); - } else { - widget.removeDownAppearance(); - } - }; - PDFField2.prototype.createAppearanceStream = function(widget, appearance, font) { - var _a3; - var context = this.acroField.dict.context; - var _b3 = widget.getRectangle(), width = _b3.width, height = _b3.height; - var Resources = font && { Font: (_a3 = {}, _a3[font.name] = font.ref, _a3) }; - var stream2 = context.formXObject(appearance, { - Resources, - BBox: context.obj([0, 0, width, height]), - Matrix: context.obj([1, 0, 0, 1, 0, 0]) - }); - var streamRef = context.register(stream2); - return streamRef; - }; - PDFField2.prototype.createImageAppearanceStream = function(widget, image, alignment) { - var _a3; - var _b3; - var context = this.acroField.dict.context; - var rectangle = widget.getRectangle(); - var ap = widget.getAppearanceCharacteristics(); - var bs = widget.getBorderStyle(); - var borderWidth = (_b3 = bs === null || bs === void 0 ? void 0 : bs.getWidth()) !== null && _b3 !== void 0 ? _b3 : 0; - var rotation = reduceRotation(ap === null || ap === void 0 ? void 0 : ap.getRotation()); - var rotate = rotateInPlace(__assign(__assign({}, rectangle), { rotation })); - var adj = adjustDimsForRotation(rectangle, rotation); - var imageDims = image.scaleToFit(adj.width - borderWidth * 2, adj.height - borderWidth * 2); - var options = { - x: borderWidth, - y: borderWidth, - width: imageDims.width, - height: imageDims.height, - // - rotate: degrees(0), - xSkew: degrees(0), - ySkew: degrees(0) - }; - if (alignment === ImageAlignment.Center) { - options.x += (adj.width - borderWidth * 2) / 2 - imageDims.width / 2; - options.y += (adj.height - borderWidth * 2) / 2 - imageDims.height / 2; - } else if (alignment === ImageAlignment.Right) { - options.x = adj.width - borderWidth - imageDims.width; - options.y = adj.height - borderWidth - imageDims.height; - } - var imageName = this.doc.context.addRandomSuffix("Image", 10); - var appearance = __spreadArrays(rotate, drawImage(imageName, options)); - var Resources = { XObject: (_a3 = {}, _a3[imageName] = image.ref, _a3) }; - var stream2 = context.formXObject(appearance, { - Resources, - BBox: context.obj([0, 0, rectangle.width, rectangle.height]), - Matrix: context.obj([1, 0, 0, 1, 0, 0]) - }); - return context.register(stream2); - }; - PDFField2.prototype.createAppearanceDict = function(widget, appearance, onValue) { - var context = this.acroField.dict.context; - var onStreamRef = this.createAppearanceStream(widget, appearance.on); - var offStreamRef = this.createAppearanceStream(widget, appearance.off); - var appearanceDict = context.obj({}); - appearanceDict.set(onValue, onStreamRef); - appearanceDict.set(PDFName_default.of("Off"), offStreamRef); - return appearanceDict; - }; - return PDFField2; - }() -); -var PDFField_default = PDFField; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFCheckBox.js -var PDFCheckBox = ( - /** @class */ - function(_super) { - __extends(PDFCheckBox2, _super); - function PDFCheckBox2(acroCheckBox, ref, doc) { - var _this = _super.call(this, acroCheckBox, ref, doc) || this; - assertIs(acroCheckBox, "acroCheckBox", [ - [PDFAcroCheckBox_default, "PDFAcroCheckBox"] - ]); - _this.acroField = acroCheckBox; - return _this; - } - PDFCheckBox2.prototype.check = function() { - var _a3; - var onValue = (_a3 = this.acroField.getOnValue()) !== null && _a3 !== void 0 ? _a3 : PDFName_default.of("Yes"); - this.markAsDirty(); - this.acroField.setValue(onValue); - }; - PDFCheckBox2.prototype.uncheck = function() { - this.markAsDirty(); - this.acroField.setValue(PDFName_default.of("Off")); - }; - PDFCheckBox2.prototype.isChecked = function() { - var onValue = this.acroField.getOnValue(); - return !!onValue && onValue === this.acroField.getValue(); - }; - PDFCheckBox2.prototype.addToPage = function(page, options) { - var _a3, _b3, _c2, _d, _e, _f; - assertIs(page, "page", [[PDFPage_default, "PDFPage"]]); - assertFieldAppearanceOptions(options); - if (!options) - options = {}; - if (!("textColor" in options)) - options.textColor = rgb(0, 0, 0); - if (!("backgroundColor" in options)) - options.backgroundColor = rgb(1, 1, 1); - if (!("borderColor" in options)) - options.borderColor = rgb(0, 0, 0); - if (!("borderWidth" in options)) - options.borderWidth = 1; - var widget = this.createWidget({ - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : 0, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : 0, - width: (_c2 = options.width) !== null && _c2 !== void 0 ? _c2 : 50, - height: (_d = options.height) !== null && _d !== void 0 ? _d : 50, - textColor: options.textColor, - backgroundColor: options.backgroundColor, - borderColor: options.borderColor, - borderWidth: (_e = options.borderWidth) !== null && _e !== void 0 ? _e : 0, - rotate: (_f = options.rotate) !== null && _f !== void 0 ? _f : degrees(0), - hidden: options.hidden, - page: page.ref - }); - var widgetRef = this.doc.context.register(widget.dict); - this.acroField.addWidget(widgetRef); - widget.setAppearanceState(PDFName_default.of("Off")); - this.updateWidgetAppearance(widget, PDFName_default.of("Yes")); - page.node.addAnnot(widgetRef); - }; - PDFCheckBox2.prototype.needsAppearancesUpdate = function() { - var _a3; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var state2 = widget.getAppearanceState(); - var normal2 = (_a3 = widget.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal; - if (!(normal2 instanceof PDFDict_default)) - return true; - if (state2 && !normal2.has(state2)) - return true; - } - return false; - }; - PDFCheckBox2.prototype.defaultUpdateAppearances = function() { - this.updateAppearances(); - }; - PDFCheckBox2.prototype.updateAppearances = function(provider) { - var _a3; - assertOrUndefined(provider, "provider", [Function]); - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var onValue = (_a3 = widget.getOnValue()) !== null && _a3 !== void 0 ? _a3 : PDFName_default.of("Yes"); - if (!onValue) - continue; - this.updateWidgetAppearance(widget, onValue, provider); - } - this.markAsClean(); - }; - PDFCheckBox2.prototype.updateWidgetAppearance = function(widget, onValue, provider) { - var apProvider = provider !== null && provider !== void 0 ? provider : defaultCheckBoxAppearanceProvider; - var appearances = normalizeAppearance(apProvider(this, widget)); - this.updateOnOffWidgetAppearance(widget, onValue, appearances); - }; - PDFCheckBox2.of = function(acroCheckBox, ref, doc) { - return new PDFCheckBox2(acroCheckBox, ref, doc); - }; - return PDFCheckBox2; - }(PDFField_default) -); -var PDFCheckBox_default = PDFCheckBox; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFDropdown.js -var PDFDropdown = ( - /** @class */ - function(_super) { - __extends(PDFDropdown2, _super); - function PDFDropdown2(acroComboBox, ref, doc) { - var _this = _super.call(this, acroComboBox, ref, doc) || this; - assertIs(acroComboBox, "acroComboBox", [ - [PDFAcroComboBox_default, "PDFAcroComboBox"] - ]); - _this.acroField = acroComboBox; - return _this; - } - PDFDropdown2.prototype.getOptions = function() { - var rawOptions = this.acroField.getOptions(); - var options = new Array(rawOptions.length); - for (var idx = 0, len = options.length; idx < len; idx++) { - var _a3 = rawOptions[idx], display = _a3.display, value = _a3.value; - options[idx] = (display !== null && display !== void 0 ? display : value).decodeText(); - } - return options; - }; - PDFDropdown2.prototype.getSelected = function() { - var values2 = this.acroField.getValues(); - var selected = new Array(values2.length); - for (var idx = 0, len = values2.length; idx < len; idx++) { - selected[idx] = values2[idx].decodeText(); - } - return selected; - }; - PDFDropdown2.prototype.setOptions = function(options) { - assertIs(options, "options", [Array]); - var optionObjects = new Array(options.length); - for (var idx = 0, len = options.length; idx < len; idx++) { - optionObjects[idx] = { value: PDFHexString_default.fromText(options[idx]) }; - } - this.acroField.setOptions(optionObjects); - }; - PDFDropdown2.prototype.addOptions = function(options) { - assertIs(options, "options", ["string", Array]); - var optionsArr = Array.isArray(options) ? options : [options]; - var existingOptions = this.acroField.getOptions(); - var newOptions = new Array(optionsArr.length); - for (var idx = 0, len = optionsArr.length; idx < len; idx++) { - newOptions[idx] = { value: PDFHexString_default.fromText(optionsArr[idx]) }; - } - this.acroField.setOptions(existingOptions.concat(newOptions)); - }; - PDFDropdown2.prototype.select = function(options, merge2) { - if (merge2 === void 0) { - merge2 = false; - } - assertIs(options, "options", ["string", Array]); - assertIs(merge2, "merge", ["boolean"]); - var optionsArr = Array.isArray(options) ? options : [options]; - var validOptions = this.getOptions(); - var hasCustomOption = optionsArr.find(function(option) { - return !validOptions.includes(option); - }); - if (hasCustomOption) - this.enableEditing(); - this.markAsDirty(); - if (optionsArr.length > 1 || optionsArr.length === 1 && merge2) { - this.enableMultiselect(); - } - var values2 = new Array(optionsArr.length); - for (var idx = 0, len = optionsArr.length; idx < len; idx++) { - values2[idx] = PDFHexString_default.fromText(optionsArr[idx]); - } - if (merge2) { - var existingValues = this.acroField.getValues(); - this.acroField.setValues(existingValues.concat(values2)); - } else { - this.acroField.setValues(values2); - } - }; - PDFDropdown2.prototype.clear = function() { - this.markAsDirty(); - this.acroField.setValues([]); - }; - PDFDropdown2.prototype.setFontSize = function(fontSize) { - assertPositive(fontSize, "fontSize"); - this.acroField.setFontSize(fontSize); - this.markAsDirty(); - }; - PDFDropdown2.prototype.isEditable = function() { - return this.acroField.hasFlag(AcroChoiceFlags.Edit); - }; - PDFDropdown2.prototype.enableEditing = function() { - this.acroField.setFlagTo(AcroChoiceFlags.Edit, true); - }; - PDFDropdown2.prototype.disableEditing = function() { - this.acroField.setFlagTo(AcroChoiceFlags.Edit, false); - }; - PDFDropdown2.prototype.isSorted = function() { - return this.acroField.hasFlag(AcroChoiceFlags.Sort); - }; - PDFDropdown2.prototype.enableSorting = function() { - this.acroField.setFlagTo(AcroChoiceFlags.Sort, true); - }; - PDFDropdown2.prototype.disableSorting = function() { - this.acroField.setFlagTo(AcroChoiceFlags.Sort, false); - }; - PDFDropdown2.prototype.isMultiselect = function() { - return this.acroField.hasFlag(AcroChoiceFlags.MultiSelect); - }; - PDFDropdown2.prototype.enableMultiselect = function() { - this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, true); - }; - PDFDropdown2.prototype.disableMultiselect = function() { - this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, false); - }; - PDFDropdown2.prototype.isSpellChecked = function() { - return !this.acroField.hasFlag(AcroChoiceFlags.DoNotSpellCheck); - }; - PDFDropdown2.prototype.enableSpellChecking = function() { - this.acroField.setFlagTo(AcroChoiceFlags.DoNotSpellCheck, false); - }; - PDFDropdown2.prototype.disableSpellChecking = function() { - this.acroField.setFlagTo(AcroChoiceFlags.DoNotSpellCheck, true); - }; - PDFDropdown2.prototype.isSelectOnClick = function() { - return this.acroField.hasFlag(AcroChoiceFlags.CommitOnSelChange); - }; - PDFDropdown2.prototype.enableSelectOnClick = function() { - this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, true); - }; - PDFDropdown2.prototype.disableSelectOnClick = function() { - this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, false); - }; - PDFDropdown2.prototype.addToPage = function(page, options) { - var _a3, _b3, _c2, _d, _e, _f, _g; - assertIs(page, "page", [[PDFPage_default, "PDFPage"]]); - assertFieldAppearanceOptions(options); - if (!options) - options = {}; - if (!("textColor" in options)) - options.textColor = rgb(0, 0, 0); - if (!("backgroundColor" in options)) - options.backgroundColor = rgb(1, 1, 1); - if (!("borderColor" in options)) - options.borderColor = rgb(0, 0, 0); - if (!("borderWidth" in options)) - options.borderWidth = 1; - var widget = this.createWidget({ - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : 0, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : 0, - width: (_c2 = options.width) !== null && _c2 !== void 0 ? _c2 : 200, - height: (_d = options.height) !== null && _d !== void 0 ? _d : 50, - textColor: options.textColor, - backgroundColor: options.backgroundColor, - borderColor: options.borderColor, - borderWidth: (_e = options.borderWidth) !== null && _e !== void 0 ? _e : 0, - rotate: (_f = options.rotate) !== null && _f !== void 0 ? _f : degrees(0), - hidden: options.hidden, - page: page.ref - }); - var widgetRef = this.doc.context.register(widget.dict); - this.acroField.addWidget(widgetRef); - var font = (_g = options.font) !== null && _g !== void 0 ? _g : this.doc.getForm().getDefaultFont(); - this.updateWidgetAppearance(widget, font); - page.node.addAnnot(widgetRef); - }; - PDFDropdown2.prototype.needsAppearancesUpdate = function() { - var _a3; - if (this.isDirty()) - return true; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var hasAppearances = ((_a3 = widget.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal) instanceof PDFStream_default; - if (!hasAppearances) - return true; - } - return false; - }; - PDFDropdown2.prototype.defaultUpdateAppearances = function(font) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - this.updateAppearances(font); - }; - PDFDropdown2.prototype.updateAppearances = function(font, provider) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - assertOrUndefined(provider, "provider", [Function]); - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - this.updateWidgetAppearance(widget, font, provider); - } - this.markAsClean(); - }; - PDFDropdown2.prototype.updateWidgetAppearance = function(widget, font, provider) { - var apProvider = provider !== null && provider !== void 0 ? provider : defaultDropdownAppearanceProvider; - var appearances = normalizeAppearance(apProvider(this, widget, font)); - this.updateWidgetAppearanceWithFont(widget, font, appearances); - }; - PDFDropdown2.of = function(acroComboBox, ref, doc) { - return new PDFDropdown2(acroComboBox, ref, doc); - }; - return PDFDropdown2; - }(PDFField_default) -); -var PDFDropdown_default = PDFDropdown; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFOptionList.js -var PDFOptionList = ( - /** @class */ - function(_super) { - __extends(PDFOptionList2, _super); - function PDFOptionList2(acroListBox, ref, doc) { - var _this = _super.call(this, acroListBox, ref, doc) || this; - assertIs(acroListBox, "acroListBox", [[PDFAcroListBox_default, "PDFAcroListBox"]]); - _this.acroField = acroListBox; - return _this; - } - PDFOptionList2.prototype.getOptions = function() { - var rawOptions = this.acroField.getOptions(); - var options = new Array(rawOptions.length); - for (var idx = 0, len = options.length; idx < len; idx++) { - var _a3 = rawOptions[idx], display = _a3.display, value = _a3.value; - options[idx] = (display !== null && display !== void 0 ? display : value).decodeText(); - } - return options; - }; - PDFOptionList2.prototype.getSelected = function() { - var values2 = this.acroField.getValues(); - var selected = new Array(values2.length); - for (var idx = 0, len = values2.length; idx < len; idx++) { - selected[idx] = values2[idx].decodeText(); - } - return selected; - }; - PDFOptionList2.prototype.setOptions = function(options) { - assertIs(options, "options", [Array]); - this.markAsDirty(); - var optionObjects = new Array(options.length); - for (var idx = 0, len = options.length; idx < len; idx++) { - optionObjects[idx] = { value: PDFHexString_default.fromText(options[idx]) }; - } - this.acroField.setOptions(optionObjects); - }; - PDFOptionList2.prototype.addOptions = function(options) { - assertIs(options, "options", ["string", Array]); - this.markAsDirty(); - var optionsArr = Array.isArray(options) ? options : [options]; - var existingOptions = this.acroField.getOptions(); - var newOptions = new Array(optionsArr.length); - for (var idx = 0, len = optionsArr.length; idx < len; idx++) { - newOptions[idx] = { value: PDFHexString_default.fromText(optionsArr[idx]) }; - } - this.acroField.setOptions(existingOptions.concat(newOptions)); - }; - PDFOptionList2.prototype.select = function(options, merge2) { - if (merge2 === void 0) { - merge2 = false; - } - assertIs(options, "options", ["string", Array]); - assertIs(merge2, "merge", ["boolean"]); - var optionsArr = Array.isArray(options) ? options : [options]; - var validOptions = this.getOptions(); - assertIsSubset(optionsArr, "option", validOptions); - this.markAsDirty(); - if (optionsArr.length > 1 || optionsArr.length === 1 && merge2) { - this.enableMultiselect(); - } - var values2 = new Array(optionsArr.length); - for (var idx = 0, len = optionsArr.length; idx < len; idx++) { - values2[idx] = PDFHexString_default.fromText(optionsArr[idx]); - } - if (merge2) { - var existingValues = this.acroField.getValues(); - this.acroField.setValues(existingValues.concat(values2)); - } else { - this.acroField.setValues(values2); - } - }; - PDFOptionList2.prototype.clear = function() { - this.markAsDirty(); - this.acroField.setValues([]); - }; - PDFOptionList2.prototype.setFontSize = function(fontSize) { - assertPositive(fontSize, "fontSize"); - this.acroField.setFontSize(fontSize); - this.markAsDirty(); - }; - PDFOptionList2.prototype.isSorted = function() { - return this.acroField.hasFlag(AcroChoiceFlags.Sort); - }; - PDFOptionList2.prototype.enableSorting = function() { - this.acroField.setFlagTo(AcroChoiceFlags.Sort, true); - }; - PDFOptionList2.prototype.disableSorting = function() { - this.acroField.setFlagTo(AcroChoiceFlags.Sort, false); - }; - PDFOptionList2.prototype.isMultiselect = function() { - return this.acroField.hasFlag(AcroChoiceFlags.MultiSelect); - }; - PDFOptionList2.prototype.enableMultiselect = function() { - this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, true); - }; - PDFOptionList2.prototype.disableMultiselect = function() { - this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, false); - }; - PDFOptionList2.prototype.isSelectOnClick = function() { - return this.acroField.hasFlag(AcroChoiceFlags.CommitOnSelChange); - }; - PDFOptionList2.prototype.enableSelectOnClick = function() { - this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, true); - }; - PDFOptionList2.prototype.disableSelectOnClick = function() { - this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, false); - }; - PDFOptionList2.prototype.addToPage = function(page, options) { - var _a3, _b3, _c2, _d, _e, _f, _g; - assertIs(page, "page", [[PDFPage_default, "PDFPage"]]); - assertFieldAppearanceOptions(options); - if (!options) - options = {}; - if (!("textColor" in options)) - options.textColor = rgb(0, 0, 0); - if (!("backgroundColor" in options)) - options.backgroundColor = rgb(1, 1, 1); - if (!("borderColor" in options)) - options.borderColor = rgb(0, 0, 0); - if (!("borderWidth" in options)) - options.borderWidth = 1; - var widget = this.createWidget({ - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : 0, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : 0, - width: (_c2 = options.width) !== null && _c2 !== void 0 ? _c2 : 200, - height: (_d = options.height) !== null && _d !== void 0 ? _d : 100, - textColor: options.textColor, - backgroundColor: options.backgroundColor, - borderColor: options.borderColor, - borderWidth: (_e = options.borderWidth) !== null && _e !== void 0 ? _e : 0, - rotate: (_f = options.rotate) !== null && _f !== void 0 ? _f : degrees(0), - hidden: options.hidden, - page: page.ref - }); - var widgetRef = this.doc.context.register(widget.dict); - this.acroField.addWidget(widgetRef); - var font = (_g = options.font) !== null && _g !== void 0 ? _g : this.doc.getForm().getDefaultFont(); - this.updateWidgetAppearance(widget, font); - page.node.addAnnot(widgetRef); - }; - PDFOptionList2.prototype.needsAppearancesUpdate = function() { - var _a3; - if (this.isDirty()) - return true; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var hasAppearances = ((_a3 = widget.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal) instanceof PDFStream_default; - if (!hasAppearances) - return true; - } - return false; - }; - PDFOptionList2.prototype.defaultUpdateAppearances = function(font) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - this.updateAppearances(font); - }; - PDFOptionList2.prototype.updateAppearances = function(font, provider) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - assertOrUndefined(provider, "provider", [Function]); - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - this.updateWidgetAppearance(widget, font, provider); - } - this.markAsClean(); - }; - PDFOptionList2.prototype.updateWidgetAppearance = function(widget, font, provider) { - var apProvider = provider !== null && provider !== void 0 ? provider : defaultOptionListAppearanceProvider; - var appearances = normalizeAppearance(apProvider(this, widget, font)); - this.updateWidgetAppearanceWithFont(widget, font, appearances); - }; - PDFOptionList2.of = function(acroListBox, ref, doc) { - return new PDFOptionList2(acroListBox, ref, doc); - }; - return PDFOptionList2; - }(PDFField_default) -); -var PDFOptionList_default = PDFOptionList; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFRadioGroup.js -var PDFRadioGroup = ( - /** @class */ - function(_super) { - __extends(PDFRadioGroup2, _super); - function PDFRadioGroup2(acroRadioButton, ref, doc) { - var _this = _super.call(this, acroRadioButton, ref, doc) || this; - assertIs(acroRadioButton, "acroRadioButton", [ - [PDFAcroRadioButton_default, "PDFAcroRadioButton"] - ]); - _this.acroField = acroRadioButton; - return _this; - } - PDFRadioGroup2.prototype.getOptions = function() { - var exportValues = this.acroField.getExportValues(); - if (exportValues) { - var exportOptions = new Array(exportValues.length); - for (var idx = 0, len = exportValues.length; idx < len; idx++) { - exportOptions[idx] = exportValues[idx].decodeText(); - } - return exportOptions; - } - var onValues = this.acroField.getOnValues(); - var onOptions = new Array(onValues.length); - for (var idx = 0, len = onOptions.length; idx < len; idx++) { - onOptions[idx] = onValues[idx].decodeText(); - } - return onOptions; - }; - PDFRadioGroup2.prototype.getSelected = function() { - var value = this.acroField.getValue(); - if (value === PDFName_default.of("Off")) - return void 0; - var exportValues = this.acroField.getExportValues(); - if (exportValues) { - var onValues = this.acroField.getOnValues(); - for (var idx = 0, len = onValues.length; idx < len; idx++) { - if (onValues[idx] === value) - return exportValues[idx].decodeText(); - } - } - return value.decodeText(); - }; - PDFRadioGroup2.prototype.select = function(option) { - assertIs(option, "option", ["string"]); - var validOptions = this.getOptions(); - assertIsOneOf(option, "option", validOptions); - this.markAsDirty(); - var onValues = this.acroField.getOnValues(); - var exportValues = this.acroField.getExportValues(); - if (exportValues) { - for (var idx = 0, len = exportValues.length; idx < len; idx++) { - if (exportValues[idx].decodeText() === option) { - this.acroField.setValue(onValues[idx]); - } - } - } else { - for (var idx = 0, len = onValues.length; idx < len; idx++) { - var value = onValues[idx]; - if (value.decodeText() === option) - this.acroField.setValue(value); - } - } - }; - PDFRadioGroup2.prototype.clear = function() { - this.markAsDirty(); - this.acroField.setValue(PDFName_default.of("Off")); - }; - PDFRadioGroup2.prototype.isOffToggleable = function() { - return !this.acroField.hasFlag(AcroButtonFlags.NoToggleToOff); - }; - PDFRadioGroup2.prototype.enableOffToggling = function() { - this.acroField.setFlagTo(AcroButtonFlags.NoToggleToOff, false); - }; - PDFRadioGroup2.prototype.disableOffToggling = function() { - this.acroField.setFlagTo(AcroButtonFlags.NoToggleToOff, true); - }; - PDFRadioGroup2.prototype.isMutuallyExclusive = function() { - return !this.acroField.hasFlag(AcroButtonFlags.RadiosInUnison); - }; - PDFRadioGroup2.prototype.enableMutualExclusion = function() { - this.acroField.setFlagTo(AcroButtonFlags.RadiosInUnison, false); - }; - PDFRadioGroup2.prototype.disableMutualExclusion = function() { - this.acroField.setFlagTo(AcroButtonFlags.RadiosInUnison, true); - }; - PDFRadioGroup2.prototype.addOptionToPage = function(option, page, options) { - var _a3, _b3, _c2, _d, _e, _f, _g, _h, _j; - assertIs(option, "option", ["string"]); - assertIs(page, "page", [[PDFPage_default, "PDFPage"]]); - assertFieldAppearanceOptions(options); - var widget = this.createWidget({ - x: (_a3 = options === null || options === void 0 ? void 0 : options.x) !== null && _a3 !== void 0 ? _a3 : 0, - y: (_b3 = options === null || options === void 0 ? void 0 : options.y) !== null && _b3 !== void 0 ? _b3 : 0, - width: (_c2 = options === null || options === void 0 ? void 0 : options.width) !== null && _c2 !== void 0 ? _c2 : 50, - height: (_d = options === null || options === void 0 ? void 0 : options.height) !== null && _d !== void 0 ? _d : 50, - textColor: (_e = options === null || options === void 0 ? void 0 : options.textColor) !== null && _e !== void 0 ? _e : rgb(0, 0, 0), - backgroundColor: (_f = options === null || options === void 0 ? void 0 : options.backgroundColor) !== null && _f !== void 0 ? _f : rgb(1, 1, 1), - borderColor: (_g = options === null || options === void 0 ? void 0 : options.borderColor) !== null && _g !== void 0 ? _g : rgb(0, 0, 0), - borderWidth: (_h = options === null || options === void 0 ? void 0 : options.borderWidth) !== null && _h !== void 0 ? _h : 1, - rotate: (_j = options === null || options === void 0 ? void 0 : options.rotate) !== null && _j !== void 0 ? _j : degrees(0), - hidden: options === null || options === void 0 ? void 0 : options.hidden, - page: page.ref - }); - var widgetRef = this.doc.context.register(widget.dict); - var apStateValue = this.acroField.addWidgetWithOpt(widgetRef, PDFHexString_default.fromText(option), !this.isMutuallyExclusive()); - widget.setAppearanceState(PDFName_default.of("Off")); - this.updateWidgetAppearance(widget, apStateValue); - page.node.addAnnot(widgetRef); - }; - PDFRadioGroup2.prototype.needsAppearancesUpdate = function() { - var _a3; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var state2 = widget.getAppearanceState(); - var normal2 = (_a3 = widget.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal; - if (!(normal2 instanceof PDFDict_default)) - return true; - if (state2 && !normal2.has(state2)) - return true; - } - return false; - }; - PDFRadioGroup2.prototype.defaultUpdateAppearances = function() { - this.updateAppearances(); - }; - PDFRadioGroup2.prototype.updateAppearances = function(provider) { - assertOrUndefined(provider, "provider", [Function]); - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var onValue = widget.getOnValue(); - if (!onValue) - continue; - this.updateWidgetAppearance(widget, onValue, provider); - } - }; - PDFRadioGroup2.prototype.updateWidgetAppearance = function(widget, onValue, provider) { - var apProvider = provider !== null && provider !== void 0 ? provider : defaultRadioGroupAppearanceProvider; - var appearances = normalizeAppearance(apProvider(this, widget)); - this.updateOnOffWidgetAppearance(widget, onValue, appearances); - }; - PDFRadioGroup2.of = function(acroRadioButton, ref, doc) { - return new PDFRadioGroup2(acroRadioButton, ref, doc); - }; - return PDFRadioGroup2; - }(PDFField_default) -); -var PDFRadioGroup_default = PDFRadioGroup; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFSignature.js -var PDFSignature = ( - /** @class */ - function(_super) { - __extends(PDFSignature2, _super); - function PDFSignature2(acroSignature, ref, doc) { - var _this = _super.call(this, acroSignature, ref, doc) || this; - assertIs(acroSignature, "acroSignature", [ - [PDFAcroSignature_default, "PDFAcroSignature"] - ]); - _this.acroField = acroSignature; - return _this; - } - PDFSignature2.prototype.needsAppearancesUpdate = function() { - return false; - }; - PDFSignature2.of = function(acroSignature, ref, doc) { - return new PDFSignature2(acroSignature, ref, doc); - }; - return PDFSignature2; - }(PDFField_default) -); -var PDFSignature_default = PDFSignature; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFTextField.js -var PDFTextField = ( - /** @class */ - function(_super) { - __extends(PDFTextField2, _super); - function PDFTextField2(acroText, ref, doc) { - var _this = _super.call(this, acroText, ref, doc) || this; - assertIs(acroText, "acroText", [[PDFAcroText_default, "PDFAcroText"]]); - _this.acroField = acroText; - return _this; - } - PDFTextField2.prototype.getText = function() { - var value = this.acroField.getValue(); - if (!value && this.isRichFormatted()) { - throw new RichTextFieldReadError(this.getName()); - } - return value === null || value === void 0 ? void 0 : value.decodeText(); - }; - PDFTextField2.prototype.setText = function(text2) { - assertOrUndefined(text2, "text", ["string"]); - var maxLength = this.getMaxLength(); - if (maxLength !== void 0 && text2 && text2.length > maxLength) { - throw new ExceededMaxLengthError(text2.length, maxLength, this.getName()); - } - this.markAsDirty(); - this.disableRichFormatting(); - if (text2) { - this.acroField.setValue(PDFHexString_default.fromText(text2)); - } else { - this.acroField.removeValue(); - } - }; - PDFTextField2.prototype.getAlignment = function() { - var quadding = this.acroField.getQuadding(); - return quadding === 0 ? TextAlignment.Left : quadding === 1 ? TextAlignment.Center : quadding === 2 ? TextAlignment.Right : TextAlignment.Left; - }; - PDFTextField2.prototype.setAlignment = function(alignment) { - assertIsOneOf(alignment, "alignment", TextAlignment); - this.markAsDirty(); - this.acroField.setQuadding(alignment); - }; - PDFTextField2.prototype.getMaxLength = function() { - return this.acroField.getMaxLength(); - }; - PDFTextField2.prototype.setMaxLength = function(maxLength) { - assertRangeOrUndefined(maxLength, "maxLength", 0, Number.MAX_SAFE_INTEGER); - this.markAsDirty(); - if (maxLength === void 0) { - this.acroField.removeMaxLength(); - } else { - var text2 = this.getText(); - if (text2 && text2.length > maxLength) { - throw new InvalidMaxLengthError(text2.length, maxLength, this.getName()); - } - this.acroField.setMaxLength(maxLength); - } - }; - PDFTextField2.prototype.removeMaxLength = function() { - this.markAsDirty(); - this.acroField.removeMaxLength(); - }; - PDFTextField2.prototype.setImage = function(image) { - var fieldAlignment = this.getAlignment(); - var alignment = fieldAlignment === TextAlignment.Center ? ImageAlignment.Center : fieldAlignment === TextAlignment.Right ? ImageAlignment.Right : ImageAlignment.Left; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var streamRef = this.createImageAppearanceStream(widget, image, alignment); - this.updateWidgetAppearances(widget, { normal: streamRef }); - } - this.markAsClean(); - }; - PDFTextField2.prototype.setFontSize = function(fontSize) { - assertPositive(fontSize, "fontSize"); - this.acroField.setFontSize(fontSize); - this.markAsDirty(); - }; - PDFTextField2.prototype.isMultiline = function() { - return this.acroField.hasFlag(AcroTextFlags.Multiline); - }; - PDFTextField2.prototype.enableMultiline = function() { - this.markAsDirty(); - this.acroField.setFlagTo(AcroTextFlags.Multiline, true); - }; - PDFTextField2.prototype.disableMultiline = function() { - this.markAsDirty(); - this.acroField.setFlagTo(AcroTextFlags.Multiline, false); - }; - PDFTextField2.prototype.isPassword = function() { - return this.acroField.hasFlag(AcroTextFlags.Password); - }; - PDFTextField2.prototype.enablePassword = function() { - this.acroField.setFlagTo(AcroTextFlags.Password, true); - }; - PDFTextField2.prototype.disablePassword = function() { - this.acroField.setFlagTo(AcroTextFlags.Password, false); - }; - PDFTextField2.prototype.isFileSelector = function() { - return this.acroField.hasFlag(AcroTextFlags.FileSelect); - }; - PDFTextField2.prototype.enableFileSelection = function() { - this.acroField.setFlagTo(AcroTextFlags.FileSelect, true); - }; - PDFTextField2.prototype.disableFileSelection = function() { - this.acroField.setFlagTo(AcroTextFlags.FileSelect, false); - }; - PDFTextField2.prototype.isSpellChecked = function() { - return !this.acroField.hasFlag(AcroTextFlags.DoNotSpellCheck); - }; - PDFTextField2.prototype.enableSpellChecking = function() { - this.acroField.setFlagTo(AcroTextFlags.DoNotSpellCheck, false); - }; - PDFTextField2.prototype.disableSpellChecking = function() { - this.acroField.setFlagTo(AcroTextFlags.DoNotSpellCheck, true); - }; - PDFTextField2.prototype.isScrollable = function() { - return !this.acroField.hasFlag(AcroTextFlags.DoNotScroll); - }; - PDFTextField2.prototype.enableScrolling = function() { - this.acroField.setFlagTo(AcroTextFlags.DoNotScroll, false); - }; - PDFTextField2.prototype.disableScrolling = function() { - this.acroField.setFlagTo(AcroTextFlags.DoNotScroll, true); - }; - PDFTextField2.prototype.isCombed = function() { - return this.acroField.hasFlag(AcroTextFlags.Comb) && !this.isMultiline() && !this.isPassword() && !this.isFileSelector() && this.getMaxLength() !== void 0; - }; - PDFTextField2.prototype.enableCombing = function() { - if (this.getMaxLength() === void 0) { - var msg = "PDFTextFields must have a max length in order to be combed"; - console.warn(msg); - } - this.markAsDirty(); - this.disableMultiline(); - this.disablePassword(); - this.disableFileSelection(); - this.acroField.setFlagTo(AcroTextFlags.Comb, true); - }; - PDFTextField2.prototype.disableCombing = function() { - this.markAsDirty(); - this.acroField.setFlagTo(AcroTextFlags.Comb, false); - }; - PDFTextField2.prototype.isRichFormatted = function() { - return this.acroField.hasFlag(AcroTextFlags.RichText); - }; - PDFTextField2.prototype.enableRichFormatting = function() { - this.acroField.setFlagTo(AcroTextFlags.RichText, true); - }; - PDFTextField2.prototype.disableRichFormatting = function() { - this.acroField.setFlagTo(AcroTextFlags.RichText, false); - }; - PDFTextField2.prototype.addToPage = function(page, options) { - var _a3, _b3, _c2, _d, _e, _f, _g; - assertIs(page, "page", [[PDFPage_default, "PDFPage"]]); - assertFieldAppearanceOptions(options); - if (!options) - options = {}; - if (!("textColor" in options)) - options.textColor = rgb(0, 0, 0); - if (!("backgroundColor" in options)) - options.backgroundColor = rgb(1, 1, 1); - if (!("borderColor" in options)) - options.borderColor = rgb(0, 0, 0); - if (!("borderWidth" in options)) - options.borderWidth = 1; - var widget = this.createWidget({ - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : 0, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : 0, - width: (_c2 = options.width) !== null && _c2 !== void 0 ? _c2 : 200, - height: (_d = options.height) !== null && _d !== void 0 ? _d : 50, - textColor: options.textColor, - backgroundColor: options.backgroundColor, - borderColor: options.borderColor, - borderWidth: (_e = options.borderWidth) !== null && _e !== void 0 ? _e : 0, - rotate: (_f = options.rotate) !== null && _f !== void 0 ? _f : degrees(0), - hidden: options.hidden, - page: page.ref - }); - var widgetRef = this.doc.context.register(widget.dict); - this.acroField.addWidget(widgetRef); - var font = (_g = options.font) !== null && _g !== void 0 ? _g : this.doc.getForm().getDefaultFont(); - this.updateWidgetAppearance(widget, font); - page.node.addAnnot(widgetRef); - }; - PDFTextField2.prototype.needsAppearancesUpdate = function() { - var _a3; - if (this.isDirty()) - return true; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var hasAppearances = ((_a3 = widget.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal) instanceof PDFStream_default; - if (!hasAppearances) - return true; - } - return false; - }; - PDFTextField2.prototype.defaultUpdateAppearances = function(font) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - this.updateAppearances(font); - }; - PDFTextField2.prototype.updateAppearances = function(font, provider) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - assertOrUndefined(provider, "provider", [Function]); - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - this.updateWidgetAppearance(widget, font, provider); - } - this.markAsClean(); - }; - PDFTextField2.prototype.updateWidgetAppearance = function(widget, font, provider) { - var apProvider = provider !== null && provider !== void 0 ? provider : defaultTextFieldAppearanceProvider; - var appearances = normalizeAppearance(apProvider(this, widget, font)); - this.updateWidgetAppearanceWithFont(widget, font, appearances); - }; - PDFTextField2.of = function(acroText, ref, doc) { - return new PDFTextField2(acroText, ref, doc); - }; - return PDFTextField2; - }(PDFField_default) -); -var PDFTextField_default = PDFTextField; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/StandardFonts.js -var StandardFonts; -(function(StandardFonts2) { - StandardFonts2["Courier"] = "Courier"; - StandardFonts2["CourierBold"] = "Courier-Bold"; - StandardFonts2["CourierOblique"] = "Courier-Oblique"; - StandardFonts2["CourierBoldOblique"] = "Courier-BoldOblique"; - StandardFonts2["Helvetica"] = "Helvetica"; - StandardFonts2["HelveticaBold"] = "Helvetica-Bold"; - StandardFonts2["HelveticaOblique"] = "Helvetica-Oblique"; - StandardFonts2["HelveticaBoldOblique"] = "Helvetica-BoldOblique"; - StandardFonts2["TimesRoman"] = "Times-Roman"; - StandardFonts2["TimesRomanBold"] = "Times-Bold"; - StandardFonts2["TimesRomanItalic"] = "Times-Italic"; - StandardFonts2["TimesRomanBoldItalic"] = "Times-BoldItalic"; - StandardFonts2["Symbol"] = "Symbol"; - StandardFonts2["ZapfDingbats"] = "ZapfDingbats"; -})(StandardFonts || (StandardFonts = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFForm.js -var PDFForm = ( - /** @class */ - function() { - function PDFForm2(acroForm, doc) { - var _this = this; - this.embedDefaultFont = function() { - return _this.doc.embedStandardFont(StandardFonts.Helvetica); - }; - assertIs(acroForm, "acroForm", [[PDFAcroForm_default, "PDFAcroForm"]]); - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - this.acroForm = acroForm; - this.doc = doc; - this.dirtyFields = /* @__PURE__ */ new Set(); - this.defaultFontCache = Cache_default.populatedBy(this.embedDefaultFont); - } - PDFForm2.prototype.hasXFA = function() { - return this.acroForm.dict.has(PDFName_default.of("XFA")); - }; - PDFForm2.prototype.deleteXFA = function() { - this.acroForm.dict.delete(PDFName_default.of("XFA")); - }; - PDFForm2.prototype.getFields = function() { - var allFields = this.acroForm.getAllFields(); - var fields = []; - for (var idx = 0, len = allFields.length; idx < len; idx++) { - var _a3 = allFields[idx], acroField = _a3[0], ref = _a3[1]; - var field = convertToPDFField(acroField, ref, this.doc); - if (field) - fields.push(field); - } - return fields; - }; - PDFForm2.prototype.getFieldMaybe = function(name) { - assertIs(name, "name", ["string"]); - var fields = this.getFields(); - for (var idx = 0, len = fields.length; idx < len; idx++) { - var field = fields[idx]; - if (field.getName() === name) - return field; - } - return void 0; - }; - PDFForm2.prototype.getField = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getFieldMaybe(name); - if (field) - return field; - throw new NoSuchFieldError(name); - }; - PDFForm2.prototype.getButton = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFButton_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFButton_default, field); - }; - PDFForm2.prototype.getCheckBox = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFCheckBox_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFCheckBox_default, field); - }; - PDFForm2.prototype.getDropdown = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFDropdown_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFDropdown_default, field); - }; - PDFForm2.prototype.getOptionList = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFOptionList_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFOptionList_default, field); - }; - PDFForm2.prototype.getRadioGroup = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFRadioGroup_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFRadioGroup_default, field); - }; - PDFForm2.prototype.getSignature = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFSignature_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFSignature_default, field); - }; - PDFForm2.prototype.getTextField = function(name) { - assertIs(name, "name", ["string"]); - var field = this.getField(name); - if (field instanceof PDFTextField_default) - return field; - throw new UnexpectedFieldTypeError(name, PDFTextField_default, field); - }; - PDFForm2.prototype.createButton = function(name) { - assertIs(name, "name", ["string"]); - var nameParts = splitFieldName(name); - var parent = this.findOrCreateNonTerminals(nameParts.nonTerminal); - var button = PDFAcroPushButton_default.create(this.doc.context); - button.setPartialName(nameParts.terminal); - addFieldToParent(parent, [button, button.ref], nameParts.terminal); - return PDFButton_default.of(button, button.ref, this.doc); - }; - PDFForm2.prototype.createCheckBox = function(name) { - assertIs(name, "name", ["string"]); - var nameParts = splitFieldName(name); - var parent = this.findOrCreateNonTerminals(nameParts.nonTerminal); - var checkBox = PDFAcroCheckBox_default.create(this.doc.context); - checkBox.setPartialName(nameParts.terminal); - addFieldToParent(parent, [checkBox, checkBox.ref], nameParts.terminal); - return PDFCheckBox_default.of(checkBox, checkBox.ref, this.doc); - }; - PDFForm2.prototype.createDropdown = function(name) { - assertIs(name, "name", ["string"]); - var nameParts = splitFieldName(name); - var parent = this.findOrCreateNonTerminals(nameParts.nonTerminal); - var comboBox = PDFAcroComboBox_default.create(this.doc.context); - comboBox.setPartialName(nameParts.terminal); - addFieldToParent(parent, [comboBox, comboBox.ref], nameParts.terminal); - return PDFDropdown_default.of(comboBox, comboBox.ref, this.doc); - }; - PDFForm2.prototype.createOptionList = function(name) { - assertIs(name, "name", ["string"]); - var nameParts = splitFieldName(name); - var parent = this.findOrCreateNonTerminals(nameParts.nonTerminal); - var listBox = PDFAcroListBox_default.create(this.doc.context); - listBox.setPartialName(nameParts.terminal); - addFieldToParent(parent, [listBox, listBox.ref], nameParts.terminal); - return PDFOptionList_default.of(listBox, listBox.ref, this.doc); - }; - PDFForm2.prototype.createRadioGroup = function(name) { - assertIs(name, "name", ["string"]); - var nameParts = splitFieldName(name); - var parent = this.findOrCreateNonTerminals(nameParts.nonTerminal); - var radioButton = PDFAcroRadioButton_default.create(this.doc.context); - radioButton.setPartialName(nameParts.terminal); - addFieldToParent(parent, [radioButton, radioButton.ref], nameParts.terminal); - return PDFRadioGroup_default.of(radioButton, radioButton.ref, this.doc); - }; - PDFForm2.prototype.createTextField = function(name) { - assertIs(name, "name", ["string"]); - var nameParts = splitFieldName(name); - var parent = this.findOrCreateNonTerminals(nameParts.nonTerminal); - var text2 = PDFAcroText_default.create(this.doc.context); - text2.setPartialName(nameParts.terminal); - addFieldToParent(parent, [text2, text2.ref], nameParts.terminal); - return PDFTextField_default.of(text2, text2.ref, this.doc); - }; - PDFForm2.prototype.flatten = function(options) { - if (options === void 0) { - options = { updateFieldAppearances: true }; - } - if (options.updateFieldAppearances) { - this.updateFieldAppearances(); - } - var fields = this.getFields(); - for (var i = 0, lenFields = fields.length; i < lenFields; i++) { - var field = fields[i]; - var widgets = field.acroField.getWidgets(); - for (var j = 0, lenWidgets = widgets.length; j < lenWidgets; j++) { - var widget = widgets[j]; - var page = this.findWidgetPage(widget); - var widgetRef = this.findWidgetAppearanceRef(field, widget); - var xObjectKey = page.node.newXObject("FlatWidget", widgetRef); - var rectangle = widget.getRectangle(); - var operators = __spreadArrays([ - pushGraphicsState(), - translate(rectangle.x, rectangle.y) - ], rotateInPlace(__assign(__assign({}, rectangle), { rotation: 0 })), [ - drawObject(xObjectKey), - popGraphicsState() - ]).filter(Boolean); - page.pushOperators.apply(page, operators); - } - this.removeField(field); - } - }; - PDFForm2.prototype.removeField = function(field) { - var widgets = field.acroField.getWidgets(); - var pages = /* @__PURE__ */ new Set(); - for (var i = 0, len = widgets.length; i < len; i++) { - var widget = widgets[i]; - var widgetRef = this.findWidgetAppearanceRef(field, widget); - var page = this.findWidgetPage(widget); - pages.add(page); - page.node.removeAnnot(widgetRef); - } - pages.forEach(function(page2) { - return page2.node.removeAnnot(field.ref); - }); - this.acroForm.removeField(field.acroField); - var fieldKids = field.acroField.normalizedEntries().Kids; - var kidsCount = fieldKids.size(); - for (var childIndex = 0; childIndex < kidsCount; childIndex++) { - var child2 = fieldKids.get(childIndex); - if (child2 instanceof PDFRef_default) { - this.doc.context.delete(child2); - } - } - this.doc.context.delete(field.ref); - }; - PDFForm2.prototype.updateFieldAppearances = function(font) { - assertOrUndefined(font, "font", [[PDFFont_default, "PDFFont"]]); - font = font !== null && font !== void 0 ? font : this.getDefaultFont(); - var fields = this.getFields(); - for (var idx = 0, len = fields.length; idx < len; idx++) { - var field = fields[idx]; - if (field.needsAppearancesUpdate()) { - field.defaultUpdateAppearances(font); - } - } - }; - PDFForm2.prototype.markFieldAsDirty = function(fieldRef) { - assertOrUndefined(fieldRef, "fieldRef", [[PDFRef_default, "PDFRef"]]); - this.dirtyFields.add(fieldRef); - }; - PDFForm2.prototype.markFieldAsClean = function(fieldRef) { - assertOrUndefined(fieldRef, "fieldRef", [[PDFRef_default, "PDFRef"]]); - this.dirtyFields.delete(fieldRef); - }; - PDFForm2.prototype.fieldIsDirty = function(fieldRef) { - assertOrUndefined(fieldRef, "fieldRef", [[PDFRef_default, "PDFRef"]]); - return this.dirtyFields.has(fieldRef); - }; - PDFForm2.prototype.getDefaultFont = function() { - return this.defaultFontCache.access(); - }; - PDFForm2.prototype.findWidgetPage = function(widget) { - var pageRef = widget.P(); - var page = this.doc.getPages().find(function(x) { - return x.ref === pageRef; - }); - if (page === void 0) { - var widgetRef = this.doc.context.getObjectRef(widget.dict); - if (widgetRef === void 0) { - throw new Error("Could not find PDFRef for PDFObject"); - } - page = this.doc.findPageForAnnotationRef(widgetRef); - if (page === void 0) { - throw new Error("Could not find page for PDFRef " + widgetRef); - } - } - return page; - }; - PDFForm2.prototype.findWidgetAppearanceRef = function(field, widget) { - var _a3; - var refOrDict = widget.getNormalAppearance(); - if (refOrDict instanceof PDFDict_default && (field instanceof PDFCheckBox_default || field instanceof PDFRadioGroup_default)) { - var value = field.acroField.getValue(); - var ref = (_a3 = refOrDict.get(value)) !== null && _a3 !== void 0 ? _a3 : refOrDict.get(PDFName_default.of("Off")); - if (ref instanceof PDFRef_default) { - refOrDict = ref; - } - } - if (!(refOrDict instanceof PDFRef_default)) { - var name_1 = field.getName(); - throw new Error("Failed to extract appearance ref for: " + name_1); - } - return refOrDict; - }; - PDFForm2.prototype.findOrCreateNonTerminals = function(partialNames) { - var nonTerminal = [ - this.acroForm - ]; - for (var idx = 0, len = partialNames.length; idx < len; idx++) { - var namePart = partialNames[idx]; - if (!namePart) - throw new InvalidFieldNamePartError(namePart); - var parent_1 = nonTerminal[0], parentRef = nonTerminal[1]; - var res = this.findNonTerminal(namePart, parent_1); - if (res) { - nonTerminal = res; - } else { - var node = PDFAcroNonTerminal_default.create(this.doc.context); - node.setPartialName(namePart); - node.setParent(parentRef); - var nodeRef = this.doc.context.register(node.dict); - parent_1.addField(nodeRef); - nonTerminal = [node, nodeRef]; - } - } - return nonTerminal; - }; - PDFForm2.prototype.findNonTerminal = function(partialName, parent) { - var fields = parent instanceof PDFAcroForm_default ? this.acroForm.getFields() : createPDFAcroFields(parent.Kids()); - for (var idx = 0, len = fields.length; idx < len; idx++) { - var _a3 = fields[idx], field = _a3[0], ref = _a3[1]; - if (field.getPartialName() === partialName) { - if (field instanceof PDFAcroNonTerminal_default) - return [field, ref]; - throw new FieldAlreadyExistsError(partialName); - } - } - return void 0; - }; - PDFForm2.of = function(acroForm, doc) { - return new PDFForm2(acroForm, doc); - }; - return PDFForm2; - }() -); -var PDFForm_default = PDFForm; -var convertToPDFField = function(field, ref, doc) { - if (field instanceof PDFAcroPushButton_default) - return PDFButton_default.of(field, ref, doc); - if (field instanceof PDFAcroCheckBox_default) - return PDFCheckBox_default.of(field, ref, doc); - if (field instanceof PDFAcroComboBox_default) - return PDFDropdown_default.of(field, ref, doc); - if (field instanceof PDFAcroListBox_default) - return PDFOptionList_default.of(field, ref, doc); - if (field instanceof PDFAcroText_default) - return PDFTextField_default.of(field, ref, doc); - if (field instanceof PDFAcroRadioButton_default) { - return PDFRadioGroup_default.of(field, ref, doc); - } - if (field instanceof PDFAcroSignature_default) { - return PDFSignature_default.of(field, ref, doc); - } - return void 0; -}; -var splitFieldName = function(fullyQualifiedName) { - if (fullyQualifiedName.length === 0) { - throw new Error("PDF field names must not be empty strings"); - } - var parts = fullyQualifiedName.split("."); - for (var idx = 0, len = parts.length; idx < len; idx++) { - if (parts[idx] === "") { - throw new Error('Periods in PDF field names must be separated by at least one character: "' + fullyQualifiedName + '"'); - } - } - if (parts.length === 1) - return { nonTerminal: [], terminal: parts[0] }; - return { - nonTerminal: parts.slice(0, parts.length - 1), - terminal: parts[parts.length - 1] - }; -}; -var addFieldToParent = function(_a3, _b3, partialName) { - var parent = _a3[0], parentRef = _a3[1]; - var field = _b3[0], fieldRef = _b3[1]; - var entries = parent.normalizedEntries(); - var fields = createPDFAcroFields("Kids" in entries ? entries.Kids : entries.Fields); - for (var idx = 0, len = fields.length; idx < len; idx++) { - if (fields[idx][0].getPartialName() === partialName) { - throw new FieldAlreadyExistsError(partialName); - } - } - parent.addField(fieldRef); - field.setParent(parentRef); -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/sizes.js -var PageSizes = { - "4A0": [4767.87, 6740.79], - "2A0": [3370.39, 4767.87], - A0: [2383.94, 3370.39], - A1: [1683.78, 2383.94], - A2: [1190.55, 1683.78], - A3: [841.89, 1190.55], - A4: [595.28, 841.89], - A5: [419.53, 595.28], - A6: [297.64, 419.53], - A7: [209.76, 297.64], - A8: [147.4, 209.76], - A9: [104.88, 147.4], - A10: [73.7, 104.88], - B0: [2834.65, 4008.19], - B1: [2004.09, 2834.65], - B2: [1417.32, 2004.09], - B3: [1000.63, 1417.32], - B4: [708.66, 1000.63], - B5: [498.9, 708.66], - B6: [354.33, 498.9], - B7: [249.45, 354.33], - B8: [175.75, 249.45], - B9: [124.72, 175.75], - B10: [87.87, 124.72], - C0: [2599.37, 3676.54], - C1: [1836.85, 2599.37], - C2: [1298.27, 1836.85], - C3: [918.43, 1298.27], - C4: [649.13, 918.43], - C5: [459.21, 649.13], - C6: [323.15, 459.21], - C7: [229.61, 323.15], - C8: [161.57, 229.61], - C9: [113.39, 161.57], - C10: [79.37, 113.39], - RA0: [2437.8, 3458.27], - RA1: [1729.13, 2437.8], - RA2: [1218.9, 1729.13], - RA3: [864.57, 1218.9], - RA4: [609.45, 864.57], - SRA0: [2551.18, 3628.35], - SRA1: [1814.17, 2551.18], - SRA2: [1275.59, 1814.17], - SRA3: [907.09, 1275.59], - SRA4: [637.8, 907.09], - Executive: [521.86, 756], - Folio: [612, 936], - Legal: [612, 1008], - Letter: [612, 792], - Tabloid: [792, 1224] -}; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFDocumentOptions.js -var ParseSpeeds; -(function(ParseSpeeds2) { - ParseSpeeds2[ParseSpeeds2["Fastest"] = Infinity] = "Fastest"; - ParseSpeeds2[ParseSpeeds2["Fast"] = 1500] = "Fast"; - ParseSpeeds2[ParseSpeeds2["Medium"] = 500] = "Medium"; - ParseSpeeds2[ParseSpeeds2["Slow"] = 100] = "Slow"; -})(ParseSpeeds || (ParseSpeeds = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFEmbeddedFile.js -var PDFEmbeddedFile = ( - /** @class */ - function() { - function PDFEmbeddedFile2(ref, doc, embedder) { - this.alreadyEmbedded = false; - this.ref = ref; - this.doc = doc; - this.embedder = embedder; - } - PDFEmbeddedFile2.prototype.embed = function() { - return __awaiter(this, void 0, void 0, function() { - var ref, Names, EmbeddedFiles, EFNames, AF; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - if (!!this.alreadyEmbedded) return [3, 2]; - return [4, this.embedder.embedIntoContext(this.doc.context, this.ref)]; - case 1: - ref = _a3.sent(); - if (!this.doc.catalog.has(PDFName_default.of("Names"))) { - this.doc.catalog.set(PDFName_default.of("Names"), this.doc.context.obj({})); - } - Names = this.doc.catalog.lookup(PDFName_default.of("Names"), PDFDict_default); - if (!Names.has(PDFName_default.of("EmbeddedFiles"))) { - Names.set(PDFName_default.of("EmbeddedFiles"), this.doc.context.obj({})); - } - EmbeddedFiles = Names.lookup(PDFName_default.of("EmbeddedFiles"), PDFDict_default); - if (!EmbeddedFiles.has(PDFName_default.of("Names"))) { - EmbeddedFiles.set(PDFName_default.of("Names"), this.doc.context.obj([])); - } - EFNames = EmbeddedFiles.lookup(PDFName_default.of("Names"), PDFArray_default); - EFNames.push(PDFHexString_default.fromText(this.embedder.fileName)); - EFNames.push(ref); - if (!this.doc.catalog.has(PDFName_default.of("AF"))) { - this.doc.catalog.set(PDFName_default.of("AF"), this.doc.context.obj([])); - } - AF = this.doc.catalog.lookup(PDFName_default.of("AF"), PDFArray_default); - AF.push(ref); - this.alreadyEmbedded = true; - _a3.label = 2; - case 2: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFEmbeddedFile2.of = function(ref, doc, embedder) { - return new PDFEmbeddedFile2(ref, doc, embedder); - }; - return PDFEmbeddedFile2; - }() -); -var PDFEmbeddedFile_default = PDFEmbeddedFile; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFJavaScript.js -var PDFJavaScript = ( - /** @class */ - function() { - function PDFJavaScript2(ref, doc, embedder) { - this.alreadyEmbedded = false; - this.ref = ref; - this.doc = doc; - this.embedder = embedder; - } - PDFJavaScript2.prototype.embed = function() { - return __awaiter(this, void 0, void 0, function() { - var _a3, catalog, context, ref, Names, Javascript, JSNames; - return __generator(this, function(_b3) { - switch (_b3.label) { - case 0: - if (!!this.alreadyEmbedded) return [3, 2]; - _a3 = this.doc, catalog = _a3.catalog, context = _a3.context; - return [4, this.embedder.embedIntoContext(this.doc.context, this.ref)]; - case 1: - ref = _b3.sent(); - if (!catalog.has(PDFName_default.of("Names"))) { - catalog.set(PDFName_default.of("Names"), context.obj({})); - } - Names = catalog.lookup(PDFName_default.of("Names"), PDFDict_default); - if (!Names.has(PDFName_default.of("JavaScript"))) { - Names.set(PDFName_default.of("JavaScript"), context.obj({})); - } - Javascript = Names.lookup(PDFName_default.of("JavaScript"), PDFDict_default); - if (!Javascript.has(PDFName_default.of("Names"))) { - Javascript.set(PDFName_default.of("Names"), context.obj([])); - } - JSNames = Javascript.lookup(PDFName_default.of("Names"), PDFArray_default); - JSNames.push(PDFHexString_default.fromText(this.embedder.scriptName)); - JSNames.push(ref); - this.alreadyEmbedded = true; - _b3.label = 2; - case 2: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFJavaScript2.of = function(ref, doc, embedder) { - return new PDFJavaScript2(ref, doc, embedder); - }; - return PDFJavaScript2; - }() -); -var PDFJavaScript_default = PDFJavaScript; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/core/embedders/JavaScriptEmbedder.js -var JavaScriptEmbedder = ( - /** @class */ - function() { - function JavaScriptEmbedder2(script, scriptName) { - this.script = script; - this.scriptName = scriptName; - } - JavaScriptEmbedder2.for = function(script, scriptName) { - return new JavaScriptEmbedder2(script, scriptName); - }; - JavaScriptEmbedder2.prototype.embedIntoContext = function(context, ref) { - return __awaiter(this, void 0, void 0, function() { - var jsActionDict; - return __generator(this, function(_a3) { - jsActionDict = context.obj({ - Type: "Action", - S: "JavaScript", - JS: PDFHexString_default.fromText(this.script) - }); - if (ref) { - context.assign(ref, jsActionDict); - return [2, ref]; - } else { - return [2, context.register(jsActionDict)]; - } - return [ - 2 - /*return*/ - ]; - }); - }); - }; - return JavaScriptEmbedder2; - }() -); -var JavaScriptEmbedder_default = JavaScriptEmbedder; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFDocument.js -var PDFDocument = ( - /** @class */ - function() { - function PDFDocument2(context, ignoreEncryption, updateMetadata) { - var _this = this; - this.defaultWordBreaks = [" "]; - this.computePages = function() { - var pages = []; - _this.catalog.Pages().traverse(function(node, ref) { - if (node instanceof PDFPageLeaf_default) { - var page = _this.pageMap.get(node); - if (!page) { - page = PDFPage_default.of(node, ref, _this); - _this.pageMap.set(node, page); - } - pages.push(page); - } - }); - return pages; - }; - this.getOrCreateForm = function() { - var acroForm = _this.catalog.getOrCreateAcroForm(); - return PDFForm_default.of(acroForm, _this); - }; - assertIs(context, "context", [[PDFContext_default, "PDFContext"]]); - assertIs(ignoreEncryption, "ignoreEncryption", ["boolean"]); - this.context = context; - this.catalog = context.lookup(context.trailerInfo.Root); - this.isEncrypted = !!context.lookup(context.trailerInfo.Encrypt); - this.pageCache = Cache_default.populatedBy(this.computePages); - this.pageMap = /* @__PURE__ */ new Map(); - this.formCache = Cache_default.populatedBy(this.getOrCreateForm); - this.fonts = []; - this.images = []; - this.embeddedPages = []; - this.embeddedFiles = []; - this.javaScripts = []; - if (!ignoreEncryption && this.isEncrypted) - throw new EncryptedPDFError(); - if (updateMetadata) - this.updateInfoDict(); - } - PDFDocument2.load = function(pdf, options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a3, ignoreEncryption, _b3, parseSpeed, _c2, throwOnInvalidObject, _d, updateMetadata, _e, capNumbers, bytes, context; - return __generator(this, function(_f) { - switch (_f.label) { - case 0: - _a3 = options.ignoreEncryption, ignoreEncryption = _a3 === void 0 ? false : _a3, _b3 = options.parseSpeed, parseSpeed = _b3 === void 0 ? ParseSpeeds.Slow : _b3, _c2 = options.throwOnInvalidObject, throwOnInvalidObject = _c2 === void 0 ? false : _c2, _d = options.updateMetadata, updateMetadata = _d === void 0 ? true : _d, _e = options.capNumbers, capNumbers = _e === void 0 ? false : _e; - assertIs(pdf, "pdf", ["string", Uint8Array, ArrayBuffer]); - assertIs(ignoreEncryption, "ignoreEncryption", ["boolean"]); - assertIs(parseSpeed, "parseSpeed", ["number"]); - assertIs(throwOnInvalidObject, "throwOnInvalidObject", ["boolean"]); - bytes = toUint8Array(pdf); - return [4, PDFParser_default.forBytesWithOptions(bytes, parseSpeed, throwOnInvalidObject, capNumbers).parseDocument()]; - case 1: - context = _f.sent(); - return [2, new PDFDocument2(context, ignoreEncryption, updateMetadata)]; - } - }); - }); - }; - PDFDocument2.create = function(options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a3, updateMetadata, context, pageTree, pageTreeRef, catalog; - return __generator(this, function(_b3) { - _a3 = options.updateMetadata, updateMetadata = _a3 === void 0 ? true : _a3; - context = PDFContext_default.create(); - pageTree = PDFPageTree_default.withContext(context); - pageTreeRef = context.register(pageTree); - catalog = PDFCatalog_default.withContextAndPages(context, pageTreeRef); - context.trailerInfo.Root = context.register(catalog); - return [2, new PDFDocument2(context, false, updateMetadata)]; - }); - }); - }; - PDFDocument2.prototype.registerFontkit = function(fontkit) { - this.fontkit = fontkit; - }; - PDFDocument2.prototype.getForm = function() { - var form = this.formCache.access(); - if (form.hasXFA()) { - console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"); - form.deleteXFA(); - } - return form; - }; - PDFDocument2.prototype.getTitle = function() { - var title = this.getInfoDict().lookup(PDFName_default.Title); - if (!title) - return void 0; - assertIsLiteralOrHexString(title); - return title.decodeText(); - }; - PDFDocument2.prototype.getAuthor = function() { - var author = this.getInfoDict().lookup(PDFName_default.Author); - if (!author) - return void 0; - assertIsLiteralOrHexString(author); - return author.decodeText(); - }; - PDFDocument2.prototype.getSubject = function() { - var subject = this.getInfoDict().lookup(PDFName_default.Subject); - if (!subject) - return void 0; - assertIsLiteralOrHexString(subject); - return subject.decodeText(); - }; - PDFDocument2.prototype.getKeywords = function() { - var keywords = this.getInfoDict().lookup(PDFName_default.Keywords); - if (!keywords) - return void 0; - assertIsLiteralOrHexString(keywords); - return keywords.decodeText(); - }; - PDFDocument2.prototype.getCreator = function() { - var creator = this.getInfoDict().lookup(PDFName_default.Creator); - if (!creator) - return void 0; - assertIsLiteralOrHexString(creator); - return creator.decodeText(); - }; - PDFDocument2.prototype.getProducer = function() { - var producer = this.getInfoDict().lookup(PDFName_default.Producer); - if (!producer) - return void 0; - assertIsLiteralOrHexString(producer); - return producer.decodeText(); - }; - PDFDocument2.prototype.getCreationDate = function() { - var creationDate = this.getInfoDict().lookup(PDFName_default.CreationDate); - if (!creationDate) - return void 0; - assertIsLiteralOrHexString(creationDate); - return creationDate.decodeDate(); - }; - PDFDocument2.prototype.getModificationDate = function() { - var modificationDate = this.getInfoDict().lookup(PDFName_default.ModDate); - if (!modificationDate) - return void 0; - assertIsLiteralOrHexString(modificationDate); - return modificationDate.decodeDate(); - }; - PDFDocument2.prototype.setTitle = function(title, options) { - assertIs(title, "title", ["string"]); - var key = PDFName_default.of("Title"); - this.getInfoDict().set(key, PDFHexString_default.fromText(title)); - if (options === null || options === void 0 ? void 0 : options.showInWindowTitleBar) { - var prefs = this.catalog.getOrCreateViewerPreferences(); - prefs.setDisplayDocTitle(true); - } - }; - PDFDocument2.prototype.setAuthor = function(author) { - assertIs(author, "author", ["string"]); - var key = PDFName_default.of("Author"); - this.getInfoDict().set(key, PDFHexString_default.fromText(author)); - }; - PDFDocument2.prototype.setSubject = function(subject) { - assertIs(subject, "author", ["string"]); - var key = PDFName_default.of("Subject"); - this.getInfoDict().set(key, PDFHexString_default.fromText(subject)); - }; - PDFDocument2.prototype.setKeywords = function(keywords) { - assertIs(keywords, "keywords", [Array]); - var key = PDFName_default.of("Keywords"); - this.getInfoDict().set(key, PDFHexString_default.fromText(keywords.join(" "))); - }; - PDFDocument2.prototype.setCreator = function(creator) { - assertIs(creator, "creator", ["string"]); - var key = PDFName_default.of("Creator"); - this.getInfoDict().set(key, PDFHexString_default.fromText(creator)); - }; - PDFDocument2.prototype.setProducer = function(producer) { - assertIs(producer, "creator", ["string"]); - var key = PDFName_default.of("Producer"); - this.getInfoDict().set(key, PDFHexString_default.fromText(producer)); - }; - PDFDocument2.prototype.setLanguage = function(language) { - assertIs(language, "language", ["string"]); - var key = PDFName_default.of("Lang"); - this.catalog.set(key, PDFString_default.of(language)); - }; - PDFDocument2.prototype.setCreationDate = function(creationDate) { - assertIs(creationDate, "creationDate", [[Date, "Date"]]); - var key = PDFName_default.of("CreationDate"); - this.getInfoDict().set(key, PDFString_default.fromDate(creationDate)); - }; - PDFDocument2.prototype.setModificationDate = function(modificationDate) { - assertIs(modificationDate, "modificationDate", [[Date, "Date"]]); - var key = PDFName_default.of("ModDate"); - this.getInfoDict().set(key, PDFString_default.fromDate(modificationDate)); - }; - PDFDocument2.prototype.getPageCount = function() { - if (this.pageCount === void 0) - this.pageCount = this.getPages().length; - return this.pageCount; - }; - PDFDocument2.prototype.getPages = function() { - return this.pageCache.access(); - }; - PDFDocument2.prototype.getPage = function(index2) { - var pages = this.getPages(); - assertRange(index2, "index", 0, pages.length - 1); - return pages[index2]; - }; - PDFDocument2.prototype.getPageIndices = function() { - return range(0, this.getPageCount()); - }; - PDFDocument2.prototype.removePage = function(index2) { - var pageCount = this.getPageCount(); - if (this.pageCount === 0) - throw new RemovePageFromEmptyDocumentError(); - assertRange(index2, "index", 0, pageCount - 1); - this.catalog.removeLeafNode(index2); - this.pageCount = pageCount - 1; - }; - PDFDocument2.prototype.addPage = function(page) { - assertIs(page, "page", ["undefined", [PDFPage_default, "PDFPage"], Array]); - return this.insertPage(this.getPageCount(), page); - }; - PDFDocument2.prototype.insertPage = function(index2, page) { - var pageCount = this.getPageCount(); - assertRange(index2, "index", 0, pageCount); - assertIs(page, "page", ["undefined", [PDFPage_default, "PDFPage"], Array]); - if (!page || Array.isArray(page)) { - var dims = Array.isArray(page) ? page : PageSizes.A4; - page = PDFPage_default.create(this); - page.setSize.apply(page, dims); - } else if (page.doc !== this) { - throw new ForeignPageError(); - } - var parentRef = this.catalog.insertLeafNode(page.ref, index2); - page.node.setParent(parentRef); - this.pageMap.set(page.node, page); - this.pageCache.invalidate(); - this.pageCount = pageCount + 1; - return page; - }; - PDFDocument2.prototype.copyPages = function(srcDoc, indices) { - return __awaiter(this, void 0, void 0, function() { - var copier, srcPages, copiedPages, idx, len, srcPage, copiedPage, ref; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - assertIs(srcDoc, "srcDoc", [[PDFDocument2, "PDFDocument"]]); - assertIs(indices, "indices", [Array]); - return [4, srcDoc.flush()]; - case 1: - _a3.sent(); - copier = PDFObjectCopier_default.for(srcDoc.context, this.context); - srcPages = srcDoc.getPages(); - copiedPages = new Array(indices.length); - for (idx = 0, len = indices.length; idx < len; idx++) { - srcPage = srcPages[indices[idx]]; - copiedPage = copier.copy(srcPage.node); - ref = this.context.register(copiedPage); - copiedPages[idx] = PDFPage_default.of(copiedPage, ref, this); - } - return [2, copiedPages]; - } - }); - }); - }; - PDFDocument2.prototype.copy = function() { - return __awaiter(this, void 0, void 0, function() { - var pdfCopy, contentPages, idx, len; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, PDFDocument2.create()]; - case 1: - pdfCopy = _a3.sent(); - return [4, pdfCopy.copyPages(this, this.getPageIndices())]; - case 2: - contentPages = _a3.sent(); - for (idx = 0, len = contentPages.length; idx < len; idx++) { - pdfCopy.addPage(contentPages[idx]); - } - if (this.getAuthor() !== void 0) { - pdfCopy.setAuthor(this.getAuthor()); - } - if (this.getCreationDate() !== void 0) { - pdfCopy.setCreationDate(this.getCreationDate()); - } - if (this.getCreator() !== void 0) { - pdfCopy.setCreator(this.getCreator()); - } - if (this.getModificationDate() !== void 0) { - pdfCopy.setModificationDate(this.getModificationDate()); - } - if (this.getProducer() !== void 0) { - pdfCopy.setProducer(this.getProducer()); - } - if (this.getSubject() !== void 0) { - pdfCopy.setSubject(this.getSubject()); - } - if (this.getTitle() !== void 0) { - pdfCopy.setTitle(this.getTitle()); - } - pdfCopy.defaultWordBreaks = this.defaultWordBreaks; - return [2, pdfCopy]; - } - }); - }); - }; - PDFDocument2.prototype.addJavaScript = function(name, script) { - assertIs(name, "name", ["string"]); - assertIs(script, "script", ["string"]); - var embedder = JavaScriptEmbedder_default.for(script, name); - var ref = this.context.nextRef(); - var javaScript = PDFJavaScript_default.of(ref, this, embedder); - this.javaScripts.push(javaScript); - }; - PDFDocument2.prototype.attach = function(attachment, name, options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var bytes, embedder, ref, embeddedFile; - return __generator(this, function(_a3) { - assertIs(attachment, "attachment", ["string", Uint8Array, ArrayBuffer]); - assertIs(name, "name", ["string"]); - assertOrUndefined(options.mimeType, "mimeType", ["string"]); - assertOrUndefined(options.description, "description", ["string"]); - assertOrUndefined(options.creationDate, "options.creationDate", [Date]); - assertOrUndefined(options.modificationDate, "options.modificationDate", [ - Date - ]); - assertIsOneOfOrUndefined(options.afRelationship, "options.afRelationship", AFRelationship); - bytes = toUint8Array(attachment); - embedder = FileEmbedder_default.for(bytes, name, options); - ref = this.context.nextRef(); - embeddedFile = PDFEmbeddedFile_default.of(ref, this, embedder); - this.embeddedFiles.push(embeddedFile); - return [ - 2 - /*return*/ - ]; - }); - }); - }; - PDFDocument2.prototype.embedFont = function(font, options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a3, subset, customName, features, embedder, bytes, fontkit, _b3, ref, pdfFont; - return __generator(this, function(_c2) { - switch (_c2.label) { - case 0: - _a3 = options.subset, subset = _a3 === void 0 ? false : _a3, customName = options.customName, features = options.features; - assertIs(font, "font", ["string", Uint8Array, ArrayBuffer]); - assertIs(subset, "subset", ["boolean"]); - if (!isStandardFont(font)) return [3, 1]; - embedder = StandardFontEmbedder_default.for(font, customName); - return [3, 7]; - case 1: - if (!canBeConvertedToUint8Array(font)) return [3, 6]; - bytes = toUint8Array(font); - fontkit = this.assertFontkit(); - if (!subset) return [3, 3]; - return [4, CustomFontSubsetEmbedder_default.for(fontkit, bytes, customName, features)]; - case 2: - _b3 = _c2.sent(); - return [3, 5]; - case 3: - return [4, CustomFontEmbedder_default.for(fontkit, bytes, customName, features)]; - case 4: - _b3 = _c2.sent(); - _c2.label = 5; - case 5: - embedder = _b3; - return [3, 7]; - case 6: - throw new TypeError("`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`"); - case 7: - ref = this.context.nextRef(); - pdfFont = PDFFont_default.of(ref, this, embedder); - this.fonts.push(pdfFont); - return [2, pdfFont]; - } - }); - }); - }; - PDFDocument2.prototype.embedStandardFont = function(font, customName) { - assertIs(font, "font", ["string"]); - if (!isStandardFont(font)) { - throw new TypeError("`font` must be one of type `StandardFonts`"); - } - var embedder = StandardFontEmbedder_default.for(font, customName); - var ref = this.context.nextRef(); - var pdfFont = PDFFont_default.of(ref, this, embedder); - this.fonts.push(pdfFont); - return pdfFont; - }; - PDFDocument2.prototype.embedJpg = function(jpg) { - return __awaiter(this, void 0, void 0, function() { - var bytes, embedder, ref, pdfImage; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - assertIs(jpg, "jpg", ["string", Uint8Array, ArrayBuffer]); - bytes = toUint8Array(jpg); - return [4, JpegEmbedder_default.for(bytes)]; - case 1: - embedder = _a3.sent(); - ref = this.context.nextRef(); - pdfImage = PDFImage_default.of(ref, this, embedder); - this.images.push(pdfImage); - return [2, pdfImage]; - } - }); - }); - }; - PDFDocument2.prototype.embedPng = function(png) { - return __awaiter(this, void 0, void 0, function() { - var bytes, embedder, ref, pdfImage; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - assertIs(png, "png", ["string", Uint8Array, ArrayBuffer]); - bytes = toUint8Array(png); - return [4, PngEmbedder_default.for(bytes)]; - case 1: - embedder = _a3.sent(); - ref = this.context.nextRef(); - pdfImage = PDFImage_default.of(ref, this, embedder); - this.images.push(pdfImage); - return [2, pdfImage]; - } - }); - }); - }; - PDFDocument2.prototype.embedPdf = function(pdf, indices) { - if (indices === void 0) { - indices = [0]; - } - return __awaiter(this, void 0, void 0, function() { - var srcDoc, _a3, srcPages; - return __generator(this, function(_b3) { - switch (_b3.label) { - case 0: - assertIs(pdf, "pdf", [ - "string", - Uint8Array, - ArrayBuffer, - [PDFDocument2, "PDFDocument"] - ]); - assertIs(indices, "indices", [Array]); - if (!(pdf instanceof PDFDocument2)) return [3, 1]; - _a3 = pdf; - return [3, 3]; - case 1: - return [4, PDFDocument2.load(pdf)]; - case 2: - _a3 = _b3.sent(); - _b3.label = 3; - case 3: - srcDoc = _a3; - srcPages = pluckIndices(srcDoc.getPages(), indices); - return [2, this.embedPages(srcPages)]; - } - }); - }); - }; - PDFDocument2.prototype.embedPage = function(page, boundingBox, transformationMatrix) { - return __awaiter(this, void 0, void 0, function() { - var embeddedPage; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - assertIs(page, "page", [[PDFPage_default, "PDFPage"]]); - return [4, this.embedPages([page], [boundingBox], [transformationMatrix])]; - case 1: - embeddedPage = _a3.sent()[0]; - return [2, embeddedPage]; - } - }); - }); - }; - PDFDocument2.prototype.embedPages = function(pages, boundingBoxes, transformationMatrices) { - if (boundingBoxes === void 0) { - boundingBoxes = []; - } - if (transformationMatrices === void 0) { - transformationMatrices = []; - } - return __awaiter(this, void 0, void 0, function() { - var idx, len, currPage, nextPage, context, maybeCopyPage, embeddedPages, idx, len, page, box, matrix, embedder, ref; - var _a3; - return __generator(this, function(_b3) { - switch (_b3.label) { - case 0: - if (pages.length === 0) - return [2, []]; - for (idx = 0, len = pages.length - 1; idx < len; idx++) { - currPage = pages[idx]; - nextPage = pages[idx + 1]; - if (currPage.node.context !== nextPage.node.context) { - throw new PageEmbeddingMismatchedContextError(); - } - } - context = pages[0].node.context; - maybeCopyPage = context === this.context ? function(p) { - return p; - } : PDFObjectCopier_default.for(context, this.context).copy; - embeddedPages = new Array(pages.length); - idx = 0, len = pages.length; - _b3.label = 1; - case 1: - if (!(idx < len)) return [3, 4]; - page = maybeCopyPage(pages[idx].node); - box = boundingBoxes[idx]; - matrix = transformationMatrices[idx]; - return [4, PDFPageEmbedder_default.for(page, box, matrix)]; - case 2: - embedder = _b3.sent(); - ref = this.context.nextRef(); - embeddedPages[idx] = PDFEmbeddedPage_default.of(ref, this, embedder); - _b3.label = 3; - case 3: - idx++; - return [3, 1]; - case 4: - (_a3 = this.embeddedPages).push.apply(_a3, embeddedPages); - return [2, embeddedPages]; - } - }); - }); - }; - PDFDocument2.prototype.flush = function() { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - return [4, this.embedAll(this.fonts)]; - case 1: - _a3.sent(); - return [4, this.embedAll(this.images)]; - case 2: - _a3.sent(); - return [4, this.embedAll(this.embeddedPages)]; - case 3: - _a3.sent(); - return [4, this.embedAll(this.embeddedFiles)]; - case 4: - _a3.sent(); - return [4, this.embedAll(this.javaScripts)]; - case 5: - _a3.sent(); - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFDocument2.prototype.save = function(options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a3, useObjectStreams, _b3, addDefaultPage, _c2, objectsPerTick, _d, updateFieldAppearances, form, Writer; - return __generator(this, function(_e) { - switch (_e.label) { - case 0: - _a3 = options.useObjectStreams, useObjectStreams = _a3 === void 0 ? true : _a3, _b3 = options.addDefaultPage, addDefaultPage = _b3 === void 0 ? true : _b3, _c2 = options.objectsPerTick, objectsPerTick = _c2 === void 0 ? 50 : _c2, _d = options.updateFieldAppearances, updateFieldAppearances = _d === void 0 ? true : _d; - assertIs(useObjectStreams, "useObjectStreams", ["boolean"]); - assertIs(addDefaultPage, "addDefaultPage", ["boolean"]); - assertIs(objectsPerTick, "objectsPerTick", ["number"]); - assertIs(updateFieldAppearances, "updateFieldAppearances", ["boolean"]); - if (addDefaultPage && this.getPageCount() === 0) - this.addPage(); - if (updateFieldAppearances) { - form = this.formCache.getValue(); - if (form) - form.updateFieldAppearances(); - } - return [4, this.flush()]; - case 1: - _e.sent(); - Writer = useObjectStreams ? PDFStreamWriter_default : PDFWriter_default; - return [2, Writer.forContext(this.context, objectsPerTick).serializeToBuffer()]; - } - }); - }); - }; - PDFDocument2.prototype.saveAsBase64 = function(options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a3, dataUri, otherOptions, bytes, base64; - return __generator(this, function(_b3) { - switch (_b3.label) { - case 0: - _a3 = options.dataUri, dataUri = _a3 === void 0 ? false : _a3, otherOptions = __rest(options, ["dataUri"]); - assertIs(dataUri, "dataUri", ["boolean"]); - return [4, this.save(otherOptions)]; - case 1: - bytes = _b3.sent(); - base64 = encodeToBase64(bytes); - return [2, dataUri ? "data:application/pdf;base64," + base64 : base64]; - } - }); - }); - }; - PDFDocument2.prototype.findPageForAnnotationRef = function(ref) { - var pages = this.getPages(); - for (var idx = 0, len = pages.length; idx < len; idx++) { - var page = pages[idx]; - var annotations = page.node.Annots(); - if ((annotations === null || annotations === void 0 ? void 0 : annotations.indexOf(ref)) !== void 0) { - return page; - } - } - return void 0; - }; - PDFDocument2.prototype.embedAll = function(embeddables) { - return __awaiter(this, void 0, void 0, function() { - var idx, len; - return __generator(this, function(_a3) { - switch (_a3.label) { - case 0: - idx = 0, len = embeddables.length; - _a3.label = 1; - case 1: - if (!(idx < len)) return [3, 4]; - return [4, embeddables[idx].embed()]; - case 2: - _a3.sent(); - _a3.label = 3; - case 3: - idx++; - return [3, 1]; - case 4: - return [ - 2 - /*return*/ - ]; - } - }); - }); - }; - PDFDocument2.prototype.updateInfoDict = function() { - var pdfLib = "pdf-lib (https://github.com/Hopding/pdf-lib)"; - var now = /* @__PURE__ */ new Date(); - var info = this.getInfoDict(); - this.setProducer(pdfLib); - this.setModificationDate(now); - if (!info.get(PDFName_default.of("Creator"))) - this.setCreator(pdfLib); - if (!info.get(PDFName_default.of("CreationDate"))) - this.setCreationDate(now); - }; - PDFDocument2.prototype.getInfoDict = function() { - var existingInfo = this.context.lookup(this.context.trailerInfo.Info); - if (existingInfo instanceof PDFDict_default) - return existingInfo; - var newInfo = this.context.obj({}); - this.context.trailerInfo.Info = this.context.register(newInfo); - return newInfo; - }; - PDFDocument2.prototype.assertFontkit = function() { - if (!this.fontkit) - throw new FontkitNotRegisteredError(); - return this.fontkit; - }; - return PDFDocument2; - }() -); -var PDFDocument_default = PDFDocument; -function assertIsLiteralOrHexString(pdfObject) { - if (!(pdfObject instanceof PDFHexString_default) && !(pdfObject instanceof PDFString_default)) { - throw new UnexpectedObjectTypeError([PDFHexString_default, PDFString_default], pdfObject); - } -} - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFPageOptions.js -var BlendMode; -(function(BlendMode2) { - BlendMode2["Normal"] = "Normal"; - BlendMode2["Multiply"] = "Multiply"; - BlendMode2["Screen"] = "Screen"; - BlendMode2["Overlay"] = "Overlay"; - BlendMode2["Darken"] = "Darken"; - BlendMode2["Lighten"] = "Lighten"; - BlendMode2["ColorDodge"] = "ColorDodge"; - BlendMode2["ColorBurn"] = "ColorBurn"; - BlendMode2["HardLight"] = "HardLight"; - BlendMode2["SoftLight"] = "SoftLight"; - BlendMode2["Difference"] = "Difference"; - BlendMode2["Exclusion"] = "Exclusion"; -})(BlendMode || (BlendMode = {})); - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/PDFPage.js -var PDFPage = ( - /** @class */ - function() { - function PDFPage2(leafNode, ref, doc) { - this.fontSize = 24; - this.fontColor = rgb(0, 0, 0); - this.lineHeight = 24; - this.x = 0; - this.y = 0; - assertIs(leafNode, "leafNode", [[PDFPageLeaf_default, "PDFPageLeaf"]]); - assertIs(ref, "ref", [[PDFRef_default, "PDFRef"]]); - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - this.node = leafNode; - this.ref = ref; - this.doc = doc; - } - PDFPage2.prototype.setRotation = function(angle) { - var degreesAngle = toDegrees(angle); - assertMultiple(degreesAngle, "degreesAngle", 90); - this.node.set(PDFName_default.of("Rotate"), this.doc.context.obj(degreesAngle)); - }; - PDFPage2.prototype.getRotation = function() { - var Rotate = this.node.Rotate(); - return degrees(Rotate ? Rotate.asNumber() : 0); - }; - PDFPage2.prototype.setSize = function(width, height) { - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var mediaBox = this.getMediaBox(); - this.setMediaBox(mediaBox.x, mediaBox.y, width, height); - var cropBox = this.getCropBox(); - var bleedBox = this.getBleedBox(); - var trimBox = this.getTrimBox(); - var artBox = this.getArtBox(); - var hasCropBox = this.node.CropBox(); - var hasBleedBox = this.node.BleedBox(); - var hasTrimBox = this.node.TrimBox(); - var hasArtBox = this.node.ArtBox(); - if (hasCropBox && rectanglesAreEqual(cropBox, mediaBox)) { - this.setCropBox(mediaBox.x, mediaBox.y, width, height); - } - if (hasBleedBox && rectanglesAreEqual(bleedBox, mediaBox)) { - this.setBleedBox(mediaBox.x, mediaBox.y, width, height); - } - if (hasTrimBox && rectanglesAreEqual(trimBox, mediaBox)) { - this.setTrimBox(mediaBox.x, mediaBox.y, width, height); - } - if (hasArtBox && rectanglesAreEqual(artBox, mediaBox)) { - this.setArtBox(mediaBox.x, mediaBox.y, width, height); - } - }; - PDFPage2.prototype.setWidth = function(width) { - assertIs(width, "width", ["number"]); - this.setSize(width, this.getSize().height); - }; - PDFPage2.prototype.setHeight = function(height) { - assertIs(height, "height", ["number"]); - this.setSize(this.getSize().width, height); - }; - PDFPage2.prototype.setMediaBox = function(x, y, width, height) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var mediaBox = this.doc.context.obj([x, y, x + width, y + height]); - this.node.set(PDFName_default.MediaBox, mediaBox); - }; - PDFPage2.prototype.setCropBox = function(x, y, width, height) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var cropBox = this.doc.context.obj([x, y, x + width, y + height]); - this.node.set(PDFName_default.CropBox, cropBox); - }; - PDFPage2.prototype.setBleedBox = function(x, y, width, height) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var bleedBox = this.doc.context.obj([x, y, x + width, y + height]); - this.node.set(PDFName_default.BleedBox, bleedBox); - }; - PDFPage2.prototype.setTrimBox = function(x, y, width, height) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var trimBox = this.doc.context.obj([x, y, x + width, y + height]); - this.node.set(PDFName_default.TrimBox, trimBox); - }; - PDFPage2.prototype.setArtBox = function(x, y, width, height) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - assertIs(width, "width", ["number"]); - assertIs(height, "height", ["number"]); - var artBox = this.doc.context.obj([x, y, x + width, y + height]); - this.node.set(PDFName_default.ArtBox, artBox); - }; - PDFPage2.prototype.getSize = function() { - var _a3 = this.getMediaBox(), width = _a3.width, height = _a3.height; - return { width, height }; - }; - PDFPage2.prototype.getWidth = function() { - return this.getSize().width; - }; - PDFPage2.prototype.getHeight = function() { - return this.getSize().height; - }; - PDFPage2.prototype.getMediaBox = function() { - var mediaBox = this.node.MediaBox(); - return mediaBox.asRectangle(); - }; - PDFPage2.prototype.getCropBox = function() { - var _a3; - var cropBox = this.node.CropBox(); - return (_a3 = cropBox === null || cropBox === void 0 ? void 0 : cropBox.asRectangle()) !== null && _a3 !== void 0 ? _a3 : this.getMediaBox(); - }; - PDFPage2.prototype.getBleedBox = function() { - var _a3; - var bleedBox = this.node.BleedBox(); - return (_a3 = bleedBox === null || bleedBox === void 0 ? void 0 : bleedBox.asRectangle()) !== null && _a3 !== void 0 ? _a3 : this.getCropBox(); - }; - PDFPage2.prototype.getTrimBox = function() { - var _a3; - var trimBox = this.node.TrimBox(); - return (_a3 = trimBox === null || trimBox === void 0 ? void 0 : trimBox.asRectangle()) !== null && _a3 !== void 0 ? _a3 : this.getCropBox(); - }; - PDFPage2.prototype.getArtBox = function() { - var _a3; - var artBox = this.node.ArtBox(); - return (_a3 = artBox === null || artBox === void 0 ? void 0 : artBox.asRectangle()) !== null && _a3 !== void 0 ? _a3 : this.getCropBox(); - }; - PDFPage2.prototype.translateContent = function(x, y) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - this.node.normalize(); - this.getContentStream(); - var start = this.createContentStream(pushGraphicsState(), translate(x, y)); - var startRef = this.doc.context.register(start); - var end = this.createContentStream(popGraphicsState()); - var endRef = this.doc.context.register(end); - this.node.wrapContentStreams(startRef, endRef); - }; - PDFPage2.prototype.scale = function(x, y) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - this.setSize(this.getWidth() * x, this.getHeight() * y); - this.scaleContent(x, y); - this.scaleAnnotations(x, y); - }; - PDFPage2.prototype.scaleContent = function(x, y) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - this.node.normalize(); - this.getContentStream(); - var start = this.createContentStream(pushGraphicsState(), scale(x, y)); - var startRef = this.doc.context.register(start); - var end = this.createContentStream(popGraphicsState()); - var endRef = this.doc.context.register(end); - this.node.wrapContentStreams(startRef, endRef); - }; - PDFPage2.prototype.scaleAnnotations = function(x, y) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - var annots = this.node.Annots(); - if (!annots) - return; - for (var idx = 0; idx < annots.size(); idx++) { - var annot = annots.lookup(idx); - if (annot instanceof PDFDict_default) - this.scaleAnnot(annot, x, y); - } - }; - PDFPage2.prototype.resetPosition = function() { - this.getContentStream(false); - this.x = 0; - this.y = 0; - }; - PDFPage2.prototype.setFont = function(font) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - this.font = font; - this.fontKey = this.node.newFontDictionary(this.font.name, this.font.ref); - }; - PDFPage2.prototype.setFontSize = function(fontSize) { - assertIs(fontSize, "fontSize", ["number"]); - this.fontSize = fontSize; - }; - PDFPage2.prototype.setFontColor = function(fontColor) { - assertIs(fontColor, "fontColor", [[Object, "Color"]]); - this.fontColor = fontColor; - }; - PDFPage2.prototype.setLineHeight = function(lineHeight) { - assertIs(lineHeight, "lineHeight", ["number"]); - this.lineHeight = lineHeight; - }; - PDFPage2.prototype.getPosition = function() { - return { x: this.x, y: this.y }; - }; - PDFPage2.prototype.getX = function() { - return this.x; - }; - PDFPage2.prototype.getY = function() { - return this.y; - }; - PDFPage2.prototype.moveTo = function(x, y) { - assertIs(x, "x", ["number"]); - assertIs(y, "y", ["number"]); - this.x = x; - this.y = y; - }; - PDFPage2.prototype.moveDown = function(yDecrease) { - assertIs(yDecrease, "yDecrease", ["number"]); - this.y -= yDecrease; - }; - PDFPage2.prototype.moveUp = function(yIncrease) { - assertIs(yIncrease, "yIncrease", ["number"]); - this.y += yIncrease; - }; - PDFPage2.prototype.moveLeft = function(xDecrease) { - assertIs(xDecrease, "xDecrease", ["number"]); - this.x -= xDecrease; - }; - PDFPage2.prototype.moveRight = function(xIncrease) { - assertIs(xIncrease, "xIncrease", ["number"]); - this.x += xIncrease; - }; - PDFPage2.prototype.pushOperators = function() { - var operator = []; - for (var _i = 0; _i < arguments.length; _i++) { - operator[_i] = arguments[_i]; - } - assertEachIs(operator, "operator", [[PDFOperator_default, "PDFOperator"]]); - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, operator); - }; - PDFPage2.prototype.drawText = function(text2, options) { - var _a3, _b3, _c2, _d, _e, _f, _g; - if (options === void 0) { - options = {}; - } - assertIs(text2, "text", ["string"]); - assertOrUndefined(options.color, "options.color", [[Object, "Color"]]); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertOrUndefined(options.font, "options.font", [[PDFFont_default, "PDFFont"]]); - assertOrUndefined(options.size, "options.size", ["number"]); - assertOrUndefined(options.rotate, "options.rotate", [[Object, "Rotation"]]); - assertOrUndefined(options.xSkew, "options.xSkew", [[Object, "Rotation"]]); - assertOrUndefined(options.ySkew, "options.ySkew", [[Object, "Rotation"]]); - assertOrUndefined(options.x, "options.x", ["number"]); - assertOrUndefined(options.y, "options.y", ["number"]); - assertOrUndefined(options.lineHeight, "options.lineHeight", ["number"]); - assertOrUndefined(options.maxWidth, "options.maxWidth", ["number"]); - assertOrUndefined(options.wordBreaks, "options.wordBreaks", [Array]); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var _h = this.setOrEmbedFont(options.font), oldFont = _h.oldFont, newFont = _h.newFont, newFontKey = _h.newFontKey; - var fontSize = options.size || this.fontSize; - var wordBreaks = options.wordBreaks || this.doc.defaultWordBreaks; - var textWidth = function(t) { - return newFont.widthOfTextAtSize(t, fontSize); - }; - var lines = options.maxWidth === void 0 ? lineSplit(cleanText(text2)) : breakTextIntoLines(text2, wordBreaks, options.maxWidth, textWidth); - var encodedLines = new Array(lines.length); - for (var idx = 0, len = lines.length; idx < len; idx++) { - encodedLines[idx] = newFont.encodeText(lines[idx]); - } - var graphicsStateKey = this.maybeEmbedGraphicsState({ - opacity: options.opacity, - blendMode: options.blendMode - }); - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawLinesOfText(encodedLines, { - color: (_a3 = options.color) !== null && _a3 !== void 0 ? _a3 : this.fontColor, - font: newFontKey, - size: fontSize, - rotate: (_b3 = options.rotate) !== null && _b3 !== void 0 ? _b3 : degrees(0), - xSkew: (_c2 = options.xSkew) !== null && _c2 !== void 0 ? _c2 : degrees(0), - ySkew: (_d = options.ySkew) !== null && _d !== void 0 ? _d : degrees(0), - x: (_e = options.x) !== null && _e !== void 0 ? _e : this.x, - y: (_f = options.y) !== null && _f !== void 0 ? _f : this.y, - lineHeight: (_g = options.lineHeight) !== null && _g !== void 0 ? _g : this.lineHeight, - graphicsState: graphicsStateKey - })); - if (options.font) { - if (oldFont) - this.setFont(oldFont); - else - this.resetFont(); - } - }; - PDFPage2.prototype.drawImage = function(image, options) { - var _a3, _b3, _c2, _d, _e, _f, _g; - if (options === void 0) { - options = {}; - } - assertIs(image, "image", [[PDFImage_default, "PDFImage"]]); - assertOrUndefined(options.x, "options.x", ["number"]); - assertOrUndefined(options.y, "options.y", ["number"]); - assertOrUndefined(options.width, "options.width", ["number"]); - assertOrUndefined(options.height, "options.height", ["number"]); - assertOrUndefined(options.rotate, "options.rotate", [[Object, "Rotation"]]); - assertOrUndefined(options.xSkew, "options.xSkew", [[Object, "Rotation"]]); - assertOrUndefined(options.ySkew, "options.ySkew", [[Object, "Rotation"]]); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var xObjectKey = this.node.newXObject("Image", image.ref); - var graphicsStateKey = this.maybeEmbedGraphicsState({ - opacity: options.opacity, - blendMode: options.blendMode - }); - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawImage(xObjectKey, { - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : this.x, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : this.y, - width: (_c2 = options.width) !== null && _c2 !== void 0 ? _c2 : image.size().width, - height: (_d = options.height) !== null && _d !== void 0 ? _d : image.size().height, - rotate: (_e = options.rotate) !== null && _e !== void 0 ? _e : degrees(0), - xSkew: (_f = options.xSkew) !== null && _f !== void 0 ? _f : degrees(0), - ySkew: (_g = options.ySkew) !== null && _g !== void 0 ? _g : degrees(0), - graphicsState: graphicsStateKey - })); - }; - PDFPage2.prototype.drawPage = function(embeddedPage, options) { - var _a3, _b3, _c2, _d, _e; - if (options === void 0) { - options = {}; - } - assertIs(embeddedPage, "embeddedPage", [ - [PDFEmbeddedPage_default, "PDFEmbeddedPage"] - ]); - assertOrUndefined(options.x, "options.x", ["number"]); - assertOrUndefined(options.y, "options.y", ["number"]); - assertOrUndefined(options.xScale, "options.xScale", ["number"]); - assertOrUndefined(options.yScale, "options.yScale", ["number"]); - assertOrUndefined(options.width, "options.width", ["number"]); - assertOrUndefined(options.height, "options.height", ["number"]); - assertOrUndefined(options.rotate, "options.rotate", [[Object, "Rotation"]]); - assertOrUndefined(options.xSkew, "options.xSkew", [[Object, "Rotation"]]); - assertOrUndefined(options.ySkew, "options.ySkew", [[Object, "Rotation"]]); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var xObjectKey = this.node.newXObject("EmbeddedPdfPage", embeddedPage.ref); - var graphicsStateKey = this.maybeEmbedGraphicsState({ - opacity: options.opacity, - blendMode: options.blendMode - }); - var xScale = options.width !== void 0 ? options.width / embeddedPage.width : options.xScale !== void 0 ? options.xScale : 1; - var yScale = options.height !== void 0 ? options.height / embeddedPage.height : options.yScale !== void 0 ? options.yScale : 1; - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawPage(xObjectKey, { - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : this.x, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : this.y, - xScale, - yScale, - rotate: (_c2 = options.rotate) !== null && _c2 !== void 0 ? _c2 : degrees(0), - xSkew: (_d = options.xSkew) !== null && _d !== void 0 ? _d : degrees(0), - ySkew: (_e = options.ySkew) !== null && _e !== void 0 ? _e : degrees(0), - graphicsState: graphicsStateKey - })); - }; - PDFPage2.prototype.drawSvgPath = function(path3, options) { - var _a3, _b3, _c2, _d, _e, _f, _g, _h, _j; - if (options === void 0) { - options = {}; - } - assertIs(path3, "path", ["string"]); - assertOrUndefined(options.x, "options.x", ["number"]); - assertOrUndefined(options.y, "options.y", ["number"]); - assertOrUndefined(options.scale, "options.scale", ["number"]); - assertOrUndefined(options.rotate, "options.rotate", [[Object, "Rotation"]]); - assertOrUndefined(options.borderWidth, "options.borderWidth", ["number"]); - assertOrUndefined(options.color, "options.color", [[Object, "Color"]]); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertOrUndefined(options.borderColor, "options.borderColor", [ - [Object, "Color"] - ]); - assertOrUndefined(options.borderDashArray, "options.borderDashArray", [ - Array - ]); - assertOrUndefined(options.borderDashPhase, "options.borderDashPhase", [ - "number" - ]); - assertIsOneOfOrUndefined(options.borderLineCap, "options.borderLineCap", LineCapStyle); - assertRangeOrUndefined(options.borderOpacity, "options.borderOpacity", 0, 1); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var graphicsStateKey = this.maybeEmbedGraphicsState({ - opacity: options.opacity, - borderOpacity: options.borderOpacity, - blendMode: options.blendMode - }); - if (!("color" in options) && !("borderColor" in options)) { - options.borderColor = rgb(0, 0, 0); - } - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawSvgPath(path3, { - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : this.x, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : this.y, - scale: options.scale, - rotate: (_c2 = options.rotate) !== null && _c2 !== void 0 ? _c2 : degrees(0), - color: (_d = options.color) !== null && _d !== void 0 ? _d : void 0, - borderColor: (_e = options.borderColor) !== null && _e !== void 0 ? _e : void 0, - borderWidth: (_f = options.borderWidth) !== null && _f !== void 0 ? _f : 0, - borderDashArray: (_g = options.borderDashArray) !== null && _g !== void 0 ? _g : void 0, - borderDashPhase: (_h = options.borderDashPhase) !== null && _h !== void 0 ? _h : void 0, - borderLineCap: (_j = options.borderLineCap) !== null && _j !== void 0 ? _j : void 0, - graphicsState: graphicsStateKey - })); - }; - PDFPage2.prototype.drawLine = function(options) { - var _a3, _b3, _c2, _d, _e; - assertIs(options.start, "options.start", [ - [Object, "{ x: number, y: number }"] - ]); - assertIs(options.end, "options.end", [ - [Object, "{ x: number, y: number }"] - ]); - assertIs(options.start.x, "options.start.x", ["number"]); - assertIs(options.start.y, "options.start.y", ["number"]); - assertIs(options.end.x, "options.end.x", ["number"]); - assertIs(options.end.y, "options.end.y", ["number"]); - assertOrUndefined(options.thickness, "options.thickness", ["number"]); - assertOrUndefined(options.color, "options.color", [[Object, "Color"]]); - assertOrUndefined(options.dashArray, "options.dashArray", [Array]); - assertOrUndefined(options.dashPhase, "options.dashPhase", ["number"]); - assertIsOneOfOrUndefined(options.lineCap, "options.lineCap", LineCapStyle); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var graphicsStateKey = this.maybeEmbedGraphicsState({ - borderOpacity: options.opacity, - blendMode: options.blendMode - }); - if (!("color" in options)) { - options.color = rgb(0, 0, 0); - } - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawLine({ - start: options.start, - end: options.end, - thickness: (_a3 = options.thickness) !== null && _a3 !== void 0 ? _a3 : 1, - color: (_b3 = options.color) !== null && _b3 !== void 0 ? _b3 : void 0, - dashArray: (_c2 = options.dashArray) !== null && _c2 !== void 0 ? _c2 : void 0, - dashPhase: (_d = options.dashPhase) !== null && _d !== void 0 ? _d : void 0, - lineCap: (_e = options.lineCap) !== null && _e !== void 0 ? _e : void 0, - graphicsState: graphicsStateKey - })); - }; - PDFPage2.prototype.drawRectangle = function(options) { - var _a3, _b3, _c2, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; - if (options === void 0) { - options = {}; - } - assertOrUndefined(options.x, "options.x", ["number"]); - assertOrUndefined(options.y, "options.y", ["number"]); - assertOrUndefined(options.width, "options.width", ["number"]); - assertOrUndefined(options.height, "options.height", ["number"]); - assertOrUndefined(options.rotate, "options.rotate", [[Object, "Rotation"]]); - assertOrUndefined(options.xSkew, "options.xSkew", [[Object, "Rotation"]]); - assertOrUndefined(options.ySkew, "options.ySkew", [[Object, "Rotation"]]); - assertOrUndefined(options.borderWidth, "options.borderWidth", ["number"]); - assertOrUndefined(options.color, "options.color", [[Object, "Color"]]); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertOrUndefined(options.borderColor, "options.borderColor", [ - [Object, "Color"] - ]); - assertOrUndefined(options.borderDashArray, "options.borderDashArray", [ - Array - ]); - assertOrUndefined(options.borderDashPhase, "options.borderDashPhase", [ - "number" - ]); - assertIsOneOfOrUndefined(options.borderLineCap, "options.borderLineCap", LineCapStyle); - assertRangeOrUndefined(options.borderOpacity, "options.borderOpacity", 0, 1); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var graphicsStateKey = this.maybeEmbedGraphicsState({ - opacity: options.opacity, - borderOpacity: options.borderOpacity, - blendMode: options.blendMode - }); - if (!("color" in options) && !("borderColor" in options)) { - options.color = rgb(0, 0, 0); - } - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawRectangle({ - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : this.x, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : this.y, - width: (_c2 = options.width) !== null && _c2 !== void 0 ? _c2 : 150, - height: (_d = options.height) !== null && _d !== void 0 ? _d : 100, - rotate: (_e = options.rotate) !== null && _e !== void 0 ? _e : degrees(0), - xSkew: (_f = options.xSkew) !== null && _f !== void 0 ? _f : degrees(0), - ySkew: (_g = options.ySkew) !== null && _g !== void 0 ? _g : degrees(0), - borderWidth: (_h = options.borderWidth) !== null && _h !== void 0 ? _h : 0, - color: (_j = options.color) !== null && _j !== void 0 ? _j : void 0, - borderColor: (_k = options.borderColor) !== null && _k !== void 0 ? _k : void 0, - borderDashArray: (_l = options.borderDashArray) !== null && _l !== void 0 ? _l : void 0, - borderDashPhase: (_m = options.borderDashPhase) !== null && _m !== void 0 ? _m : void 0, - graphicsState: graphicsStateKey, - borderLineCap: (_o = options.borderLineCap) !== null && _o !== void 0 ? _o : void 0 - })); - }; - PDFPage2.prototype.drawSquare = function(options) { - if (options === void 0) { - options = {}; - } - var size = options.size; - assertOrUndefined(size, "size", ["number"]); - this.drawRectangle(__assign(__assign({}, options), { width: size, height: size })); - }; - PDFPage2.prototype.drawEllipse = function(options) { - var _a3, _b3, _c2, _d, _e, _f, _g, _h, _j, _k, _l; - if (options === void 0) { - options = {}; - } - assertOrUndefined(options.x, "options.x", ["number"]); - assertOrUndefined(options.y, "options.y", ["number"]); - assertOrUndefined(options.xScale, "options.xScale", ["number"]); - assertOrUndefined(options.yScale, "options.yScale", ["number"]); - assertOrUndefined(options.rotate, "options.rotate", [[Object, "Rotation"]]); - assertOrUndefined(options.color, "options.color", [[Object, "Color"]]); - assertRangeOrUndefined(options.opacity, "opacity.opacity", 0, 1); - assertOrUndefined(options.borderColor, "options.borderColor", [ - [Object, "Color"] - ]); - assertRangeOrUndefined(options.borderOpacity, "options.borderOpacity", 0, 1); - assertOrUndefined(options.borderWidth, "options.borderWidth", ["number"]); - assertOrUndefined(options.borderDashArray, "options.borderDashArray", [ - Array - ]); - assertOrUndefined(options.borderDashPhase, "options.borderDashPhase", [ - "number" - ]); - assertIsOneOfOrUndefined(options.borderLineCap, "options.borderLineCap", LineCapStyle); - assertIsOneOfOrUndefined(options.blendMode, "options.blendMode", BlendMode); - var graphicsStateKey = this.maybeEmbedGraphicsState({ - opacity: options.opacity, - borderOpacity: options.borderOpacity, - blendMode: options.blendMode - }); - if (!("color" in options) && !("borderColor" in options)) { - options.color = rgb(0, 0, 0); - } - var contentStream = this.getContentStream(); - contentStream.push.apply(contentStream, drawEllipse({ - x: (_a3 = options.x) !== null && _a3 !== void 0 ? _a3 : this.x, - y: (_b3 = options.y) !== null && _b3 !== void 0 ? _b3 : this.y, - xScale: (_c2 = options.xScale) !== null && _c2 !== void 0 ? _c2 : 100, - yScale: (_d = options.yScale) !== null && _d !== void 0 ? _d : 100, - rotate: (_e = options.rotate) !== null && _e !== void 0 ? _e : void 0, - color: (_f = options.color) !== null && _f !== void 0 ? _f : void 0, - borderColor: (_g = options.borderColor) !== null && _g !== void 0 ? _g : void 0, - borderWidth: (_h = options.borderWidth) !== null && _h !== void 0 ? _h : 0, - borderDashArray: (_j = options.borderDashArray) !== null && _j !== void 0 ? _j : void 0, - borderDashPhase: (_k = options.borderDashPhase) !== null && _k !== void 0 ? _k : void 0, - borderLineCap: (_l = options.borderLineCap) !== null && _l !== void 0 ? _l : void 0, - graphicsState: graphicsStateKey - })); - }; - PDFPage2.prototype.drawCircle = function(options) { - if (options === void 0) { - options = {}; - } - var _a3 = options.size, size = _a3 === void 0 ? 100 : _a3; - assertOrUndefined(size, "size", ["number"]); - this.drawEllipse(__assign(__assign({}, options), { xScale: size, yScale: size })); - }; - PDFPage2.prototype.setOrEmbedFont = function(font) { - var oldFont = this.font; - var oldFontKey = this.fontKey; - if (font) - this.setFont(font); - else - this.getFont(); - var newFont = this.font; - var newFontKey = this.fontKey; - return { oldFont, oldFontKey, newFont, newFontKey }; - }; - PDFPage2.prototype.getFont = function() { - if (!this.font || !this.fontKey) { - var font = this.doc.embedStandardFont(StandardFonts.Helvetica); - this.setFont(font); - } - return [this.font, this.fontKey]; - }; - PDFPage2.prototype.resetFont = function() { - this.font = void 0; - this.fontKey = void 0; - }; - PDFPage2.prototype.getContentStream = function(useExisting) { - if (useExisting === void 0) { - useExisting = true; - } - if (useExisting && this.contentStream) - return this.contentStream; - this.contentStream = this.createContentStream(); - this.contentStreamRef = this.doc.context.register(this.contentStream); - this.node.addContentStream(this.contentStreamRef); - return this.contentStream; - }; - PDFPage2.prototype.createContentStream = function() { - var operators = []; - for (var _i = 0; _i < arguments.length; _i++) { - operators[_i] = arguments[_i]; - } - var dict = this.doc.context.obj({}); - var contentStream = PDFContentStream_default.of(dict, operators); - return contentStream; - }; - PDFPage2.prototype.maybeEmbedGraphicsState = function(options) { - var opacity = options.opacity, borderOpacity = options.borderOpacity, blendMode = options.blendMode; - if (opacity === void 0 && borderOpacity === void 0 && blendMode === void 0) { - return void 0; - } - var graphicsState = this.doc.context.obj({ - Type: "ExtGState", - ca: opacity, - CA: borderOpacity, - BM: blendMode - }); - var key = this.node.newExtGState("GS", graphicsState); - return key; - }; - PDFPage2.prototype.scaleAnnot = function(annot, x, y) { - var selectors = ["RD", "CL", "Vertices", "QuadPoints", "L", "Rect"]; - for (var idx = 0, len = selectors.length; idx < len; idx++) { - var list = annot.lookup(PDFName_default.of(selectors[idx])); - if (list instanceof PDFArray_default) - list.scalePDFNumbers(x, y); - } - var inkLists = annot.lookup(PDFName_default.of("InkList")); - if (inkLists instanceof PDFArray_default) { - for (var idx = 0, len = inkLists.size(); idx < len; idx++) { - var arr = inkLists.lookup(idx); - if (arr instanceof PDFArray_default) - arr.scalePDFNumbers(x, y); - } - } - }; - PDFPage2.of = function(leafNode, ref, doc) { - return new PDFPage2(leafNode, ref, doc); - }; - PDFPage2.create = function(doc) { - assertIs(doc, "doc", [[PDFDocument_default, "PDFDocument"]]); - var dummyRef = PDFRef_default.of(-1); - var pageLeaf = PDFPageLeaf_default.withContextAndParent(doc.context, dummyRef); - var pageRef = doc.context.register(pageLeaf); - return new PDFPage2(pageLeaf, pageRef, doc); - }; - return PDFPage2; - }() -); -var PDFPage_default = PDFPage; - -// node_modules/.pnpm/pdf-lib@1.17.1/node_modules/pdf-lib/es/api/form/PDFButton.js -var PDFButton = ( - /** @class */ - function(_super) { - __extends(PDFButton2, _super); - function PDFButton2(acroPushButton, ref, doc) { - var _this = _super.call(this, acroPushButton, ref, doc) || this; - assertIs(acroPushButton, "acroButton", [ - [PDFAcroPushButton_default, "PDFAcroPushButton"] - ]); - _this.acroField = acroPushButton; - return _this; - } - PDFButton2.prototype.setImage = function(image, alignment) { - if (alignment === void 0) { - alignment = ImageAlignment.Center; - } - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var streamRef = this.createImageAppearanceStream(widget, image, alignment); - this.updateWidgetAppearances(widget, { normal: streamRef }); - } - this.markAsClean(); - }; - PDFButton2.prototype.setFontSize = function(fontSize) { - assertPositive(fontSize, "fontSize"); - this.acroField.setFontSize(fontSize); - this.markAsDirty(); - }; - PDFButton2.prototype.addToPage = function(text2, page, options) { - var _a3, _b3, _c2, _d, _e, _f, _g, _h, _j, _k, _l; - assertOrUndefined(text2, "text", ["string"]); - assertOrUndefined(page, "page", [[PDFPage_default, "PDFPage"]]); - assertFieldAppearanceOptions(options); - var widget = this.createWidget({ - x: ((_a3 = options === null || options === void 0 ? void 0 : options.x) !== null && _a3 !== void 0 ? _a3 : 0) - ((_b3 = options === null || options === void 0 ? void 0 : options.borderWidth) !== null && _b3 !== void 0 ? _b3 : 0) / 2, - y: ((_c2 = options === null || options === void 0 ? void 0 : options.y) !== null && _c2 !== void 0 ? _c2 : 0) - ((_d = options === null || options === void 0 ? void 0 : options.borderWidth) !== null && _d !== void 0 ? _d : 0) / 2, - width: (_e = options === null || options === void 0 ? void 0 : options.width) !== null && _e !== void 0 ? _e : 100, - height: (_f = options === null || options === void 0 ? void 0 : options.height) !== null && _f !== void 0 ? _f : 50, - textColor: (_g = options === null || options === void 0 ? void 0 : options.textColor) !== null && _g !== void 0 ? _g : rgb(0, 0, 0), - backgroundColor: (_h = options === null || options === void 0 ? void 0 : options.backgroundColor) !== null && _h !== void 0 ? _h : rgb(0.75, 0.75, 0.75), - borderColor: options === null || options === void 0 ? void 0 : options.borderColor, - borderWidth: (_j = options === null || options === void 0 ? void 0 : options.borderWidth) !== null && _j !== void 0 ? _j : 0, - rotate: (_k = options === null || options === void 0 ? void 0 : options.rotate) !== null && _k !== void 0 ? _k : degrees(0), - caption: text2, - hidden: options === null || options === void 0 ? void 0 : options.hidden, - page: page.ref - }); - var widgetRef = this.doc.context.register(widget.dict); - this.acroField.addWidget(widgetRef); - var font = (_l = options === null || options === void 0 ? void 0 : options.font) !== null && _l !== void 0 ? _l : this.doc.getForm().getDefaultFont(); - this.updateWidgetAppearance(widget, font); - page.node.addAnnot(widgetRef); - }; - PDFButton2.prototype.needsAppearancesUpdate = function() { - var _a3; - if (this.isDirty()) - return true; - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - var hasAppearances = ((_a3 = widget.getAppearances()) === null || _a3 === void 0 ? void 0 : _a3.normal) instanceof PDFStream_default; - if (!hasAppearances) - return true; - } - return false; - }; - PDFButton2.prototype.defaultUpdateAppearances = function(font) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - this.updateAppearances(font); - }; - PDFButton2.prototype.updateAppearances = function(font, provider) { - assertIs(font, "font", [[PDFFont_default, "PDFFont"]]); - assertOrUndefined(provider, "provider", [Function]); - var widgets = this.acroField.getWidgets(); - for (var idx = 0, len = widgets.length; idx < len; idx++) { - var widget = widgets[idx]; - this.updateWidgetAppearance(widget, font, provider); - } - }; - PDFButton2.prototype.updateWidgetAppearance = function(widget, font, provider) { - var apProvider = provider !== null && provider !== void 0 ? provider : defaultButtonAppearanceProvider; - var appearances = normalizeAppearance(apProvider(this, widget, font)); - this.updateWidgetAppearanceWithFont(widget, font, appearances); - }; - PDFButton2.of = function(acroPushButton, ref, doc) { - return new PDFButton2(acroPushButton, ref, doc); - }; - return PDFButton2; - }(PDFField_default) -); -var PDFButton_default = PDFButton; - -// src/utils.ts -var import_obsidian = require("obsidian"); -var TreeNode = class { - constructor(key, title, level) { - this.children = []; - this.key = key; - this.title = title; - this.level = level; - this.children = []; - } -}; -function getHeadingTree(doc = document) { - const headings = doc.querySelectorAll("h1, h2, h3, h4, h5, h6"); - const root3 = new TreeNode("", "Root", 0); - let prev = root3; - headings.forEach((heading) => { - var _a3; - if (heading.style.display == "none") { - return; - } - const level = parseInt(heading.tagName.slice(1)); - const link2 = heading.querySelector("a.md-print-anchor"); - const regexMatch = /^af:\/\/(.+)$/.exec((_a3 = link2 == null ? void 0 : link2.href) != null ? _a3 : ""); - if (!regexMatch) { - return; - } - const newNode = new TreeNode(regexMatch[1], heading.innerText, level); - while (prev.level >= level) { - prev = prev.parent; - } - prev.children.push(newNode); - newNode.parent = prev; - prev = newNode; - }); - return root3; -} -function modifyDest(doc) { - const data = /* @__PURE__ */ new Map(); - doc.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((heading, i) => { - const link2 = document.createElement("a"); - const flag3 = `${heading.tagName.toLowerCase()}-${i}`; - link2.href = `af://${flag3}`; - link2.className = "md-print-anchor"; - heading.appendChild(link2); - data.set(heading.dataset.heading, flag3); - }); - return data; -} -function convertMapKeysToLowercase(map) { - return new Map(Array.from(map).map(([key, value]) => [key == null ? void 0 : key.toLowerCase(), value])); -} -function fixAnchors(doc, dest, basename) { - const lowerDest = convertMapKeysToLowercase(dest); - doc.querySelectorAll("a.internal-link").forEach((el, i) => { - var _a3, _b3, _c2; - const [title, anchor] = (_b3 = (_a3 = el.dataset.href) == null ? void 0 : _a3.split("#")) != null ? _b3 : []; - if (anchor == null ? void 0 : anchor.startsWith("^")) { - el.href = (_c2 = el.dataset.href) == null ? void 0 : _c2.toLowerCase(); - } - if ((anchor == null ? void 0 : anchor.length) > 0) { - if ((title == null ? void 0 : title.length) > 0 && title != basename) { - return; - } - const flag3 = dest.get(anchor) || lowerDest.get(anchor == null ? void 0 : anchor.toLowerCase()); - if (flag3 && !anchor.startsWith("^")) { - el.href = `an://${flag3}`; - } - } - }); -} -var px2mm = (px2) => { - return Math.round(px2 * 0.26458333333719); -}; -var mm2px = (mm) => { - return Math.round(mm * 3.779527559); -}; -function traverseFolder(path3) { - if (path3 instanceof import_obsidian.TFile) { - if (path3.extension == "md") { - return [path3]; - } else { - return []; - } - } - const arr = []; - for (const item of path3.children) { - arr.push(...traverseFolder(item)); - } - return arr; -} -function copyAttributes(node, attributes) { - Array.from(attributes).forEach((attr2) => { - node.setAttribute(attr2.name, attr2.value); - }); -} -function isNumber(str) { - return !isNaN(parseFloat(str)); -} -function safeParseInt(str, default_ = 0) { - try { - const num = parseInt(String(str)); - return isNaN(num) ? default_ : num; - } catch (e) { - return default_; - } -} -function safeParseFloat(str, default_ = 0) { - try { - const num = parseFloat(String(str)); - return isNaN(num) ? default_ : num; - } catch (e) { - return default_; - } -} - -// src/pdf.ts -async function getDestPosition(pdfDoc) { - const pages = pdfDoc.getPages(); - const links = {}; - pages.forEach((page, pageIndex) => { - var _a3, _b3; - const annotations = page.node.Annots(); - if (!annotations) { - return; - } - const numAnnotations = (_a3 = annotations == null ? void 0 : annotations.size()) != null ? _a3 : 0; - for (let annotIndex = 0; annotIndex < numAnnotations; annotIndex++) { - try { - const annotation = annotations.lookup(annotIndex, PDFDict_default); - const subtype = annotation.get(PDFName_default.of("Subtype")); - if ((subtype == null ? void 0 : subtype.toString()) === "/Link") { - const linkDict = annotation.get(PDFName_default.of("A")); - const uri = linkDict == null ? void 0 : linkDict.get(PDFName_default.of("URI")).toString(); - console.debug("uri", uri); - const regexMatch = /^\(af:\/\/(.+)\)$/.exec(uri || ""); - if (regexMatch) { - const rect = (_b3 = annotation.get(PDFName_default.of("Rect"))) == null ? void 0 : _b3.asRectangle(); - const linkUrl = regexMatch[1]; - const yPos = rect.y; - links[linkUrl] = [pageIndex, yPos]; - } - } - } catch (err) { - console.error(err); - } - } - }); - return links; -} -async function setAnchors(pdfDoc, links) { - const pages = pdfDoc.getPages(); - pages.forEach((page, _) => { - var _a3; - const annots = page.node.Annots(); - if (!annots) { - return; - } - const numAnnotations = (_a3 = annots == null ? void 0 : annots.size()) != null ? _a3 : 0; - for (let idx = 0; idx < numAnnotations; idx++) { - try { - const linkAnnotRef = annots.get(idx); - const linkAnnot = annots.lookup(idx, PDFDict_default); - const subtype = linkAnnot.get(PDFName_default.of("Subtype")); - if ((subtype == null ? void 0 : subtype.toString()) === "/Link") { - const linkDict = linkAnnot.get(PDFName_default.of("A")); - const uri = linkDict == null ? void 0 : linkDict.get(PDFName_default.of("URI")).toString(); - console.debug("uri", uri); - const regexMatch = /^\(an:\/\/(.+)\)$/.exec(uri || ""); - const key = regexMatch == null ? void 0 : regexMatch[1]; - if (key && (links == null ? void 0 : links[key])) { - const [pageIdx, yPos] = links[key]; - const newAnnot = pdfDoc.context.obj({ - Type: "Annot", - Subtype: "Link", - Rect: linkAnnot.lookup(PDFName_default.of("Rect")), - Border: linkAnnot.lookup(PDFName_default.of("Border")), - C: linkAnnot.lookup(PDFName_default.of("C")), - Dest: [pages[pageIdx].ref, "XYZ", null, yPos, null] - }); - pdfDoc.context.assign(linkAnnotRef, newAnnot); - } - } - } catch (err) { - console.error(err); - } - } - }); - return links; -} -function generateOutlines(root3, positions, maxLevel = 6) { - var _a3, _b3; - const _outline = (node) => { - var _a4, _b4; - if (node.level > maxLevel) { - return; - } - const [pageIdx, pos] = (_a4 = positions == null ? void 0 : positions[node.key]) != null ? _a4 : [0, 0]; - const outline = { - title: node.title, - to: [pageIdx, 0, pos], - open: false, - children: [] - }; - if (((_b4 = node.children) == null ? void 0 : _b4.length) > 0) { - for (const item of node.children) { - const child2 = _outline(item); - if (child2) { - outline.children.push(child2); - } - } - } - return outline; - }; - return (_b3 = (_a3 = _outline(root3)) == null ? void 0 : _a3.children) != null ? _b3 : []; -} -var walk = (outlines, callback) => { - for (const outline of outlines) { - const ret = callback(outline); - if ("children" in outline && ret !== false) walk(outline.children, callback); - } -}; -var flatten = (outlines) => { - const result = []; - walk(outlines, (outline) => void result.push(outline)); - return result; -}; -var getOpeningCount = (outlines) => { - let count = 0; - walk(outlines, (outline) => { - count += 1; - return !("open" in outline && !outline.open); - }); - return count; -}; -var setOutline = async (doc, outlines) => { - const rootRef = doc.context.nextRef(); - const refMap = /* @__PURE__ */ new WeakMap(); - for (const outline of flatten(outlines)) { - refMap.set(outline, doc.context.nextRef()); - } - const pageRefs = (() => { - const refs = []; - doc.catalog.Pages().traverse((kid, ref) => { - var _a3; - if (((_a3 = kid.get(kid.context.obj("Type"))) == null ? void 0 : _a3.toString()) === "/Page") { - refs.push(ref); - } - }); - return refs; - })(); - const createOutline = (outlines2, parent) => { - const { length } = outlines2; - for (let i = 0; i < length; i += 1) { - const outline = outlines2[i]; - const outlineRef = refMap.get(outline); - const destOrAction = (() => { - if (typeof outline.to === "number") { - return { Dest: [pageRefs[outline.to], "Fit"] }; - } else if (Array.isArray(outline.to)) { - return { - Dest: [pageRefs[outline.to[0]], "XYZ", outline.to[1], outline.to[2], null] - }; - } - return {}; - })(); - const childrenDict = (() => { - if ("children" in outline && outline.children.length > 0) { - createOutline(outline.children, outlineRef); - return { - First: refMap.get(outline.children[0]), - Last: refMap.get(outline.children[outline.children.length - 1]), - Count: getOpeningCount(outline.children) * (outline.open ? 1 : -1) - }; - } - return {}; - })(); - doc.context.assign( - outlineRef, - doc.context.obj({ - Title: PDFHexString_default.fromText(outline.title), - Parent: parent, - ...i > 0 ? { Prev: refMap.get(outlines2[i - 1]) } : {}, - ...i < length - 1 ? { Next: refMap.get(outlines2[i + 1]) } : {}, - ...childrenDict, - ...destOrAction, - F: (outline.italic ? 1 : 0) | (outline.bold ? 2 : 0) - }) - ); - } - }; - createOutline(outlines, rootRef); - const rootCount = getOpeningCount(outlines); - doc.context.assign( - rootRef, - doc.context.obj({ - Type: "Outlines", - ...rootCount > 0 ? { - First: refMap.get(outlines[0]), - Last: refMap.get(outlines[outlines.length - 1]) - } : {}, - Count: rootCount - }) - ); - doc.catalog.set(doc.context.obj("Outlines"), rootRef); -}; -async function editPDF(data, { headings, maxLevel, frontMatter, displayMetadata }) { - const pdfDoc = await PDFDocument_default.load(data); - const posistions = await getDestPosition(pdfDoc); - setAnchors(pdfDoc, posistions); - const outlines = generateOutlines(headings, posistions, maxLevel); - setOutline(pdfDoc, outlines); - if (displayMetadata) { - setMetadata(pdfDoc, frontMatter != null ? frontMatter : {}); - } - data = await pdfDoc.save(); - return data; -} -function setMetadata(pdfDoc, { title, author, keywords, subject, creator, created_at, updated_at }) { - if (title) { - pdfDoc.setTitle(title, { showInWindowTitleBar: true }); - } - if (author) { - if (Array.isArray(author)) { - pdfDoc.setAuthor(author.join(", ")); - } else { - pdfDoc.setAuthor(author.toString()); - } - } - if (keywords) { - pdfDoc.setKeywords(typeof keywords == "string" ? [keywords] : keywords); - } - if (subject) { - pdfDoc.setSubject(subject); - } - pdfDoc.setCreator(creator != null ? creator : "Obsidian"); - pdfDoc.setProducer("Obsidian"); - pdfDoc.setCreationDate(new Date(created_at != null ? created_at : /* @__PURE__ */ new Date())); - pdfDoc.setModificationDate(new Date(updated_at != null ? updated_at : /* @__PURE__ */ new Date())); -} -async function exportToPDF(outputFile, config, w, { doc, frontMatter }) { - var _a3, _b3, _c2; - console.log("output pdf:", outputFile); - let pageSize = config["pageSize"]; - if (config["pageSize"] == "Custom" && config["pageWidth"] && config["pageHeight"]) { - pageSize = { - width: safeParseFloat(config["pageWidth"], 210) / 25.4, - height: safeParseFloat(config["pageHeight"], 297) / 25.4 - }; - } - let scale2 = (_a3 = config == null ? void 0 : config["scale"]) != null ? _a3 : 100; - if (scale2 > 200 || scale2 < 10) { - scale2 = 100; - } - const printOptions = { - landscape: config == null ? void 0 : config["landscape"], - printBackground: config == null ? void 0 : config["printBackground"], - generateTaggedPDF: config == null ? void 0 : config["generateTaggedPDF"], - pageSize, - scale: scale2 / 100, - margins: { - marginType: "default" - }, - displayHeaderFooter: config["displayHeader"] || config["displayFooter"], - headerTemplate: config["displayHeader"] ? (_b3 = frontMatter == null ? void 0 : frontMatter["headerTemplate"]) != null ? _b3 : config["headerTemplate"] : "", - footerTemplate: config["displayFooter"] ? (_c2 = frontMatter == null ? void 0 : frontMatter["footerTemplate"]) != null ? _c2 : config["footerTemplate"] : "" - }; - if (config.marginType == "0") { - printOptions["margins"] = { - marginType: "custom", - top: 0, - bottom: 0, - left: 0, - right: 0 - }; - } else if (config.marginType == "1") { - printOptions["margins"] = { - marginType: "default" - }; - } else if (config.marginType == "2") { - printOptions["margins"] = { - marginType: "custom", - top: 0.1, - bottom: 0.1, - left: 0.1, - right: 0.1 - }; - } else if (config.marginType == "3") { - printOptions["margins"] = { - marginType: "custom", - top: safeParseFloat(config["marginTop"], 0) / 25.4, - bottom: safeParseFloat(config["marginBottom"], 0) / 25.4, - left: safeParseFloat(config["marginLeft"], 0) / 25.4, - right: safeParseFloat(config["marginRight"], 0) / 25.4 - }; - } - try { - let data = await w.printToPDF(printOptions); - data = await editPDF(data, { - headings: getHeadingTree(doc), - frontMatter, - displayMetadata: config == null ? void 0 : config.displayMetadata, - maxLevel: safeParseInt(config == null ? void 0 : config.maxLevel, 6) - }); - await fs.writeFile(outputFile, data); - if (config.open) { - import_electron.default.remote.shell.openPath(outputFile); - } - } catch (error2) { - console.error(error2); - } -} -async function getOutputFile(filename, isTimestamp) { - const result = await import_electron.default.remote.dialog.showSaveDialog({ - title: "Export to PDF", - defaultPath: filename + (isTimestamp ? "-" + Date.now() : "") + ".pdf", - filters: [ - { name: "All Files", extensions: ["*"] }, - { name: "PDF", extensions: ["pdf"] } - ], - properties: ["showOverwriteConfirmation", "createDirectory"] - }); - if (result.canceled) { - return; - } - return result.filePath; -} -async function getOutputPath(filename, isTimestamp) { - const result = await import_electron.default.remote.dialog.showOpenDialog({ - title: "Export to PDF", - defaultPath: filename, - properties: ["openDirectory"] - }); - if (result.canceled) { - return; - } - return result.filePaths[0]; -} - -// src/render.ts -var import_obsidian3 = require("obsidian"); -function getAllStyles() { - const cssTexts = []; - Array.from(document.styleSheets).forEach((sheet) => { - var _a3, _b3, _c2; - const id = (_a3 = sheet.ownerNode) == null ? void 0 : _a3.id; - if (id == null ? void 0 : id.startsWith("svelte-")) { - return; - } - const href = (_b3 = sheet.ownerNode) == null ? void 0 : _b3.href; - const division = `/* ----------${id ? `id:${id}` : href ? `href:${href}` : ""}---------- */`; - cssTexts.push(division); - try { - Array.from((_c2 = sheet == null ? void 0 : sheet.cssRules) != null ? _c2 : []).forEach((rule) => { - cssTexts.push(rule.cssText); - }); - } catch (error2) { - console.error(error2); - } - }); - cssTexts.push(...getPatchStyle()); - return cssTexts; -} -var CSS_PATCH = ` +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`obsidian`),u=require(`electron`);u=c(u);let d=require(`path`);d=c(d);let f=require(`os`);f=c(f);var p=c(o(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))()),m={i18n:{en:{exportCurrentFile:`Export current file to PDF`,exportCurrentFileWithPrevious:`Export to PDF with previous Settings`,exportDialog:{filenameAsTitle:`Include file name as title`,pageSize:`Page Size`,margin:`Margin`,downscalePercent:`Downscale Percent`,landscape:`Landscape`,displayHeader:`Display Header`,displayFooter:`Display Footer`,openAfterExport:`Open after export`,cssSnippets:`CSS snippets`},settings:{showTitle:`Add file name as title`,displayHeader:`Display headers`,displayFooter:`Display footer`,printBackground:`Print background`,maxLevel:`Max headings level of the outline`,displayMetadata:`PDF metadata`,headerTemplate:`Header Template`,footerTemplate:`Footer Template`,isTimestamp:`Add timestamp`,enabledCss:`Enable select css snippets`,concurrency:`Limit concurrency`,debugMode:`Debug Mode`,version:`Engine Version`}},zh:{exportCurrentFile:`导出当前文件为PDF`,exportCurrentFileWithPrevious:`使用上一次设置导出为PDF`,exportDialog:{filenameAsTitle:`将笔记名作为标题`,pageSize:`纸张尺寸`,margin:`页边距`,downscalePercent:`缩放`,landscape:`横向打印`,displayHeader:`页眉`,displayFooter:`页脚`,openAfterExport:`导出后打开`,cssSnippets:`CSS代码片段`},settings:{showTitle:`将笔记名作为标题`,displayHeader:`显示页眉`,displayFooter:`显示页脚`,printBackground:`打印背景`,maxLevel:`最大标题级别`,displayMetadata:`PDF元数据`,headerTemplate:`页眉模板`,footerTemplate:`页脚模板`,isTimestamp:`文件名添加时间戳`,enabledCss:`启用CSS片段选择`,concurrency:`限制并发数`,debugMode:`调试模式`,version:`引擎版本`}}},get current(){let e=window.localStorage.getItem(`language`)??`en`;return(0,p.default)(this.i18n.en,this.i18n[e]??{})}},h=Array.isArray,g=Array.prototype.indexOf,_=Array.prototype.includes,v=Array.from,y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyDescriptors,S=Object.prototype,C=Array.prototype,w=Object.getPrototypeOf,T=Object.isExtensible,E=()=>{};function D(e){for(var t=0;t{e=n,t=r}),resolve:e,reject:t}}function k(e){"@babel/helpers - typeof";return k=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k(e)}function ee(e,t){if(k(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(k(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function A(e){var t=ee(e,`string`);return k(t)==`symbol`?t:t+``}function j(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var te=1024,ne=2048,re=4096,ie=8192,ae=16384,oe=32768,se=1<<25,ce=65536,le=1<<19,ue=1<<20,M=1<<25,N=65536,de=1<<21,fe=1<<22,pe=1<<23,me=Symbol(`$state`),he=Symbol(`legacy props`),ge=Symbol(``),_e=Symbol(`attributes`),ve=Symbol(`class`),P=Symbol(`style`),ye=Symbol(`text`),be=new class extends Error{constructor(...e){super(...e),j(this,`name`,`StaleReactionError`),j(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},xe=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function F(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function I(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ce(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function L(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function R(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function we(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Te(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ee(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function De(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function z(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Oe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var ke={},Ae=Symbol(`uninitialized`);function je(){console.warn(`https://svelte.dev/e/derived_inert`)}function Me(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ne(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Pe=!1;function Fe(e){Pe=e}var Ie;function Le(e){if(e===null)throw Me(),ke;return Ie=e}function Re(){return Le(br(Ie))}function ze(e){if(Pe){if(br(Ie)!==null)throw Me(),ke;Ie=e}}function Be(e=1){if(Pe){for(var t=e,n=Ie;t--;)n=br(n);Ie=n}}function Ve(e=!0){for(var t=0,n=Ie;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=br(n);e&&n.remove(),n=i}}function He(e){if(!e||e.nodeType!==8)throw Me(),ke;return e.data}function Ue(e){return e===this.v}function We(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ge(e){return!We(e,this.v)}var Ke=!1,qe=!1,Je=[];function Ye(e,t=!1,n=!1){return Xe(e,new Map,``,Je,null,n)}function Xe(e,t,n,r,i=null,a=!1){if(typeof e==`object`&&e){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(h(e)){var s=Array(e.length);t.set(e,s),i!==null&&t.set(i,s);for(var c=0;c{t===nt&&rt()})}nt.push(e)}function at(e){var t=si;if(t===null)return ii.f|=pe,e;if(!(t.f&32768)&&!(t.f&4))throw e;ot(e,t)}function ot(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var st=~(ne|re|te);function ct(e,t){e.f=e.f&st|t}function lt(e){e.f&512||e.deps===null?ct(e,te):ct(e,re)}function ut(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=N,ut(t.deps))}function dt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),ut(e.deps),ct(e,te)}var ft=!1,pt=!1;function mt(e){var t=pt;try{return pt=!1,[e(),pt]}finally{pt=t}}function ht(e){let t=0,n=ir(0),r;return()=>{Mr()&&(H(n),zr(()=>(t===0&&(r=Oi(()=>e(()=>ur(n)))),t+=1,()=>{it(()=>{--t,t===0&&(r?.(),r=void 0,ur(n))})})))}}function gt(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _t(e,t){gt(e,t),t.add(e)}function vt(e,t,n){gt(e,t),t.set(e,n)}function yt(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function B(e,t,n){return e.set(yt(e,t),n),n}function V(e,t){return e.get(yt(e,t))}var bt=ce|le;function xt(e,t,n,r){new zt(e,t,n,r)}var St=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap,Ot=new WeakMap,kt=new WeakMap,At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakSet,zt=class{constructor(e,t,n,r){_t(this,Rt),j(this,`parent`,void 0),j(this,`is_pending`,!1),j(this,`transform_error`,void 0),vt(this,St,void 0),vt(this,Ct,Pe?Ie:null),vt(this,wt,void 0),vt(this,Tt,void 0),vt(this,Et,void 0),vt(this,Dt,null),vt(this,Ot,null),vt(this,kt,null),vt(this,At,null),vt(this,jt,0),vt(this,Mt,0),vt(this,Nt,!1),vt(this,Pt,new Set),vt(this,Ft,new Set),vt(this,It,null),vt(this,Lt,ht(()=>(B(It,this,ir(V(jt,this))),()=>{B(It,this,null)}))),B(St,this,e),B(wt,this,t),B(Tt,this,e=>{var t=si;t.b=this,t.f|=128,n(e)}),this.parent=si.b,this.transform_error=r??this.parent?.transform_error??(e=>e),B(Et,this,Vr(()=>{if(Pe){let e=V(Ct,this);Re();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));yt(Rt,this,Vt).call(this,t)}else t?yt(Rt,this,Ht).call(this):yt(Rt,this,Bt).call(this)}else yt(Rt,this,Ut).call(this)},bt)),Pe&&B(St,this,Ie)}defer_effect(e){dt(e,V(Pt,this),V(Ft,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!V(wt,this).pending}update_pending_count(e,t){yt(Rt,this,Kt).call(this,e,t),B(jt,this,V(jt,this)+e),!(!V(It,this)||V(Nt,this))&&(B(Nt,this,!0),it(()=>{B(Nt,this,!1),V(It,this)&&cr(V(It,this),V(jt,this))}))}get_effect_pending(){return V(Lt,this).call(this),H(V(It,this))}error(e){if(!V(wt,this).onerror&&!V(wt,this).failed)throw e;fn?.is_fork?(V(Dt,this)&&fn.skip_effect(V(Dt,this)),V(Ot,this)&&fn.skip_effect(V(Ot,this)),V(kt,this)&&fn.skip_effect(V(kt,this)),fn.oncommit(()=>{yt(Rt,this,qt).call(this,e)})):yt(Rt,this,qt).call(this,e)}};function Bt(){try{B(Dt,this,Hr(()=>V(Tt,this).call(this,V(St,this))))}catch(e){this.error(e)}}function Vt(e){let t=V(wt,this).failed;t&&B(kt,this,Hr(()=>{t(V(St,this),()=>e,()=>()=>{})}))}function Ht(){let e=V(wt,this).pending;e&&(this.is_pending=!0,B(Ot,this,Hr(()=>e(V(St,this)))),it(()=>{var e=B(At,this,document.createDocumentFragment()),t=vr();e.append(t),B(Dt,this,yt(Rt,this,Gt).call(this,()=>Hr(()=>V(Tt,this).call(this,t)))),V(Mt,this)===0&&(V(St,this).before(e),B(At,this,null),Yr(V(Ot,this),()=>{B(Ot,this,null)}),yt(Rt,this,Wt).call(this,fn))}))}function Ut(){try{if(this.is_pending=this.has_pending_snippet(),B(Mt,this,0),B(jt,this,0),B(Dt,this,Hr(()=>{V(Tt,this).call(this,V(St,this))})),V(Mt,this)>0){var e=B(At,this,document.createDocumentFragment());$r(V(Dt,this),e);let t=V(wt,this).pending;B(Ot,this,Hr(()=>t(V(St,this))))}else yt(Rt,this,Wt).call(this,fn)}catch(e){this.error(e)}}function Wt(e){this.is_pending=!1,e.transfer_effects(V(Pt,this),V(Ft,this))}function Gt(e){var t=si,n=ii,r=Ze;ci(V(Et,this)),oi(V(Et,this)),Qe(V(Et,this).ctx);try{return Rn.ensure(),e()}catch(e){return at(e),null}finally{ci(t),oi(n),Qe(r)}}function Kt(e,t){if(!this.has_pending_snippet()){if(this.parent){var n;yt(Rt,n=this.parent,Kt).call(n,e,t)}return}B(Mt,this,V(Mt,this)+e),V(Mt,this)===0&&(yt(Rt,this,Wt).call(this,t),V(Ot,this)&&Yr(V(Ot,this),()=>{B(Ot,this,null)}),V(At,this)&&(V(St,this).before(V(At,this)),B(At,this,null)))}function qt(e){V(Dt,this)&&(Kr(V(Dt,this)),B(Dt,this,null)),V(Ot,this)&&(Kr(V(Ot,this)),B(Ot,this,null)),V(kt,this)&&(Kr(V(kt,this)),B(kt,this,null)),Pe&&(Le(V(Ct,this)),Be(),Le(Ve()));var t=V(wt,this).onerror;let n=V(wt,this).failed;var r=!1,i=!1;let a=()=>{if(r){Ne();return}r=!0,i&&Oe(),V(kt,this)!==null&&Yr(V(kt,this),()=>{B(kt,this,null)}),yt(Rt,this,Gt).call(this,()=>{yt(Rt,this,Ut).call(this)})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){ot(e,V(Et,this)&&V(Et,this).parent)}n&&B(kt,this,yt(Rt,this,Gt).call(this,()=>{try{return Hr(()=>{var t=si;t.b=this,t.f|=128,n(V(St,this),()=>e,()=>a)})}catch(e){return ot(e,V(Et,this).parent),null}}))};it(()=>{var t;try{t=this.transform_error(e)}catch(e){ot(e,V(Et,this)&&V(Et,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>ot(e,V(Et,this)&&V(Et,this).parent)):o(t)})}function Jt(e,t,n,r){let i=tt()?Qt:nn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=si,c=Yt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){ot(e,s)}Xt()}}var d=Zt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>en(e))).then(u).catch(e=>ot(e,s)).finally(d)}l?l.then(()=>{c(),f(),Xt()}):f()}function Yt(){var e=si,t=ii,n=Ze,r=fn;return function(i=!0){ci(e),oi(t),Qe(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Xt(e=!0){ci(null),oi(null),Qe(null),e&&fn?.deactivate()}function Zt(){var e=si,t=e.b,n=fn,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Qt(e){var t=2|ne;return si!==null&&(si.f|=le),{ctx:Ze,deps:null,effects:null,equals:Ue,f:t,fn:e,reactions:null,rv:0,v:Ae,wv:0,parent:si,ac:null}}var $t=Symbol(`obsolete`);function en(e,t,n){let r=si;r===null&&Se();var i=void 0,a=ir(Ae),o=!ii,s=new Set;return Rr(()=>{var t=si,n=O();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==be&&n.reject(e)}).finally(Xt)}catch(e){n.reject(e),Xt()}var c=fn;if(o){if(t.f&32768)var l=Zt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject($t);else for(let e of s.values())e.reject($t);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==$t&&(c.activate(),t?(a.f|=pe,cr(a,t)):(a.f&8388608&&(a.f^=pe),cr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Nr(()=>{for(let e of s)e.reject($t)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function tn(e){let t=Qt(e);return Ke||ui(t),t}function nn(e){let t=Qt(e);return t.equals=Ge,t}function rn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;nthis.schedule(e)){var n=V(Pn,this).get(e);if(n){V(Pn,this).delete(e);for(var r of n.d)ct(r,ne),t(r);for(r of n.m)ct(r,re),t(r)}V(Fn,this).add(e)}capture(e,t,n=!1){e.v!==Ae&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),mn?.set(e,t)),this.is_fork||(e.v=t)}activate(){fn=this}deactivate(){fn=null,mn=null}flush(){try{_n=!0,fn=this,yt(Ln,this,Bn).call(this)}finally{bn=0,hn=null,vn=null,yn=null,_n=!1,fn=null,mn=null,nr.clear()}}discard(){for(let e of V(En,this))e(this);V(En,this).clear();for(let e of this.async_deriveds.values())e.reject($t);yt(Ln,this,Kn).call(this),V(kn,this)?.resolve()}register_created_effect(e){V(jn,this).push(e)}increment(e,t){if(B(Dn,this,V(Dn,this)+1),e){let e=V(On,this).get(t)??0;V(On,this).set(t,e+1)}}decrement(e,t){if(B(Dn,this,V(Dn,this)-1),e){let e=V(On,this).get(t)??0;e===1?V(On,this).delete(t):V(On,this).set(t,e-1)}V(In,this)||(B(In,this,!0),it(()=>{B(In,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)V(Mn,this).add(t);for(let e of t)V(Nn,this).add(e);e.clear(),t.clear()}oncommit(e){V(Tn,this).add(e)}ondiscard(e){V(En,this).add(e)}settled(){return(V(kn,this)??B(kn,this,O())).promise}static ensure(){if(fn===null){let t=fn=new e;!_n&&!gn&&it(()=>{V(Sn,t)||t.flush()})}return fn}apply(){if(!Ke||!this.is_fork&&V(Cn,this)===null&&V(wn,this)===null){mn=null;return}mn=new Map;for(let[e,[t]]of this.current)mn.set(e,t);for(let t=un;t!==null;t=V(wn,t))if(!(t===this||t.is_fork)){var e=!1;if(t.id1e3&&(yt(Ln,this,Kn).call(this),qn());for(let e of V(Mn,this))V(Nn,this).delete(e),ct(e,ne),this.schedule(e);for(let e of V(Nn,this))ct(e,re),this.schedule(e);let e=V(An,this);B(An,this,[]),this.apply();var t=vn=[],n=[],r=yn=[];for(let r of e)try{yt(Ln,this,Vn).call(this,r,t,n)}catch(e){throw er(r),yt(Ln,this,zn).call(this)||this.discard(),e}if(fn=null,r.length>0){var i=ln.ensure();for(let e of r)i.schedule(e)}if(vn=null,yn=null,yt(Ln,this,zn).call(this)){yt(Ln,this,Wn).call(this,n),yt(Ln,this,Wn).call(this,t);for(let[e,t]of V(Pn,this))$n(e,t);r.length>0&&yt(Ln,fn,Bn).call(fn);return}let a=yt(Ln,this,Hn).call(this);if(a){yt(Ln,this,Wn).call(this,n),yt(Ln,this,Wn).call(this,t),yt(Ln,a,Un).call(a,this);return}V(Mn,this).clear(),V(Nn,this).clear();for(let e of V(Tn,this))e(this);V(Tn,this).clear(),pn=this,Yn(n),Yn(t),pn=null,V(kn,this)?.resolve();var o=fn;if(V(Dn,this)===0&&(V(An,this).length===0||o!==null)&&(yt(Ln,this,Kn).call(this),Ke&&(yt(Ln,this,Gn).call(this),fn=o)),V(An,this).length>0)if(o!==null){let e=o;V(An,e).push(...V(An,this).filter(t=>!V(An,e).includes(t)))}else o=this;o!==null&&yt(Ln,o,Bn).call(o)}function Vn(e,t,n){e.f^=te;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||V(Pn,this).has(r))&&r.fn!==null){a?r.f^=te:i&4?t.push(r):Ke&&i&16777224?n.push(r):bi(r)&&(i&16&&V(Nn,this).add(r),Ti(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Hn(){for(var e=V(Cn,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=V(Cn,e)}return null}function Un(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(V(Mn,e),V(Nn,e));let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(V(Nn,this).delete(i),ct(i,ne),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),yt(Ln,e,Kn).call(e),fn=this,yt(Ln,this,Bn).call(this)}function Wn(e){for(var t=0;t!u.current.get(e)[1]);if(!(!V(Sn,u)||r.length===0)){var i=r.filter(e=>!this.current.has(e));if(i.length===0)e&&u.discard();else if(t.length>0){if(e)for(let e of V(Fn,this))u.unskip_effect(e,e=>{e.f&4194320?u.schedule(e):yt(Ln,u,Wn).call(u,[e])});u.activate();var a=new Set,o=new Map;for(var s of t)Xn(s,i,a,o);o=new Map;var c=[...u.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(c.length>0)for(let e of V(jn,this))!(e.f&155648)&&Zn(e,c,o)&&(e.f&4194320?(ct(e,ne),u.schedule(e)):V(Mn,u).add(e));if(V(An,u).length>0&&!V(In,u)){u.apply();for(var l of V(An,u))yt(Ln,u,Vn).call(u,l,[],[]);B(An,u,[])}u.deactivate()}}}}function Kn(){if(this.linked){var e=V(Cn,this),t=V(wn,this);e===null?un=t:B(wn,e,t),t===null?dn=e:B(Cn,t,e),this.linked=!1}}function qn(){try{we()}catch(e){ot(e,hn)}}var Jn=null;function Yn(e){var t=e.length;if(t!==0){for(var n=0;n0)){nr.clear();for(let e of Jn){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Jn.has(n)&&(Jn.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ti(n)}}Jn.clear()}}Jn=null}}function Xn(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Xn(i,t,n,r):e&4194320&&!(e&2048)&&Zn(i,t,r)&&(ct(i,ne),Qn(i))}}function Zn(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(_.call(t,r))return!0;if(r.f&2&&Zn(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Qn(e){fn.schedule(e)}function $n(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),ct(e,te);for(var n=e.first;n!==null;)$n(n,t),n=n.next}}function er(e){ct(e,te);for(var t=e.first;t!==null;)er(t),t=t.next}var tr=new Set,nr=new Map,rr=!1;function ir(e,t){return{f:0,v:e,reactions:null,equals:Ue,rv:0,wv:0}}function ar(e,t){let n=ir(e,t);return ui(n),n}function or(e,t=!1,n=!0){let r=ir(e);if(t||(r.equals=Ge),qe&&n&&Ze!==null&&Ze.l!==null){var i;((i=Ze.l).s??(i.s=[])).push(r)}return r}function sr(e,t,n=!1){return ii!==null&&(!ai||ii.f&131072)&&tt()&&ii.f&4325394&&(li===null||!li.has(e))&&z(),cr(e,n?fr(t):t,yn)}function cr(e,t,n=null){if(!e.equals(t)){nr.set(e,ni?t:e.v);var r=Rn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&an(t),mn===null&<(t)}e.wv=yi(),dr(e,ne,n),tt()&&si!==null&&si.f&1024&&!(si.f&96)&&(pi===null?mi([e]):pi.push(e)),!r.is_fork&&tr.size>0&&!rr&&lr()}return t}function lr(){rr=!1;for(let e of tr){e.f&1024&&ct(e,re);let t;try{t=bi(e)}catch{t=!0}t&&Ti(e)}tr.clear()}function ur(e){sr(e,e.v+1)}function dr(e,t,n){var r=e.reactions;if(r!==null)for(var i=tt(),a=r.length,o=0;o{if(_i===o)return e();var t=ii,n=_i;oi(null),vi(o);var r=e();return oi(t),vi(n),r};return r&&n.set(`length`,ar(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Ee();var i=n.get(t);return i===void 0?s(()=>{var e=ar(r.value,a);return n.set(t,e),e}):sr(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>ar(Ae,a));n.set(t,e),ur(i)}}else sr(r,Ae),ur(i);return!0},get(t,r,i){if(r===me)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||b(t,r)?.writable)&&(o=s(()=>ar(fr(c?t[r]:Ae),a)),n.set(r,o)),o!==void 0){var l=H(o);return l===Ae?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=H(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==Ae)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===me)return!0;var r=n.get(t),i=r!==void 0&&r.v!==Ae||Reflect.has(e,t);return(r!==void 0||si!==null&&(!i||b(e,t)?.writable))&&(r===void 0&&(r=s(()=>ar(i?fr(e[t]):Ae,a)),n.set(t,r)),H(r)===Ae)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;dar(Ae,a)),n.set(d+``,f)):sr(f,Ae)}if(l===void 0)(!u||b(e,t)?.writable)&&(l=s(()=>ar(void 0,a)),sr(l,fr(o)),n.set(t,l));else{u=l.v!==Ae;var p=s(()=>fr(o));sr(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&sr(h,g+1)}ur(i)}return!0},ownKeys(e){H(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==Ae});for(var[r,a]of n)a.v!==Ae&&!(r in e)&&t.push(r);return t},setPrototypeOf(){De()}})}var pr,mr,hr,gr;function _r(){if(pr===void 0){pr=window,mr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;hr=b(t,`firstChild`).get,gr=b(t,`nextSibling`).get,T(e)&&(e[ve]=void 0,e[_e]=null,e[P]=void 0,e.__e=void 0),T(n)&&(n[ye]=void 0)}}function vr(e=``){return document.createTextNode(e)}function yr(e){return hr.call(e)}function br(e){return gr.call(e)}function xr(e,t){if(!Pe)return yr(e);var n=yr(Ie);if(n===null)n=Ie.appendChild(vr());else if(t&&n.nodeType!==3){var r=vr();return n?.before(r),Le(r),r}return t&&Dr(n),Le(n),n}function Sr(e,t=!1){if(!Pe){var n=yr(e);return n instanceof Comment&&n.data===``?br(n):n}if(t){if(Ie?.nodeType!==3){var r=vr();return Ie?.before(r),Le(r),r}Dr(Ie)}return Ie}function Cr(e,t=1,n=!1){let r=Pe?Ie:e;for(var i;t--;)i=r,r=br(r);if(!Pe)return r;if(n){if(r?.nodeType!==3){var a=vr();return r===null?i?.after(a):r.before(a),Le(a),a}Dr(r)}return Le(r),r}function wr(e){e.textContent=``}function Tr(){return!Ke||Jn!==null?!1:(si.f&oe)!==0}function Er(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Dr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Or(e){var t=ii,n=si;oi(null),ci(null);try{return e()}finally{oi(t),ci(n)}}function kr(e){si===null&&(ii===null&&R(e),L()),ni&&Ce(e)}function Ar(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function jr(e,t){var n=si;n!==null&&n.f&8192&&(e|=ie);var r={ctx:Ze,deps:null,nodes:null,f:e|ne|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};fn?.register_created_effect(r);var i=r;if(e&4)vn===null?Rn.ensure().schedule(r):vn.push(r);else if(t!==null){try{Ti(r)}catch(e){throw Kr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ce))}if(i!==null&&(i.parent=n,n!==null&&Ar(i,n),ii!==null&&ii.f&2&&!(e&64))){var a=ii;(a.effects??(a.effects=[])).push(i)}return r}function Mr(){return ii!==null&&!ai}function Nr(e){let t=jr(8,null);return ct(t,te),t.teardown=e,t}function Pr(e){kr(`$effect`);var t=si.f;if(!ii&&t&32&&Ze!==null&&!Ze.i){var n=Ze;(n.e??(n.e=[])).push(e)}else return Fr(e)}function Fr(e){return jr(4|ue,e)}function Ir(e){Rn.ensure();let t=jr(64|le,e);return(e={})=>new Promise(n=>{e.outro?Yr(t,()=>{Kr(t),n(void 0)}):(Kr(t),n(void 0))})}function Lr(e){return jr(4,e)}function Rr(e){return jr(fe|le,e)}function zr(e,t=0){return jr(8|t,e)}function Br(e,t=[],n=[],r=[]){Jt(r,t,n,t=>{jr(8,()=>{e(...t.map(H))})})}function Vr(e,t=0){return jr(16|t,e)}function Hr(e){return jr(32|le,e)}function Ur(e){var t=e.teardown;if(t!==null){let e=ni,n=ii;ri(!0),oi(null);try{t.call(null)}finally{ri(e),oi(n)}}}function Wr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Or(()=>{e.abort(be)});var r=n.next;n.f&64?n.parent=null:Kr(n,t),n=r}}function Gr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Kr(t),t=n}}function Kr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(qr(e.nodes.start,e.nodes.end),n=!0),e.f|=se,Wr(e,t&&!n),wi(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Ur(e),e.f^=se,e.f|=ae;var i=e.parent;i!==null&&i.first!==null&&Jr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function qr(e,t){for(;e!==null;){var n=e===t?null:br(e);e.remove(),e=n}}function Jr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Yr(e,t,n=!0){var r=[];Xr(e,r,!0);var i=()=>{n&&Kr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Xr(e,t,n){if(!(e.f&8192)){e.f^=ie;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Xr(i,t,o?n:!1)}i=a}}}function Zr(e){Qr(e,!0)}function Qr(e,t){if(e.f&8192){e.f^=ie,e.f&1024||(ct(e,ne),Rn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Qr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function $r(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:br(n);t.append(n),n=i}}var ei=null,ti=!1,ni=!1;function ri(e){ni=e}var ii=null,ai=!1;function oi(e){ii=e}var si=null;function ci(e){si=e}var li=null;function ui(e){ii!==null&&(!Ke||ii.f&2)&&(li??(li=new Set)).add(e)}var di=null,fi=0,pi=null;function mi(e){pi=e}var hi=1,gi=0,_i=gi;function vi(e){_i=e}function yi(){return++hi}function bi(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~N),t&4096){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}t&512&&mn===null&&ct(e,te)}return!1}function xi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Ke&&li!==null&&li.has(e)))for(var i=0;i{e.ac.abort(be)}),e.ac=null);try{e.f|=de;var u=e.fn,d=u();e.f|=oe;var f=e.deps,p=fn?.is_fork;if(di!==null){var m;if(p||wi(e,fi),f!==null&&fi>0)for(f.length=fi+di.length,m=0;m{throw e});throw f}}finally{e[Ni]=t,delete e.currentTarget,oi(u),ci(d)}}}var Bi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Vi(e){return Bi?.createHTML(e)??e}function Hi(e){var t=Er(`template`);return t.innerHTML=Vi(e.replaceAll(``,``)),t.content}function Ui(e,t){var n=si;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Wi(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(``);return()=>{if(Pe)return Ui(Ie,null),Ie;i===void 0&&(i=Hi(a?e:``+e),n||(i=yr(i)));var t=r||mr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=yr(t),s=t.lastChild;Ui(o,s)}else Ui(t,t);return t}}function Gi(e,t){if(Pe){var n=si;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ie),Re();return}e!==null&&e.before(t)}function Ki(e,t){var n,r=t==null?``:typeof t==`object`?`${t}`:t;r!==((n=e)[ye]??(n[ye]=e.nodeValue))&&(e[ye]=r,e.nodeValue=`${r}`)}function qi(e,t){return Yi(e,t)}var Ji=new Map;function Yi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){_r();var c=void 0,l=Ir(()=>{var o=n??t.appendChild(vr());xt(o,{pending:()=>{}},t=>{$e({});var n=Ze;if(a&&(n.c=a),i&&(r.$$events=i),Pe&&Ui(t,null),c=e(t,r)||{},Pe&&(si.nodes.end=Ie,Ie===null||Ie.nodeType!==8||Ie.data!==`]`))throw Me(),ke;et()},s);var l=new Set,u=e=>{for(var n=0;n{for(var e of l)for(let n of[t,document]){var r=Ji.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,zi),r.delete(e),r.size===0&&Ji.delete(n)):r.set(e,i)}Fi.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return Xi.set(c,l),c}var Xi=new WeakMap;function Zi(e,t){let n=Xi.get(e);return n?(Xi.delete(e),n(t)):Promise.resolve()}var Qi=new WeakMap,$i=new WeakMap,ea=new WeakMap,ta=new WeakMap,na=new WeakMap,ra=new WeakMap,ia=new WeakMap,aa=class{constructor(e,t=!0){j(this,`anchor`,void 0),vt(this,Qi,new Map),vt(this,$i,new Map),vt(this,ea,new Map),vt(this,ta,new Set),vt(this,na,!0),vt(this,ra,e=>{if(V(Qi,this).has(e)){var t=V(Qi,this).get(e),n=V($i,this).get(t);if(n)Zr(n),V(ta,this).delete(t);else{var r=V(ea,this).get(t);r&&(Zr(r.effect),V($i,this).set(t,r.effect),V(ea,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of V(Qi,this)){if(V(Qi,this).delete(t),t===e)break;let r=V(ea,this).get(n);r&&(Kr(r.effect),V(ea,this).delete(n))}for(let[e,r]of V($i,this)){if(e===t||V(ta,this).has(e))continue;let i=()=>{if(Array.from(V(Qi,this).values()).includes(e)){var t=document.createDocumentFragment();$r(r,t),t.append(vr()),V(ea,this).set(e,{effect:r,fragment:t})}else Kr(r);V(ta,this).delete(e),V($i,this).delete(e)};V(na,this)||!n?(V(ta,this).add(e),Yr(r,i,!1)):i()}}}),vt(this,ia,e=>{V(Qi,this).delete(e);let t=Array.from(V(Qi,this).values());for(let[e,n]of V(ea,this))t.includes(e)||(Kr(n.effect),V(ea,this).delete(e))}),this.anchor=e,B(na,this,t)}ensure(e,t){var n=fn,r=Tr();if(t&&!V($i,this).has(e)&&!V(ea,this).has(e))if(r){var i=document.createDocumentFragment(),a=vr();i.append(a),V(ea,this).set(e,{effect:Hr(()=>t(a)),fragment:i})}else V($i,this).set(e,Hr(()=>t(this.anchor)));if(V(Qi,this).set(n,e),r){for(let[t,r]of V($i,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of V(ea,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(V(ra,this)),n.ondiscard(V(ia,this))}else Pe&&(this.anchor=Ie),V(ra,this).call(this,n)}};function oa(e,t,n=!1){var r;Pe&&(r=Ie,Re());var i=new aa(e),a=n?ce:0;function o(e,t){if(Pe){var n=He(r);if(e!==parseInt(n.substring(1))){var a=Ve();Le(a),i.anchor=a,Fe(!1),i.ensure(e,t),Fe(!0);return}}i.ensure(e,t)}Vr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function sa(e,t){return t}function ca(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;la(e,v(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;wr(u),u.append(l),e.items.clear()}la(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function la(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i{var e=n();return h(e)?e:e==null?[]:v(e)}),d,f=new Map,p=!0;function m(e){_.effect.f&16384||(_.pending.delete(e),_.fallback=l,pa(_,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=M,ha(l,null,o)):Zr(l):Yr(l,()=>{l=null})))}function g(e){_.pending.delete(e)}var _={effect:Vr(()=>{d=H(u);var e=d.length;let c=!1;Pe&&He(o)===`[!`!=(e===0)&&(o=Ve(),Le(o),Fe(!1),c=!0);for(var h=new Set,_=fn,v=Tr(),y=0;ya(o)):(l=Hr(()=>a(ua??(ua=vr()))),l.f|=M)),e>h.size&&I(``,``,``),Pe&&e>0&&Le(Ve()),!p)if(f.set(_,h),v){for(let[e,t]of s)h.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(g)}else m(_);c&&Fe(!0),H(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,Pe&&(o=Ie)}function fa(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function pa(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=fa(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_0){var E=r&4&&o===0?n:null;if(a){for(_=0;_{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function ma(e,t,n,r,i,a,o,s){var c=o&1?o&16?ir(n):or(n,!1,!1):null,l=o&2?ir(i):null;return{v:c,i:l,e:Hr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function ha(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=br(r);if(a.before(r),r===i)return;r=o}}function ga(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function _a(e,t){Lr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Er(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function va(e,t,n){Lr(()=>{var r=Oi(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};zr(()=>{var e=n();ki(e),i&&We(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}var ya=[...` +\r\f\xA0\v`];function ba(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||ya.includes(r[o-1]))&&(s===r.length||ya.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function xa(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Sa(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Ca(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Sa)),i&&c.push(...Object.keys(i).map(Sa));var l=0,u=-1;let t=e.length;for(var d=0;d{var n=V(Fa,this).get(e);n.delete(t),n.size===0&&(V(Fa,this).delete(e),V(Ia,this).unobserve(e))}}};Pa=za;function Ba(){return V(Ia,this)??B(Ia,this,new ResizeObserver(e=>{for(var t of e){Pa.entries.set(t.target,t);for(var n of V(Fa,this).get(t.target)||[])n(t)}}))}j(za,`entries`,new WeakMap);function Va(e,t){return e===t||e?.[me]===t}function Ha(e={},t,n,r){var i=Ze.r,a=si;return Lr(()=>{var o,s;return zr(()=>{o=s,s=r?.()||[],Oi(()=>{Va(n(...s),e)||(t(e,...s),o&&Va(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Va(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Ua(e,t,n,r){var i=!qe||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??(l=Qt(r)),H(l)):(c&&(c=!1,s=o?Oi(r):r),s);let d;if(a){var f=me in e||he in e;d=b(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=mt(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Te(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?Qt:nn)(()=>(_=!1,h()));a&&H(v);var y=si;return(function(e,t){if(arguments.length>0){let n=t?H(v):i&&a?fr(e):e;return sr(v,n),_=!0,s!==void 0&&(s=n),e}return ni&&_||y.f&16384?v.v:H(v)})}function Wa(e){Ze===null&&F(`onMount`),qe&&Ze.l!==null?Ka(Ze).m.push(e):Pr(()=>{let t=Oi(e);if(typeof t==`function`)return t})}function Ga(e){Ze===null&&F(`onDestroy`),Wa(()=>()=>Oi(e))}function Ka(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var qa=class{constructor(e,t,n){this.children=[],this.key=e,this.title=t,this.level=n,this.children=[]}};function Ja(e=document){let t=e.querySelectorAll(`h1, h2, h3, h4, h5, h6`),n=new qa(``,`Root`,0),r=n;return t.forEach(e=>{if(e.style.display==`none`)return;let t=parseInt(e.tagName.slice(1)),n=e.querySelector(`a.md-print-anchor`),i=/^af:\/\/(.+)$/.exec(n?.href??``);if(!i)return;let a=new qa(i[1],e.innerText,t);for(;r.level>=t;)r=r.parent;r.children.push(a),a.parent=r,r=a}),n}function Ya(e){let t=new Map;return e.querySelectorAll(`h1, h2, h3, h4, h5, h6`).forEach((e,n)=>{let r=document.createElement(`a`),i=`${e.tagName.toLowerCase()}-${n}`;r.href=`af://${i}`,r.className=`md-print-anchor`,e.appendChild(r),e.dataset.heading&&t.set(e.dataset.heading,i);let a=e.textContent?.trim();if(a){t.set(a,i),t.set(encodeURIComponent(a),i),t.set(a.replace(/\s+/g,`-`),i),t.set(a.toLowerCase().replace(/\s+/g,`-`),i);let e=a.replace(/[^\w\s-]/g,``).trim();e&&e!==a&&(t.set(e,i),t.set(e.replace(/\s+/g,`-`),i),t.set(e.toLowerCase().replace(/\s+/g,`-`),i))}e.id&&t.set(e.id,i)}),t}function Xa(e){return new Map(Array.from(e).map(([e,t])=>[e?.toLowerCase(),t]))}function Za(e,t,n){let r=Xa(t);e.querySelectorAll(`a.internal-link`).forEach((e,i)=>{let[a,o]=e.dataset.href?.split(`#`)??[];if(o?.startsWith(`^`)&&(e.href=e.dataset.href?.toLowerCase()),o?.length>0){if(a?.length>0&&a!=n)return;let i=t.get(o)||r.get(o?.toLowerCase());i&&!o.startsWith(`^`)&&(e.href=`an://${i}`)}}),e.querySelectorAll(`a[href^='#']`).forEach(e=>{let n=e.getAttribute(`href`);if(!n)return;let i=n.substring(1);if(!i||e.classList.contains(`internal-link`)||i.startsWith(`^`))return;let a=[i,decodeURIComponent(i),i.replace(/-/g,` `),decodeURIComponent(i).replace(/-/g,` `),i.toLowerCase(),decodeURIComponent(i).toLowerCase(),i.toLowerCase().replace(/-/g,` `),decodeURIComponent(i).toLowerCase().replace(/-/g,` `)],o=null;for(let e of a)if(o=t.get(e)||r.get(e.toLowerCase()),o)break;o&&(e.href=`an://${o}`)})}var Qa=e=>Math.round(e*.26458333333719),$a=e=>Math.round(e*3.779527559);function eo(e){if(e instanceof l.TFile)return e.extension==`md`?[e]:[];let t=[];for(let n of e.children)t.push(...eo(n));return t.sort((e,t)=>e.name.localeCompare(t.name)),t}function to(e,t){Array.from(t).forEach(t=>{e.setAttribute(t.name,t.value)})}function no(e,t){return e.replace(/\{\{(.*?)\}\}/g,(e,n)=>t[n.trim()])}function ro(e){return!isNaN(parseFloat(e))}function io(e,t=0){try{let n=parseInt(String(e));return isNaN(n)?t:n}catch{return t}}function ao(e,t=0){try{let n=parseFloat(String(e));return isNaN(n)?t:n}catch{return t}}function oo(){let e=[];return Array.from(document.styleSheets).forEach(t=>{let n=t.ownerNode?.id;if(n?.startsWith(`svelte-`))return;let r=t.ownerNode?.href,i=`/* ----------${n?`id:${n}`:r?`href:${r}`:``}---------- */`;e.push(i);try{Array.from(t?.cssRules??[]).forEach(t=>{e.push(t.cssText)})}catch(e){console.error(e)}}),e.push(...co()),e}var so=` /* ---------- css patch ---------- */ body { @@ -20380,5561 +40,72 @@ img.__canvas__ { width: 100% !important; height: 100% !important; } -`; -function getPatchStyle() { - return [CSS_PATCH, ...getPrintStyle()]; -} -function getPrintStyle() { - const cssTexts = []; - Array.from(document.styleSheets).forEach((sheet) => { - var _a3; - try { - const cssRules = (_a3 = sheet == null ? void 0 : sheet.cssRules) != null ? _a3 : []; - Array.from(cssRules).forEach((rule) => { - if (rule.constructor.name == "CSSMediaRule") { - if (rule.conditionText === "print") { - const res = rule.cssText.replace(/@media print\s*\{(.+)\}/gms, "$1"); - cssTexts.push(res); - } - } - }); - } catch (error2) { - console.error(error2); - } - }); - return cssTexts; -} -function generateDocId(n) { - return Array.from({ length: n }, () => (16 * Math.random() | 0).toString(16)).join(""); -} -function getFrontMatter(app, file) { - var _a3; - const cache = app.metadataCache.getFileCache(file); - return (_a3 = cache == null ? void 0 : cache.frontmatter) != null ? _a3 : {}; -} -async function renderMarkdown({ app, file, config, extra }) { - var _a3, _b3, _c2, _d, _e, _f, _g, _h; - const startTime = (/* @__PURE__ */ new Date()).getTime(); - const ws = app.workspace; - const leaf = ws.getLeaf(true); - await leaf.openFile(file); - const view = leaf.view; - const data = (_d = (_b3 = view == null ? void 0 : view.data) != null ? _b3 : (_a3 = ws == null ? void 0 : ws.getActiveFileView()) == null ? void 0 : _a3.data) != null ? _d : (_c2 = ws.activeEditor) == null ? void 0 : _c2.data; - if (!data) { - new import_obsidian3.Notice("data is empty!"); - } - const frontMatter = getFrontMatter(app, file); - const cssclasses = []; - for (const [key, val] of Object.entries(frontMatter)) { - if (key.toLowerCase() == "cssclass" || key.toLowerCase() == "cssclasses") { - if (Array.isArray(val)) { - cssclasses.push(...val); - } else { - cssclasses.push(val); - } - } - } - const comp = new import_obsidian3.Component(); - comp.load(); - const printEl = document.body.createDiv("print"); - const viewEl = printEl.createDiv({ - cls: "markdown-preview-view markdown-rendered " + cssclasses.join(" ") - }); - app.vault.cachedRead(file); - viewEl.toggleClass("rtl", app.vault.getConfig("rightToLeft")); - viewEl.toggleClass("show-properties", "hidden" !== app.vault.getConfig("propertiesInDocument")); - const title = (_f = (_e = extra == null ? void 0 : extra.title) != null ? _e : frontMatter == null ? void 0 : frontMatter.title) != null ? _f : file.basename; - viewEl.createEl("h1", { text: title }, (e) => { - var _a4; - e.addClass("__title__"); - e.style.display = config.showTitle ? "block" : "none"; - e.id = (_a4 = extra == null ? void 0 : extra.id) != null ? _a4 : ""; - }); - const cache = app.metadataCache.getFileCache(file); - const blocks = new Map(Object.entries((_g = cache == null ? void 0 : cache.blocks) != null ? _g : {})); - const lines = ((_h = data == null ? void 0 : data.split("\n")) != null ? _h : []).map((line, i) => { - for (const { - id, - position: { start, end } - } of blocks.values()) { - const blockid = `^${id}`; - if (line.includes(blockid) && i >= start.line && i <= end.line) { - blocks.delete(id); - return line.replace(blockid, ` ${blockid}`); - } - } - return line; - }); - [...blocks.values()].forEach(({ id, position: { start, end } }) => { - const idx = start.line; - lines[idx] = ` - -` + lines[idx]; - }); - const fragment = { - children: void 0, - appendChild(e) { - this.children = e == null ? void 0 : e.children; - throw new Error("exit"); - } - }; - const promises = []; - try { - await import_obsidian3.MarkdownRenderer.render(app, lines.join("\n"), fragment, file.path, comp); - } catch (error2) { - } - const el = createFragment(); - Array.from(fragment.children).forEach((item) => { - el.createDiv({}, (t) => { - return t.appendChild(item); - }); - }); - viewEl.appendChild(el); - await import_obsidian3.MarkdownRenderer.postProcess(app, { - docId: generateDocId(16), - sourcePath: file.path, - frontmatter: {}, - promises, - addChild: function(e) { - return comp.addChild(e); - }, - getSectionInfo: function() { - return null; - }, - containerEl: viewEl, - el: viewEl, - displayMode: true - }); - await Promise.all(promises); - printEl.findAll("a.internal-link").forEach((el2) => { - var _a4, _b4; - const [title2, anchor] = (_b4 = (_a4 = el2.dataset.href) == null ? void 0 : _a4.split("#")) != null ? _b4 : []; - if ((!title2 || (title2 == null ? void 0 : title2.length) == 0 || title2 == file.basename) && (anchor == null ? void 0 : anchor.startsWith("^"))) { - return; - } - el2.removeAttribute("href"); - }); - try { - await fixWaitRender(data, viewEl); - } catch (error2) { - console.warn("wait timeout"); - } - fixCanvasToImage(viewEl); - const doc = document.implementation.createHTMLDocument("document"); - doc.body.appendChild(printEl.cloneNode(true)); - printEl.detach(); - comp.unload(); - printEl.remove(); - doc.title = title; - leaf.detach(); - console.log(`md render time:${(/* @__PURE__ */ new Date()).getTime() - startTime}ms`); - return { doc, frontMatter, file }; -} -function fixDoc(doc, title) { - const dest = modifyDest(doc); - fixAnchors(doc, dest, title); - encodeEmbeds(doc); - return doc; -} -function encodeEmbeds(doc) { - const spans = Array.from(doc.querySelectorAll("span.markdown-embed")).reverse(); - spans.forEach((span) => span.innerHTML = encodeURIComponent(span.innerHTML)); -} -async function fixWaitRender(data, viewEl) { - if (data.includes("```dataview") || data.includes("```gEvent") || data.includes("![[")) { - await sleep(2e3); - } - try { - await waitForDomChange(viewEl); - } catch (error2) { - await sleep(1e3); - } -} -function fixCanvasToImage(el) { - for (const canvas of Array.from(el.querySelectorAll("canvas"))) { - const data = canvas.toDataURL(); - const img = document.createElement("img"); - img.src = data; - copyAttributes(img, canvas.attributes); - img.className = "__canvas__"; - canvas.replaceWith(img); - } -} -function createWebview(scale2 = 1.25) { - const webview = document.createElement("webview"); - webview.src = `app://obsidian.md/help.html`; - webview.setAttribute( - "style", - `height:calc(${scale2} * 100%); - width: calc(${scale2} * 100%); - transform: scale(${1 / scale2}, ${1 / scale2}); - transform-origin: top left; - border: 1px solid #f2f2f2; - ` - ); - webview.nodeintegration = true; - return webview; -} -function waitForDomChange(target, timeout = 2e3, interval = 200) { - return new Promise((resolve, reject) => { - let timer; - const observer = new MutationObserver((m) => { - clearTimeout(timer); - timer = setTimeout(() => { - observer.disconnect(); - resolve(true); - }, interval); - }); - observer.observe(target, { - childList: true, - subtree: true, - attributes: true, - characterData: true - }); - setTimeout(() => { - observer.disconnect(); - reject(new Error(`timeout ${timeout}ms`)); - }, timeout); - }); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/version.js -var PUBLIC_VERSION = "5"; - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/disclose-version.js -var _a, _b, _c; -if (typeof window !== "undefined") { - ((_c = (_b = (_a = window.__svelte) != null ? _a : window.__svelte = {}).v) != null ? _c : _b.v = /* @__PURE__ */ new Set()).add(PUBLIC_VERSION); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/constants.js -var EACH_ITEM_REACTIVE = 1; -var EACH_INDEX_REACTIVE = 1 << 1; -var EACH_IS_CONTROLLED = 1 << 2; -var EACH_IS_ANIMATED = 1 << 3; -var EACH_ITEM_IMMUTABLE = 1 << 4; -var PROPS_IS_IMMUTABLE = 1; -var PROPS_IS_RUNES = 1 << 1; -var PROPS_IS_UPDATED = 1 << 2; -var PROPS_IS_BINDABLE = 1 << 3; -var PROPS_IS_LAZY_INITIAL = 1 << 4; -var TRANSITION_OUT = 1 << 1; -var TRANSITION_GLOBAL = 1 << 2; -var TEMPLATE_FRAGMENT = 1; -var TEMPLATE_USE_IMPORT_NODE = 1 << 1; -var HYDRATION_START = "["; -var HYDRATION_START_ELSE = "[!"; -var HYDRATION_END = "]"; -var HYDRATION_ERROR = {}; -var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1; -var UNINITIALIZED = Symbol(); -var FILENAME = Symbol("filename"); -var HMR = Symbol("hmr"); -var NAMESPACE_HTML = "http://www.w3.org/1999/xhtml"; -var NAMESPACE_SVG = "http://www.w3.org/2000/svg"; - -// node_modules/.pnpm/esm-env@1.2.2/node_modules/esm-env/dev-fallback.js -var _a2, _b2; -var node_env = (_b2 = (_a2 = globalThis.process) == null ? void 0 : _a2.env) == null ? void 0 : _b2.NODE_ENV; -var dev_fallback_default = node_env && !node_env.toLowerCase().startsWith("prod"); - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/shared/utils.js -var is_array = Array.isArray; -var index_of = Array.prototype.indexOf; -var array_from = Array.from; -var object_keys = Object.keys; -var define_property = Object.defineProperty; -var get_descriptor = Object.getOwnPropertyDescriptor; -var get_descriptors = Object.getOwnPropertyDescriptors; -var object_prototype = Object.prototype; -var array_prototype = Array.prototype; -var get_prototype_of = Object.getPrototypeOf; -var is_extensible = Object.isExtensible; -function is_function(thing) { - return typeof thing === "function"; -} -var noop = () => { -}; -function run_all(arr) { - for (var i = 0; i < arr.length; i++) { - arr[i](); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/constants.js -var DERIVED = 1 << 1; -var EFFECT = 1 << 2; -var RENDER_EFFECT = 1 << 3; -var BLOCK_EFFECT = 1 << 4; -var BRANCH_EFFECT = 1 << 5; -var ROOT_EFFECT = 1 << 6; -var BOUNDARY_EFFECT = 1 << 7; -var UNOWNED = 1 << 8; -var DISCONNECTED = 1 << 9; -var CLEAN = 1 << 10; -var DIRTY = 1 << 11; -var MAYBE_DIRTY = 1 << 12; -var INERT = 1 << 13; -var DESTROYED = 1 << 14; -var EFFECT_RAN = 1 << 15; -var EFFECT_TRANSPARENT = 1 << 16; -var LEGACY_DERIVED_PROP = 1 << 17; -var INSPECT_EFFECT = 1 << 18; -var HEAD_EFFECT = 1 << 19; -var EFFECT_HAS_DERIVED = 1 << 20; -var EFFECT_IS_UPDATING = 1 << 21; -var STATE_SYMBOL = Symbol("$state"); -var LEGACY_PROPS = Symbol("legacy props"); -var LOADING_ATTR_SYMBOL = Symbol(""); - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/errors.js -function derived_references_self() { - if (dev_fallback_default) { - const error2 = new Error(`derived_references_self -A derived value cannot reference itself recursively -https://svelte.dev/e/derived_references_self`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/derived_references_self`); - } -} -function effect_update_depth_exceeded() { - if (dev_fallback_default) { - const error2 = new Error(`effect_update_depth_exceeded -Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops -https://svelte.dev/e/effect_update_depth_exceeded`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`); - } -} -function hydration_failed() { - if (dev_fallback_default) { - const error2 = new Error(`hydration_failed -Failed to hydrate the application -https://svelte.dev/e/hydration_failed`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/hydration_failed`); - } -} -function invalid_snippet() { - if (dev_fallback_default) { - const error2 = new Error(`invalid_snippet -Could not \`{@render}\` snippet due to the expression being \`null\` or \`undefined\`. Consider using optional chaining \`{@render snippet?.()}\` -https://svelte.dev/e/invalid_snippet`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/invalid_snippet`); - } -} -function props_invalid_value(key) { - if (dev_fallback_default) { - const error2 = new Error(`props_invalid_value -Cannot do \`bind:${key}={undefined}\` when \`${key}\` has a fallback value -https://svelte.dev/e/props_invalid_value`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/props_invalid_value`); - } -} -function props_rest_readonly(property) { - if (dev_fallback_default) { - const error2 = new Error(`props_rest_readonly -Rest element properties of \`$props()\` such as \`${property}\` are readonly -https://svelte.dev/e/props_rest_readonly`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/props_rest_readonly`); - } -} -function rune_outside_svelte(rune) { - if (dev_fallback_default) { - const error2 = new Error(`rune_outside_svelte -The \`${rune}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files -https://svelte.dev/e/rune_outside_svelte`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/rune_outside_svelte`); - } -} -function state_descriptors_fixed() { - if (dev_fallback_default) { - const error2 = new Error(`state_descriptors_fixed -Property descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`. -https://svelte.dev/e/state_descriptors_fixed`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/state_descriptors_fixed`); - } -} -function state_prototype_fixed() { - if (dev_fallback_default) { - const error2 = new Error(`state_prototype_fixed -Cannot set prototype of \`$state\` object -https://svelte.dev/e/state_prototype_fixed`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/state_prototype_fixed`); - } -} -function state_unsafe_mutation() { - if (dev_fallback_default) { - const error2 = new Error(`state_unsafe_mutation -Updating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without \`$state\` -https://svelte.dev/e/state_unsafe_mutation`); - error2.name = "Svelte error"; - throw error2; - } else { - throw new Error(`https://svelte.dev/e/state_unsafe_mutation`); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/warnings.js -var bold = "font-weight: bold"; -var normal = "font-weight: normal"; -function hydration_attribute_changed(attribute, html2, value) { - if (dev_fallback_default) { - console.warn(`%c[svelte] hydration_attribute_changed -%cThe \`${attribute}\` attribute on \`${html2}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value -https://svelte.dev/e/hydration_attribute_changed`, bold, normal); - } else { - console.warn(`https://svelte.dev/e/hydration_attribute_changed`); - } -} -function hydration_mismatch(location) { - if (dev_fallback_default) { - console.warn(`%c[svelte] hydration_mismatch -%c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : "Hydration failed because the initial UI does not match what was rendered on the server"} -https://svelte.dev/e/hydration_mismatch`, bold, normal); - } else { - console.warn(`https://svelte.dev/e/hydration_mismatch`); - } -} -function lifecycle_double_unmount() { - if (dev_fallback_default) { - console.warn(`%c[svelte] lifecycle_double_unmount -%cTried to unmount a component that was not mounted -https://svelte.dev/e/lifecycle_double_unmount`, bold, normal); - } else { - console.warn(`https://svelte.dev/e/lifecycle_double_unmount`); - } -} -function state_proxy_equality_mismatch(operator) { - if (dev_fallback_default) { - console.warn(`%c[svelte] state_proxy_equality_mismatch -%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${operator}\` will produce unexpected results -https://svelte.dev/e/state_proxy_equality_mismatch`, bold, normal); - } else { - console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/hydration.js -var hydrating = false; -function set_hydrating(value) { - hydrating = value; -} -var hydrate_node; -function set_hydrate_node(node) { - if (node === null) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - return hydrate_node = node; -} -function hydrate_next() { - return set_hydrate_node( - /** @type {TemplateNode} */ - get_next_sibling(hydrate_node) - ); -} -function reset(node) { - if (!hydrating) return; - if (get_next_sibling(hydrate_node) !== null) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - hydrate_node = node; -} -function remove_nodes() { - var depth = 0; - var node = hydrate_node; - while (true) { - if (node.nodeType === 8) { - var data = ( - /** @type {Comment} */ - node.data - ); - if (data === HYDRATION_END) { - if (depth === 0) return node; - depth -= 1; - } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE) { - depth += 1; - } - } - var next2 = ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - node.remove(); - node = next2; - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dev/tracing.js -var tracing_expressions = null; -function get_stack(label) { - let error2 = Error(); - const stack2 = error2.stack; - if (stack2) { - const lines = stack2.split("\n"); - const new_lines = ["\n"]; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line === "Error") { - continue; - } - if (line.includes("validate_each_keys")) { - return null; - } - if (line.includes("svelte/src/internal")) { - continue; - } - new_lines.push(line); - } - if (new_lines.length === 1) { - return null; - } - define_property(error2, "stack", { - value: new_lines.join("\n") - }); - define_property(error2, "name", { - // 'Error' suffix is required for stack traces to be rendered properly - value: `${label}Error` - }); - } - return error2; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/flags/index.js -var legacy_mode_flag = false; -var tracing_mode_flag = false; - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/proxy.js -function proxy(value) { - if (typeof value !== "object" || value === null || STATE_SYMBOL in value) { - return value; - } - const prototype = get_prototype_of(value); - if (prototype !== object_prototype && prototype !== array_prototype) { - return value; - } - var sources = /* @__PURE__ */ new Map(); - var is_proxied_array = is_array(value); - var version = state(0); - var stack2 = dev_fallback_default && tracing_mode_flag ? get_stack("CreatedAt") : null; - var reaction = active_reaction; - var with_parent = (fn) => { - var previous_reaction = active_reaction; - set_active_reaction(reaction); - var result = fn(); - set_active_reaction(previous_reaction); - return result; - }; - if (is_proxied_array) { - sources.set("length", state( - /** @type {any[]} */ - value.length, - stack2 - )); - } - return new Proxy( - /** @type {any} */ - value, - { - defineProperty(_, prop2, descriptor) { - if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) { - state_descriptors_fixed(); - } - var s = sources.get(prop2); - if (s === void 0) { - s = with_parent(() => state(descriptor.value, stack2)); - sources.set(prop2, s); - } else { - set( - s, - with_parent(() => proxy(descriptor.value)) - ); - } - return true; - }, - deleteProperty(target, prop2) { - var s = sources.get(prop2); - if (s === void 0) { - if (prop2 in target) { - sources.set( - prop2, - with_parent(() => state(UNINITIALIZED, stack2)) - ); - } - } else { - if (is_proxied_array && typeof prop2 === "string") { - var ls = ( - /** @type {Source} */ - sources.get("length") - ); - var n = Number(prop2); - if (Number.isInteger(n) && n < ls.v) { - set(ls, n); - } - } - set(s, UNINITIALIZED); - update_version(version); - } - return true; - }, - get(target, prop2, receiver) { - var _a3; - if (prop2 === STATE_SYMBOL) { - return value; - } - var s = sources.get(prop2); - var exists = prop2 in target; - if (s === void 0 && (!exists || ((_a3 = get_descriptor(target, prop2)) == null ? void 0 : _a3.writable))) { - s = with_parent(() => state(proxy(exists ? target[prop2] : UNINITIALIZED), stack2)); - sources.set(prop2, s); - } - if (s !== void 0) { - var v = get(s); - return v === UNINITIALIZED ? void 0 : v; - } - return Reflect.get(target, prop2, receiver); - }, - getOwnPropertyDescriptor(target, prop2) { - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop2); - if (descriptor && "value" in descriptor) { - var s = sources.get(prop2); - if (s) descriptor.value = get(s); - } else if (descriptor === void 0) { - var source2 = sources.get(prop2); - var value2 = source2 == null ? void 0 : source2.v; - if (source2 !== void 0 && value2 !== UNINITIALIZED) { - return { - enumerable: true, - configurable: true, - value: value2, - writable: true - }; - } - } - return descriptor; - }, - has(target, prop2) { - var _a3; - if (prop2 === STATE_SYMBOL) { - return true; - } - var s = sources.get(prop2); - var has = s !== void 0 && s.v !== UNINITIALIZED || Reflect.has(target, prop2); - if (s !== void 0 || active_effect !== null && (!has || ((_a3 = get_descriptor(target, prop2)) == null ? void 0 : _a3.writable))) { - if (s === void 0) { - s = with_parent(() => state(has ? proxy(target[prop2]) : UNINITIALIZED, stack2)); - sources.set(prop2, s); - } - var value2 = get(s); - if (value2 === UNINITIALIZED) { - return false; - } - } - return has; - }, - set(target, prop2, value2, receiver) { - var _a3; - var s = sources.get(prop2); - var has = prop2 in target; - if (is_proxied_array && prop2 === "length") { - for (var i = value2; i < /** @type {Source} */ - s.v; i += 1) { - var other_s = sources.get(i + ""); - if (other_s !== void 0) { - set(other_s, UNINITIALIZED); - } else if (i in target) { - other_s = with_parent(() => state(UNINITIALIZED, stack2)); - sources.set(i + "", other_s); - } - } - } - if (s === void 0) { - if (!has || ((_a3 = get_descriptor(target, prop2)) == null ? void 0 : _a3.writable)) { - s = with_parent(() => state(void 0, stack2)); - set( - s, - with_parent(() => proxy(value2)) - ); - sources.set(prop2, s); - } - } else { - has = s.v !== UNINITIALIZED; - set( - s, - with_parent(() => proxy(value2)) - ); - } - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop2); - if (descriptor == null ? void 0 : descriptor.set) { - descriptor.set.call(receiver, value2); - } - if (!has) { - if (is_proxied_array && typeof prop2 === "string") { - var ls = ( - /** @type {Source} */ - sources.get("length") - ); - var n = Number(prop2); - if (Number.isInteger(n) && n >= ls.v) { - set(ls, n + 1); - } - } - update_version(version); - } - return true; - }, - ownKeys(target) { - get(version); - var own_keys = Reflect.ownKeys(target).filter((key2) => { - var source3 = sources.get(key2); - return source3 === void 0 || source3.v !== UNINITIALIZED; - }); - for (var [key, source2] of sources) { - if (source2.v !== UNINITIALIZED && !(key in target)) { - own_keys.push(key); - } - } - return own_keys; - }, - setPrototypeOf() { - state_prototype_fixed(); - } - } - ); -} -function update_version(signal, d = 1) { - set(signal, signal.v + d); -} -function get_proxied_value(value) { - try { - if (value !== null && typeof value === "object" && STATE_SYMBOL in value) { - return value[STATE_SYMBOL]; - } - } catch (e) { - } - return value; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dev/equality.js -function init_array_prototype_warnings() { - const array_prototype2 = Array.prototype; - const cleanup = Array.__svelte_cleanup; - if (cleanup) { - cleanup(); - } - const { indexOf, lastIndexOf, includes } = array_prototype2; - array_prototype2.indexOf = function(item, from_index) { - const index2 = indexOf.call(this, item, from_index); - if (index2 === -1) { - for (let i = from_index != null ? from_index : 0; i < this.length; i += 1) { - if (get_proxied_value(this[i]) === item) { - state_proxy_equality_mismatch("array.indexOf(...)"); - break; - } - } - } - return index2; - }; - array_prototype2.lastIndexOf = function(item, from_index) { - const index2 = lastIndexOf.call(this, item, from_index != null ? from_index : this.length - 1); - if (index2 === -1) { - for (let i = 0; i <= (from_index != null ? from_index : this.length - 1); i += 1) { - if (get_proxied_value(this[i]) === item) { - state_proxy_equality_mismatch("array.lastIndexOf(...)"); - break; - } - } - } - return index2; - }; - array_prototype2.includes = function(item, from_index) { - const has = includes.call(this, item, from_index); - if (!has) { - for (let i = 0; i < this.length; i += 1) { - if (get_proxied_value(this[i]) === item) { - state_proxy_equality_mismatch("array.includes(...)"); - break; - } - } - } - return has; - }; - Array.__svelte_cleanup = () => { - array_prototype2.indexOf = indexOf; - array_prototype2.lastIndexOf = lastIndexOf; - array_prototype2.includes = includes; - }; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/operations.js -var $window; -var $document; -var is_firefox; -var first_child_getter; -var next_sibling_getter; -function init_operations() { - if ($window !== void 0) { - return; - } - $window = window; - $document = document; - is_firefox = /Firefox/.test(navigator.userAgent); - var element_prototype = Element.prototype; - var node_prototype = Node.prototype; - var text_prototype = Text.prototype; - first_child_getter = get_descriptor(node_prototype, "firstChild").get; - next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get; - if (is_extensible(element_prototype)) { - element_prototype.__click = void 0; - element_prototype.__className = void 0; - element_prototype.__attributes = null; - element_prototype.__style = void 0; - element_prototype.__e = void 0; - } - if (is_extensible(text_prototype)) { - text_prototype.__t = void 0; - } - if (dev_fallback_default) { - element_prototype.__svelte_meta = null; - init_array_prototype_warnings(); - } -} -function create_text(value = "") { - return document.createTextNode(value); -} -// @__NO_SIDE_EFFECTS__ -function get_first_child(node) { - return first_child_getter.call(node); -} -// @__NO_SIDE_EFFECTS__ -function get_next_sibling(node) { - return next_sibling_getter.call(node); -} -function child(node, is_text) { - if (!hydrating) { - return /* @__PURE__ */ get_first_child(node); - } - var child2 = ( - /** @type {TemplateNode} */ - /* @__PURE__ */ get_first_child(hydrate_node) - ); - if (child2 === null) { - child2 = hydrate_node.appendChild(create_text()); - } else if (is_text && child2.nodeType !== 3) { - var text2 = create_text(); - child2 == null ? void 0 : child2.before(text2); - set_hydrate_node(text2); - return text2; - } - set_hydrate_node(child2); - return child2; -} -function first_child(fragment, is_text) { - var _a3, _b3; - if (!hydrating) { - var first = ( - /** @type {DocumentFragment} */ - /* @__PURE__ */ get_first_child( - /** @type {Node} */ - fragment - ) - ); - if (first instanceof Comment && first.data === "") return /* @__PURE__ */ get_next_sibling(first); - return first; - } - if (is_text && ((_a3 = hydrate_node) == null ? void 0 : _a3.nodeType) !== 3) { - var text2 = create_text(); - (_b3 = hydrate_node) == null ? void 0 : _b3.before(text2); - set_hydrate_node(text2); - return text2; - } - return hydrate_node; -} -function sibling(node, count = 1, is_text = false) { - let next_sibling = hydrating ? hydrate_node : node; - var last_sibling; - while (count--) { - last_sibling = next_sibling; - next_sibling = /** @type {TemplateNode} */ - /* @__PURE__ */ get_next_sibling(next_sibling); - } - if (!hydrating) { - return next_sibling; - } - var type = next_sibling == null ? void 0 : next_sibling.nodeType; - if (is_text && type !== 3) { - var text2 = create_text(); - if (next_sibling === null) { - last_sibling == null ? void 0 : last_sibling.after(text2); - } else { - next_sibling.before(text2); - } - set_hydrate_node(text2); - return text2; - } - set_hydrate_node(next_sibling); - return ( - /** @type {TemplateNode} */ - next_sibling - ); -} -function clear_text_content(node) { - node.textContent = ""; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/reactivity/equality.js -function equals(value) { - return value === this.v; -} -function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function"; -} -function safe_equals(value) { - return !safe_not_equal(value, this.v); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/reactivity/deriveds.js -// @__NO_SIDE_EFFECTS__ -function derived(fn) { - var flags = DERIVED | DIRTY; - var parent_derived = active_reaction !== null && (active_reaction.f & DERIVED) !== 0 ? ( - /** @type {Derived} */ - active_reaction - ) : null; - if (active_effect === null || parent_derived !== null && (parent_derived.f & UNOWNED) !== 0) { - flags |= UNOWNED; - } else { - active_effect.f |= EFFECT_HAS_DERIVED; - } - const signal = { - ctx: component_context, - deps: null, - effects: null, - equals, - f: flags, - fn, - reactions: null, - rv: 0, - v: ( - /** @type {V} */ - null - ), - wv: 0, - parent: parent_derived != null ? parent_derived : active_effect - }; - if (dev_fallback_default && tracing_mode_flag) { - signal.created = get_stack("CreatedAt"); - } - return signal; -} -// @__NO_SIDE_EFFECTS__ -function derived_safe_equal(fn) { - const signal = /* @__PURE__ */ derived(fn); - signal.equals = safe_equals; - return signal; -} -function destroy_derived_effects(derived2) { - var effects = derived2.effects; - if (effects !== null) { - derived2.effects = null; - for (var i = 0; i < effects.length; i += 1) { - destroy_effect( - /** @type {Effect} */ - effects[i] - ); - } - } -} -var stack = []; -function get_derived_parent_effect(derived2) { - var parent = derived2.parent; - while (parent !== null) { - if ((parent.f & DERIVED) === 0) { - return ( - /** @type {Effect} */ - parent - ); - } - parent = parent.parent; - } - return null; -} -function execute_derived(derived2) { - var value; - var prev_active_effect = active_effect; - set_active_effect(get_derived_parent_effect(derived2)); - if (dev_fallback_default) { - let prev_inspect_effects = inspect_effects; - set_inspect_effects(/* @__PURE__ */ new Set()); - try { - if (stack.includes(derived2)) { - derived_references_self(); - } - stack.push(derived2); - destroy_derived_effects(derived2); - value = update_reaction(derived2); - } finally { - set_active_effect(prev_active_effect); - set_inspect_effects(prev_inspect_effects); - stack.pop(); - } - } else { - try { - destroy_derived_effects(derived2); - value = update_reaction(derived2); - } finally { - set_active_effect(prev_active_effect); - } - } - return value; -} -function update_derived(derived2) { - var value = execute_derived(derived2); - var status = (skip_reaction || (derived2.f & UNOWNED) !== 0) && derived2.deps !== null ? MAYBE_DIRTY : CLEAN; - set_signal_status(derived2, status); - if (!derived2.equals(value)) { - derived2.v = value; - derived2.wv = increment_write_version(); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/reactivity/effects.js -function push_effect(effect2, parent_effect) { - var parent_last = parent_effect.last; - if (parent_last === null) { - parent_effect.last = parent_effect.first = effect2; - } else { - parent_last.next = effect2; - effect2.prev = parent_last; - parent_effect.last = effect2; - } -} -function create_effect(type, fn, sync, push2 = true) { - var _a3; - var parent = active_effect; - if (dev_fallback_default) { - while (parent !== null && (parent.f & INSPECT_EFFECT) !== 0) { - parent = parent.parent; - } - } - var effect2 = { - ctx: component_context, - deps: null, - nodes_start: null, - nodes_end: null, - f: type | DIRTY, - first: null, - fn, - last: null, - next: null, - parent, - prev: null, - teardown: null, - transitions: null, - wv: 0 - }; - if (dev_fallback_default) { - effect2.component_function = dev_current_component_function; - } - if (sync) { - try { - update_effect(effect2); - effect2.f |= EFFECT_RAN; - } catch (e) { - destroy_effect(effect2); - throw e; - } - } else if (fn !== null) { - schedule_effect(effect2); - } - var inert = sync && effect2.deps === null && effect2.first === null && effect2.nodes_start === null && effect2.teardown === null && (effect2.f & (EFFECT_HAS_DERIVED | BOUNDARY_EFFECT)) === 0; - if (!inert && push2) { - if (parent !== null) { - push_effect(effect2, parent); - } - if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) { - var derived2 = ( - /** @type {Derived} */ - active_reaction - ); - ((_a3 = derived2.effects) != null ? _a3 : derived2.effects = []).push(effect2); - } - } - return effect2; -} -function teardown(fn) { - const effect2 = create_effect(RENDER_EFFECT, null, false); - set_signal_status(effect2, CLEAN); - effect2.teardown = fn; - return effect2; -} -function effect_root(fn) { - const effect2 = create_effect(ROOT_EFFECT, fn, true); - return () => { - destroy_effect(effect2); - }; -} -function component_root(fn) { - const effect2 = create_effect(ROOT_EFFECT, fn, true); - return (options = {}) => { - return new Promise((fulfil) => { - if (options.outro) { - pause_effect(effect2, () => { - destroy_effect(effect2); - fulfil(void 0); - }); - } else { - destroy_effect(effect2); - fulfil(void 0); - } - }); - }; -} -function effect(fn) { - return create_effect(EFFECT, fn, false); -} -function render_effect(fn) { - return create_effect(RENDER_EFFECT, fn, true); -} -function template_effect(fn, thunks = [], d = derived) { - const deriveds = thunks.map(d); - const effect2 = () => fn(...deriveds.map(get)); - if (dev_fallback_default) { - define_property(effect2, "name", { - value: "{expression}" - }); - } - return block(effect2); -} -function block(fn, flags = 0) { - return create_effect(RENDER_EFFECT | BLOCK_EFFECT | flags, fn, true); -} -function branch(fn, push2 = true) { - return create_effect(RENDER_EFFECT | BRANCH_EFFECT, fn, true, push2); -} -function execute_effect_teardown(effect2) { - var teardown2 = effect2.teardown; - if (teardown2 !== null) { - const previously_destroying_effect = is_destroying_effect; - const previous_reaction = active_reaction; - set_is_destroying_effect(true); - set_active_reaction(null); - try { - teardown2.call(null); - } finally { - set_is_destroying_effect(previously_destroying_effect); - set_active_reaction(previous_reaction); - } - } -} -function destroy_effect_children(signal, remove_dom = false) { - var effect2 = signal.first; - signal.first = signal.last = null; - while (effect2 !== null) { - var next2 = effect2.next; - if ((effect2.f & ROOT_EFFECT) !== 0) { - effect2.parent = null; - } else { - destroy_effect(effect2, remove_dom); - } - effect2 = next2; - } -} -function destroy_block_effect_children(signal) { - var effect2 = signal.first; - while (effect2 !== null) { - var next2 = effect2.next; - if ((effect2.f & BRANCH_EFFECT) === 0) { - destroy_effect(effect2); - } - effect2 = next2; - } -} -function destroy_effect(effect2, remove_dom = true) { - var removed = false; - if ((remove_dom || (effect2.f & HEAD_EFFECT) !== 0) && effect2.nodes_start !== null) { - var node = effect2.nodes_start; - var end = effect2.nodes_end; - while (node !== null) { - var next2 = node === end ? null : ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - node.remove(); - node = next2; - } - removed = true; - } - destroy_effect_children(effect2, remove_dom && !removed); - remove_reactions(effect2, 0); - set_signal_status(effect2, DESTROYED); - var transitions = effect2.transitions; - if (transitions !== null) { - for (const transition2 of transitions) { - transition2.stop(); - } - } - execute_effect_teardown(effect2); - var parent = effect2.parent; - if (parent !== null && parent.first !== null) { - unlink_effect(effect2); - } - if (dev_fallback_default) { - effect2.component_function = null; - } - effect2.next = effect2.prev = effect2.teardown = effect2.ctx = effect2.deps = effect2.fn = effect2.nodes_start = effect2.nodes_end = null; -} -function unlink_effect(effect2) { - var parent = effect2.parent; - var prev = effect2.prev; - var next2 = effect2.next; - if (prev !== null) prev.next = next2; - if (next2 !== null) next2.prev = prev; - if (parent !== null) { - if (parent.first === effect2) parent.first = next2; - if (parent.last === effect2) parent.last = prev; - } -} -function pause_effect(effect2, callback) { - var transitions = []; - pause_children(effect2, transitions, true); - run_out_transitions(transitions, () => { - destroy_effect(effect2); - if (callback) callback(); - }); -} -function run_out_transitions(transitions, fn) { - var remaining = transitions.length; - if (remaining > 0) { - var check = () => --remaining || fn(); - for (var transition2 of transitions) { - transition2.out(check); - } - } else { - fn(); - } -} -function pause_children(effect2, transitions, local) { - if ((effect2.f & INERT) !== 0) return; - effect2.f ^= INERT; - if (effect2.transitions !== null) { - for (const transition2 of effect2.transitions) { - if (transition2.is_global || local) { - transitions.push(transition2); - } - } - } - var child2 = effect2.first; - while (child2 !== null) { - var sibling2 = child2.next; - var transparent = (child2.f & EFFECT_TRANSPARENT) !== 0 || (child2.f & BRANCH_EFFECT) !== 0; - pause_children(child2, transitions, transparent ? local : false); - child2 = sibling2; - } -} -function resume_effect(effect2) { - resume_children(effect2, true); -} -function resume_children(effect2, local) { - if ((effect2.f & INERT) === 0) return; - effect2.f ^= INERT; - if ((effect2.f & CLEAN) === 0) { - effect2.f ^= CLEAN; - } - if (check_dirtiness(effect2)) { - set_signal_status(effect2, DIRTY); - schedule_effect(effect2); - } - var child2 = effect2.first; - while (child2 !== null) { - var sibling2 = child2.next; - var transparent = (child2.f & EFFECT_TRANSPARENT) !== 0 || (child2.f & BRANCH_EFFECT) !== 0; - resume_children(child2, transparent ? local : false); - child2 = sibling2; - } - if (effect2.transitions !== null) { - for (const transition2 of effect2.transitions) { - if (transition2.is_global || local) { - transition2.in(); - } - } - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/task.js -var micro_tasks = []; -var idle_tasks = []; -function run_micro_tasks() { - var tasks = micro_tasks; - micro_tasks = []; - run_all(tasks); -} -function run_idle_tasks() { - var tasks = idle_tasks; - idle_tasks = []; - run_all(tasks); -} -function queue_micro_task(fn) { - if (micro_tasks.length === 0) { - queueMicrotask(run_micro_tasks); - } - micro_tasks.push(fn); -} -function flush_tasks() { - if (micro_tasks.length > 0) { - run_micro_tasks(); - } - if (idle_tasks.length > 0) { - run_idle_tasks(); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/runtime.js -var handled_errors = /* @__PURE__ */ new WeakSet(); -var is_throwing_error = false; -var is_flushing = false; -var last_scheduled_effect = null; -var is_updating_effect = false; -var is_destroying_effect = false; -function set_is_destroying_effect(value) { - is_destroying_effect = value; -} -var queued_root_effects = []; -var dev_effect_stack = []; -var active_reaction = null; -var untracking = false; -function set_active_reaction(reaction) { - active_reaction = reaction; -} -var active_effect = null; -function set_active_effect(effect2) { - active_effect = effect2; -} -var reaction_sources = null; -function push_reaction_value(value) { - if (active_reaction !== null && active_reaction.f & EFFECT_IS_UPDATING) { - if (reaction_sources === null) { - reaction_sources = [value]; - } else { - reaction_sources.push(value); - } - } -} -var new_deps = null; -var skipped_deps = 0; -var untracked_writes = null; -function set_untracked_writes(value) { - untracked_writes = value; -} -var write_version = 1; -var read_version = 0; -var skip_reaction = false; -var captured_signals = null; -function increment_write_version() { - return ++write_version; -} -function check_dirtiness(reaction) { - var _a3, _b3; - var flags = reaction.f; - if ((flags & DIRTY) !== 0) { - return true; - } - if ((flags & MAYBE_DIRTY) !== 0) { - var dependencies = reaction.deps; - var is_unowned = (flags & UNOWNED) !== 0; - if (dependencies !== null) { - var i; - var dependency; - var is_disconnected = (flags & DISCONNECTED) !== 0; - var is_unowned_connected = is_unowned && active_effect !== null && !skip_reaction; - var length = dependencies.length; - if (is_disconnected || is_unowned_connected) { - var derived2 = ( - /** @type {Derived} */ - reaction - ); - var parent = derived2.parent; - for (i = 0; i < length; i++) { - dependency = dependencies[i]; - if (is_disconnected || !((_a3 = dependency == null ? void 0 : dependency.reactions) == null ? void 0 : _a3.includes(derived2))) { - ((_b3 = dependency.reactions) != null ? _b3 : dependency.reactions = []).push(derived2); - } - } - if (is_disconnected) { - derived2.f ^= DISCONNECTED; - } - if (is_unowned_connected && parent !== null && (parent.f & UNOWNED) === 0) { - derived2.f ^= UNOWNED; - } - } - for (i = 0; i < length; i++) { - dependency = dependencies[i]; - if (check_dirtiness( - /** @type {Derived} */ - dependency - )) { - update_derived( - /** @type {Derived} */ - dependency - ); - } - if (dependency.wv > reaction.wv) { - return true; - } - } - } - if (!is_unowned || active_effect !== null && !skip_reaction) { - set_signal_status(reaction, CLEAN); - } - } - return false; -} -function propagate_error(error2, effect2) { - var current = effect2; - while (current !== null) { - if ((current.f & BOUNDARY_EFFECT) !== 0) { - try { - current.fn(error2); - return; - } catch (e) { - current.f ^= BOUNDARY_EFFECT; - } - } - current = current.parent; - } - is_throwing_error = false; - throw error2; -} -function should_rethrow_error(effect2) { - return (effect2.f & DESTROYED) === 0 && (effect2.parent === null || (effect2.parent.f & BOUNDARY_EFFECT) === 0); -} -function handle_error(error2, effect2, previous_effect, component_context2) { - var _a3, _b3; - if (is_throwing_error) { - if (previous_effect === null) { - is_throwing_error = false; - } - if (should_rethrow_error(effect2)) { - throw error2; - } - return; - } - if (previous_effect !== null) { - is_throwing_error = true; - } - if (!dev_fallback_default || component_context2 === null || !(error2 instanceof Error) || handled_errors.has(error2)) { - propagate_error(error2, effect2); - return; - } - handled_errors.add(error2); - const component_stack = []; - const effect_name = (_a3 = effect2.fn) == null ? void 0 : _a3.name; - if (effect_name) { - component_stack.push(effect_name); - } - let current_context = component_context2; - while (current_context !== null) { - if (dev_fallback_default) { - var filename = (_b3 = current_context.function) == null ? void 0 : _b3[FILENAME]; - if (filename) { - const file = filename.split("/").pop(); - component_stack.push(file); - } - } - current_context = current_context.p; - } - const indent = is_firefox ? " " : " "; - define_property(error2, "message", { - value: error2.message + ` -${component_stack.map((name) => ` -${indent}in ${name}`).join("")} -` - }); - define_property(error2, "component_stack", { - value: component_stack - }); - const stack2 = error2.stack; - if (stack2) { - const lines = stack2.split("\n"); - const new_lines = []; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (line.includes("svelte/src/internal")) { - continue; - } - new_lines.push(line); - } - define_property(error2, "stack", { - value: new_lines.join("\n") - }); - } - propagate_error(error2, effect2); - if (should_rethrow_error(effect2)) { - throw error2; - } -} -function schedule_possible_effect_self_invalidation(signal, effect2, root3 = true) { - var reactions = signal.reactions; - if (reactions === null) return; - for (var i = 0; i < reactions.length; i++) { - var reaction = reactions[i]; - if (reaction_sources == null ? void 0 : reaction_sources.includes(signal)) continue; - if ((reaction.f & DERIVED) !== 0) { - schedule_possible_effect_self_invalidation( - /** @type {Derived} */ - reaction, - effect2, - false - ); - } else if (effect2 === reaction) { - if (root3) { - set_signal_status(reaction, DIRTY); - } else if ((reaction.f & CLEAN) !== 0) { - set_signal_status(reaction, MAYBE_DIRTY); - } - schedule_effect( - /** @type {Effect} */ - reaction - ); - } - } -} -function update_reaction(reaction) { - var _a3, _b3; - var previous_deps = new_deps; - var previous_skipped_deps = skipped_deps; - var previous_untracked_writes = untracked_writes; - var previous_reaction = active_reaction; - var previous_skip_reaction = skip_reaction; - var previous_reaction_sources = reaction_sources; - var previous_component_context = component_context; - var previous_untracking = untracking; - var flags = reaction.f; - new_deps = /** @type {null | Value[]} */ - null; - skipped_deps = 0; - untracked_writes = null; - skip_reaction = (flags & UNOWNED) !== 0 && (untracking || !is_updating_effect || active_reaction === null); - active_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null; - reaction_sources = null; - set_component_context(reaction.ctx); - untracking = false; - read_version++; - reaction.f |= EFFECT_IS_UPDATING; - try { - var result = ( - /** @type {Function} */ - (0, reaction.fn)() - ); - var deps = reaction.deps; - if (new_deps !== null) { - var i; - remove_reactions(reaction, skipped_deps); - if (deps !== null && skipped_deps > 0) { - deps.length = skipped_deps + new_deps.length; - for (i = 0; i < new_deps.length; i++) { - deps[skipped_deps + i] = new_deps[i]; - } - } else { - reaction.deps = deps = new_deps; - } - if (!skip_reaction) { - for (i = skipped_deps; i < deps.length; i++) { - ((_b3 = (_a3 = deps[i]).reactions) != null ? _b3 : _a3.reactions = []).push(reaction); - } - } - } else if (deps !== null && skipped_deps < deps.length) { - remove_reactions(reaction, skipped_deps); - deps.length = skipped_deps; - } - if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0) { - for (i = 0; i < /** @type {Source[]} */ - untracked_writes.length; i++) { - schedule_possible_effect_self_invalidation( - untracked_writes[i], - /** @type {Effect} */ - reaction - ); - } - } - if (previous_reaction !== reaction) { - read_version++; - if (untracked_writes !== null) { - if (previous_untracked_writes === null) { - previous_untracked_writes = untracked_writes; - } else { - previous_untracked_writes.push(.../** @type {Source[]} */ - untracked_writes); - } - } - } - return result; - } finally { - new_deps = previous_deps; - skipped_deps = previous_skipped_deps; - untracked_writes = previous_untracked_writes; - active_reaction = previous_reaction; - skip_reaction = previous_skip_reaction; - reaction_sources = previous_reaction_sources; - set_component_context(previous_component_context); - untracking = previous_untracking; - reaction.f ^= EFFECT_IS_UPDATING; - } -} -function remove_reaction(signal, dependency) { - let reactions = dependency.reactions; - if (reactions !== null) { - var index2 = index_of.call(reactions, signal); - if (index2 !== -1) { - var new_length = reactions.length - 1; - if (new_length === 0) { - reactions = dependency.reactions = null; - } else { - reactions[index2] = reactions[new_length]; - reactions.pop(); - } - } - } - if (reactions === null && (dependency.f & DERIVED) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear - // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps` - // allows us to skip the expensive work of disconnecting and immediately reconnecting it - (new_deps === null || !new_deps.includes(dependency))) { - set_signal_status(dependency, MAYBE_DIRTY); - if ((dependency.f & (UNOWNED | DISCONNECTED)) === 0) { - dependency.f ^= DISCONNECTED; - } - destroy_derived_effects( - /** @type {Derived} **/ - dependency - ); - remove_reactions( - /** @type {Derived} **/ - dependency, - 0 - ); - } -} -function remove_reactions(signal, start_index) { - var dependencies = signal.deps; - if (dependencies === null) return; - for (var i = start_index; i < dependencies.length; i++) { - remove_reaction(signal, dependencies[i]); - } -} -function update_effect(effect2) { - var flags = effect2.f; - if ((flags & DESTROYED) !== 0) { - return; - } - set_signal_status(effect2, CLEAN); - var previous_effect = active_effect; - var previous_component_context = component_context; - var was_updating_effect = is_updating_effect; - active_effect = effect2; - is_updating_effect = true; - if (dev_fallback_default) { - var previous_component_fn = dev_current_component_function; - set_dev_current_component_function(effect2.component_function); - } - try { - if ((flags & BLOCK_EFFECT) !== 0) { - destroy_block_effect_children(effect2); - } else { - destroy_effect_children(effect2); - } - execute_effect_teardown(effect2); - var teardown2 = update_reaction(effect2); - effect2.teardown = typeof teardown2 === "function" ? teardown2 : null; - effect2.wv = write_version; - var deps = effect2.deps; - if (dev_fallback_default && tracing_mode_flag && (effect2.f & DIRTY) !== 0 && deps !== null) { - for (let i = 0; i < deps.length; i++) { - var dep = deps[i]; - if (dep.trace_need_increase) { - dep.wv = increment_write_version(); - dep.trace_need_increase = void 0; - dep.trace_v = void 0; - } - } - } - if (dev_fallback_default) { - dev_effect_stack.push(effect2); - } - } catch (error2) { - handle_error(error2, effect2, previous_effect, previous_component_context || effect2.ctx); - } finally { - is_updating_effect = was_updating_effect; - active_effect = previous_effect; - if (dev_fallback_default) { - set_dev_current_component_function(previous_component_fn); - } - } -} -function log_effect_stack() { - console.error( - "Last ten effects were: ", - dev_effect_stack.slice(-10).map((d) => d.fn) - ); - dev_effect_stack = []; -} -function infinite_loop_guard() { - try { - effect_update_depth_exceeded(); - } catch (error2) { - if (dev_fallback_default) { - define_property(error2, "stack", { - value: "" - }); - } - if (last_scheduled_effect !== null) { - if (dev_fallback_default) { - try { - handle_error(error2, last_scheduled_effect, null, null); - } catch (e) { - log_effect_stack(); - throw e; - } - } else { - handle_error(error2, last_scheduled_effect, null, null); - } - } else { - if (dev_fallback_default) { - log_effect_stack(); - } - throw error2; - } - } -} -function flush_queued_root_effects() { - var was_updating_effect = is_updating_effect; - try { - var flush_count = 0; - is_updating_effect = true; - while (queued_root_effects.length > 0) { - if (flush_count++ > 1e3) { - infinite_loop_guard(); - } - var root_effects = queued_root_effects; - var length = root_effects.length; - queued_root_effects = []; - for (var i = 0; i < length; i++) { - var collected_effects = process_effects(root_effects[i]); - flush_queued_effects(collected_effects); - } - old_values.clear(); - } - } finally { - is_flushing = false; - is_updating_effect = was_updating_effect; - last_scheduled_effect = null; - if (dev_fallback_default) { - dev_effect_stack = []; - } - } -} -function flush_queued_effects(effects) { - var length = effects.length; - if (length === 0) return; - for (var i = 0; i < length; i++) { - var effect2 = effects[i]; - if ((effect2.f & (DESTROYED | INERT)) === 0) { - try { - if (check_dirtiness(effect2)) { - update_effect(effect2); - if (effect2.deps === null && effect2.first === null && effect2.nodes_start === null) { - if (effect2.teardown === null) { - unlink_effect(effect2); - } else { - effect2.fn = null; - } - } - } - } catch (error2) { - handle_error(error2, effect2, null, effect2.ctx); - } - } - } -} -function schedule_effect(signal) { - if (!is_flushing) { - is_flushing = true; - queueMicrotask(flush_queued_root_effects); - } - var effect2 = last_scheduled_effect = signal; - while (effect2.parent !== null) { - effect2 = effect2.parent; - var flags = effect2.f; - if ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) { - if ((flags & CLEAN) === 0) return; - effect2.f ^= CLEAN; - } - } - queued_root_effects.push(effect2); -} -function process_effects(root3) { - var effects = []; - var effect2 = root3; - while (effect2 !== null) { - var flags = effect2.f; - var is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0; - var is_skippable_branch = is_branch && (flags & CLEAN) !== 0; - if (!is_skippable_branch && (flags & INERT) === 0) { - if ((flags & EFFECT) !== 0) { - effects.push(effect2); - } else if (is_branch) { - effect2.f ^= CLEAN; - } else { - var previous_active_reaction = active_reaction; - try { - active_reaction = effect2; - if (check_dirtiness(effect2)) { - update_effect(effect2); - } - } catch (error2) { - handle_error(error2, effect2, null, effect2.ctx); - } finally { - active_reaction = previous_active_reaction; - } - } - var child2 = effect2.first; - if (child2 !== null) { - effect2 = child2; - continue; - } - } - var parent = effect2.parent; - effect2 = effect2.next; - while (effect2 === null && parent !== null) { - effect2 = parent.next; - parent = parent.parent; - } - } - return effects; -} -function flushSync(fn) { - var result; - if (fn) { - is_flushing = true; - flush_queued_root_effects(); - result = fn(); - } - flush_tasks(); - while (queued_root_effects.length > 0) { - is_flushing = true; - flush_queued_root_effects(); - flush_tasks(); - } - return ( - /** @type {T} */ - result - ); -} -function get(signal) { - var flags = signal.f; - var is_derived = (flags & DERIVED) !== 0; - if (captured_signals !== null) { - captured_signals.add(signal); - } - if (active_reaction !== null && !untracking) { - if (!(reaction_sources == null ? void 0 : reaction_sources.includes(signal))) { - var deps = active_reaction.deps; - if (signal.rv < read_version) { - signal.rv = read_version; - if (new_deps === null && deps !== null && deps[skipped_deps] === signal) { - skipped_deps++; - } else if (new_deps === null) { - new_deps = [signal]; - } else if (!skip_reaction || !new_deps.includes(signal)) { - new_deps.push(signal); - } - } - } - } else if (is_derived && /** @type {Derived} */ - signal.deps === null && /** @type {Derived} */ - signal.effects === null) { - var derived2 = ( - /** @type {Derived} */ - signal - ); - var parent = derived2.parent; - if (parent !== null && (parent.f & UNOWNED) === 0) { - derived2.f ^= UNOWNED; - } - } - if (is_derived) { - derived2 = /** @type {Derived} */ - signal; - if (check_dirtiness(derived2)) { - update_derived(derived2); - } - } - if (dev_fallback_default && tracing_mode_flag && tracing_expressions !== null && active_reaction !== null && tracing_expressions.reaction === active_reaction) { - if (signal.debug) { - signal.debug(); - } else if (signal.created) { - var entry = tracing_expressions.entries.get(signal); - if (entry === void 0) { - entry = { read: [] }; - tracing_expressions.entries.set(signal, entry); - } - entry.read.push(get_stack("TracedAt")); - } - } - if (is_destroying_effect && old_values.has(signal)) { - return old_values.get(signal); - } - return signal.v; -} -function untrack(fn) { - var previous_untracking = untracking; - try { - untracking = true; - return fn(); - } finally { - untracking = previous_untracking; - } -} -var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN); -function set_signal_status(signal, status) { - signal.f = signal.f & STATUS_MASK | status; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/reactivity/sources.js -var inspect_effects = /* @__PURE__ */ new Set(); -var old_values = /* @__PURE__ */ new Map(); -function set_inspect_effects(v) { - inspect_effects = v; -} -function source(v, stack2) { - var signal = { - f: 0, - // TODO ideally we could skip this altogether, but it causes type errors - v, - reactions: null, - equals, - rv: 0, - wv: 0 - }; - if (dev_fallback_default && tracing_mode_flag) { - signal.created = stack2 != null ? stack2 : get_stack("CreatedAt"); - signal.debug = null; - } - return signal; -} -// @__NO_SIDE_EFFECTS__ -function state(v, stack2) { - const s = source(v, stack2); - push_reaction_value(s); - return s; -} -// @__NO_SIDE_EFFECTS__ -function mutable_source(initial_value, immutable = false) { - var _a3, _b3; - const s = source(initial_value); - if (!immutable) { - s.equals = safe_equals; - } - if (legacy_mode_flag && component_context !== null && component_context.l !== null) { - ((_b3 = (_a3 = component_context.l).s) != null ? _b3 : _a3.s = []).push(s); - } - return s; -} -function set(source2, value, should_proxy = false) { - var _a3; - if (active_reaction !== null && !untracking && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 && !((_a3 = reaction_sources) == null ? void 0 : _a3.includes(source2))) { - state_unsafe_mutation(); - } - let new_value = should_proxy ? proxy(value) : value; - return internal_set(source2, new_value); -} -function internal_set(source2, value) { - var _a3; - if (!source2.equals(value)) { - var old_value = source2.v; - if (is_destroying_effect) { - old_values.set(source2, value); - } else { - old_values.set(source2, old_value); - } - source2.v = value; - if (dev_fallback_default && tracing_mode_flag) { - source2.updated = get_stack("UpdatedAt"); - if (active_effect != null) { - source2.trace_need_increase = true; - (_a3 = source2.trace_v) != null ? _a3 : source2.trace_v = old_value; - } - } - if ((source2.f & DERIVED) !== 0) { - if ((source2.f & DIRTY) !== 0) { - execute_derived( - /** @type {Derived} */ - source2 - ); - } - set_signal_status(source2, (source2.f & UNOWNED) === 0 ? CLEAN : MAYBE_DIRTY); - } - source2.wv = increment_write_version(); - mark_reactions(source2, DIRTY); - if (is_runes() && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) { - if (untracked_writes === null) { - set_untracked_writes([source2]); - } else { - untracked_writes.push(source2); - } - } - if (dev_fallback_default && inspect_effects.size > 0) { - const inspects = Array.from(inspect_effects); - for (const effect2 of inspects) { - if ((effect2.f & CLEAN) !== 0) { - set_signal_status(effect2, MAYBE_DIRTY); - } - if (check_dirtiness(effect2)) { - update_effect(effect2); - } - } - inspect_effects.clear(); - } - } - return value; -} -function mark_reactions(signal, status) { - var reactions = signal.reactions; - if (reactions === null) return; - var runes = is_runes(); - var length = reactions.length; - for (var i = 0; i < length; i++) { - var reaction = reactions[i]; - var flags = reaction.f; - if ((flags & DIRTY) !== 0) continue; - if (!runes && reaction === active_effect) continue; - if (dev_fallback_default && (flags & INSPECT_EFFECT) !== 0) { - inspect_effects.add(reaction); - continue; - } - set_signal_status(reaction, status); - if ((flags & (CLEAN | UNOWNED)) !== 0) { - if ((flags & DERIVED) !== 0) { - mark_reactions( - /** @type {Derived} */ - reaction, - MAYBE_DIRTY - ); - } else { - schedule_effect( - /** @type {Effect} */ - reaction - ); - } - } - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/context.js -var component_context = null; -function set_component_context(context) { - component_context = context; -} -var dev_current_component_function = null; -function set_dev_current_component_function(fn) { - dev_current_component_function = fn; -} -function push(props, runes = false, fn) { - var ctx = component_context = { - p: component_context, - c: null, - d: false, - e: null, - m: false, - s: props, - x: null, - l: null - }; - if (legacy_mode_flag && !runes) { - component_context.l = { - s: null, - u: null, - r1: [], - r2: source(false) - }; - } - teardown(() => { - ctx.d = true; - }); - if (dev_fallback_default) { - component_context.function = fn; - dev_current_component_function = fn; - } -} -function pop(component2) { - var _a3, _b3; - const context_stack_item = component_context; - if (context_stack_item !== null) { - if (component2 !== void 0) { - context_stack_item.x = component2; - } - const component_effects = context_stack_item.e; - if (component_effects !== null) { - var previous_effect = active_effect; - var previous_reaction = active_reaction; - context_stack_item.e = null; - try { - for (var i = 0; i < component_effects.length; i++) { - var component_effect = component_effects[i]; - set_active_effect(component_effect.effect); - set_active_reaction(component_effect.reaction); - effect(component_effect.fn); - } - } finally { - set_active_effect(previous_effect); - set_active_reaction(previous_reaction); - } - } - component_context = context_stack_item.p; - if (dev_fallback_default) { - dev_current_component_function = (_b3 = (_a3 = context_stack_item.p) == null ? void 0 : _a3.function) != null ? _b3 : null; - } - context_stack_item.m = true; - } - return component2 || /** @type {T} */ - {}; -} -function is_runes() { - return !legacy_mode_flag || component_context !== null && component_context.l === null; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/utils.js -function is_capture_event(name) { - return name.endsWith("capture") && name !== "gotpointercapture" && name !== "lostpointercapture"; -} -var DELEGATED_EVENTS = [ - "beforeinput", - "click", - "change", - "dblclick", - "contextmenu", - "focusin", - "focusout", - "input", - "keydown", - "keyup", - "mousedown", - "mousemove", - "mouseout", - "mouseover", - "mouseup", - "pointerdown", - "pointermove", - "pointerout", - "pointerover", - "pointerup", - "touchend", - "touchmove", - "touchstart" -]; -function is_delegated(event_name) { - return DELEGATED_EVENTS.includes(event_name); -} -var DOM_BOOLEAN_ATTRIBUTES = [ - "allowfullscreen", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "disabled", - "formnovalidate", - "hidden", - "indeterminate", - "inert", - "ismap", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "seamless", - "selected", - "webkitdirectory", - "defer", - "disablepictureinpicture", - "disableremoteplayback" -]; -var ATTRIBUTE_ALIASES = { - // no `class: 'className'` because we handle that separately - formnovalidate: "formNoValidate", - ismap: "isMap", - nomodule: "noModule", - playsinline: "playsInline", - readonly: "readOnly", - defaultvalue: "defaultValue", - defaultchecked: "defaultChecked", - srcobject: "srcObject", - novalidate: "noValidate", - allowfullscreen: "allowFullscreen", - disablepictureinpicture: "disablePictureInPicture", - disableremoteplayback: "disableRemotePlayback" -}; -function normalize_attribute(name) { - var _a3; - name = name.toLowerCase(); - return (_a3 = ATTRIBUTE_ALIASES[name]) != null ? _a3 : name; -} -var DOM_PROPERTIES = [ - ...DOM_BOOLEAN_ATTRIBUTES, - "formNoValidate", - "isMap", - "noModule", - "playsInline", - "readOnly", - "value", - "volume", - "defaultValue", - "defaultChecked", - "srcObject", - "noValidate", - "allowFullscreen", - "disablePictureInPicture", - "disableRemotePlayback" -]; -var PASSIVE_EVENTS = ["touchstart", "touchmove"]; -function is_passive_event(name) { - return PASSIVE_EVENTS.includes(name); -} -var RAW_TEXT_ELEMENTS = ( - /** @type {const} */ - ["textarea", "script", "style", "title"] -); -function is_raw_text_element(name) { - return RAW_TEXT_ELEMENTS.includes( - /** @type {RAW_TEXT_ELEMENTS[number]} */ - name - ); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dev/css.js -var all_styles = /* @__PURE__ */ new Map(); -function register_style(hash2, style) { - var styles = all_styles.get(hash2); - if (!styles) { - styles = /* @__PURE__ */ new Set(); - all_styles.set(hash2, styles); - } - styles.add(style); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/misc.js -function autofocus(dom, value) { - if (value) { - const body = document.body; - dom.autofocus = true; - queue_micro_task(() => { - if (document.activeElement === body) { - dom.focus(); - } - }); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js -function without_reactive_context(fn) { - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - return fn(); - } finally { - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/events.js -var all_registered_events = /* @__PURE__ */ new Set(); -var root_event_handles = /* @__PURE__ */ new Set(); -function create_event(event_name, dom, handler, options = {}) { - function target_handler(event2) { - if (!options.capture) { - handle_event_propagation.call(dom, event2); - } - if (!event2.cancelBubble) { - return without_reactive_context(() => { - return handler == null ? void 0 : handler.call(this, event2); - }); - } - } - if (event_name.startsWith("pointer") || event_name.startsWith("touch") || event_name === "wheel") { - queue_micro_task(() => { - dom.addEventListener(event_name, target_handler, options); - }); - } else { - dom.addEventListener(event_name, target_handler, options); - } - return target_handler; -} -function delegate(events) { - for (var i = 0; i < events.length; i++) { - all_registered_events.add(events[i]); - } - for (var fn of root_event_handles) { - fn(events); - } -} -function handle_event_propagation(event2) { - var _a3; - var handler_element = this; - var owner_document = ( - /** @type {Node} */ - handler_element.ownerDocument - ); - var event_name = event2.type; - var path3 = ((_a3 = event2.composedPath) == null ? void 0 : _a3.call(event2)) || []; - var current_target = ( - /** @type {null | Element} */ - path3[0] || event2.target - ); - var path_idx = 0; - var handled_at = event2.__root; - if (handled_at) { - var at_idx = path3.indexOf(handled_at); - if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */ - window)) { - event2.__root = handler_element; - return; - } - var handler_idx = path3.indexOf(handler_element); - if (handler_idx === -1) { - return; - } - if (at_idx <= handler_idx) { - path_idx = at_idx; - } - } - current_target = /** @type {Element} */ - path3[path_idx] || event2.target; - if (current_target === handler_element) return; - define_property(event2, "currentTarget", { - configurable: true, - get() { - return current_target || owner_document; - } - }); - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - var throw_error; - var other_errors = []; - while (current_target !== null) { - var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */ - current_target.host || null; - try { - var delegated = current_target["__" + event_name]; - if (delegated != null && (!/** @type {any} */ - current_target.disabled || // DOM could've been updated already by the time this is reached, so we check this as well - // -> the target could not have been disabled because it emits the event in the first place - event2.target === current_target)) { - if (is_array(delegated)) { - var [fn, ...data] = delegated; - fn.apply(current_target, [event2, ...data]); - } else { - delegated.call(current_target, event2); - } - } - } catch (error2) { - if (throw_error) { - other_errors.push(error2); - } else { - throw_error = error2; - } - } - if (event2.cancelBubble || parent_element === handler_element || parent_element === null) { - break; - } - current_target = parent_element; - } - if (throw_error) { - for (let error2 of other_errors) { - queueMicrotask(() => { - throw error2; - }); - } - throw throw_error; - } - } finally { - event2.__root = handler_element; - delete event2.currentTarget; - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js -var head_anchor; -function reset_head_anchor() { - head_anchor = void 0; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/reconciler.js -function create_fragment_from_html(html2) { - var elem = document.createElement("template"); - elem.innerHTML = html2; - return elem.content; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/template.js -function assign_nodes(start, end) { - var effect2 = ( - /** @type {Effect} */ - active_effect - ); - if (effect2.nodes_start === null) { - effect2.nodes_start = start; - effect2.nodes_end = end; - } -} -// @__NO_SIDE_EFFECTS__ -function template(content, flags) { - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; - var node; - var has_start = !content.startsWith(""); - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (node === void 0) { - node = create_fragment_from_html(has_start ? content : "" + content); - if (!is_fragment) node = /** @type {Node} */ - get_first_child(node); - } - var clone = ( - /** @type {TemplateNode} */ - use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone) - ); - var end = ( - /** @type {TemplateNode} */ - clone.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone, clone); - } - return clone; - }; -} -// @__NO_SIDE_EFFECTS__ -function ns_template(content, flags, ns = "svg") { - var has_start = !content.startsWith(""); - var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; - var wrapped = `<${ns}>${has_start ? content : "" + content}`; - var node; - return () => { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - if (!node) { - var fragment = ( - /** @type {DocumentFragment} */ - create_fragment_from_html(wrapped) - ); - var root3 = ( - /** @type {Element} */ - get_first_child(fragment) - ); - if (is_fragment) { - node = document.createDocumentFragment(); - while (get_first_child(root3)) { - node.appendChild( - /** @type {Node} */ - get_first_child(root3) - ); - } - } else { - node = /** @type {Element} */ - get_first_child(root3); - } - } - var clone = ( - /** @type {TemplateNode} */ - node.cloneNode(true) - ); - if (is_fragment) { - var start = ( - /** @type {TemplateNode} */ - get_first_child(clone) - ); - var end = ( - /** @type {TemplateNode} */ - clone.lastChild - ); - assign_nodes(start, end); - } else { - assign_nodes(clone, clone); - } - return clone; - }; -} -function comment() { - if (hydrating) { - assign_nodes(hydrate_node, null); - return hydrate_node; - } - var frag = document.createDocumentFragment(); - var start = document.createComment(""); - var anchor = create_text(); - frag.append(start, anchor); - assign_nodes(start, anchor); - return frag; -} -function append(anchor, dom) { - if (hydrating) { - active_effect.nodes_end = hydrate_node; - hydrate_next(); - return; - } - if (anchor === null) { - return; - } - anchor.before( - /** @type {Node} */ - dom - ); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/render.js -var should_intro = true; -function set_should_intro(value) { - should_intro = value; -} -function set_text(text2, value) { - var _a3; - var str = value == null ? "" : typeof value === "object" ? value + "" : value; - if (str !== ((_a3 = text2.__t) != null ? _a3 : text2.__t = text2.nodeValue)) { - text2.__t = str; - text2.nodeValue = str + ""; - } -} -function mount(component2, options) { - return _mount(component2, options); -} -function hydrate(component2, options) { - var _a3; - init_operations(); - options.intro = (_a3 = options.intro) != null ? _a3 : false; - const target = options.target; - const was_hydrating = hydrating; - const previous_hydrate_node = hydrate_node; - try { - var anchor = ( - /** @type {TemplateNode} */ - get_first_child(target) - ); - while (anchor && (anchor.nodeType !== 8 || /** @type {Comment} */ - anchor.data !== HYDRATION_START)) { - anchor = /** @type {TemplateNode} */ - get_next_sibling(anchor); - } - if (!anchor) { - throw HYDRATION_ERROR; - } - set_hydrating(true); - set_hydrate_node( - /** @type {Comment} */ - anchor - ); - hydrate_next(); - const instance = _mount(component2, { ...options, anchor }); - if (hydrate_node === null || hydrate_node.nodeType !== 8 || /** @type {Comment} */ - hydrate_node.data !== HYDRATION_END) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - set_hydrating(false); - return ( - /** @type {Exports} */ - instance - ); - } catch (error2) { - if (error2 === HYDRATION_ERROR) { - if (options.recover === false) { - hydration_failed(); - } - init_operations(); - clear_text_content(target); - set_hydrating(false); - return mount(component2, options); - } - throw error2; - } finally { - set_hydrating(was_hydrating); - set_hydrate_node(previous_hydrate_node); - reset_head_anchor(); - } -} -var document_listeners = /* @__PURE__ */ new Map(); -function _mount(Component2, { target, anchor, props = {}, events, context, intro = true }) { - init_operations(); - var registered_events = /* @__PURE__ */ new Set(); - var event_handle = (events2) => { - for (var i = 0; i < events2.length; i++) { - var event_name = events2[i]; - if (registered_events.has(event_name)) continue; - registered_events.add(event_name); - var passive2 = is_passive_event(event_name); - target.addEventListener(event_name, handle_event_propagation, { passive: passive2 }); - var n = document_listeners.get(event_name); - if (n === void 0) { - document.addEventListener(event_name, handle_event_propagation, { passive: passive2 }); - document_listeners.set(event_name, 1); - } else { - document_listeners.set(event_name, n + 1); - } - } - }; - event_handle(array_from(all_registered_events)); - root_event_handles.add(event_handle); - var component2 = void 0; - var unmount2 = component_root(() => { - var anchor_node = anchor != null ? anchor : target.appendChild(create_text()); - branch(() => { - if (context) { - push({}); - var ctx = ( - /** @type {ComponentContext} */ - component_context - ); - ctx.c = context; - } - if (events) { - props.$$events = events; - } - if (hydrating) { - assign_nodes( - /** @type {TemplateNode} */ - anchor_node, - null - ); - } - should_intro = intro; - component2 = Component2(anchor_node, props) || {}; - should_intro = true; - if (hydrating) { - active_effect.nodes_end = hydrate_node; - } - if (context) { - pop(); - } - }); - return () => { - var _a3; - for (var event_name of registered_events) { - target.removeEventListener(event_name, handle_event_propagation); - var n = ( - /** @type {number} */ - document_listeners.get(event_name) - ); - if (--n === 0) { - document.removeEventListener(event_name, handle_event_propagation); - document_listeners.delete(event_name); - } else { - document_listeners.set(event_name, n); - } - } - root_event_handles.delete(event_handle); - if (anchor_node !== anchor) { - (_a3 = anchor_node.parentNode) == null ? void 0 : _a3.removeChild(anchor_node); - } - }; - }); - mounted_components.set(component2, unmount2); - return component2; -} -var mounted_components = /* @__PURE__ */ new WeakMap(); -function unmount(component2, options) { - const fn = mounted_components.get(component2); - if (fn) { - mounted_components.delete(component2); - return fn(options); - } - if (dev_fallback_default) { - lifecycle_double_unmount(); - } - return Promise.resolve(); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/blocks/if.js -function if_block(node, fn, [root_index, hydrate_index] = [0, 0]) { - if (hydrating && root_index === 0) { - hydrate_next(); - } - var anchor = node; - var consequent_effect = null; - var alternate_effect = null; - var condition = UNINITIALIZED; - var flags = root_index > 0 ? EFFECT_TRANSPARENT : 0; - var has_branch = false; - const set_branch = (fn2, flag3 = true) => { - has_branch = true; - update_branch(flag3, fn2); - }; - const update_branch = (new_condition, fn2) => { - if (condition === (condition = new_condition)) return; - let mismatch = false; - if (hydrating && hydrate_index !== -1) { - if (root_index === 0) { - const data = ( - /** @type {Comment} */ - anchor.data - ); - if (data === HYDRATION_START) { - hydrate_index = 0; - } else if (data === HYDRATION_START_ELSE) { - hydrate_index = Infinity; - } else { - hydrate_index = parseInt(data.substring(1)); - if (hydrate_index !== hydrate_index) { - hydrate_index = condition ? Infinity : -1; - } - } - } - const is_else = hydrate_index > root_index; - if (!!condition === is_else) { - anchor = remove_nodes(); - set_hydrate_node(anchor); - set_hydrating(false); - mismatch = true; - hydrate_index = -1; - } - } - if (condition) { - if (consequent_effect) { - resume_effect(consequent_effect); - } else if (fn2) { - consequent_effect = branch(() => fn2(anchor)); - } - if (alternate_effect) { - pause_effect(alternate_effect, () => { - alternate_effect = null; - }); - } - } else { - if (alternate_effect) { - resume_effect(alternate_effect); - } else if (fn2) { - alternate_effect = branch(() => fn2(anchor, [root_index + 1, hydrate_index])); - } - if (consequent_effect) { - pause_effect(consequent_effect, () => { - consequent_effect = null; - }); - } - } - if (mismatch) { - set_hydrating(true); - } - }; - block(() => { - has_branch = false; - fn(set_branch); - if (!has_branch) { - update_branch(null, null); - } - }, flags); - if (hydrating) { - anchor = hydrate_node; - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/blocks/each.js -var current_each_item = null; -function set_current_each_item(item) { - current_each_item = item; -} -function index(_, i) { - return i; -} -function pause_effects(state2, items, controlled_anchor, items_map) { - var transitions = []; - var length = items.length; - for (var i = 0; i < length; i++) { - pause_children(items[i].e, transitions, true); - } - var is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null; - if (is_controlled) { - var parent_node = ( - /** @type {Element} */ - /** @type {Element} */ - controlled_anchor.parentNode - ); - clear_text_content(parent_node); - parent_node.append( - /** @type {Element} */ - controlled_anchor - ); - items_map.clear(); - link(state2, items[0].prev, items[length - 1].next); - } - run_out_transitions(transitions, () => { - for (var i2 = 0; i2 < length; i2++) { - var item = items[i2]; - if (!is_controlled) { - items_map.delete(item.k); - link(state2, item.prev, item.next); - } - destroy_effect(item.e, !is_controlled); - } - }); -} -function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) { - var anchor = node; - var state2 = { flags, items: /* @__PURE__ */ new Map(), first: null }; - var is_controlled = (flags & EACH_IS_CONTROLLED) !== 0; - if (is_controlled) { - var parent_node = ( - /** @type {Element} */ - node - ); - anchor = hydrating ? set_hydrate_node( - /** @type {Comment | Text} */ - get_first_child(parent_node) - ) : parent_node.appendChild(create_text()); - } - if (hydrating) { - hydrate_next(); - } - var fallback2 = null; - var was_empty = false; - var each_array = derived_safe_equal(() => { - var collection = get_collection(); - return is_array(collection) ? collection : collection == null ? [] : array_from(collection); - }); - block(() => { - var array = get(each_array); - var length = array.length; - if (was_empty && length === 0) { - return; - } - was_empty = length === 0; - let mismatch = false; - if (hydrating) { - var is_else = ( - /** @type {Comment} */ - anchor.data === HYDRATION_START_ELSE - ); - if (is_else !== (length === 0)) { - anchor = remove_nodes(); - set_hydrate_node(anchor); - set_hydrating(false); - mismatch = true; - } - } - if (hydrating) { - var prev = null; - var item; - for (var i = 0; i < length; i++) { - if (hydrate_node.nodeType === 8 && /** @type {Comment} */ - hydrate_node.data === HYDRATION_END) { - anchor = /** @type {Comment} */ - hydrate_node; - mismatch = true; - set_hydrating(false); - break; - } - var value = array[i]; - var key = get_key(value, i); - item = create_item( - hydrate_node, - state2, - prev, - null, - value, - key, - i, - render_fn, - flags, - get_collection - ); - state2.items.set(key, item); - prev = item; - } - if (length > 0) { - set_hydrate_node(remove_nodes()); - } - } - if (!hydrating) { - reconcile(array, state2, anchor, render_fn, flags, get_key, get_collection); - } - if (fallback_fn !== null) { - if (length === 0) { - if (fallback2) { - resume_effect(fallback2); - } else { - fallback2 = branch(() => fallback_fn(anchor)); - } - } else if (fallback2 !== null) { - pause_effect(fallback2, () => { - fallback2 = null; - }); - } - } - if (mismatch) { - set_hydrating(true); - } - get(each_array); - }); - if (hydrating) { - anchor = hydrate_node; - } -} -function reconcile(array, state2, anchor, render_fn, flags, get_key, get_collection) { - var _a3, _b3, _c2, _d; - var is_animated = (flags & EACH_IS_ANIMATED) !== 0; - var should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0; - var length = array.length; - var items = state2.items; - var first = state2.first; - var current = first; - var seen; - var prev = null; - var to_animate; - var matched = []; - var stashed = []; - var value; - var key; - var item; - var i; - if (is_animated) { - for (i = 0; i < length; i += 1) { - value = array[i]; - key = get_key(value, i); - item = items.get(key); - if (item !== void 0) { - (_a3 = item.a) == null ? void 0 : _a3.measure(); - (to_animate != null ? to_animate : to_animate = /* @__PURE__ */ new Set()).add(item); - } - } - } - for (i = 0; i < length; i += 1) { - value = array[i]; - key = get_key(value, i); - item = items.get(key); - if (item === void 0) { - var child_anchor = current ? ( - /** @type {TemplateNode} */ - current.e.nodes_start - ) : anchor; - prev = create_item( - child_anchor, - state2, - prev, - prev === null ? state2.first : prev.next, - value, - key, - i, - render_fn, - flags, - get_collection - ); - items.set(key, prev); - matched = []; - stashed = []; - current = prev.next; - continue; - } - if (should_update) { - update_item(item, value, i, flags); - } - if ((item.e.f & INERT) !== 0) { - resume_effect(item.e); - if (is_animated) { - (_b3 = item.a) == null ? void 0 : _b3.unfix(); - (to_animate != null ? to_animate : to_animate = /* @__PURE__ */ new Set()).delete(item); - } - } - if (item !== current) { - if (seen !== void 0 && seen.has(item)) { - if (matched.length < stashed.length) { - var start = stashed[0]; - var j; - prev = start.prev; - var a = matched[0]; - var b = matched[matched.length - 1]; - for (j = 0; j < matched.length; j += 1) { - move(matched[j], start, anchor); - } - for (j = 0; j < stashed.length; j += 1) { - seen.delete(stashed[j]); - } - link(state2, a.prev, b.next); - link(state2, prev, a); - link(state2, b, start); - current = start; - prev = b; - i -= 1; - matched = []; - stashed = []; - } else { - seen.delete(item); - move(item, current, anchor); - link(state2, item.prev, item.next); - link(state2, item, prev === null ? state2.first : prev.next); - link(state2, prev, item); - prev = item; - } - continue; - } - matched = []; - stashed = []; - while (current !== null && current.k !== key) { - if ((current.e.f & INERT) === 0) { - (seen != null ? seen : seen = /* @__PURE__ */ new Set()).add(current); - } - stashed.push(current); - current = current.next; - } - if (current === null) { - continue; - } - item = current; - } - matched.push(item); - prev = item; - current = item.next; - } - if (current !== null || seen !== void 0) { - var to_destroy = seen === void 0 ? [] : array_from(seen); - while (current !== null) { - if ((current.e.f & INERT) === 0) { - to_destroy.push(current); - } - current = current.next; - } - var destroy_length = to_destroy.length; - if (destroy_length > 0) { - var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null; - if (is_animated) { - for (i = 0; i < destroy_length; i += 1) { - (_c2 = to_destroy[i].a) == null ? void 0 : _c2.measure(); - } - for (i = 0; i < destroy_length; i += 1) { - (_d = to_destroy[i].a) == null ? void 0 : _d.fix(); - } - } - pause_effects(state2, to_destroy, controlled_anchor, items); - } - } - if (is_animated) { - queue_micro_task(() => { - var _a4; - if (to_animate === void 0) return; - for (item of to_animate) { - (_a4 = item.a) == null ? void 0 : _a4.apply(); - } - }); - } - active_effect.first = state2.first && state2.first.e; - active_effect.last = prev && prev.e; -} -function update_item(item, value, index2, type) { - if ((type & EACH_ITEM_REACTIVE) !== 0) { - internal_set(item.v, value); - } - if ((type & EACH_INDEX_REACTIVE) !== 0) { - internal_set( - /** @type {Value} */ - item.i, - index2 - ); - } else { - item.i = index2; - } -} -function create_item(anchor, state2, prev, next2, value, key, index2, render_fn, flags, get_collection) { - var previous_each_item = current_each_item; - var reactive = (flags & EACH_ITEM_REACTIVE) !== 0; - var mutable = (flags & EACH_ITEM_IMMUTABLE) === 0; - var v = reactive ? mutable ? mutable_source(value) : source(value) : value; - var i = (flags & EACH_INDEX_REACTIVE) === 0 ? index2 : source(index2); - if (dev_fallback_default && reactive) { - v.debug = () => { - var collection_index = typeof i === "number" ? index2 : i.v; - get_collection()[collection_index]; - }; - } - var item = { - i, - v, - k: key, - a: null, - // @ts-expect-error - e: null, - prev, - next: next2 - }; - current_each_item = item; - try { - item.e = branch(() => render_fn(anchor, v, i, get_collection), hydrating); - item.e.prev = prev && prev.e; - item.e.next = next2 && next2.e; - if (prev === null) { - state2.first = item; - } else { - prev.next = item; - prev.e.next = item.e; - } - if (next2 !== null) { - next2.prev = item; - next2.e.prev = item.e; - } - return item; - } finally { - current_each_item = previous_each_item; - } -} -function move(item, next2, anchor) { - var end = item.next ? ( - /** @type {TemplateNode} */ - item.next.e.nodes_start - ) : anchor; - var dest = next2 ? ( - /** @type {TemplateNode} */ - next2.e.nodes_start - ) : anchor; - var node = ( - /** @type {TemplateNode} */ - item.e.nodes_start - ); - while (node !== end) { - var next_node = ( - /** @type {TemplateNode} */ - get_next_sibling(node) - ); - dest.before(node); - node = next_node; - } -} -function link(state2, prev, next2) { - if (prev === null) { - state2.first = next2; - } else { - prev.next = next2; - prev.e.next = next2 && next2.e; - } - if (next2 !== null) { - next2.prev = prev; - next2.e.prev = prev && prev.e; - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/blocks/snippet.js -function snippet(node, get_snippet, ...args) { - var anchor = node; - var snippet2 = noop; - var snippet_effect; - block(() => { - if (snippet2 === (snippet2 = get_snippet())) return; - if (snippet_effect) { - destroy_effect(snippet_effect); - snippet_effect = null; - } - if (dev_fallback_default && snippet2 == null) { - invalid_snippet(); - } - snippet_effect = branch(() => ( - /** @type {SnippetFn} */ - snippet2(anchor, ...args) - )); - }, EFFECT_TRANSPARENT); - if (hydrating) { - anchor = hydrate_node; - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js -function element(node, get_tag, is_svg, render_fn, get_namespace, location) { - var _a3; - let was_hydrating = hydrating; - if (hydrating) { - hydrate_next(); - } - var filename = dev_fallback_default && location && ((_a3 = component_context) == null ? void 0 : _a3.function[FILENAME]); - var tag; - var current_tag; - var element2 = null; - if (hydrating && hydrate_node.nodeType === 1) { - element2 = /** @type {Element} */ - hydrate_node; - hydrate_next(); - } - var anchor = ( - /** @type {TemplateNode} */ - hydrating ? hydrate_node : node - ); - var effect2; - var each_item_block = current_each_item; - block(() => { - const next_tag = get_tag() || null; - var ns = get_namespace ? get_namespace() : is_svg || next_tag === "svg" ? NAMESPACE_SVG : null; - if (next_tag === tag) return; - var previous_each_item = current_each_item; - set_current_each_item(each_item_block); - if (effect2) { - if (next_tag === null) { - pause_effect(effect2, () => { - effect2 = null; - current_tag = null; - }); - } else if (next_tag === current_tag) { - resume_effect(effect2); - } else { - destroy_effect(effect2); - set_should_intro(false); - } - } - if (next_tag && next_tag !== current_tag) { - effect2 = branch(() => { - element2 = hydrating ? ( - /** @type {Element} */ - element2 - ) : ns ? document.createElementNS(ns, next_tag) : document.createElement(next_tag); - if (dev_fallback_default && location) { - element2.__svelte_meta = { - loc: { - file: filename, - line: location[0], - column: location[1] - } - }; - } - assign_nodes(element2, element2); - if (render_fn) { - if (hydrating && is_raw_text_element(next_tag)) { - element2.append(document.createComment("")); - } - var child_anchor = ( - /** @type {TemplateNode} */ - hydrating ? get_first_child(element2) : element2.appendChild(create_text()) - ); - if (hydrating) { - if (child_anchor === null) { - set_hydrating(false); - } else { - set_hydrate_node(child_anchor); - } - } - render_fn(element2, child_anchor); - } - active_effect.nodes_end = element2; - anchor.before(element2); - }); - } - tag = next_tag; - if (tag) current_tag = tag; - set_should_intro(true); - set_current_each_item(previous_each_item); - }, EFFECT_TRANSPARENT); - if (was_hydrating) { - set_hydrating(true); - set_hydrate_node(anchor); - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/css.js -function append_styles(anchor, css) { - queue_micro_task(() => { - var _a3; - var root3 = anchor.getRootNode(); - var target = ( - /** @type {ShadowRoot} */ - root3.host ? ( - /** @type {ShadowRoot} */ - root3 - ) : ( - /** @type {Document} */ - (_a3 = root3.head) != null ? _a3 : ( - /** @type {Document} */ - root3.ownerDocument.head - ) - ) - ); - if (!target.querySelector("#" + css.hash)) { - const style = document.createElement("style"); - style.id = css.hash; - style.textContent = css.code; - target.appendChild(style); - if (dev_fallback_default) { - register_style(css.hash, style); - } - } - }); -} - -// node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs -function r(e) { - var t, f, n = ""; - if ("string" == typeof e || "number" == typeof e) n += e; - else if ("object" == typeof e) if (Array.isArray(e)) { - var o = e.length; - for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); - } else for (f in e) e[f] && (n && (n += " "), n += f); - return n; -} -function clsx() { - for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); - return n; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/shared/attributes.js -function clsx2(value) { - if (typeof value === "object") { - return clsx(value); - } else { - return value != null ? value : ""; - } -} -var whitespace = [..." \n\r\f\xA0\v\uFEFF"]; -function to_class(value, hash2, directives) { - var classname = value == null ? "" : "" + value; - if (hash2) { - classname = classname ? classname + " " + hash2 : hash2; - } - if (directives) { - for (var key in directives) { - if (directives[key]) { - classname = classname ? classname + " " + key : key; - } else if (classname.length) { - var len = key.length; - var a = 0; - while ((a = classname.indexOf(key, a)) >= 0) { - var b = a + len; - if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) { - classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1); - } else { - a = b; - } - } - } - } - } - return classname === "" ? null : classname; -} -function append_styles2(styles, important = false) { - var separator = important ? " !important;" : ";"; - var css = ""; - for (var key in styles) { - var value = styles[key]; - if (value != null && value !== "") { - css += " " + key + ": " + value + separator; - } - } - return css; -} -function to_css_name(name) { - if (name[0] !== "-" || name[1] !== "-") { - return name.toLowerCase(); - } - return name; -} -function to_style(value, styles) { - if (styles) { - var new_style = ""; - var normal_styles; - var important_styles; - if (Array.isArray(styles)) { - normal_styles = styles[0]; - important_styles = styles[1]; - } else { - normal_styles = styles; - } - if (value) { - value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim(); - var in_str = false; - var in_apo = 0; - var in_comment = false; - var reserved_names = []; - if (normal_styles) { - reserved_names.push(...Object.keys(normal_styles).map(to_css_name)); - } - if (important_styles) { - reserved_names.push(...Object.keys(important_styles).map(to_css_name)); - } - var start_index = 0; - var name_index = -1; - const len = value.length; - for (var i = 0; i < len; i++) { - var c = value[i]; - if (in_comment) { - if (c === "/" && value[i - 1] === "*") { - in_comment = false; - } - } else if (in_str) { - if (in_str === c) { - in_str = false; - } - } else if (c === "/" && value[i + 1] === "*") { - in_comment = true; - } else if (c === '"' || c === "'") { - in_str = c; - } else if (c === "(") { - in_apo++; - } else if (c === ")") { - in_apo--; - } - if (!in_comment && in_str === false && in_apo === 0) { - if (c === ":" && name_index === -1) { - name_index = i; - } else if (c === ";" || i === len - 1) { - if (name_index !== -1) { - var name = to_css_name(value.substring(start_index, name_index).trim()); - if (!reserved_names.includes(name)) { - if (c !== ";") { - i++; - } - var property = value.substring(start_index, i).trim(); - new_style += " " + property + ";"; - } - } - start_index = i + 1; - name_index = -1; - } - } - } - } - if (normal_styles) { - new_style += append_styles2(normal_styles); - } - if (important_styles) { - new_style += append_styles2(important_styles, true); - } - new_style = new_style.trim(); - return new_style === "" ? null : new_style; - } - return value == null ? null : String(value); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/class.js -function set_class(dom, is_html, value, hash2, prev_classes, next_classes) { - var prev = dom.__className; - if (hydrating || prev !== value || prev === void 0) { - var next_class_name = to_class(value, hash2, next_classes); - if (!hydrating || next_class_name !== dom.getAttribute("class")) { - if (next_class_name == null) { - dom.removeAttribute("class"); - } else if (is_html) { - dom.className = next_class_name; - } else { - dom.setAttribute("class", next_class_name); - } - } - dom.__className = value; - } else if (next_classes && prev_classes !== next_classes) { - for (var key in next_classes) { - var is_present = !!next_classes[key]; - if (prev_classes == null || is_present !== !!prev_classes[key]) { - dom.classList.toggle(key, is_present); - } - } - } - return next_classes; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/style.js -function update_styles(dom, prev = {}, next2, priority) { - for (var key in next2) { - var value = next2[key]; - if (prev[key] !== value) { - if (next2[key] == null) { - dom.style.removeProperty(key); - } else { - dom.style.setProperty(key, value, priority); - } - } - } -} -function set_style(dom, value, prev_styles, next_styles) { - var prev = dom.__style; - if (hydrating || prev !== value) { - var next_style_attr = to_style(value, next_styles); - if (!hydrating || next_style_attr !== dom.getAttribute("style")) { - if (next_style_attr == null) { - dom.removeAttribute("style"); - } else { - dom.style.cssText = next_style_attr; - } - } - dom.__style = value; - } else if (next_styles) { - if (Array.isArray(next_styles)) { - update_styles(dom, prev_styles == null ? void 0 : prev_styles[0], next_styles[0]); - update_styles(dom, prev_styles == null ? void 0 : prev_styles[1], next_styles[1], "important"); - } else { - update_styles(dom, prev_styles, next_styles); - } - } - return next_styles; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/attributes.js -var CLASS = Symbol("class"); -var STYLE = Symbol("style"); -var IS_CUSTOM_ELEMENT = Symbol("is custom element"); -var IS_HTML = Symbol("is html"); -function set_selected(element2, selected) { - if (selected) { - if (!element2.hasAttribute("selected")) { - element2.setAttribute("selected", ""); - } - } else { - element2.removeAttribute("selected"); - } -} -function set_attribute(element2, attribute, value, skip_warning) { - var attributes = get_attributes(element2); - if (hydrating) { - attributes[attribute] = element2.getAttribute(attribute); - if (attribute === "src" || attribute === "srcset" || attribute === "href" && element2.nodeName === "LINK") { - if (!skip_warning) { - check_src_in_dev_hydration(element2, attribute, value != null ? value : ""); - } - return; - } - } - if (attributes[attribute] === (attributes[attribute] = value)) return; - if (attribute === "loading") { - element2[LOADING_ATTR_SYMBOL] = value; - } - if (value == null) { - element2.removeAttribute(attribute); - } else if (typeof value !== "string" && get_setters(element2).includes(attribute)) { - element2[attribute] = value; - } else { - element2.setAttribute(attribute, value); - } -} -function set_attributes(element2, prev, next2, css_hash, skip_warning = false) { - var _a3; - var attributes = get_attributes(element2); - var is_custom_element = attributes[IS_CUSTOM_ELEMENT]; - var preserve_attribute_case = !attributes[IS_HTML]; - let is_hydrating_custom_element = hydrating && is_custom_element; - if (is_hydrating_custom_element) { - set_hydrating(false); - } - var current = prev || {}; - var is_option_element = element2.tagName === "OPTION"; - for (var key in prev) { - if (!(key in next2)) { - next2[key] = null; - } - } - if (next2.class) { - next2.class = clsx2(next2.class); - } else if (css_hash || next2[CLASS]) { - next2.class = null; - } - if (next2[STYLE]) { - (_a3 = next2.style) != null ? _a3 : next2.style = null; - } - var setters = get_setters(element2); - for (const key2 in next2) { - let value = next2[key2]; - if (is_option_element && key2 === "value" && value == null) { - element2.value = element2.__value = ""; - current[key2] = value; - continue; - } - if (key2 === "class") { - var is_html = element2.namespaceURI === "http://www.w3.org/1999/xhtml"; - set_class(element2, is_html, value, css_hash, prev == null ? void 0 : prev[CLASS], next2[CLASS]); - current[key2] = value; - current[CLASS] = next2[CLASS]; - continue; - } - if (key2 === "style") { - set_style(element2, value, prev == null ? void 0 : prev[STYLE], next2[STYLE]); - current[key2] = value; - current[STYLE] = next2[STYLE]; - continue; - } - var prev_value = current[key2]; - if (value === prev_value) continue; - current[key2] = value; - var prefix = key2[0] + key2[1]; - if (prefix === "$$") continue; - if (prefix === "on") { - const opts = {}; - const event_handle_key = "$$" + key2; - let event_name = key2.slice(2); - var delegated = is_delegated(event_name); - if (is_capture_event(event_name)) { - event_name = event_name.slice(0, -7); - opts.capture = true; - } - if (!delegated && prev_value) { - if (value != null) continue; - element2.removeEventListener(event_name, current[event_handle_key], opts); - current[event_handle_key] = null; - } - if (value != null) { - if (!delegated) { - let handle = function(evt) { - current[key2].call(this, evt); - }; - current[event_handle_key] = create_event(event_name, element2, handle, opts); - } else { - element2[`__${event_name}`] = value; - delegate([event_name]); - } - } else if (delegated) { - element2[`__${event_name}`] = void 0; - } - } else if (key2 === "style") { - set_attribute(element2, key2, value); - } else if (key2 === "autofocus") { - autofocus( - /** @type {HTMLElement} */ - element2, - Boolean(value) - ); - } else if (!is_custom_element && (key2 === "__value" || key2 === "value" && value != null)) { - element2.value = element2.__value = value; - } else if (key2 === "selected" && is_option_element) { - set_selected( - /** @type {HTMLOptionElement} */ - element2, - value - ); - } else { - var name = key2; - if (!preserve_attribute_case) { - name = normalize_attribute(name); - } - var is_default = name === "defaultValue" || name === "defaultChecked"; - if (value == null && !is_custom_element && !is_default) { - attributes[key2] = null; - if (name === "value" || name === "checked") { - let input = ( - /** @type {HTMLInputElement} */ - element2 - ); - const use_default = prev === void 0; - if (name === "value") { - let previous = input.defaultValue; - input.removeAttribute(name); - input.defaultValue = previous; - input.value = input.__value = use_default ? previous : null; - } else { - let previous = input.defaultChecked; - input.removeAttribute(name); - input.defaultChecked = previous; - input.checked = use_default ? previous : false; - } - } else { - element2.removeAttribute(key2); - } - } else if (is_default || setters.includes(name) && (is_custom_element || typeof value !== "string")) { - element2[name] = value; - } else if (typeof value !== "function") { - set_attribute(element2, name, value, skip_warning); - } - } - } - if (is_hydrating_custom_element) { - set_hydrating(true); - } - return current; -} -function get_attributes(element2) { - var _a3; - return ( - /** @type {Record} **/ - // @ts-expect-error - (_a3 = element2.__attributes) != null ? _a3 : element2.__attributes = { - [IS_CUSTOM_ELEMENT]: element2.nodeName.includes("-"), - [IS_HTML]: element2.namespaceURI === NAMESPACE_HTML - } - ); -} -var setters_cache = /* @__PURE__ */ new Map(); -function get_setters(element2) { - var setters = setters_cache.get(element2.nodeName); - if (setters) return setters; - setters_cache.set(element2.nodeName, setters = []); - var descriptors; - var proto = element2; - var element_proto = Element.prototype; - while (element_proto !== proto) { - descriptors = get_descriptors(proto); - for (var key in descriptors) { - if (descriptors[key].set) { - setters.push(key); - } - } - proto = get_prototype_of(proto); - } - return setters; -} -function check_src_in_dev_hydration(element2, attribute, value) { - var _a3; - if (!dev_fallback_default) return; - if (attribute === "srcset" && srcset_url_equal(element2, value)) return; - if (src_url_equal((_a3 = element2.getAttribute(attribute)) != null ? _a3 : "", value)) return; - hydration_attribute_changed( - attribute, - element2.outerHTML.replace(element2.innerHTML, element2.innerHTML && "..."), - String(value) - ); -} -function src_url_equal(element_src, url) { - if (element_src === url) return true; - return new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href; -} -function split_srcset(srcset) { - return srcset.split(",").map((src) => src.trim().split(" ").filter(Boolean)); -} -function srcset_url_equal(element2, srcset) { - var element_urls = split_srcset(element2.srcset); - var urls = split_srcset(srcset); - return urls.length === element_urls.length && urls.every( - ([url, width], i) => width === element_urls[i][1] && // We need to test both ways because Vite will create an a full URL with - // `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the - // relative URLs inside srcset are not automatically resolved to absolute URLs by - // browsers (in contrast to img.src). This means both SSR and DOM code could - // contain relative or absolute URLs. - (src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0])) - ); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/index-client.js -if (dev_fallback_default) { - let throw_rune_error = function(rune) { - if (!(rune in globalThis)) { - let value; - Object.defineProperty(globalThis, rune, { - configurable: true, - // eslint-disable-next-line getter-return - get: () => { - if (value !== void 0) { - return value; - } - rune_outside_svelte(rune); - }, - set: (v) => { - value = v; - } - }); - } - }; - throw_rune_error("$state"); - throw_rune_error("$effect"); - throw_rune_error("$derived"); - throw_rune_error("$inspect"); - throw_rune_error("$props"); - throw_rune_error("$bindable"); -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/reactivity/store.js -var is_store_binding = false; -var IS_UNMOUNTED = Symbol(); -function capture_store_binding(fn) { - var previous_is_store_binding = is_store_binding; - try { - is_store_binding = false; - return [fn(), is_store_binding]; - } finally { - is_store_binding = previous_is_store_binding; - } -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/reactivity/props.js -var rest_props_handler = { - get(target, key) { - if (target.exclude.includes(key)) return; - return target.props[key]; - }, - set(target, key) { - if (dev_fallback_default) { - props_rest_readonly(`${target.name}.${String(key)}`); - } - return false; - }, - getOwnPropertyDescriptor(target, key) { - if (target.exclude.includes(key)) return; - if (key in target.props) { - return { - enumerable: true, - configurable: true, - value: target.props[key] - }; - } - }, - has(target, key) { - if (target.exclude.includes(key)) return false; - return key in target.props; - }, - ownKeys(target) { - return Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key)); - } -}; -// @__NO_SIDE_EFFECTS__ -function rest_props(props, exclude, name) { - return new Proxy( - dev_fallback_default ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude }, - rest_props_handler - ); -} -var spread_props_handler = { - get(target, key) { - let i = target.props.length; - while (i--) { - let p = target.props[i]; - if (is_function(p)) p = p(); - if (typeof p === "object" && p !== null && key in p) return p[key]; - } - }, - set(target, key, value) { - let i = target.props.length; - while (i--) { - let p = target.props[i]; - if (is_function(p)) p = p(); - const desc = get_descriptor(p, key); - if (desc && desc.set) { - desc.set(value); - return true; - } - } - return false; - }, - getOwnPropertyDescriptor(target, key) { - let i = target.props.length; - while (i--) { - let p = target.props[i]; - if (is_function(p)) p = p(); - if (typeof p === "object" && p !== null && key in p) { - const descriptor = get_descriptor(p, key); - if (descriptor && !descriptor.configurable) { - descriptor.configurable = true; - } - return descriptor; - } - } - }, - has(target, key) { - if (key === STATE_SYMBOL || key === LEGACY_PROPS) return false; - for (let p of target.props) { - if (is_function(p)) p = p(); - if (p != null && key in p) return true; - } - return false; - }, - ownKeys(target) { - const keys = []; - for (let p of target.props) { - if (is_function(p)) p = p(); - for (const key in p) { - if (!keys.includes(key)) keys.push(key); - } - } - return keys; - } -}; -function spread_props(...props) { - return new Proxy({ props }, spread_props_handler); -} -function has_destroyed_component_ctx(current_value) { - var _a3, _b3; - return (_b3 = (_a3 = current_value.ctx) == null ? void 0 : _a3.d) != null ? _b3 : false; -} -function prop(props, key, flags, fallback2) { - var _a3, _b3; - var immutable = (flags & PROPS_IS_IMMUTABLE) !== 0; - var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0; - var bindable = (flags & PROPS_IS_BINDABLE) !== 0; - var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0; - var is_store_sub = false; - var prop_value; - if (bindable) { - [prop_value, is_store_sub] = capture_store_binding(() => ( - /** @type {V} */ - props[key] - )); - } else { - prop_value = /** @type {V} */ - props[key]; - } - var is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props; - var setter = bindable && ((_b3 = (_a3 = get_descriptor(props, key)) == null ? void 0 : _a3.set) != null ? _b3 : is_entry_props && key in props && ((v) => props[key] = v)) || void 0; - var fallback_value = ( - /** @type {V} */ - fallback2 - ); - var fallback_dirty = true; - var fallback_used = false; - var get_fallback = () => { - fallback_used = true; - if (fallback_dirty) { - fallback_dirty = false; - if (lazy) { - fallback_value = untrack( - /** @type {() => V} */ - fallback2 - ); - } else { - fallback_value = /** @type {V} */ - fallback2; - } - } - return fallback_value; - }; - if (prop_value === void 0 && fallback2 !== void 0) { - if (setter && runes) { - props_invalid_value(key); - } - prop_value = get_fallback(); - if (setter) setter(prop_value); - } - var getter; - if (runes) { - getter = () => { - var value = ( - /** @type {V} */ - props[key] - ); - if (value === void 0) return get_fallback(); - fallback_dirty = true; - fallback_used = false; - return value; - }; - } else { - var derived_getter = (immutable ? derived : derived_safe_equal)( - () => ( - /** @type {V} */ - props[key] - ) - ); - derived_getter.f |= LEGACY_DERIVED_PROP; - getter = () => { - var value = get(derived_getter); - if (value !== void 0) fallback_value = /** @type {V} */ - void 0; - return value === void 0 ? fallback_value : value; - }; - } - if ((flags & PROPS_IS_UPDATED) === 0) { - return getter; - } - if (setter) { - var legacy_parent = props.$$legacy; - return function(value, mutation) { - if (arguments.length > 0) { - if (!runes || !mutation || legacy_parent || is_store_sub) { - setter(mutation ? getter() : value); - } - return value; - } else { - return getter(); - } - }; - } - var from_child = false; - var was_from_child = false; - var inner_current_value = mutable_source(prop_value); - var current_value = derived(() => { - var parent_value = getter(); - var child_value = get(inner_current_value); - if (from_child) { - from_child = false; - was_from_child = true; - return child_value; - } - was_from_child = false; - return inner_current_value.v = parent_value; - }); - if (bindable) { - get(current_value); - } - if (!immutable) current_value.equals = safe_equals; - return function(value, mutation) { - if (captured_signals !== null) { - from_child = was_from_child; - getter(); - get(inner_current_value); - } - if (arguments.length > 0) { - const new_value = mutation ? get(current_value) : runes && bindable ? proxy(value) : value; - if (!current_value.equals(new_value)) { - from_child = true; - set(inner_current_value, new_value); - if (fallback_used && fallback_value !== void 0) { - fallback_value = new_value; - } - if (has_destroyed_component_ctx(current_value)) { - return value; - } - untrack(() => get(current_value)); - } - return value; - } - if (has_destroyed_component_ctx(current_value)) { - return current_value.v; - } - return get(current_value); - }; -} - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/legacy/legacy-client.js -function createClassComponent(options) { - return new Svelte4Component(options); -} -var _events, _instance; -var Svelte4Component = class { - /** - * @param {ComponentConstructorOptions & { - * component: any; - * }} options - */ - constructor(options) { - /** @type {any} */ - __privateAdd(this, _events); - /** @type {Record} */ - __privateAdd(this, _instance); - var _a3, _b3; - var sources = /* @__PURE__ */ new Map(); - var add_source = (key, value) => { - var s = mutable_source(value); - sources.set(key, s); - return s; - }; - const props = new Proxy( - { ...options.props || {}, $$events: {} }, - { - get(target, prop2) { - var _a4; - return get((_a4 = sources.get(prop2)) != null ? _a4 : add_source(prop2, Reflect.get(target, prop2))); - }, - has(target, prop2) { - var _a4; - if (prop2 === LEGACY_PROPS) return true; - get((_a4 = sources.get(prop2)) != null ? _a4 : add_source(prop2, Reflect.get(target, prop2))); - return Reflect.has(target, prop2); - }, - set(target, prop2, value) { - var _a4; - set((_a4 = sources.get(prop2)) != null ? _a4 : add_source(prop2, value), value); - return Reflect.set(target, prop2, value); - } - } - ); - __privateSet(this, _instance, (options.hydrate ? hydrate : mount)(options.component, { - target: options.target, - anchor: options.anchor, - props, - context: options.context, - intro: (_a3 = options.intro) != null ? _a3 : false, - recover: options.recover - })); - if (!((_b3 = options == null ? void 0 : options.props) == null ? void 0 : _b3.$$host) || options.sync === false) { - flushSync(); - } - __privateSet(this, _events, props.$$events); - for (const key of Object.keys(__privateGet(this, _instance))) { - if (key === "$set" || key === "$destroy" || key === "$on") continue; - define_property(this, key, { - get() { - return __privateGet(this, _instance)[key]; - }, - /** @param {any} value */ - set(value) { - __privateGet(this, _instance)[key] = value; - }, - enumerable: true - }); - } - __privateGet(this, _instance).$set = /** @param {Record} next */ - (next2) => { - Object.assign(props, next2); - }; - __privateGet(this, _instance).$destroy = () => { - unmount(__privateGet(this, _instance)); - }; - } - /** @param {Record} props */ - $set(props) { - __privateGet(this, _instance).$set(props); - } - /** - * @param {string} event - * @param {(...args: any[]) => any} callback - * @returns {any} - */ - $on(event2, callback) { - __privateGet(this, _events)[event2] = __privateGet(this, _events)[event2] || []; - const cb = (...args) => callback.call(this, ...args); - __privateGet(this, _events)[event2].push(cb); - return () => { - __privateGet(this, _events)[event2] = __privateGet(this, _events)[event2].filter( - /** @param {any} fn */ - (fn) => fn !== cb - ); - }; - } - $destroy() { - __privateGet(this, _instance).$destroy(); - } -}; -_events = new WeakMap(); -_instance = new WeakMap(); - -// node_modules/.pnpm/svelte@5.26.2/node_modules/svelte/src/internal/client/dom/elements/custom-element.js -var SvelteElement; -if (typeof HTMLElement === "function") { - SvelteElement = class extends HTMLElement { - /** - * @param {*} $$componentCtor - * @param {*} $$slots - * @param {*} use_shadow_dom - */ - constructor($$componentCtor, $$slots, use_shadow_dom) { - super(); - /** The Svelte component constructor */ - __publicField(this, "$$ctor"); - /** Slots */ - __publicField(this, "$$s"); - /** @type {any} The Svelte component instance */ - __publicField(this, "$$c"); - /** Whether or not the custom element is connected */ - __publicField(this, "$$cn", false); - /** @type {Record} Component props data */ - __publicField(this, "$$d", {}); - /** `true` if currently in the process of reflecting component props back to attributes */ - __publicField(this, "$$r", false); - /** @type {Record} Props definition (name, reflected, type etc) */ - __publicField(this, "$$p_d", {}); - /** @type {Record} Event listeners */ - __publicField(this, "$$l", {}); - /** @type {Map} Event listener unsubscribe functions */ - __publicField(this, "$$l_u", /* @__PURE__ */ new Map()); - /** @type {any} The managed render effect for reflecting attributes */ - __publicField(this, "$$me"); - this.$$ctor = $$componentCtor; - this.$$s = $$slots; - if (use_shadow_dom) { - this.attachShadow({ mode: "open" }); - } - } - /** - * @param {string} type - * @param {EventListenerOrEventListenerObject} listener - * @param {boolean | AddEventListenerOptions} [options] - */ - addEventListener(type, listener, options) { - this.$$l[type] = this.$$l[type] || []; - this.$$l[type].push(listener); - if (this.$$c) { - const unsub = this.$$c.$on(type, listener); - this.$$l_u.set(listener, unsub); - } - super.addEventListener(type, listener, options); - } - /** - * @param {string} type - * @param {EventListenerOrEventListenerObject} listener - * @param {boolean | AddEventListenerOptions} [options] - */ - removeEventListener(type, listener, options) { - super.removeEventListener(type, listener, options); - if (this.$$c) { - const unsub = this.$$l_u.get(listener); - if (unsub) { - unsub(); - this.$$l_u.delete(listener); - } - } - } - async connectedCallback() { - this.$$cn = true; - if (!this.$$c) { - let create_slot = function(name) { - return (anchor) => { - const slot2 = document.createElement("slot"); - if (name !== "default") slot2.name = name; - append(anchor, slot2); - }; - }; - await Promise.resolve(); - if (!this.$$cn || this.$$c) { - return; - } - const $$slots = {}; - const existing_slots = get_custom_elements_slots(this); - for (const name of this.$$s) { - if (name in existing_slots) { - if (name === "default" && !this.$$d.children) { - this.$$d.children = create_slot(name); - $$slots.default = true; - } else { - $$slots[name] = create_slot(name); - } - } - } - for (const attribute of this.attributes) { - const name = this.$$g_p(attribute.name); - if (!(name in this.$$d)) { - this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp"); - } - } - for (const key in this.$$p_d) { - if (!(key in this.$$d) && this[key] !== void 0) { - this.$$d[key] = this[key]; - delete this[key]; - } - } - this.$$c = createClassComponent({ - component: this.$$ctor, - target: this.shadowRoot || this, - props: { - ...this.$$d, - $$slots, - $$host: this - } - }); - this.$$me = effect_root(() => { - render_effect(() => { - var _a3; - this.$$r = true; - for (const key of object_keys(this.$$c)) { - if (!((_a3 = this.$$p_d[key]) == null ? void 0 : _a3.reflect)) continue; - this.$$d[key] = this.$$c[key]; - const attribute_value = get_custom_element_value( - key, - this.$$d[key], - this.$$p_d, - "toAttribute" - ); - if (attribute_value == null) { - this.removeAttribute(this.$$p_d[key].attribute || key); - } else { - this.setAttribute(this.$$p_d[key].attribute || key, attribute_value); - } - } - this.$$r = false; - }); - }); - for (const type in this.$$l) { - for (const listener of this.$$l[type]) { - const unsub = this.$$c.$on(type, listener); - this.$$l_u.set(listener, unsub); - } - } - this.$$l = {}; - } - } - // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte - // and setting attributes through setAttribute etc, this is helpful - /** - * @param {string} attr - * @param {string} _oldValue - * @param {string} newValue - */ - attributeChangedCallback(attr2, _oldValue, newValue) { - var _a3; - if (this.$$r) return; - attr2 = this.$$g_p(attr2); - this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); - (_a3 = this.$$c) == null ? void 0 : _a3.$set({ [attr2]: this.$$d[attr2] }); - } - disconnectedCallback() { - this.$$cn = false; - Promise.resolve().then(() => { - if (!this.$$cn && this.$$c) { - this.$$c.$destroy(); - this.$$me(); - this.$$c = void 0; - } - }); - } - /** - * @param {string} attribute_name - */ - $$g_p(attribute_name) { - return object_keys(this.$$p_d).find( - (key) => this.$$p_d[key].attribute === attribute_name || !this.$$p_d[key].attribute && key.toLowerCase() === attribute_name - ) || attribute_name; - } - }; -} -function get_custom_element_value(prop2, value, props_definition, transform) { - var _a3; - const type = (_a3 = props_definition[prop2]) == null ? void 0 : _a3.type; - value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; - if (!transform || !props_definition[prop2]) { - return value; - } else if (transform === "toAttribute") { - switch (type) { - case "Object": - case "Array": - return value == null ? null : JSON.stringify(value); - case "Boolean": - return value ? "" : null; - case "Number": - return value == null ? null : value; - default: - return value; - } - } else { - switch (type) { - case "Object": - case "Array": - return value && JSON.parse(value); - case "Boolean": - return value; - // conversion already handled above - case "Number": - return value != null ? +value : value; - default: - return value; - } - } -} -function get_custom_elements_slots(element2) { - const result = {}; - element2.childNodes.forEach((node) => { - result[ - /** @type {Element} node */ - node.slot || "default" - ] = true; - }); - return result; -} - -// node_modules/.pnpm/@lucide+svelte@0.487.0_svelte@5.26.2/node_modules/@lucide/svelte/dist/defaultAttributes.js -var defaultAttributes = { - xmlns: "http://www.w3.org/2000/svg", - width: 24, - height: 24, - viewBox: "0 0 24 24", - fill: "none", - stroke: "currentColor", - "stroke-width": 2, - "stroke-linecap": "round", - "stroke-linejoin": "round" -}; -var defaultAttributes_default = defaultAttributes; - -// node_modules/.pnpm/@lucide+svelte@0.487.0_svelte@5.26.2/node_modules/@lucide/svelte/dist/Icon.svelte -var root = ns_template(``); -function Icon($$anchor, $$props) { - push($$props, true); - const color = prop($$props, "color", 3, "currentColor"), size = prop($$props, "size", 3, 24), strokeWidth = prop($$props, "strokeWidth", 3, 2), absoluteStrokeWidth = prop($$props, "absoluteStrokeWidth", 3, false), iconNode = prop($$props, "iconNode", 19, () => []), props = rest_props($$props, [ - "$$slots", - "$$events", - "$$legacy", - "name", - "color", - "size", - "strokeWidth", - "absoluteStrokeWidth", - "iconNode", - "children" - ]); - var svg = root(); - let attributes; - var node = child(svg); - each(node, 17, iconNode, index, ($$anchor2, $$item) => { - let tag = () => get($$item)[0]; - let attrs = () => get($$item)[1]; - var fragment = comment(); - var node_1 = first_child(fragment); - element(node_1, tag, true, ($$element, $$anchor3) => { - let attributes_1; - template_effect(() => attributes_1 = set_attributes($$element, attributes_1, { ...attrs() })); - }); - append($$anchor2, fragment); - }); - var node_2 = sibling(node); - snippet(node_2, () => { - var _a3; - return (_a3 = $$props.children) != null ? _a3 : noop; - }); - reset(svg); - template_effect( - ($0) => attributes = set_attributes(svg, attributes, { - ...defaultAttributes_default, - ...props, - width: size(), - height: size(), - stroke: color(), - "stroke-width": $0, - class: [ - "lucide-icon lucide", - $$props.name && `lucide-${$$props.name}`, - $$props.class - ] - }), - [ - () => absoluteStrokeWidth() ? Number(strokeWidth()) * 24 / Number(size()) : strokeWidth() - ] - ); - append($$anchor, svg); - pop(); -} - -// node_modules/.pnpm/@lucide+svelte@0.487.0_svelte@5.26.2/node_modules/@lucide/svelte/dist/icons/loader.svelte -function Loader($$anchor, $$props) { - push($$props, true); - let props = rest_props($$props, ["$$slots", "$$events", "$$legacy"]); - const iconNode = [ - ["path", { "d": "M12 2v4" }], - ["path", { "d": "m16.2 7.8 2.9-2.9" }], - ["path", { "d": "M18 12h4" }], - ["path", { "d": "m16.2 16.2 2.9 2.9" }], - ["path", { "d": "M12 18v4" }], - ["path", { "d": "m4.9 19.1 2.9-2.9" }], - ["path", { "d": "M2 12h4" }], - ["path", { "d": "m4.9 4.9 2.9 2.9" }] - ]; - Icon($$anchor, spread_props({ name: "loader" }, () => props, { - iconNode, - children: ($$anchor2, $$slotProps) => { - var fragment_1 = comment(); - var node = first_child(fragment_1); - snippet(node, () => { - var _a3; - return (_a3 = $$props.children) != null ? _a3 : noop; - }); - append($$anchor2, fragment_1); - }, - $$slots: { default: true } - })); - pop(); -} - -// node_modules/.pnpm/@lucide+svelte@0.487.0_svelte@5.26.2/node_modules/@lucide/svelte/dist/icons/square-check-big.svelte -function Square_check_big($$anchor, $$props) { - push($$props, true); - let props = rest_props($$props, ["$$slots", "$$events", "$$legacy"]); - const iconNode = [ - [ - "path", - { - "d": "M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5" - } - ], - ["path", { "d": "m9 11 3 3L22 4" }] - ]; - Icon($$anchor, spread_props({ name: "square-check-big" }, () => props, { - iconNode, - children: ($$anchor2, $$slotProps) => { - var fragment_1 = comment(); - var node = first_child(fragment_1); - snippet(node, () => { - var _a3; - return (_a3 = $$props.children) != null ? _a3 : noop; - }); - append($$anchor2, fragment_1); - }, - $$slots: { default: true } - })); - pop(); -} - -// src/Progress.svelte -var root_1 = template(`
`); -var root2 = template(`
Rendering...
`); -var $$css = { - hash: "svelte-1ynmm81", - code: ".progress.svelte-1ynmm81 {font-size:14px;}" -}; -function Progress($$anchor, $$props) { - push($$props, true); - append_styles($$anchor, $$css); - let renderStates = proxy([]); - function initRenderStates(data) { - data.forEach((param) => { - renderStates.push({ status: 0, filename: param.file.name }); - }); - } - function updateRenderStates(i) { - renderStates[i].status = 1; - } - var div = root2(); - var node = sibling(child(div), 2); - each(node, 17, () => renderStates, index, ($$anchor2, item) => { - var div_1 = root_1(); - var node_1 = child(div_1); - { - var consequent = ($$anchor3) => { - Square_check_big($$anchor3, { size: "14" }); - }; - var alternate = ($$anchor3) => { - Loader($$anchor3, { size: "14" }); - }; - if_block(node_1, ($$render) => { - if (get(item).status) $$render(consequent); - else $$render(alternate, false); - }); - } - var text2 = sibling(node_1); - reset(div_1); - template_effect(() => { - var _a3; - return set_text(text2, ` ${(_a3 = get(item).filename) != null ? _a3 : ""}`); - }); - append($$anchor2, div_1); - }); - reset(div); - append($$anchor, div); - return pop({ initRenderStates, updateRenderStates }); -} - -// node_modules/.pnpm/yocto-queue@1.2.1/node_modules/yocto-queue/index.js -var Node2 = class { - constructor(value) { - __publicField(this, "value"); - __publicField(this, "next"); - this.value = value; - } -}; -var _head, _tail, _size; -var Queue = class { - constructor() { - __privateAdd(this, _head); - __privateAdd(this, _tail); - __privateAdd(this, _size); - this.clear(); - } - enqueue(value) { - const node = new Node2(value); - if (__privateGet(this, _head)) { - __privateGet(this, _tail).next = node; - __privateSet(this, _tail, node); - } else { - __privateSet(this, _head, node); - __privateSet(this, _tail, node); - } - __privateWrapper(this, _size)._++; - } - dequeue() { - const current = __privateGet(this, _head); - if (!current) { - return; - } - __privateSet(this, _head, __privateGet(this, _head).next); - __privateWrapper(this, _size)._--; - return current.value; - } - peek() { - if (!__privateGet(this, _head)) { - return; - } - return __privateGet(this, _head).value; - } - clear() { - __privateSet(this, _head, void 0); - __privateSet(this, _tail, void 0); - __privateSet(this, _size, 0); - } - get size() { - return __privateGet(this, _size); - } - *[Symbol.iterator]() { - let current = __privateGet(this, _head); - while (current) { - yield current.value; - current = current.next; - } - } - *drain() { - while (__privateGet(this, _head)) { - yield this.dequeue(); - } - } -}; -_head = new WeakMap(); -_tail = new WeakMap(); -_size = new WeakMap(); - -// node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.js -function pLimit(concurrency) { - validateConcurrency(concurrency); - const queue = new Queue(); - let activeCount = 0; - const resumeNext = () => { - if (activeCount < concurrency && queue.size > 0) { - queue.dequeue()(); - activeCount++; - } - }; - const next2 = () => { - activeCount--; - resumeNext(); - }; - const run2 = async (function_, resolve, arguments_) => { - const result = (async () => function_(...arguments_))(); - resolve(result); - try { - await result; - } catch (e) { - } - next2(); - }; - const enqueue = (function_, resolve, arguments_) => { - new Promise((internalResolve) => { - queue.enqueue(internalResolve); - }).then( - run2.bind(void 0, function_, resolve, arguments_) - ); - (async () => { - await Promise.resolve(); - if (activeCount < concurrency) { - resumeNext(); - } - })(); - }; - const generator = (function_, ...arguments_) => new Promise((resolve) => { - enqueue(function_, resolve, arguments_); - }); - Object.defineProperties(generator, { - activeCount: { - get: () => activeCount - }, - pendingCount: { - get: () => queue.size - }, - clearQueue: { - value() { - queue.clear(); - } - }, - concurrency: { - get: () => concurrency, - set(newConcurrency) { - validateConcurrency(newConcurrency); - concurrency = newConcurrency; - queueMicrotask(() => { - while (activeCount < concurrency && queue.size > 0) { - resumeNext(); - } - }); - } - } - }); - return generator; -} -function validateConcurrency(concurrency) { - if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) { - throw new TypeError("Expected `concurrency` to be a number from 1 and up"); - } -} - -// src/modal.ts -function fullWidthButton(button) { - button.buttonEl.setAttribute("style", `margin: "0 auto"; width: -webkit-fill-available`); -} -function setInputWidth(inputEl) { - inputEl.setAttribute("style", `width: 100px;`); -} -var ExportConfigModal = class extends import_obsidian4.Modal { - constructor(plugin, file, multiplePdf) { - var _a3, _b3, _c2, _d, _e; - super(plugin.app); - this.canceled = true; - this.plugin = plugin; - this.file = file; - this.completed = false; - this.i18n = i18n_default.current; - this.docs = []; - this.scale = 0.75; - this.webviews = []; - this.multiplePdf = multiplePdf; - this.config = { - pageSize: "A4", - marginType: "1", - showTitle: (_a3 = plugin.settings.showTitle) != null ? _a3 : true, - open: true, - scale: 100, - landscape: false, - marginTop: "10", - marginBottom: "10", - marginLeft: "10", - marginRight: "10", - displayHeader: (_b3 = plugin.settings.displayHeader) != null ? _b3 : true, - displayFooter: (_c2 = plugin.settings.displayHeader) != null ? _c2 : true, - cssSnippet: "0", - ...(_e = (_d = plugin.settings) == null ? void 0 : _d.prevConfig) != null ? _e : {} - }; - } - getFileCache(file) { - return this.app.metadataCache.getFileCache(file); - } - async getAllFiles() { - const app = this.plugin.app; - const data = []; - const docs = []; - if (this.file instanceof import_obsidian4.TFolder) { - const files = traverseFolder(this.file); - for (const file of files) { - data.push({ - app, - file, - config: this.config - }); - } - } else { - const { doc, frontMatter, file } = await renderMarkdown({ app, file: this.file, config: this.config }); - docs.push({ doc, frontMatter, file }); - if (frontMatter.toc) { - const files = this.parseToc(doc); - for (const item of files) { - data.push({ - app, - file: item.file, - config: this.config, - extra: item - }); - } - } - } - return { data, docs }; - } - async renderFiles(data, docs, cb) { - const concurrency = safeParseInt(this.plugin.settings.concurrency) || 5; - const limit = pLimit(concurrency); - const inputs = data.map( - (param, i) => limit(async () => { - const res = await renderMarkdown(param); - cb == null ? void 0 : cb(i); - return res; - }) - ); - let _docs = [...docs != null ? docs : [], ...await Promise.all(inputs)]; - if (this.file instanceof import_obsidian4.TFile) { - const leaf = this.app.workspace.getLeaf(); - await leaf.openFile(this.file); - } - if (!this.multiplePdf) { - _docs = this.mergeDoc(_docs); - } - this.docs = _docs.map(({ doc, ...rest }) => { - return { ...rest, doc: fixDoc(doc, doc.title) }; - }); - } - parseToc(doc) { - var _a3, _b3; - const cache = this.getFileCache(this.file); - const files = (_b3 = (_a3 = cache == null ? void 0 : cache.links) == null ? void 0 : _a3.map(({ link: link2, displayText }) => { - const id = crypto.randomUUID(); - const elem = doc.querySelector(`a[data-href="${link2}"]`); - if (elem) { - elem.href = `#${id}`; - } - return { - title: displayText, - file: this.app.metadataCache.getFirstLinkpathDest(link2, this.file.path), - id - }; - }).filter((item) => item.file instanceof import_obsidian4.TFile)) != null ? _b3 : []; - return files; - } - mergeDoc(docs) { - const { doc: doc0, frontMatter, file } = docs[0]; - const sections = []; - for (const { doc } of docs) { - const element2 = doc.querySelector(".markdown-preview-view"); - if (element2) { - const section = doc0.createElement("section"); - Array.from(element2.children).forEach((child2) => { - section.appendChild(doc0.importNode(child2, true)); - }); - sections.push(section); - } - } - const root3 = doc0.querySelector(".markdown-preview-view"); - if (root3) { - root3.innerHTML = ""; - } - sections.forEach((section) => { - root3 == null ? void 0 : root3.appendChild(section); - }); - return [{ doc: doc0, frontMatter, file }]; - } - calcPageSize(element2, config) { - var _a3, _b3, _c2; - const { pageSize, pageWidth } = config != null ? config : this.config; - const el = element2 != null ? element2 : this.previewDiv; - const width = (_c2 = (_b3 = (_a3 = PageSize) == null ? void 0 : _a3[pageSize]) == null ? void 0 : _b3[0]) != null ? _c2 : safeParseFloat(pageWidth, 210); - const scale2 = Math.floor(mm2px(width) / el.offsetWidth * 100) / 100; - this.webviews.forEach((wb) => { - wb.style.transform = `scale(${1 / scale2},${1 / scale2})`; - wb.style.width = `calc(${scale2} * 100%)`; - wb.style.height = `calc(${scale2} * 100%)`; - }); - this.scale = scale2; - return scale2; - } - async calcWebviewSize() { - await sleep(500); - this.webviews.forEach(async (e, i) => { - var _a3; - const [width, height] = await e.executeJavaScript("[document.body.offsetWidth, document.body.offsetHeight]"); - const sizeEl = (_a3 = e.parentNode) == null ? void 0 : _a3.querySelector(".print-size"); - if (sizeEl) { - sizeEl.innerHTML = `${width}\xD7${height}px -${px2mm(width)}\xD7${px2mm(height)}mm`; - } - }); - } - async togglePrintSize() { - var _a3; - (_a3 = document.querySelectorAll(".print-size")) == null ? void 0 : _a3.forEach((sizeEl) => { - if (this.config["pageSize"] == "Custom") { - sizeEl.style.visibility = "visible"; - } else { - sizeEl.style.visibility = "hidden"; - } - }); - } - makeWebviewJs(doc) { - return ` - document.body.innerHTML = decodeURIComponent(\`${encodeURIComponent(doc.body.innerHTML)}\`); +`;function co(){return[so,...lo()]}function lo(){let e=[];return Array.from(document.styleSheets).forEach(t=>{try{let n=t?.cssRules??[];Array.from(n).forEach(t=>{if(t.constructor.name==`CSSMediaRule`&&t.conditionText===`print`){let n=t.cssText.replace(/@media print\s*\{(.+)\}/gms,`$1`);e.push(n)}})}catch(e){console.error(e)}}),e}function uo(e){return Array.from({length:e},()=>(16*Math.random()|0).toString(16)).join(``)}function fo(e,t){return e.metadataCache.getFileCache(t)?.frontmatter??{}}async function po({app:e,file:t,config:n,extra:r}){let i=new Date().getTime(),a=e.workspace.getLeaf(!0);await a.openFile(t),a.view;let o=await e.vault.cachedRead(t);o||new l.Notice(`data is empty!`);let s=fo(e,t),c=[];for(let[e,t]of Object.entries(s))(e.toLowerCase()==`cssclass`||e.toLowerCase()==`cssclasses`)&&(Array.isArray(t)?c.push(...t):c.push(t));let u=new l.Component;u.load();let d=document.body.createDiv(`print`),f=d.createDiv({cls:`markdown-preview-view markdown-rendered `+c.join(` `)});f.toggleClass(`rtl`,e.vault.getConfig(`rightToLeft`)),f.toggleClass(`show-properties`,e.vault.getConfig(`propertiesInDocument`)!==`hidden`);let p=r?.title??s?.title??t.basename;f.createEl(`h1`,{text:p},e=>{e.addClass(`__title__`),e.style.display=n?.showTitle?`block`:`none`,e.id=r?.id??``});let m=e.metadataCache.getFileCache(t),h=new Map(Object.entries(m?.blocks??{})),g=(o?.split(` +`)??[]).map((e,t)=>{for(let{id:n,position:{start:r,end:i}}of h.values()){let a=`^${n}`;if(e.includes(a)&&t>=r.line&&t<=i.line)return h.delete(n),e.replace(a,` ${a}`)}return e});[...h.values()].forEach(({id:e,position:{start:t,end:n}})=>{let r=t.line;g[r]=`\n\n`+g[r]});let _={children:void 0,appendChild(e){throw this.children=e?.children,Error(`exit`)}},v=[];try{await l.MarkdownRenderer.render(e,g.join(` +`),_,t.path,u)}catch{}let y=createFragment();Array.from(_.children).forEach(e=>{y.createDiv({},t=>t.appendChild(e))}),f.appendChild(y),await l.MarkdownRenderer.postProcess(e,{docId:uo(16),sourcePath:t.path,frontmatter:{},promises:v,addChild:function(e){return u.addChild(e)},getSectionInfo:function(){return null},containerEl:f,el:f,displayMode:!0}),await Promise.all(v),d.findAll(`a.internal-link`).forEach(e=>{let[n,r]=e.dataset.href?.split(`#`)??[];(!n||n?.length==0||n==t.basename)&&r?.startsWith(`^`)||e.removeAttribute(`href`)});try{await xo(o,f)}catch{console.warn(`wait timeout`)}So(f);let b=document.implementation.createHTMLDocument(`document`);return b.body.appendChild(d.cloneNode(!0)),d.detach(),u.unload(),d.remove(),b.title=p,a.detach(),console.log(`md render time:${new Date().getTime()-i}ms`),{doc:b,frontMatter:s,file:t}}async function mo({app:e,file:t,config:n,extra:r}){let i=new Date().getTime(),a=await e.vault.cachedRead(t);a||new l.Notice(`${t} content is empty!`);let o=new l.Component;o.load();let s=document.body.createDiv({cls:`print`,attr:{id:t.path}}),{viewEl:c,frontMatter:u}=ho({app:e,file:t,extra:r,config:n,printEl:s});return await _o({app:e,markdown:go({app:e,file:t,data:a}),file:t,comp:o,viewEl:c}),console.log(`md render time:${new Date().getTime()-i}ms`),{doc:s,frontMatter:u,file:t,cleanup:()=>{s.detach(),o.unload(),s.remove()}}}function ho({app:e,file:t,printEl:n,extra:r,config:i}){let a=fo(e,t),o=n.createDiv({cls:`markdown-preview-view markdown-rendered`}),s=Eo(a);o.addClasses(s),o.toggleClass(`rtl`,e.vault.getConfig(`rightToLeft`)),o.toggleClass(`show-properties`,e.vault.getConfig(`propertiesInDocument`)!==`hidden`);let c=r?.title??a?.title??t.basename;return o.createEl(`h1`,{text:c},e=>{e.addClass(`__title__`),e.style.display=i?.showTitle?`block`:`none`,e.id=r?.id??``}),{viewEl:o,frontMatter:a}}function go({app:e,file:t,data:n}){let r=e.metadataCache.getFileCache(t),i=new Map(Object.entries(r?.blocks??{})),a=(n?.split(` +`)??[]).map((e,t)=>{for(let{id:n,position:{start:r,end:a}}of i.values()){let o=`^${n}`;if(e.includes(o)&&t>=r.line&&t<=a.line)return i.delete(n),e.replace(o,` ${o}`)}return e});return[...i.values()].forEach(({id:e,position:{start:t,end:n}})=>{let r=t.line;a[r]=`\n\n`+a[r]}),a.join(` +`)}async function _o({app:e,markdown:t,file:n,comp:r,viewEl:i}){let a={children:void 0,appendChild(e){throw this.children=e?.children,Error(`exit`)}},o=[];try{await l.MarkdownRenderer.render(e,t,a,n.path,r)}catch{}let s=createFragment();Array.from(a.children).forEach(e=>{s.createDiv({},t=>t.appendChild(e))}),i.appendChild(s),await l.MarkdownRenderer.postProcess(e,{docId:uo(16),sourcePath:n.path,frontmatter:{},promises:o,addChild:function(e){return r.addChild(e)},getSectionInfo:function(){return null},containerEl:i,el:i,displayMode:!0}),await Promise.all(o),i.findAll(`a.internal-link`).forEach(e=>{let[t,r]=e.dataset.href?.split(`#`)??[];(!t||t?.length==0||t==n.basename)&&r?.startsWith(`^`)||e.removeAttribute(`href`)})}function vo(e,t){return Za(e,Ya(e),t),bo(e),e}function yo(e,t){return Za(e,Ya(e),t),e}function bo(e){Array.from(e.querySelectorAll(`span.markdown-embed`)).reverse().forEach(e=>e.innerHTML=encodeURIComponent(e.innerHTML))}async function xo(e,t){(e.includes("```dataview")||e.includes("```gEvent")||e.includes(`![[`))&&await sleep(2e3);try{await wo(t)}catch{await sleep(1e3)}}function So(e){for(let t of Array.from(e.querySelectorAll(`canvas`))){let e=t.toDataURL(),n=document.createElement(`img`);n.src=e,to(n,t.attributes),n.className=`__canvas__`,t.replaceWith(n)}}function Co(e){return` + document.body.innerHTML = decodeURIComponent(\`${encodeURIComponent(e.body.innerHTML)}\`); document.head.innerHTML = decodeURIComponent(\`${encodeURIComponent(document.head.innerHTML)}\`); // Function to recursively decode and replace innerHTML of span.markdown-embed elements function decodeAndReplaceEmbed(element) { // Replace the innerHTML with the decoded content - element.innerHTML = decodeURIComponent(element.innerHTML); + element.innerHTML = decodeURIComponent(element.innerHTML); // Check if the new content contains further span.markdown-embed elements - const newEmbeds = element.querySelectorAll("span.markdown-embed"); - newEmbeds.forEach(decodeAndReplaceEmbed); + const newEmbeds = element.querySelectorAll("span.markdown-embed"); + newEmbeds.forEach(decodeAndReplaceEmbed); } // Start the process with all span.markdown-embed elements in the document document.querySelectorAll("span.markdown-embed").forEach(decodeAndReplaceEmbed); - document.body.setAttribute("class", \`${document.body.getAttribute("class")}\`) - document.body.setAttribute("style", \`${document.body.getAttribute("style")}\`) + document.body.setAttribute("class", \`${document.body.getAttribute(`class`)}\`) + document.body.setAttribute("style", \`${document.body.getAttribute(`style`)}\`) document.body.addClass("theme-light"); document.body.removeClass("theme-dark"); - document.title = \`${doc.title}\`; - `; - } - /** - * append webview - * @param e HTMLDivElement - * @param render Rerender or not - */ - async appendWebview(e, doc) { - const webview = createWebview(this.scale); - const preview = e.appendChild(webview); - this.webviews.push(preview); - this.preview = preview; - preview.addEventListener("dom-ready", async (e2) => { - this.completed = true; - getAllStyles().forEach(async (css) => { - await preview.insertCSS(css); - }); - if (this.config.cssSnippet && this.config.cssSnippet != "0") { - try { - const cssSnippet = await fs2.readFile(this.config.cssSnippet, { encoding: "utf8" }); - const printCss = cssSnippet.replaceAll(/@media print\s*{([^}]+)}/g, "$1"); - await preview.insertCSS(printCss); - await preview.insertCSS(cssSnippet); - } catch (error2) { - console.warn(error2); + document.title = \`${e.title}\`; + `}function wo(e,t=2e3,n=200){return new Promise((r,i)=>{let a,o=new MutationObserver(e=>{clearTimeout(a),a=setTimeout(()=>{o.disconnect(),r(!0)},n)});o.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),setTimeout(()=>{o.disconnect(),i(Error(`timeout ${t}ms`))},t)})}async function To(e,t){let n=e.win.electron.ipcRenderer;return new Promise(e=>{n.once(`print-to-pdf`,(t,n)=>{e(n)}),n.send(`print-to-pdf`,t)})}function Eo(e){let t=[];for(let[n,r]of Object.entries(e))(n.toLowerCase()==`cssclass`||n.toLowerCase()==`cssclasses`)&&(Array.isArray(r)?t.push(...r):t.push(r));return t}if(typeof window<`u`){var Do,Oo;((Do=(Oo=window).__svelte??(Oo.__svelte={})).v??(Do.v=new Set)).add(`5`)}function ko(e){e.setAttribute(`style`,`width: 100px;`)}function Ao(e){e.setAttribute(`style`,`margin: 0 auto; width: -webkit-fill-available;`)}function jo(e,t){let n=t.settingEl;for(e.classList.add(...Array.from(n.classList));n.firstChild;)e.appendChild(n.firstChild);n.remove()}var Mo=(e,t)=>{let n=new l.Setting(e).setName(t.name);return t.desc&&n.setDesc(t.desc),n.addToggle(e=>{t.tooltip&&e.setTooltip(t.tooltip),e.setValue(t.value).onChange(t.onChange)}),jo(e,n),{destroy(){e.empty()}}},No=(e,t)=>{let n=new l.Setting(e).setName(t.name);return t.desc&&n.setDesc(t.desc),n.addDropdown(e=>{e.addOptions(t.options).setValue(t.value).onChange(t.onChange)}),jo(e,n),{destroy(){e.empty()}}},Po=(e,t)=>(jo(e,new l.Setting(e).setName(t.name).addSlider(e=>{e.setLimits(t.limits[0],t.limits[1],t.limits[2]).setValue(t.value).onChange(n=>{t.onChange(n),e.showTooltip()})})),{destroy(){e.empty()}}),Fo=(e,t)=>{let n=new l.Setting(e).setHeading().addButton(e=>{e.setButtonText(t.text).onClick(t.onClick),t.cta&&e.setCta(),Ao(e.buttonEl)});return t.hidden&&(e.hidden=!0),jo(e,n),{destroy(){e.empty()}}},Io=(e,t)=>(jo(e,new l.Setting(e).setName(t.name).addText(e=>{ko(e.inputEl),e.setPlaceholder(t.input1.placeholder).setValue(t.input1.value);let n=t.input1.isDebounce?(0,l.debounce)(t.input1.onChange,500,!0):t.input1.onChange;e.onChange(n)}).addText(e=>{ko(e.inputEl),e.setPlaceholder(t.input2.placeholder).setValue(t.input2.value);let n=t.input2.isDebounce?(0,l.debounce)(t.input2.onChange,500,!0):t.input2.onChange;e.onChange(n)})),{destroy(){e.empty()}}),Lo=(e,t)=>(t&&(0,l.setIcon)(e,t),{update(t){e.innerHTML=``,(0,l.setIcon)(e,t)}});function Ro(e,t){let n=t=>{e.innerHTML=``;let n=t.cloneNode(!0);n.style.display=`block`,e.appendChild(n)};return n(t),{update:n,destroy(){e.innerHTML=``}}}function zo(e,t){let n=t=>{e.innerHTML=``,t&&(t.style.width=`100%`,e.appendChild(t))};return n(t),{update:n}}var Bo=Wi(`
`),Vo=Wi(`
`,1),Ho=Wi(`
`);function Uo(e,t){$e(t,!0);let n=Ua(t,`config`,15),r=tn(()=>t.plugin.i18n),i=tn(()=>t.plugin.settings),a=tn(()=>n().pageSize===`Custom`),o=tn(()=>n().marginType===`3`),s=Object.fromEntries([`A0`,`A1`,`A2`,`A3`,`A4`,`A5`,`A6`,`Legal`,`Letter`,`Tabloid`,`Ledger`,`Custom`].map(e=>[e,e])),c={0:`None`,1:`Default`,2:`Small`,3:`Custom`},l=tn(()=>t.modal.cssSnippets()),u=tn(()=>Object.keys(H(l)).length>0&&H(i).enabledCss),d=tn(()=>({0:`Not select`,...H(l)}));function f(e){e.key===`Enter`&&t.handleExport()}var p=Ho(),m=xr(p);va(m,(e,t)=>Mo?.(e,t),()=>({name:H(r).exportDialog.filenameAsTitle,tooltip:`Include file name as title`,value:n().showTitle,onChange:e=>{n(n().showTitle=e,!0),t.pdfPreview?.toggleTitle(e)}}));var h=Cr(m,2);va(h,(e,t)=>No?.(e,t),()=>({name:H(r).exportDialog.pageSize,options:s,value:n().pageSize,onChange:async e=>{n(n().pageSize=e,!0),await t.pdfPreview?.handleChangeSize?.()}}));var g=Cr(h,2),_=e=>{var r=Bo();va(r,(e,t)=>Io?.(e,t),()=>({name:`Width/Height`,input1:{placeholder:`width`,value:n().pageWidth??``,isDebounce:!0,onChange:async e=>{n(n().pageWidth=e,!0),await t.pdfPreview?.handleChangeSize?.()}},input2:{placeholder:`height`,value:n().pageHeight??``,onChange:e=>{n(n().pageHeight=e,!0)}}})),Gi(e,r)};oa(g,e=>{H(a)&&e(_)});var v=Cr(g,2);va(v,(e,t)=>No?.(e,t),()=>({name:H(r).exportDialog.margin,desc:`The unit is millimeters.`,options:c,value:n().marginType,onChange:e=>{n(n().marginType=e,!0)}}));var y=Cr(v,2),b=e=>{var t=Vo(),r=Sr(t);va(r,(e,t)=>Io?.(e,t),()=>({name:`Top/Bottom`,input1:{placeholder:`margin top`,value:n().marginTop??``,onChange:e=>{n(n().marginTop=e,!0)}},input2:{placeholder:`margin bottom`,value:n().marginBottom??``,onChange:e=>{n(n().marginBottom=e,!0)}}})),va(Cr(r,2),(e,t)=>Io?.(e,t),()=>({name:`Left/Right`,input1:{placeholder:`margin left`,value:n().marginLeft??``,onChange:e=>{n(n().marginLeft=e,!0)}},input2:{placeholder:`margin right`,value:n().marginRight??``,onChange:e=>{n(n().marginRight=e,!0)}}})),Gi(e,t)};oa(y,e=>{H(o)&&e(b)});var x=Cr(y,2);va(x,(e,t)=>Po?.(e,t),()=>({name:H(r).exportDialog.downscalePercent,limits:[0,200,1],value:n().scale,onChange:e=>{n(n().scale=e,!0)}}));var S=Cr(x,2);va(S,(e,t)=>Mo?.(e,t),()=>({name:H(r).exportDialog.landscape,tooltip:`landscape`,value:n().landscape,onChange:e=>{n(n().landscape=e,!0)}}));var C=Cr(S,2);va(C,(e,t)=>Mo?.(e,t),()=>({name:H(r).exportDialog.displayHeader,tooltip:`Display header`,value:n().displayHeader,onChange:e=>{n(n().displayHeader=e,!0)}}));var w=Cr(C,2);va(w,(e,t)=>Mo?.(e,t),()=>({name:H(r).exportDialog.displayFooter,tooltip:`Display footer`,value:n().displayFooter,onChange:e=>{n(n().displayFooter=e,!0)}}));var T=Cr(w,2);va(T,(e,t)=>Mo?.(e,t),()=>({name:H(r).exportDialog.openAfterExport,tooltip:`Open the exported file after exporting.`,value:n().open,onChange:e=>{n(n().open=e,!0)}}));var E=Cr(T,2),D=e=>{var i=Bo();va(i,(e,t)=>No?.(e,t),()=>({name:H(r).exportDialog.cssSnippets,options:H(d),value:n().cssSnippet??`0`,onChange:async e=>{n(n().cssSnippet=e,!0),await t.pdfPreview?.renderPreview(!1)}})),Gi(e,i)};oa(E,e=>{H(u)&&H(i).version==`1`&&e(D)});var O=Cr(E,2);va(O,(e,t)=>Fo?.(e,t),()=>({text:`Export`,cta:!0,onClick:()=>t.handleExport()}));var k=Cr(O,2),ee=e=>{var n=Bo();va(n,(e,t)=>Fo?.(e,t),()=>({text:`Refresh`,onClick:()=>t.refreshPreview()})),Gi(e,n)};oa(k,e=>{H(i).version==`1`&&e(ee)}),va(Cr(k,2),(e,t)=>Fo?.(e,t),()=>({text:`Debug`,hidden:!H(i)?.debug,onClick:()=>t.pdfPreview?.handleOpenDevTools()})),ze(p),Ii(`keyup`,p,f),Gi(e,p),et()}Li([`keyup`]);var Wo=function(e,t){return Wo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Wo(e,t)};function U(e,t){Wo(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Go=function(){return Go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]>2],t+=Xo[(e[r]&3)<<4|e[r+1]>>4],t+=Xo[(e[r+1]&15)<<2|e[r+2]>>6],t+=Xo[e[r+2]&63];return n%3==2?t=t.substring(0,t.length-1)+`=`:n%3==1&&(t=t.substring(0,t.length-2)+`==`),t},es=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=new Uint8Array(t);for(r=0;r>4,l[i++]=(o&15)<<4|s>>2,l[i++]=(s&3)<<6|c&63;return l},ts=/^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i,ns=function(e){var t=e.trim(),n=t.substring(0,100).match(ts);if(!n)return es(t);var r=n[0];return es(t.substring(r.length))},rs=function(e){return e.charCodeAt(0)},is=function(e){return e.codePointAt(0)},as=function(e,t){return ls(e.toString(16),t,`0`).toUpperCase()},os=function(e){return as(e,2)},ss=function(e){return String.fromCharCode(e)},cs=function(e){return ss(parseInt(e,16))},ls=function(e,t,n){for(var r=``,i=0,a=t-e.length;i=55296&&n<=56319&&e.length>i&&(r=e.charCodeAt(i),r>=56320&&r<=57343&&(a=2)),[e.slice(t,t+a),a]},vs=function(e){for(var t=[],n=0,r=e.length;nn&&l(),o+=f,s+=p}}return l(),c},xs=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,Ss=function(e){var t=e.match(xs);if(t){var n=t[1],r=t[2],i=r===void 0?`01`:r,a=t[3],o=a===void 0?`01`:a,s=t[4],c=s===void 0?`00`:s,l=t[5],u=l===void 0?`00`:l,d=t[6],f=d===void 0?`00`:d,p=t[7],m=p===void 0?`Z`:p,h=t[8],g=h===void 0?`00`:h,_=t[9],v=_===void 0?`00`:_,y=m===`Z`?`Z`:``+m+g+`:`+v;return new Date(n+`-`+i+`-`+o+`T`+c+`:`+u+`:`+f+y)}},Cs=function(e,t){for(var n=0,r;n=0&&e<=65535},Bs=function(e){return e>=65536&&e<=1114111},Vs=function(e){return Math.floor((e-65536)/1024)+55296},Hs=function(e){return(e-65536)%1024+56320},Us;(function(e){e.BigEndian=`BigEndian`,e.LittleEndian=`LittleEndian`})(Us||(Us={}));for(var Ws=`�`.codePointAt(0),Gs=function(e,t){if(t===void 0&&(t=!0),e.length<=1)return String.fromCodePoint(Ws);for(var n=t?Ys(e):Us.BigEndian,r=t?2:0,i=[];e.length-r>=2;){var a=Js(e[r++],e[r++],n);if(Ks(a))if(e.length-r<2)i.push(Ws);else{var o=Js(e[r++],e[r++],n);qs(o)?i.push(a,o):i.push(Ws)}else qs(a)?(r+=2,i.push(Ws)):i.push(a)}return r=55296&&e<=56319},qs=function(e){return e>=56320&&e<=57343},Js=function(e,t,n){if(n===Us.LittleEndian)return t<<8|e;if(n===Us.BigEndian)return e<<8|t;throw Error(`Invalid byteOrder: `+n)},Ys=function(e){return Xs(e)?Us.BigEndian:Zs(e)?Us.LittleEndian:Us.BigEndian},Xs=function(e){return e[0]===254&&e[1]===255},Zs=function(e){return e[0]===255&&e[1]===254},Qs=function(e){return Xs(e)||Zs(e)},$s=function(e){var t=String(e);if(Math.abs(e)<1){var n=parseInt(e.toString().split(`e-`)[1]);if(n){var r=e<0;r&&(e*=-1),e*=10**(n-1),t=`0.`+Array(n).join(`0`)+e.toString().substring(2),r&&(t=`-`+t)}}else{var n=parseInt(e.toString().split(`+`)[1]);n>20&&(n-=20,e/=10**n,t=e.toString()+Array(n+1).join(`0`))}return t},ec=function(e){return Math.ceil(e.toString(2).length/8)},tc=function(e){for(var t=new Uint8Array(ec(e)),n=1;n<=t.length;n++)t[n-1]=e>>(t.length-n)*8;return t},nc=function(e){throw Error(e)},rc=o((e=>{var t=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!=`object`)throw TypeError(r+`must be non-object`);for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray){e.set(t.subarray(n,n+r),i);return}for(var a=0;a{var t=rc(),n=4,r=0,i=1,a=2;function o(e){for(var t=e.length;--t>=0;)e[t]=0}var s=0,c=1,l=2,u=3,d=258,f=29,p=256,m=p+1+f,h=30,g=19,_=2*m+1,v=15,y=16,b=7,x=256,S=16,C=17,w=18,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],E=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=512,ee=Array((m+2)*2);o(ee);var A=Array(h*2);o(A);var j=Array(k);o(j);var te=Array(d-u+1);o(te);var ne=Array(f);o(ne);var re=Array(h);o(re);function ie(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var ae,oe,se;function ce(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function le(e){return e<256?j[e]:j[256+(e>>>7)]}function ue(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function M(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function fe(e){e.bi_valid===16?(ue(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function pe(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=v;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<_;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}}function me(e,t,n){var r=Array(v+1),i=0,a,o;for(a=1;a<=v;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=de(r[s]++,s))}}function he(){var e,t,n,r,i,a=Array(v+1);for(n=0,r=0;r>=7;r8?ue(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ve(e,n,r,i){_e(e),i&&(ue(e,r),ue(e,~r)),t.arraySet(e.pending_buf,e.window,n,r,e.pending),e.pending+=r}function P(e,t,n,r){var i=t*2,a=n*2;return e[i]>1;o>=1;o--)ye(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ye(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,ye(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],pe(e,t),me(n,c,e.bl_count)}function F(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s=3&&e.bl_tree[O[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Ce(e,t,n,r){var i;for(M(e,t-257,5),M(e,n-1,5),M(e,r-4,4),i=0;i>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return r;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return i;for(n=32;n0?(e.strm.data_type===a&&(e.strm.data_type=L(e)),xe(e,e.l_desc),xe(e,e.d_desc),u=I(e),o=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=o&&(o=s)):o=s=r+5,r+4<=o&&t!==-1?Te(e,t,r,i):e.strategy===n||s===o?(M(e,(c<<1)+ +!!i,3),be(e,ee,A)):(M(e,(l<<1)+ +!!i,3),Ce(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),be(e,e.dyn_ltree,e.dyn_dtree)),ge(e),i&&_e(e)}function z(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(te[n]+p+1)*2]++,e.dyn_dtree[le(t)*2]++),e.last_lit===e.lit_bufsize-1}e._tr_init=we,e._tr_stored_block=Te,e._tr_flush_block=De,e._tr_tally=z,e._tr_align=Ee})),ac=o(((e,t)=>{function n(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}t.exports=n})),oc=o(((e,t)=>{function n(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var r=n();function i(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[(e^t[s])&255];return e^-1}t.exports=i})),sc=o(((e,t)=>{t.exports={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`}})),cc=o((e=>{var t=rc(),n=ic(),r=ac(),i=oc(),a=sc(),o=0,s=1,c=3,l=4,u=5,d=0,f=1,p=-2,m=-3,h=-5,g=-1,_=1,v=2,y=3,b=4,x=0,S=2,C=8,w=9,T=15,E=8,D=286,O=30,k=19,ee=2*D+1,A=15,j=3,te=258,ne=te+j+1,re=32,ie=42,ae=69,oe=73,se=91,ce=103,le=113,ue=666,M=1,N=2,de=3,fe=4,pe=3;function me(e,t){return e.msg=a[t],t}function he(e){return(e<<1)-(e>4?9:0)}function ge(e){for(var t=e.length;--t>=0;)e[t]=0}function _e(e){var n=e.state,r=n.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(t.arraySet(e.output,n.pending_buf,n.pending_out,r,e.next_out),e.next_out+=r,n.pending_out+=r,e.total_out+=r,e.avail_out-=r,n.pending-=r,n.pending===0&&(n.pending_out=0))}function ve(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_e(e.strm)}function P(e,t){e.pending_buf[e.pending++]=t}function ye(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function be(e,n,a,o){var s=e.avail_in;return s>o&&(s=o),s===0?0:(e.avail_in-=s,t.arraySet(n,e.input,e.next_in,s,a),e.state.wrap===1?e.adler=r(e.adler,n,s,a):e.state.wrap===2&&(e.adler=i(e.adler,n,s,a)),e.next_in+=s,e.total_in+=s,s)}function xe(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-ne?e.strstart-(e.w_size-ne):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+te,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&ro){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function F(e){var n=e.w_size,r,i,a,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-ne)){t.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,i=e.hash_size,r=i;do a=e.head[--r],e.head[r]=a>=n?a-n:0;while(--i);i=n,r=i;do a=e.prev[--r],e.prev[r]=a>=n?a-n:0;while(--i);o+=n}if(e.strm.avail_in===0)break;if(i=be(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=i,e.lookahead+e.insert>=j)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(F(e),e.lookahead===0&&t===o)return M;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,ve(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-ne&&(ve(e,!1),e.strm.avail_out===0))return M}return e.insert=0,t===l?(ve(e,!0),e.strm.avail_out===0?de:fe):(e.strstart>e.block_start&&(ve(e,!1),e.strm.avail_out),M)}function I(e,t){for(var r,i;;){if(e.lookahead=j&&(e.ins_h=(e.ins_h<=j)if(i=n._tr_tally(e,e.strstart-e.match_start,e.match_length-j),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=j){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=j&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=j-1)),e.prev_length>=j&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-j,i=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-j),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<=j&&e.strstart>0&&(a=e.strstart-1,i=c[a],i===c[++a]&&i===c[++a]&&i===c[++a])){s=e.strstart+te;do;while(i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=j?(r=n._tr_tally(e,1,e.match_length-j),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ve(e,!1),e.strm.avail_out===0))return M}return e.insert=0,t===l?(ve(e,!0),e.strm.avail_out===0?de:fe):e.last_lit&&(ve(e,!1),e.strm.avail_out===0)?M:N}function R(e,t){for(var r;;){if(e.lookahead===0&&(F(e),e.lookahead===0)){if(t===o)return M;break}if(e.match_length=0,r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ve(e,!1),e.strm.avail_out===0))return M}return e.insert=0,t===l?(ve(e,!0),e.strm.avail_out===0?de:fe):e.last_lit&&(ve(e,!1),e.strm.avail_out===0)?M:N}function we(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Te=[new we(0,0,0,0,Se),new we(4,4,8,4,I),new we(4,5,16,8,I),new we(4,6,32,32,I),new we(4,4,16,16,Ce),new we(8,16,32,32,Ce),new we(8,16,128,128,Ce),new we(8,32,128,256,Ce),new we(32,128,258,1024,Ce),new we(32,258,258,4096,Ce)];function Ee(e){e.window_size=2*e.w_size,ge(e.head),e.max_lazy_match=Te[e.level].max_lazy,e.good_match=Te[e.level].good_length,e.nice_match=Te[e.level].nice_length,e.max_chain_length=Te[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=j-1,e.match_available=0,e.ins_h=0}function De(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=C,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(ee*2),this.dyn_dtree=new t.Buf16((2*O+1)*2),this.bl_tree=new t.Buf16((2*k+1)*2),ge(this.dyn_ltree),ge(this.dyn_dtree),ge(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(A+1),this.heap=new t.Buf16(2*D+1),ge(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*D+1),ge(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function z(e){var t;return!e||!e.state?me(e,p):(e.total_in=e.total_out=0,e.data_type=S,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ie:le,e.adler=t.wrap===2?0:1,t.last_flush=o,n._tr_init(t),d)}function Oe(e){var t=z(e);return t===d&&Ee(e.state),t}function ke(e,t){return!e||!e.state||e.state.wrap!==2?p:(e.state.gzhead=t,d)}function Ae(e,n,r,i,a,o){if(!e)return p;var s=1;if(n===g&&(n=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>w||r!==C||i<8||i>15||n<0||n>9||o<0||o>b)return me(e,p);i===8&&(i=9);var c=new De;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=i,c.w_size=1<u||t<0)return e?me(e,p):p;if(a=e.state,!e.output||!e.input&&e.avail_in!==0||a.status===ue&&t!==l)return me(e,e.avail_out===0?h:p);if(a.strm=e,r=a.last_flush,a.last_flush=t,a.status===ie)if(a.wrap===2)e.adler=0,P(a,31),P(a,139),P(a,8),a.gzhead?(P(a,+!!a.gzhead.text+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),P(a,a.gzhead.time&255),P(a,a.gzhead.time>>8&255),P(a,a.gzhead.time>>16&255),P(a,a.gzhead.time>>24&255),P(a,a.level===9?2:a.strategy>=v||a.level<2?4:0),P(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&(P(a,a.gzhead.extra.length&255),P(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=i(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=ae):(P(a,0),P(a,0),P(a,0),P(a,0),P(a,0),P(a,a.level===9?2:a.strategy>=v||a.level<2?4:0),P(a,pe),a.status=le);else{var _=C+(a.w_bits-8<<4)<<8,b=-1;b=a.strategy>=v||a.level<2?0:a.level<6?1:a.level===6?2:3,_|=b<<6,a.strstart!==0&&(_|=re),_+=31-_%31,a.status=le,ye(a,_),a.strstart!==0&&(ye(a,e.adler>>>16),ye(a,e.adler&65535)),e.adler=1}if(a.status===ae)if(a.gzhead.extra){for(m=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),_e(e),m=a.pending,a.pending===a.pending_buf_size));)P(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=oe)}else a.status=oe;if(a.status===oe)if(a.gzhead.name){m=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),_e(e),m=a.pending,a.pending===a.pending_buf_size)){g=1;break}g=a.gzindexm&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),g===0&&(a.gzindex=0,a.status=se)}else a.status=se;if(a.status===se)if(a.gzhead.comment){m=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),_e(e),m=a.pending,a.pending===a.pending_buf_size)){g=1;break}g=a.gzindexm&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),g===0&&(a.status=ce)}else a.status=ce;if(a.status===ce&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&_e(e),a.pending+2<=a.pending_buf_size&&(P(a,e.adler&255),P(a,e.adler>>8&255),e.adler=0,a.status=le)):a.status=le),a.pending!==0){if(_e(e),e.avail_out===0)return a.last_flush=-1,d}else if(e.avail_in===0&&he(t)<=he(r)&&t!==l)return me(e,h);if(a.status===ue&&e.avail_in!==0)return me(e,h);if(e.avail_in!==0||a.lookahead!==0||t!==o&&a.status!==ue){var x=a.strategy===v?R(a,t):a.strategy===y?L(a,t):Te[a.level].func(a,t);if((x===de||x===fe)&&(a.status=ue),x===M||x===de)return e.avail_out===0&&(a.last_flush=-1),d;if(x===N&&(t===s?n._tr_align(a):t!==u&&(n._tr_stored_block(a,0,0,!1),t===c&&(ge(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),_e(e),e.avail_out===0))return a.last_flush=-1,d}return t===l?a.wrap<=0?f:(a.wrap===2?(P(a,e.adler&255),P(a,e.adler>>8&255),P(a,e.adler>>16&255),P(a,e.adler>>24&255),P(a,e.total_in&255),P(a,e.total_in>>8&255),P(a,e.total_in>>16&255),P(a,e.total_in>>24&255)):(ye(a,e.adler>>>16),ye(a,e.adler&65535)),_e(e),a.wrap>0&&(a.wrap=-a.wrap),a.pending===0?f:d):d}function Ne(e){var t;return!e||!e.state?p:(t=e.state.status,t!==ie&&t!==ae&&t!==oe&&t!==se&&t!==ce&&t!==le&&t!==ue?me(e,p):(e.state=null,t===le?me(e,m):d))}function Pe(e,n){var i=n.length,a,o,s,c,l,u,f,m;if(!e||!e.state||(a=e.state,c=a.wrap,c===2||c===1&&a.status!==ie||a.lookahead))return p;for(c===1&&(e.adler=r(e.adler,n,i,0)),a.wrap=0,i>=a.w_size&&(c===0&&(ge(a.head),a.strstart=0,a.block_start=0,a.insert=0),m=new t.Buf8(a.w_size),t.arraySet(m,n,i-a.w_size,a.w_size,0),n=m,i=a.w_size),l=e.avail_in,u=e.next_in,f=e.input,e.avail_in=i,e.next_in=0,e.input=n,F(a);a.lookahead>=j;){o=a.strstart,s=a.lookahead-(j-1);do a.ins_h=(a.ins_h<{var t=rc(),n=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var i=new t.Buf8(256),a=0;a<256;a++)i[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;i[254]=i[254]=1,e.string2buf=function(e){var n,r,i,a,o,s=e.length,c=0;for(a=0;a>>6,n[o++]=128|r&63):r<65536?(n[o++]=224|r>>>12,n[o++]=128|r>>>6&63,n[o++]=128|r&63):(n[o++]=240|r>>>18,n[o++]=128|r>>>12&63,n[o++]=128|r>>>6&63,n[o++]=128|r&63);return n};function o(e,i){if(i<65534&&(e.subarray&&r||!e.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(e,i));for(var a=``,o=0;o4){l[r++]=65533,n+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&n1){l[r++]=65533;continue}a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|a&1023)}return o(l,r)},e.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+i[e[n]]>t?n:t}})),uc=o(((e,t)=>{function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}t.exports=n})),dc=o((e=>{var t=cc(),n=rc(),r=lc(),i=sc(),a=uc(),o=Object.prototype.toString,s=0,c=4,l=0,u=1,d=2,f=-1,p=0,m=8;function h(e){if(!(this instanceof h))return new h(e);this.options=n.assign({level:f,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:``},e||{});var s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var c=t.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(c!==l)throw Error(i[c]);if(s.header&&t.deflateSetHeader(this.strm,s.header),s.dictionary){var u=typeof s.dictionary==`string`?r.string2buf(s.dictionary):o.call(s.dictionary)===`[object ArrayBuffer]`?new Uint8Array(s.dictionary):s.dictionary;if(c=t.deflateSetDictionary(this.strm,u),c!==l)throw Error(i[c]);this._dict_set=!0}}h.prototype.push=function(e,i){var a=this.strm,f=this.options.chunkSize,p,m;if(this.ended)return!1;m=i===~~i?i:i===!0?c:s,typeof e==`string`?a.input=r.string2buf(e):o.call(e)===`[object ArrayBuffer]`?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new n.Buf8(f),a.next_out=0,a.avail_out=f),p=t.deflate(a,m),p!==u&&p!==l)return this.onEnd(p),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(m===c||m===d))&&(this.options.to===`string`?this.onData(r.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&p!==u);return m===c?(p=t.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l):m===d?(this.onEnd(l),a.avail_out=0,!0):!0},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===l&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function g(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg||i[n.err];return n.result}function _(e,t){return t=t||{},t.raw=!0,g(e,t)}function v(e,t){return t=t||{},t.gzip=!0,g(e,t)}e.Deflate=h,e.deflate=g,e.deflateRaw=_,e.gzip=v})),fc=o(((e,t)=>{var n=30,r=12;t.exports=function(e,t){var i=e.state,a=e.next_in,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D=e.input,O;o=a+(e.avail_in-5),s=e.next_out,O=e.output,c=s-(t-e.avail_out),l=s+(e.avail_out-257),u=i.dmax,d=i.wsize,f=i.whave,p=i.wnext,m=i.window,h=i.hold,g=i.bits,_=i.lencode,v=i.distcode,y=(1<>>24,h>>>=S,g-=S,S=x>>>16&255,S===0)O[s++]=x&65535;else if(S&16){C=x&65535,S&=15,S&&(g>>=S,g-=S),g<15&&(h+=D[a++]<>>24,h>>>=S,g-=S,S=x>>>16&255,S&16){if(w=x&65535,S&=15,gu){e.msg=`invalid distance too far back`,i.mode=n;break top}if(h>>>=S,g-=S,S=s-c,w>S){if(S=w-S,S>f&&i.sane){e.msg=`invalid distance too far back`,i.mode=n;break top}if(T=0,E=m,p===0){if(T+=d-S,S2;)O[s++]=E[T++],O[s++]=E[T++],O[s++]=E[T++],C-=3;C&&(O[s++]=E[T++],C>1&&(O[s++]=E[T++]))}else{T=s-w;do O[s++]=O[T++],O[s++]=O[T++],O[s++]=O[T++],C-=3;while(C>2);C&&(O[s++]=O[T++],C>1&&(O[s++]=O[T++]))}}else if(S&64){e.msg=`invalid distance code`,i.mode=n;break top}else{x=v[(x&65535)+(h&(1<>3,a-=C,g-=C<<3,h&=(1<{var n=rc(),r=15,i=852,a=592,o=0,s=1,c=2,l=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],u=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],f=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,p,m,h,g,_,v){var y=v.bits,b=0,x=0,S=0,C=0,w=0,T=0,E=0,D=0,O=0,k=0,ee,A,j,te,ne,re=null,ie=0,ae,oe=new n.Buf16(r+1),se=new n.Buf16(r+1),ce=null,le=0,ue,M,N;for(b=0;b<=r;b++)oe[b]=0;for(x=0;x=1&&oe[C]===0;C--);if(w>C&&(w=C),C===0)return h[g++]=20971520,h[g++]=20971520,v.bits=1,0;for(S=1;S0&&(e===o||C!==1))return-1;for(se[1]=0,b=1;bi||e===c&&O>a)return 1;for(;;){ue=b-E,_[x]ae?(M=ce[le+_[x]],N=re[ie+_[x]]):(M=96,N=0),ee=1<>E)+A]=ue<<24|M<<16|N|0;while(A!==0);for(ee=1<>=1;if(ee===0?k=0:(k&=ee-1,k+=ee),x++,--oe[b]===0){if(b===C)break;b=t[p+_[x]]}if(b>w&&(k&te)!==j){for(E===0&&(E=w),ne+=S,T=b-E,D=1<i||e===c&&O>a)return 1;j=k&te,h[j]=w<<24|T<<16|ne-g|0}}return k!==0&&(h[ne+k]=b-E<<24|4194304),v.bits=w,0}})),mc=o((e=>{var t=rc(),n=ac(),r=oc(),i=fc(),a=pc(),o=0,s=1,c=2,l=4,u=5,d=6,f=0,p=1,m=2,h=-2,g=-3,_=-4,v=-5,y=8,b=1,x=2,S=3,C=4,w=5,T=6,E=7,D=8,O=9,k=10,ee=11,A=12,j=13,te=14,ne=15,re=16,ie=17,ae=18,oe=19,se=20,ce=21,le=22,ue=23,M=24,N=25,de=26,fe=27,pe=28,me=29,he=30,ge=31,_e=32,ve=852,P=592,ye=15;function be(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function xe(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function F(e){var n;return!e||!e.state?h:(n=e.state,e.total_in=e.total_out=n.total=0,e.msg=``,n.wrap&&(e.adler=n.wrap&1),n.mode=b,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new t.Buf32(ve),n.distcode=n.distdyn=new t.Buf32(P),n.sane=1,n.back=-1,f)}function Se(e){var t;return!e||!e.state?h:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,F(e))}function I(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?h:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Se(e))}function Ce(e,t){var n,r;return e?(r=new xe,e.state=r,r.window=null,n=I(e,t),n!==f&&(e.state=null),n):h}function L(e){return Ce(e,ye)}var R=!0,we,Te;function Ee(e){if(R){var n;for(we=new t.Buf32(512),Te=new t.Buf32(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(a(s,e.lens,0,288,we,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;a(c,e.lens,0,32,Te,0,e.work,{bits:5}),R=!1}e.lencode=we,e.lenbits=9,e.distcode=Te,e.distbits=5}function De(e,n,r,i){var a,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(t.arraySet(o.window,n,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>i&&(a=i),t.arraySet(o.window,n,r-i,a,o.wnext),i-=a,i?(t.arraySet(o.window,n,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,P.check=r(P.check,ze,2,0),L=0,R=0,P.mode=x;break}if(P.flags=0,P.head&&(P.head.done=!1),!(P.wrap&1)||(((L&255)<<8)+(L>>8))%31){e.msg=`incorrect header check`,P.mode=he;break}if((L&15)!==y){e.msg=`unknown compression method`,P.mode=he;break}if(L>>>=4,R-=4,Le=(L&15)+8,P.wbits===0)P.wbits=Le;else if(Le>P.wbits){e.msg=`invalid window size`,P.mode=he;break}P.dmax=1<>8&1),P.flags&512&&(ze[0]=L&255,ze[1]=L>>>8&255,P.check=r(P.check,ze,2,0)),L=0,R=0,P.mode=S;case S:for(;R<32;){if(I===0)break inf_leave;I--,L+=ye[F++]<>>8&255,ze[2]=L>>>16&255,ze[3]=L>>>24&255,P.check=r(P.check,ze,4,0)),L=0,R=0,P.mode=C;case C:for(;R<16;){if(I===0)break inf_leave;I--,L+=ye[F++]<>8),P.flags&512&&(ze[0]=L&255,ze[1]=L>>>8&255,P.check=r(P.check,ze,2,0)),L=0,R=0,P.mode=w;case w:if(P.flags&1024){for(;R<16;){if(I===0)break inf_leave;I--,L+=ye[F++]<>>8&255,P.check=r(P.check,ze,2,0)),L=0,R=0}else P.head&&(P.head.extra=null);P.mode=T;case T:if(P.flags&1024&&(z=P.length,z>I&&(z=I),z&&(P.head&&(Le=P.head.extra_len-P.length,P.head.extra||(P.head.extra=Array(P.head.extra_len)),t.arraySet(P.head.extra,ye,F,z,Le)),P.flags&512&&(P.check=r(P.check,ye,z,F)),I-=z,F+=z,P.length-=z),P.length))break inf_leave;P.length=0,P.mode=E;case E:if(P.flags&2048){if(I===0)break inf_leave;z=0;do Le=ye[F+ z++],P.head&&Le&&P.length<65536&&(P.head.name+=String.fromCharCode(Le));while(Le&&z>9&1,P.head.done=!0),e.adler=P.check=0,P.mode=A;break;case k:for(;R<32;){if(I===0)break inf_leave;I--,L+=ye[F++]<>>=R&7,R-=R&7,P.mode=fe;break}for(;R<3;){if(I===0)break inf_leave;I--,L+=ye[F++]<>>=1,--R,L&3){case 0:P.mode=te;break;case 1:if(Ee(P),P.mode=se,ve===d){L>>>=2,R-=2;break inf_leave}break;case 2:P.mode=ie;break;case 3:e.msg=`invalid block type`,P.mode=he}L>>>=2,R-=2;break;case te:for(L>>>=R&7,R-=R&7;R<32;){if(I===0)break inf_leave;I--,L+=ye[F++]<>>16^65535)){e.msg=`invalid stored block lengths`,P.mode=he;break}if(P.length=L&65535,L=0,R=0,P.mode=ne,ve===d)break inf_leave;case ne:P.mode=re;case re:if(z=P.length,z){if(z>I&&(z=I),z>Ce&&(z=Ce),z===0)break inf_leave;t.arraySet(xe,ye,F,z,Se),I-=z,F+=z,Ce-=z,Se+=z,P.length-=z;break}P.mode=A;break;case ie:for(;R<14;){if(I===0)break inf_leave;I--,L+=ye[F++]<>>=5,R-=5,P.ndist=(L&31)+1,L>>>=5,R-=5,P.ncode=(L&15)+4,L>>>=4,R-=4,P.nlen>286||P.ndist>30){e.msg=`too many length or distance symbols`,P.mode=he;break}P.have=0,P.mode=ae;case ae:for(;P.have>>=3,R-=3}for(;P.have<19;)P.lens[He[P.have++]]=0;if(P.lencode=P.lendyn,P.lenbits=7,Be={bits:P.lenbits},Re=a(o,P.lens,0,19,P.lencode,0,P.work,Be),P.lenbits=Be.bits,Re){e.msg=`invalid code lengths set`,P.mode=he;break}P.have=0,P.mode=oe;case oe:for(;P.have>>24,Me=Ae>>>16&255,Ne=Ae&65535,!(je<=R);){if(I===0)break inf_leave;I--,L+=ye[F++]<>>=je,R-=je,P.lens[P.have++]=Ne;else{if(Ne===16){for(Ve=je+2;R>>=je,R-=je,P.have===0){e.msg=`invalid bit length repeat`,P.mode=he;break}Le=P.lens[P.have-1],z=3+(L&3),L>>>=2,R-=2}else if(Ne===17){for(Ve=je+3;R>>=je,R-=je,Le=0,z=3+(L&7),L>>>=3,R-=3}else{for(Ve=je+7;R>>=je,R-=je,Le=0,z=11+(L&127),L>>>=7,R-=7}if(P.have+z>P.nlen+P.ndist){e.msg=`invalid bit length repeat`,P.mode=he;break}for(;z--;)P.lens[P.have++]=Le}}if(P.mode===he)break;if(P.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,P.mode=he;break}if(P.lenbits=9,Be={bits:P.lenbits},Re=a(s,P.lens,0,P.nlen,P.lencode,0,P.work,Be),P.lenbits=Be.bits,Re){e.msg=`invalid literal/lengths set`,P.mode=he;break}if(P.distbits=6,P.distcode=P.distdyn,Be={bits:P.distbits},Re=a(c,P.lens,P.nlen,P.ndist,P.distcode,0,P.work,Be),P.distbits=Be.bits,Re){e.msg=`invalid distances set`,P.mode=he;break}if(P.mode=se,ve===d)break inf_leave;case se:P.mode=ce;case ce:if(I>=6&&Ce>=258){e.next_out=Se,e.avail_out=Ce,e.next_in=F,e.avail_in=I,P.hold=L,P.bits=R,i(e,Te),Se=e.next_out,xe=e.output,Ce=e.avail_out,F=e.next_in,ye=e.input,I=e.avail_in,L=P.hold,R=P.bits,P.mode===A&&(P.back=-1);break}for(P.back=0;Ae=P.lencode[L&(1<>>24,Me=Ae>>>16&255,Ne=Ae&65535,!(je<=R);){if(I===0)break inf_leave;I--,L+=ye[F++]<>Pe)],je=Ae>>>24,Me=Ae>>>16&255,Ne=Ae&65535,!(Pe+je<=R);){if(I===0)break inf_leave;I--,L+=ye[F++]<>>=Pe,R-=Pe,P.back+=Pe}if(L>>>=je,R-=je,P.back+=je,P.length=Ne,Me===0){P.mode=de;break}if(Me&32){P.back=-1,P.mode=A;break}if(Me&64){e.msg=`invalid literal/length code`,P.mode=he;break}P.extra=Me&15,P.mode=le;case le:if(P.extra){for(Ve=P.extra;R>>=P.extra,R-=P.extra,P.back+=P.extra}P.was=P.length,P.mode=ue;case ue:for(;Ae=P.distcode[L&(1<>>24,Me=Ae>>>16&255,Ne=Ae&65535,!(je<=R);){if(I===0)break inf_leave;I--,L+=ye[F++]<>Pe)],je=Ae>>>24,Me=Ae>>>16&255,Ne=Ae&65535,!(Pe+je<=R);){if(I===0)break inf_leave;I--,L+=ye[F++]<>>=Pe,R-=Pe,P.back+=Pe}if(L>>>=je,R-=je,P.back+=je,Me&64){e.msg=`invalid distance code`,P.mode=he;break}P.offset=Ne,P.extra=Me&15,P.mode=M;case M:if(P.extra){for(Ve=P.extra;R>>=P.extra,R-=P.extra,P.back+=P.extra}if(P.offset>P.dmax){e.msg=`invalid distance too far back`,P.mode=he;break}P.mode=N;case N:if(Ce===0)break inf_leave;if(z=Te-Ce,P.offset>z){if(z=P.offset-z,z>P.whave&&P.sane){e.msg=`invalid distance too far back`,P.mode=he;break}z>P.wnext?(z-=P.wnext,Oe=P.wsize-z):Oe=P.wnext-z,z>P.length&&(z=P.length),ke=P.window}else ke=xe,Oe=Se-P.offset,z=P.length;z>Ce&&(z=Ce),Ce-=z,P.length-=z;do xe[Se++]=ke[Oe++];while(--z);P.length===0&&(P.mode=ce);break;case de:if(Ce===0)break inf_leave;xe[Se++]=P.length,Ce--,P.mode=ce;break;case fe:if(P.wrap){for(;R<32;){if(I===0)break inf_leave;I--,L|=ye[F++]<{t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}})),gc=o(((e,t)=>{function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}t.exports=n})),_c=o((e=>{var t=mc(),n=rc(),r=lc(),i=hc(),a=sc(),o=uc(),s=gc(),c=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=n.assign({chunkSize:16384,windowBits:0,to:``},e||{});var u=this.options;u.raw&&u.windowBits>=0&&u.windowBits<16&&(u.windowBits=-u.windowBits,u.windowBits===0&&(u.windowBits=-15)),u.windowBits>=0&&u.windowBits<16&&!(e&&e.windowBits)&&(u.windowBits+=32),u.windowBits>15&&u.windowBits<48&&(u.windowBits&15||(u.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var d=t.inflateInit2(this.strm,u.windowBits);if(d!==i.Z_OK||(this.header=new s,t.inflateGetHeader(this.strm,this.header),u.dictionary&&(typeof u.dictionary==`string`?u.dictionary=r.string2buf(u.dictionary):c.call(u.dictionary)===`[object ArrayBuffer]`&&(u.dictionary=new Uint8Array(u.dictionary)),u.raw&&(d=t.inflateSetDictionary(this.strm,u.dictionary),d!==i.Z_OK))))throw Error(a[d])}l.prototype.push=function(e,a){var o=this.strm,s=this.options.chunkSize,l=this.options.dictionary,u,d,f,p,m,h=!1;if(this.ended)return!1;d=a===~~a?a:a===!0?i.Z_FINISH:i.Z_NO_FLUSH,typeof e==`string`?o.input=r.binstring2buf(e):c.call(e)===`[object ArrayBuffer]`?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(o.avail_out===0&&(o.output=new n.Buf8(s),o.next_out=0,o.avail_out=s),u=t.inflate(o,i.Z_NO_FLUSH),u===i.Z_NEED_DICT&&l&&(u=t.inflateSetDictionary(this.strm,l)),u===i.Z_BUF_ERROR&&h===!0&&(u=i.Z_OK,h=!1),u!==i.Z_STREAM_END&&u!==i.Z_OK)return this.onEnd(u),this.ended=!0,!1;o.next_out&&(o.avail_out===0||u===i.Z_STREAM_END||o.avail_in===0&&(d===i.Z_FINISH||d===i.Z_SYNC_FLUSH))&&(this.options.to===`string`?(f=r.utf8border(o.output,o.next_out),p=o.next_out-f,m=r.buf2string(o.output,f),o.next_out=p,o.avail_out=s-p,p&&n.arraySet(o.output,o.output,f,p,0),this.onData(m)):this.onData(n.shrinkBuf(o.output,o.next_out))),o.avail_in===0&&o.avail_out===0&&(h=!0)}while((o.avail_in>0||o.avail_out===0)&&u!==i.Z_STREAM_END);return u===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(u=t.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===i.Z_OK):d===i.Z_SYNC_FLUSH?(this.onEnd(i.Z_OK),o.avail_out=0,!0):!0},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===i.Z_OK&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function u(e,t){var n=new l(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}function d(e,t){return t=t||{},t.raw=!0,u(e,t)}e.Inflate=l,e.inflate=u,e.inflateRaw=d,e.ungzip=u})),vc=c(o(((e,t)=>{var n=rc().assign,r=dc(),i=_c(),a=hc(),o={};n(o,r,i,a),t.exports=o}))()),yc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,bc=new Uint8Array(256),xc=0;xc>4,l[i++]=(o&15)<<4|s>>2,l[i++]=(s&3)<<6|c&63;return l},Cc=function(e){for(var t=``,n=0;nr)throw Error(Rc(t)+` must be at least `+n+` and at most `+r+`, but was actually `+e)},Xc=function(e,t,n,r){W(e,t,[`number`,`undefined`]),typeof e==`number`&&Yc(e,t,n,r)},Zc=function(e,t,n){if(W(e,t,[`number`]),e%n!==0)throw Error(Rc(t)+` must be a multiple of `+n+`, but was actually `+e)},Qc=function(e,t){if(!Number.isInteger(e))throw Error(Rc(t)+` must be an integer, but was actually `+e)},$c=function(e,t){if(![1,0].includes(Math.sign(e)))throw Error(Rc(t)+` must be a positive number or 0, but was actually `+e)},el=new Uint16Array(256),tl=0;tl<256;tl++)el[tl]=tl;el[22]=rs(``),el[24]=rs(`˘`),el[25]=rs(`ˇ`),el[26]=rs(`ˆ`),el[27]=rs(`˙`),el[28]=rs(`˝`),el[29]=rs(`˛`),el[30]=rs(`˚`),el[31]=rs(`˜`),el[127]=rs(`�`),el[128]=rs(`•`),el[129]=rs(`†`),el[130]=rs(`‡`),el[131]=rs(`…`),el[132]=rs(`—`),el[133]=rs(`–`),el[134]=rs(`ƒ`),el[135]=rs(`⁄`),el[136]=rs(`‹`),el[137]=rs(`›`),el[138]=rs(`−`),el[139]=rs(`‰`),el[140]=rs(`„`),el[141]=rs(`“`),el[142]=rs(`”`),el[143]=rs(`‘`),el[144]=rs(`’`),el[145]=rs(`‚`),el[146]=rs(`™`),el[147]=rs(`fi`),el[148]=rs(`fl`),el[149]=rs(`Ł`),el[150]=rs(`Œ`),el[151]=rs(`Š`),el[152]=rs(`Ÿ`),el[153]=rs(`Ž`),el[154]=rs(`ı`),el[155]=rs(`ł`),el[156]=rs(`œ`),el[157]=rs(`š`),el[158]=rs(`ž`),el[159]=rs(`�`),el[160]=rs(`€`),el[173]=rs(`�`);var nl=function(e){for(var t=Array(e.length),n=0,r=e.length;n=K.ExclamationPoint&&e<=K.Tilde&&!zl[e]},Wl={},Gl=new Map,J=function(e){U(t,e);function t(t,n){var r=this;if(t!==Wl)throw new al(`PDFName`);r=e.call(this)||this;for(var i=`/`,a=0,o=n.length;a=K.Zero&&s<=K.Nine||s>=K.a&&s<=K.f||s>=K.A&&s<=K.F?(t+=o,(t.length===2||!(c>=`0`&&c<=`9`||c>=`a`&&c<=`f`||c>=`A`&&c<=`F`))&&(r(parseInt(t,16)),t=``)):r(s):s===K.Hash?n=!0:r(s)}return new Uint8Array(e)},t.prototype.decodeText=function(){var e=this.asBytes();return String.fromCharCode.apply(String,Array.from(e))},t.prototype.asString=function(){return this.encodedName},t.prototype.value=function(){return this.encodedName},t.prototype.clone=function(){return this},t.prototype.toString=function(){return this.encodedName},t.prototype.sizeInBytes=function(){return this.encodedName.length},t.prototype.copyBytesInto=function(e,t){return t+=us(this.encodedName,e,t),this.encodedName.length},t.of=function(e){var n=Hl(e),r=Gl.get(n);return r||(r=new t(Wl,n),Gl.set(n,r)),r},t.Length=t.of(`Length`),t.FlateDecode=t.of(`FlateDecode`),t.Resources=t.of(`Resources`),t.Font=t.of(`Font`),t.XObject=t.of(`XObject`),t.ExtGState=t.of(`ExtGState`),t.Contents=t.of(`Contents`),t.Type=t.of(`Type`),t.Parent=t.of(`Parent`),t.MediaBox=t.of(`MediaBox`),t.Page=t.of(`Page`),t.Annots=t.of(`Annots`),t.TrimBox=t.of(`TrimBox`),t.ArtBox=t.of(`ArtBox`),t.BleedBox=t.of(`BleedBox`),t.CropBox=t.of(`CropBox`),t.Rotate=t.of(`Rotate`),t.Title=t.of(`Title`),t.Author=t.of(`Author`),t.Subject=t.of(`Subject`),t.Creator=t.of(`Creator`),t.Keywords=t.of(`Keywords`),t.Producer=t.of(`Producer`),t.CreationDate=t.of(`CreationDate`),t.ModDate=t.of(`ModDate`),t}(Nl),Kl=new(function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.asNull=function(){return null},t.prototype.clone=function(){return this},t.prototype.toString=function(){return`null`},t.prototype.sizeInBytes=function(){return 4},t.prototype.copyBytesInto=function(e,t){return e[t++]=K.n,e[t++]=K.u,e[t++]=K.l,e[t++]=K.l,4},t}(Nl)),ql=function(e){U(t,e);function t(t,n){var r=e.call(this)||this;return r.dict=t,r.context=n,r}return t.prototype.keys=function(){return Array.from(this.dict.keys())},t.prototype.values=function(){return Array.from(this.dict.values())},t.prototype.entries=function(){return Array.from(this.dict.entries())},t.prototype.set=function(e,t){this.dict.set(e,t)},t.prototype.get=function(e,t){t===void 0&&(t=!1);var n=this.dict.get(e);if(!(n===Kl&&!t))return n},t.prototype.has=function(e){var t=this.dict.get(e);return t!==void 0&&t!==Kl},t.prototype.lookupMaybe=function(e){for(var t,n=[],r=1;r>`,e},t.prototype.sizeInBytes=function(){for(var e=5,t=this.entries(),n=0,r=t.length;nthis.largestObjectNumber&&(this.largestObjectNumber=e.objectNumber)},e.prototype.nextRef=function(){return this.largestObjectNumber+=1,Ql.of(this.largestObjectNumber)},e.prototype.register=function(e){var t=this.nextRef();return this.assign(t,e),t},e.prototype.delete=function(e){return this.indirectObjects.delete(e)},e.prototype.lookupMaybe=function(e){for(var t=[],n=1;n1?(this.subsections.push([e]),this.chunkIdx+=1,this.chunkLength=1):(t.push(e),this.chunkLength+=1)},e.create=function(){return new e({ref:Ql.of(0,65535),offset:0,deleted:!0})},e.createEmpty=function(){return new e},e}(),uu=function(){function e(e){this.lastXRefOffset=String(e)}return e.prototype.toString=function(){return`startxref +`+this.lastXRefOffset+` +%%EOF`},e.prototype.sizeInBytes=function(){return 16+this.lastXRefOffset.length},e.prototype.copyBytesInto=function(e,t){var n=t;return e[t++]=K.s,e[t++]=K.t,e[t++]=K.a,e[t++]=K.r,e[t++]=K.t,e[t++]=K.x,e[t++]=K.r,e[t++]=K.e,e[t++]=K.f,e[t++]=K.Newline,t+=us(this.lastXRefOffset,e,t),e[t++]=K.Newline,e[t++]=K.Percent,e[t++]=K.Percent,e[t++]=K.E,e[t++]=K.O,e[t++]=K.F,t-n},e.forLastCrossRefSectionOffset=function(t){return new e(t)},e}(),du=function(){function e(e){this.dict=e}return e.prototype.toString=function(){return`trailer +`+this.dict.toString()},e.prototype.sizeInBytes=function(){return 8+this.dict.sizeInBytes()},e.prototype.copyBytesInto=function(e,t){var n=t;return e[t++]=K.t,e[t++]=K.r,e[t++]=K.a,e[t++]=K.i,e[t++]=K.l,e[t++]=K.e,e[t++]=K.r,e[t++]=K.Newline,t+=this.dict.copyBytesInto(e,t),t-n},e.of=function(t){return new e(t)},e}(),fu=function(e){U(t,e);function t(t,n,r){r===void 0&&(r=!0);var i=e.call(this,t.obj({}),r)||this;return i.objects=n,i.offsets=i.computeObjectOffsets(),i.offsetsString=i.computeOffsetsString(),i.dict.set(J.of(`Type`),J.of(`ObjStm`)),i.dict.set(J.of(`N`),q.of(i.objects.length)),i.dict.set(J.of(`First`),q.of(i.offsetsString.length)),i}return t.prototype.getObjectsCount=function(){return this.objects.length},t.prototype.clone=function(e){return t.withContextAndObjects(e||this.dict.context,this.objects.slice(),this.encode)},t.prototype.getContentsString=function(){for(var e=this.offsetsString,t=0,n=this.objects.length;t1&&(e.push(t),e.push(a.ref.objectNumber),t=0),t+=1}return e.push(t),e},i.computeEntryTuples=function(){for(var e=Array(i.entries.length),t=0,n=i.entries.length;tt[0]&&(t[0]=l),u>t[1]&&(t[1]=u),d>t[2]&&(t[2]=d)}return t},i.entries=n||[],i.entryTuplesCache=rl.populatedBy(i.computeEntryTuples),i.maxByteWidthsCache=rl.populatedBy(i.computeMaxEntryByteWidths),i.indexCache=rl.populatedBy(i.computeIndex),t.set(J.of(`Type`),J.of(`XRef`)),i}return t.prototype.addDeletedEntry=function(e,t){var n=hu.Deleted;this.entries.push({type:n,ref:e,nextFreeObjectNumber:t}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},t.prototype.addUncompressedEntry=function(e,t){var n=hu.Uncompressed;this.entries.push({type:n,ref:e,offset:t}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},t.prototype.addCompressedEntry=function(e,t,n){var r=hu.Compressed;this.entries.push({type:r,ref:e,objectStreamRef:t,index:n}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},t.prototype.clone=function(e){var n=this,r=n.dict,i=n.entries,a=n.encode;return t.of(r.clone(e),i.slice(),a)},t.prototype.getContentsString=function(){for(var e=this.entryTuplesCache.access(),t=this.maxByteWidthsCache.access(),n=``,r=0,i=e.length;r=0;f--)n+=(l[f]||0).toString(2);for(var f=t[1]-1;f>=0;f--)n+=(u[f]||0).toString(2);for(var f=t[2]-1;f>=0;f--)n+=(d[f]||0).toString(2)}return n},t.prototype.getUnencodedContents=function(){for(var e=this.entryTuplesCache.access(),t=this.maxByteWidthsCache.access(),n=new Uint8Array(this.getUnencodedContentsSize()),r=0,i=0,a=e.length;i=0;p--)n[r++]=u[p]||0;for(var p=t[1]-1;p>=0;p--)n[r++]=d[p]||0;for(var p=t[2]-1;p>=0;p--)n[r++]=f[p]||0}return n},t.prototype.getUnencodedContentsSize=function(){return Ms(this.maxByteWidthsCache.access())*this.entries.length},t.prototype.updateDict=function(){e.prototype.updateDict.call(this);var t=this.maxByteWidthsCache.access(),n=this.indexCache.access(),r=this.dict.context;this.dict.set(J.of(`W`),r.obj(t)),this.dict.set(J.of(`Index`),r.obj(n))},t.create=function(e,n){n===void 0&&(n=!0);var r=new t(e,[],n);return r.addDeletedEntry(Ql.of(0,65535),0),r},t.of=function(e,n,r){return r===void 0&&(r=!0),new t(e,n,r)},t}(nu),_u=function(e){U(t,e);function t(t,n,r,i){var a=e.call(this,t,n)||this;return a.encodeStreams=r,a.objectsPerStream=i,a}return t.prototype.computeBufferSize=function(){return qo(this,void 0,void 0,function(){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,c,l,m,d,g,_,v,y;return Jo(this,function(b){switch(b.label){case 0:e=this.context.largestObjectNumber+1,t=Ml.forVersion(1,7),n=t.sizeInBytes()+2,r=gu.create(this.createTrailerDict(),this.encodeStreams),i=[],a=[],o=[],s=this.context.enumerateIndirectObjects(),c=0,l=s.length,b.label=1;case 1:return c`},t.prototype.sizeInBytes=function(){return this.value.length+2},t.prototype.copyBytesInto=function(e,t){return e[t++]=K.LessThan,t+=us(this.value,e,t),e[t++]=K.GreaterThan,this.value.length+2},t.of=function(e){return new t(e)},t.fromText=function(e){for(var n=Rs(e),r=``,i=0,a=n.length;i> def +/CMapName /Adobe-Identity-UCS def +/CMapType 2 def +1 begincodespacerange +<0000> +endcodespacerange +`+e.length+` beginbfchar +`+e.map(function(e){var t=e[0],n=e[1];return t+` `+n}).join(` +`)+` +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end`},xu=function(){for(var e=[],t=0;t`},Su=function(e){return as(e,4)},Cu=function(e){if(zs(e))return Su(e);if(Bs(e)){var t=Vs(e),n=Hs(e);return``+Su(t)+Su(n)}var r=`0x`+os(e)+` is not a valid UTF-8 or UTF-16 codepoint.`;throw Error(r)},wu=function(e){var t=0,n=function(e){t|=1<=K.Zero&&s<=K.Seven?(t+=o,(t.length===3||!(c>=`0`&&c<=`7`))&&(r(parseInt(t,8)),t=``)):r(s):s===K.BackSlash?n=!0:r(s)}return new Uint8Array(e)},t.prototype.decodeText=function(){var e=this.asBytes();return Qs(e)?Gs(e):nl(e)},t.prototype.decodeDate=function(){var e=this.decodeText(),t=Ss(e);if(!t)throw new pl(e);return t},t.prototype.asString=function(){return this.value},t.prototype.clone=function(){return t.of(this.value)},t.prototype.toString=function(){return`(`+this.value+`)`},t.prototype.sizeInBytes=function(){return this.value.length+2},t.prototype.copyBytesInto=function(e,t){return e[t++]=K.LeftParen,t+=us(this.value,e,t),e[t++]=K.RightParen,this.value.length+2},t.of=function(e){return new t(e)},t.fromDate=function(e){var n=ls(String(e.getUTCFullYear()),4,`0`),r=ls(String(e.getUTCMonth()+1),2,`0`),i=ls(String(e.getUTCDate()),2,`0`),a=ls(String(e.getUTCHours()),2,`0`),o=ls(String(e.getUTCMinutes()),2,`0`),s=ls(String(e.getUTCSeconds()),2,`0`);return new t(`D:`+n+r+i+a+o+s+`Z`)},t}(Nl),Du=function(){function e(e,t,n,r){var i=this;this.allGlyphsInFontSortedById=function(){for(var e=Array(i.font.characterSet.length),t=0,n=e.length;t>3)]>>7-((p&7)<<0)&1,D=3*E;s[y]=b[D],s[y+1]=b[D+1],s[y+2]=b[D+2],s[y+3]=E>2)]>>6-((p&3)<<1)&3,D=3*E;s[y]=b[D],s[y+1]=b[D+1],s[y+2]=b[D+2],s[y+3]=E>1)]>>4-((p&1)<<2)&15,D=3*E;s[y]=b[D],s[y+1]=b[D+1],s[y+2]=b[D+2],s[y+3]=E>>3)]>>>7-(j&7)&1),te=k==g*255?0:255;c[A+j]=te<<24|k<<16|k<<8|k}else if(u==2)for(var j=0;j>>2)]>>>6-((j&3)<<1)&3),te=k==g*85?0:255;c[A+j]=te<<24|k<<16|k<<8|k}else if(u==4)for(var j=0;j>>1)]>>>4-((j&1)<<2)&15),te=k==g*17?0:255;c[A+j]=te<<24|k<<16|k<<8|k}else if(u==8)for(var j=0;j>>2<<3));i==0;){if(i=g(t,f,1),a=g(t,f+1,2),f+=3,a==0){f&7&&(f+=8-(f&7));var w=(f>>>3)+4,T=t[w-4]|t[w-3]<<8;C&&(n=e.H.W(n,d+T)),n.set(new r(t.buffer,t.byteOffset+w,T),d),f=w+T<<3,d+=T;continue}if(C&&(n=e.H.W(n,d+(1<<17))),a==1&&(p=S.J,m=S.h,l=511,u=31),a==2){o=_(t,f,5)+257,s=_(t,f+5,5)+1,c=_(t,f+10,4)+4,f+=14;for(var E=1,D=0;D<38;D+=2)S.Q[D]=0,S.Q[D+1]=0;for(var D=0;DE&&(E=O)}f+=3*c,y(S.Q,E),b(S.Q,E,S.u),p=S.w,m=S.d,f=v(S.u,(1<>>4;if(!(j>>>8))n[d++]=j;else if(j==256)break;else{var te=d+j-254;if(j>264){var ne=S.q[j-257];te=d+(ne>>>3)+_(t,f,ne&7),f+=ne&7}var re=m[x(t,f)&u];f+=re&15;var ie=re>>>4,ae=S.c[ie],oe=(ae>>>4)+g(t,f,ae&15);for(f+=ae&15;d>>4;if(d<=15)o[l]=d,l++;else{var f=0,p=0;d==16?(p=3+s(i,a,2),a+=2,f=o[l-1]):d==17?(p=3+s(i,a,3),a+=3):d==18&&(p=11+s(i,a,7),a+=7);for(var m=l+p;l>>1;ai&&(i=s),a++}for(;a>1,c=t[o+1],l=s<<4|c,u=n-c,d=t[o]<>>15-n;r[p]=l,d++}},e.H.l=function(t,n){for(var r=e.H.m.r,i=15-n,a=0;a>>i},e.H.M=function(e,t,n){n<<=t&7;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},e.H.I=function(e,t,n){n<<=t&7;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[(t>>>3)+1]<<8)>>>(t&7)&(1<>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)&(1<>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)},e.H.i=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16|e[(t>>>3)+3]<<24)>>>(t&7)},e.H.m=function(){var e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),(function(){for(var t=e.H.m,n=32768,r=0;r>>1|(i&1431655765)<<1,i=(i&3435973836)>>>2|(i&858993459)<<2,i=(i&4042322160)>>>4|(i&252645135)<<4,i=(i&4278255360)>>>8|(i&16711935)<<8,t.r[r]=(i>>>16|i<<16)>>>17}function a(e,t,n){for(;t--!=0;)e.push(0,n)}for(var r=0;r<32;r++)t.q[r]=t.S[r]<<3|t.T[r],t.c[r]=t.p[r]<<4|t.z[r];a(t._,144,8),a(t._,112,9),a(t._,24,7),a(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),a(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),a(t.Q,19,0),a(t.C,286,0),a(t.D,30,0),a(t.v,320,0)})(),e.H.N}(),X.decode._readInterlace=function(e,t){for(var n=t.width,r=t.height,i=X.decode._getBPP(t),a=i>>3,o=Math.ceil(n*i/8),s=new Uint8Array(r*o),c=0,l=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],f=[8,8,4,4,2,2,1],p=0;p<7;){for(var m=d[p],h=f[p],g=0,_=0,v=l[p];v>3];T=T>>7-(w&7)&1,s[S*o+(C>>3)]|=T<<7-((C&7)<<0)}if(i==2){var T=e[w>>3];T=T>>6-(w&7)&3,s[S*o+(C>>2)]|=T<<6-((C&3)<<1)}if(i==4){var T=e[w>>3];T=T>>4-(w&7)&15,s[S*o+(C>>1)]|=T<<4-((C&1)<<2)}if(i>=8)for(var E=S*o+C*a,D=0;D>3)+D];w+=i,C+=h}x++,S+=m}g*_!=0&&(c+=_*(1+b)),p+=1}return s},X.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},X.decode._filterZero=function(e,t,n,r,i){var a=X.decode._getBPP(t),o=Math.ceil(r*a/8),s=X.decode._paeth;a=Math.ceil(a/8);var c=0,l=1,u=e[n],d=0;if(u>1&&(e[n]=[0,0,1][u-2]),u==3)for(d=a;d>>1)&255;for(var f=0;f>>1);for(;d>>1)}else{for(;d>8&255,e[t+1]=n&255},readUint:function(e,t){return e[t]*(256*256*256)+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=n&255},readASCII:function(e,t,n){for(var r=``,i=0;i=0&&s>=0?(d=p*t+m<<2,f=(s+p)*i+o+m<<2):(d=(-s+p)*t-o+m<<2,f=p*i+m<<2),c==0)r[f]=e[d],r[f+1]=e[d+1],r[f+2]=e[d+2],r[f+3]=e[d+3];else if(c==1){var h=e[d+3]*(1/255),g=e[d]*h,_=e[d+1]*h,v=e[d+2]*h,y=r[f+3]*(1/255),b=r[f]*y,x=r[f+1]*y,S=r[f+2]*y,C=1-h,w=h+y*C,T=w==0?0:1/w;r[f+3]=255*w,r[f+0]=(g+b*C)*T,r[f+1]=(_+x*C)*T,r[f+2]=(v+S*C)*T}else if(c==2){var h=e[d+3],g=e[d],_=e[d+1],v=e[d+2],y=r[f+3],b=r[f],x=r[f+1],S=r[f+2];h==y&&g==b&&_==x&&v==S?(r[f]=0,r[f+1]=0,r[f+2]=0,r[f+3]=0):(r[f]=g,r[f+1]=_,r[f+2]=v,r[f+3]=h)}else if(c==3){var h=e[d+3],g=e[d],_=e[d+1],v=e[d+2],y=r[f+3],b=r[f],x=r[f+1],S=r[f+2];if(h==y&&g==b&&_==x&&v==S)continue;if(h<220&&y>20)return!1}return!0},X.encode=function(e,t,n,r,i,a,o){r??(r=0),o??(o=!1);var s=X.encode.compress(e,t,n,r,[!1,!1,!1,0,o]);return X.encode.compressPNG(s,-1),X.encode._main(s,t,n,i,a)},X.encodeLL=function(e,t,n,r,i,a,o,s){for(var c={ctype:0+(r==1?0:2)+(i==0?0:4),depth:a,frames:[]},l=(r+i)*a,u=l*t,d=0;d1,d=!1,f=33+(u?20:0);if(i.sRGB!=null&&(f+=13),i.pHYs!=null&&(f+=21),e.ctype==3){for(var p=e.plte.length,m=0;m>>24!=255&&(d=!0);f+=8+p*3+4+(d?8+p*1+4:0)}for(var h=0;h>>8&255,C=b>>>16&255;_[l+y+0]=x,_[l+y+1]=S,_[l+y+2]=C}if(l+=p*3,o(_,l,a(_,l-p*3-4,p*3+4)),l+=4,d){o(_,l,p),l+=4,c(_,l,`tRNS`),l+=4;for(var m=0;m>>24&255;l+=p,o(_,l,a(_,l-p-4,p+4)),l+=4}}for(var w=0,h=0;h>2,O>>2));for(var p=0;pA&&te==ee[g-A])j[g]=j[g-A];else{var ne=y[te];if(ne==null&&(y[te]=ne=b.length,b.push(te),b.length>=300))break;j[g]=ne}}}var re=b.length;re<=256&&l==0&&(d=re<=2?1:re<=4?2:re<=16?4:8,d=Math.max(d,c));for(var p=0;p>1)]|=le[M+N]<<4-(N&1)*4;else if(d==2)for(var N=0;N>2)]|=le[M+N]<<6-(N&3)*2;else if(d==1)for(var N=0;N>3)]|=le[M+N]<<7-(N&7)*1}ae=ce,u=3,se=1}else if(_==0&&v.length==1){for(var ce=new Uint8Array(A*ie*3),de=A*ie,g=0;gw&&(w=D),ET&&(T=E))}w==-1&&(S=C=w=T=0),i&&((S&1)==1&&S--,(C&1)==1&&C--);var k=(w-S+1)*(T-C+1);kg&&(g=b),x_&&(_=x))}g==-1&&(m=h=g=_=0),o&&((m&1)==1&&m--,(h&1)==1&&h--),a={x:m,y:h,width:g-m+1,height:_-h+1};var w=r[i];w.rect=a,w.blend=1,w.img=new Uint8Array(a.width*a.height*4),r[i-1].dispose==0?(X._copyTile(l,t,n,w.img,a.width,a.height,-a.x,-a.y,0),X.encode._prepareDiff(f,t,n,w.img,a)):X._copyTile(f,t,n,w.img,a.width,a.height,-a.x,-a.y,0)},X.encode._prepareDiff=function(e,t,n,r,i){X._copyTile(e,t,n,r,i.width,i.height,-i.x,-i.y,2)},X.encode._filterZero=function(e,t,n,r,i,a,o){var s=[],c=[0,1,2,3,4];a==-1?(t*r>5e5||n==1)&&(c=[0]):c=[a];var l;o&&(l={level:0});for(var u=o&&UZIP!=null?UZIP:vc.default,d=0;d>1)+256&255;if(a==4)for(var l=i;l>1)&255;for(var l=i;l>1)&255}if(a==4){for(var l=0;l>>1:n>>>=1;e[t]=n}return e})(),update:function(e,t,n,r){for(var i=0;i>>8;return e},crc:function(e,t,n){return X.crc.update(4294967295,e,t,n)^4294967295}},X.quantize=function(e,t){var n=new Uint8Array(e),r=n.slice(0),i=new Uint32Array(r.buffer),a=X.quantize.getKDtree(r,t),o=a[0],s=a[1];X.quantize.planeDst;for(var c=n,l=i,u=c.length,d=new Uint8Array(n.length>>2),f=0;f>2]=_.ind,l[f>>2]=_.est.rgba}return{abuf:r.buffer,inds:d,plte:s}},X.quantize.getKDtree=function(e,t,n){n??(n=1e-4);var r=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=X.quantize.stats(e,i.i0,i.i1),i.est=X.quantize.estats(i.bst);for(var a=[i];a.lengtho&&(o=a[c].est.L,s=c);if(o=u||l.i1<=u){l.est.L=0;continue}var d={i0:l.i0,i1:u,bst:null,est:null,tdst:0,left:null,right:null};d.bst=X.quantize.stats(e,d.i0,d.i1),d.est=X.quantize.estats(d.bst);var f={i0:u,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};f.bst={R:[],m:[],N:l.bst.N-d.bst.N};for(var c=0;c<16;c++)f.bst.R[c]=l.bst.R[c]-d.bst.R[c];for(var c=0;c<4;c++)f.bst.m[c]=l.bst.m[c]-d.bst.m[c];f.est=X.quantize.estats(f.bst),l.left=d,l.right=f,a[s]=d,a.push(f)}a.sort(function(e,t){return t.bst.N-e.bst.N});for(var c=0;c0&&(o=e.right,s=e.left);var c=X.quantize.getNearest(o,t,n,r,i);if(c.tdst<=a*a)return c;var l=X.quantize.getNearest(s,t,n,r,i);return l.tdsta;)r-=4;if(n>=r)break;var s=t[n>>2];t[n>>2]=t[r>>2],t[r>>2]=s,n+=4,r-=4}for(;o(e,n,i)>a;)n-=4;return n+4},X.quantize.vecDot=function(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]},X.quantize.stats=function(e,t,n){for(var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],a=n-t>>2,o=t;o>>0}},X.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}},X.encode.concatRGBA=function(e){for(var t=0,n=0;n1)throw Error(`Animated PNGs are not supported`);var r=Iu(new Uint8Array(n[0])),i=r.rgbChannel,a=r.alphaChannel;this.rgbChannel=i,a.some(function(e){return e<255})&&(this.alphaChannel=a),this.type=Fu(t.ctype),this.width=t.width,this.height=t.height,this.bitsPerComponent=8}return e.load=function(t){return new e(t)},e}(),zu=function(){function e(e){this.image=e,this.bitsPerComponent=e.bitsPerComponent,this.width=e.width,this.height=e.height,this.colorSpace=`DeviceRGB`}return e.for=function(t){return qo(this,void 0,void 0,function(){var n;return Jo(this,function(r){return n=Ru.load(t),[2,new e(n)]})})},e.prototype.embedIntoContext=function(e,t){return qo(this,void 0,void 0,function(){var n,r;return Jo(this,function(i){return n=this.embedAlphaChannel(e),r=e.flateStream(this.image.rgbChannel,{Type:`XObject`,Subtype:`Image`,BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:n}),t?(e.assign(t,r),[2,t]):[2,e.register(r)]})})},e.prototype.embedAlphaChannel=function(e){if(this.image.alphaChannel){var t=e.flateStream(this.image.alphaChannel,{Type:`XObject`,Subtype:`Image`,Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:`DeviceGray`,Decode:[0,1]});return e.register(t)}},e}(),Bu=function(){function e(e,t,n){this.bytes=e,this.start=t||0,this.pos=this.start,this.end=t&&n?t+n:this.bytes.length}return Object.defineProperty(e.prototype,`length`,{get:function(){return this.end-this.start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isEmpty`,{get:function(){return this.length===0},enumerable:!1,configurable:!0}),e.prototype.getByte=function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},e.prototype.getUint16=function(){var e=this.getByte(),t=this.getByte();return e===-1||t===-1?-1:(e<<8)+t},e.prototype.getInt32=function(){var e=this.getByte(),t=this.getByte(),n=this.getByte(),r=this.getByte();return(e<<24)+(t<<16)+(n<<8)+r},e.prototype.getBytes=function(e,t){t===void 0&&(t=!1);var n=this.bytes,r=this.pos,i=this.end;if(e){var a=r+e;a>i&&(a=i),this.pos=a;var o=n.subarray(r,a);return t?new Uint8ClampedArray(o):o}else{var o=n.subarray(r,i);return t?new Uint8ClampedArray(o):o}},e.prototype.peekByte=function(){var e=this.getByte();return this.pos--,e},e.prototype.peekBytes=function(e,t){t===void 0&&(t=!1);var n=this.getBytes(e,t);return this.pos-=n.length,n},e.prototype.skip=function(e){e||(e=1),this.pos+=e},e.prototype.reset=function(){this.pos=this.start},e.prototype.moveStart=function(){this.start=this.pos},e.prototype.makeSubStream=function(t,n){return new e(this.bytes,t,n)},e.prototype.decode=function(){return this.bytes},e}(),Vu=new Uint8Array,Hu=function(){function e(e){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=Vu,this.minBufferLength=512,e)for(;this.minBufferLengthi&&(n=i)}else{for(;!this.eof;)this.readBlock();n=this.bufferLength}this.pos=n;var a=this.buffer.subarray(r,n);return t&&!(a instanceof Uint8ClampedArray)?new Uint8ClampedArray(a):a},e.prototype.peekByte=function(){var e=this.getByte();return this.pos--,e},e.prototype.peekBytes=function(e,t){t===void 0&&(t=!1);var n=this.getBytes(e,t);return this.pos-=n.length,n},e.prototype.skip=function(e){e||(e=1),this.pos+=e},e.prototype.reset=function(){this.pos=0},e.prototype.makeSubStream=function(e,t){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Bu(this.buffer,e,t)},e.prototype.decode=function(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)},e.prototype.readBlock=function(){throw new il(this.constructor.name,`readBlock`)},e.prototype.ensureBuffer=function(e){var t=this.buffer;if(e<=t.byteLength)return t;for(var n=this.minBufferLength;n=0;--s)o[a+s]=l&255,l>>=8}},t}(Hu),Gu=function(e){U(t,e);function t(t,n){var r=e.call(this,n)||this;return r.stream=t,r.firstDigit=-1,n&&(n=.5*n),r}return t.prototype.readBlock=function(){var e=this.stream.getBytes(8e3);if(!e.length){this.eof=!0;return}for(var t=e.length+1>>1,n=this.ensureBuffer(this.bufferLength+t),r=this.bufferLength,i=this.firstDigit,a=0,o=e.length;a=48&&s<=57)c=s&15;else if(s>=65&&s<=70||s>=97&&s<=102)c=(s&15)+9;else if(s===62){this.eof=!0;break}else continue;i<0?i=c:(n[r++]=i<<4|c,i=-1)}i>=0&&this.eof&&(n[r++]=i<<4,i=-1),this.firstDigit=i,this.bufferLength=r},t}(Hu),Ku=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qu=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),Ju=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),Yu=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],Xu=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],Zu=function(e){U(t,e);function t(t,n){var r=e.call(this,n)||this;r.stream=t;var i=t.getByte(),a=t.getByte();if(i===-1||a===-1)throw Error(`Invalid header in flate stream: `+i+`, `+a);if((i&15)!=8)throw Error(`Unknown compression method in flate stream: `+i+`, `+a);if(((i<<8)+a)%31!=0)throw Error(`Bad FCHECK in flate stream: `+i+`, `+a);if(a&32)throw Error(`FDICT bit set in flate stream: `+i+`, `+a);return r.codeSize=0,r.codeBuf=0,r}return t.prototype.readBlock=function(){var e,t,n=this.stream,r=this.getBits(3);if(r&1&&(this.eof=!0),r>>=1,r===0){var i=void 0;if((i=n.getByte())===-1)throw Error(`Bad block header in flate stream`);var a=i;if((i=n.getByte())===-1||(a|=i<<8,(i=n.getByte())===-1))throw Error(`Bad block header in flate stream`);var o=i;if((i=n.getByte())===-1)throw Error(`Bad block header in flate stream`);if(o|=i<<8,o!==(~a&65535)&&(a!==0||o!==0))throw Error(`Bad uncompressed block length in flate stream`);this.codeBuf=0,this.codeSize=0;var s=this.bufferLength;e=this.ensureBuffer(s+a);var c=s+a;if(this.bufferLength=c,a===0)n.peekByte()===-1&&(this.eof=!0);else for(var l=s;l0;)y[g++]=S}u=this.generateHuffmanTable(y.subarray(0,f)),d=this.generateHuffmanTable(y.subarray(f,v))}else throw Error(`Unknown block type in flate stream`);e=this.buffer;for(var T=e?e.length:0,E=this.bufferLength;;){var D=this.getCode(u);if(D<256){E+1>=T&&(e=this.ensureBuffer(E+1),T=e.length),e[E++]=D;continue}if(D===256){this.bufferLength=E;return}D-=257,D=qu[D];var O=D>>16;O>0&&(O=this.getBits(O)),t=(D&65535)+O,D=this.getCode(d),D=Ju[D],O=D>>16,O>0&&(O=this.getBits(O));var k=(D&65535)+O;E+t>=T&&(e=this.ensureBuffer(E+t),T=e.length);for(var ee=0;ee>e,this.codeSize=n-=e,i},t.prototype.getCode=function(e){for(var t=this.stream,n=e[0],r=e[1],i=this.codeSize,a=this.codeBuf,o;i>16,l=s&65535;if(c<1||i>c,this.codeSize=i-c,l},t.prototype.generateHuffmanTable=function(e){var t=e.length,n=0,r;for(r=0;rn&&(n=e[r]);for(var i=1<>=1;for(r=u;r0;if(!y||y<256)m[0]=y,h=1;else if(y>=258)if(y=0;i--)m[i]=l[a],a=d[a];else m[h++]=m[0];else if(y===256){f=9,c=258,h=0;continue}else{this.eof=!0,delete this.lzwState;break}if(b&&(d[c]=p,u[c]=u[p]+1,l[c]=m[0],c++,f=c+s&c+s-1?f:Math.min(Math.log(c+s)/.6931471805599453+1,12)|0),p=y,g+=h,t>>t&(1<0){var i=this.stream.getBytes(r);t.set(i,n),n+=r}}else{r=257-r;var a=e[1];t=this.ensureBuffer(n+r+1);for(var o=0;ot.size())throw new gl(e,0,t.size());t.remove(e)}else{if(e!==0)throw new gl(e,0,0);this.setKids([])}},t.prototype.normalizedEntries=function(){var e=this.Kids();return e||(e=this.dict.context.obj([this.ref]),this.dict.set(J.of(`Kids`),e)),{Kids:e}},t.fromDict=function(e,n){return new t(e,n)},t}(fd),vd=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.Opt=function(){return this.dict.lookupMaybe(J.of(`Opt`),Eu,Y,Pl)},t.prototype.setOpt=function(e){this.dict.set(J.of(`Opt`),this.dict.context.obj(e))},t.prototype.getExportValues=function(){var e=this.Opt();if(e){if(e instanceof Eu||e instanceof Y)return[e];for(var t=[],n=0,r=e.size();nt.size())throw new gl(e,0,t.size());t.remove(e)}},t.prototype.normalizeExportValues=function(){for(var e=this.getExportValues()??[],t=[],n=this.getWidgets(),r=0,i=n.length;r1){if(!this.hasFlag(wd.MultiSelect))throw new vl;this.dict.set(J.of(`V`),this.dict.context.obj(e))}this.updateSelectedIndices(e)},t.prototype.valuesAreValid=function(e){for(var t=this.getOptions(),n=function(n,r){var i=e[n].decodeText();if(!t.find(function(e){return i===(e.display||e.value).decodeText()}))return{value:!1}},r=0,i=e.length;r1){for(var t=Array(e.length),n=this.getOptions(),r=function(r,i){var a=e[r].decodeText();t[r]=n.findIndex(function(e){return a===(e.display||e.value).decodeText()})},i=0,a=e.length;i0){var a=i.lookup(0,Eu,Y),o=i.lookupMaybe(1,Eu,Y);t.push({value:a,display:o||a})}}return t}return[]},t}(_d),Ed=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.fromDict=function(e,n){return new t(e,n)},t.create=function(e){var n=e.obj({FT:`Ch`,Ff:wd.Combo,Kids:[]});return new t(n,e.register(n))},t}(Td),Dd=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.addField=function(e){this.normalizedEntries().Kids?.push(e)},t.prototype.normalizedEntries=function(){var e=this.Kids();return e||(e=this.dict.context.obj([]),this.dict.set(J.of(`Kids`),e)),{Kids:e}},t.fromDict=function(e,n){return new t(e,n)},t.create=function(e){var n=e.obj({});return new t(n,e.register(n))},t}(fd),Od=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.fromDict=function(e,n){return new t(e,n)},t}(_d),kd=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.MaxLen=function(){var e=this.dict.lookup(J.of(`MaxLen`));if(e instanceof q)return e},t.prototype.Q=function(){var e=this.dict.lookup(J.of(`Q`));if(e instanceof q)return e},t.prototype.setMaxLength=function(e){this.dict.set(J.of(`MaxLen`),q.of(e))},t.prototype.removeMaxLength=function(){this.dict.delete(J.of(`MaxLen`))},t.prototype.getMaxLength=function(){return this.MaxLen()?.asNumber()},t.prototype.setQuadding=function(e){this.dict.set(J.of(`Q`),q.of(e))},t.prototype.getQuadding=function(){return this.Q()?.asNumber()},t.prototype.setValue=function(e){this.dict.set(J.of(`V`),e)},t.prototype.removeValue=function(){this.dict.delete(J.of(`V`))},t.prototype.getValue=function(){var e=this.V();if(e instanceof Eu||e instanceof Y)return e},t.fromDict=function(e,n){return new t(e,n)},t.create=function(e){var n=e.obj({FT:`Tx`,Kids:[]});return new t(n,e.register(n))},t}(_d),Ad=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.fromDict=function(e,n){return new t(e,n)},t.create=function(e){var n=e.obj({FT:`Btn`,Ff:Sd.PushButton,Kids:[]});return new t(n,e.register(n))},t}(vd),jd=function(e){U(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setValue=function(e){if(!this.getOnValues().includes(e)&&e!==J.of(`Off`))throw new _l;this.dict.set(J.of(`V`),e);for(var t=this.getWidgets(),n=0,r=t.length;ni)throw new ml(n,i);for(var a=n,o=0,s=r.size();oa)return l.insertLeafNode(e,a)||c;a-=l.Count().asNumber()}l instanceof su&&--a}if(a===0){this.insertLeafKid(r.size(),e);return}throw new hl(n,`insertLeafNode`)},t.prototype.removeLeafNode=function(e,n){n===void 0&&(n=!0);var r=this.Kids(),i=this.Count().asNumber();if(e>=i)throw new ml(e,i);for(var a=e,o=0,s=r.size();oa){l.removeLeafNode(a,n),n&&l.Kids().size()===0&&r.remove(o);return}else a-=l.Count().asNumber();if(l instanceof su)if(a===0){this.removeKid(o);return}else --a}throw new hl(e,`removeLeafNode`)},t.prototype.ascend=function(e){e(this);var t=this.Parent();t&&t.ascend(e)},t.prototype.traverse=function(e){for(var n=this.Kids(),r=0,i=n.size();r2**53-1)if(this.capNumbers){var r=`Parsed number that is too large for some PDF readers: `+e+`, using Number.MAX_SAFE_INTEGER instead.`;return console.warn(r),2**53-1}else{var r=`Parsed number that is too large for some PDF readers: `+e+`, not capping.`;console.warn(r)}return n},e.prototype.skipWhitespace=function(){for(;!this.bytes.done()&&Rl[this.bytes.peek()];)this.bytes.next()},e.prototype.skipLine=function(){for(;!this.bytes.done();){var e=this.bytes.peek();if(e===Xd||e===Zd)return;this.bytes.next()}},e.prototype.skipComment=function(){if(this.bytes.peek()!==K.Percent)return!1;for(;!this.bytes.done();){var e=this.bytes.peek();if(e===Xd||e===Zd)return!0;this.bytes.next()}return!0},e.prototype.skipWhitespaceAndComments=function(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()},e.prototype.matchKeyword=function(e){for(var t=this.bytes.offset(),n=0,r=e.length;n=this.length},e.prototype.offset=function(){return this.idx},e.prototype.slice=function(e,t){return this.bytes.slice(e,t)},e.prototype.position=function(){return{line:this.line,column:this.column,offset:this.idx}},e.of=function(t){return new e(t)},e.fromPDFRawStream=function(t){return e.of(td(t).decode())},e}(),ef=K.Space,tf=K.CarriageReturn,nf=K.Newline,rf=[K.s,K.t,K.r,K.e,K.a,K.m],af=[K.e,K.n,K.d,K.s,K.t,K.r,K.e,K.a,K.m],of={header:[K.Percent,K.P,K.D,K.F,K.Dash],eof:[K.Percent,K.Percent,K.E,K.O,K.F],obj:[K.o,K.b,K.j],endobj:[K.e,K.n,K.d,K.o,K.b,K.j],xref:[K.x,K.r,K.e,K.f],trailer:[K.t,K.r,K.a,K.i,K.l,K.e,K.r],startxref:[K.s,K.t,K.a,K.r,K.t,K.x,K.r,K.e,K.f],true:[K.t,K.r,K.u,K.e],false:[K.f,K.a,K.l,K.s,K.e],null:[K.n,K.u,K.l,K.l],stream:rf,streamEOF1:Yo(rf,[ef,tf,nf]),streamEOF2:Yo(rf,[tf,nf]),streamEOF3:Yo(rf,[tf]),streamEOF4:Yo(rf,[nf]),endstream:af,EOF1endstream:Yo([tf,nf],af),EOF2endstream:Yo([tf],af),EOF3endstream:Yo([nf],af)},sf=function(e){U(t,e);function t(t,n,r){r===void 0&&(r=!1);var i=e.call(this,t,r)||this;return i.context=n,i}return t.prototype.parseObject=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(of.true))return Il.True;if(this.matchKeyword(of.false))return Il.False;if(this.matchKeyword(of.null))return Kl;var e=this.bytes.peek();if(e===K.LessThan&&this.bytes.peekAhead(1)===K.LessThan)return this.parseDictOrStream();if(e===K.LessThan)return this.parseHexString();if(e===K.LeftParen)return this.parseString();if(e===K.ForwardSlash)return this.parseName();if(e===K.LeftSquareBracket)return this.parseArray();if(qd[e])return this.parseNumberOrRef();throw new wl(this.bytes.position(),e)},t.prototype.parseNumberOrRef=function(){var e=this.parseRawNumber();this.skipWhitespaceAndComments();var t=this.bytes.offset();if(Gd[this.bytes.peek()]){var n=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===K.R)return this.bytes.assertNext(K.R),Ql.of(e,n)}return this.bytes.moveTo(t),q.of(e)},t.prototype.parseHexString=function(){var e=``;for(this.bytes.assertNext(K.LessThan);!this.bytes.done()&&this.bytes.peek()!==K.GreaterThan;)e+=ss(this.bytes.next());return this.bytes.assertNext(K.GreaterThan),Y.of(e)},t.prototype.parseString=function(){for(var e=0,t=!1,n=``;!this.bytes.done();){var r=this.bytes.next();if(n+=ss(r),t||(r===K.LeftParen&&(e+=1),r===K.RightParen&&--e),r===K.BackSlash?t=!t:t&&(t=!1),e===0)return Eu.of(n.substring(1,n.length-1))}throw new Dl(this.bytes.position())},t.prototype.parseName=function(){this.bytes.assertNext(K.ForwardSlash);for(var e=``;!this.bytes.done();){var t=this.bytes.peek();if(Rl[t]||Ll[t])break;e+=ss(t),this.bytes.next()}return J.of(e)},t.prototype.parseArray=function(){this.bytes.assertNext(K.LeftSquareBracket),this.skipWhitespaceAndComments();for(var e=Pl.withContext(this.context);this.bytes.peek()!==K.RightSquareBracket;){var t=this.parseObject();e.push(t),this.skipWhitespaceAndComments()}return this.bytes.assertNext(K.RightSquareBracket),e},t.prototype.parseDict=function(){this.bytes.assertNext(K.LessThan),this.bytes.assertNext(K.LessThan),this.skipWhitespaceAndComments();for(var e=new Map;!this.bytes.done()&&this.bytes.peek()!==K.GreaterThan&&this.bytes.peekAhead(1)!==K.GreaterThan;){var t=this.parseName(),n=this.parseObject();e.set(t,n),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(K.GreaterThan),this.bytes.assertNext(K.GreaterThan);var r=e.get(J.of(`Type`));return r===J.of(`Catalog`)?Ud.fromMapWithContext(e,this.context):r===J.of(`Pages`)?Wd.fromMapWithContext(e,this.context):r===J.of(`Page`)?su.fromMapWithContext(e,this.context):ql.fromMapWithContext(e,this.context)},t.prototype.parseDictOrStream=function(){var e=this.bytes.position(),t=this.parseDict();if(this.skipWhitespaceAndComments(),!this.matchKeyword(of.streamEOF1)&&!this.matchKeyword(of.streamEOF2)&&!this.matchKeyword(of.streamEOF3)&&!this.matchKeyword(of.streamEOF4)&&!this.matchKeyword(of.stream))return t;var n=this.bytes.offset(),r,i=t.get(J.of(`Length`));i instanceof q?(r=n+i.asNumber(),this.bytes.moveTo(r),this.skipWhitespaceAndComments(),this.matchKeyword(of.endstream)||(this.bytes.moveTo(n),r=this.findEndOfStreamFallback(e))):r=this.findEndOfStreamFallback(e);var a=this.bytes.slice(n,r);return Yl.of(t,a)},t.prototype.findEndOfStreamFallback=function(e){for(var t=1,n=this.bytes.offset();!this.bytes.done()&&(n=this.bytes.offset(),this.matchKeyword(of.stream)?t+=1:this.matchKeyword(of.EOF1endstream)||this.matchKeyword(of.EOF2endstream)||this.matchKeyword(of.EOF3endstream)||this.matchKeyword(of.endstream)?--t:this.bytes.next(),t!==0););if(t!==0)throw new El(e);return n},t.forBytes=function(e,n,r){return new t($d.of(e),n,r)},t.forByteStream=function(e,n,r){return r===void 0&&(r=!1),new t(e,n,r)},t}(Qd),cf=function(e){U(t,e);function t(t,n){var r=e.call(this,$d.fromPDFRawStream(t),t.dict.context)||this,i=t.dict;return r.alreadyParsed=!1,r.shouldWaitForTick=n||(function(){return!1}),r.firstOffset=i.lookup(J.of(`First`),q).asNumber(),r.objectCount=i.lookup(J.of(`N`),q).asNumber(),r}return t.prototype.parseIntoContext=function(){return qo(this,void 0,void 0,function(){var e,t,n,r,i,a,o,s;return Jo(this,function(c){switch(c.label){case 0:if(this.alreadyParsed)throw new cl(`PDFObjectStreamParser`,`parseIntoContext`);this.alreadyParsed=!0,e=this.parseOffsetsAndObjectNumbers(),t=0,n=e.length,c.label=1;case 1:return t=K.Space&&t<=K.Tilde&&(this.matchKeyword(of.xref)||this.matchKeyword(of.trailer)||this.matchKeyword(of.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(e);break}this.bytes.next()}},t.prototype.skipBinaryHeaderComment=function(){this.skipWhitespaceAndComments();try{var e=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(e)}catch{this.bytes.next(),this.skipWhitespaceAndComments()}},t.forBytesWithOptions=function(e,n,r,i){return new t(e,n,r,i)},t}(sf),df=function(e){return 1<0&&(r[r.length]=+i),n[n.length]={cmd:t,args:r},r=[],i=``,a=!1),t=l;else if([` `,`,`].includes(l)||l===`-`&&i.length>0&&i[i.length-1]!==`e`||l===`.`&&a){if(i.length===0)continue;r.length===o?(n[n.length]={cmd:t,args:r},r=[+i],t===`M`&&(t=`L`),t===`m`&&(t=`l`)):r[r.length]=+i,a=l===`.`,i=[`-`,`.`].includes(l)?l:``}else i+=l,l===`.`&&(a=!0)}return i.length>0&&(r.length===o?(n[n.length]={cmd:t,args:r},r=[+i],t===`M`&&(t=`L`),t===`m`&&(t=`l`)):r[r.length]=+i),n[n.length]={cmd:t,args:r},n},Pp=function(e){Q=$=Op=kp=Ap=jp=0;for(var t=[],n=0;n1&&(f=Math.sqrt(f),n*=f,r*=f);var p=d/n,m=u/n,h=-u/r,g=d/r,_=p*s+m*c,v=h*s+g*c,y=p*e+m*t,b=h*e+g*t,x=1/((y-_)*(y-_)+(b-v)*(b-v))-.25;x<0&&(x=0);var S=Math.sqrt(x);a===i&&(S=-S);var C=.5*(_+y)-S*(b-v),w=.5*(v+b)+S*(y-_),T=Math.atan2(v-w,_-C),E=Math.atan2(b-w,y-C)-T;E<0&&a===1?E+=2*Math.PI:E>0&&a===0&&(E-=2*Math.PI);for(var D=Math.ceil(Math.abs(E/(Math.PI*.5+.001))),O=[],k=0;ke.length)return i-1;var m=t.heightAtSize(i);if((m+m*.2)*a>Math.abs(n.height))return i-1;i+=1}return i},bm=function(e,t,n,r){for(var i=n.width/r,a=n.height,o=_m,s=vs(e);oi*.75)return o-1}if(t.heightAtSize(o,{descender:!1})>a)return o-1;o+=1}return o},xm=function(e){for(var t=e.length;t>0;t--)if(/\s/.test(e[t]))return t},Sm=function(e,t,n,r){for(var i=e.length;i>0;){var a=e.substring(0,i),o=n.encodeText(a),s=n.widthOfTextAtSize(a,r);if(sf&&(f=C+x),m+s>p&&(p=m+s),l.push({text:y,encoded:b,width:x,height:s,x:C,y:m}),_=S?.trim()}return{fontSize:r,lineHeight:c,lines:l,bounds:{x:u,y:d,width:f-u,height:p-d}}},wm=function(e,t){var n=t.fontSize,r=t.font,i=t.bounds,a=t.cellCount,o=gs(fs(e));if(o.length>a)throw new pm(o.length,a);(n===void 0||n===0)&&(n=bm(o,r,i,a));for(var s=i.width/a,c=r.heightAtSize(n,{descender:!1}),l=i.y+(i.height/2-c/2),u=[],d=i.x,f=i.y,p=i.x+i.width,m=i.y+i.height,h=0,g=0;hp&&(p=S+x),l+c>m&&(m=l+c),u.push({text:o,encoded:b,width:x,height:c,x:S,y:l}),h+=1,g+=y}return{fontSize:n,cells:u,bounds:{x:d,y:f,width:p-d,height:m-f}}},Tm=function(e,t){var n=t.alignment,r=t.fontSize,i=t.font,a=t.bounds,o=gs(fs(e));(r===void 0||r===0)&&(r=ym([o],i,a));var s=i.encodeText(o),c=i.widthOfTextAtSize(o,r),l=i.heightAtSize(r,{descender:!1}),u=n===gm.Left?a.x:n===gm.Center?a.x+a.width/2-c/2:n===gm.Right?a.x+a.width-c:a.x,d=a.y+(a.height/2-l/2);return{fontSize:r,line:{text:o,encoded:s,width:c,height:l,x:u,y:d},bounds:{x:u,y:d,width:c,height:l}}},Em=function(e){return`normal`in e?e:{normal:e}},Dm=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,Om=function(e){var t=Cs(e.getDefaultAppearance()??``,Dm).match??[],n=Number(t[2]);return isFinite(n)?n:void 0},km=/(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,Am=function(e){var t=Cs(e.getDefaultAppearance()??``,km).match??[],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5];if(o===`g`&&n)return vp(Number(n));if(o===`rg`&&n&&r&&i)return yp(Number(n),Number(r),Number(i));if(o===`k`&&n&&r&&i&&a)return bp(Number(n),Number(r),Number(i),Number(a))},jm=function(e,t,n,r){r===void 0&&(r=0);var i=[wp(t).toString(),rp(n?.name??`dummy__noop`,r).toString()].join(` +`);e.setDefaultAppearance(i)},Mm=function(e,t){var n=Am(t),r=Am(e.acroField),i=t.getRectangle(),a=t.getAppearanceCharacteristics(),o=t.getBorderStyle()?.getWidth()??0,s=Cf(a?.getRotation()),c=wf(i,s),l=c.width,u=c.height,d=Zp(Go(Go({},i),{rotation:s})),f=yp(0,0,0),p=Ep(a?.getBorderColor())??f,m=Ep(a?.getBackgroundColor()),h=Ep(a?.getBackgroundColor(),.8),g=n??r??f;jm(n?t:e.acroField,g);var _={x:0+o/2,y:0+o/2,width:l-o,height:u-o,thickness:1.5,borderWidth:o,borderColor:p,markColor:g};return{normal:{on:Yo(d,Qp(Go(Go({},_),{color:m,filled:!0}))),off:Yo(d,Qp(Go(Go({},_),{color:m,filled:!1})))},down:{on:Yo(d,Qp(Go(Go({},_),{color:h,filled:!0}))),off:Yo(d,Qp(Go(Go({},_),{color:h,filled:!1})))}}},Nm=function(e,t){var n=Am(t),r=Am(e.acroField),i=t.getRectangle(),a=t.getAppearanceCharacteristics(),o=t.getBorderStyle()?.getWidth()??0,s=Cf(a?.getRotation()),c=wf(i,s),l=c.width,u=c.height,d=Zp(Go(Go({},i),{rotation:s})),f=yp(0,0,0),p=Ep(a?.getBorderColor())??f,m=Ep(a?.getBackgroundColor()),h=Ep(a?.getBackgroundColor(),.8),g=n??r??f;jm(n?t:e.acroField,g);var _={x:l/2,y:u/2,width:l-o,height:u-o,borderWidth:o,borderColor:p,dotColor:g};return{normal:{on:Yo(d,$p(Go(Go({},_),{color:m,filled:!0}))),off:Yo(d,$p(Go(Go({},_),{color:m,filled:!1})))},down:{on:Yo(d,$p(Go(Go({},_),{color:h,filled:!0}))),off:Yo(d,$p(Go(Go({},_),{color:h,filled:!1})))}}},Pm=function(e,t,n){var r=Am(t),i=Am(e.acroField),a=Om(t),o=Om(e.acroField),s=t.getRectangle(),c=t.getAppearanceCharacteristics(),l=t.getBorderStyle(),u=c?.getCaptions(),d=u?.normal??``,f=u?.down??d??``,p=l?.getWidth()??0,m=Cf(c?.getRotation()),h=wf(s,m),g=h.width,_=h.height,v=Zp(Go(Go({},s),{rotation:m})),y=yp(0,0,0),b=Ep(c?.getBorderColor()),x=Ep(c?.getBackgroundColor()),S=Ep(c?.getBackgroundColor(),.8),C={x:p,y:p,width:g-p*2,height:_-p*2},w=Tm(d,{alignment:gm.Center,fontSize:a??o,font:n,bounds:C}),T=Tm(f,{alignment:gm.Center,fontSize:a??o,font:n,bounds:C}),E=Math.min(w.fontSize,T.fontSize),D=r??i??y;jm(r||a!==void 0?t:e.acroField,D,n,E);var O={x:0+p/2,y:0+p/2,width:g-p,height:_-p,borderWidth:p,borderColor:b,textColor:D,font:n.name,fontSize:E};return{normal:Yo(v,em(Go(Go({},O),{color:x,textLines:[w.line]}))),down:Yo(v,em(Go(Go({},O),{color:S,textLines:[T.line]})))}},Fm=function(e,t,n){var r=Am(t),i=Am(e.acroField),a=Om(t),o=Om(e.acroField),s=t.getRectangle(),c=t.getAppearanceCharacteristics(),l=t.getBorderStyle(),u=e.getText()??``,d=l?.getWidth()??0,f=Cf(c?.getRotation()),p=wf(s,f),m=p.width,h=p.height,g=Zp(Go(Go({},s),{rotation:f})),_=yp(0,0,0),v=Ep(c?.getBorderColor()),y=Ep(c?.getBackgroundColor()),b,x,S=+!e.isCombed(),C={x:d+S,y:d+S,width:m-(d+S)*2,height:h-(d+S)*2};if(e.isMultiline()){var w=Cm(u,{alignment:e.getAlignment(),fontSize:a??o,font:n,bounds:C});b=w.lines,x=w.fontSize}else if(e.isCombed()){var w=wm(u,{fontSize:a??o,font:n,bounds:C,cellCount:e.getMaxLength()??0});b=w.cells,x=w.fontSize}else{var w=Tm(u,{alignment:e.getAlignment(),fontSize:a??o,font:n,bounds:C});b=[w.line],x=w.fontSize}var T=r??i??_;return jm(r||a!==void 0?t:e.acroField,T,n,x),Yo(g,nm({x:0+d/2,y:0+d/2,width:m-d,height:h-d,borderWidth:d??0,borderColor:v,textColor:T,font:n.name,fontSize:x,color:y,textLines:b,padding:S}))},Im=function(e,t,n){var r=Am(t),i=Am(e.acroField),a=Om(t),o=Om(e.acroField),s=t.getRectangle(),c=t.getAppearanceCharacteristics(),l=t.getBorderStyle(),u=e.getSelected()[0]??``,d=l?.getWidth()??0,f=Cf(c?.getRotation()),p=wf(s,f),m=p.width,h=p.height,g=Zp(Go(Go({},s),{rotation:f})),_=yp(0,0,0),v=Ep(c?.getBorderColor()),y=Ep(c?.getBackgroundColor()),b=1,x={x:d+b,y:d+b,width:m-(d+b)*2,height:h-(d+b)*2},S=Tm(u,{alignment:gm.Left,fontSize:a??o,font:n,bounds:x}),C=S.line,w=S.fontSize,T=r??i??_;return jm(r||a!==void 0?t:e.acroField,T,n,w),Yo(g,nm({x:0+d/2,y:0+d/2,width:m-d,height:h-d,borderWidth:d??0,borderColor:v,textColor:T,font:n.name,fontSize:w,color:y,textLines:[C],padding:b}))},Lm=function(e,t,n){var r=Am(t),i=Am(e.acroField),a=Om(t),o=Om(e.acroField),s=t.getRectangle(),c=t.getAppearanceCharacteristics(),l=t.getBorderStyle()?.getWidth()??0,u=Cf(c?.getRotation()),d=wf(s,u),f=d.width,p=d.height,m=Zp(Go(Go({},s),{rotation:u})),h=yp(0,0,0),g=Ep(c?.getBorderColor()),_=Ep(c?.getBackgroundColor()),v=e.getOptions(),y=e.getSelected();e.isSorted()&&v.sort();for(var b=``,x=0,S=v.length;x1||n.length===1&&t)&&this.enableMultiselect();for(var i=Array(n.length),a=0,o=n.length;a1||n.length===1&&t)&&this.enableMultiselect();for(var r=Array(n.length),i=0,a=n.length;it)throw new mm(e.length,t,this.getName());this.markAsDirty(),this.disableRichFormatting(),e?this.acroField.setValue(Y.fromText(e)):this.acroField.removeValue()},t.prototype.getAlignment=function(){var e=this.acroField.getQuadding();return e===0?gm.Left:e===1?gm.Center:e===2?gm.Right:gm.Left},t.prototype.setAlignment=function(e){Hc(e,`alignment`,gm),this.markAsDirty(),this.acroField.setQuadding(e)},t.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},t.prototype.setMaxLength=function(e){if(Xc(e,`maxLength`,0,2**53-1),this.markAsDirty(),e===void 0)this.acroField.removeMaxLength();else{var t=this.getText();if(t&&t.length>e)throw new hm(t.length,e,this.getName());this.acroField.setMaxLength(e)}},t.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},t.prototype.setImage=function(e){for(var t=this.getAlignment(),n=t===gm.Center?Vm.Center:t===gm.Right?Vm.Right:Vm.Left,r=this.acroField.getWidgets(),i=0,a=r.length;i{let r=e.node.Annots();if(!r)return;let i=r?.size()??0;for(let e=0;e{let a=r.node.Annots();if(!a)return;let o=a?.size()??0;for(let r=0;r{if(e.level>n)return;let[i,a]=t?.[e.key]??[0,0],o={title:e.title,to:[i,0,a],open:!1,children:[]};if(e.children?.length>0)for(let t of e.children){let e=r(t);e&&o.children.push(e)}return o};return r(e)?.children??[]}var hh=(e,t)=>{for(let n of e){let e=t(n);`children`in n&&e!==!1&&hh(n.children,t)}},gh=e=>{let t=[];return hh(e,e=>void t.push(e)),t},_h=e=>{let t=0;return hh(e,e=>(t+=1,!(`open`in e&&!e.open))),t},vh=async(e,t)=>{let n=e.context.nextRef(),r=new WeakMap;for(let n of gh(t))r.set(n,e.context.nextRef());let i=(()=>{let t=[];return e.catalog.Pages().traverse((e,n)=>{e.get(e.context.obj(`Type`))?.toString()===`/Page`&&t.push(n)}),t})(),a=(t,n)=>{let{length:o}=t;for(let s=0;s0?(a(c.children,l),{First:r.get(c.children[0]),Last:r.get(c.children[c.children.length-1]),Count:_h(c.children)*(c.open?1:-1)}):{};e.context.assign(l,e.context.obj({Title:Y.fromText(c.title),Parent:n,...s>0?{Prev:r.get(t[s-1])}:{},...s0?{First:r.get(t[0]),Last:r.get(t[t.length-1])}:{},Count:o})),e.catalog.set(e.context.obj(`Outlines`),n)};async function yh(e,{headings:t,maxLevel:n,frontMatter:r,displayMetadata:i}){let a=await oh.load(e),o=await fh(a);return ph(a,o),vh(a,mh(t,o,n)),i&&bh(a,r??{}),e=await a.save(),e}function bh(e,{title:t,author:n,keywords:r,subject:i,creator:a,created_at:o,updated_at:s}){t&&e.setTitle(t,{showInWindowTitleBar:!0}),n&&(Array.isArray(n)?e.setAuthor(n.join(`, `)):e.setAuthor(n.toString())),r&&e.setKeywords(typeof r==`string`?[r]:r),i&&e.setSubject(i),e.setCreator(a??`Obsidian`),e.setProducer(`Obsidian`),e.setCreationDate(new Date(o??new Date)),e.setModificationDate(new Date(s??new Date))}function xh(e,t,n){let r={...e};return t&&n.forEach(e=>{let n=t[e];n!=null&&(r[e]=n)}),r}function Sh(e,t){e=xh(e,t,[`headerTemplate`,`footerTemplate`]);let n=e.pageSize;e.pageSize==`Custom`&&e.pageWidth&&e.pageHeight&&(n={width:ao(e.pageWidth,210)/25.4,height:ao(e.pageHeight,297)/25.4});let r=e?.scale??100;(r>200||r<10)&&(r=100);let i={landscape:e?.landscape,printBackground:e?.printBackground,generateTaggedPDF:e?.generateTaggedPDF,pageSize:n,scale:r/100,margins:{marginType:`default`},displayHeaderFooter:e.displayHeader||e.displayFooter,headerTemplate:e.displayHeader?no(e.headerTemplate,t??{}):``,footerTemplate:e.displayFooter?no(e.footerTemplate,t??{}):``};return e.marginType==`0`?i.margins={marginType:`custom`,top:0,bottom:0,left:0,right:0}:e.marginType==`1`?i.margins={marginType:`default`}:e.marginType==`2`?i.margins={marginType:`custom`,top:.1,bottom:.1,left:.1,right:.1}:e.marginType==`3`&&(i.margins={marginType:`custom`,top:ao(e.marginTop,0)/25.4,bottom:ao(e.marginBottom,0)/25.4,left:ao(e.marginLeft,0)/25.4,right:ao(e.marginRight,0)/25.4}),i}async function Ch(e,t,n,{doc:r,frontMatter:i}){console.log(`output pdf:`,e);let a=Sh(t,i);try{let o=await n.printToPDF(a);o=await yh(o,{headings:Ja(r),frontMatter:i,displayMetadata:t?.displayMetadata,maxLevel:io(t?.maxLevel,6)}),await dh.writeFile(e,o),t.open&&u.default.remote.shell.openPath(e)}catch(e){console.error(e)}}async function wh(e,t){let n=await u.default.remote.dialog.showSaveDialog({title:`Export to PDF`,defaultPath:e+(t?`-`+Date.now():``)+`.pdf`,filters:[{name:`All Files`,extensions:[`*`]},{name:`PDF`,extensions:[`pdf`]}],properties:[`showOverwriteConfirmation`,`createDirectory`]});if(!n.canceled)return n.filePath}async function Th(e,t){let n=await u.default.remote.dialog.showOpenDialog({title:`Export to PDF`,defaultPath:e,properties:[`openDirectory`]});if(!n.canceled)return n.filePaths[0]}function Eh(e){return e.map(e=>({status:0,filename:e.file.name}))}function Dh(e,t){return e[t].status=1,[...e]}var Oh={A0:[841,1189],A1:[594,841],A2:[420,594],A3:[297,420],A4:[210,297],A5:[148,210],A6:[105,148],Legal:[216,356],Letter:[216,279],Tabloid:[279,432],Ledger:[432,279]},kh=class{constructor(e,t){this.config=e,this.onResize=t}calc(e){let{pageSize:t,pageWidth:n}=this.config,r=Oh?.[t]?.[0]??ao(n,210);return Math.floor($a(r)/e.offsetWidth*100)/100}startObserver(e){this.observer=new ResizeObserver(()=>{this.onResize?.()}),this.observer.observe(e)}stopObserver(){this.observer?.disconnect()}},Ah,jh=class{constructor(e){j(this,`value`,void 0),j(this,`next`,void 0),this.value=e}},Mh=new WeakMap,Nh=new WeakMap,Ph=new WeakMap;Ah=Symbol.iterator;var Fh=class{constructor(){vt(this,Mh,void 0),vt(this,Nh,void 0),vt(this,Ph,void 0),this.clear()}enqueue(e){var t;let n=new jh(e);V(Mh,this)?(V(Nh,this).next=n,B(Nh,this,n)):(B(Mh,this,n),B(Nh,this,n)),B(Ph,this,(t=V(Ph,this),t++,t))}dequeue(){var e;let t=V(Mh,this);if(t)return B(Mh,this,V(Mh,this).next),B(Ph,this,(e=V(Ph,this),e--,e)),t.value}peek(){if(V(Mh,this))return V(Mh,this).value}clear(){B(Mh,this,void 0),B(Nh,this,void 0),B(Ph,this,0)}get size(){return V(Ph,this)}*[Ah](){let e=V(Mh,this);for(;e;)yield e.value,e=e.next}*drain(){for(;V(Mh,this);)yield this.dequeue()}};function Ih(e){let t=!1;if(typeof e==`object`&&({concurrency:e,rejectOnClear:t=!1}=e),Lh(e),typeof t!=`boolean`)throw TypeError("Expected `rejectOnClear` to be a boolean");let n=new Fh,r=0,i=()=>{r0&&(r++,n.dequeue().run())},a=()=>{r--,i()},o=async(e,t,n)=>{let r=(async()=>e(...n))();t(r);try{await r}catch{}a()},s=(t,a,s,c)=>{let l={reject:s};new Promise(e=>{l.run=e,n.enqueue(l)}).then(o.bind(void 0,t,a,c)),rnew Promise((n,r)=>{s(e,n,r,t)});return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>n.size},clearQueue:{value(){if(!t){n.clear();return}let e=AbortSignal.abort().reason;for(;n.size>0;)n.dequeue().reject(e)}},concurrency:{get:()=>e,set(t){Lh(t),e=t,queueMicrotask(()=>{for(;r0;)i()})}},map:{async value(e,t){let n=Array.from(e,(e,n)=>this(t,e,n));return Promise.all(n)}}}),c}function Lh(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")}var Rh=Wi(``),zh=Wi(`
`),Bh=Wi(`
Rendering...
`,1),Vh=Wi(`
`),Hh=Wi(`
`,1),Uh=Wi(``);function Wh(e,t){$e(t,!0);let n=require(`fs`).promises,r=tn(()=>t.plugin.settings),i=ar(!1),a=ar(fr([])),o=ar(fr([])),s=ar(.75),c=ar(void 0),u=ar(fr([])),d=new kh(t.config);function f(){H(c)&&sr(s,d.calc(H(c)),!0)}async function p(){await sleep(500),H(o).forEach(async(e,t)=>{let[n,r]=await e.executeJavaScript(`[document.body.offsetWidth, document.body.offsetHeight]`);H(a)[t]={...H(a)[t],printSize:`${n}×${r}px²\n${Qa(n)}×${Qa(r)}mm²`}})}async function m(){await f(),await p()}async function h(e,n,i){let a=Ih(io(H(r).concurrency)||5),o=Ye(t.config);console.log(`file list data:`,e,o);let s=e.map((e,t)=>a(async()=>{let n=await po({...e,config:o});return i?.(t),n})),c=[...n??[],...await Promise.all(s)];return t.modal.file instanceof l.TFile&&await t.modal.app.workspace.getLeaf().openFile(t.modal.file),t.modal.multiplePdf||(c=t.modal.mergeDoc(c)),c.map(({doc:e,...t})=>({...t,doc:vo(e,e.title)}))}async function g(e=!0){if(e){let{data:e,docs:n}=await t.modal.getAllFiles();sr(u,Eh(e),!0),sr(a,await h(e,n,e=>{sr(u,Dh(H(u),e),!0)}),!0)}sr(o,[],!0);let n=H(a).map(e=>new Promise(t=>{e.resolve=t}));await Promise.all(n),f(),await p()}function _(e){H(o).forEach((t,n)=>{t.executeJavaScript(` + var _title = document.querySelector("h1.__title__"); + if (_title) { + _title.style.display = "${e?`block`:`none`}"; } - } - await preview.executeJavaScript(this.makeWebviewJs(doc)); - getPatchStyle().forEach(async (css) => { - await preview.insertCSS(css); - }); - }); - } - async appendWebviews(el, render = true) { - var _a3; - el.empty(); - if (render) { - this.svelte = mount(Progress, { - target: el, - props: { - startCount: 5 - } - }); - const { data, docs } = await this.getAllFiles(); - this.svelte.initRenderStates(data); - await this.renderFiles(data, docs, this.svelte.updateRenderStates); - } - el.empty(); - await Promise.all( - (_a3 = this.docs) == null ? void 0 : _a3.map(async ({ doc }, i) => { - if (this.multiplePdf) { - el.createDiv({ - text: `${i + 1}-${doc.title}`, - attr: { class: "filename" } - }); - } - const div = el.createDiv({ attr: { class: "webview-wrapper" } }); - div.createDiv({ attr: { class: "print-size" } }); - await this.appendWebview(div, doc); - }) - ); - await this.calcWebviewSize(); - } - async onOpen() { - var _a3, _b3, _c2; - this.contentEl.empty(); - this.containerEl.style.setProperty("--dialog-width", "60vw"); - this.titleEl.setText("Export to PDF"); - const wrapper = this.contentEl.createDiv({ attr: { id: "better-export-pdf" } }); - const title = (_c2 = (_a3 = this.file) == null ? void 0 : _a3.basename) != null ? _c2 : (_b3 = this.file) == null ? void 0 : _b3.name; - this.previewDiv = wrapper.createDiv({ attr: { class: "pdf-preview" } }, async (el) => { - el.empty(); - const resizeObserver = new ResizeObserver(() => { - this.calcPageSize(el); - }); - resizeObserver.observe(el); - await this.appendWebviews(el); - this.togglePrintSize(); - }); - const contentEl = wrapper.createDiv({ attr: { class: "setting-wrapper" } }); - contentEl.addEventListener("keyup", (event2) => { - if (event2.key === "Enter") { - handleExport(); - } - }); - this.generateForm(contentEl); - const handleExport = async () => { - var _a4, _b4; - this.plugin.settings.prevConfig = this.config; - await this.plugin.saveSettings(); - if (this.config["pageSize"] == "Custom") { - if (!isNumber((_a4 = this.config["pageWidth"]) != null ? _a4 : "") || !isNumber((_b4 = this.config["pageHeight"]) != null ? _b4 : "")) { - alert("When the page size is Custom, the Width/Height cannot be empty."); - return; - } - } - if (this.multiplePdf) { - const outputPath = await getOutputPath(title); - console.log("output:", outputPath); - if (outputPath) { - await Promise.all( - this.webviews.map(async (wb, i) => { - await exportToPDF( - `${outputPath}/${this.docs[i].file.basename}.pdf`, - { ...this.plugin.settings, ...this.config }, - wb, - this.docs[i] - ); - }) - ); - this.close(); - } - } else { - const outputFile = await getOutputFile(title, this.plugin.settings.isTimestamp); - if (outputFile) { - await exportToPDF(outputFile, { ...this.plugin.settings, ...this.config }, this.webviews[0], this.docs[0]); - this.close(); - } - } - }; - new import_obsidian4.Setting(contentEl).setHeading().addButton((button) => { - button.setButtonText("Export").onClick(handleExport); - button.setCta(); - fullWidthButton(button); - }); - new import_obsidian4.Setting(contentEl).setHeading().addButton((button) => { - button.setButtonText("Refresh").onClick(async () => { - await this.appendWebviews(this.previewDiv); - }); - fullWidthButton(button); - }); - const debugEl = new import_obsidian4.Setting(contentEl).setHeading().addButton((button) => { - button.setButtonText("Debug").onClick(async () => { - var _a4; - (_a4 = this.preview) == null ? void 0 : _a4.openDevTools(); - }); - fullWidthButton(button); - }); - debugEl.settingEl.hidden = !this.plugin.settings.debug; - } - generateForm(contentEl) { - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.filenameAsTitle).addToggle( - (toggle) => toggle.setTooltip("Include file name as title").setValue(this.config["showTitle"]).onChange(async (value) => { - this.config["showTitle"] = value; - this.webviews.forEach((wv, i) => { - var _a3, _b3; - wv.executeJavaScript(` - var _title = document.querySelector("h1.__title__"); - if (_title) { - _title.style.display = "${value ? "block" : "none"}"; - } - `); - const _title = (_b3 = (_a3 = this.docs[i]) == null ? void 0 : _a3.doc) == null ? void 0 : _b3.querySelector("h1.__title__"); - if (_title) { - _title.style.display = value ? "block" : "none"; - } - }); - }) - ); - const pageSizes = [ - "A0", - "A1", - "A2", - "A3", - "A4", - "A5", - "A6", - "Legal", - "Letter", - "Tabloid", - "Ledger", - "Custom" - ]; - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.pageSize).addDropdown((dropdown) => { - dropdown.addOptions(Object.fromEntries(pageSizes.map((size) => [size, size]))).setValue(this.config.pageSize).onChange(async (value) => { - this.config["pageSize"] = value; - if (value == "Custom") { - sizeEl.settingEl.hidden = false; - } else { - sizeEl.settingEl.hidden = true; - } - this.togglePrintSize(); - this.calcPageSize(); - await this.calcWebviewSize(); - }); - }); - const sizeEl = new import_obsidian4.Setting(contentEl).setName("Width/Height").addText((text2) => { - setInputWidth(text2.inputEl); - text2.setPlaceholder("width").setValue(this.config["pageWidth"]).onChange( - (0, import_obsidian4.debounce)( - async (value) => { - this.config["pageWidth"] = value; - this.calcPageSize(); - await this.calcWebviewSize(); - }, - 500, - true - ) - ); - }).addText((text2) => { - setInputWidth(text2.inputEl); - text2.setPlaceholder("height").setValue(this.config["pageHeight"]).onChange((value) => { - this.config["pageHeight"] = value; - }); - }); - sizeEl.settingEl.hidden = this.config["pageSize"] !== "Custom"; - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.margin).setDesc("The unit is millimeters.").addDropdown((dropdown) => { - dropdown.addOption("0", "None").addOption("1", "Default").addOption("2", "Small").addOption("3", "Custom").setValue(this.config["marginType"]).onChange(async (value) => { - this.config["marginType"] = value; - if (value == "3") { - topEl.settingEl.hidden = false; - btmEl.settingEl.hidden = false; - } else { - topEl.settingEl.hidden = true; - btmEl.settingEl.hidden = true; - } - }); - }); - const topEl = new import_obsidian4.Setting(contentEl).setName("Top/Bottom").addText((text2) => { - setInputWidth(text2.inputEl); - text2.setPlaceholder("margin top").setValue(this.config["marginTop"]).onChange((value) => { - this.config["marginTop"] = value; - }); - }).addText((text2) => { - setInputWidth(text2.inputEl); - text2.setPlaceholder("margin bottom").setValue(this.config["marginBottom"]).onChange((value) => { - this.config["marginBottom"] = value; - }); - }); - topEl.settingEl.hidden = this.config["marginType"] != "3"; - const btmEl = new import_obsidian4.Setting(contentEl).setName("Left/Right").addText((text2) => { - setInputWidth(text2.inputEl); - text2.setPlaceholder("margin left").setValue(this.config["marginLeft"]).onChange((value) => { - this.config["marginLeft"] = value; - }); - }).addText((text2) => { - setInputWidth(text2.inputEl); - text2.setPlaceholder("margin right").setValue(this.config["marginRight"]).onChange((value) => { - this.config["marginRight"] = value; - }); - }); - btmEl.settingEl.hidden = this.config["marginType"] != "3"; - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.downscalePercent).addSlider((slider) => { - slider.setLimits(0, 100, 1).setValue(this.config["scale"]).onChange(async (value) => { - this.config["scale"] = value; - slider.showTooltip(); - }); - }); - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.landscape).addToggle( - (toggle) => toggle.setTooltip("landscape").setValue(this.config["landscape"]).onChange(async (value) => { - this.config["landscape"] = value; - }) - ); - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.displayHeader).addToggle( - (toggle) => toggle.setTooltip("Display header").setValue(this.config["displayHeader"]).onChange(async (value) => { - this.config["displayHeader"] = value; - }) - ); - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.displayFooter).addToggle( - (toggle) => toggle.setTooltip("Display footer").setValue(this.config["displayFooter"]).onChange(async (value) => { - this.config["displayFooter"] = value; - }) - ); - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.openAfterExport).addToggle( - (toggle) => toggle.setTooltip("Open the exported file after exporting.").setValue(this.config["open"]).onChange(async (value) => { - this.config["open"] = value; - }) - ); - const snippets = this.cssSnippets(); - if (Object.keys(snippets).length > 0 && this.plugin.settings.enabledCss) { - new import_obsidian4.Setting(contentEl).setName(this.i18n.exportDialog.cssSnippets).addDropdown((dropdown) => { - dropdown.addOption("0", "Not select").addOptions(snippets).setValue(this.config["cssSnippet"]).onChange(async (value) => { - this.config["cssSnippet"] = value; - await this.appendWebviews(this.previewDiv, false); - }); - }); - } - } - onClose() { - const { contentEl } = this; - contentEl.empty(); - if (this.svelte) { - unmount(this.svelte); - } - } - cssSnippets() { - var _a3, _b3; - const { snippets, enabledSnippets } = (_b3 = (_a3 = this.app) == null ? void 0 : _a3.customCss) != null ? _b3 : {}; - const basePath = this.app.vault.adapter.basePath; - return Object.fromEntries( - snippets == null ? void 0 : snippets.filter((item) => !enabledSnippets.has(item)).map((name) => { - const file = import_path.default.join(basePath, ".obsidian/snippets", name + ".css"); - return [file, name]; - }) - ); - } -}; - -// src/setting.ts -var import_obsidian5 = require("obsidian"); -function setAttributes(element2, attributes) { - for (const key in attributes) { - element2.setAttribute(key, attributes[key]); - } -} -var renderBuyMeACoffeeBadge = (contentEl, width = 175) => { - const linkEl = contentEl.createEl("a", { - href: "https://www.buymeacoffee.com/l1xnan" - }); - const imgEl = linkEl.createEl("img"); - imgEl.src = "https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=nathangeorge&button_colour=6a8696&font_colour=ffffff&font_family=Poppins&outline_colour=000000&coffee_colour=FFDD00"; - imgEl.alt = "Buy me a coffee"; - imgEl.width = width; -}; -var ConfigSettingTab = class extends import_obsidian5.PluginSettingTab { - constructor(app, plugin) { - super(app, plugin); - this.plugin = plugin; - this.i18n = i18n_default.current; - } - display() { - const { containerEl } = this; - containerEl.empty(); - const supportDesc = new DocumentFragment(); - supportDesc.createDiv({ - text: "Support the continued development of this plugin." - }); - new import_obsidian5.Setting(containerEl).setDesc(supportDesc); - renderBuyMeACoffeeBadge(containerEl); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.showTitle).addToggle( - (toggle) => toggle.setTooltip(this.i18n.settings.showTitle).setValue(this.plugin.settings.showTitle).onChange(async (value) => { - this.plugin.settings.showTitle = value; - this.plugin.saveSettings(); - }) - ); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.displayHeader).addToggle( - (toggle) => toggle.setTooltip("Display header").setValue(this.plugin.settings.displayHeader).onChange(async (value) => { - this.plugin.settings.displayHeader = value; - this.plugin.saveSettings(); - }) - ); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.displayFooter).addToggle( - (toggle) => toggle.setTooltip("Display footer").setValue(this.plugin.settings.displayFooter).onChange(async (value) => { - this.plugin.settings.displayFooter = value; - this.plugin.saveSettings(); - }) - ); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.printBackground).setDesc("Whether to print background graphics").addToggle( - (toggle) => toggle.setValue(this.plugin.settings.printBackground).onChange(async (value) => { - this.plugin.settings.printBackground = value; - this.plugin.saveSettings(); - }) - ); - new import_obsidian5.Setting(containerEl).setName("Generate tagged PDF").setDesc( - "Whether or not to generate a tagged (accessible) PDF. Defaults to false. As this property is experimental, the generated PDF may not adhere fully to PDF/UA and WCAG standards." - ).addToggle( - (toggle) => toggle.setValue(this.plugin.settings.generateTaggedPDF).onChange(async (value) => { - this.plugin.settings.generateTaggedPDF = value; - this.plugin.saveSettings(); - }) - ); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.maxLevel).addDropdown((dropdown) => { - dropdown.addOptions(Object.fromEntries(["1", "2", "3", "4", "5", "6"].map((level) => [level, `h${level}`]))).setValue(this.plugin.settings.maxLevel).onChange(async (value) => { - this.plugin.settings.maxLevel = value; - this.plugin.saveSettings(); - }); - }); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.displayMetadata).setDesc("Add frontMatter(title, author, keywords, subject creator, etc) to pdf metadata").addToggle( - (toggle) => toggle.setValue(this.plugin.settings.displayMetadata).onChange(async (value) => { - this.plugin.settings.displayMetadata = value; - this.plugin.saveSettings(); - }) - ); - new import_obsidian5.Setting(containerEl).setName("Advanced").setHeading(); - const headerContentAreaSetting = new import_obsidian5.Setting(containerEl); - headerContentAreaSetting.settingEl.setAttribute("style", "display: grid; grid-template-columns: 1fr;"); - headerContentAreaSetting.setName(this.i18n.settings.headerTemplate).setDesc( - 'HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: date (formatted print date), title (document title), url (document location), pageNumber (current page number) and totalPages (total pages in the document). For example, would generate span containing the title.' - ); - const hederContentArea = new import_obsidian5.TextAreaComponent(headerContentAreaSetting.controlEl); - setAttributes(hederContentArea.inputEl, { - style: "margin-top: 12px; width: 100%; height: 6vh;" - }); - hederContentArea.setValue(this.plugin.settings.headerTemplate).onChange(async (value) => { - this.plugin.settings.headerTemplate = value; - this.plugin.saveSettings(); - }); - const footerContentAreaSetting = new import_obsidian5.Setting(containerEl); - footerContentAreaSetting.settingEl.setAttribute("style", "display: grid; grid-template-columns: 1fr;"); - footerContentAreaSetting.setName(this.i18n.settings.footerTemplate).setDesc("HTML template for the print footer. Should use the same format as the headerTemplate."); - const footerContentArea = new import_obsidian5.TextAreaComponent(footerContentAreaSetting.controlEl); - setAttributes(footerContentArea.inputEl, { - style: "margin-top: 12px; width: 100%; height: 6vh;" - }); - footerContentArea.setValue(this.plugin.settings.footerTemplate).onChange(async (value) => { - this.plugin.settings.footerTemplate = value; - this.plugin.saveSettings(); - }); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.isTimestamp).setDesc("Add timestamp to output file name").addToggle((cb) => { - cb.setValue(this.plugin.settings.isTimestamp).onChange(async (value) => { - this.plugin.settings.isTimestamp = value; - await this.plugin.saveSettings(); - }); - }); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.enabledCss).setDesc("Select the css snippet that are not enabled").addToggle((cb) => { - cb.setValue(this.plugin.settings.enabledCss).onChange(async (value) => { - this.plugin.settings.enabledCss = value; - await this.plugin.saveSettings(); - }); - }); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.concurrency).setDesc("Limit the number of concurrent renders").addText((cb) => { - var _a3; - const concurrency = (_a3 = this.plugin.settings) == null ? void 0 : _a3.concurrency; - cb.setValue((concurrency == null ? void 0 : concurrency.length) > 0 ? concurrency : "5").onChange(async (value) => { - this.plugin.settings.concurrency = value; - await this.plugin.saveSettings(); - }); - }); - new import_obsidian5.Setting(containerEl).setName("Debug").setHeading(); - new import_obsidian5.Setting(containerEl).setName(this.i18n.settings.debugMode).setDesc("This is useful for troubleshooting.").addToggle((cb) => { - cb.setValue(this.plugin.settings.debug).onChange(async (value) => { - this.plugin.settings.debug = value; - await this.plugin.saveSettings(); - }); - }); - } -}; - -// src/main.ts -var fs3 = __toESM(require("fs/promises")); -var import_path2 = __toESM(require("path")); -var isDev = false; -var DEFAULT_SETTINGS = { - showTitle: true, - maxLevel: "6", - displayHeader: true, - displayFooter: true, - headerTemplate: `
`, - footerTemplate: `
/
`, - printBackground: false, - generateTaggedPDF: false, - displayMetadata: false, - debug: false, - isTimestamp: false, - enabledCss: false, - concurrency: "5" -}; -var BetterExportPdfPlugin3 = class extends import_obsidian6.Plugin { - constructor(app, manifest) { - super(app, manifest); - this.i18n = i18n_default.current; - } - async onload() { - await this.loadSettings(); - this.registerCommand(); - this.registerSetting(); - this.registerEvents(); - } - registerCommand() { - this.addCommand({ - id: "export-current-file-to-pdf", - name: this.i18n.exportCurrentFile, - checkCallback: (checking) => { - const view = this.app.workspace.getActiveViewOfType(import_obsidian6.MarkdownView); - const file = view == null ? void 0 : view.file; - if (!file) { - return false; - } - if (checking) { - return true; - } - new ExportConfigModal(this, file).open(); - return true; - } - }); - } - registerSetting() { - this.addSettingTab(new ConfigSettingTab(this.app, this)); - } - registerEvents() { - this.registerEvent( - this.app.workspace.on("file-menu", (menu, file) => { - let title = file instanceof import_obsidian6.TFolder ? "Export folder to PDF" : "Better Export PDF"; - if (isDev) { - title = `${title} (dev)`; - } - menu.addItem((item) => { - item.setTitle(title).setIcon("download").setSection("action").onClick(async () => { - new ExportConfigModal(this, file).open(); - }); - }); - }) - ); - this.registerEvent( - this.app.workspace.on("file-menu", (menu, file) => { - if (file instanceof import_obsidian6.TFolder) { - let title = "Export to PDF..."; - if (isDev) { - title = `${title} (dev)`; - } - menu.addItem((item) => { - item.setTitle(title).setIcon("lucide-folder-down").setSection("action"); - const subMenu = item.setSubmenu(); - subMenu.addItem( - (item2) => item2.setTitle("Export each file to PDF").setIcon("lucide-file-stack").onClick(async () => { - new ExportConfigModal(this, file, true).open(); - }) - ); - subMenu.addItem( - (item2) => item2.setTitle("Generate TOC.md file").setIcon("lucide-file-text").onClick(async () => { - await this.generateToc(file); - }) - ); - }); - } - }) - ); - } - async generateToc(root3) { - const basePath = this.app.vault.adapter.basePath; - const toc = import_path2.default.join(basePath, root3.path, "_TOC_.md"); - const content = `--- -toc: true -title: ${root3.name} ---- -`; - await fs3.writeFile(toc, content); - if (root3 instanceof import_obsidian6.TFolder) { - const files = traverseFolder(root3); - for (const file of files) { - if (file.name == "_TOC_.md") { - continue; - } - await fs3.appendFile(toc, `[[${file.path}]] -`); - } - } - } - onunload() { - } - async loadSettings() { - this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); - } - async saveSettings() { - await this.saveData(this.settings); - } - changeConfig() { - var _a3; - const theme = "obsidian" === ((_a3 = this.app.vault) == null ? void 0 : _a3.getConfig("theme")); - if (theme) { - document.body.addClass("theme-light"); - document.body.removeClass("theme-dark"); - } - document.body.removeClass("theme-dark"); - const node = document.body.createDiv("print"); - const reset2 = function() { - node.detach(); - if (theme) { - document.body.removeClass("theme-light"); - document.body.addClass("theme-dark"); - } - }; - node.addEventListener("click", reset2); - const el = document.body.createDiv("print"); - const el2 = el.createDiv("markdown-preview-view markdown-rendered"); - el2.toggleClass("rtl", this.app.vault.getConfig("rightToLeft")); - el2.toggleClass("show-frontmatter", this.app.vault.getConfig("showFrontmatter")); - el2.createEl("h1", { - text: "xxxxx" - // a.basename - }); - } -}; -/*! Bundled license information: - -tslib/tslib.es6.js: - (*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** *) - -@lucide/svelte/dist/defaultAttributes.js: - (** - * @license @lucide/svelte v0.487.0 - ISC - * - * ISC License - * - * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - *) - -@lucide/svelte/dist/icons/loader.svelte: - (** - * @license @lucide/svelte v0.487.0 - ISC - * - * ISC License - * - * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - *) - -@lucide/svelte/dist/icons/square-check-big.svelte: - (** - * @license @lucide/svelte v0.487.0 - ISC - * - * ISC License - * - * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - *) - -@lucide/svelte/dist/icons/index.js: - (** - * @license @lucide/svelte v0.487.0 - ISC - * - * ISC License - * - * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - *) -*/ - + `);let r=H(a)[n]?.doc?.querySelector(`h1.__title__`);r&&(r.style.display=e?`block`:`none`)})}async function v(){let e=t.modal.file?.basename??t.modal.file?.name;if(t.modal.multiplePdf){let n=await Th(e);n&&await Promise.all(H(o).map(async(e,i)=>{await Ch(`${n}/${H(a)[i].file.basename}.pdf`,{...H(r),...t.config},e,H(a)[i])}))}else{let n=await wh(e,H(r).isTimestamp);n&&await Ch(n,{...H(r),...t.config},H(o)[0],H(a)[0])}}function y(){H(o)?.[-1]?.openDevTools()}function b(e,r){H(o).push(e);let a=async()=>{if(sr(i,!0),oo().forEach(async t=>{await e.insertCSS(t)}),t.config.cssSnippet&&t.config.cssSnippet!=`0`)try{let r=await n.readFile(t.config.cssSnippet,{encoding:`utf8`}),i=r.replaceAll(/@media print\s*{([^}]+)}/g,`$1`);await e.insertCSS(i),await e.insertCSS(r)}catch(e){console.warn(e)}await e.executeJavaScript(Co(r.doc)),co().forEach(async t=>{await e.insertCSS(t)}),r.resolve&&r.resolve()};return e.addEventListener(`dom-ready`,a),{destroy(){e.removeEventListener(`dom-ready`,a)}}}Wa(()=>{if(H(c))return d.startObserver(H(c)),g(!0),()=>{d.stopObserver()}});var x={calcPageSize:f,calcWebviewSize:p,handleChangeSize:m,renderPreview:g,toggleTitle:_,handlePrintToPDF:v,handleOpenDevTools:y},S=Uh(),C=xr(S),w=xr(C),T=e=>{var t=Bh();da(Cr(Sr(t),2),17,()=>H(u),sa,(e,t)=>{var n=zh(),r=xr(n),i=e=>{var t=Rh();va(t,(e,t)=>Lo?.(e,t),()=>`check`),Gi(e,t)},a=e=>{var t=Rh();va(t,(e,t)=>Lo?.(e,t),()=>`loader`),Gi(e,t)};oa(r,e=>{H(t).status?e(i):e(a,-1)});var o=Cr(r);ze(n),Br(()=>Ki(o,` ${H(t).filename??``}`)),Gi(e,n)}),Gi(e,t)},E=tn(()=>H(u).length>0&&!H(u).every(e=>e.status));oa(w,e=>{H(E)&&e(T)}),ze(C);var D=Cr(C,2);return da(D,21,()=>H(a),sa,(e,n,r)=>{var i=Hh(),a=Sr(i),o=e=>{var t=Vh(),i=xr(t);ze(t),Br(()=>Ki(i,`${r+1}-${H(n).doc.title??``}`)),Gi(e,t)};oa(a,e=>{t.modal.multiplePdf&&e(o)});var c=Cr(a,2),l=xr(c);let u;var d=xr(l,!0);ze(l);var f=Cr(l,2);Aa(f,`nodeintegration`,!0),va(f,(e,t)=>b?.(e,t),()=>H(n)),ze(c),Br(()=>{u=Ea(l,``,u,{visibility:t.config.pageSize===`Custom`?`visible`:`hidden`}),Ki(d,H(n).printSize??``),Ea(f,`--modal-scale: ${H(s)??``};`)}),Gi(e,i)}),ze(D),Ha(D,e=>sr(c,e),()=>H(c)),ze(S),Gi(e,S),et(x)}var Gh=Wi(`
`),Kh={hash:`svelte-184lr04`,code:`.toggle-container.svelte-184lr04 {display:flex;gap:0px;text-align:right;justify-content:right;position:absolute;top:0;right:0;z-index:99;}button.svelte-184lr04 {height:24px;width:56px;padding:2px 4px;border:1px solid var(--background-modifier-border);background:var(--background-primary);color:var(--text-normal);cursor:pointer;border-radius:0px;display:flex;justify-content:center;line-height:14px;gap:2px;font-size:12px;}button.svelte-184lr04:hover {background:var(--background-modifier-hover);}button.active.svelte-184lr04 {background:var(--interactive-accent);color:var(--text-on-accent);border-color:var(--interactive-accent);}`};function qh(e,t){$e(t,!0),_a(e,Kh);let n=Ua(t,`initialMode`,3,`html`),r=ar(fr(Oi(()=>Ye(n()))));function i(e){H(r)!==e&&(sr(r,e,!0),t.onChange?.(H(r)))}var a=Gh(),o=xr(a);let s;var c=xr(o);va(c,(e,t)=>Lo?.(e,t),()=>`globe`),Ea(Cr(c,2),``,{},{"margin-left":`2px`}),ze(o);var l=Cr(o,2);let u;var d=xr(l);va(d,(e,t)=>Lo?.(e,t),()=>`notebook`),Ea(Cr(d,2),``,{},{"margin-left":`2px`}),ze(l),ze(a),Br(()=>{s=wa(o,1,`svelte-184lr04`,null,s,{active:H(r)===`html`}),u=wa(l,1,`svelte-184lr04`,null,u,{active:H(r)===`pdf`})}),Ii(`click`,o,()=>i(`html`)),Ii(`click`,l,()=>i(`pdf`)),Gi(e,a),et()}Li([`click`]);var Jh=class{constructor(){this.queue=Promise.resolve()}async run(e){let t=this.queue.then(()=>e());return this.queue=t.catch(()=>{}),t}},Yh=Wi(``),Xh=Wi(`
`),Zh=Wi(`
Rendering...
`,1),Qh=Wi(`
Rendering
`),$h=Wi(`
`),eg=Wi(` `,1),tg=Wi(`
`),ng=Wi(``),rg={hash:`svelte-1czt1i6`,code:`.rendering.svelte-1czt1i6 {position:absolute;display:flex;flex-direction:row;align-items:center;justify-content:center;}`};function ig(e,t){$e(t,!0),_a(e,rg);let n=require(`fs`).promises,r=tn(()=>t.plugin.settings),i=ar(!1),a=ar(!1),o=ar(fr([])),s=ar(.75),c=ar(void 0),p=ar(fr([])),m=fr([]),h=fr([]),g=fr({}),_=Ye(t.config),v=tn(()=>Sh({...H(r),...t.config})),y=new kh(t.config);function b(){H(c)&&sr(s,y.calc(H(c)),!0)}async function x(){await b()}async function S(e,n){let i=Ih(io(H(r).concurrency)||5);console.log(`file list data:`,e);let a=e.map((e,r)=>i(async()=>{let i=await mo({app:t.modal.app,file:e.file,config:t.config});return n?.(r),i})),o=[...await Promise.all(a)];return console.log(o,t.modal.multiplePdf),!t.modal.multiplePdf&&o.length>1&&(o=t.modal.mergeDocV2(o)),o.map(({doc:e,...t})=>({...t,doc:yo(e,e.title)}))}async function C(e=!0){if(e){let{data:e}=await t.modal.getAllFilesV2();sr(o,Eh(e),!0),sr(p,await S(e,e=>{sr(o,Dh(H(o),e),!0)}),!0)}b()}async function w(e){sr(p,H(p).map(({doc:t,...n})=>{let r=t?.querySelector(`h1.__title__`);return r&&(r.style.display=e?`block`:`none`),{doc:t,...n}}),!0),H(c)?.querySelectorAll(`h1.__title__`).forEach(t=>{t.style.display=e?`block`:`none`})}function T(e,t){let n=()=>{m[t]={width:e.offsetWidth,height:e.offsetHeight}};n();let r=new ResizeObserver(n);return r.observe(e),{destroy:()=>r.disconnect()}}Wa(()=>{if(H(c))return y.startObserver(H(c)),C(!0),()=>{y.stopObserver()}}),Ga(()=>{document.querySelectorAll(`.print`).forEach(e=>e.remove())}),Pr(()=>{console.log(`config:`,Ye(t.config))});let E=new Jh;async function D({el:e,outputFile:i,title:a,onlyPreview:o=!1}){console.log(`printOptions:`,H(v));let s={...H(v),filepath:i};if(await E.run(async()=>{document.title=a,await To(e,s)}),o)return;let c=await n.readFile(i);c=await yh(c,{headings:Ja(e),frontMatter:H(p)[0].frontMatter,displayMetadata:H(r)?.displayMetadata,maxLevel:io(H(r)?.maxLevel,6)}),await n.writeFile(i,c),t.config.open&&u.remote.shell.openPath(i)}async function O({docs:e,outfiles:t,cb:n,onlyPreview:r}){let i=document.title;e.forEach(({doc:e})=>{e.style.display=`none`});for(let[i,a]of t.entries()){let{doc:t,file:o}=e[i],s=o.basename;t.style.display=`block`,await sleep(200),await D({el:t,outputFile:a,title:s,onlyPreview:r}),t.style.display=`none`,n&&await n(a)}document.title=i}async function k(){let e=t.modal.file?.basename??t.modal.file?.name,n=[];if(t.modal.multiplePdf){let t=await Th(e);if(!t)return!1;n.push(...H(p).map(e=>`${t}/${e.file.basename}.pdf`))}else{let t=await wh(e,H(r).isTimestamp);if(!t)return!1;n.push(t)}return await O({docs:H(p),outfiles:n}),!0}async function ee(){sr(a,!0);let e=await(0,l.loadPdfJs)(),r=f.tmpdir(),i=0;async function o(t){let r=await n.readFile(t),a=await e.getDocument({data:r}).promise;console.log(`loading tmp file`,a.numPages);for(let e=1;e<=a.numPages;e++){let t=await a.getPage(e),n=document.createElement(`canvas`),r=n.getContext(`2d`),o=t.getViewport({scale:5});n.height=o.height,n.width=o.width,await t.render({canvasContext:r,viewport:o}).promise,id.join(r,`obsidian-temp-${e.path.replace(/[/\\]/g,`_`)}-${Date.now()}.pdf`));console.log(`tempFiles`,e),await O({docs:H(p),outfiles:e,cb:o,onlyPreview:!0}),g[s]=e}h.length=i,sr(a,!1),console.log(`loaded tmp canvas pages:`,i)}function A(){document.win.electron.remote.getCurrentWebContents().openDevTools()}async function j(e){e===`pdf`?(sr(i,!0),await ee(),sr(a,!1)):sr(i,!1)}Pr(()=>{let e=Ye(t.config),n=[];console.log(`config changed:`,_,e);for(let t of[`pageSize`,`scale`,`landscape`,`marginBottom`,`marginLeft`,`marginRight`,`marginTop`,`marginType`,`displayHeader`,`displayFooter`,`showTitle`]){let r=t;e?.[r]!=_?.[r]&&n.push({key:r,oldValue:_[r],newValue:e[r]})}if(n.length==0||(_=e,!H(i)))return;sr(a,!0);let r=setTimeout(async()=>{await ee(),sr(a,!1)},300);return()=>clearTimeout(r)});var te={calcPageSize:b,handleChangeSize:x,renderPreview:C,toggleTitle:w,exportToPDF:D,printDocs:O,handlePrintToPDF:k,handleOpenDevTools:A},ne=ng(),re=xr(ne),ie=xr(re),ae=e=>{var t=Zh();da(Cr(Sr(t),2),17,()=>H(o),sa,(e,t)=>{var n=Xh(),r=xr(n),i=e=>{var t=Yh();va(t,(e,t)=>Lo?.(e,t),()=>`check`),Gi(e,t)},a=e=>{var t=Yh();va(t,(e,t)=>Lo?.(e,t),()=>`loader`),Gi(e,t)};oa(r,e=>{H(t).status?e(i):e(a,-1)});var o=Cr(r);ze(n),Br(()=>Ki(o,` ${H(t).filename??``}`)),Gi(e,n)}),Gi(e,t)},oe=tn(()=>H(o).length>0&&!H(o).every(e=>e.status));oa(ie,e=>{H(oe)&&e(ae)}),ze(re);var se=Cr(re,2),ce=e=>{var t=Qh();va(xr(t),(e,t)=>Lo?.(e,t),()=>`loader`),Be(2),ze(t),Gi(e,t)};oa(se,e=>{H(a)&&e(ce)});var le=Cr(se,2);qh(le,{initialMode:`html`,onChange:j});var ue=Cr(le,2),M=xr(ue),N=xr(M);let de;da(N,21,()=>H(p),sa,(e,n,r)=>{var i=eg(),a=Sr(i);let o;var s=xr(a,!0);ze(a);var c=Cr(a,2),l=e=>{var t=$h(),r=xr(t,!0);ze(t),Br(()=>Ki(r,H(n).file.name)),Gi(e,t)};oa(c,e=>{t.modal.multiplePdf&&e(l)});var u=Cr(c,2);va(u,(e,t)=>Ro?.(e,t),()=>H(n).doc),va(u,(e,t)=>T?.(e,t),()=>r),Br(e=>{o=Ea(a,``,o,{visibility:t.config.pageSize===`Custom`?`visible`:`hidden`}),Ki(s,e)},[()=>m[r]?`${m[r].width}×${m[r].height}px\n${Qa(m[r].width)}×${Qa(m[r].height)}mm`:``]),Gi(e,i)}),ze(N);var fe=Cr(N,2);let pe;return da(fe,20,()=>h,e=>e,(e,t)=>{var n=tg();va(n,(e,t)=>zo?.(e,t),()=>t),Gi(e,n)}),ze(fe),ze(M),ze(ue),Ha(ue,e=>sr(c,e),()=>H(c)),ze(ne),Br(()=>{de=Ea(N,`--modal-scale: ${H(s)??``};`,de,{display:H(i)?`none`:`block`}),pe=Ea(fe,``,pe,{display:H(i)?`block`:`none`})}),Gi(e,ne),et(te)}var ag=Wi(`
`);function og(e,t){$e(t,!0);let n=Ua(t,`plugin`,7),r=ar(fr(Oi(()=>Ye(t.modal.defaultConfig)))),i=ar(null);async function a(){await H(i)?.renderPreview(!1)}async function o(){await H(i)?.renderPreview(!0)}async function s(){await H(i)?.handleOpenDevTools()}async function c(){if(n().settings.prevConfig=H(r),await n().saveSettings(),H(r).pageSize==`Custom`&&(!ro(H(r).pageWidth??``)||!ro(H(r).pageHeight??``))){alert(`When the page size is Custom, the Width/Height cannot be empty.`);return}await H(i)?.handlePrintToPDF(),t.modal.close()}var l={onCssSnippetChange:a,refreshPreview:o,handleOpenDevTools:s,handleExport:c},u=ag(),d=xr(u),f=e=>{Ha(Wh(e,{get modal(){return t.modal},get plugin(){return n()},get config(){return H(r)}}),e=>sr(i,e,!0),()=>H(i))},p=e=>{Ha(ig(e,{get modal(){return t.modal},get plugin(){return n()},get config(){return H(r)}}),e=>sr(i,e,!0),()=>H(i))};return oa(d,e=>{n().settings?.version==`1`?e(f):e(p,-1)}),Uo(Cr(d,2),{get modal(){return t.modal},get plugin(){return n()},get pdfPreview(){return H(i)},handleExport:c,refreshPreview:o,get config(){return H(r)},set config(e){sr(r,e,!0)}}),ze(u),Gi(e,u),et(l)}require(`fs`).promises;var sg=class extends l.Modal{constructor(e,t,n){super(e.app),this.plugin=e,this.file=t,this.i18n=m.current,this.multiplePdf=n,this.defaultConfig={pageSize:`A4`,marginType:`1`,showTitle:e.settings.showTitle??!0,open:!0,scale:100,landscape:!1,marginTop:`10`,marginBottom:`10`,marginLeft:`10`,marginRight:`10`,displayHeader:e.settings.displayHeader??!0,displayFooter:e.settings.displayHeader??!0,cssSnippet:`0`,...e.settings.prevConfig??{}}}onOpen(){this.contentEl.empty(),this.containerEl.style.setProperty(`--dialog-width`,`60vw`),this.titleEl.setText(`Export to PDF`),this.component=qi(og,{target:this.contentEl,props:{modal:this,plugin:this.plugin}})}onClose(){this.component&&(Zi(this.component),this.component=void 0),this.contentEl.empty(),document.querySelectorAll(`.print`).forEach(e=>e.remove())}getFileCache(e){return this.app.metadataCache.getFileCache(e)}async getAllFiles(){let e=this.plugin.app,t=[],n=[];if(this.file instanceof l.TFolder){let n=eo(this.file);for(let r of n)t.push({app:e,file:r})}else{let{doc:r,frontMatter:i,file:a}=await po({app:e,file:this.file,config:this.defaultConfig});if(n.push({doc:r,frontMatter:i,file:a}),i.toc){let n=this.parseToc(r);for(let r of n)t.push({app:e,file:r.file,extra:r})}}return{data:t,docs:n}}async getAllFilesV2(){let e=[];if(this.file instanceof l.TFolder){let t=eo(this.file);for(let n of t)e.push({file:n})}else{let{frontmatter:t,links:n}=this.getFileCache(this.file)??{};if(e.push({file:this.file,toc:t?.toc}),t?.toc&&n)for(let t of n){let n=this.app.metadataCache.getFirstLinkpathDest(t.link,this.file.path);n instanceof l.TFile&&e.push({file:n})}}return{data:e,multiplePdf:this.multiplePdf}}parseToc(e){return this.getFileCache(this.file)?.links?.map(({link:t,displayText:n})=>{let r=crypto.randomUUID(),i=e.querySelector(`a[data-href="${t}"]`);return i&&(i.href=`#${r}`),{title:n,file:this.app.metadataCache.getFirstLinkpathDest(t,this.file.path),id:r}}).filter(e=>e.file instanceof l.TFile)??[]}mergeDoc(e){let{doc:t,frontMatter:n,file:r}=e[0],i=[];for(let{doc:n}of e){let e=n.querySelector(`.markdown-preview-view`);if(e){let n=t.createElement(`section`);Array.from(e.children).forEach(e=>{n.appendChild(t.importNode(e,!0))}),i.push(n)}}let a=t.querySelector(`.markdown-preview-view`);return a&&(a.innerHTML=``),i.forEach(e=>{a?.appendChild(e)}),[{doc:t,frontMatter:n,file:r,node:a}]}mergeDocV2(e){let t=document.body.createDiv(`print`);for(let{doc:n}of e){let e=n.querySelector(`.markdown-preview-view`);e&&t.appendChild(e),document.body.removeChild(n)}return[{...e[0],doc:t}]}cssSnippets(){let{snippets:e,enabledSnippets:t}=this.app?.customCss??{},n=this.app.vault.adapter.basePath;return Object.fromEntries(e?.filter(e=>!t.has(e)).map(e=>[d.default.join(n,`.obsidian/snippets`,e+`.css`),e]))}};function cg(e,t){for(let n in t)e.setAttribute(n,t[n])}var lg=(e,t=175)=>{let n=e.createEl(`a`,{href:`https://www.buymeacoffee.com/l1xnan`}).createEl(`img`);n.src=`https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=nathangeorge&button_colour=6a8696&font_colour=ffffff&font_family=Poppins&outline_colour=000000&coffee_colour=FFDD00`,n.alt=`Buy me a coffee`,n.width=t},ug=class extends l.PluginSettingTab{constructor(e,t){super(e,t),this.plugin=t,this.i18n=m.current}display(){let{containerEl:e}=this;e.empty();let t=new DocumentFragment;t.createDiv({text:`Support the continued development of this plugin.`}),new l.Setting(e).setDesc(t),lg(e),new l.Setting(e).setName(this.i18n.settings.version).addDropdown(e=>{e.addOptions(Object.fromEntries([`1`,`2`].map(e=>[e,`v${e}`]))).setValue(this.plugin.settings.version).onChange(async e=>{this.plugin.settings.version=e,this.plugin.saveSettings(),s(e)})}),new l.Setting(e).setName(this.i18n.settings.showTitle).addToggle(e=>e.setTooltip(this.i18n.settings.showTitle).setValue(this.plugin.settings.showTitle).onChange(async e=>{this.plugin.settings.showTitle=e,this.plugin.saveSettings()})),new l.Setting(e).setName(this.i18n.settings.displayHeader).addToggle(e=>e.setTooltip(`Display header`).setValue(this.plugin.settings.displayHeader).onChange(async e=>{this.plugin.settings.displayHeader=e,this.plugin.saveSettings()})),new l.Setting(e).setName(this.i18n.settings.displayFooter).addToggle(e=>e.setTooltip(`Display footer`).setValue(this.plugin.settings.displayFooter).onChange(async e=>{this.plugin.settings.displayFooter=e,this.plugin.saveSettings()})),new l.Setting(e).setName(this.i18n.settings.printBackground).setDesc(`Whether to print background graphics`).addToggle(e=>e.setValue(this.plugin.settings.printBackground).onChange(async e=>{this.plugin.settings.printBackground=e,this.plugin.saveSettings()})),new l.Setting(e).setName(`Generate tagged PDF`).setDesc(`Whether or not to generate a tagged (accessible) PDF. Defaults to false. As this property is experimental, the generated PDF may not adhere fully to PDF/UA and WCAG standards.`).addToggle(e=>e.setValue(this.plugin.settings.generateTaggedPDF).onChange(async e=>{this.plugin.settings.generateTaggedPDF=e,this.plugin.saveSettings()})),new l.Setting(e).setName(this.i18n.settings.maxLevel).addDropdown(e=>{e.addOptions(Object.fromEntries([`1`,`2`,`3`,`4`,`5`,`6`].map(e=>[e,`h${e}`]))).setValue(this.plugin.settings.maxLevel).onChange(async e=>{this.plugin.settings.maxLevel=e,this.plugin.saveSettings()})}),new l.Setting(e).setName(this.i18n.settings.displayMetadata).setDesc(`Add frontMatter(title, author, keywords, subject creator, etc) to pdf metadata`).addToggle(e=>e.setValue(this.plugin.settings.displayMetadata).onChange(async e=>{this.plugin.settings.displayMetadata=e,this.plugin.saveSettings()})),new l.Setting(e).setName(`Advanced`).setHeading();let n=new l.Setting(e);n.settingEl.setAttribute(`style`,`display: grid; grid-template-columns: 1fr;`),n.setName(this.i18n.settings.headerTemplate).setDesc(`HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: date (formatted print date), title (document title), url (document location), pageNumber (current page number) and totalPages (total pages in the document). For example, would generate span containing the title.`);let r=new l.TextAreaComponent(n.controlEl);cg(r.inputEl,{style:`margin-top: 12px; width: 100%; height: 6vh;`}),r.setValue(this.plugin.settings.headerTemplate).onChange(async e=>{this.plugin.settings.headerTemplate=e,this.plugin.saveSettings()});let i=new l.Setting(e);i.settingEl.setAttribute(`style`,`display: grid; grid-template-columns: 1fr;`),i.setName(this.i18n.settings.footerTemplate).setDesc(`HTML template for the print footer. Should use the same format as the headerTemplate.`);let a=new l.TextAreaComponent(i.controlEl);cg(a.inputEl,{style:`margin-top: 12px; width: 100%; height: 6vh;`}),a.setValue(this.plugin.settings.footerTemplate).onChange(async e=>{this.plugin.settings.footerTemplate=e,this.plugin.saveSettings()}),new l.Setting(e).setName(this.i18n.settings.isTimestamp).setDesc(`Add timestamp to output file name`).addToggle(e=>{e.setValue(this.plugin.settings.isTimestamp).onChange(async e=>{this.plugin.settings.isTimestamp=e,await this.plugin.saveSettings()})});let o=new l.Setting(e).setName(this.i18n.settings.enabledCss).setDesc(`Select the css snippet that are not enabled`).addToggle(e=>{e.setValue(this.plugin.settings.enabledCss).onChange(async e=>{this.plugin.settings.enabledCss=e,await this.plugin.saveSettings()})}),s=e=>{o.settingEl.hidden=e!==`1`};s(this.plugin.settings.version),new l.Setting(e).setName(this.i18n.settings.concurrency).setDesc(`Limit the number of concurrent renders`).addText(e=>{let t=this.plugin.settings?.concurrency;e.setValue(t?.length>0?t:`5`).onChange(async e=>{this.plugin.settings.concurrency=e,await this.plugin.saveSettings()})}),new l.Setting(e).setName(`Debug`).setHeading(),new l.Setting(e).setName(this.i18n.settings.debugMode).setDesc(`This is useful for troubleshooting.`).addToggle(e=>{e.setValue(this.plugin.settings.debug).onChange(async e=>{this.plugin.settings.debug=e,await this.plugin.saveSettings()})})}},dg=require(`fs`).promises,fg=process.env.NODE_ENV===`development`,pg={showTitle:!0,maxLevel:`6`,displayHeader:!0,displayFooter:!0,headerTemplate:`
`,footerTemplate:`
/
`,printBackground:!1,generateTaggedPDF:!1,displayMetadata:!1,debug:!1,isTimestamp:!1,enabledCss:!1,concurrency:`5`,version:`2`},mg=class extends l.Plugin{constructor(e,t){super(e,t),this.i18n=m.current}async onload(){await this.loadSettings(),this.registerCommand(),this.registerSetting(),this.registerEvents()}registerCommand(){this.addCommand({id:`export-current-file-to-pdf`,name:this.i18n.exportCurrentFile,checkCallback:e=>{let t=this.app.workspace.getActiveViewOfType(l.MarkdownView)?.file;return t?(e||new sg(this,t).open(),!0):!1}})}registerSetting(){this.addSettingTab(new ug(this.app,this))}registerEvents(){this.registerEvent(this.app.workspace.on(`file-menu`,(e,t)=>{let n=t instanceof l.TFolder?`Export folder to PDF`:`Better Export PDF`;fg&&(n=`${n} (dev)`),e.addItem(e=>{e.setTitle(n).setIcon(`download`).setSection(`action`).onClick(async()=>{new sg(this,t).open()})})})),this.registerEvent(this.app.workspace.on(`file-menu`,(e,t)=>{if(t instanceof l.TFolder){let n=`Export to PDF...`;fg&&(n=`${n} (dev)`),e.addItem(e=>{e.setTitle(n).setIcon(`lucide-folder-down`).setSection(`action`);let r=e.setSubmenu();r.addItem(e=>e.setTitle(`Export each file to PDF`).setIcon(`lucide-file-stack`).onClick(async()=>{new sg(this,t,!0).open()})),r.addItem(e=>e.setTitle(`Generate TOC.md file`).setIcon(`lucide-file-text`).onClick(async()=>{await this.generateToc(t)}))})}}))}async generateToc(e){let t=this.app.vault.adapter.basePath,n=d.default.join(t,e.path,`_TOC_.md`),r=`---\ntoc: true\ntitle: ${e.name}\n---\n`;if(await dg.writeFile(n,r),e instanceof l.TFolder){let t=eo(e);for(let e of t)e.name!=`_TOC_.md`&&await dg.appendFile(n,`[[${e.path}]]\n`)}}onunload(){}async loadSettings(){this.settings=Object.assign({},pg,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}changeConfig(){let e=this.app.vault?.getConfig(`theme`)===`obsidian`;e&&(document.body.addClass(`theme-light`),document.body.removeClass(`theme-dark`)),document.body.removeClass(`theme-dark`);let t=document.body.createDiv(`print`);t.addEventListener(`click`,function(){t.detach(),e&&(document.body.removeClass(`theme-light`),document.body.addClass(`theme-dark`))});let n=document.body.createDiv(`print`).createDiv(`markdown-preview-view markdown-rendered`);n.toggleClass(`rtl`,this.app.vault.getConfig(`rightToLeft`)),n.toggleClass(`show-frontmatter`,this.app.vault.getConfig(`showFrontmatter`)),n.createEl(`h1`,{text:`xxxxx`})}};module.exports=mg; /* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/better-export-pdf/manifest.json b/.obsidian/plugins/better-export-pdf/manifest.json index dd47ea5..c1ac749 100644 --- a/.obsidian/plugins/better-export-pdf/manifest.json +++ b/.obsidian/plugins/better-export-pdf/manifest.json @@ -1,7 +1,7 @@ { "id": "better-export-pdf", "name": "Better Export PDF", - "version": "1.11.0", + "version": "2.0.2", "minAppVersion": "0.15.0", "description": "Export your notes to PDF, support export preview, add bookmarks outline and header/footer.", "author": "l1xnan", diff --git a/.obsidian/plugins/better-export-pdf/styles.css b/.obsidian/plugins/better-export-pdf/styles.css index be734df..17b3474 100644 --- a/.obsidian/plugins/better-export-pdf/styles.css +++ b/.obsidian/plugins/better-export-pdf/styles.css @@ -2,66 +2,120 @@ display: flex; flex-direction: row; height: 75vh; + .print-preview { + flex: 1; + overflow-x: hidden; + overflow-y: scroll; + position: relative; + display: flex; + flex-direction: column; + align-content: flex-start; + } + .setting-wrapper { + width: 320px; + margin-left: 16px; + } + + .setting-wrapper .setting-item[hidden] { + display: none; + } } -#better-export-pdf .pdf-preview { - flex: auto; - position: relative; - display: flex; - flex-direction: column; - overflow-x: hidden; - overflow-y: scroll; - align-content: flex-start; +#better-export-pdf .print-preview { + .webview-wrapper { + position: relative; + height: 100%; + width: 100%; + } + + .print-size { + position: absolute; + right: 8px; + top: 36px; + z-index: 99; + font-size: 0.6rem; + white-space: pre-wrap; + text-align: center; + } + + & > div { + flex: 1; + height: 100%; + width: 100%; + } + + & > div.progress { + flex: none; + height: auto; + width: 100%; + text-align: left; + } + + .filename { + font-size: 0.75rem; + color: var(--color-base-60); + text-align: center; + padding-bottom: calc(var(--p-spacing) / 4); + } + .filename:not(:first-child) { + padding-top: calc(var(--p-spacing) / 2); + } } -#better-export-pdf .pdf-preview .webview-wrapper { - position: relative; - height: 100%; - width: 100%; +#better-export-pdf { + .print-preview-container { + .print-preview-item { + border: 1px solid var(--background-modifier-border, #f2f2f2); + height: calc(var(--modal-scale) * 100%); + width: calc(var(--modal-scale) * 100%); + transform: scale(calc(1 / var(--modal-scale)), calc(1 / var(--modal-scale))); + transform-origin: top left; + } + } + + .preview-wrapper { + position: relative; + height: 100%; + width: 100%; + } + .pdf-canvas-page { + width: 100%; + height: 100%; + border: 1px solid var(--background-modifier-border); + } + + .pdf-canvas-page :global(canvas) { + width: 100% !important; + height: auto !important; + display: block; + } + + .icon svg { + width: var(--icon-xs) !important; + height: var(--icon-xs) !important; + } } -#better-export-pdf .pdf-preview .print-size { - position: absolute; - right: 8px; - top: 8px; - z-index: 99; - font-size: 0.6rem; - white-space: pre-wrap; - text-align: right; - visibility: hidden; -} - -#better-export-pdf .pdf-preview > div { - flex: 1; - height: 100%; - width: 100%; -} -#better-export-pdf .pdf-preview > div.progress { - flex: none; - height: auto; - width: 100%; - text-align: left; -} - -#better-export-pdf .pdf-preview .filename { - font-size: 0.75rem; - color: var(--color-base-60); -} -#better-export-pdf .pdf-preview .filename:not(:first-child) { - padding-top: calc(var(--p-spacing)); -} - -#better-export-pdf webview { - flex: 1; - height: 100%; - width: 100%; -} - -#better-export-pdf .setting-wrapper { - width: 320px; - margin-left: 16px; -} - -#better-export-pdf .setting-wrapper .setting-item[hidden] { - display: none; +/* 必须有此样式, 否则大纲锚点失效 */ +@media print { + .print .markdown-preview-view { + height: auto !important; + } + .md-print-anchor, + .blockid { + white-space: pre !important; + border-left: none !important; + border-right: none !important; + border-top: none !important; + border-bottom: none !important; + display: inline-block !important; + position: absolute !important; + width: 1px !important; + height: 1px !important; + right: 0 !important; + outline: 0 !important; + background: 0 0 !important; + text-decoration: initial !important; + text-shadow: initial !important; + } } diff --git a/.obsidian/plugins/chatgpt-md/main.js b/.obsidian/plugins/chatgpt-md/main.js new file mode 100644 index 0000000..9df97fa --- /dev/null +++ b/.obsidian/plugins/chatgpt-md/main.js @@ -0,0 +1,485 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var Q$=Object.create;var cs=Object.defineProperty;var eE=Object.getOwnPropertyDescriptor;var tE=Object.getOwnPropertyNames;var rE=Object.getPrototypeOf,nE=Object.prototype.hasOwnProperty;var Yr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Or=(e,t)=>{for(var r in t)cs(e,r,{get:t[r],enumerable:!0})},Cv=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of tE(t))!nE.call(e,n)&&n!==r&&cs(e,n,{get:()=>t[n],enumerable:!(o=eE(t,n))||o.enumerable});return e};var ds=(e,t,r)=>(r=e!=null?Q$(rE(e)):{},Cv(t||!e||!e.__esModule?cs(r,"default",{value:e,enumerable:!0}):r,e)),oE=e=>Cv(cs({},"__esModule",{value:!0}),e);var Uh=Yr((D3,CI)=>{"use strict";var zh=Object.defineProperty,Sz=Object.getOwnPropertyDescriptor,kz=Object.getOwnPropertyNames,Iz=Object.prototype.hasOwnProperty,Tz=(e,t)=>{for(var r in t)zh(e,r,{get:t[r],enumerable:!0})},$z=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of kz(t))!Iz.call(e,n)&&n!==r&&zh(e,n,{get:()=>t[n],enumerable:!(o=Sz(t,n))||o.enumerable});return e},Ez=e=>$z(zh({},"__esModule",{value:!0}),e),$I={};Tz($I,{SYMBOL_FOR_REQ_CONTEXT:()=>EI,getContext:()=>Cz});CI.exports=Ez($I);var EI=Symbol.for("@vercel/request-context");function Cz(){var t,r,o;return(o=(r=(t=globalThis[EI])==null?void 0:t.get)==null?void 0:r.call(t))!=null?o:{}}});var Ui=Yr((z3,PI)=>{"use strict";var Lh=Object.defineProperty,Az=Object.getOwnPropertyDescriptor,Pz=Object.getOwnPropertyNames,Oz=Object.prototype.hasOwnProperty,Rz=(e,t)=>{for(var r in t)Lh(e,r,{get:t[r],enumerable:!0})},Mz=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Pz(t))!Oz.call(e,n)&&n!==r&&Lh(e,n,{get:()=>t[n],enumerable:!(o=Az(t,n))||o.enumerable});return e},Nz=e=>Mz(Lh({},"__esModule",{value:!0}),e),AI={};Rz(AI,{VercelOidcTokenError:()=>Fh});PI.exports=Nz(AI);var Fh=class extends Error{constructor(t,r){super(t),this.name="VercelOidcTokenError",this.cause=r}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}});var NI=Yr((U3,MI)=>{"use strict";var jz=Object.create,Nu=Object.defineProperty,Dz=Object.getOwnPropertyDescriptor,zz=Object.getOwnPropertyNames,Uz=Object.getPrototypeOf,Fz=Object.prototype.hasOwnProperty,Lz=(e,t)=>{for(var r in t)Nu(e,r,{get:t[r],enumerable:!0})},OI=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of zz(t))!Fz.call(e,n)&&n!==r&&Nu(e,n,{get:()=>t[n],enumerable:!(o=Dz(t,n))||o.enumerable});return e},Zh=(e,t,r)=>(r=e!=null?jz(Uz(e)):{},OI(t||!e||!e.__esModule?Nu(r,"default",{value:e,enumerable:!0}):r,e)),qz=e=>OI(Nu({},"__esModule",{value:!0}),e),RI={};Lz(RI,{findRootDir:()=>Gz,getUserDataDir:()=>Hz});MI.exports=qz(RI);var Fi=Zh(require("path")),Zz=Zh(require("fs")),qh=Zh(require("os")),Vz=Ui();function Gz(){try{let e=process.cwd();for(;e!==Fi.default.dirname(e);){let t=Fi.default.join(e,".vercel");if(Zz.default.existsSync(t))return e;e=Fi.default.dirname(e)}}catch(e){throw new Vz.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function Hz(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(qh.default.platform()){case"darwin":return Fi.default.join(qh.default.homedir(),"Library/Application Support");case"linux":return Fi.default.join(qh.default.homedir(),".local/share");case"win32":return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}});var qI=Yr((F3,LI)=>{"use strict";var Bz=Object.create,ju=Object.defineProperty,Jz=Object.getOwnPropertyDescriptor,Wz=Object.getOwnPropertyNames,Kz=Object.getPrototypeOf,Yz=Object.prototype.hasOwnProperty,Xz=(e,t)=>{for(var r in t)ju(e,r,{get:t[r],enumerable:!0})},jI=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Wz(t))!Yz.call(e,n)&&n!==r&&ju(e,n,{get:()=>t[n],enumerable:!(o=Jz(t,n))||o.enumerable});return e},DI=(e,t,r)=>(r=e!=null?Bz(Kz(e)):{},jI(t||!e||!e.__esModule?ju(r,"default",{value:e,enumerable:!0}):r,e)),Qz=e=>jI(ju({},"__esModule",{value:!0}),e),zI={};Xz(zI,{isValidAccessToken:()=>n1,readAuthConfig:()=>t1,writeAuthConfig:()=>r1});LI.exports=Qz(zI);var Li=DI(require("fs")),UI=DI(require("path")),e1=Du();function FI(){let e=(0,e1.getVercelDataDir)();if(!e)throw new Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return UI.join(e,"auth.json")}function t1(){try{let e=FI();if(!Li.existsSync(e))return null;let t=Li.readFileSync(e,"utf8");return t?JSON.parse(t):null}catch(e){return null}}function r1(e){let t=FI(),r=UI.dirname(t);Li.existsSync(r)||Li.mkdirSync(r,{mode:504,recursive:!0}),Li.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function n1(e){if(!e.token)return!1;if(typeof e.expiresAt!="number")return!0;let t=Math.floor(Date.now()/1e3);return e.expiresAt>=t}});var HI=Yr((L3,GI)=>{"use strict";var Hh=Object.defineProperty,o1=Object.getOwnPropertyDescriptor,a1=Object.getOwnPropertyNames,i1=Object.prototype.hasOwnProperty,s1=(e,t)=>{for(var r in t)Hh(e,r,{get:t[r],enumerable:!0})},l1=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of a1(t))!i1.call(e,n)&&n!==r&&Hh(e,n,{get:()=>t[n],enumerable:!(o=o1(t,n))||o.enumerable});return e},u1=e=>l1(Hh({},"__esModule",{value:!0}),e),ZI={};s1(ZI,{processTokenResponse:()=>f1,refreshTokenRequest:()=>m1});GI.exports=u1(ZI);var Vh=require("os"),c1="https://vercel.com",d1="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",VI=`@vercel/oidc node-${process.version} ${(0,Vh.platform)()} (${(0,Vh.arch)()}) ${(0,Vh.hostname)()}`,Gh=null;async function p1(){if(Gh)return Gh;let e=`${c1}/.well-known/openid-configuration`,t=await fetch(e,{headers:{"user-agent":VI}});if(!t.ok)throw new Error("Failed to discover OAuth endpoints");let r=await t.json();if(!r||typeof r.token_endpoint!="string")throw new Error("Invalid OAuth discovery response");let o=r.token_endpoint;return Gh=o,o}async function m1(e){let t=await p1();return await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":VI},body:new URLSearchParams({client_id:d1,grant_type:"refresh_token",...e})})}async function f1(e){let t=await e.json();if(!e.ok){let r=typeof t=="object"&&t&&"error"in t?String(t.error):"Token refresh failed";return[new Error(r)]}return typeof t!="object"||t===null?[new Error("Invalid token response")]:typeof t.access_token!="string"?[new Error("Missing access_token in response")]:t.token_type!=="Bearer"?[new Error("Invalid token_type in response")]:typeof t.expires_in!="number"?[new Error("Missing expires_in in response")]:[null,t]}});var Du=Yr((q3,YI)=>{"use strict";var g1=Object.create,zu=Object.defineProperty,h1=Object.getOwnPropertyDescriptor,v1=Object.getOwnPropertyNames,y1=Object.getPrototypeOf,_1=Object.prototype.hasOwnProperty,b1=(e,t)=>{for(var r in t)zu(e,r,{get:t[r],enumerable:!0})},JI=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of v1(t))!_1.call(e,n)&&n!==r&&zu(e,n,{get:()=>t[n],enumerable:!(o=h1(t,n))||o.enumerable});return e},WI=(e,t,r)=>(r=e!=null?g1(y1(e)):{},JI(t||!e||!e.__esModule?zu(r,"default",{value:e,enumerable:!0}):r,e)),x1=e=>JI(zu({},"__esModule",{value:!0}),e),KI={};b1(KI,{assertVercelOidcTokenResponse:()=>Bh,findProjectInfo:()=>I1,getTokenPayload:()=>E1,getVercelCliToken:()=>S1,getVercelDataDir:()=>w1,getVercelOidcToken:()=>k1,isExpired:()=>C1,loadToken:()=>$1,saveToken:()=>T1});YI.exports=x1(KI);var qi=WI(require("path")),co=WI(require("fs")),Ia=Ui(),Uu=NI(),ka=qI(),BI=HI();function w1(){let e="com.vercel.cli",t=(0,Uu.getUserDataDir)();return t?qi.join(t,e):null}async function S1(){var t;let e=(0,ka.readAuthConfig)();if(!e)return null;if((0,ka.isValidAccessToken)(e))return e.token||null;if(!e.refreshToken)return(0,ka.writeAuthConfig)({}),null;try{let r=await(0,BI.refreshTokenRequest)({refresh_token:e.refreshToken}),[o,n]=await(0,BI.processTokenResponse)(r);if(o||!n)return(0,ka.writeAuthConfig)({}),null;let i={token:n.access_token,expiresAt:Math.floor(Date.now()/1e3)+n.expires_in};return n.refresh_token&&(i.refreshToken=n.refresh_token),(0,ka.writeAuthConfig)(i),(t=i.token)!=null?t:null}catch(r){return(0,ka.writeAuthConfig)({}),null}}async function k1(e,t,r){let o=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${r?`&teamId=${r}`:""}`,n=await fetch(o,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw new Ia.VercelOidcTokenError(`Failed to refresh OIDC token: ${n.statusText}`);let i=await n.json();return Bh(i),i}function Bh(e){if(!e||typeof e!="object")throw new TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||typeof e.token!="string")throw new TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function I1(){let e=(0,Uu.findRootDir)();if(!e)throw new Ia.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=qi.join(e,".vercel","project.json");if(!co.existsSync(t))throw new Ia.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let r=JSON.parse(co.readFileSync(t,"utf8"));if(typeof r.projectId!="string"&&typeof r.orgId!="string")throw new TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:r.projectId,teamId:r.orgId}}function T1(e,t){let r=(0,Uu.getUserDataDir)();if(!r)throw new Ia.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let o=qi.join(r,"com.vercel.token",`${t}.json`),n=JSON.stringify(e);co.mkdirSync(qi.dirname(o),{mode:504,recursive:!0}),co.writeFileSync(o,n),co.chmodSync(o,432)}function $1(e){let t=(0,Uu.getUserDataDir)();if(!t)throw new Ia.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r=qi.join(t,"com.vercel.token",`${e}.json`);if(!co.existsSync(r))return null;let o=JSON.parse(co.readFileSync(r,"utf8"));return Bh(o),o}function E1(e){let t=e.split(".");if(t.length!==3)throw new Ia.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let r=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=r.padEnd(r.length+(4-r.length%4)%4,"=");return JSON.parse(Buffer.from(o,"base64").toString("utf8"))}function C1(e){return e.exp*1e3{"use strict";var Wh=Object.defineProperty,A1=Object.getOwnPropertyDescriptor,P1=Object.getOwnPropertyNames,O1=Object.prototype.hasOwnProperty,R1=(e,t)=>{for(var r in t)Wh(e,r,{get:t[r],enumerable:!0})},M1=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of P1(t))!O1.call(e,n)&&n!==r&&Wh(e,n,{get:()=>t[n],enumerable:!(o=A1(t,n))||o.enumerable});return e},N1=e=>M1(Wh({},"__esModule",{value:!0}),e),XI={};R1(XI,{refreshToken:()=>j1});QI.exports=N1(XI);var Jh=Ui(),po=Du();async function j1(){let{projectId:e,teamId:t}=(0,po.findProjectInfo)(),r=(0,po.loadToken)(e);if(!r||(0,po.isExpired)((0,po.getTokenPayload)(r.token))){let o=await(0,po.getVercelCliToken)();if(!o)throw new Jh.VercelOidcTokenError("Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`");if(!e)throw new Jh.VercelOidcTokenError("Failed to refresh OIDC token: Try re-linking your project with `vc link`");if(r=await(0,po.getVercelOidcToken)(o,e,t),!r)throw new Jh.VercelOidcTokenError("Failed to refresh OIDC token");(0,po.saveToken)(r,e)}process.env.VERCEL_OIDC_TOKEN=r.token}});var nT=Yr((V3,rT)=>{"use strict";var Yh=Object.defineProperty,D1=Object.getOwnPropertyDescriptor,z1=Object.getOwnPropertyNames,U1=Object.prototype.hasOwnProperty,F1=(e,t)=>{for(var r in t)Yh(e,r,{get:t[r],enumerable:!0})},L1=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of z1(t))!U1.call(e,n)&&n!==r&&Yh(e,n,{get:()=>t[n],enumerable:!(o=D1(t,n))||o.enumerable});return e},q1=e=>L1(Yh({},"__esModule",{value:!0}),e),tT={};F1(tT,{getVercelOidcToken:()=>G1,getVercelOidcTokenSync:()=>Kh});rT.exports=q1(tT);var Z1=Uh(),V1=Ui();async function G1(){let e="",t;try{e=Kh()}catch(r){t=r}try{let[{getTokenPayload:r,isExpired:o},{refreshToken:n}]=await Promise.all([await Promise.resolve().then(()=>ds(Du())),await Promise.resolve().then(()=>ds(eT()))]);(!e||o(r(e)))&&(await n(),e=Kh())}catch(r){let o=t instanceof Error?t.message:"";throw r instanceof Error&&(o=`${o} +${r.message}`),o?new V1.VercelOidcTokenError(o):r}return e}function Kh(){var t,r;let e=(r=(t=(0,Z1.getContext)().headers)==null?void 0:t["x-vercel-oidc-token"])!=null?r:process.env.VERCEL_OIDC_TOKEN;if(!e)throw new Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return e}});var Qh=Yr((G3,iT)=>{"use strict";var Xh=Object.defineProperty,H1=Object.getOwnPropertyDescriptor,B1=Object.getOwnPropertyNames,J1=Object.prototype.hasOwnProperty,W1=(e,t)=>{for(var r in t)Xh(e,r,{get:t[r],enumerable:!0})},K1=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of B1(t))!J1.call(e,n)&&n!==r&&Xh(e,n,{get:()=>t[n],enumerable:!(o=H1(t,n))||o.enumerable});return e},Y1=e=>K1(Xh({},"__esModule",{value:!0}),e),aT={};W1(aT,{getContext:()=>X1.getContext,getVercelOidcToken:()=>oT.getVercelOidcToken,getVercelOidcTokenSync:()=>oT.getVercelOidcTokenSync});iT.exports=Y1(aT);var oT=nT(),X1=Uh()});var _F={};Or(_F,{default:()=>Cc});module.exports=oE(_F);var as=require("obsidian");var zc=require("obsidian");var Ua=require("obsidian"),ps=class extends Ua.Modal{constructor(t,r,o){super(t),this.folderName=r,this.folderPath=o,this.result=!1,this.modalPromise=new Promise(n=>{this.resolveModalPromise=n})}onOpen(){let{contentEl:t}=this;t.createEl("h2",{text:`[ChatGPT MD] No ${this.folderName} folder found.`}),t.createEl("p",{text:`If you choose "Yes, Create", the plugin will automatically create a folder at: ${this.folderPath}. You can change this path in the plugin settings.`}),new Ua.Setting(t).addButton(r=>r.setButtonText("Yes, Create Folder").setTooltip("Create folder").setCta().onClick(()=>{this.result=!0,this.resolveModalPromise(this.result),this.close()})),new Ua.Setting(t).addButton(r=>r.setButtonText("No, I'll create it myself").setTooltip("Cancel").setCta().onClick(()=>{this.result=!1,this.resolveModalPromise(this.result),this.close()}))}waitForModalValue(){return this.modalPromise}onClose(){let{contentEl:t}=this;t.empty()}};var Av=async(e,t,r)=>{let o=new ps(e,t,r);o.open();let n=await o.waitForModalValue();return n&&await e.vault.createFolder(r),n};var _o=class{constructor(t){this.app=t}async writeInferredTitle(t,r){var l,d;let o=t.file;if(!o)throw new Error("No file is currently open");let n=this.sanitizeFileName(r),i=(d=(l=o.parent)==null?void 0:l.path)!=null?d:"/",s=`${i}/${n}.md`;for(let u=1;await this.app.vault.adapter.exists(s);u++)s=`${i}/${n} (${u}).md`;try{await this.app.fileManager.renameFile(o,s)}catch(u){throw new zc.Notice("[ChatGPT MD] Error writing inferred title to editor"),u}}sanitizeFileName(t){return t.replace(/[\\/:*?"<>|]/g,"-")}async ensureFolderExists(t,r){return!await this.app.vault.adapter.exists(t)&&!await Av(this.app,r,t)?(new zc.Notice(`[ChatGPT MD] No ${r} found. One must be created to use the plugin. Set one in settings and make sure it exists.`),!1):!0}async createNewFile(t,r){return this.app.vault.create(t,r)}async readFile(t){return this.app.vault.read(t)}async getLinkedNoteContent(t){try{let r=this.app.metadataCache.getFirstLinkpathDest(t,"");return r?await this.app.vault.read(r):null}catch(r){return null}}formatDate(t,r){return t.toISOString().replace(/[-:]/g,"").replace(/\..+/,"")}};var aE="ChatGPT MD",Uc=`[${aE}]`,it="ollama",rt="openai",Ve="openrouter",ut="lmstudio",st="anthropic",lt="gemini",mt="zai";var AF={[rt]:"/v1/chat/completions",[Ve]:"/api/v1/chat/completions",[it]:"/api/chat",[ut]:"/v1/chat/completions",[st]:"/v1/messages",[lt]:"/v1beta/models/{model}:generateContent"};var Pv="add-hr",Ov="call-chatgpt-api",Rv="stop-streaming",Mv="move-to-chat",Nv="infer-title",jv="choose-chat-template",Dv="clear-chat";var Fc="chatFolder",zv="chatTemplateFolder",Fa="agentFolder",Uv="choose-agent",Fv="create-agent",vt=` + +`,Lv=/\[\[([^\][]+)\]\]/g,qv=/\[([^\]]+)\]\(([^()]+)\)/g,Zv=`=begin-chatgpt-md-comment${vt}`,Vv="=end-chatgpt-md-comment",Gv=3,Lc=6,Hv="English",Bv=4,ms="YYYYMMDDhhmmss",Jv="Failed to fetch",qc="__chatgpt_plugin",bo=`
`,Rr="role::",Xr="assistant",Wv="developer";var zt="user",_n=6e3,Kv=6e3,Yv=9e3,fs="You're chatting with a user in Obsidian, a knowledge management system where they organize notes in interconnected Markdown files. This conversation appears as a chat within their active document.\n\nBe helpful and concise. Use proper Markdown: ```language for code blocks, `inline` for code/filenames. Support [[Internal Links]] and [external links](url). Consider this chat is part of their personal knowledge base.\n\nWhen appropriate, end with an open question to keep the conversation helpful and make contextual offers based on their last message.",Xv=`You are an expert AI agent architect. Your job is to create a well-designed AI agent configuration based on a user's description of what they want the agent to do. + +You MUST respond with ONLY valid JSON (no markdown, no explanation, no code fences). The JSON must have exactly these three fields: + +{ + "name": "Short Agent Name", + "temperature": 0.7, + "prompt": "The comprehensive system prompt for the agent..." +} + +## Field Guidelines + +### name +- 2-4 words, descriptive and concise +- Use title case (e.g., "Code Review Expert", "Creative Writing Coach") +- Should clearly convey the agent's purpose at a glance + +### temperature (0 to 2) +Choose based on the agent's purpose: +- 0.0-0.3: Factual, precise, deterministic tasks (code review, data analysis, math, legal) +- 0.4-0.7: Balanced tasks (general assistance, tutoring, summarization, Q&A) +- 0.8-1.2: Creative tasks (writing, brainstorming, storytelling, ideation) +- 1.3-2.0: Highly experimental/random output (only for very specific creative needs) + +### prompt +Create a comprehensive system prompt that includes: + +1. **Role Definition**: Who the agent is, their expertise, and professional background +2. **Core Capabilities**: What the agent can do, listed clearly +3. **Behavioral Guidelines**: How the agent should communicate (tone, style, formality level) +4. **Constraints & Boundaries**: What the agent should NOT do or topics to avoid +5. **Response Format**: How responses should be structured (use of headers, lists, code blocks, etc.) +6. **Context Awareness**: Remind the agent they operate within Obsidian, a knowledge management system with Markdown notes +7. **Interaction Patterns**: How to handle follow-up questions, clarifications, and edge cases + +The prompt should be thorough (200-500 words), well-structured, and immediately usable without modification. Use clear language and avoid vague instructions.`,Qv="\u26A0\uFE0F **Response was truncated due to token limit.** Please increase the `max_tokens` setting in ChatGPT MD plugin settings to get the complete response.",ey="\u26A0\uFE0F *Note: Some alternative responses were truncated due to token limit. Consider increasing `max_tokens` in settings for fuller responses.*",ty="Response was truncated due to token limit",ry="\u26A0\uFE0F Title Inference Error";function gs(e){if(!e||!e.trim().startsWith("---"))return e;let t=e.split(` +`),r=-1;for(let o=1;o{let p=c.trim();return p.startsWith("'")&&p.endsWith("'")||p.startsWith('"')&&p.endsWith('"')?p.slice(1,-1):p}):m==="true"?o[u]=!0:m==="false"?o[u]=!1:m==="null"?o[u]=null:isNaN(Number(m))?o[u]=m:o[u]=Number(m)}return n!==null&&(o[n]=i),o}function Zc(e){return`--- +${Object.entries(e).map(([r,o])=>o==null?`${r}:`:typeof o=="string"?`${r}: "${o}"`:Array.isArray(o)?`${r}: [${o.map(n=>`"${n}"`).join(", ")}]`:`${r}: ${o}`).join(` +`)} +--- +`}function Vc(e){let t="=begin-chatgpt-md-comment",r="=end-chatgpt-md-comment",o=e.indexOf(t);if(o===-1)return e;let n=e.indexOf(r,o);return n===-1?e:e.substring(0,o)+e.substring(n+r.length)}function ny(e){let t=[{regex:Lv,fullMatchIndex:0,titleIndex:1},{regex:qv,fullMatchIndex:0,titleIndex:2}],r=[],o=new Set;for(let{regex:n,fullMatchIndex:i,titleIndex:s}of t)for(let l of e.matchAll(n)){let d=l[i],u=l[s];u&&u.includes("|")&&(u=u.split("|")[0].trim()),u&&!o.has(u)&&!u.startsWith("http://")&&!u.startsWith("https://")&&(r.push({link:d,title:u}),o.add(u))}return r}function oy(e){return e?e.split(bo):[]}var iE=e=>{let t=e.trim().toLowerCase(),o=[zt,Xr,Wv].find(n=>t.includes(n));if(o)return o;throw new Error(`Failed to extract role from input: "${e}"`)},ay=e=>{try{if(!e.includes(Rr))return{role:zt,content:e};let[t,...r]=e.split(Rr)[1].split(` +`);return{role:iE(t),content:r.join(` +`).trim()}}catch(t){throw new Error(`Failed to extract role and message: ${t}`)}},Qr=e=>e===0?"":e>Lc?"#".repeat(Lc)+" ":"#".repeat(e)+" ",Mr=(e,t,r)=>`${vt}${bo}${vt}${e}${Rr}${t}${r?` (${r})`:""}${vt}`,iy=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var xo=class{constructor(t,r){this.fileService=t;this.notificationService=r}findLinksInMessage(t){return ny(t)}splitMessages(t){return oy(t)}removeYAMLFrontMatter(t){return gs(t)}removeCommentsFromMessages(t){return Vc(t)}extractRoleAndMessage(t){return ay(t)}cleanMessagesFromNote(t){return this.splitMessages(this.removeYAMLFrontMatter(t.getValue())).map(o=>this.removeCommentsFromMessages(o))}async getMessagesFromEditor(t,r){let o=this.cleanMessagesFromNote(t);o=await Promise.all(o.map(async i=>{let s=this.findLinksInMessage(i);for(let l of s)try{let d=await this.fileService.getLinkedNoteContent(l.title);if(d){let u=new RegExp(`${vt}${bo}${vt}#+ ${Rr}(?:${zt}|${Xr}).*$`,"gm");d=d==null?void 0:d.replace(u,""),d=this.removeYAMLFrontMatter(d)||null,i=i.replace(new RegExp(iy(l.link),"g"),`${vt}${l.title}${vt}${d}${vt}`)}}catch(d){}return i}));let n=o.map(i=>this.extractRoleAndMessage(i));return{messages:o,messagesWithRole:n}}addSystemCommandsToMessages(t,r){return!r||r.length===0?t:[...r.map(n=>({role:"system",content:n})),...t]}formatMessage(t,r,o){let n=Qr(r);return`${Mr(n,t.role,o)}${t.content}`}appendMessage(t,r,o){let n=Qr(o),i=Mr(n,Xr),s=Mr(n,zt);t.replaceRange(`${i}${r}${s}`,t.getCursor())}processResponse(t,r,o){r.mode==="streaming"?r.wasAborted||this.processStreamingResponse(t,o):this.processStandardResponse(t,r,o)}processStreamingResponse(t,r){let o=Qr(r.headingLevel),n=Mr(o,zt),i=t.getCursor();t.replaceRange(n,i);let s=t.offsetToPos(t.posToOffset(i)+n.length);t.setCursor(s)}processStandardResponse(t,r,o){let n,i;typeof r=="object"&&r!==null?(n=r.fullString||JSON.stringify(r.text||r)||"[No response]",i=r.model):n=String(r||"[No response]");let s=Qr(o.headingLevel),l=Mr(s,Xr,i),d=Mr(s,zt),u=t.getCursor(),m=`${l}${n}${d}`;t.replaceRange(m,u);let c=t.offsetToPos(t.posToOffset(u)+m.length);t.setCursor(c)}};var en=require("obsidian");var bn=require("obsidian"),vs=class extends bn.SuggestModal{constructor(t,r,o){super(t),this.settings=r,this.titleDate=o}getFilesInChatFolder(){let t=this.app.vault.getAbstractFileByPath(this.settings.chatTemplateFolder);if(t!=null)return t.children;throw new bn.Notice(`Error getting folder: ${this.settings.chatTemplateFolder}`),new Error(`Error getting folder: ${this.settings.chatTemplateFolder}`)}getSuggestions(t){let r=this.getFilesInChatFolder();return t==""?r.map(o=>({title:o.basename,file:o})).sort((o,n)=>o.title.localeCompare(n.title)):r.filter(o=>o.basename.toLowerCase().includes(t.toLowerCase())).map(o=>({title:o.basename,file:o})).sort((o,n)=>o.title.localeCompare(n.title))}renderSuggestion(t,r){r.createEl("div",{text:t.title})}async onChooseSuggestion(t,r){new bn.Notice(`Selected ${t.title}`);let o=await this.app.vault.read(t.file),n=o;!/^---\n[\s\S]*?\n---/.test(o)&&this.settings.defaultChatFrontmatter&&(n=this.settings.defaultChatFrontmatter+` + +`+o);let s=`${this.titleDate} ${t.title}`,l=(0,bn.normalizePath)(`${this.settings.chatFolder}/${s}.md`),d=1;for(;await this.app.vault.adapter.exists(l);)l=(0,bn.normalizePath)(`${this.settings.chatFolder}/${s} (${d}).md`),d++;try{let u=await this.app.vault.create(l,n);await this.app.workspace.openLinkText(u.basename,"",!0)}catch(u){}}};var wo=class{constructor(t,r,o){this.app=t;this.fileService=r;this.editorService=o}async createNewChatFromTemplate(t,r){try{if(!t.chatFolder||t.chatFolder.trim()===""){new en.Notice("[ChatGPT MD] No chat folder value found. Please set one in settings.");return}if(!t.chatTemplateFolder||t.chatTemplateFolder.trim()===""){new en.Notice("[ChatGPT MD] No chat template folder value found. Please set one in settings.");return}if(!await this.fileService.ensureFolderExists(t.chatFolder,Fc)||!await this.fileService.ensureFolderExists(t.chatTemplateFolder,zv))return;new vs(this.app,t,r).open()}catch(o){new en.Notice("[ChatGPT MD] Error in Create new chat from template, check console")}}async createNewChatWithHighlightedText(t,r){try{let o=t.getSelection();if(!r.chatFolder||r.chatFolder.trim()===""){new en.Notice("[ChatGPT MD] No chat folder value found. Please set one in settings.");return}if(!await this.fileService.ensureFolderExists(r.chatFolder,Fc))return;let i=`${this.fileService.formatDate(new Date,r.dateFormat)}.md`,s=`${r.chatFolder}/${i}`,l="";r.defaultChatFrontmatter&&(l=r.defaultChatFrontmatter+` + +`),o&&(l+=o);let d=await this.fileService.createNewFile(s,l);await this.app.workspace.openLinkText(d.basename,"",!0,{state:{mode:"source"}});let u=this.app.workspace.getActiveViewOfType(en.MarkdownView);if(!u){new en.Notice("No active markdown editor found.");return}u.editor.focus(),this.editorService.moveCursorToEnd(u.editor)}catch(o){new en.Notice("[ChatGPT MD] Error in Create new chat with highlighted text, check console")}}};var So=class{constructor(t){this.app=t}async readFrontmatter(t){try{let r=this.app.metadataCache.getFileCache(t);return r!=null&&r.frontmatter?{...r.frontmatter}:null}catch(r){return null}}async writeFrontmatter(t,r){try{await this.app.fileManager.processFrontMatter(t,o=>{Object.keys(o).forEach(n=>{delete o[n]}),Object.assign(o,r)})}catch(o){throw new Error(`Failed to write frontmatter: ${o.message}`)}}async updateFrontmatterField(t,r,o){try{await this.app.fileManager.processFrontMatter(t,n=>{n[r]=o})}catch(n){throw new Error(`Failed to update frontmatter field '${r}': ${n.message}`)}}async mergeFrontmatter(t,r){try{await this.app.fileManager.processFrontMatter(t,o=>{Object.assign(o,r)})}catch(o){throw new Error(`Failed to merge frontmatter: ${o.message}`)}}hasFrontmatter(t){try{let r=this.app.metadataCache.getFileCache(t);return!!(r!=null&&r.frontmatter&&Object.keys(r.frontmatter).length>0)}catch(r){return!1}}async removeFrontmatterField(t,r){try{await this.app.fileManager.processFrontMatter(t,o=>{delete o[r]})}catch(o){throw new Error(`Failed to remove frontmatter field '${r}': ${o.message}`)}}async removeFrontmatterFields(t,r){try{await this.app.fileManager.processFrontMatter(t,o=>{r.forEach(n=>{delete o[n]})})}catch(o){throw new Error(`Failed to remove frontmatter fields: ${o.message}`)}}async clearFrontmatter(t){try{await this.app.fileManager.processFrontMatter(t,r=>{Object.keys(r).forEach(o=>{delete r[o]})})}catch(r){throw new Error(`Failed to clear frontmatter: ${r.message}`)}}async getFrontmatterField(t,r,o){try{let n=await this.readFrontmatter(t);return!n||!(r in n)?o:n[r]}catch(n){return o}}async hasFrontmatterField(t,r){try{let o=await this.readFrontmatter(t);return!!(o&&r in o)}catch(o){return!1}}};var dy=require("obsidian");var sy=require("obsidian"),Ut=class{showNotification(t,r=5e3){new sy.Notice(t,r)}formatChatMessage(t,r=!1){return r?`I am sorry. ${t}`:t}showSuccess(t){this.showNotification(`\u2705 ${t}`,3e3)}showWarning(t){this.showNotification(`\u26A0\uFE0F ${t}`,5e3)}showError(t){this.showNotification(`\u274C ${t}`,7e3)}};function ly(e,t,r){let o=`${vt}
${vt}${Qr(r)}${Rr}${t}${vt}`,n=e.getCursor();e.replaceRange(o,n),e.setCursor(n.line+o.split(` +`).length-1,0)}function uy(e){try{let r={line:e.lastLine()+1,ch:0};e.setCursor(r)}catch(t){throw new Error("Error moving cursor to end of file"+t)}}function cy(e,t,r){let o=e.getCursor(),n=`${t}${vt}${r}`;e.replaceRange(n,o),e.setCursor({line:o.line+1,ch:o.ch})}var ys=class{constructor(t,r,o,n,i){this.app=t;this.fileService=r||new _o(t),this.frontmatterManager=new So(t);let s=new Ut;if(this.messageService=o||new xo(this.fileService,s),!i)throw new Error("SettingsService must be provided as it includes frontmatter operations");this.settingsService=i,this.templateService=n||new wo(t,this.fileService,this)}async writeInferredTitle(t,r){return this.fileService.writeInferredTitle(t,r)}async ensureFolderExists(t,r){return this.fileService.ensureFolderExists(t,r)}getDate(t,r){return this.fileService.formatDate(t,r)}addHorizontalRule(t,r,o){ly(t,r,o)}async clearChat(t){let r=await this.preserveFrontmatter();t.setValue(r),this.positionCursorAfterClear(t,r)}async preserveFrontmatter(){if(!this.app||!this.frontmatterManager)return"";let t=this.app.workspace.getActiveViewOfType(dy.MarkdownView);if(!(t!=null&&t.file))return"";try{let r=await this.frontmatterManager.readFrontmatter(t.file);return!r||Object.keys(r).length===0?"":this.formatFrontmatter(r)}catch(r){return""}}formatFrontmatter(t){let r=Object.entries(t).filter(([o])=>o!=="position").map(([o,n])=>typeof n=="string"?`${o}: "${n}"`:`${o}: ${n}`);return r.length>0?`--- +${r.join(` +`)} +--- + +`:""}positionCursorAfterClear(t,r){r?t.setCursor({line:t.lastLine()+1,ch:0}):t.setCursor({line:0,ch:0})}moveCursorToEnd(t){uy(t)}addCommentBlock(t,r,o){cy(t,r,o)}async getMessagesFromEditor(t,r){return this.messageService.getMessagesFromEditor(t,r)}async createNewChatFromTemplate(t,r){return this.templateService.createNewChatFromTemplate(t,r)}async createNewChatWithHighlightedText(t,r){return this.templateService.createNewChatWithHighlightedText(t,r)}async getFrontmatter(t,r,o){return await this.settingsService.getFrontmatter(t)}processResponse(t,r,o){this.messageService.processResponse(t,r,o)}async setModel(t,r){await this.settingsService.updateFrontmatterField(t,"model",r)}};var tn={API:{AUTH_FAILED:"Authentication failed. Please check your API key in settings.",NETWORK_ERROR:"Network error. Please check your connection and try again.",RATE_LIMIT:"Rate limit exceeded. Please wait and try again.",INVALID_MODEL:"Invalid model selected. Please choose a different model.",TIMEOUT:"Request timed out. Please try again.",INVALID_RESPONSE:"Invalid response from API. Please try again.",CONNECTION_REFUSED:"Connection refused. Please check the API URL in settings."},VAULT:{FILE_NOT_FOUND:e=>`File not found: ${e}`,FOLDER_NOT_FOUND:e=>`Folder not found: ${e}`,READ_ERROR:e=>`Error reading file: ${e}`,WRITE_ERROR:e=>`Error writing to file: ${e}`},TOOL:{EXECUTION_FAILED:e=>`Failed to execute tool: ${e}`,APPROVAL_CANCELLED:"Tool execution cancelled by user",INVALID_PARAMS:e=>`Invalid parameters for tool: ${e}`,NOT_SUPPORTED:e=>`Tool ${e} is not supported by this model`},VALIDATION:{REQUIRED_FIELD:e=>`${e} is required`,INVALID_URL:e=>`Invalid URL: ${e}`,INVALID_FORMAT:(e,t)=>`Invalid ${e} format. Expected: ${t}`,EMPTY_CONTENT:"Content cannot be empty"},SETTINGS:{MISSING_API_KEY:e=>`Missing API key for ${e}. Please add it in settings.`,INVALID_FOLDER:e=>`Invalid folder path: ${e}`,MISSING_MODEL:"No model selected. Please choose a model in settings or note frontmatter."}};function py(e){switch(e){case 400:return"Bad request. Please check your input and try again.";case 401:return tn.API.AUTH_FAILED;case 403:return"Access forbidden. Please check your API key and permissions.";case 404:return"Resource not found. Please check the URL or model name.";case 429:return tn.API.RATE_LIMIT;case 500:case 502:case 503:return"Server error. Please try again later.";case 504:return"Gateway timeout. The request took too long. Please try again.";default:return`API error (${e}). Please try again.`}}function sE(e){var t;return typeof e=="string"?e:e instanceof Error||e!=null&&e.message?e.message:(t=e==null?void 0:e.error)!=null&&t.message?e.error.message:e!=null&&e.error?typeof e.error=="string"?e.error:JSON.stringify(e.error):"An unexpected error occurred. Please try again."}function my(e,t){let r=sE(e),o=t?`[${t}]`:"[Error]";return e instanceof Error&&e.stack?`${o} ${r} +${e.stack}`:`${o} ${r}`}var Nr=class{constructor(t){this.notificationService=t}handleApiError(t,r,o={showNotification:!0,logToConsole:!0,returnForChat:!1}){var c,p,f,v,g,y,S;let n=`[ChatGPT MD] ${r}`,i=((c=o.context)==null?void 0:c.model)||"",s=((p=o.context)==null?void 0:p.url)||"",l=this.formatContextInfo(i,s),d="",u="";t instanceof Object?t.name==="AbortError"?d="Request was cancelled":t.message===Jv?d=tn.API.NETWORK_ERROR:t.status===401||((f=t.error)==null?void 0:f.status)===401?d=tn.API.AUTH_FAILED:t.status===404||((v=t.error)==null?void 0:v.status)===404?d=tn.API.INVALID_MODEL:t.status===429||((g=t.error)==null?void 0:g.status)===429?d=tn.API.RATE_LIMIT:t.status&&t.status>=400?d=py(t.status||((y=t.error)==null?void 0:y.status)):(S=t.error)!=null&&S.message?d=t.error.message:t.message?d=t.message:d="An unexpected error occurred":d=typeof t=="string"?t:"An unexpected error occurred";let m=`${n}: ${d}${l?` - ${l}`:""}`;if(o.logToConsole&&(u=my(t,r)),o.showNotification&&this.notificationService.showNotification(m,5e3),o.returnForChat)return`I am sorry, I could not answer your request because of an error, here is what went wrong- + +${d} + +Model- ${i}, URL- ${s}`;throw new Error(m)}formatContextInfo(t,r){let o=[];return t&&o.push(`Model: ${t}`),r&&o.push(`URL: ${r}`),o.length>0?o.join(", "):""}handleUrlError(t,r,o){let n=tn.API.CONNECTION_REFUSED,i=`[ChatGPT MD] ${n} (${t})`;return this.notificationService.showNotification(i),`I am sorry, I could not answer your request because of an error, here is what went wrong- + +${n} + +Please check your API URL settings.`}handleModelError(t,r){let o=tn.SETTINGS.MISSING_MODEL,n=`[ChatGPT MD] ${o}`;return this.notificationService.showNotification(n),`I am sorry, there was an error with the model configuration. ${o}`}handleValidationError(t,r){let o=`[ChatGPT MD] Validation Error: ${t}`;throw this.notificationService.showNotification(o),new Error(o)}};var Hc=require("obsidian");function fy(e,t){if(typeof e!="string")throw new Error(`${t} must be a string`);if(e.trim().length===0)throw new Error(`${t} cannot be empty`)}function gy(e,t){if(!e||typeof e!="string")throw new Error(`${t} API key is required`);if(e.trim().length===0)throw new Error(`${t} API key cannot be empty`);if(e.length<10)throw new Error(`${t} API key appears to be invalid (too short)`)}function hy(e){if(typeof e!="string")throw new Error("URL must be a string");if(e.trim().length===0)throw new Error("URL cannot be empty");try{new URL(e)}catch(t){throw new Error(`Invalid URL format: ${e}`)}}function ur(e){return!!e&&e.trim()!==""}var xn=class{constructor(t){this.notificationService=t||new Ut}getApiKey(t,r){switch(r){case rt:return t.apiKey;case Ve:return t.openrouterApiKey;case st:return t.anthropicApiKey;case lt:return t.geminiApiKey;case mt:return t.zaiApiKey;case it:return"";case ut:return"";default:return""}}validateApiKey(t,r){if(!(r===it||r===ut))try{gy(t,r)}catch(o){let n=`${r} API key is missing or invalid. Please add your ${r} API key in the settings or set your default model in the settings if you use Ollama or LM Studio.`;throw this.notificationService.showError(n),new Error(n)}}createAuthHeaders(t,r){let o={"Content-Type":"application/json"};switch(r){case rt:o.Authorization=`Bearer ${t}`;break;case Ve:o.Authorization=`Bearer ${t}`,o["HTTP-Referer"]="https://github.com/bramses/chatgpt-md",o["X-Title"]="Obsidian ChatGPT MD Plugin";break;case st:o["x-api-key"]=t,o["anthropic-version"]="2023-06-01";break;case lt:o["x-goog-api-key"]=t;break;case mt:o.Authorization=`Bearer ${t}`;break;case it:break;case ut:break}return o}};var _s,bs,Gc;try{let e=globalThis.require,t=e("http"),r=e("https"),o=e("url");_s=t.request,bs=r.request,Gc=o.URL}catch(e){_s=null,bs=null,Gc=globalThis.URL}async function vy(e){return _s&&bs?lE(e):uE(e)}async function lE(e){return new Promise((t,r)=>{let o=new Gc(e.url),n=o.protocol==="https:",i=n?bs:_s,s={hostname:o.hostname==="localhost"?"127.0.0.1":o.hostname,port:o.port||(n?443:80),path:o.pathname+o.search,method:e.method||"GET",headers:{"Content-Type":"application/json",...e.headers}},l=i(s,d=>{let u=new Headers;Object.entries(d.headers).forEach(([v,g])=>{g&&u.set(v,Array.isArray(g)?g.join(", "):String(g))});let m=d.statusCode||0,c=m>=200&&m<300,p=new ReadableStream({start(v){d.on("data",g=>{v.enqueue(new Uint8Array(g))}),d.on("end",()=>{v.close()}),d.on("error",g=>{v.error(g)})}}),f={ok:c,status:m,statusText:d.statusMessage||"",headers:u,body:p,json:async()=>{let v=p.getReader(),g=[];try{for(;;){let{done:k,value:w}=await v.read();if(k)break;g.push(w)}let y=g.reduce((k,w)=>k+w.length,0),S=new Uint8Array(y),b=0;for(let k of g)S.set(k,b),b+=k.length;let _=new TextDecoder().decode(S);return JSON.parse(_)}finally{v.releaseLock()}},text:async()=>{let v=p.getReader(),g=[];try{for(;;){let{done:_,value:k}=await v.read();if(_)break;g.push(k)}let y=g.reduce((_,k)=>_+k.length,0),S=new Uint8Array(y),b=0;for(let _ of g)S.set(_,b),b+=_.length;return new TextDecoder().decode(S)}finally{v.releaseLock()}},clone:()=>{throw new Error("Response cloning not implemented for requestStream")}};t(f)});e.signal&&e.signal.addEventListener("abort",()=>{l.destroy(),r(new Error("Request aborted"))}),l.on("error",d=>{r(d)}),e.body&&l.write(e.body),l.end()})}async function uE(e){let t={...e.headers&&!e.headers["Content-Type"]&&!e.headers["content-type"]?{"Content-Type":"application/json"}:{},...e.headers},r={method:e.method||"GET",headers:t,signal:e.signal};return e.body&&(r.body=e.body),await fetch(e.url,r)}function _y(e,t,r){let o=Mr(t,Xr,r),n=e.getCursor();e.replaceRange(o,n);let i=e.posToOffset(n),s=e.offsetToPos(i+o.length);return e.setCursor(s),{initialCursor:n,newCursor:s}}function yy(e){var o,n;if(!e||e.length===0)return null;let t=e.filter(i=>i.finish_reason==="stop"),r=e.filter(i=>i.finish_reason==="length");if(t.length>0){let i=((o=t[0].message)==null?void 0:o.content)||"";return r.length>0?i+` + +`+ey:i}return r.length>0?Qv:((n=e[0].message)==null?void 0:n.content)||""}function cE(e){return e.content&&Array.isArray(e.content)?e.content.filter(t=>t.type==="text").map(t=>t.text).join(""):e.content||JSON.stringify(e)}function dE(e){if(e.candidates&&e.candidates.length>0){let t=e.candidates[0];if(t.content&&t.content.parts&&t.content.parts.length>0)return t.content.parts.filter(r=>r.text).map(r=>r.text).join("")}return e.text||JSON.stringify(e)}function pE(e){return e.message&&e.message.content?e.message.content:e.response?e.response:JSON.stringify(e)}function by(e,t){switch(t){case rt:case Ve:case ut:let r=yy(e.choices);return r!==null?r:"";case st:return cE(e);case lt:return dE(e);case it:return pE(e);default:let o=yy(e==null?void 0:e.choices);return o!==null?o:(e==null?void 0:e.response)||JSON.stringify(e)}}var ko=class{constructor(t,r,o){this.abortController=null;this.wasStreamingAborted=!1;this.notificationService=r||new Ut,this.errorService=t||new Nr(this.notificationService),this.apiAuthService=o||new xn}async makeNonStreamingRequest(t,r,o,n){try{hy(t),fy(n,"Service type");let s=(await(0,Hc.requestUrl)({url:t,method:"POST",headers:o,contentType:"application/json",body:JSON.stringify(r),throw:!1})).json;return s!=null&&s.error?this.errorService.handleApiError({error:s.error},n,{returnForChat:!0,showNotification:!0,context:{model:r.model,url:t}}):by(s,n)}catch(i){return this.errorService.handleApiError(i,n,{returnForChat:!0,showNotification:!0,context:{model:r.model,url:t}})}}async makeGetRequest(t,r,o){try{let n=await(0,Hc.requestUrl)({url:t,method:"GET",headers:r,throw:!1});if(n.status!==200)throw new Error(`Failed to fetch data from ${t}: ${n.status}`);return n.json}catch(n){throw n}}async handleHttpError(t,r,o,n){let i;try{i=await t.json()}catch(l){i={status:t.status,statusText:t.statusText}}let s=this.errorService.handleApiError(i,r,{returnForChat:!1,showNotification:!0,context:{model:o.model,url:n,status:t.status}});return new Error(s)}handleRequestError(t,r,o,n){return this.errorService.handleApiError(t,r,{returnForChat:!1,showNotification:!0,context:{model:o.model,url:n}})}setAbortController(t){this.abortController=t,this.wasStreamingAborted=!1}stopStreaming(){this.abortController&&(this.wasStreamingAborted=!0,this.abortController.abort(),this.abortController=null)}wasAborted(){return this.wasStreamingAborted}resetAbortedFlag(){this.wasStreamingAborted=!1}createFetchAdapter(){return async(t,r)=>{let n={url:typeof t=="string"?t:t instanceof URL?t.toString():t.url,method:(r==null?void 0:r.method)||"GET",headers:r!=null&&r.headers?typeof r.headers=="object"&&"forEach"in r.headers?this.convertHeadersToRecord(r.headers):r.headers:{},body:r!=null&&r.body?typeof r.body=="string"?r.body:JSON.stringify(r.body):void 0,signal:(r==null?void 0:r.signal)||void 0};return vy(n)}}convertHeadersToRecord(t){let r={};return t.forEach((o,n)=>{r[n]=o}),r}};var xy=50;function Bc(e,t,r,o){if(t.length===0)return r;if(o)e.replaceSelection(t);else{e.replaceRange(t,r);let i=e.posToOffset(r)+t.length,s=e.offsetToPos(i);return e.setCursor(s),s}return r}function wy(e,t,r){let n=e.posToOffset(r)+t.length;return e.offsetToPos(n)}var ws=class ws{constructor(t,r,o=!1,n=xy){this.flushTimer=null;this.bufferedText="";this.editor=t,this.currentCursor=r,this.setAtCursor=o,this.flushInterval=n}startBuffering(){this.flushTimer||(this.flushTimer=setInterval(()=>this.flush(),this.flushInterval))}appendText(t){this.bufferedText+=t}flush(){if(this.bufferedText.length===0)return;if(this.bufferedText.length>ws.MAX_BUFFER_SIZE){this.forceFlush();return}let t=this.bufferedText.lastIndexOf(` +`);if(t===-1)return;let r=this.bufferedText.substring(0,t+1);this.bufferedText=this.bufferedText.substring(t+1),this.currentCursor=Bc(this.editor,r,this.currentCursor,this.setAtCursor)}stopBuffering(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.forceFlush()}forceFlush(){this.bufferedText.length!==0&&(this.currentCursor=Bc(this.editor,this.bufferedText,this.currentCursor,this.setAtCursor),this.bufferedText="")}getCursor(){return this.currentCursor}setCursor(t){this.currentCursor=t}updateCursorAfterInsert(t,r){this.currentCursor=wy(this.editor,t,r)}getBufferedText(){return this.bufferedText}reset(t){this.bufferedText="",this.currentCursor=t}};ws.MAX_BUFFER_SIZE=1e4;var xs=ws;function mE(e){let t=e.split("@");return t.length===2?{fullId:e,provider:t[0],modelId:t[1]}:{fullId:`openai@${e}`,provider:"openai",modelId:e}}function Sy(e){let t=mE(e).modelId;return t.includes("/")&&(t=t.split("/")[1]),t}function Ss(e,t){if(!t||typeof t!="string")return!1;let r=Sy(e);return t.split(/[,\n]/).map(n=>n.trim()).filter(n=>n.length>0&&!n.startsWith("#")).some(n=>{if(n.endsWith("*"))return r.startsWith(n.slice(0,-1));if(r===n)return!0;if(r.startsWith(n)){let i=r.slice(n.length);return/^-\d{8}$/.test(i)||/^-\d{4}-\d{2}-\d{2}$/.test(i)}return!1})}function ky(){return`# OpenAI (36 patterns) +codex-mini-latest +gpt-3.5-turbo +gpt-3.5-turbo-0125 +gpt-3.5-turbo-1106 +gpt-4 +gpt-4-0125-preview +gpt-4-0613 +gpt-4-1106-preview +gpt-4-turbo +gpt-4-turbo-preview +gpt-4.1 +gpt-4.1-mini +gpt-4.1-nano +gpt-4o +gpt-4o-mini +gpt-5 +gpt-5-chat-latest +gpt-5-codex +gpt-5-mini +gpt-5-nano +gpt-5-pro +gpt-5.1 +gpt-5.1-chat-latest +gpt-5.1-codex +gpt-5.1-codex-max +gpt-5.1-codex-mini +gpt-5.2 +gpt-5.2-chat-latest +gpt-5.2-codex +gpt-5.2-pro +o1 +o1-pro +o3 +o3-mini +o3-pro +o4-mini + +# Anthropic (9 patterns) +claude-3-5-haiku +claude-3-7-sonnet +claude-3-haiku +claude-haiku-4-5 +claude-opus-4 +claude-opus-4-1 +claude-opus-4-5 +claude-sonnet-4 +claude-sonnet-4-5 + +# Gemini (7 patterns) +gemini-2.5-flash +gemini-2.5-flash-lite-preview-09-2025 +gemini-2.5-flash-preview-09-2025 +gemini-3-flash-preview +gemini-flash-latest +gemini-flash-lite-latest +gemini-robotics-er-1.5-preview + +# OpenRouter (109 patterns) +ai21/jamba-mini-1.7 +alibaba/tongyi-deepresearch-30b-a3b +allenai/olmo-3.1-32b-instruct +amazon/nova-lite-v1 +amazon/nova-pro-v1 +anthropic/claude-3-haiku +anthropic/claude-3.5-haiku +arcee-ai/trinity-large-preview:free +bytedance-seed/seed-1.6 +bytedance-seed/seed-1.6-flash +cohere/command-r-08-2024 +cohere/command-r-plus-08-2024 +deepcogito/cogito-v2-preview-llama-109b-moe +deepcogito/cogito-v2-preview-llama-405b +deepcogito/cogito-v2-preview-llama-70b +deepseek/deepseek-chat +deepseek/deepseek-chat-v3-0324 +deepseek/deepseek-chat-v3.1 +deepseek/deepseek-r1 +deepseek/deepseek-r1-0528 +deepseek/deepseek-v3.1-terminus +deepseek/deepseek-v3.1-terminus:exacto +deepseek/deepseek-v3.2 +deepseek/deepseek-v3.2-exp +google/gemini-2.0-flash-lite-001 +inception/mercury +inception/mercury-coder +kwaipilot/kat-coder-pro +meta-llama/llama-3.1-405b-instruct +meta-llama/llama-3.1-70b-instruct +meta-llama/llama-4-maverick +meta-llama/llama-4-scout +minimax/minimax-m1 +minimax/minimax-m2 +minimax/minimax-m2.1 +mistralai/codestral-2508 +mistralai/devstral-2512 +mistralai/devstral-small +mistralai/ministral-14b-2512 +mistralai/ministral-3b +mistralai/ministral-3b-2512 +mistralai/ministral-8b +mistralai/ministral-8b-2512 +mistralai/mistral-large-2512 +mistralai/mistral-nemo +mistralai/mistral-saba +mistralai/mistral-small-24b-instruct-2501 +mistralai/mistral-small-creative +mistralai/mistral-tiny +mistralai/pixtral-12b +mistralai/voxtral-small-24b-2507 +moonshotai/kimi-k2-0905 +moonshotai/kimi-k2-0905:exacto +nex-agi/deepseek-v3.1-nex-n1 +nvidia/llama-3.1-nemotron-70b-instruct +nvidia/llama-3.3-nemotron-super-49b-v1.5 +nvidia/nemotron-3-nano-30b-a3b +nvidia/nemotron-3-nano-30b-a3b:free +nvidia/nemotron-nano-12b-v2-vl:free +nvidia/nemotron-nano-9b-v2 +nvidia/nemotron-nano-9b-v2:free +openai/gpt-3.5-turbo +openai/gpt-3.5-turbo-0613 +openai/gpt-3.5-turbo-16k +openai/gpt-4.1-mini +openai/gpt-4.1-nano +openai/gpt-4o +openai/gpt-4o-mini +openai/gpt-5-nano +openai/gpt-oss-120b +openai/gpt-oss-120b:exacto +openai/gpt-oss-20b +openai/gpt-oss-safeguard-20b +openrouter/auto +prime-intellect/intellect-3 +qwen/qwen-2.5-72b-instruct +qwen/qwen-2.5-7b-instruct +qwen/qwen-max +qwen/qwen-plus +qwen/qwen-vl-max +qwen/qwen3-14b +qwen/qwen3-235b-a22b +qwen/qwen3-235b-a22b-thinking-2507 +qwen/qwen3-30b-a3b +qwen/qwen3-30b-a3b-instruct-2507 +qwen/qwen3-30b-a3b-thinking-2507 +qwen/qwen3-32b +qwen/qwen3-8b +qwen/qwen3-coder +qwen/qwen3-coder-30b-a3b-instruct +qwen/qwen3-coder-flash +qwen/qwen3-coder:exacto +qwen/qwen3-next-80b-a3b-instruct +qwen/qwen3-next-80b-a3b-thinking +qwen/qwen3-vl-235b-a22b-instruct +qwen/qwen3-vl-30b-a3b-instruct +qwen/qwen3-vl-30b-a3b-thinking +qwen/qwen3-vl-8b-instruct +qwen/qwq-32b +stepfun-ai/step3 +tngtech/deepseek-r1t2-chimera +tngtech/tng-r1t-chimera +tngtech/tng-r1t-chimera:free +upstage/solar-pro-3:free +x-ai/grok-3-mini +x-ai/grok-3-mini-beta +x-ai/grok-4-fast +x-ai/grok-4.1-fast +x-ai/grok-code-fast-1 +xiaomi/mimo-v2-flash +z-ai/glm-4-32b +z-ai/glm-4.5 +z-ai/glm-4.5-air +z-ai/glm-4.5-air:free +z-ai/glm-4.5v +z-ai/glm-4.6 +z-ai/glm-4.6:exacto +z-ai/glm-4.6v +z-ai/glm-4.7 +z-ai/glm-4.7-flash + +# Z.AI (GLM Models) +glm-4 +glm-4.7 +glm-4.7-flash`}var Qy="vercel.ai.error",fE=Symbol.for(Qy),Iy,Ty,oe=class e_ extends(Ty=Error,Iy=fE,Ty){constructor({name:t,message:r,cause:o}){super(r),this[Iy]=!0,this.name=t,this.cause=o}static isInstance(t){return e_.hasMarker(t,Qy)}static hasMarker(t,r){let o=Symbol.for(r);return t!=null&&typeof t=="object"&&o in t&&typeof t[o]=="boolean"&&t[o]===!0}},t_="AI_APICallError",r_=`vercel.ai.error.${t_}`,gE=Symbol.for(r_),$y,Ey,Ye=class extends(Ey=oe,$y=gE,Ey){constructor({message:e,url:t,requestBodyValues:r,statusCode:o,responseHeaders:n,responseBody:i,cause:s,isRetryable:l=o!=null&&(o===408||o===409||o===429||o>=500),data:d}){super({name:t_,message:e,cause:s}),this[$y]=!0,this.url=t,this.requestBodyValues=r,this.statusCode=o,this.responseHeaders=n,this.responseBody=i,this.isRetryable=l,this.data=d}static isInstance(e){return oe.hasMarker(e,r_)}},n_="AI_EmptyResponseBodyError",o_=`vercel.ai.error.${n_}`,hE=Symbol.for(o_),Cy,Ay,a_=class extends(Ay=oe,Cy=hE,Ay){constructor({message:e="Empty response body"}={}){super({name:n_,message:e}),this[Cy]=!0}static isInstance(e){return oe.hasMarker(e,o_)}};function fr(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var i_="AI_InvalidArgumentError",s_=`vercel.ai.error.${i_}`,vE=Symbol.for(s_),Py,Oy,Io=class extends(Oy=oe,Py=vE,Oy){constructor({message:e,cause:t,argument:r}){super({name:i_,message:e,cause:t}),this[Py]=!0,this.argument=r}static isInstance(e){return oe.hasMarker(e,s_)}},l_="AI_InvalidPromptError",u_=`vercel.ai.error.${l_}`,yE=Symbol.for(u_),Ry,My,gr=class extends(My=oe,Ry=yE,My){constructor({prompt:e,message:t,cause:r}){super({name:l_,message:`Invalid prompt: ${t}`,cause:r}),this[Ry]=!0,this.prompt=e}static isInstance(e){return oe.hasMarker(e,u_)}},c_="AI_InvalidResponseDataError",d_=`vercel.ai.error.${c_}`,_E=Symbol.for(d_),Ny,jy,Gn=class extends(jy=oe,Ny=_E,jy){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:c_,message:t}),this[Ny]=!0,this.data=e}static isInstance(e){return oe.hasMarker(e,d_)}},p_="AI_JSONParseError",m_=`vercel.ai.error.${p_}`,bE=Symbol.for(m_),Dy,zy,La=class extends(zy=oe,Dy=bE,zy){constructor({text:e,cause:t}){super({name:p_,message:`JSON parsing failed: Text: ${e}. +Error message: ${fr(t)}`,cause:t}),this[Dy]=!0,this.text=e}static isInstance(e){return oe.hasMarker(e,m_)}},f_="AI_LoadAPIKeyError",g_=`vercel.ai.error.${f_}`,xE=Symbol.for(g_),Uy,Fy,qa=class extends(Fy=oe,Uy=xE,Fy){constructor({message:e}){super({name:f_,message:e}),this[Uy]=!0}static isInstance(e){return oe.hasMarker(e,g_)}},h_="AI_LoadSettingError",v_=`vercel.ai.error.${h_}`,wE=Symbol.for(v_),Ly,qy,FL=class extends(qy=oe,Ly=wE,qy){constructor({message:e}){super({name:h_,message:e}),this[Ly]=!0}static isInstance(e){return oe.hasMarker(e,v_)}},y_="AI_NoContentGeneratedError",__=`vercel.ai.error.${y_}`,SE=Symbol.for(__),Zy,Vy,LL=class extends(Vy=oe,Zy=SE,Vy){constructor({message:e="No content generated."}={}){super({name:y_,message:e}),this[Zy]=!0}static isInstance(e){return oe.hasMarker(e,__)}},b_="AI_NoSuchModelError",x_=`vercel.ai.error.${b_}`,kE=Symbol.for(x_),Gy,Hy,Wc=class extends(Hy=oe,Gy=kE,Hy){constructor({errorName:e=b_,modelId:t,modelType:r,message:o=`No such ${r}: ${t}`}){super({name:e,message:o}),this[Gy]=!0,this.modelId=t,this.modelType=r}static isInstance(e){return oe.hasMarker(e,x_)}},w_="AI_TooManyEmbeddingValuesForCallError",S_=`vercel.ai.error.${w_}`,IE=Symbol.for(S_),By,Jy,To=class extends(Jy=oe,By=IE,Jy){constructor(e){super({name:w_,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[By]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return oe.hasMarker(e,S_)}},k_="AI_TypeValidationError",I_=`vercel.ai.error.${k_}`,TE=Symbol.for(I_),Wy,Ky,hr=class Jc extends(Ky=oe,Wy=TE,Ky){constructor({value:t,cause:r,context:o}){let n="Type validation failed";if(o!=null&&o.field&&(n+=` for ${o.field}`),o!=null&&o.entityName||o!=null&&o.entityId){n+=" (";let i=[];o.entityName&&i.push(o.entityName),o.entityId&&i.push(`id: "${o.entityId}"`),n+=i.join(", "),n+=")"}super({name:k_,message:`${n}: Value: ${JSON.stringify(t)}. +Error message: ${fr(r)}`,cause:r}),this[Wy]=!0,this.value=t,this.context=o}static isInstance(t){return oe.hasMarker(t,I_)}static wrap({value:t,cause:r,context:o}){var n,i,s;return Jc.isInstance(r)&&r.value===t&&((n=r.context)==null?void 0:n.field)===(o==null?void 0:o.field)&&((i=r.context)==null?void 0:i.entityName)===(o==null?void 0:o.entityName)&&((s=r.context)==null?void 0:s.entityId)===(o==null?void 0:o.entityId)?r:new Jc({value:t,cause:r,context:o})}},T_="AI_UnsupportedFunctionalityError",$_=`vercel.ai.error.${T_}`,$E=Symbol.for($_),Yy,Xy,Re=class extends(Xy=oe,Yy=$E,Xy){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:T_,message:t}),this[Yy]=!0,this.functionality=e}static isInstance(e){return oe.hasMarker(e,$_)}};var a={};Or(a,{$brand:()=>ks,$input:()=>gm,$output:()=>fm,NEVER:()=>Kc,TimePrecision:()=>_m,ZodAny:()=>ug,ZodArray:()=>mg,ZodBase64:()=>Kl,ZodBase64URL:()=>Yl,ZodBigInt:()=>ta,ZodBigIntFormat:()=>eu,ZodBoolean:()=>ea,ZodCIDRv4:()=>Jl,ZodCIDRv6:()=>Wl,ZodCUID:()=>Ll,ZodCUID2:()=>ql,ZodCatch:()=>Ng,ZodCodec:()=>lu,ZodCustom:()=>_i,ZodCustomStringFormat:()=>Xo,ZodDate:()=>fi,ZodDefault:()=>Cg,ZodDiscriminatedUnion:()=>gg,ZodE164:()=>Xl,ZodEmail:()=>zl,ZodEmoji:()=>Ul,ZodEnum:()=>Ko,ZodError:()=>tP,ZodExactOptional:()=>Tg,ZodFile:()=>kg,ZodFirstPartyTypeKind:()=>Bg,ZodFunction:()=>Vg,ZodGUID:()=>ui,ZodIPv4:()=>Hl,ZodIPv6:()=>Bl,ZodISODate:()=>Ol,ZodISODateTime:()=>Pl,ZodISODuration:()=>Ml,ZodISOTime:()=>Rl,ZodIntersection:()=>hg,ZodIssueCode:()=>nP,ZodJWT:()=>Ql,ZodKSUID:()=>Gl,ZodLazy:()=>Lg,ZodLiteral:()=>Sg,ZodMAC:()=>rg,ZodMap:()=>xg,ZodNaN:()=>Dg,ZodNanoID:()=>Fl,ZodNever:()=>dg,ZodNonOptional:()=>iu,ZodNull:()=>sg,ZodNullable:()=>Eg,ZodNumber:()=>Qo,ZodNumberFormat:()=>ro,ZodObject:()=>hi,ZodOptional:()=>au,ZodPipe:()=>su,ZodPrefault:()=>Pg,ZodPromise:()=>Zg,ZodReadonly:()=>zg,ZodRealError:()=>Kt,ZodRecord:()=>yi,ZodSet:()=>wg,ZodString:()=>Yo,ZodStringFormat:()=>Qe,ZodSuccess:()=>Mg,ZodSymbol:()=>ag,ZodTemplateLiteral:()=>Fg,ZodTransform:()=>Ig,ZodTuple:()=>yg,ZodType:()=>Te,ZodULID:()=>Zl,ZodURL:()=>mi,ZodUUID:()=>Fr,ZodUndefined:()=>ig,ZodUnion:()=>vi,ZodUnknown:()=>cg,ZodVoid:()=>pg,ZodXID:()=>Vl,ZodXor:()=>fg,_ZodString:()=>Dl,_default:()=>Ag,_function:()=>iw,any:()=>zx,array:()=>gi,base64:()=>xx,base64url:()=>wx,bigint:()=>Rx,boolean:()=>og,catch:()=>jg,check:()=>sw,cidrv4:()=>_x,cidrv6:()=>bx,clone:()=>Ft,codec:()=>nw,coerce:()=>uu,config:()=>ft,core:()=>Ur,cuid:()=>dx,cuid2:()=>px,custom:()=>lw,date:()=>Fx,decode:()=>Wf,decodeAsync:()=>Yf,describe:()=>uw,discriminatedUnion:()=>Hx,e164:()=>Sx,email:()=>tx,emoji:()=>ux,encode:()=>Jf,encodeAsync:()=>Kf,endsWith:()=>Lo,enum:()=>nu,exactOptional:()=>$g,file:()=>Qx,flattenError:()=>Ya,float32:()=>Cx,float64:()=>Ax,formatError:()=>Xa,fromJSONSchema:()=>hw,function:()=>iw,getErrorMap:()=>aP,globalRegistry:()=>Et,gt:()=>Dr,gte:()=>Lt,guid:()=>rx,hash:()=>Ex,hex:()=>$x,hostname:()=>Tx,httpUrl:()=>lx,includes:()=>Uo,instanceof:()=>dw,int:()=>jl,int32:()=>Px,int64:()=>Mx,intersection:()=>vg,ipv4:()=>hx,ipv6:()=>yx,iso:()=>Qn,json:()=>mw,jwt:()=>kx,keyof:()=>Lx,ksuid:()=>gx,lazy:()=>qg,length:()=>Xn,literal:()=>Xx,locales:()=>Wn,looseObject:()=>Vx,looseRecord:()=>Jx,lowercase:()=>Do,lt:()=>jr,lte:()=>tr,mac:()=>vx,map:()=>Wx,maxLength:()=>Yn,maxSize:()=>En,meta:()=>cw,mime:()=>qo,minLength:()=>nn,minSize:()=>zr,multipleOf:()=>$n,nan:()=>rw,nanoid:()=>cx,nativeEnum:()=>Yx,negative:()=>wl,never:()=>tu,nonnegative:()=>kl,nonoptional:()=>Rg,nonpositive:()=>Sl,normalize:()=>Zo,null:()=>lg,nullable:()=>di,nullish:()=>ew,number:()=>ng,object:()=>qx,optional:()=>ci,overwrite:()=>yr,parse:()=>Gf,parseAsync:()=>Hf,partialRecord:()=>Bx,pipe:()=>pi,positive:()=>xl,prefault:()=>Og,preprocess:()=>fw,prettifyError:()=>ld,promise:()=>aw,property:()=>Il,readonly:()=>Ug,record:()=>bg,refine:()=>Gg,regex:()=>jo,regexes:()=>er,registry:()=>el,safeDecode:()=>Qf,safeDecodeAsync:()=>tg,safeEncode:()=>Xf,safeEncodeAsync:()=>eg,safeParse:()=>Bf,safeParseAsync:()=>eo,set:()=>Kx,setErrorMap:()=>oP,size:()=>Kn,slugify:()=>Bo,startsWith:()=>Fo,strictObject:()=>Zx,string:()=>Nl,stringFormat:()=>Ix,stringbool:()=>pw,success:()=>tw,superRefine:()=>Hg,symbol:()=>jx,templateLiteral:()=>ow,toJSONSchema:()=>On,toLowerCase:()=>Go,toUpperCase:()=>Ho,transform:()=>ou,treeifyError:()=>sd,trim:()=>Vo,tuple:()=>_g,uint32:()=>Ox,uint64:()=>Nx,ulid:()=>mx,undefined:()=>Dx,union:()=>ru,unknown:()=>to,uppercase:()=>zo,url:()=>sx,util:()=>Y,uuid:()=>nx,uuidv4:()=>ox,uuidv6:()=>ax,uuidv7:()=>ix,void:()=>Ux,xid:()=>fx,xor:()=>Gx});var Ur={};Or(Ur,{$ZodAny:()=>jp,$ZodArray:()=>Lp,$ZodAsyncError:()=>vr,$ZodBase64:()=>Tp,$ZodBase64URL:()=>$p,$ZodBigInt:()=>Bs,$ZodBigIntFormat:()=>Op,$ZodBoolean:()=>ri,$ZodCIDRv4:()=>Sp,$ZodCIDRv6:()=>kp,$ZodCUID:()=>dp,$ZodCUID2:()=>pp,$ZodCatch:()=>am,$ZodCheck:()=>nt,$ZodCheckBigIntFormat:()=>Ld,$ZodCheckEndsWith:()=>Qd,$ZodCheckGreaterThan:()=>Fs,$ZodCheckIncludes:()=>Yd,$ZodCheckLengthEquals:()=>Bd,$ZodCheckLessThan:()=>Us,$ZodCheckLowerCase:()=>Wd,$ZodCheckMaxLength:()=>Gd,$ZodCheckMaxSize:()=>qd,$ZodCheckMimeType:()=>tp,$ZodCheckMinLength:()=>Hd,$ZodCheckMinSize:()=>Zd,$ZodCheckMultipleOf:()=>Ud,$ZodCheckNumberFormat:()=>Fd,$ZodCheckOverwrite:()=>rp,$ZodCheckProperty:()=>ep,$ZodCheckRegex:()=>Jd,$ZodCheckSizeEquals:()=>Vd,$ZodCheckStartsWith:()=>Xd,$ZodCheckStringFormat:()=>Mo,$ZodCheckUpperCase:()=>Kd,$ZodCodec:()=>oi,$ZodCustom:()=>mm,$ZodCustomStringFormat:()=>Ap,$ZodDate:()=>Fp,$ZodDefault:()=>tm,$ZodDiscriminatedUnion:()=>Vp,$ZodE164:()=>Ep,$ZodEmail:()=>sp,$ZodEmoji:()=>up,$ZodEncodeError:()=>wn,$ZodEnum:()=>Wp,$ZodError:()=>Ka,$ZodExactOptional:()=>Qp,$ZodFile:()=>Yp,$ZodFunction:()=>cm,$ZodGUID:()=>ap,$ZodIPv4:()=>bp,$ZodIPv6:()=>xp,$ZodISODate:()=>vp,$ZodISODateTime:()=>hp,$ZodISODuration:()=>_p,$ZodISOTime:()=>yp,$ZodIntersection:()=>Gp,$ZodJWT:()=>Cp,$ZodKSUID:()=>gp,$ZodLazy:()=>pm,$ZodLiteral:()=>Kp,$ZodMAC:()=>wp,$ZodMap:()=>Bp,$ZodNaN:()=>im,$ZodNanoID:()=>cp,$ZodNever:()=>zp,$ZodNonOptional:()=>nm,$ZodNull:()=>Np,$ZodNullable:()=>em,$ZodNumber:()=>Hs,$ZodNumberFormat:()=>Pp,$ZodObject:()=>eb,$ZodObjectJIT:()=>qp,$ZodOptional:()=>Ws,$ZodPipe:()=>sm,$ZodPrefault:()=>rm,$ZodPromise:()=>dm,$ZodReadonly:()=>lm,$ZodRealError:()=>Wt,$ZodRecord:()=>Hp,$ZodRegistry:()=>Qs,$ZodSet:()=>Jp,$ZodString:()=>Jn,$ZodStringFormat:()=>Xe,$ZodSuccess:()=>om,$ZodSymbol:()=>Rp,$ZodTemplateLiteral:()=>um,$ZodTransform:()=>Xp,$ZodTuple:()=>Js,$ZodType:()=>Se,$ZodULID:()=>mp,$ZodURL:()=>lp,$ZodUUID:()=>ip,$ZodUndefined:()=>Mp,$ZodUnion:()=>ni,$ZodUnknown:()=>Dp,$ZodVoid:()=>Up,$ZodXID:()=>fp,$ZodXor:()=>Zp,$brand:()=>ks,$constructor:()=>$,$input:()=>gm,$output:()=>fm,Doc:()=>ti,JSONSchema:()=>Ff,JSONSchemaGenerator:()=>Cl,NEVER:()=>Kc,TimePrecision:()=>_m,_any:()=>Fm,_array:()=>Bm,_base64:()=>vl,_base64url:()=>yl,_bigint:()=>Rm,_boolean:()=>Pm,_catch:()=>BA,_check:()=>Qb,_cidrv4:()=>gl,_cidrv6:()=>hl,_coercedBigint:()=>Mm,_coercedBoolean:()=>Om,_coercedDate:()=>Gm,_coercedNumber:()=>Im,_coercedString:()=>vm,_cuid:()=>ll,_cuid2:()=>ul,_custom:()=>Wm,_date:()=>Vm,_decode:()=>As,_decodeAsync:()=>Os,_default:()=>VA,_discriminatedUnion:()=>OA,_e164:()=>_l,_email:()=>tl,_emoji:()=>il,_encode:()=>Cs,_encodeAsync:()=>Ps,_endsWith:()=>Lo,_enum:()=>zA,_file:()=>Jm,_float32:()=>$m,_float64:()=>Em,_gt:()=>Dr,_gte:()=>Lt,_guid:()=>ii,_includes:()=>Uo,_int:()=>Tm,_int32:()=>Cm,_int64:()=>Nm,_intersection:()=>RA,_ipv4:()=>ml,_ipv6:()=>fl,_isoDate:()=>xm,_isoDateTime:()=>bm,_isoDuration:()=>Sm,_isoTime:()=>wm,_jwt:()=>bl,_ksuid:()=>pl,_lazy:()=>YA,_length:()=>Xn,_literal:()=>FA,_lowercase:()=>Do,_lt:()=>jr,_lte:()=>tr,_mac:()=>ym,_map:()=>jA,_max:()=>tr,_maxLength:()=>Yn,_maxSize:()=>En,_mime:()=>qo,_min:()=>Lt,_minLength:()=>nn,_minSize:()=>zr,_multipleOf:()=>$n,_nan:()=>Hm,_nanoid:()=>sl,_nativeEnum:()=>UA,_negative:()=>wl,_never:()=>qm,_nonnegative:()=>kl,_nonoptional:()=>GA,_nonpositive:()=>Sl,_normalize:()=>Zo,_null:()=>Um,_nullable:()=>ZA,_number:()=>km,_optional:()=>qA,_overwrite:()=>yr,_parse:()=>Ao,_parseAsync:()=>Po,_pipe:()=>JA,_positive:()=>xl,_promise:()=>XA,_property:()=>Il,_readonly:()=>WA,_record:()=>NA,_refine:()=>Km,_regex:()=>jo,_safeDecode:()=>Ms,_safeDecodeAsync:()=>js,_safeEncode:()=>Rs,_safeEncodeAsync:()=>Ns,_safeParse:()=>Oo,_safeParseAsync:()=>Ro,_set:()=>DA,_size:()=>Kn,_slugify:()=>Bo,_startsWith:()=>Fo,_string:()=>hm,_stringFormat:()=>Jo,_stringbool:()=>ef,_success:()=>HA,_superRefine:()=>Ym,_symbol:()=>Dm,_templateLiteral:()=>KA,_toLowerCase:()=>Go,_toUpperCase:()=>Ho,_transform:()=>LA,_trim:()=>Vo,_tuple:()=>MA,_uint32:()=>Am,_uint64:()=>jm,_ulid:()=>cl,_undefined:()=>zm,_union:()=>AA,_unknown:()=>Lm,_uppercase:()=>zo,_url:()=>si,_uuid:()=>rl,_uuidv4:()=>nl,_uuidv6:()=>ol,_uuidv7:()=>al,_void:()=>Zm,_xid:()=>dl,_xor:()=>PA,clone:()=>Ft,config:()=>ft,createStandardJSONSchemaMethod:()=>Wo,createToJSONSchemaMethod:()=>tf,decode:()=>tC,decodeAsync:()=>nC,describe:()=>Xm,encode:()=>eC,encodeAsync:()=>rC,extractDefs:()=>An,finalize:()=>Pn,flattenError:()=>Ya,formatError:()=>Xa,globalConfig:()=>Za,globalRegistry:()=>Et,initializeContext:()=>Cn,isValidBase64:()=>Ip,isValidBase64URL:()=>K_,isValidJWT:()=>Y_,locales:()=>Wn,meta:()=>Qm,parse:()=>$s,parseAsync:()=>Es,prettifyError:()=>ld,process:()=>Ge,regexes:()=>er,registry:()=>el,safeDecode:()=>aC,safeDecodeAsync:()=>sC,safeEncode:()=>oC,safeEncodeAsync:()=>iC,safeParse:()=>ud,safeParseAsync:()=>cd,toDotPath:()=>O_,toJSONSchema:()=>On,treeifyError:()=>sd,util:()=>Y,version:()=>np});var Kc=Object.freeze({status:"aborted"});function $(e,t,r){var l;function o(d,u){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,u);let m=s.prototype,c=Object.keys(m);for(let p=0;p{var u,m;return r!=null&&r.Parent&&d instanceof r.Parent?!0:(m=(u=d==null?void 0:d._zod)==null?void 0:u.traits)==null?void 0:m.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}var ks=Symbol("zod_brand"),vr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},wn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Za={};function ft(e){return e&&Object.assign(Za,e),Za}var Y={};Or(Y,{BIGINT_FORMAT_RANGES:()=>id,Class:()=>Xc,NUMBER_FORMAT_RANGES:()=>ad,aborted:()=>Tn,allowsEval:()=>td,assert:()=>OE,assertEqual:()=>EE,assertIs:()=>AE,assertNever:()=>PE,assertNotEqual:()=>CE,assignProp:()=>kn,base64ToUint8Array:()=>C_,base64urlToUint8Array:()=>WE,cached:()=>Eo,captureStackTrace:()=>Ts,cleanEnum:()=>JE,cleanRegex:()=>Ha,clone:()=>Ft,cloneDef:()=>ME,createTransparentProxy:()=>FE,defineLazy:()=>Ce,esc:()=>Is,escapeRegex:()=>cr,extend:()=>ZE,finalizeIssue:()=>Jt,floatSafeRemainder:()=>Qc,getElementAtPath:()=>NE,getEnumValues:()=>Ga,getLengthableOrigin:()=>Wa,getParsedType:()=>UE,getSizableOrigin:()=>Ja,hexToUint8Array:()=>YE,isObject:()=>Hn,isPlainObject:()=>In,issue:()=>Co,joinValues:()=>N,jsonStringifyReplacer:()=>$o,merge:()=>GE,mergeDefs:()=>rn,normalizeParams:()=>X,nullish:()=>Sn,numKeys:()=>zE,objectClone:()=>RE,omit:()=>qE,optionalKeys:()=>od,parsedType:()=>K,partial:()=>HE,pick:()=>LE,prefixIssues:()=>Qt,primitiveTypes:()=>nd,promiseAllObject:()=>jE,propertyKeyTypes:()=>Ba,randomString:()=>DE,required:()=>BE,safeExtend:()=>VE,shallowClone:()=>rd,slugify:()=>ed,stringifyPrimitive:()=>J,uint8ArrayToBase64:()=>A_,uint8ArrayToBase64url:()=>KE,uint8ArrayToHex:()=>XE,unwrapMessage:()=>Va});function EE(e){return e}function CE(e){return e}function AE(e){}function PE(e){throw new Error("Unexpected value in exhaustive check")}function OE(e){}function Ga(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function N(e,t="|"){return e.map(r=>J(r)).join(t)}function $o(e,t){return typeof t=="bigint"?t.toString():t}function Eo(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Sn(e){return e==null}function Ha(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Qc(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let d=o.match(/\d?e-(\d?)/);d!=null&&d[1]&&(n=Number.parseInt(d[1]))}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),l=Number.parseInt(t.toFixed(i).replace(".",""));return s%l/10**i}var E_=Symbol("evaluating");function Ce(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==E_)return o===void 0&&(o=E_,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function RE(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function kn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function rn(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function ME(e){return rn(e._zod.def)}function NE(e,t){return t?t.reduce((r,o)=>r==null?void 0:r[o],e):e}function jE(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i{};function Hn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var td=Eo(()=>{var e;if(typeof navigator!="undefined"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let t=Function;return new t(""),!0}catch(t){return!1}});function In(e){if(Hn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Hn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function rd(e){return In(e)?{...e}:Array.isArray(e)?[...e]:e}function zE(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var UE=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map!="undefined"&&e instanceof Map?"map":typeof Set!="undefined"&&e instanceof Set?"set":typeof Date!="undefined"&&e instanceof Date?"date":typeof File!="undefined"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ba=new Set(["string","number","symbol"]),nd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function cr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ft(e,t,r){let o=new e._zod.constr(t!=null?t:e._zod.def);return(!t||r!=null&&r.parent)&&(o._zod.parent=e),o}function X(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function FE(e){let t;return new Proxy({},{get(r,o,n){return t!=null||(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t!=null||(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t!=null||(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t!=null||(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t!=null||(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t!=null||(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t!=null||(t=e()),Reflect.defineProperty(t,o,n)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function od(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var ad={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},id={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function LE(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=rn(e._zod.def,{get shape(){let s={};for(let l in t){if(!(l in r.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(s[l]=r.shape[l])}return kn(this,"shape",s),s},checks:[]});return Ft(e,i)}function qE(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=rn(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let l in t){if(!(l in r.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete s[l]}return kn(this,"shape",s),s},checks:[]});return Ft(e,i)}function ZE(e,t){if(!In(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return kn(this,"shape",i),i}});return Ft(e,n)}function VE(e,t){if(!In(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=rn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return kn(this,"shape",o),o}});return Ft(e,r)}function GE(e,t){let r=rn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return kn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Ft(e,r)}function HE(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=rn(t._zod.def,{get shape(){let l=t._zod.def.shape,d={...l};if(r)for(let u in r){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(d[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(let u in l)d[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return kn(this,"shape",d),d},checks:[]});return Ft(t,s)}function BE(e,t,r){let o=rn(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return kn(this,"shape",i),i}});return Ft(t,o)}function Tn(e,t=0){var r;if(e.aborted===!0)return!0;for(let o=t;o{var n;var o;return(n=(o=r).path)!=null||(o.path=[]),r.path.unshift(e),r})}function Va(e){return typeof e=="string"?e:e==null?void 0:e.message}function Jt(e,t,r){var n,i,s,l,d,u,m,c,p,f,v;let o={...e,path:(n=e.path)!=null?n:[]};if(!e.message){let g=(v=(f=(c=(u=Va((l=(s=(i=e.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:l.call(s,e)))!=null?u:Va((d=t==null?void 0:t.error)==null?void 0:d.call(t,e)))!=null?c:Va((m=r.customError)==null?void 0:m.call(r,e)))!=null?f:Va((p=r.localeError)==null?void 0:p.call(r,e)))!=null?v:"Invalid input";o.message=g}return delete o.inst,delete o.continue,t!=null&&t.reportInput||delete o.input,o}function Ja(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Wa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function K(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Co(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function JE(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function C_(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;ot.toString(16).padStart(2,"0")).join("")}var Xc=class{constructor(...t){}};var P_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$o,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ka=$("$ZodError",P_),Wt=$("$ZodError",P_,{Parent:Error});function Ya(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Xa(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let s=r,l=0;for(;lr.message){let r={errors:[]},o=(n,i=[])=>{var d,u,m,c;var s,l;for(let p of n.issues)if(p.code==="invalid_union"&&p.errors.length)p.errors.map(f=>o({issues:f},p.path));else if(p.code==="invalid_key")o({issues:p.issues},p.path);else if(p.code==="invalid_element")o({issues:p.issues},p.path);else{let f=[...i,...p.path];if(f.length===0){r.errors.push(t(p));continue}let v=r,g=0;for(;gtypeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function ld(e){var o;let t=[],r=[...e.issues].sort((n,i)=>{var s,l;return((s=n.path)!=null?s:[]).length-((l=i.path)!=null?l:[]).length});for(let n of r)t.push(`\u2716 ${n.message}`),(o=n.path)!=null&&o.length&&t.push(` \u2192 at ${O_(n.path)}`);return t.join(` +`)}var Ao=e=>(t,r,o,n)=>{var l;let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new vr;if(s.issues.length){let d=new((l=n==null?void 0:n.Err)!=null?l:e)(s.issues.map(u=>Jt(u,i,ft())));throw Ts(d,n==null?void 0:n.callee),d}return s.value},$s=Ao(Wt),Po=e=>async(t,r,o,n)=>{var l;let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let d=new((l=n==null?void 0:n.Err)!=null?l:e)(s.issues.map(u=>Jt(u,i,ft())));throw Ts(d,n==null?void 0:n.callee),d}return s.value},Es=Po(Wt),Oo=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new vr;return i.issues.length?{success:!1,error:new(e!=null?e:Ka)(i.issues.map(s=>Jt(s,n,ft())))}:{success:!0,data:i.value}},ud=Oo(Wt),Ro=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Jt(s,n,ft())))}:{success:!0,data:i.value}},cd=Ro(Wt),Cs=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ao(e)(t,r,n)},eC=Cs(Wt),As=e=>(t,r,o)=>Ao(e)(t,r,o),tC=As(Wt),Ps=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Po(e)(t,r,n)},rC=Ps(Wt),Os=e=>async(t,r,o)=>Po(e)(t,r,o),nC=Os(Wt),Rs=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Oo(e)(t,r,n)},oC=Rs(Wt),Ms=e=>(t,r,o)=>Oo(e)(t,r,o),aC=Ms(Wt),Ns=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ro(e)(t,r,n)},iC=Ns(Wt),js=e=>async(t,r,o)=>Ro(e)(t,r,o),sC=js(Wt);var er={};Or(er,{base64:()=>Td,base64url:()=>Ds,bigint:()=>Od,boolean:()=>Md,browserEmail:()=>gC,cidrv4:()=>kd,cidrv6:()=>Id,cuid:()=>dd,cuid2:()=>pd,date:()=>Ed,datetime:()=>Ad,domain:()=>yC,duration:()=>vd,e164:()=>$d,email:()=>_d,emoji:()=>bd,extendedDuration:()=>lC,guid:()=>yd,hex:()=>_C,hostname:()=>vC,html5Email:()=>pC,idnEmail:()=>fC,integer:()=>Rd,ipv4:()=>xd,ipv6:()=>wd,ksuid:()=>gd,lowercase:()=>Dd,mac:()=>Sd,md5_base64:()=>xC,md5_base64url:()=>wC,md5_hex:()=>bC,nanoid:()=>hd,null:()=>Nd,number:()=>zs,rfc5322Email:()=>mC,sha1_base64:()=>kC,sha1_base64url:()=>IC,sha1_hex:()=>SC,sha256_base64:()=>$C,sha256_base64url:()=>EC,sha256_hex:()=>TC,sha384_base64:()=>AC,sha384_base64url:()=>PC,sha384_hex:()=>CC,sha512_base64:()=>RC,sha512_base64url:()=>MC,sha512_hex:()=>OC,string:()=>Pd,time:()=>Cd,ulid:()=>md,undefined:()=>jd,unicodeEmail:()=>R_,uppercase:()=>zd,uuid:()=>Bn,uuid4:()=>uC,uuid6:()=>cC,uuid7:()=>dC,xid:()=>fd});var dd=/^[cC][^\s-]{8,}$/,pd=/^[0-9a-z]+$/,md=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fd=/^[0-9a-vA-V]{20}$/,gd=/^[A-Za-z0-9]{27}$/,hd=/^[a-zA-Z0-9_-]{21}$/,vd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,lC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Bn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,uC=Bn(4),cC=Bn(6),dC=Bn(7),_d=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mC=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,R_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,fC=R_,gC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bd(){return new RegExp(hC,"u")}var xd=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Sd=e=>{let t=cr(e!=null?e:":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},kd=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Id=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Td=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ds=/^[A-Za-z0-9_-]*$/,vC=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,yC=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,$d=/^\+[1-9]\d{6,14}$/,M_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ed=new RegExp(`^${M_}$`);function N_(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Cd(e){return new RegExp(`^${N_(e)}$`)}function Ad(e){let t=N_({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${M_}T(?:${o})$`)}var Pd=e=>{var r,o;let t=e?`[\\s\\S]{${(r=e==null?void 0:e.minimum)!=null?r:0},${(o=e==null?void 0:e.maximum)!=null?o:""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Od=/^-?\d+n?$/,Rd=/^-?\d+$/,zs=/^-?\d+(?:\.\d+)?$/,Md=/^(?:true|false)$/i,Nd=/^null$/i;var jd=/^undefined$/i;var Dd=/^[^A-Z]*$/,zd=/^[^a-z]*$/,_C=/^[0-9a-fA-F]*$/;function Qa(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ei(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var bC=/^[0-9a-fA-F]{32}$/,xC=Qa(22,"=="),wC=ei(22),SC=/^[0-9a-fA-F]{40}$/,kC=Qa(27,"="),IC=ei(27),TC=/^[0-9a-fA-F]{64}$/,$C=Qa(43,"="),EC=ei(43),CC=/^[0-9a-fA-F]{96}$/,AC=Qa(64,""),PC=ei(64),OC=/^[0-9a-fA-F]{128}$/,RC=Qa(86,"=="),MC=ei(86);var nt=$("$ZodCheck",(e,t)=>{var o,n;var r;(o=e._zod)!=null||(e._zod={}),e._zod.def=t,(n=(r=e._zod).onattach)!=null||(r.onattach=[])}),D_={number:"number",bigint:"bigint",object:"date"},Us=$("$ZodCheckLessThan",(e,t)=>{nt.init(e,t);let r=D_[typeof t.value];e._zod.onattach.push(o=>{var s;let n=o._zod.bag,i=(s=t.inclusive?n.maximum:n.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{nt.init(e,t);let r=D_[typeof t.value];e._zod.onattach.push(o=>{var s;let n=o._zod.bag,i=(s=t.inclusive?n.minimum:n.exclusiveMinimum)!=null?s:Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ud=$("$ZodCheckMultipleOf",(e,t)=>{nt.init(e,t),e._zod.onattach.push(r=>{var n;var o;(n=(o=r._zod.bag).multipleOf)!=null||(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Qc(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Fd=$("$ZodCheckNumberFormat",(e,t)=>{var s;nt.init(e,t),t.format=t.format||"float64";let r=(s=t.format)==null?void 0:s.includes("int"),o=r?"int":"number",[n,i]=ad[t.format];e._zod.onattach.push(l=>{let d=l._zod.bag;d.format=t.format,d.minimum=n,d.maximum=i,r&&(d.pattern=Rd)}),e._zod.check=l=>{let d=l.value;if(r){if(!Number.isInteger(d)){l.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?l.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):l.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}di&&l.issues.push({origin:"number",input:d,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ld=$("$ZodCheckBigIntFormat",(e,t)=>{nt.init(e,t);let[r,o]=id[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;io&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),qd=$("$ZodCheckMaxSize",(e,t)=>{var o;var r;nt.init(e,t),(o=(r=e._zod.def).when)!=null||(r.when=n=>{let i=n.value;return!Sn(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{var s;let i=(s=n._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;t.maximum{let i=n.value;i.size<=t.maximum||n.issues.push({origin:Ja(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Zd=$("$ZodCheckMinSize",(e,t)=>{var o;var r;nt.init(e,t),(o=(r=e._zod.def).when)!=null||(r.when=n=>{let i=n.value;return!Sn(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{var s;let i=(s=n._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;i.size>=t.minimum||n.issues.push({origin:Ja(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Vd=$("$ZodCheckSizeEquals",(e,t)=>{var o;var r;nt.init(e,t),(o=(r=e._zod.def).when)!=null||(r.when=n=>{let i=n.value;return!Sn(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=n=>{let i=n.value,s=i.size;if(s===t.size)return;let l=s>t.size;n.issues.push({origin:Ja(i),...l?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Gd=$("$ZodCheckMaxLength",(e,t)=>{var o;var r;nt.init(e,t),(o=(r=e._zod.def).when)!=null||(r.when=n=>{let i=n.value;return!Sn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{var s;let i=(s=n._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;t.maximum{let i=n.value;if(i.length<=t.maximum)return;let l=Wa(i);n.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Hd=$("$ZodCheckMinLength",(e,t)=>{var o;var r;nt.init(e,t),(o=(r=e._zod.def).when)!=null||(r.when=n=>{let i=n.value;return!Sn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{var s;let i=(s=n._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let l=Wa(i);n.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Bd=$("$ZodCheckLengthEquals",(e,t)=>{var o;var r;nt.init(e,t),(o=(r=e._zod.def).when)!=null||(r.when=n=>{let i=n.value;return!Sn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{let i=n.value,s=i.length;if(s===t.length)return;let l=Wa(i),d=s>t.length;n.issues.push({origin:l,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Mo=$("$ZodCheckStringFormat",(e,t)=>{var n,i;var r,o;nt.init(e,t),e._zod.onattach.push(s=>{var d;let l=s._zod.bag;l.format=t.format,t.pattern&&((d=l.patterns)!=null||(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=(r=e._zod).check)!=null||(r.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=(o=e._zod).check)!=null||(o.check=()=>{})}),Jd=$("$ZodCheckRegex",(e,t)=>{Mo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Wd=$("$ZodCheckLowerCase",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Dd),Mo.init(e,t)}),Kd=$("$ZodCheckUpperCase",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=zd),Mo.init(e,t)}),Yd=$("$ZodCheckIncludes",(e,t)=>{nt.init(e,t);let r=cr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{var s;let i=n._zod.bag;(s=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Xd=$("$ZodCheckStartsWith",(e,t)=>{var o;nt.init(e,t);let r=new RegExp(`^${cr(t.prefix)}.*`);(o=t.pattern)!=null||(t.pattern=r),e._zod.onattach.push(n=>{var s;let i=n._zod.bag;(s=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Qd=$("$ZodCheckEndsWith",(e,t)=>{var o;nt.init(e,t);let r=new RegExp(`.*${cr(t.suffix)}$`);(o=t.pattern)!=null||(t.pattern=r),e._zod.onattach.push(n=>{var s;let i=n._zod.bag;(s=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function j_(e,t,r){e.issues.length&&t.issues.push(...Qt(r,e.issues))}var ep=$("$ZodCheckProperty",(e,t)=>{nt.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>j_(n,r,t.property));j_(o,r,t.property)}}),tp=$("$ZodCheckMimeType",(e,t)=>{nt.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),rp=$("$ZodCheckOverwrite",(e,t)=>{nt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var ti=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(` +`).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){var i;let t=Function,r=this==null?void 0:this.args,n=[...((i=this==null?void 0:this.content)!=null?i:[""]).map(s=>` ${s}`)];return new t(...r,n.join(` +`))}};var np={major:4,minor:3,patch:6};var Se=$("$ZodType",(e,t)=>{var n,i,s;var r;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=np;let o=[...(n=e._zod.def.checks)!=null?n:[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let l of o)for(let d of l._zod.onattach)d(e);if(o.length===0)(i=(r=e._zod).deferred)!=null||(r.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{let l=(u,m,c)=>{let p=Tn(u),f;for(let v of m){if(v._zod.def.when){if(!v._zod.def.when(u))continue}else if(p)continue;let g=u.issues.length,y=v._zod.check(u);if(y instanceof Promise&&(c==null?void 0:c.async)===!1)throw new vr;if(f||y instanceof Promise)f=(f!=null?f:Promise.resolve()).then(async()=>{await y,u.issues.length!==g&&(p||(p=Tn(u,g)))});else{if(u.issues.length===g)continue;p||(p=Tn(u,g))}}return f?f.then(()=>u):u},d=(u,m,c)=>{if(Tn(u))return u.aborted=!0,u;let p=l(m,o,c);if(p instanceof Promise){if(c.async===!1)throw new vr;return p.then(f=>e._zod.parse(f,c))}return e._zod.parse(p,c)};e._zod.run=(u,m)=>{if(m.skipChecks)return e._zod.parse(u,m);if(m.direction==="backward"){let p=e._zod.parse({value:u.value,issues:[]},{...m,skipChecks:!0});return p instanceof Promise?p.then(f=>d(f,u,m)):d(p,u,m)}let c=e._zod.parse(u,m);if(c instanceof Promise){if(m.async===!1)throw new vr;return c.then(p=>l(p,o,m))}return l(c,o,m)}}Ce(e,"~standard",()=>({validate:l=>{var d;try{let u=ud(e,l);return u.success?{value:u.data}:{issues:(d=u.error)==null?void 0:d.issues}}catch(u){return cd(e,l).then(m=>{var c;return m.success?{value:m.data}:{issues:(c=m.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Jn=$("$ZodString",(e,t)=>{var r,o,n;Se.init(e,t),e._zod.pattern=(n=[...(o=(r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)!=null?o:[]].pop())!=null?n:Pd(e._zod.bag),e._zod.parse=(i,s)=>{if(t.coerce)try{i.value=String(i.value)}catch(l){}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),Xe=$("$ZodStringFormat",(e,t)=>{Mo.init(e,t),Jn.init(e,t)}),ap=$("$ZodGUID",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=yd),Xe.init(e,t)}),ip=$("$ZodUUID",(e,t)=>{var r,o;if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);(r=t.pattern)!=null||(t.pattern=Bn(i))}else(o=t.pattern)!=null||(t.pattern=Bn());Xe.init(e,t)}),sp=$("$ZodEmail",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=_d),Xe.init(e,t)}),lp=$("$ZodURL",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch(o){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),up=$("$ZodEmoji",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=bd()),Xe.init(e,t)}),cp=$("$ZodNanoID",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=hd),Xe.init(e,t)}),dp=$("$ZodCUID",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=dd),Xe.init(e,t)}),pp=$("$ZodCUID2",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=pd),Xe.init(e,t)}),mp=$("$ZodULID",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=md),Xe.init(e,t)}),fp=$("$ZodXID",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=fd),Xe.init(e,t)}),gp=$("$ZodKSUID",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=gd),Xe.init(e,t)}),hp=$("$ZodISODateTime",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Ad(t)),Xe.init(e,t)}),vp=$("$ZodISODate",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Ed),Xe.init(e,t)}),yp=$("$ZodISOTime",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Cd(t)),Xe.init(e,t)}),_p=$("$ZodISODuration",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=vd),Xe.init(e,t)}),bp=$("$ZodIPv4",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=xd),Xe.init(e,t),e._zod.bag.format="ipv4"}),xp=$("$ZodIPv6",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=wd),Xe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch(n){o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),wp=$("$ZodMAC",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Sd(t.delimiter)),Xe.init(e,t),e._zod.bag.format="mac"}),Sp=$("$ZodCIDRv4",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=kd),Xe.init(e,t)}),kp=$("$ZodCIDRv6",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Id),Xe.init(e,t),e._zod.check=o=>{let n=o.value.split("/");try{if(n.length!==2)throw new Error;let[i,s]=n;if(!s)throw new Error;let l=Number(s);if(`${l}`!==s)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch(i){o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function Ip(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(t){return!1}}var Tp=$("$ZodBase64",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Td),Xe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{Ip(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function K_(e){if(!Ds.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ip(r)}var $p=$("$ZodBase64URL",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=Ds),Xe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{K_(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),Ep=$("$ZodE164",(e,t)=>{var r;(r=t.pattern)!=null||(t.pattern=$d),Xe.init(e,t)});function Y_(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch(r){return!1}}var Cp=$("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{Y_(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ap=$("$ZodCustomStringFormat",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Hs=$("$ZodNumber",(e,t)=>{var r;Se.init(e,t),e._zod.pattern=(r=e._zod.bag.pattern)!=null?r:zs,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=Number(o.value)}catch(l){}let i=o.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return o;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),o}}),Pp=$("$ZodNumberFormat",(e,t)=>{Fd.init(e,t),Hs.init(e,t)}),ri=$("$ZodBoolean",(e,t)=>{Se.init(e,t),e._zod.pattern=Md,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch(i){}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Bs=$("$ZodBigInt",(e,t)=>{Se.init(e,t),e._zod.pattern=Od,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(n){}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Op=$("$ZodBigIntFormat",(e,t)=>{Ld.init(e,t),Bs.init(e,t)}),Rp=$("$ZodSymbol",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Mp=$("$ZodUndefined",(e,t)=>{Se.init(e,t),e._zod.pattern=jd,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="undefined"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Np=$("$ZodNull",(e,t)=>{Se.init(e,t),e._zod.pattern=Nd,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),jp=$("$ZodAny",(e,t)=>{Se.init(e,t),e._zod.parse=r=>r}),Dp=$("$ZodUnknown",(e,t)=>{Se.init(e,t),e._zod.parse=r=>r}),zp=$("$ZodNever",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Up=$("$ZodVoid",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="undefined"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Fp=$("$ZodDate",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(l){}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function U_(e,t,r){e.issues.length&&t.issues.push(...Qt(r,e.issues)),t.value[r]=e.value}var Lp=$("$ZodArray",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;sU_(u,r,s))):U_(d,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Gs(e,t,r,o,n){if(e.issues.length){if(n&&!(r in o))return;t.issues.push(...Qt(r,e.issues))}e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}function X_(e){var o,n,i,s;let t=Object.keys(e.shape);for(let l of t)if(!((s=(i=(n=(o=e.shape)==null?void 0:o[l])==null?void 0:n._zod)==null?void 0:i.traits)!=null&&s.has("$ZodType")))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);let r=od(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Q_(e,t,r,o,n,i){let s=[],l=n.keySet,d=n.catchall._zod,u=d.def.type,m=d.optout==="optional";for(let c in t){if(l.has(c))continue;if(u==="never"){s.push(c);continue}let p=d.run({value:t[c],issues:[]},o);p instanceof Promise?e.push(p.then(f=>Gs(f,r,c,t,m))):Gs(p,r,c,t,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var eb=$("$ZodObject",(e,t)=>{Se.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){let l=t.shape;Object.defineProperty(t,"shape",{get:()=>{let d={...l};return Object.defineProperty(t,"shape",{value:d}),d}})}let o=Eo(()=>X_(t));Ce(e._zod,"propValues",()=>{var u;let l=t.shape,d={};for(let m in l){let c=l[m]._zod;if(c.values){(u=d[m])!=null||(d[m]=new Set);for(let p of c.values)d[m].add(p)}}return d});let n=Hn,i=t.catchall,s;e._zod.parse=(l,d)=>{s!=null||(s=o.value);let u=l.value;if(!n(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};let m=[],c=s.shape;for(let p of s.keys){let f=c[p],v=f._zod.optout==="optional",g=f._zod.run({value:u[p],issues:[]},d);g instanceof Promise?m.push(g.then(y=>Gs(y,l,p,u,v))):Gs(g,l,p,u,v)}return i?Q_(m,u,l,d,o.value,e):m.length?Promise.all(m).then(()=>l):l}}),qp=$("$ZodObjectJIT",(e,t)=>{eb.init(e,t);let r=e._zod.parse,o=Eo(()=>X_(t)),n=p=>{var _;let f=new ti(["shape","payload","ctx"]),v=o.value,g=k=>{let w=Is(k);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let y=Object.create(null),S=0;for(let k of v.keys)y[k]=`key_${S++}`;f.write("const newResult = {};");for(let k of v.keys){let w=y[k],h=Is(k),I=p[k],j=((_=I==null?void 0:I._zod)==null?void 0:_.optout)==="optional";f.write(`const ${w} = ${g(k)};`),j?f.write(` + if (${w}.issues.length) { + if (${h} in input) { + payload.issues = payload.issues.concat(${w}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${h}, ...iss.path] : [${h}] + }))); + } + } + + if (${w}.value === undefined) { + if (${h} in input) { + newResult[${h}] = undefined; + } + } else { + newResult[${h}] = ${w}.value; + } + + `):f.write(` + if (${w}.issues.length) { + payload.issues = payload.issues.concat(${w}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${h}, ...iss.path] : [${h}] + }))); + } + + if (${w}.value === undefined) { + if (${h} in input) { + newResult[${h}] = undefined; + } + } else { + newResult[${h}] = ${w}.value; + } + + `)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(k,w)=>b(p,k,w)},i,s=Hn,l=!Za.jitless,u=l&&td.value,m=t.catchall,c;e._zod.parse=(p,f)=>{c!=null||(c=o.value);let v=p.value;return s(v)?l&&u&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(i||(i=n(t.shape)),p=i(p,f),m?Q_([],v,p,f,c,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function F_(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Tn(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Jt(s,o,ft())))}),t)}var ni=$("$ZodUnion",(e,t)=>{Se.init(e,t),Ce(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ce(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ce(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ce(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Ha(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=!1,l=[];for(let d of t.options){let u=d._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)l.push(u),s=!0;else{if(u.issues.length===0)return u;l.push(u)}}return s?Promise.all(l).then(d=>F_(d,n,e,i)):F_(l,n,e,i)}});function L_(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Jt(s,o,ft())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var Zp=$("$ZodXor",(e,t)=>{ni.init(e,t),t.inclusive=!1;let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=!1,l=[];for(let d of t.options){let u=d._zod.run({value:n.value,issues:[]},i);u instanceof Promise?(l.push(u),s=!0):l.push(u)}return s?Promise.all(l).then(d=>L_(d,n,e,i)):L_(l,n,e,i)}}),Vp=$("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ni.init(e,t);let r=e._zod.parse;Ce(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[l,d]of Object.entries(s)){n[l]||(n[l]=new Set);for(let u of d)n[l].add(u)}}return n});let o=Eo(()=>{var s;let n=t.options,i=new Map;for(let l of n){let d=(s=l._zod.propValues)==null?void 0:s[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(let u of d){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,l)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Hn(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let l=o.value.get(s==null?void 0:s[t.discriminator]);return l?l._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)}}),Gp=$("$ZodIntersection",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([d,u])=>q_(r,d,u)):q_(r,i,s)}});function op(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(In(e)&&In(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=op(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;ol.l&&l.r).map(([l])=>l);if(i.length&&n&&e.issues.push({...n,keys:i}),Tn(e))return e;let s=op(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Js=$("$ZodTuple",(e,t)=>{Se.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],l=[...r].reverse().findIndex(m=>m._zod.optin!=="optional"),d=l===-1?0:r.length-l;if(!t.rest){let m=i.length>r.length,c=i.length=i.length&&u>=d)continue;let c=m._zod.run({value:i[u],issues:[]},n);c instanceof Promise?s.push(c.then(p=>Ls(p,o,u))):Ls(c,o,u)}if(t.rest){let m=i.slice(r.length);for(let c of m){u++;let p=t.rest._zod.run({value:c,issues:[]},n);p instanceof Promise?s.push(p.then(f=>Ls(f,o,u))):Ls(p,o,u)}}return s.length?Promise.all(s).then(()=>o):o}});function Ls(e,t,r){e.issues.length&&t.issues.push(...Qt(r,e.issues)),t.value[r]=e.value}var Hp=$("$ZodRecord",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!In(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let l=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);let m=t.valueType._zod.run({value:n[u],issues:[]},o);m instanceof Promise?i.push(m.then(c=>{c.issues.length&&r.issues.push(...Qt(u,c.issues)),r.value[u]=c.value})):(m.issues.length&&r.issues.push(...Qt(u,m.issues)),r.value[u]=m.value)}let d;for(let u in n)l.has(u)||(d=d!=null?d:[],d.push(u));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(n)){if(l==="__proto__")continue;let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&zs.test(l)&&d.issues.length){let c=t.keyType._zod.run({value:Number(l),issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");c.issues.length===0&&(d=c)}if(d.issues.length){t.mode==="loose"?r.value[l]=n[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(c=>Jt(c,o,ft())),input:l,path:[l],inst:e});continue}let m=t.valueType._zod.run({value:n[l],issues:[]},o);m instanceof Promise?i.push(m.then(c=>{c.issues.length&&r.issues.push(...Qt(l,c.issues)),r.value[d.value]=c.value})):(m.issues.length&&r.issues.push(...Qt(l,m.issues)),r.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Bp=$("$ZodMap",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,l]of n){let d=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:l,issues:[]},o);d instanceof Promise||u instanceof Promise?i.push(Promise.all([d,u]).then(([m,c])=>{Z_(m,c,r,s,n,e,o)})):Z_(d,u,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Z_(e,t,r,o,n,i,s){e.issues.length&&(Ba.has(typeof o)?r.issues.push(...Qt(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(l=>Jt(l,s,ft()))})),t.issues.length&&(Ba.has(typeof o)?r.issues.push(...Qt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(l=>Jt(l,s,ft()))})),r.value.set(e.value,t.value)}var Jp=$("$ZodSet",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let l=t.valueType._zod.run({value:s,issues:[]},o);l instanceof Promise?i.push(l.then(d=>V_(d,r))):V_(l,r)}return i.length?Promise.all(i).then(()=>r):r}});function V_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Wp=$("$ZodEnum",(e,t)=>{Se.init(e,t);let r=Ga(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Ba.has(typeof n)).map(n=>typeof n=="string"?cr(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),Kp=$("$ZodLiteral",(e,t)=>{if(Se.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?cr(o):o?cr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Yp=$("$ZodFile",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Xp=$("$ZodTransform",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new wn(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new vr;return r.value=n,r}});function G_(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Ws=$("$ZodOptional",(e,t)=>{Se.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ce(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ha(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>G_(i,r.value)):G_(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Qp=$("$ZodExactOptional",(e,t)=>{Ws.init(e,t),Ce(e._zod,"values",()=>t.innerType._zod.values),Ce(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),em=$("$ZodNullable",(e,t)=>{Se.init(e,t),Ce(e._zod,"optin",()=>t.innerType._zod.optin),Ce(e._zod,"optout",()=>t.innerType._zod.optout),Ce(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ha(r.source)}|null)$`):void 0}),Ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),tm=$("$ZodDefault",(e,t)=>{Se.init(e,t),e._zod.optin="optional",Ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>H_(i,t)):H_(n,t)}});function H_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var rm=$("$ZodPrefault",(e,t)=>{Se.init(e,t),e._zod.optin="optional",Ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),nm=$("$ZodNonOptional",(e,t)=>{Se.init(e,t),Ce(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>B_(i,e)):B_(n,e)}});function B_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var om=$("$ZodSuccess",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new wn("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),am=$("$ZodCatch",(e,t)=>{Se.init(e,t),Ce(e._zod,"optin",()=>t.innerType._zod.optin),Ce(e._zod,"optout",()=>t.innerType._zod.optout),Ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Jt(s,o,ft()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>Jt(i,o,ft()))},input:r.value}),r.issues=[]),r)}}),im=$("$ZodNaN",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),sm=$("$ZodPipe",(e,t)=>{Se.init(e,t),Ce(e._zod,"values",()=>t.in._zod.values),Ce(e._zod,"optin",()=>t.in._zod.optin),Ce(e._zod,"optout",()=>t.out._zod.optout),Ce(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>qs(s,t.in,o)):qs(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>qs(i,t.out,o)):qs(n,t.out,o)}});function qs(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var oi=$("$ZodCodec",(e,t)=>{Se.init(e,t),Ce(e._zod,"values",()=>t.in._zod.values),Ce(e._zod,"optin",()=>t.in._zod.optin),Ce(e._zod,"optout",()=>t.out._zod.optout),Ce(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>Zs(s,t,o)):Zs(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Zs(s,t,o)):Zs(i,t,o)}}});function Zs(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>Vs(e,i,t.out,r)):Vs(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>Vs(e,i,t.in,r)):Vs(e,n,t.in,r)}}function Vs(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var lm=$("$ZodReadonly",(e,t)=>{Se.init(e,t),Ce(e._zod,"propValues",()=>t.innerType._zod.propValues),Ce(e._zod,"values",()=>t.innerType._zod.values),Ce(e._zod,"optin",()=>{var r,o;return(o=(r=t.innerType)==null?void 0:r._zod)==null?void 0:o.optin}),Ce(e._zod,"optout",()=>{var r,o;return(o=(r=t.innerType)==null?void 0:r._zod)==null?void 0:o.optout}),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(J_):J_(n)}});function J_(e){return e.value=Object.freeze(e.value),e}var um=$("$ZodTemplateLiteral",(e,t)=>{Se.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||nd.has(typeof o))r.push(cr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>{var i;return typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:(i=t.format)!=null?i:"template_literal",pattern:e._zod.pattern.source}),o)}}),cm=$("$ZodFunction",(e,t)=>(Se.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?$s(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?$s(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Es(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Es(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new Js({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),dm=$("$ZodPromise",(e,t)=>{Se.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),pm=$("$ZodLazy",(e,t)=>{Se.init(e,t),Ce(e._zod,"innerType",()=>t.getter()),Ce(e._zod,"pattern",()=>{var r,o;return(o=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:o.pattern}),Ce(e._zod,"propValues",()=>{var r,o;return(o=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:o.propValues}),Ce(e._zod,"optin",()=>{var r,o,n;return(n=(o=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:o.optin)!=null?n:void 0}),Ce(e._zod,"optout",()=>{var r,o,n;return(n=(o=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:o.optout)!=null?n:void 0}),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),mm=$("$ZodCustom",(e,t)=>{nt.init(e,t),Se.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>W_(i,r,o,e));W_(n,r,o,e)}});function W_(e,t,r,o){var n;if(!e){let i={code:"custom",input:r,inst:o,path:[...(n=o._zod.def.path)!=null?n:[]],continue:!o._zod.def.abort};o._zod.def.params&&(i.params=o._zod.def.params),t.issues.push(Co(i))}}var Wn={};Or(Wn,{ar:()=>tb,az:()=>rb,be:()=>ob,bg:()=>ab,ca:()=>ib,cs:()=>sb,da:()=>lb,de:()=>ub,en:()=>Ks,eo:()=>cb,es:()=>db,fa:()=>pb,fi:()=>mb,fr:()=>fb,frCA:()=>gb,he:()=>hb,hu:()=>vb,hy:()=>_b,id:()=>bb,is:()=>xb,it:()=>wb,ja:()=>Sb,ka:()=>kb,kh:()=>Ib,km:()=>Ys,ko:()=>Tb,lt:()=>Eb,mk:()=>Cb,ms:()=>Ab,nl:()=>Pb,no:()=>Ob,ota:()=>Rb,pl:()=>Nb,ps:()=>Mb,pt:()=>jb,ru:()=>zb,sl:()=>Ub,sv:()=>Fb,ta:()=>Lb,th:()=>qb,tr:()=>Zb,ua:()=>Vb,uk:()=>Xs,ur:()=>Gb,uz:()=>Hb,vi:()=>Bb,yo:()=>Kb,zhCN:()=>Jb,zhTW:()=>Wb});var jC=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${f}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${c}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${f}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(l=n.origin)!=null?l:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${c} ${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(u=n.origin)!=null?u:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${c} ${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${c} ${n.minimum.toString()} ${p.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${c} ${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:c.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${c.suffix}"`:c.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${c.includes}"`:c.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${c.pattern}`:`${(m=r[c.format])!=null?m:n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${N(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function tb(){return{localeError:jC()}}var DC=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${f}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${c}, daxil olan ${f}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(l=n.origin)!=null?l:"d\u0259y\u0259r"} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(u=n.origin)!=null?u:"d\u0259y\u0259r"} ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${c}${n.minimum.toString()} ${p.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${c.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:c.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${c.suffix}" il\u0259 bitm\u0259lidir`:c.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${c.includes}" daxil olmal\u0131d\u0131r`:c.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${c.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function rb(){return{localeError:DC()}}function nb(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var zC=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{var i,s,l,d,u;switch(n.code){case"invalid_type":{let m=(i=o[n.expected])!=null?i:n.expected,c=K(n.input),p=(s=o[c])!=null?s:c;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${p}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${m}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${p}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${N(n.values,"|")}`;case"too_big":{let m=n.inclusive?"<=":"<",c=t(n.origin);if(c){let p=Number(n.maximum),f=nb(p,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${(l=n.origin)!=null?l:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${m}${n.maximum.toString()} ${f}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${(d=n.origin)!=null?d:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${m}${n.maximum.toString()}`}case"too_small":{let m=n.inclusive?">=":">",c=t(n.origin);if(c){let p=Number(n.minimum),f=nb(p,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${m}${n.minimum.toString()} ${f}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${m}${n.minimum.toString()}`}case"invalid_format":{let m=n;return m.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${m.prefix}"`:m.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${m.suffix}"`:m.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${m.includes}"`:m.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${m.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${(u=r[m.format])!=null?u:n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${N(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function ob(){return{localeError:zC()}}var UC=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${f}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${c}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${f}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${(l=n.origin)!=null?l:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${(u=n.origin)!=null?u:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${c}${n.minimum.toString()} ${p.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;if(c.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${c.prefix}"`;if(c.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${c.suffix}"`;if(c.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${c.includes}"`;if(c.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${c.pattern}`;let p="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return c.format==="emoji"&&(p="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),c.format==="datetime"&&(p="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),c.format==="date"&&(p="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),c.format==="time"&&(p="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),c.format==="duration"&&(p="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${p} ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function ab(){return{localeError:UC()}}var FC=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${f}`:`Tipus inv\xE0lid: s'esperava ${c}, s'ha rebut ${f}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${J(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${N(n.values," o ")}`;case"too_big":{let c=n.inclusive?"com a m\xE0xim":"menys de",p=t(n.origin);return p?`Massa gran: s'esperava que ${(l=n.origin)!=null?l:"el valor"} contingu\xE9s ${c} ${n.maximum.toString()} ${(d=p.unit)!=null?d:"elements"}`:`Massa gran: s'esperava que ${(u=n.origin)!=null?u:"el valor"} fos ${c} ${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?"com a m\xEDnim":"m\xE9s de",p=t(n.origin);return p?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${c} ${n.minimum.toString()} ${p.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${c} ${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${c.prefix}"`:c.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${c.suffix}"`:c.format==="includes"?`Format inv\xE0lid: ha d'incloure "${c.includes}"`:c.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${c.pattern}`:`Format inv\xE0lid per a ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function ib(){return{localeError:FC()}}var LC=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{var i,s,l,d,u,m,c,p,f;switch(n.code){case"invalid_type":{let v=(i=o[n.expected])!=null?i:n.expected,g=K(n.input),y=(s=o[g])!=null?s:g;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${y}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${v}, obdr\u017Eeno ${y}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${N(n.values,"|")}`;case"too_big":{let v=n.inclusive?"<=":"<",g=t(n.origin);return g?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(l=n.origin)!=null?l:"hodnota"} mus\xED m\xEDt ${v}${n.maximum.toString()} ${(d=g.unit)!=null?d:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(u=n.origin)!=null?u:"hodnota"} mus\xED b\xFDt ${v}${n.maximum.toString()}`}case"too_small":{let v=n.inclusive?">=":">",g=t(n.origin);return g?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(m=n.origin)!=null?m:"hodnota"} mus\xED m\xEDt ${v}${n.minimum.toString()} ${(c=g.unit)!=null?c:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(p=n.origin)!=null?p:"hodnota"} mus\xED b\xFDt ${v}${n.minimum.toString()}`}case"invalid_format":{let v=n;return v.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${v.prefix}"`:v.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${v.suffix}"`:v.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${v.includes}"`:v.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${v.pattern}`:`Neplatn\xFD form\xE1t ${(f=r[v.format])!=null?f:n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${N(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function sb(){return{localeError:LC()}}var qC=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${f}`:`Ugyldigt input: forventede ${c}, fik ${f}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin),f=(l=o[n.origin])!=null?l:n.origin;return p?`For stor: forventede ${f!=null?f:"value"} ${p.verb} ${c} ${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementer"}`:`For stor: forventede ${f!=null?f:"value"} havde ${c} ${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin),f=(u=o[n.origin])!=null?u:n.origin;return p?`For lille: forventede ${f} ${p.verb} ${c} ${n.minimum.toString()} ${p.unit}`:`For lille: forventede ${f} havde ${c} ${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Ugyldig streng: skal starte med "${c.prefix}"`:c.format==="ends_with"?`Ugyldig streng: skal ende med "${c.suffix}"`:c.format==="includes"?`Ugyldig streng: skal indeholde "${c.includes}"`:c.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${c.pattern}`:`Ugyldig ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${N(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function lb(){return{localeError:qC()}}var ZC=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${f}`:`Ung\xFCltige Eingabe: erwartet ${c}, erhalten ${f}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Zu gro\xDF: erwartet, dass ${(l=n.origin)!=null?l:"Wert"} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${(u=n.origin)!=null?u:"Wert"} ${c}${n.maximum.toString()} ist`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Zu klein: erwartet, dass ${n.origin} ${c}${n.minimum.toString()} ${p.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${c}${n.minimum.toString()} ist`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Ung\xFCltiger String: muss mit "${c.prefix}" beginnen`:c.format==="ends_with"?`Ung\xFCltiger String: muss mit "${c.suffix}" enden`:c.format==="includes"?`Ung\xFCltiger String: muss "${c.includes}" enthalten`:c.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${c.pattern} entsprechen`:`Ung\xFCltig: ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${N(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function ub(){return{localeError:ZC()}}var VC=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return`Invalid input: expected ${c}, received ${f}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${J(n.values[0])}`:`Invalid option: expected one of ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Too big: expected ${(l=n.origin)!=null?l:"value"} to have ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elements"}`:`Too big: expected ${(u=n.origin)!=null?u:"value"} to be ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Too small: expected ${n.origin} to have ${c}${n.minimum.toString()} ${p.unit}`:`Too small: expected ${n.origin} to be ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Invalid string: must start with "${c.prefix}"`:c.format==="ends_with"?`Invalid string: must end with "${c.suffix}"`:c.format==="includes"?`Invalid string: must include "${c.includes}"`:c.format==="regex"?`Invalid string: must match pattern ${c.pattern}`:`Invalid ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Ks(){return{localeError:VC()}}var GC=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${f}`:`Nevalida enigo: atendi\u011Dis ${c}, ricevi\u011Dis ${f}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Tro granda: atendi\u011Dis ke ${(l=n.origin)!=null?l:"valoro"} havu ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementojn"}`:`Tro granda: atendi\u011Dis ke ${(u=n.origin)!=null?u:"valoro"} havu ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${c}${n.minimum.toString()} ${p.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${c.prefix}"`:c.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${c.suffix}"`:c.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${c.includes}"`:c.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${c.pattern}`:`Nevalida ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function cb(){return{localeError:GC()}}var HC=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{var i,s,l,d,u,m,c,p;switch(n.code){case"invalid_type":{let f=(i=o[n.expected])!=null?i:n.expected,v=K(n.input),g=(s=o[v])!=null?s:v;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${g}`:`Entrada inv\xE1lida: se esperaba ${f}, recibido ${g}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${N(n.values,"|")}`;case"too_big":{let f=n.inclusive?"<=":"<",v=t(n.origin),g=(l=o[n.origin])!=null?l:n.origin;return v?`Demasiado grande: se esperaba que ${g!=null?g:"valor"} tuviera ${f}${n.maximum.toString()} ${(d=v.unit)!=null?d:"elementos"}`:`Demasiado grande: se esperaba que ${g!=null?g:"valor"} fuera ${f}${n.maximum.toString()}`}case"too_small":{let f=n.inclusive?">=":">",v=t(n.origin),g=(u=o[n.origin])!=null?u:n.origin;return v?`Demasiado peque\xF1o: se esperaba que ${g} tuviera ${f}${n.minimum.toString()} ${v.unit}`:`Demasiado peque\xF1o: se esperaba que ${g} fuera ${f}${n.minimum.toString()}`}case"invalid_format":{let f=n;return f.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${f.prefix}"`:f.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${f.suffix}"`:f.format==="includes"?`Cadena inv\xE1lida: debe incluir "${f.includes}"`:f.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${f.pattern}`:`Inv\xE1lido ${(m=r[f.format])!=null?m:n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${(c=o[n.origin])!=null?c:n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${(p=o[n.origin])!=null?p:n.origin}`;default:return"Entrada inv\xE1lida"}}};function db(){return{localeError:HC()}}var BC=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${f} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${c} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${f} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${N(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(l=n.origin)!=null?l:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(u=n.origin)!=null?u:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${c}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${c}${n.minimum.toString()} ${p.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${c}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${c.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:c.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${c.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:c.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${c.includes}" \u0628\u0627\u0634\u062F`:c.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${c.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${(m=r[c.format])!=null?m:n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${N(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function pb(){return{localeError:BC()}}var JC=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{var i,s,l;switch(n.code){case"invalid_type":{let d=(i=o[n.expected])!=null?i:n.expected,u=K(n.input),m=(s=o[u])!=null?s:u;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${m}`:`Virheellinen tyyppi: odotettiin ${d}, oli ${m}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${N(n.values,"|")}`;case"too_big":{let d=n.inclusive?"<=":"<",u=t(n.origin);return u?`Liian suuri: ${u.subject} t\xE4ytyy olla ${d}${n.maximum.toString()} ${u.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${d}${n.maximum.toString()}`}case"too_small":{let d=n.inclusive?">=":">",u=t(n.origin);return u?`Liian pieni: ${u.subject} t\xE4ytyy olla ${d}${n.minimum.toString()} ${u.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${d}${n.minimum.toString()}`}case"invalid_format":{let d=n;return d.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${d.prefix}"`:d.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${d.suffix}"`:d.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${d.includes}"`:d.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${d.pattern}`:`Virheellinen ${(l=r[d.format])!=null?l:n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${N(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function mb(){return{localeError:JC()}}var WC=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN",number:"nombre",array:"tableau"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${f} re\xE7u`:`Entr\xE9e invalide : ${c} attendu, ${f} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${J(n.values[0])} attendu`:`Option invalide : une valeur parmi ${N(n.values,"|")} attendue`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Trop grand : ${(l=n.origin)!=null?l:"valeur"} doit ${p.verb} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\xE9l\xE9ment(s)"}`:`Trop grand : ${(u=n.origin)!=null?u:"valeur"} doit \xEAtre ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Trop petit : ${n.origin} doit ${p.verb} ${c}${n.minimum.toString()} ${p.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${c.prefix}"`:c.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${c.suffix}"`:c.format==="includes"?`Cha\xEEne invalide : doit inclure "${c.includes}"`:c.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${c.pattern}`:`${(m=r[c.format])!=null?m:n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${N(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function fb(){return{localeError:WC()}}var KC=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{var i,s,l,d,u;switch(n.code){case"invalid_type":{let m=(i=o[n.expected])!=null?i:n.expected,c=K(n.input),p=(s=o[c])!=null?s:c;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${p}`:`Entr\xE9e invalide : attendu ${m}, re\xE7u ${p}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${J(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${N(n.values,"|")}`;case"too_big":{let m=n.inclusive?"\u2264":"<",c=t(n.origin);return c?`Trop grand : attendu que ${(l=n.origin)!=null?l:"la valeur"} ait ${m}${n.maximum.toString()} ${c.unit}`:`Trop grand : attendu que ${(d=n.origin)!=null?d:"la valeur"} soit ${m}${n.maximum.toString()}`}case"too_small":{let m=n.inclusive?"\u2265":">",c=t(n.origin);return c?`Trop petit : attendu que ${n.origin} ait ${m}${n.minimum.toString()} ${c.unit}`:`Trop petit : attendu que ${n.origin} soit ${m}${n.minimum.toString()}`}case"invalid_format":{let m=n;return m.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${m.prefix}"`:m.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${m.suffix}"`:m.format==="includes"?`Cha\xEEne invalide : doit inclure "${m.includes}"`:m.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${m.pattern}`:`${(u=r[m.format])!=null?u:n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${N(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function gb(){return{localeError:KC()}}var YC=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=u=>u?e[u]:void 0,o=u=>{let m=r(u);return m?m.label:u!=null?u:e.unknown.label},n=u=>`\u05D4${o(u)}`,i=u=>{var p;let m=r(u);return((p=m==null?void 0:m.gender)!=null?p:"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"},s=u=>{var m;return u&&(m=t[u])!=null?m:null},l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return u=>{var m,c,p,f,v,g,y,S,b,_,k,w,h,I,j,U,F,Z,L,M,q;switch(u.code){case"invalid_type":{let C=u.expected,E=(m=d[C!=null?C:""])!=null?m:o(C),te=K(u.input),P=(f=(p=d[te])!=null?p:(c=e[te])==null?void 0:c.label)!=null?f:te;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${P}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${E}, \u05D4\u05EA\u05E7\u05D1\u05DC ${P}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${J(u.values[0])}`;let C=u.values.map(P=>J(P));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${C[0]} \u05D0\u05D5 ${C[1]}`;let E=C[C.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${C.slice(0,-1).join(", ")} \u05D0\u05D5 ${E}`}case"too_big":{let C=s(u.origin),E=n((v=u.origin)!=null?v:"value");if(u.origin==="string")return`${(g=C==null?void 0:C.longLabel)!=null?g:"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${E} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${(y=C==null?void 0:C.unit)!=null?y:""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let se=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${E} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${se}`}if(u.origin==="array"||u.origin==="set"){let se=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",ee=u.inclusive?`${u.maximum} ${(S=C==null?void 0:C.unit)!=null?S:""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${(b=C==null?void 0:C.unit)!=null?b:""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${E} ${se} \u05DC\u05D4\u05DB\u05D9\u05DC ${ee}`.trim()}let te=u.inclusive?"<=":"<",P=i((_=u.origin)!=null?_:"value");return C!=null&&C.unit?`${C.longLabel} \u05DE\u05D3\u05D9: ${E} ${P} ${te}${u.maximum.toString()} ${C.unit}`:`${(k=C==null?void 0:C.longLabel)!=null?k:"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${E} ${P} ${te}${u.maximum.toString()}`}case"too_small":{let C=s(u.origin),E=n((w=u.origin)!=null?w:"value");if(u.origin==="string")return`${(h=C==null?void 0:C.shortLabel)!=null?h:"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${E} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${(I=C==null?void 0:C.unit)!=null?I:""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let se=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${E} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${se}`}if(u.origin==="array"||u.origin==="set"){let se=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let he=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${E} ${se} \u05DC\u05D4\u05DB\u05D9\u05DC ${he}`}let ee=u.inclusive?`${u.minimum} ${(j=C==null?void 0:C.unit)!=null?j:""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${(U=C==null?void 0:C.unit)!=null?U:""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${E} ${se} \u05DC\u05D4\u05DB\u05D9\u05DC ${ee}`.trim()}let te=u.inclusive?">=":">",P=i((F=u.origin)!=null?F:"value");return C!=null&&C.unit?`${C.shortLabel} \u05DE\u05D3\u05D9: ${E} ${P} ${te}${u.minimum.toString()} ${C.unit}`:`${(Z=C==null?void 0:C.shortLabel)!=null?Z:"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${E} ${P} ${te}${u.minimum.toString()}`}case"invalid_format":{let C=u;if(C.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${C.prefix}"`;if(C.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${C.suffix}"`;if(C.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${C.includes}"`;if(C.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${C.pattern}`;let E=l[C.format],te=(L=E==null?void 0:E.label)!=null?L:C.format,se=((M=E==null?void 0:E.gender)!=null?M:"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${te} \u05DC\u05D0 ${se}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${N(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n((q=u.origin)!=null?q:"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function hb(){return{localeError:YC()}}var XC=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${f}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${c}, a kapott \xE9rt\xE9k ${f}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`T\xFAl nagy: ${(l=n.origin)!=null?l:"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${(u=n.origin)!=null?u:"\xE9rt\xE9k"} t\xFAl nagy: ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${c}${n.minimum.toString()} ${p.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\xC9rv\xE9nytelen string: "${c.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:c.format==="ends_with"?`\xC9rv\xE9nytelen string: "${c.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:c.format==="includes"?`\xC9rv\xE9nytelen string: "${c.includes}" \xE9rt\xE9ket kell tartalmaznia`:c.format==="regex"?`\xC9rv\xE9nytelen string: ${c.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function vb(){return{localeError:XC()}}function yb(e,t,r){return Math.abs(e)===1?t:r}function No(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var QC=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{var i,s,l,d,u;switch(n.code){case"invalid_type":{let m=(i=o[n.expected])!=null?i:n.expected,c=K(n.input),p=(s=o[c])!=null?s:c;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${p}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${m}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${p}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${J(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${N(n.values,"|")}`;case"too_big":{let m=n.inclusive?"<=":"<",c=t(n.origin);if(c){let p=Number(n.maximum),f=yb(p,c.unit.one,c.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No((l=n.origin)!=null?l:"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${m}${n.maximum.toString()} ${f}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No((d=n.origin)!=null?d:"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${m}${n.maximum.toString()}`}case"too_small":{let m=n.inclusive?">=":">",c=t(n.origin);if(c){let p=Number(n.minimum),f=yb(p,c.unit.one,c.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${m}${n.minimum.toString()} ${f}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No(n.origin)} \u056C\u056B\u0576\u056B ${m}${n.minimum.toString()}`}case"invalid_format":{let m=n;return m.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${m.prefix}"-\u0578\u057E`:m.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${m.suffix}"-\u0578\u057E`:m.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${m.includes}"`:m.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${m.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${(u=r[m.format])!=null?u:n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${N(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${No(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${No(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function _b(){return{localeError:QC()}}var eA=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${f}`:`Input tidak valid: diharapkan ${c}, diterima ${f}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${J(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Terlalu besar: diharapkan ${(l=n.origin)!=null?l:"value"} memiliki ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elemen"}`:`Terlalu besar: diharapkan ${(u=n.origin)!=null?u:"value"} menjadi ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Terlalu kecil: diharapkan ${n.origin} memiliki ${c}${n.minimum.toString()} ${p.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`String tidak valid: harus dimulai dengan "${c.prefix}"`:c.format==="ends_with"?`String tidak valid: harus berakhir dengan "${c.suffix}"`:c.format==="includes"?`String tidak valid: harus menyertakan "${c.includes}"`:c.format==="regex"?`String tidak valid: harus sesuai pola ${c.pattern}`:`${(m=r[c.format])!=null?m:n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function bb(){return{localeError:eA()}}var tA=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${f} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${f} \xFEar sem \xE1 a\xF0 vera ${c}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${(l=n.origin)!=null?l:"gildi"} hafi ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${(u=n.origin)!=null?u:"gildi"} s\xE9 ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${c}${n.minimum.toString()} ${p.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${c.prefix}"`:c.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${c.suffix}"`:c.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${c.includes}"`:c.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${c.pattern}`:`Rangt ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${N(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function xb(){return{localeError:tA()}}var rA=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${f}`:`Input non valido: atteso ${c}, ricevuto ${f}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${J(n.values[0])}`:`Opzione non valida: atteso uno tra ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Troppo grande: ${(l=n.origin)!=null?l:"valore"} deve avere ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementi"}`:`Troppo grande: ${(u=n.origin)!=null?u:"valore"} deve essere ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Troppo piccolo: ${n.origin} deve avere ${c}${n.minimum.toString()} ${p.unit}`:`Troppo piccolo: ${n.origin} deve essere ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Stringa non valida: deve iniziare con "${c.prefix}"`:c.format==="ends_with"?`Stringa non valida: deve terminare con "${c.suffix}"`:c.format==="includes"?`Stringa non valida: deve includere "${c.includes}"`:c.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${c.pattern}`:`Invalid ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${N(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function wb(){return{localeError:rA()}}var nA=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${f}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${c}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${f}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${N(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let c=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",p=t(n.origin);return p?`\u5927\u304D\u3059\u304E\u308B\u5024: ${(l=n.origin)!=null?l:"\u5024"}\u306F${n.maximum.toString()}${(d=p.unit)!=null?d:"\u8981\u7D20"}${c}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${(u=n.origin)!=null?u:"\u5024"}\u306F${n.maximum.toString()}${c}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let c=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",p=t(n.origin);return p?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${p.unit}${c}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${c}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${c.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:c.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${c.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:c.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${c.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:c.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${c.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${N(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Sb(){return{localeError:nA()}}var oA=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{var i,s,l,d,u;switch(n.code){case"invalid_type":{let m=(i=o[n.expected])!=null?i:n.expected,c=K(n.input),p=(s=o[c])!=null?s:c;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${p}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${m}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${p}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${N(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let m=n.inclusive?"<=":"<",c=t(n.origin);return c?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${(l=n.origin)!=null?l:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${c.verb} ${m}${n.maximum.toString()} ${c.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${(d=n.origin)!=null?d:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${m}${n.maximum.toString()}`}case"too_small":{let m=n.inclusive?">=":">",c=t(n.origin);return c?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${c.verb} ${m}${n.minimum.toString()} ${c.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${m}${n.minimum.toString()}`}case"invalid_format":{let m=n;return m.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${m.prefix}"-\u10D8\u10D7`:m.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${m.suffix}"-\u10D8\u10D7`:m.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${m.includes}"-\u10E1`:m.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${m.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${(u=r[m.format])!=null?u:n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${N(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function kb(){return{localeError:oA()}}var aA=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${f}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${c} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${f}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(l=n.origin)!=null?l:"\u178F\u1798\u17D2\u179B\u17C3"} ${c} ${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(u=n.origin)!=null?u:"\u178F\u1798\u17D2\u179B\u17C3"} ${c} ${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${c} ${n.minimum.toString()} ${p.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${c} ${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${c.prefix}"`:c.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${c.suffix}"`:c.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${c.includes}"`:c.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${c.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${N(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ys(){return{localeError:aA()}}function Ib(){return Ys()}var iA=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m,c,p,f;switch(n.code){case"invalid_type":{let v=(i=o[n.expected])!=null?i:n.expected,g=K(n.input),y=(s=o[g])!=null?s:g;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${y}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${v}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${y}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${N(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let v=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",g=v==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",y=t(n.origin),S=(l=y==null?void 0:y.unit)!=null?l:"\uC694\uC18C";return y?`${(d=n.origin)!=null?d:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${S} ${v}${g}`:`${(u=n.origin)!=null?u:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${v}${g}`}case"too_small":{let v=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",g=v==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",y=t(n.origin),S=(m=y==null?void 0:y.unit)!=null?m:"\uC694\uC18C";return y?`${(c=n.origin)!=null?c:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${S} ${v}${g}`:`${(p=n.origin)!=null?p:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${v}${g}`}case"invalid_format":{let v=n;return v.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${v.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:v.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${v.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:v.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${v.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:v.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${v.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${(f=r[v.format])!=null?f:n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${N(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Tb(){return{localeError:iA()}}var ai=e=>e.charAt(0).toUpperCase()+e.slice(1);function $b(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var sA=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,s,l){var u;let d=(u=e[n])!=null?u:null;return d===null?d:{unit:d.unit[i],verb:d.verb[l][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{var i,s,l,d,u,m,c,p,f,v,g,y,S,b,_;switch(n.code){case"invalid_type":{let k=(i=o[n.expected])!=null?i:n.expected,w=K(n.input),h=(s=o[w])!=null?s:w;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${h}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${h}, o tik\u0117tasi - ${k}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${J(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${N(n.values,"|")} pasirinkim\u0173`;case"too_big":{let k=(l=o[n.origin])!=null?l:n.origin,w=t(n.origin,$b(Number(n.maximum)),(d=n.inclusive)!=null?d:!1,"smaller");if(w!=null&&w.verb)return`${ai((u=k!=null?k:n.origin)!=null?u:"reik\u0161m\u0117")} ${w.verb} ${n.maximum.toString()} ${(m=w.unit)!=null?m:"element\u0173"}`;let h=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ai((c=k!=null?k:n.origin)!=null?c:"reik\u0161m\u0117")} turi b\u016Bti ${h} ${n.maximum.toString()} ${w==null?void 0:w.unit}`}case"too_small":{let k=(p=o[n.origin])!=null?p:n.origin,w=t(n.origin,$b(Number(n.minimum)),(f=n.inclusive)!=null?f:!1,"bigger");if(w!=null&&w.verb)return`${ai((v=k!=null?k:n.origin)!=null?v:"reik\u0161m\u0117")} ${w.verb} ${n.minimum.toString()} ${(g=w.unit)!=null?g:"element\u0173"}`;let h=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ai((y=k!=null?k:n.origin)!=null?y:"reik\u0161m\u0117")} turi b\u016Bti ${h} ${n.minimum.toString()} ${w==null?void 0:w.unit}`}case"invalid_format":{let k=n;return k.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${k.prefix}"`:k.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${k.suffix}"`:k.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${k.includes}"`:k.format==="regex"?`Eilut\u0117 privalo atitikti ${k.pattern}`:`Neteisingas ${(S=r[k.format])!=null?S:n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${N(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let k=(b=o[n.origin])!=null?b:n.origin;return`${ai((_=k!=null?k:n.origin)!=null?_:"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Eb(){return{localeError:sA()}}var lA=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${f}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${c}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${f}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${J(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(l=n.origin)!=null?l:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(u=n.origin)!=null?u:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${c}${n.minimum.toString()} ${p.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${c.prefix}"`:c.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${c.suffix}"`:c.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${c.includes}"`:c.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${c.pattern}`:`Invalid ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Cb(){return{localeError:lA()}}var uA=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${f}`:`Input tidak sah: dijangka ${c}, diterima ${f}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${J(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Terlalu besar: dijangka ${(l=n.origin)!=null?l:"nilai"} ${p.verb} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elemen"}`:`Terlalu besar: dijangka ${(u=n.origin)!=null?u:"nilai"} adalah ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Terlalu kecil: dijangka ${n.origin} ${p.verb} ${c}${n.minimum.toString()} ${p.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`String tidak sah: mesti bermula dengan "${c.prefix}"`:c.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${c.suffix}"`:c.format==="includes"?`String tidak sah: mesti mengandungi "${c.includes}"`:c.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${c.pattern}`:`${(m=r[c.format])!=null?m:n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${N(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Ab(){return{localeError:uA()}}var cA=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${f}`:`Ongeldige invoer: verwacht ${c}, ontving ${f}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${J(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin),f=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return p?`Te ${f}: verwacht dat ${(l=n.origin)!=null?l:"waarde"} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementen"} ${p.verb}`:`Te ${f}: verwacht dat ${(u=n.origin)!=null?u:"waarde"} ${c}${n.maximum.toString()} is`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin),f=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return p?`Te ${f}: verwacht dat ${n.origin} ${c}${n.minimum.toString()} ${p.unit} ${p.verb}`:`Te ${f}: verwacht dat ${n.origin} ${c}${n.minimum.toString()} is`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Ongeldige tekst: moet met "${c.prefix}" beginnen`:c.format==="ends_with"?`Ongeldige tekst: moet op "${c.suffix}" eindigen`:c.format==="includes"?`Ongeldige tekst: moet "${c.includes}" bevatten`:c.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${c.pattern}`:`Ongeldig: ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Pb(){return{localeError:cA()}}var dA=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${f}`:`Ugyldig input: forventet ${c}, fikk ${f}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${J(n.values[0])}`:`Ugyldig valg: forventet en av ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`For stor(t): forventet ${(l=n.origin)!=null?l:"value"} til \xE5 ha ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementer"}`:`For stor(t): forventet ${(u=n.origin)!=null?u:"value"} til \xE5 ha ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`For lite(n): forventet ${n.origin} til \xE5 ha ${c}${n.minimum.toString()} ${p.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${c.prefix}"`:c.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${c.suffix}"`:c.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${c.includes}"`:c.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${c.pattern}`:`Ugyldig ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${N(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Ob(){return{localeError:dA()}}var pA=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${f}`:`F\xE2sit giren: umulan ${c}, al\u0131nan ${f}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${J(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Fazla b\xFCy\xFCk: ${(l=n.origin)!=null?l:"value"}, ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${(u=n.origin)!=null?u:"value"}, ${c}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${c}${n.minimum.toString()} ${p.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${c}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let c=n;return c.format==="starts_with"?`F\xE2sit metin: "${c.prefix}" ile ba\u015Flamal\u0131.`:c.format==="ends_with"?`F\xE2sit metin: "${c.suffix}" ile bitmeli.`:c.format==="includes"?`F\xE2sit metin: "${c.includes}" ihtiv\xE2 etmeli.`:c.format==="regex"?`F\xE2sit metin: ${c.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Rb(){return{localeError:pA()}}var mA=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${f} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${c} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${f} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${N(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(l=n.origin)!=null?l:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(u=n.origin)!=null?u:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${c}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${c}${n.minimum.toString()} ${p.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${c}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${c.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:c.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${c.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:c.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${c.includes}" \u0648\u0644\u0631\u064A`:c.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${c.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${(m=r[c.format])!=null?m:n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Mb(){return{localeError:mA()}}var fA=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{var i,s,l,d,u,m,c,p,f;switch(n.code){case"invalid_type":{let v=(i=o[n.expected])!=null?i:n.expected,g=K(n.input),y=(s=o[g])!=null?s:g;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${y}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${v}, otrzymano ${y}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${N(n.values,"|")}`;case"too_big":{let v=n.inclusive?"<=":"<",g=t(n.origin);return g?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${(l=n.origin)!=null?l:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${v}${n.maximum.toString()} ${(d=g.unit)!=null?d:"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${(u=n.origin)!=null?u:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${v}${n.maximum.toString()}`}case"too_small":{let v=n.inclusive?">=":">",g=t(n.origin);return g?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${(m=n.origin)!=null?m:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${v}${n.minimum.toString()} ${(c=g.unit)!=null?c:"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${(p=n.origin)!=null?p:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${v}${n.minimum.toString()}`}case"invalid_format":{let v=n;return v.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${v.prefix}"`:v.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${v.suffix}"`:v.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${v.includes}"`:v.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${v.pattern}`:`Nieprawid\u0142ow(y/a/e) ${(f=r[v.format])!=null?f:n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Nb(){return{localeError:fA()}}var gA=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${f}`:`Tipo inv\xE1lido: esperado ${c}, recebido ${f}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${J(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Muito grande: esperado que ${(l=n.origin)!=null?l:"valor"} tivesse ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementos"}`:`Muito grande: esperado que ${(u=n.origin)!=null?u:"valor"} fosse ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Muito pequeno: esperado que ${n.origin} tivesse ${c}${n.minimum.toString()} ${p.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${c.prefix}"`:c.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${c.suffix}"`:c.format==="includes"?`Texto inv\xE1lido: deve incluir "${c.includes}"`:c.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${c.pattern}`:`${(m=r[c.format])!=null?m:n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function jb(){return{localeError:gA()}}function Db(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var hA=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{var i,s,l,d,u;switch(n.code){case"invalid_type":{let m=(i=o[n.expected])!=null?i:n.expected,c=K(n.input),p=(s=o[c])!=null?s:c;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${p}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${m}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${p}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${N(n.values,"|")}`;case"too_big":{let m=n.inclusive?"<=":"<",c=t(n.origin);if(c){let p=Number(n.maximum),f=Db(p,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${(l=n.origin)!=null?l:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${m}${n.maximum.toString()} ${f}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${(d=n.origin)!=null?d:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${m}${n.maximum.toString()}`}case"too_small":{let m=n.inclusive?">=":">",c=t(n.origin);if(c){let p=Number(n.minimum),f=Db(p,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${m}${n.minimum.toString()} ${f}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${m}${n.minimum.toString()}`}case"invalid_format":{let m=n;return m.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${m.prefix}"`:m.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${m.suffix}"`:m.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${m.includes}"`:m.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${m.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${(u=r[m.format])!=null?u:n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function zb(){return{localeError:hA()}}var vA=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${f}`:`Neveljaven vnos: pri\u010Dakovano ${c}, prejeto ${f}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Preveliko: pri\u010Dakovano, da bo ${(l=n.origin)!=null?l:"vrednost"} imelo ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${(u=n.origin)!=null?u:"vrednost"} ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${c}${n.minimum.toString()} ${p.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${c.prefix}"`:c.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${c.suffix}"`:c.format==="includes"?`Neveljaven niz: mora vsebovati "${c.includes}"`:c.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${c.pattern}`:`Neveljaven ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${N(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Ub(){return{localeError:vA()}}var yA=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{var i,s,l,d,u,m,c,p,f,v;switch(n.code){case"invalid_type":{let g=(i=o[n.expected])!=null?i:n.expected,y=K(n.input),S=(s=o[y])!=null?s:y;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${S}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${g}, fick ${S}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${N(n.values,"|")}`;case"too_big":{let g=n.inclusive?"<=":"<",y=t(n.origin);return y?`F\xF6r stor(t): f\xF6rv\xE4ntade ${(l=n.origin)!=null?l:"v\xE4rdet"} att ha ${g}${n.maximum.toString()} ${(d=y.unit)!=null?d:"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${(u=n.origin)!=null?u:"v\xE4rdet"} att ha ${g}${n.maximum.toString()}`}case"too_small":{let g=n.inclusive?">=":">",y=t(n.origin);return y?`F\xF6r lite(t): f\xF6rv\xE4ntade ${(m=n.origin)!=null?m:"v\xE4rdet"} att ha ${g}${n.minimum.toString()} ${y.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${(c=n.origin)!=null?c:"v\xE4rdet"} att ha ${g}${n.minimum.toString()}`}case"invalid_format":{let g=n;return g.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${g.prefix}"`:g.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${g.suffix}"`:g.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${g.includes}"`:g.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${g.pattern}"`:`Ogiltig(t) ${(p=r[g.format])!=null?p:n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${N(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${(f=n.origin)!=null?f:"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${(v=n.origin)!=null?v:"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Fb(){return{localeError:yA()}}var _A=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${N(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${(l=n.origin)!=null?l:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${(u=n.origin)!=null?u:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${c}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${c}${n.minimum.toString()} ${p.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${c}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${c.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:c.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${c.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:c.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${c.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:c.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${c.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Lb(){return{localeError:_A()}}var bA=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${f}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${c} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${f}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",p=t(n.origin);return p?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(l=n.origin)!=null?l:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${c} ${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(u=n.origin)!=null?u:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${c} ${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",p=t(n.origin);return p?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${c} ${n.minimum.toString()} ${p.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${c} ${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${c.prefix}"`:c.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${c.suffix}"`:c.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${c.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:c.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${c.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${N(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function qb(){return{localeError:bA()}}var xA=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${f}`:`Ge\xE7ersiz de\u011Fer: beklenen ${c}, al\u0131nan ${f}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\xC7ok b\xFCy\xFCk: beklenen ${(l=n.origin)!=null?l:"de\u011Fer"} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${(u=n.origin)!=null?u:"de\u011Fer"} ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${c}${n.minimum.toString()} ${p.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Ge\xE7ersiz metin: "${c.prefix}" ile ba\u015Flamal\u0131`:c.format==="ends_with"?`Ge\xE7ersiz metin: "${c.suffix}" ile bitmeli`:c.format==="includes"?`Ge\xE7ersiz metin: "${c.includes}" i\xE7ermeli`:c.format==="regex"?`Ge\xE7ersiz metin: ${c.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Zb(){return{localeError:xA()}}var wA=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${f}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${c}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${f}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${(l=n.origin)!=null?l:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${p.verb} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${(u=n.origin)!=null?u:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${p.verb} ${c}${n.minimum.toString()} ${p.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${c.prefix}"`:c.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${c.suffix}"`:c.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${c.includes}"`:c.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${c.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Xs(){return{localeError:wA()}}function Vb(){return Xs()}var SA=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${f} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${c} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${f} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${N(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(l=n.origin)!=null?l:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(u=n.origin)!=null?u:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${c}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${c}${n.minimum.toString()} ${p.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${c}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${c.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:c.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${c.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:c.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${c.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:c.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${c.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${N(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Gb(){return{localeError:SA()}}var kA=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{var i,s,l,d,u;switch(n.code){case"invalid_type":{let m=(i=o[n.expected])!=null?i:n.expected,c=K(n.input),p=(s=o[c])!=null?s:c;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${p}`:`Noto\u2018g\u2018ri kirish: kutilgan ${m}, qabul qilingan ${p}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${N(n.values,"|")}`;case"too_big":{let m=n.inclusive?"<=":"<",c=t(n.origin);return c?`Juda katta: kutilgan ${(l=n.origin)!=null?l:"qiymat"} ${m}${n.maximum.toString()} ${c.unit} ${c.verb}`:`Juda katta: kutilgan ${(d=n.origin)!=null?d:"qiymat"} ${m}${n.maximum.toString()}`}case"too_small":{let m=n.inclusive?">=":">",c=t(n.origin);return c?`Juda kichik: kutilgan ${n.origin} ${m}${n.minimum.toString()} ${c.unit} ${c.verb}`:`Juda kichik: kutilgan ${n.origin} ${m}${n.minimum.toString()}`}case"invalid_format":{let m=n;return m.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${m.prefix}" bilan boshlanishi kerak`:m.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${m.suffix}" bilan tugashi kerak`:m.format==="includes"?`Noto\u2018g\u2018ri satr: "${m.includes}" ni o\u2018z ichiga olishi kerak`:m.format==="regex"?`Noto\u2018g\u2018ri satr: ${m.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${(u=r[m.format])!=null?u:n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Hb(){return{localeError:kA()}}var IA=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${f}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${c}, nh\u1EADn \u0111\u01B0\u1EE3c ${f}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(l=n.origin)!=null?l:"gi\xE1 tr\u1ECB"} ${p.verb} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(u=n.origin)!=null?u:"gi\xE1 tr\u1ECB"} ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${p.verb} ${c}${n.minimum.toString()} ${p.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${c.prefix}"`:c.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${c.suffix}"`:c.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${c.includes}"`:c.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${c.pattern}`:`${(m=r[c.format])!=null?m:n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${N(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Bb(){return{localeError:IA()}}var TA=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${f}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${c}\uFF0C\u5B9E\u9645\u63A5\u6536 ${f}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(l=n.origin)!=null?l:"\u503C"} ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(u=n.origin)!=null?u:"\u503C"} ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${c}${n.minimum.toString()} ${p.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${c.prefix}" \u5F00\u5934`:c.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${c.suffix}" \u7ED3\u5C3E`:c.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${c.includes}"`:c.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${c.pattern}`:`\u65E0\u6548${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Jb(){return{localeError:TA()}}var $A=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{var i,s,l,d,u,m;switch(n.code){case"invalid_type":{let c=(i=o[n.expected])!=null?i:n.expected,p=K(n.input),f=(s=o[p])!=null?s:p;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${f}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${c}\uFF0C\u4F46\u6536\u5230 ${f}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${N(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",p=t(n.origin);return p?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(l=n.origin)!=null?l:"\u503C"} \u61C9\u70BA ${c}${n.maximum.toString()} ${(d=p.unit)!=null?d:"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(u=n.origin)!=null?u:"\u503C"} \u61C9\u70BA ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",p=t(n.origin);return p?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${c}${n.minimum.toString()} ${p.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;return c.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${c.prefix}" \u958B\u982D`:c.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${c.suffix}" \u7D50\u5C3E`:c.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${c.includes}"`:c.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${c.pattern}`:`\u7121\u6548\u7684 ${(m=r[c.format])!=null?m:n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${N(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Wb(){return{localeError:$A()}}var EA=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){var i;return(i=e[n])!=null?i:null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{var i,s,l,d;switch(n.code){case"invalid_type":{let u=(i=o[n.expected])!=null?i:n.expected,m=K(n.input),c=(s=o[m])!=null?s:m;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${u}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${N(n.values,"|")}`;case"too_big":{let u=n.inclusive?"<=":"<",m=t(n.origin);return m?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${(l=n.origin)!=null?l:"iye"} ${m.verb} ${u}${n.maximum} ${m.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${u}${n.maximum}`}case"too_small":{let u=n.inclusive?">=":">",m=t(n.origin);return m?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${m.verb} ${u}${n.minimum} ${m.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${u}${n.minimum}`}case"invalid_format":{let u=n;return u.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${u.prefix}"`:u.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${u.suffix}"`:u.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${u.includes}"`:u.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${u.pattern}`:`A\u1E63\xEC\u1E63e: ${(d=r[u.format])!=null?d:n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${N(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Kb(){return{localeError:EA()}}var Yb,fm=Symbol("ZodOutput"),gm=Symbol("ZodInput"),Qs=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){var o;let r=t._zod.parent;if(r){let n={...(o=this.get(r))!=null?o:{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function el(){return new Qs}var Xb;(Xb=(Yb=globalThis).__zod_globalRegistry)!=null||(Yb.__zod_globalRegistry=el());var Et=globalThis.__zod_globalRegistry;function hm(e,t){return new e({type:"string",...X(t)})}function vm(e,t){return new e({type:"string",coerce:!0,...X(t)})}function tl(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(t)})}function rl(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(t)})}function nl(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(t)})}function ol(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(t)})}function al(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(t)})}function si(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(t)})}function il(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(t)})}function sl(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(t)})}function ll(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(t)})}function ul(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(t)})}function cl(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(t)})}function dl(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(t)})}function pl(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(t)})}function ml(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(t)})}function fl(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(t)})}function ym(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...X(t)})}function gl(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(t)})}function hl(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(t)})}function vl(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(t)})}function yl(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(t)})}function _l(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(t)})}function bl(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(t)})}var _m={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function bm(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(t)})}function xm(e,t){return new e({type:"string",format:"date",check:"string_format",...X(t)})}function wm(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(t)})}function Sm(e,t){return new e({type:"string",format:"duration",check:"string_format",...X(t)})}function km(e,t){return new e({type:"number",checks:[],...X(t)})}function Im(e,t){return new e({type:"number",coerce:!0,checks:[],...X(t)})}function Tm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...X(t)})}function $m(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...X(t)})}function Em(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...X(t)})}function Cm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...X(t)})}function Am(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...X(t)})}function Pm(e,t){return new e({type:"boolean",...X(t)})}function Om(e,t){return new e({type:"boolean",coerce:!0,...X(t)})}function Rm(e,t){return new e({type:"bigint",...X(t)})}function Mm(e,t){return new e({type:"bigint",coerce:!0,...X(t)})}function Nm(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...X(t)})}function jm(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...X(t)})}function Dm(e,t){return new e({type:"symbol",...X(t)})}function zm(e,t){return new e({type:"undefined",...X(t)})}function Um(e,t){return new e({type:"null",...X(t)})}function Fm(e){return new e({type:"any"})}function Lm(e){return new e({type:"unknown"})}function qm(e,t){return new e({type:"never",...X(t)})}function Zm(e,t){return new e({type:"void",...X(t)})}function Vm(e,t){return new e({type:"date",...X(t)})}function Gm(e,t){return new e({type:"date",coerce:!0,...X(t)})}function Hm(e,t){return new e({type:"nan",...X(t)})}function jr(e,t){return new Us({check:"less_than",...X(t),value:e,inclusive:!1})}function tr(e,t){return new Us({check:"less_than",...X(t),value:e,inclusive:!0})}function Dr(e,t){return new Fs({check:"greater_than",...X(t),value:e,inclusive:!1})}function Lt(e,t){return new Fs({check:"greater_than",...X(t),value:e,inclusive:!0})}function xl(e){return Dr(0,e)}function wl(e){return jr(0,e)}function Sl(e){return tr(0,e)}function kl(e){return Lt(0,e)}function $n(e,t){return new Ud({check:"multiple_of",...X(t),value:e})}function En(e,t){return new qd({check:"max_size",...X(t),maximum:e})}function zr(e,t){return new Zd({check:"min_size",...X(t),minimum:e})}function Kn(e,t){return new Vd({check:"size_equals",...X(t),size:e})}function Yn(e,t){return new Gd({check:"max_length",...X(t),maximum:e})}function nn(e,t){return new Hd({check:"min_length",...X(t),minimum:e})}function Xn(e,t){return new Bd({check:"length_equals",...X(t),length:e})}function jo(e,t){return new Jd({check:"string_format",format:"regex",...X(t),pattern:e})}function Do(e){return new Wd({check:"string_format",format:"lowercase",...X(e)})}function zo(e){return new Kd({check:"string_format",format:"uppercase",...X(e)})}function Uo(e,t){return new Yd({check:"string_format",format:"includes",...X(t),includes:e})}function Fo(e,t){return new Xd({check:"string_format",format:"starts_with",...X(t),prefix:e})}function Lo(e,t){return new Qd({check:"string_format",format:"ends_with",...X(t),suffix:e})}function Il(e,t,r){return new ep({check:"property",property:e,schema:t,...X(r)})}function qo(e,t){return new tp({check:"mime_type",mime:e,...X(t)})}function yr(e){return new rp({check:"overwrite",tx:e})}function Zo(e){return yr(t=>t.normalize(e))}function Vo(){return yr(e=>e.trim())}function Go(){return yr(e=>e.toLowerCase())}function Ho(){return yr(e=>e.toUpperCase())}function Bo(){return yr(e=>ed(e))}function Bm(e,t,r){return new e({type:"array",element:t,...X(r)})}function AA(e,t,r){return new e({type:"union",options:t,...X(r)})}function PA(e,t,r){return new e({type:"union",options:t,inclusive:!1,...X(r)})}function OA(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...X(o)})}function RA(e,t,r){return new e({type:"intersection",left:t,right:r})}function MA(e,t,r,o){let n=r instanceof Se,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...X(i)})}function NA(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...X(o)})}function jA(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...X(o)})}function DA(e,t,r){return new e({type:"set",valueType:t,...X(r)})}function zA(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...X(r)})}function UA(e,t,r){return new e({type:"enum",entries:t,...X(r)})}function FA(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...X(r)})}function Jm(e,t){return new e({type:"file",...X(t)})}function LA(e,t){return new e({type:"transform",transform:t})}function qA(e,t){return new e({type:"optional",innerType:t})}function ZA(e,t){return new e({type:"nullable",innerType:t})}function VA(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():rd(r)}})}function GA(e,t,r){return new e({type:"nonoptional",innerType:t,...X(r)})}function HA(e,t){return new e({type:"success",innerType:t})}function BA(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function JA(e,t,r){return new e({type:"pipe",in:t,out:r})}function WA(e,t){return new e({type:"readonly",innerType:t})}function KA(e,t,r){return new e({type:"template_literal",parts:t,...X(r)})}function YA(e,t){return new e({type:"lazy",getter:t})}function XA(e,t){return new e({type:"promise",innerType:t})}function Wm(e,t,r){var i;let o=X(r);return(i=o.abort)!=null||(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Km(e,t,r){return new e({type:"custom",check:"custom",fn:t,...X(r)})}function Ym(e){let t=Qb(r=>(r.addIssue=o=>{var n,i,s,l;if(typeof o=="string")r.issues.push(Co(o,r.value,t._zod.def));else{let d=o;d.fatal&&(d.continue=!1),(n=d.code)!=null||(d.code="custom"),(i=d.input)!=null||(d.input=r.value),(s=d.inst)!=null||(d.inst=t),(l=d.continue)!=null||(d.continue=!t._zod.def.abort),r.issues.push(Co(d))}},e(r.value,r)));return t}function Qb(e,t){let r=new nt({check:"custom",...X(t)});return r._zod.check=e,r}function Xm(e){let t=new nt({check:"describe"});return t._zod.onattach=[r=>{var n;let o=(n=Et.get(r))!=null?n:{};Et.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function Qm(e){let t=new nt({check:"meta"});return t._zod.onattach=[r=>{var n;let o=(n=Et.get(r))!=null?n:{};Et.add(r,{...o,...e})}],t._zod.check=()=>{},t}function ef(e,t){var f,v,g,y,S;let r=X(t),o=(f=r.truthy)!=null?f:["true","1","yes","on","y","enabled"],n=(v=r.falsy)!=null?v:["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(b=>typeof b=="string"?b.toLowerCase():b),n=n.map(b=>typeof b=="string"?b.toLowerCase():b));let i=new Set(o),s=new Set(n),l=(g=e.Codec)!=null?g:oi,d=(y=e.Boolean)!=null?y:ri,u=(S=e.String)!=null?S:Jn,m=new u({type:"string",error:r.error}),c=new d({type:"boolean",error:r.error}),p=new l({type:"pipe",in:m,out:c,transform:((b,_)=>{let k=b;return r.case!=="sensitive"&&(k=k.toLowerCase()),i.has(k)?!0:s.has(k)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:_.value,inst:p,continue:!1}),{})}),reverseTransform:((b,_)=>b===!0?o[0]||"true":n[0]||"false"),error:r.error});return p}function Jo(e,t,r,o={}){let n=X(o),i={...X(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:l=>r.test(l),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Cn(e){var r,o,n,i,s,l,d,u,m;let t=(r=e==null?void 0:e.target)!=null?r:"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:(o=e.processors)!=null?o:{},metadataRegistry:(n=e==null?void 0:e.metadata)!=null?n:Et,target:t,unrepresentable:(i=e==null?void 0:e.unrepresentable)!=null?i:"throw",override:(s=e==null?void 0:e.override)!=null?s:(()=>{}),io:(l=e==null?void 0:e.io)!=null?l:"output",counter:0,seen:new Map,cycles:(d=e==null?void 0:e.cycles)!=null?d:"ref",reused:(u=e==null?void 0:e.reused)!=null?u:"inline",external:(m=e==null?void 0:e.external)!=null?m:void 0}}function Ge(e,t,r={path:[],schemaPath:[]}){var m,c,p;var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let l=(c=(m=e._zod).toJSONSchema)==null?void 0:c.call(m);if(l)s.schema=l;else{let f={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{let g=s.schema,y=t.processors[n.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);y(e,t,g,f)}let v=e._zod.parent;v&&(s.ref||(s.ref=v),Ge(v,t,f),t.seen.get(v).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(s.schema,d),t.io==="input"&&qt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((p=(o=s.schema).default)!=null||(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function An(e,t){var s,l,d,u;let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let m of e.seen.entries()){let c=(s=e.metadataRegistry.get(m[0]))==null?void 0:s.id;if(c){let p=o.get(c);if(p&&p!==m[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,m[0])}}let n=m=>{var g,y,S,b,_;let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let k=(g=e.external.registry.get(m[0]))==null?void 0:g.id,w=(y=e.external.uri)!=null?y:(I=>I);if(k)return{ref:w(k)};let h=(b=(S=m[1].defId)!=null?S:m[1].schema.id)!=null?b:`schema${e.counter++}`;return m[1].defId=h,{defId:h,ref:`${w("__shared")}#/${c}/${h}`}}if(m[1]===r)return{ref:"#"};let f=`#/${c}/`,v=(_=m[1].schema.id)!=null?_:`__schema${e.counter++}`;return{defId:v,ref:f+v}},i=m=>{if(m[1].schema.$ref)return;let c=m[1],{ref:p,defId:f}=n(m);c.def={...c.schema},f&&(c.defId=f);let v=c.schema;for(let g in v)delete v[g];v.$ref=p};if(e.cycles==="throw")for(let m of e.seen.entries()){let c=m[1];if(c.cycle)throw new Error(`Cycle detected: #/${(l=c.cycle)==null?void 0:l.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let m of e.seen.entries()){let c=m[1];if(t===m[0]){i(m);continue}if(e.external){let f=(d=e.external.registry.get(m[0]))==null?void 0:d.id;if(t!==m[0]&&f){i(m);continue}}if((u=e.metadataRegistry.get(m[0]))==null?void 0:u.id){i(m);continue}if(c.cycle){i(m);continue}if(c.count>1&&e.reused==="ref"){i(m);continue}}}function Pn(e,t){var s,l,d,u,m;let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{var S,b,_;let p=e.seen.get(c);if(p.ref===null)return;let f=(S=p.def)!=null?S:p.schema,v={...f},g=p.ref;if(p.ref=null,g){o(g);let k=e.seen.get(g),w=k.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=(b=f.allOf)!=null?b:[],f.allOf.push(w)):Object.assign(f,w),Object.assign(f,v),c._zod.parent===g)for(let I in f)I==="$ref"||I==="allOf"||I in v||delete f[I];if(w.$ref&&k.def)for(let I in f)I==="$ref"||I==="allOf"||I in k.def&&JSON.stringify(f[I])===JSON.stringify(k.def[I])&&delete f[I]}let y=c._zod.parent;if(y&&y!==g){o(y);let k=e.seen.get(y);if(k!=null&&k.schema.$ref&&(f.$ref=k.schema.$ref,k.def))for(let w in f)w==="$ref"||w==="allOf"||w in k.def&&JSON.stringify(f[w])===JSON.stringify(k.def[w])&&delete f[w]}e.override({zodSchema:c,jsonSchema:f,path:(_=p.path)!=null?_:[]})};for(let c of[...e.seen.entries()].reverse())o(c[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,(s=e.external)!=null&&s.uri){let c=(l=e.external.registry.get(t))==null?void 0:l.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,(d=r.def)!=null?d:r.schema);let i=(m=(u=e.external)==null?void 0:u.defs)!=null?m:{};for(let c of e.seen.entries()){let p=c[1];p.def&&p.defId&&(i[p.defId]=p.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Wo(t,"input",e.processors),output:Wo(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch(c){throw new Error("Error converting schema to JSON.")}}function qt(e,t){let r=t!=null?t:{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return qt(o.element,r);if(o.type==="set")return qt(o.valueType,r);if(o.type==="lazy")return qt(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return qt(o.innerType,r);if(o.type==="intersection")return qt(o.left,r)||qt(o.right,r);if(o.type==="record"||o.type==="map")return qt(o.keyType,r)||qt(o.valueType,r);if(o.type==="pipe")return qt(o.in,r)||qt(o.out,r);if(o.type==="object"){for(let n in o.shape)if(qt(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(qt(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(qt(n,r))return!0;return!!(o.rest&&qt(o.rest,r))}return!1}var tf=(e,t={})=>r=>{let o=Cn({...r,processors:t});return Ge(e,o),An(o,e),Pn(o,e)},Wo=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o!=null?o:{},s=Cn({...n!=null?n:{},target:i,io:t,processors:r});return Ge(e,s),An(s,e),Pn(s,e)};var QA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rf=(e,t,r,o)=>{var m;let n=r;n.type="string";let{minimum:i,maximum:s,format:l,patterns:d,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),l&&(n.format=(m=QA[l])!=null?m:l,n.format===""&&delete n.format,l==="time"&&delete n.format),u&&(n.contentEncoding=u),d&&d.size>0){let c=[...d];c.length===1?n.pattern=c[0].source:c.length>1&&(n.allOf=[...c.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},nf=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:l,multipleOf:d,exclusiveMaximum:u,exclusiveMinimum:m}=e._zod.bag;typeof l=="string"&&l.includes("int")?n.type="integer":n.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=m,n.exclusiveMinimum=!0):n.exclusiveMinimum=m),typeof i=="number"&&(n.minimum=i,typeof m=="number"&&t.target!=="draft-04"&&(m>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u),typeof s=="number"&&(n.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof d=="number"&&(n.multipleOf=d)},of=(e,t,r,o)=>{r.type="boolean"},af=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},sf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},lf=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},uf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},df=(e,t,r,o)=>{r.not={}},pf=(e,t,r,o)=>{},mf=(e,t,r,o)=>{},ff=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},gf=(e,t,r,o)=>{let n=e._zod.def,i=Ga(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},hf=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},vf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},yf=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},_f=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:l,mime:d}=e._zod.bag;s!==void 0&&(i.minLength=s),l!==void 0&&(i.maxLength=l),d?d.length===1?(i.contentMediaType=d[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=d.map(u=>({contentMediaType:u}))):Object.assign(n,i)},bf=(e,t,r,o)=>{r.type="boolean"},xf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Sf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},If=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Tf=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:l}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof l=="number"&&(n.maxItems=l),n.type="array",n.items=Ge(i.element,t,{...o,path:[...o.path,"items"]})},$f=(e,t,r,o)=>{var u;let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let m in s)n.properties[m]=Ge(s[m],t,{...o,path:[...o.path,"properties",m]});let l=new Set(Object.keys(s)),d=new Set([...l].filter(m=>{let c=i.shape[m]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));d.size>0&&(n.required=Array.from(d)),((u=i.catchall)==null?void 0:u._zod.def.type)==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=Ge(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},$l=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((l,d)=>Ge(l,t,{...o,path:[...o.path,i?"oneOf":"anyOf",d]}));i?r.oneOf=s:r.anyOf=s},Ef=(e,t,r,o)=>{let n=e._zod.def,i=Ge(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=Ge(n.right,t,{...o,path:[...o.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,d=[...l(i)?i.allOf:[i],...l(s)?s.allOf:[s]];r.allOf=d},Cf=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((p,f)=>Ge(p,t,{...o,path:[...o.path,s,f]})),u=i.rest?Ge(i.rest,t,{...o,path:[...o.path,l,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=d,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:d},u&&n.items.anyOf.push(u),n.minItems=d.length,u||(n.maxItems=d.length)):(n.items=d,u&&(n.additionalItems=u));let{minimum:m,maximum:c}=e._zod.bag;typeof m=="number"&&(n.minItems=m),typeof c=="number"&&(n.maxItems=c)},Af=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,l=s._zod.bag,d=l==null?void 0:l.patterns;if(i.mode==="loose"&&d&&d.size>0){let m=Ge(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let c of d)n.patternProperties[c.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Ge(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=Ge(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=s._zod.values;if(u){let m=[...u].filter(c=>typeof c=="string"||typeof c=="number");m.length>0&&(n.required=m)}},Pf=(e,t,r,o)=>{let n=e._zod.def,i=Ge(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Of=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Rf=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Mf=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Nf=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch(l){throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},jf=(e,t,r,o)=>{let n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Ge(i,t,o);let s=t.seen.get(e);s.ref=i},Df=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},zf=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},El=(e,t,r,o)=>{let n=e._zod.def;Ge(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Uf=(e,t,r,o)=>{let n=e._zod.innerType;Ge(n,t,o);let i=t.seen.get(e);i.ref=n},Tl={string:rf,number:nf,boolean:of,bigint:af,symbol:sf,null:lf,undefined:uf,void:cf,never:df,any:pf,unknown:mf,date:ff,enum:gf,literal:hf,nan:vf,template_literal:yf,file:_f,success:bf,custom:xf,function:wf,transform:Sf,map:kf,set:If,array:Tf,object:$f,union:$l,intersection:Ef,tuple:Cf,record:Af,nullable:Pf,nonoptional:Of,default:Rf,prefault:Mf,catch:Nf,pipe:jf,readonly:Df,promise:zf,optional:El,lazy:Uf};function On(e,t){if("_idmap"in e){let o=e,n=Cn({...t,processors:Tl}),i={};for(let d of o._idmap.entries()){let[u,m]=d;Ge(m,n)}let s={},l={registry:o,uri:t==null?void 0:t.uri,defs:i};n.external=l;for(let d of o._idmap.entries()){let[u,m]=d;An(n,m),s[u]=Pn(n,m)}if(Object.keys(i).length>0){let d=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[d]:i}}return{schemas:s}}let r=Cn({...t,processors:Tl});return Ge(e,r),An(r,e),Pn(r,e)}var Cl=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){var o;let r=(o=t==null?void 0:t.target)!=null?o:"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Cn({processors:Tl,target:r,...(t==null?void 0:t.metadata)&&{metadata:t.metadata},...(t==null?void 0:t.unrepresentable)&&{unrepresentable:t.unrepresentable},...(t==null?void 0:t.override)&&{override:t.override},...(t==null?void 0:t.io)&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Ge(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),An(this.ctx,t);let o=Pn(this.ctx,t),{"~standard":n,...i}=o;return i}};var Ff={};var li={};Or(li,{ZodAny:()=>ug,ZodArray:()=>mg,ZodBase64:()=>Kl,ZodBase64URL:()=>Yl,ZodBigInt:()=>ta,ZodBigIntFormat:()=>eu,ZodBoolean:()=>ea,ZodCIDRv4:()=>Jl,ZodCIDRv6:()=>Wl,ZodCUID:()=>Ll,ZodCUID2:()=>ql,ZodCatch:()=>Ng,ZodCodec:()=>lu,ZodCustom:()=>_i,ZodCustomStringFormat:()=>Xo,ZodDate:()=>fi,ZodDefault:()=>Cg,ZodDiscriminatedUnion:()=>gg,ZodE164:()=>Xl,ZodEmail:()=>zl,ZodEmoji:()=>Ul,ZodEnum:()=>Ko,ZodExactOptional:()=>Tg,ZodFile:()=>kg,ZodFunction:()=>Vg,ZodGUID:()=>ui,ZodIPv4:()=>Hl,ZodIPv6:()=>Bl,ZodIntersection:()=>hg,ZodJWT:()=>Ql,ZodKSUID:()=>Gl,ZodLazy:()=>Lg,ZodLiteral:()=>Sg,ZodMAC:()=>rg,ZodMap:()=>xg,ZodNaN:()=>Dg,ZodNanoID:()=>Fl,ZodNever:()=>dg,ZodNonOptional:()=>iu,ZodNull:()=>sg,ZodNullable:()=>Eg,ZodNumber:()=>Qo,ZodNumberFormat:()=>ro,ZodObject:()=>hi,ZodOptional:()=>au,ZodPipe:()=>su,ZodPrefault:()=>Pg,ZodPromise:()=>Zg,ZodReadonly:()=>zg,ZodRecord:()=>yi,ZodSet:()=>wg,ZodString:()=>Yo,ZodStringFormat:()=>Qe,ZodSuccess:()=>Mg,ZodSymbol:()=>ag,ZodTemplateLiteral:()=>Fg,ZodTransform:()=>Ig,ZodTuple:()=>yg,ZodType:()=>Te,ZodULID:()=>Zl,ZodURL:()=>mi,ZodUUID:()=>Fr,ZodUndefined:()=>ig,ZodUnion:()=>vi,ZodUnknown:()=>cg,ZodVoid:()=>pg,ZodXID:()=>Vl,ZodXor:()=>fg,_ZodString:()=>Dl,_default:()=>Ag,_function:()=>iw,any:()=>zx,array:()=>gi,base64:()=>xx,base64url:()=>wx,bigint:()=>Rx,boolean:()=>og,catch:()=>jg,check:()=>sw,cidrv4:()=>_x,cidrv6:()=>bx,codec:()=>nw,cuid:()=>dx,cuid2:()=>px,custom:()=>lw,date:()=>Fx,describe:()=>uw,discriminatedUnion:()=>Hx,e164:()=>Sx,email:()=>tx,emoji:()=>ux,enum:()=>nu,exactOptional:()=>$g,file:()=>Qx,float32:()=>Cx,float64:()=>Ax,function:()=>iw,guid:()=>rx,hash:()=>Ex,hex:()=>$x,hostname:()=>Tx,httpUrl:()=>lx,instanceof:()=>dw,int:()=>jl,int32:()=>Px,int64:()=>Mx,intersection:()=>vg,ipv4:()=>hx,ipv6:()=>yx,json:()=>mw,jwt:()=>kx,keyof:()=>Lx,ksuid:()=>gx,lazy:()=>qg,literal:()=>Xx,looseObject:()=>Vx,looseRecord:()=>Jx,mac:()=>vx,map:()=>Wx,meta:()=>cw,nan:()=>rw,nanoid:()=>cx,nativeEnum:()=>Yx,never:()=>tu,nonoptional:()=>Rg,null:()=>lg,nullable:()=>di,nullish:()=>ew,number:()=>ng,object:()=>qx,optional:()=>ci,partialRecord:()=>Bx,pipe:()=>pi,prefault:()=>Og,preprocess:()=>fw,promise:()=>aw,readonly:()=>Ug,record:()=>bg,refine:()=>Gg,set:()=>Kx,strictObject:()=>Zx,string:()=>Nl,stringFormat:()=>Ix,stringbool:()=>pw,success:()=>tw,superRefine:()=>Hg,symbol:()=>jx,templateLiteral:()=>ow,transform:()=>ou,tuple:()=>_g,uint32:()=>Ox,uint64:()=>Nx,ulid:()=>mx,undefined:()=>Dx,union:()=>ru,unknown:()=>to,url:()=>sx,uuid:()=>nx,uuidv4:()=>ox,uuidv6:()=>ax,uuidv7:()=>ix,void:()=>Ux,xid:()=>fx,xor:()=>Gx});var Al={};Or(Al,{endsWith:()=>Lo,gt:()=>Dr,gte:()=>Lt,includes:()=>Uo,length:()=>Xn,lowercase:()=>Do,lt:()=>jr,lte:()=>tr,maxLength:()=>Yn,maxSize:()=>En,mime:()=>qo,minLength:()=>nn,minSize:()=>zr,multipleOf:()=>$n,negative:()=>wl,nonnegative:()=>kl,nonpositive:()=>Sl,normalize:()=>Zo,overwrite:()=>yr,positive:()=>xl,property:()=>Il,regex:()=>jo,size:()=>Kn,slugify:()=>Bo,startsWith:()=>Fo,toLowerCase:()=>Go,toUpperCase:()=>Ho,trim:()=>Vo,uppercase:()=>zo});var Qn={};Or(Qn,{ZodISODate:()=>Ol,ZodISODateTime:()=>Pl,ZodISODuration:()=>Ml,ZodISOTime:()=>Rl,date:()=>qf,datetime:()=>Lf,duration:()=>Vf,time:()=>Zf});var Pl=$("ZodISODateTime",(e,t)=>{hp.init(e,t),Qe.init(e,t)});function Lf(e){return bm(Pl,e)}var Ol=$("ZodISODate",(e,t)=>{vp.init(e,t),Qe.init(e,t)});function qf(e){return xm(Ol,e)}var Rl=$("ZodISOTime",(e,t)=>{yp.init(e,t),Qe.init(e,t)});function Zf(e){return wm(Rl,e)}var Ml=$("ZodISODuration",(e,t)=>{_p.init(e,t),Qe.init(e,t)});function Vf(e){return Sm(Ml,e)}var ex=(e,t)=>{Ka.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Xa(e,r)},flatten:{value:r=>Ya(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,$o,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,$o,2)}},isEmpty:{get(){return e.issues.length===0}}})},tP=$("ZodError",ex),Kt=$("ZodError",ex,{Parent:Error});var Gf=Ao(Kt),Hf=Po(Kt),Bf=Oo(Kt),eo=Ro(Kt),Jf=Cs(Kt),Wf=As(Kt),Kf=Ps(Kt),Yf=Os(Kt),Xf=Rs(Kt),Qf=Ms(Kt),eg=Ns(Kt),tg=js(Kt);var Te=$("ZodType",(e,t)=>(Se.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Wo(e,"input"),output:Wo(e,"output")}}),e.toJSONSchema=tf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>{var o;return e.clone(Y.mergeDefs(t,{checks:[...(o=t.checks)!=null?o:[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},e.with=e.check,e.clone=(r,o)=>Ft(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>Gf(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Bf(e,r,o),e.parseAsync=async(r,o)=>Hf(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>eo(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Jf(e,r,o),e.decode=(r,o)=>Wf(e,r,o),e.encodeAsync=async(r,o)=>Kf(e,r,o),e.decodeAsync=async(r,o)=>Yf(e,r,o),e.safeEncode=(r,o)=>Xf(e,r,o),e.safeDecode=(r,o)=>Qf(e,r,o),e.safeEncodeAsync=async(r,o)=>eg(e,r,o),e.safeDecodeAsync=async(r,o)=>tg(e,r,o),e.refine=(r,o)=>e.check(Gg(r,o)),e.superRefine=r=>e.check(Hg(r)),e.overwrite=r=>e.check(yr(r)),e.optional=()=>ci(e),e.exactOptional=()=>$g(e),e.nullable=()=>di(e),e.nullish=()=>ci(di(e)),e.nonoptional=r=>Rg(e,r),e.array=()=>gi(e),e.or=r=>ru([e,r]),e.and=r=>vg(e,r),e.transform=r=>pi(e,ou(r)),e.default=r=>Ag(e,r),e.prefault=r=>Og(e,r),e.catch=r=>jg(e,r),e.pipe=r=>pi(e,r),e.readonly=()=>Ug(e),e.describe=r=>{let o=e.clone();return Et.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){var r;return(r=Et.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Et.get(e);let o=e.clone();return Et.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Dl=$("_ZodString",(e,t)=>{var o,n,i;Jn.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(s,l,d)=>rf(e,s,l,d);let r=e._zod.bag;e.format=(o=r.format)!=null?o:null,e.minLength=(n=r.minimum)!=null?n:null,e.maxLength=(i=r.maximum)!=null?i:null,e.regex=(...s)=>e.check(jo(...s)),e.includes=(...s)=>e.check(Uo(...s)),e.startsWith=(...s)=>e.check(Fo(...s)),e.endsWith=(...s)=>e.check(Lo(...s)),e.min=(...s)=>e.check(nn(...s)),e.max=(...s)=>e.check(Yn(...s)),e.length=(...s)=>e.check(Xn(...s)),e.nonempty=(...s)=>e.check(nn(1,...s)),e.lowercase=s=>e.check(Do(s)),e.uppercase=s=>e.check(zo(s)),e.trim=()=>e.check(Vo()),e.normalize=(...s)=>e.check(Zo(...s)),e.toLowerCase=()=>e.check(Go()),e.toUpperCase=()=>e.check(Ho()),e.slugify=()=>e.check(Bo())}),Yo=$("ZodString",(e,t)=>{Jn.init(e,t),Dl.init(e,t),e.email=r=>e.check(tl(zl,r)),e.url=r=>e.check(si(mi,r)),e.jwt=r=>e.check(bl(Ql,r)),e.emoji=r=>e.check(il(Ul,r)),e.guid=r=>e.check(ii(ui,r)),e.uuid=r=>e.check(rl(Fr,r)),e.uuidv4=r=>e.check(nl(Fr,r)),e.uuidv6=r=>e.check(ol(Fr,r)),e.uuidv7=r=>e.check(al(Fr,r)),e.nanoid=r=>e.check(sl(Fl,r)),e.guid=r=>e.check(ii(ui,r)),e.cuid=r=>e.check(ll(Ll,r)),e.cuid2=r=>e.check(ul(ql,r)),e.ulid=r=>e.check(cl(Zl,r)),e.base64=r=>e.check(vl(Kl,r)),e.base64url=r=>e.check(yl(Yl,r)),e.xid=r=>e.check(dl(Vl,r)),e.ksuid=r=>e.check(pl(Gl,r)),e.ipv4=r=>e.check(ml(Hl,r)),e.ipv6=r=>e.check(fl(Bl,r)),e.cidrv4=r=>e.check(gl(Jl,r)),e.cidrv6=r=>e.check(hl(Wl,r)),e.e164=r=>e.check(_l(Xl,r)),e.datetime=r=>e.check(Lf(r)),e.date=r=>e.check(qf(r)),e.time=r=>e.check(Zf(r)),e.duration=r=>e.check(Vf(r))});function Nl(e){return hm(Yo,e)}var Qe=$("ZodStringFormat",(e,t)=>{Xe.init(e,t),Dl.init(e,t)}),zl=$("ZodEmail",(e,t)=>{sp.init(e,t),Qe.init(e,t)});function tx(e){return tl(zl,e)}var ui=$("ZodGUID",(e,t)=>{ap.init(e,t),Qe.init(e,t)});function rx(e){return ii(ui,e)}var Fr=$("ZodUUID",(e,t)=>{ip.init(e,t),Qe.init(e,t)});function nx(e){return rl(Fr,e)}function ox(e){return nl(Fr,e)}function ax(e){return ol(Fr,e)}function ix(e){return al(Fr,e)}var mi=$("ZodURL",(e,t)=>{lp.init(e,t),Qe.init(e,t)});function sx(e){return si(mi,e)}function lx(e){return si(mi,{protocol:/^https?$/,hostname:er.domain,...Y.normalizeParams(e)})}var Ul=$("ZodEmoji",(e,t)=>{up.init(e,t),Qe.init(e,t)});function ux(e){return il(Ul,e)}var Fl=$("ZodNanoID",(e,t)=>{cp.init(e,t),Qe.init(e,t)});function cx(e){return sl(Fl,e)}var Ll=$("ZodCUID",(e,t)=>{dp.init(e,t),Qe.init(e,t)});function dx(e){return ll(Ll,e)}var ql=$("ZodCUID2",(e,t)=>{pp.init(e,t),Qe.init(e,t)});function px(e){return ul(ql,e)}var Zl=$("ZodULID",(e,t)=>{mp.init(e,t),Qe.init(e,t)});function mx(e){return cl(Zl,e)}var Vl=$("ZodXID",(e,t)=>{fp.init(e,t),Qe.init(e,t)});function fx(e){return dl(Vl,e)}var Gl=$("ZodKSUID",(e,t)=>{gp.init(e,t),Qe.init(e,t)});function gx(e){return pl(Gl,e)}var Hl=$("ZodIPv4",(e,t)=>{bp.init(e,t),Qe.init(e,t)});function hx(e){return ml(Hl,e)}var rg=$("ZodMAC",(e,t)=>{wp.init(e,t),Qe.init(e,t)});function vx(e){return ym(rg,e)}var Bl=$("ZodIPv6",(e,t)=>{xp.init(e,t),Qe.init(e,t)});function yx(e){return fl(Bl,e)}var Jl=$("ZodCIDRv4",(e,t)=>{Sp.init(e,t),Qe.init(e,t)});function _x(e){return gl(Jl,e)}var Wl=$("ZodCIDRv6",(e,t)=>{kp.init(e,t),Qe.init(e,t)});function bx(e){return hl(Wl,e)}var Kl=$("ZodBase64",(e,t)=>{Tp.init(e,t),Qe.init(e,t)});function xx(e){return vl(Kl,e)}var Yl=$("ZodBase64URL",(e,t)=>{$p.init(e,t),Qe.init(e,t)});function wx(e){return yl(Yl,e)}var Xl=$("ZodE164",(e,t)=>{Ep.init(e,t),Qe.init(e,t)});function Sx(e){return _l(Xl,e)}var Ql=$("ZodJWT",(e,t)=>{Cp.init(e,t),Qe.init(e,t)});function kx(e){return bl(Ql,e)}var Xo=$("ZodCustomStringFormat",(e,t)=>{Ap.init(e,t),Qe.init(e,t)});function Ix(e,t,r={}){return Jo(Xo,e,t,r)}function Tx(e){return Jo(Xo,"hostname",er.hostname,e)}function $x(e){return Jo(Xo,"hex",er.hex,e)}function Ex(e,t){var i;let r=(i=t==null?void 0:t.enc)!=null?i:"hex",o=`${e}_${r}`,n=er[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Jo(Xo,o,n,t)}var Qo=$("ZodNumber",(e,t)=>{var o,n,i,s,l,d,u,m,c;Hs.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(p,f,v)=>nf(e,p,f,v),e.gt=(p,f)=>e.check(Dr(p,f)),e.gte=(p,f)=>e.check(Lt(p,f)),e.min=(p,f)=>e.check(Lt(p,f)),e.lt=(p,f)=>e.check(jr(p,f)),e.lte=(p,f)=>e.check(tr(p,f)),e.max=(p,f)=>e.check(tr(p,f)),e.int=p=>e.check(jl(p)),e.safe=p=>e.check(jl(p)),e.positive=p=>e.check(Dr(0,p)),e.nonnegative=p=>e.check(Lt(0,p)),e.negative=p=>e.check(jr(0,p)),e.nonpositive=p=>e.check(tr(0,p)),e.multipleOf=(p,f)=>e.check($n(p,f)),e.step=(p,f)=>e.check($n(p,f)),e.finite=()=>e;let r=e._zod.bag;e.minValue=(i=Math.max((o=r.minimum)!=null?o:Number.NEGATIVE_INFINITY,(n=r.exclusiveMinimum)!=null?n:Number.NEGATIVE_INFINITY))!=null?i:null,e.maxValue=(d=Math.min((s=r.maximum)!=null?s:Number.POSITIVE_INFINITY,(l=r.exclusiveMaximum)!=null?l:Number.POSITIVE_INFINITY))!=null?d:null,e.isInt=((u=r.format)!=null?u:"").includes("int")||Number.isSafeInteger((m=r.multipleOf)!=null?m:.5),e.isFinite=!0,e.format=(c=r.format)!=null?c:null});function ng(e){return km(Qo,e)}var ro=$("ZodNumberFormat",(e,t)=>{Pp.init(e,t),Qo.init(e,t)});function jl(e){return Tm(ro,e)}function Cx(e){return $m(ro,e)}function Ax(e){return Em(ro,e)}function Px(e){return Cm(ro,e)}function Ox(e){return Am(ro,e)}var ea=$("ZodBoolean",(e,t)=>{ri.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>of(e,r,o,n)});function og(e){return Pm(ea,e)}var ta=$("ZodBigInt",(e,t)=>{var o,n,i;Bs.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(s,l,d)=>af(e,s,l,d),e.gte=(s,l)=>e.check(Lt(s,l)),e.min=(s,l)=>e.check(Lt(s,l)),e.gt=(s,l)=>e.check(Dr(s,l)),e.gte=(s,l)=>e.check(Lt(s,l)),e.min=(s,l)=>e.check(Lt(s,l)),e.lt=(s,l)=>e.check(jr(s,l)),e.lte=(s,l)=>e.check(tr(s,l)),e.max=(s,l)=>e.check(tr(s,l)),e.positive=s=>e.check(Dr(BigInt(0),s)),e.negative=s=>e.check(jr(BigInt(0),s)),e.nonpositive=s=>e.check(tr(BigInt(0),s)),e.nonnegative=s=>e.check(Lt(BigInt(0),s)),e.multipleOf=(s,l)=>e.check($n(s,l));let r=e._zod.bag;e.minValue=(o=r.minimum)!=null?o:null,e.maxValue=(n=r.maximum)!=null?n:null,e.format=(i=r.format)!=null?i:null});function Rx(e){return Rm(ta,e)}var eu=$("ZodBigIntFormat",(e,t)=>{Op.init(e,t),ta.init(e,t)});function Mx(e){return Nm(eu,e)}function Nx(e){return jm(eu,e)}var ag=$("ZodSymbol",(e,t)=>{Rp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>sf(e,r,o,n)});function jx(e){return Dm(ag,e)}var ig=$("ZodUndefined",(e,t)=>{Mp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>uf(e,r,o,n)});function Dx(e){return zm(ig,e)}var sg=$("ZodNull",(e,t)=>{Np.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>lf(e,r,o,n)});function lg(e){return Um(sg,e)}var ug=$("ZodAny",(e,t)=>{jp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pf(e,r,o,n)});function zx(){return Fm(ug)}var cg=$("ZodUnknown",(e,t)=>{Dp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mf(e,r,o,n)});function to(){return Lm(cg)}var dg=$("ZodNever",(e,t)=>{zp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>df(e,r,o,n)});function tu(e){return qm(dg,e)}var pg=$("ZodVoid",(e,t)=>{Up.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cf(e,r,o,n)});function Ux(e){return Zm(pg,e)}var fi=$("ZodDate",(e,t)=>{Fp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(o,n,i)=>ff(e,o,n,i),e.min=(o,n)=>e.check(Lt(o,n)),e.max=(o,n)=>e.check(tr(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Fx(e){return Vm(fi,e)}var mg=$("ZodArray",(e,t)=>{Lp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tf(e,r,o,n),e.element=t.element,e.min=(r,o)=>e.check(nn(r,o)),e.nonempty=r=>e.check(nn(1,r)),e.max=(r,o)=>e.check(Yn(r,o)),e.length=(r,o)=>e.check(Xn(r,o)),e.unwrap=()=>e.element});function gi(e,t){return Bm(mg,e,t)}function Lx(e){let t=e._zod.def.shape;return nu(Object.keys(t))}var hi=$("ZodObject",(e,t)=>{qp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$f(e,r,o,n),Y.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>nu(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:to()}),e.loose=()=>e.clone({...e._zod.def,catchall:to()}),e.strict=()=>e.clone({...e._zod.def,catchall:tu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Y.extend(e,r),e.safeExtend=r=>Y.safeExtend(e,r),e.merge=r=>Y.merge(e,r),e.pick=r=>Y.pick(e,r),e.omit=r=>Y.omit(e,r),e.partial=(...r)=>Y.partial(au,e,r[0]),e.required=(...r)=>Y.required(iu,e,r[0])});function qx(e,t){let r={type:"object",shape:e!=null?e:{},...Y.normalizeParams(t)};return new hi(r)}function Zx(e,t){return new hi({type:"object",shape:e,catchall:tu(),...Y.normalizeParams(t)})}function Vx(e,t){return new hi({type:"object",shape:e,catchall:to(),...Y.normalizeParams(t)})}var vi=$("ZodUnion",(e,t)=>{ni.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$l(e,r,o,n),e.options=t.options});function ru(e,t){return new vi({type:"union",options:e,...Y.normalizeParams(t)})}var fg=$("ZodXor",(e,t)=>{vi.init(e,t),Zp.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$l(e,r,o,n),e.options=t.options});function Gx(e,t){return new fg({type:"union",options:e,inclusive:!1,...Y.normalizeParams(t)})}var gg=$("ZodDiscriminatedUnion",(e,t)=>{vi.init(e,t),Vp.init(e,t)});function Hx(e,t,r){return new gg({type:"union",options:t,discriminator:e,...Y.normalizeParams(r)})}var hg=$("ZodIntersection",(e,t)=>{Gp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ef(e,r,o,n)});function vg(e,t){return new hg({type:"intersection",left:e,right:t})}var yg=$("ZodTuple",(e,t)=>{Js.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cf(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function _g(e,t,r){let o=t instanceof Se,n=o?r:t,i=o?t:null;return new yg({type:"tuple",items:e,rest:i,...Y.normalizeParams(n)})}var yi=$("ZodRecord",(e,t)=>{Hp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Af(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function bg(e,t,r){return new yi({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r)})}function Bx(e,t,r){let o=Ft(e);return o._zod.values=void 0,new yi({type:"record",keyType:o,valueType:t,...Y.normalizeParams(r)})}function Jx(e,t,r){return new yi({type:"record",keyType:e,valueType:t,mode:"loose",...Y.normalizeParams(r)})}var xg=$("ZodMap",(e,t)=>{Bp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>kf(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(zr(...r)),e.nonempty=r=>e.check(zr(1,r)),e.max=(...r)=>e.check(En(...r)),e.size=(...r)=>e.check(Kn(...r))});function Wx(e,t,r){return new xg({type:"map",keyType:e,valueType:t,...Y.normalizeParams(r)})}var wg=$("ZodSet",(e,t)=>{Jp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>If(e,r,o,n),e.min=(...r)=>e.check(zr(...r)),e.nonempty=r=>e.check(zr(1,r)),e.max=(...r)=>e.check(En(...r)),e.size=(...r)=>e.check(Kn(...r))});function Kx(e,t){return new wg({type:"set",valueType:e,...Y.normalizeParams(t)})}var Ko=$("ZodEnum",(e,t)=>{Wp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(o,n,i)=>gf(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ko({...t,checks:[],...Y.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ko({...t,checks:[],...Y.normalizeParams(n),entries:i})}});function nu(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ko({type:"enum",entries:r,...Y.normalizeParams(t)})}function Yx(e,t){return new Ko({type:"enum",entries:e,...Y.normalizeParams(t)})}var Sg=$("ZodLiteral",(e,t)=>{Kp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hf(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Xx(e,t){return new Sg({type:"literal",values:Array.isArray(e)?e:[e],...Y.normalizeParams(t)})}var kg=$("ZodFile",(e,t)=>{Yp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_f(e,r,o,n),e.min=(r,o)=>e.check(zr(r,o)),e.max=(r,o)=>e.check(En(r,o)),e.mime=(r,o)=>e.check(qo(Array.isArray(r)?r:[r],o))});function Qx(e){return Jm(kg,e)}var Ig=$("ZodTransform",(e,t)=>{Xp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Sf(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new wn(e.constructor.name);r.addIssue=i=>{var s,l,d;if(typeof i=="string")r.issues.push(Y.issue(i,r.value,t));else{let u=i;u.fatal&&(u.continue=!1),(s=u.code)!=null||(u.code="custom"),(l=u.input)!=null||(u.input=r.value),(d=u.inst)!=null||(u.inst=e),r.issues.push(Y.issue(u))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function ou(e){return new Ig({type:"transform",transform:e})}var au=$("ZodOptional",(e,t)=>{Ws.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>El(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ci(e){return new au({type:"optional",innerType:e})}var Tg=$("ZodExactOptional",(e,t)=>{Qp.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>El(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function $g(e){return new Tg({type:"optional",innerType:e})}var Eg=$("ZodNullable",(e,t)=>{em.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function di(e){return new Eg({type:"nullable",innerType:e})}function ew(e){return ci(di(e))}var Cg=$("ZodDefault",(e,t)=>{tm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ag(e,t){return new Cg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var Pg=$("ZodPrefault",(e,t)=>{rm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Og(e,t){return new Pg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var iu=$("ZodNonOptional",(e,t)=>{nm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Of(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Rg(e,t){return new iu({type:"nonoptional",innerType:e,...Y.normalizeParams(t)})}var Mg=$("ZodSuccess",(e,t)=>{om.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>bf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function tw(e){return new Mg({type:"success",innerType:e})}var Ng=$("ZodCatch",(e,t)=>{am.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jg(e,t){return new Ng({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Dg=$("ZodNaN",(e,t)=>{im.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>vf(e,r,o,n)});function rw(e){return Hm(Dg,e)}var su=$("ZodPipe",(e,t)=>{sm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jf(e,r,o,n),e.in=t.in,e.out=t.out});function pi(e,t){return new su({type:"pipe",in:e,out:t})}var lu=$("ZodCodec",(e,t)=>{su.init(e,t),oi.init(e,t)});function nw(e,t,r){return new lu({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var zg=$("ZodReadonly",(e,t)=>{lm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Df(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ug(e){return new zg({type:"readonly",innerType:e})}var Fg=$("ZodTemplateLiteral",(e,t)=>{um.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yf(e,r,o,n)});function ow(e,t){return new Fg({type:"template_literal",parts:e,...Y.normalizeParams(t)})}var Lg=$("ZodLazy",(e,t)=>{pm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uf(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function qg(e){return new Lg({type:"lazy",getter:e})}var Zg=$("ZodPromise",(e,t)=>{dm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function aw(e){return new Zg({type:"promise",innerType:e})}var Vg=$("ZodFunction",(e,t)=>{cm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wf(e,r,o,n)});function iw(e){var t,r;return new Vg({type:"function",input:Array.isArray(e==null?void 0:e.input)?_g(e==null?void 0:e.input):(t=e==null?void 0:e.input)!=null?t:gi(to()),output:(r=e==null?void 0:e.output)!=null?r:to()})}var _i=$("ZodCustom",(e,t)=>{mm.init(e,t),Te.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xf(e,r,o,n)});function sw(e){let t=new nt({check:"custom"});return t._zod.check=e,t}function lw(e,t){return Wm(_i,e!=null?e:(()=>!0),t)}function Gg(e,t={}){return Km(_i,e,t)}function Hg(e){return Ym(e)}var uw=Xm,cw=Qm;function dw(e,t={}){let r=new _i({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...Y.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{var n;o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...(n=r._zod.def.path)!=null?n:[]]})},r}var pw=(...e)=>ef({Codec:lu,Boolean:ea,String:Yo},...e);function mw(e){let t=qg(()=>ru([Nl(e),ng(),og(),lg(),gi(t),bg(Nl(),t)]));return t}function fw(e,t){return pi(ou(e),t)}var nP={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function oP(e){ft({customError:e})}function aP(){return ft().customError}var Bg;Bg||(Bg={});var ae={...li,...Al,iso:Qn},iP=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function sP(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t!=null?t:"draft-2020-12"}function lP(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function gw(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ae.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ae.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=lP(n,t),s=Ot(i,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ae.null();if(n.length===0)return ae.never();if(n.length===1)return ae.literal(n[0]);if(n.every(s=>typeof s=="string"))return ae.enum(n);let i=n.map(s=>ae.literal(s));return i.length<2?i[0]:ae.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ae.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return gw(s,t)});return n.length===0?ae.never():n.length===1?n[0]:ae.union(n)}if(!r)return ae.any();let o;switch(r){case"string":{let n=ae.string();if(e.format){let i=e.format;i==="email"?n=n.check(ae.email()):i==="uri"||i==="uri-reference"?n=n.check(ae.url()):i==="uuid"||i==="guid"?n=n.check(ae.uuid()):i==="date-time"?n=n.check(ae.iso.datetime()):i==="date"?n=n.check(ae.iso.date()):i==="time"?n=n.check(ae.iso.time()):i==="duration"?n=n.check(ae.iso.duration()):i==="ipv4"?n=n.check(ae.ipv4()):i==="ipv6"?n=n.check(ae.ipv6()):i==="mac"?n=n.check(ae.mac()):i==="cidr"?n=n.check(ae.cidrv4()):i==="cidr-v6"?n=n.check(ae.cidrv6()):i==="base64"?n=n.check(ae.base64()):i==="base64url"?n=n.check(ae.base64url()):i==="e164"?n=n.check(ae.e164()):i==="jwt"?n=n.check(ae.jwt()):i==="emoji"?n=n.check(ae.emoji()):i==="nanoid"?n=n.check(ae.nanoid()):i==="cuid"?n=n.check(ae.cuid()):i==="cuid2"?n=n.check(ae.cuid2()):i==="ulid"?n=n.check(ae.ulid()):i==="xid"?n=n.check(ae.xid()):i==="ksuid"&&(n=n.check(ae.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?ae.number().int():ae.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=ae.boolean();break}case"null":{o=ae.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[d,u]of Object.entries(i)){let m=Ot(u,t);n[d]=s.has(d)?m:m.optional()}if(e.propertyNames){let d=Ot(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Ot(e.additionalProperties,t):ae.any();if(Object.keys(n).length===0){o=ae.record(d,u);break}let m=ae.object(n).passthrough(),c=ae.looseRecord(d,u);o=ae.intersection(m,c);break}if(e.patternProperties){let d=e.patternProperties,u=Object.keys(d),m=[];for(let p of u){let f=Ot(d[p],t),v=ae.string().regex(new RegExp(p));m.push(ae.looseRecord(v,f))}let c=[];if(Object.keys(n).length>0&&c.push(ae.object(n).passthrough()),c.push(...m),c.length===0)o=ae.object({}).passthrough();else if(c.length===1)o=c[0];else{let p=ae.intersection(c[0],c[1]);for(let f=2;fOt(d,t)),l=i&&typeof i=="object"&&!Array.isArray(i)?Ot(i,t):void 0;l?o=ae.tuple(s).rest(l):o=ae.tuple(s),typeof e.minItems=="number"&&(o=o.check(ae.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ae.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(d=>Ot(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?Ot(e.additionalItems,t):void 0;l?o=ae.tuple(s).rest(l):o=ae.tuple(s),typeof e.minItems=="number"&&(o=o.check(ae.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ae.maxLength(e.maxItems)))}else if(i!==void 0){let s=Ot(i,t),l=ae.array(s);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),o=l}else o=ae.array(ae.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function Ot(e,t){if(typeof e=="boolean")return e?ae.any():ae.never();let r=gw(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(u=>Ot(u,t)),d=ae.union(l);r=o?ae.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(u=>Ot(u,t)),d=ae.xor(l);r=o?ae.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:ae.any();else{let l=o?r:Ot(e.allOf[0],t),d=o?0:1;for(let u=d;u0&&t.registry.add(r,n),r}function hw(e,t){var i;if(typeof e=="boolean")return e?ae.any():ae.never();let r=sP(e,t==null?void 0:t.defaultTarget),o=e.$defs||e.definitions||{},n={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:(i=t==null?void 0:t.registry)!=null?i:Et};return Ot(e,n)}var uu={};Or(uu,{bigint:()=>pP,boolean:()=>dP,date:()=>mP,number:()=>cP,string:()=>uP});function uP(e){return vm(Yo,e)}function cP(e){return Im(Qo,e)}function dP(e){return Om(ea,e)}function pP(e){return Mm(ta,e)}function mP(e){return Gm(fi,e)}ft(Ks());var Ne;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(l=>typeof n[n[l]]!="number"),s={};for(let l of i)s[l]=n[l];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(Ne||(Ne={}));var yw;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(yw||(yw={}));var ce=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),on=e=>{switch(typeof e){case"undefined":return ce.undefined;case"string":return ce.string;case"number":return Number.isNaN(e)?ce.nan:ce.number;case"boolean":return ce.boolean;case"function":return ce.function;case"bigint":return ce.bigint;case"symbol":return ce.symbol;case"object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map!="undefined"&&e instanceof Map?ce.map:typeof Set!="undefined"&&e instanceof Set?ce.set:typeof Date!="undefined"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var W=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var rr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let l=o,d=0;for(;dr.message){let r=Object.create(null),o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};rr.create=e=>new rr(e);var fP=(e,t)=>{let r;switch(e.code){case W.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case W.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case W.invalid_union:r="Invalid input";break;case W.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case W.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case W.invalid_arguments:r="Invalid function arguments";break;case W.invalid_return_type:r="Invalid function return type";break;case W.invalid_date:r="Invalid date";break;case W.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ne.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case W.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case W.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case W.custom:r="Invalid input";break;case W.invalid_intersection_types:r="Intersection results could not be merged";break;case W.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case W.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e)}return{message:r}},Rn=fP;var gP=Rn;function bi(){return gP}var cu=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let l="",d=o.filter(u=>!!u).slice().reverse();for(let u of d)l=u(s,{data:t,defaultError:l}).message;return{...n,path:i,message:l}};function ie(e,t){let r=bi(),o=cu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Rn?void 0:Rn].filter(n=>!!n)});e.common.issues.push(o)}var Rt=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return xe;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return xe;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value!="undefined"||n.alwaysSet)&&(o[i.value]=s.value)}return{status:t.value,value:o}}},xe=Object.freeze({status:"aborted"}),ra=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),Jg=e=>e.status==="aborted",Wg=e=>e.status==="dirty",no=e=>e.status==="valid",xi=e=>typeof Promise!="undefined"&&e instanceof Promise;var me;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(me||(me={}));var dr=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},_w=(e,t)=>{if(no(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new rr(e.common.issues);return this._error=r,this._error}}};function $e(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,l)=>{var u,m;let{message:d}=e;return s.code==="invalid_enum_value"?{message:d!=null?d:l.defaultError}:typeof l.data=="undefined"?{message:(u=d!=null?d:o)!=null?u:l.defaultError}:s.code!=="invalid_type"?{message:l.defaultError}:{message:(m=d!=null?d:r)!=null?m:l.defaultError}},description:n}}var Pe=class{get description(){return this._def.description}_getType(t){return on(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:on(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Rt,ctx:{common:t.parent.common,data:t.data,parsedType:on(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(xi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){var i;let o={common:{issues:[],async:(i=r==null?void 0:r.async)!=null?i:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:on(t)},n=this._parseSync({data:t,path:o.path,parent:o});return _w(o,n)}"~validate"(t){var o,n;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:on(t)};if(!this["~standard"].async)try{let i=this._parseSync({data:t,path:[],parent:r});return no(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(n=(o=i==null?void 0:i.message)==null?void 0:o.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>no(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:on(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(xi(n)?n:Promise.resolve(n));return _w(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r=="undefined"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),l=()=>i.addIssue({code:W.custom,...o(n)});return typeof Promise!="undefined"&&s instanceof Promise?s.then(d=>d?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new br({schema:this,typeName:z.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return _r.create(this,this._def)}nullable(){return ln.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nn.create(this)}promise(){return oo.create(this,this._def)}or(t){return sa.create([this,t],this._def)}and(t){return la.create(this,t,this._def)}transform(t){return new br({...$e(this._def),schema:this,typeName:z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new ma({...$e(this._def),innerType:this,defaultValue:r,typeName:z.ZodDefault})}brand(){return new du({typeName:z.ZodBranded,type:this,...$e(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new fa({...$e(this._def),innerType:this,catchValue:r,typeName:z.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return pu.create(this,t)}readonly(){return ga.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},hP=/^c[^\s-]{8,}$/i,vP=/^[0-9a-z]+$/,yP=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_P=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bP=/^[a-z0-9_-]{21}$/i,xP=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wP=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,SP=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Kg,IP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,TP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,$P=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,EP=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,AP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bw="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",PP=new RegExp(`^${bw}$`);function xw(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function OP(e){return new RegExp(`^${xw(e)}$`)}function RP(e){let t=`${bw}T${xw(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function MP(e,t){return!!((t==="v4"||!t)&&IP.test(e)||(t==="v6"||!t)&&$P.test(e))}function NP(e,t){if(!xP.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&n.alg!==t)}catch(r){return!1}}function jP(e,t){return!!((t==="v4"||!t)&&TP.test(e)||(t==="v6"||!t)&&EP.test(e))}var oa=class e extends Pe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return ie(i,{code:W.invalid_type,expected:ce.string,received:i.parsedType}),xe}let o=new Rt,n;for(let i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(n=this._getOrReturnCtx(t,n),ie(n,{code:W.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,l=t.data.lengtht.test(n),{validation:r,code:W.invalid_string,...me.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...me.errToObj(t)})}url(t){return this._addCheck({kind:"url",...me.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...me.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...me.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...me.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...me.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...me.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...me.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...me.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...me.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...me.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...me.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...me.errToObj(t)})}datetime(t){var r,o;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)=="undefined"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!=null?r:!1,local:(o=t==null?void 0:t.local)!=null?o:!1,...me.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)=="undefined"?null:t==null?void 0:t.precision,...me.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...me.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...me.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...me.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...me.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...me.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...me.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...me.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...me.errToObj(r)})}nonempty(t){return this.min(1,me.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new oa({checks:[],typeName:z.ZodString,coerce:(t=e==null?void 0:e.coerce)!=null?t:!1,...$e(e)})};function DP(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var wi=class e extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return ie(i,{code:W.invalid_type,expected:ce.number,received:i.parsedType}),xe}let o,n=new Rt;for(let i of this._def.checks)i.kind==="int"?Ne.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),ie(o,{code:W.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),ie(o,{code:W.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?DP(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),ie(o,{code:W.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),ie(o,{code:W.not_finite,message:i.message}),n.dirty()):Ne.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,me.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:me.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:me.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:me.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:me.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:me.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:me.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Ne.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.valuenew wi({checks:[],typeName:z.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});var Si=class e extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch(i){return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new Rt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),ie(o,{code:W.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),ie(o,{code:W.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ne.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return ie(r,{code:W.invalid_type,expected:ce.bigint,received:r.parsedType}),xe}gte(t,r){return this.setLimit("min",t,!0,me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,me.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:me.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:me.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new Si({checks:[],typeName:z.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!=null?t:!1,...$e(e)})};var ki=class extends Pe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return ie(o,{code:W.invalid_type,expected:ce.boolean,received:o.parsedType}),xe}return Zt(t.data)}};ki.create=e=>new ki({typeName:z.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});var Ii=class e extends Pe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return ie(i,{code:W.invalid_type,expected:ce.date,received:i.parsedType}),xe}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ie(i,{code:W.invalid_date}),xe}let o=new Rt,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(n=this._getOrReturnCtx(t,n),ie(n,{code:W.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):Ne.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:me.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:me.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew Ii({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:z.ZodDate,...$e(e)});var Ti=class extends Pe{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return ie(o,{code:W.invalid_type,expected:ce.symbol,received:o.parsedType}),xe}return Zt(t.data)}};Ti.create=e=>new Ti({typeName:z.ZodSymbol,...$e(e)});var aa=class extends Pe{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return ie(o,{code:W.invalid_type,expected:ce.undefined,received:o.parsedType}),xe}return Zt(t.data)}};aa.create=e=>new aa({typeName:z.ZodUndefined,...$e(e)});var ia=class extends Pe{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return ie(o,{code:W.invalid_type,expected:ce.null,received:o.parsedType}),xe}return Zt(t.data)}};ia.create=e=>new ia({typeName:z.ZodNull,...$e(e)});var $i=class extends Pe{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}};$i.create=e=>new $i({typeName:z.ZodAny,...$e(e)});var Mn=class extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}};Mn.create=e=>new Mn({typeName:z.ZodUnknown,...$e(e)});var Lr=class extends Pe{_parse(t){let r=this._getOrReturnCtx(t);return ie(r,{code:W.invalid_type,expected:ce.never,received:r.parsedType}),xe}};Lr.create=e=>new Lr({typeName:z.ZodNever,...$e(e)});var Ei=class extends Pe{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return ie(o,{code:W.invalid_type,expected:ce.void,received:o.parsedType}),xe}return Zt(t.data)}};Ei.create=e=>new Ei({typeName:z.ZodVoid,...$e(e)});var Nn=class e extends Pe{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return ie(r,{code:W.invalid_type,expected:ce.array,received:r.parsedType}),xe;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,l=r.data.lengthn.maxLength.value&&(ie(r,{code:W.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,l)=>n.type._parseAsync(new dr(r,s,r.path,l)))).then(s=>Rt.mergeArray(o,s));let i=[...r.data].map((s,l)=>n.type._parseSync(new dr(r,s,r.path,l)));return Rt.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:me.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:me.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:me.toString(r)}})}nonempty(t){return this.min(1,t)}};Nn.create=(e,t)=>new Nn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z.ZodArray,...$e(t)});function na(e){if(e instanceof nr){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=_r.create(na(o))}return new nr({...e._def,shape:()=>t})}else return e instanceof Nn?new Nn({...e._def,type:na(e.element)}):e instanceof _r?_r.create(na(e.unwrap())):e instanceof ln?ln.create(na(e.unwrap())):e instanceof sn?sn.create(e.items.map(t=>na(t))):e}var nr=class e extends Pe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Ne.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return ie(u,{code:W.invalid_type,expected:ce.object,received:u.parsedType}),xe}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),l=[];if(!(this._def.catchall instanceof Lr&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||l.push(u);let d=[];for(let u of s){let m=i[u],c=n.data[u];d.push({key:{status:"valid",value:u},value:m._parse(new dr(n,c,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof Lr){let u=this._def.unknownKeys;if(u==="passthrough")for(let m of l)d.push({key:{status:"valid",value:m},value:{status:"valid",value:n.data[m]}});else if(u==="strict")l.length>0&&(ie(n,{code:W.unrecognized_keys,keys:l}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let m of l){let c=n.data[m];d.push({key:{status:"valid",value:m},value:u._parse(new dr(n,c,n.path,m)),alwaysSet:m in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let m of d){let c=await m.key,p=await m.value;u.push({key:c,value:p,alwaysSet:m.alwaysSet})}return u}).then(u=>Rt.mergeObjectSync(o,u)):Rt.mergeObjectSync(o,d)}get shape(){return this._def.shape()}strict(t){return me.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{var i,s,l,d;let n=(l=(s=(i=this._def).errorMap)==null?void 0:s.call(i,r,o).message)!=null?l:o.defaultError;return r.code==="unrecognized_keys"?{message:(d=me.errToObj(t).message)!=null?d:n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:z.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Ne.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Ne.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return na(this)}partial(t){let r={};for(let o of Ne.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Ne.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof _r;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return ww(Ne.objectKeys(this.shape))}};nr.create=(e,t)=>new nr({shape:()=>e,unknownKeys:"strip",catchall:Lr.create(),typeName:z.ZodObject,...$e(t)});nr.strictCreate=(e,t)=>new nr({shape:()=>e,unknownKeys:"strict",catchall:Lr.create(),typeName:z.ZodObject,...$e(t)});nr.lazycreate=(e,t)=>new nr({shape:e,unknownKeys:"strip",catchall:Lr.create(),typeName:z.ZodObject,...$e(t)});var sa=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let l of i)if(l.result.status==="valid")return l.result;for(let l of i)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;let s=i.map(l=>new rr(l.ctx.common.issues));return ie(r,{code:W.invalid_union,unionErrors:s}),xe}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let d of o){let u={...r,common:{...r.common,issues:[]},parent:null},m=d._parseSync({data:r.data,path:r.path,parent:u});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let l=s.map(d=>new rr(d));return ie(r,{code:W.invalid_union,unionErrors:l}),xe}}get options(){return this._def.options}};sa.create=(e,t)=>new sa({options:e,typeName:z.ZodUnion,...$e(t)});var an=e=>e instanceof ua?an(e.schema):e instanceof br?an(e.innerType()):e instanceof ca?[e.value]:e instanceof da?e.options:e instanceof pa?Ne.objectValues(e.enum):e instanceof ma?an(e._def.innerType):e instanceof aa?[void 0]:e instanceof ia?[null]:e instanceof _r?[void 0,...an(e.unwrap())]:e instanceof ln?[null,...an(e.unwrap())]:e instanceof du||e instanceof ga?an(e.unwrap()):e instanceof fa?an(e._def.innerType):[],Yg=class e extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return ie(r,{code:W.invalid_type,expected:ce.object,received:r.parsedType}),xe;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ie(r,{code:W.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=an(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let l of s){if(n.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);n.set(l,i)}}return new e({typeName:z.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...$e(o)})}};function Xg(e,t){let r=on(e),o=on(t);if(e===t)return{valid:!0,data:e};if(r===ce.object&&o===ce.object){let n=Ne.objectKeys(t),i=Ne.objectKeys(e).filter(l=>n.indexOf(l)!==-1),s={...e,...t};for(let l of i){let d=Xg(e[l],t[l]);if(!d.valid)return{valid:!1};s[l]=d.data}return{valid:!0,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i{if(Jg(i)||Jg(s))return xe;let l=Xg(i.value,s.value);return l.valid?((Wg(i)||Wg(s))&&r.dirty(),{status:r.value,value:l.data}):(ie(o,{code:W.invalid_intersection_types}),xe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};la.create=(e,t,r)=>new la({left:e,right:t,typeName:z.ZodIntersection,...$e(r)});var sn=class e extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return ie(o,{code:W.invalid_type,expected:ce.array,received:o.parsedType}),xe;if(o.data.lengththis._def.items.length&&(ie(o,{code:W.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((s,l)=>{let d=this._def.items[l]||this._def.rest;return d?d._parse(new dr(o,s,o.path,l)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>Rt.mergeArray(r,s)):Rt.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};sn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new sn({items:e,typeName:z.ZodTuple,rest:null,...$e(t)})};var Qg=class e extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return ie(o,{code:W.invalid_type,expected:ce.object,received:o.parsedType}),xe;let n=[],i=this._def.keyType,s=this._def.valueType;for(let l in o.data)n.push({key:i._parse(new dr(o,l,o.path,l)),value:s._parse(new dr(o,o.data[l],o.path,l)),alwaysSet:l in o.data});return o.common.async?Rt.mergeObjectAsync(r,n):Rt.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Pe?new e({keyType:t,valueType:r,typeName:z.ZodRecord,...$e(o)}):new e({keyType:oa.create(),valueType:t,typeName:z.ZodRecord,...$e(r)})}},Ci=class extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return ie(o,{code:W.invalid_type,expected:ce.map,received:o.parsedType}),xe;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([l,d],u)=>({key:n._parse(new dr(o,l,o.path,[u,"key"])),value:i._parse(new dr(o,d,o.path,[u,"value"]))}));if(o.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let d of s){let u=await d.key,m=await d.value;if(u.status==="aborted"||m.status==="aborted")return xe;(u.status==="dirty"||m.status==="dirty")&&r.dirty(),l.set(u.value,m.value)}return{status:r.value,value:l}})}else{let l=new Map;for(let d of s){let u=d.key,m=d.value;if(u.status==="aborted"||m.status==="aborted")return xe;(u.status==="dirty"||m.status==="dirty")&&r.dirty(),l.set(u.value,m.value)}return{status:r.value,value:l}}}};Ci.create=(e,t,r)=>new Ci({valueType:t,keyType:e,typeName:z.ZodMap,...$e(r)});var Ai=class e extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return ie(o,{code:W.invalid_type,expected:ce.set,received:o.parsedType}),xe;let n=this._def;n.minSize!==null&&o.data.sizen.maxSize.value&&(ie(o,{code:W.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(d){let u=new Set;for(let m of d){if(m.status==="aborted")return xe;m.status==="dirty"&&r.dirty(),u.add(m.value)}return{status:r.value,value:u}}let l=[...o.data.values()].map((d,u)=>i._parse(new dr(o,d,o.path,u)));return o.common.async?Promise.all(l).then(d=>s(d)):s(l)}min(t,r){return new e({...this._def,minSize:{value:t,message:me.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:me.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Ai.create=(e,t)=>new Ai({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...$e(t)});var eh=class e extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return ie(r,{code:W.invalid_type,expected:ce.function,received:r.parsedType}),xe;function o(l,d){return cu({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,bi(),Rn].filter(u=>!!u),issueData:{code:W.invalid_arguments,argumentsError:d}})}function n(l,d){return cu({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,bi(),Rn].filter(u=>!!u),issueData:{code:W.invalid_return_type,returnTypeError:d}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof oo){let l=this;return Zt(async function(...d){let u=new rr([]),m=await l._def.args.parseAsync(d,i).catch(f=>{throw u.addIssue(o(d,f)),u}),c=await Reflect.apply(s,this,m);return await l._def.returns._def.type.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u})})}else{let l=this;return Zt(function(...d){let u=l._def.args.safeParse(d,i);if(!u.success)throw new rr([o(d,u.error)]);let m=Reflect.apply(s,this,u.data),c=l._def.returns.safeParse(m,i);if(!c.success)throw new rr([n(m,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:sn.create(t).rest(Mn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||sn.create([]).rest(Mn.create()),returns:r||Mn.create(),typeName:z.ZodFunction,...$e(o)})}},ua=class extends Pe{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ua.create=(e,t)=>new ua({getter:e,typeName:z.ZodLazy,...$e(t)});var ca=class extends Pe{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return ie(r,{received:r.data,code:W.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:t.data}}get value(){return this._def.value}};ca.create=(e,t)=>new ca({value:e,typeName:z.ZodLiteral,...$e(t)});function ww(e,t){return new da({values:e,typeName:z.ZodEnum,...$e(t)})}var da=class e extends Pe{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return ie(r,{expected:Ne.joinValues(o),received:r.parsedType,code:W.invalid_type}),xe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return ie(r,{received:r.data,code:W.invalid_enum_value,options:o}),xe}return Zt(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};da.create=ww;var pa=class extends Pe{_parse(t){let r=Ne.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=Ne.objectValues(r);return ie(o,{expected:Ne.joinValues(n),received:o.parsedType,code:W.invalid_type}),xe}if(this._cache||(this._cache=new Set(Ne.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Ne.objectValues(r);return ie(o,{received:o.data,code:W.invalid_enum_value,options:n}),xe}return Zt(t.data)}get enum(){return this._def.values}};pa.create=(e,t)=>new pa({values:e,typeName:z.ZodNativeEnum,...$e(t)});var oo=class extends Pe{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===!1)return ie(r,{code:W.invalid_type,expected:ce.promise,received:r.parsedType}),xe;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Zt(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};oo.create=(e,t)=>new oo({type:e,typeName:z.ZodPromise,...$e(t)});var br=class extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{ie(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async l=>{if(r.value==="aborted")return xe;let d=await this._def.schema._parseAsync({data:l,path:o.path,parent:o});return d.status==="aborted"?xe:d.status==="dirty"?ra(d.value):r.value==="dirty"?ra(d.value):d});{if(r.value==="aborted")return xe;let l=this._def.schema._parseSync({data:s,path:o.path,parent:o});return l.status==="aborted"?xe:l.status==="dirty"?ra(l.value):r.value==="dirty"?ra(l.value):l}}if(n.type==="refinement"){let s=l=>{let d=n.refinement(l,i);if(o.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(o.common.async===!1){let l=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?xe:(l.status==="dirty"&&r.dirty(),s(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(l=>l.status==="aborted"?xe:(l.status==="dirty"&&r.dirty(),s(l.value).then(()=>({status:r.value,value:l.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!no(s))return xe;let l=n.transform(s.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>no(s)?Promise.resolve(n.transform(s.value,i)).then(l=>({status:r.value,value:l})):xe);Ne.assertNever(n)}};br.create=(e,t,r)=>new br({schema:e,typeName:z.ZodEffects,effect:t,...$e(r)});br.createWithPreprocess=(e,t,r)=>new br({schema:t,effect:{type:"preprocess",transform:e},typeName:z.ZodEffects,...$e(r)});var _r=class extends Pe{_parse(t){return this._getType(t)===ce.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};_r.create=(e,t)=>new _r({innerType:e,typeName:z.ZodOptional,...$e(t)});var ln=class extends Pe{_parse(t){return this._getType(t)===ce.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ln.create=(e,t)=>new ln({innerType:e,typeName:z.ZodNullable,...$e(t)});var ma=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ma.create=(e,t)=>new ma({innerType:e,typeName:z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});var fa=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return xi(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new rr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new rr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};fa.create=(e,t)=>new fa({innerType:e,typeName:z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});var Pi=class extends Pe{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return ie(o,{code:W.invalid_type,expected:ce.nan,received:o.parsedType}),xe}return{status:"valid",value:t.data}}};Pi.create=e=>new Pi({typeName:z.ZodNaN,...$e(e)});var du=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},pu=class e extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(r.dirty(),ra(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?xe:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:z.ZodPipeline})}},ga=class extends Pe{_parse(t){let r=this._def.innerType._parse(t),o=n=>(no(n)&&(n.value=Object.freeze(n.value)),n);return xi(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};ga.create=(e,t)=>new ga({innerType:e,typeName:z.ZodReadonly,...$e(t)});var cV={object:nr.lazycreate},z;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(z||(z={}));var dV=oa.create,pV=wi.create,mV=Pi.create,fV=Si.create,gV=ki.create,hV=Ii.create,vV=Ti.create,yV=aa.create,_V=ia.create,bV=$i.create,xV=Mn.create,wV=Lr.create,SV=Ei.create,kV=Nn.create,IV=nr.create,TV=nr.strictCreate,$V=sa.create,EV=Yg.create,CV=la.create,AV=sn.create,PV=Qg.create,OV=Ci.create,RV=Ai.create,MV=eh.create,NV=ua.create,jV=ca.create,DV=da.create,zV=pa.create,UV=oo.create,FV=br.create,LV=_r.create,qV=ln.create,ZV=br.createWithPreprocess,VV=pu.create;var mu=class extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};function th(e){}function Sw(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=th,onError:r=th,onRetry:o=th,onComment:n}=e,i="",s=!0,l,d="",u="";function m(g){let y=s?g.replace(/^\xEF\xBB\xBF/,""):g,[S,b]=UP(`${i}${y}`);for(let _ of S)c(_);i=b,s=!1}function c(g){if(g===""){f();return}if(g.startsWith(":")){n&&n(g.slice(g.startsWith(": ")?2:1));return}let y=g.indexOf(":");if(y!==-1){let S=g.slice(0,y),b=g[y+1]===" "?2:1,_=g.slice(y+b);p(S,_,g);return}p(g,"",g)}function p(g,y,S){switch(g){case"event":u=y;break;case"data":d=`${d}${y} +`;break;case"id":l=y.includes("\0")?void 0:y;break;case"retry":/^\d+$/.test(y)?o(parseInt(y,10)):r(new mu(`Invalid \`retry\` value: "${y}"`,{type:"invalid-retry",value:y,line:S}));break;default:r(new mu(`Unknown field "${g.length>20?`${g.slice(0,20)}\u2026`:g}"`,{type:"unknown-field",field:g,value:y,line:S}));break}}function f(){d.length>0&&t({id:l,event:u||void 0,data:d.endsWith(` +`)?d.slice(0,-1):d}),l=void 0,d="",u=""}function v(g={}){i&&g.consume&&c(i),s=!0,l=void 0,d="",u="",i=""}return{feed:m,reset:v}}function UP(e){let t=[],r="",o=0;for(;o{i.enqueue(s)},onError(s){t==="terminate"?i.error(s):typeof t=="function"&&t(s)},onRetry:r,onComment:o})},transform(i){n.feed(i)}})}};function _e(...e){return e.reduce((t,r)=>({...t,...r!=null?r:{}}),{})}function gu({tools:e=[],providerToolNames:t}){let r={},o={};for(let n of e)if(n.type==="provider"&&n.id in t){let i=t[n.id];r[n.name]=i,o[i]=n.name}return{toProviderToolName:n=>{var i;return(i=r[n])!=null?i:n},toCustomToolName:n=>{var i;return(i=o[n])!=null?i:n}}}async function hu(e,t){if(e==null)return Promise.resolve();let r=t==null?void 0:t.abortSignal;return new Promise((o,n)=>{if(r!=null&&r.aborted){n(kw());return}let i=setTimeout(()=>{s(),o()},e),s=()=>{clearTimeout(i),r==null||r.removeEventListener("abort",l)},l=()=>{s(),n(kw())};r==null||r.addEventListener("abort",l)})}function kw(){return new DOMException("Delay was aborted","AbortError")}var so=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){return this._promise?this._promise:(this._promise=new Promise((e,t)=>{this.status.type==="resolved"?e(this.status.value):this.status.type==="rejected"&&t(this.status.error),this._resolve=e,this._reject=t}),this._promise)}resolve(e){var t;this.status={type:"resolved",value:e},this._promise&&((t=this._resolve)==null||t.call(this,e))}reject(e){var t;this.status={type:"rejected",error:e},this._promise&&((t=this._reject)==null||t.call(this,e))}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function ha(e){return Object.fromEntries([...e.headers])}var{btoa:FP,atob:LP}=globalThis;function ar(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=LP(t);return Uint8Array.from(r,o=>o.codePointAt(0))}function pr(e){let t="";for(let r=0;r{let n=()=>{let i=r.length,s=new Array(t);for(let l=0;l`${e}${o}${n()}`},Fe=qr();function va(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}function un(e){return(e instanceof Error||e instanceof DOMException)&&(e.name==="AbortError"||e.name==="ResponseAborted"||e.name==="TimeoutError")}var ZP=["fetch failed","failed to fetch"],VP=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function GP(e){if(!(e instanceof Error))return!1;let t=e.code;return!!(typeof t=="string"&&VP.includes(t))}function Ow({error:e,url:t,requestBodyValues:r}){if(un(e))return e;if(e instanceof TypeError&&ZP.includes(e.message.toLowerCase())){let o=e.cause;if(o!=null)return new Ye({message:`Cannot connect to API: ${o.message}`,cause:o,url:t,requestBodyValues:r,isRetryable:!0})}return GP(e)?new Ye({message:`Cannot connect to API: ${e.message}`,cause:e,url:t,requestBodyValues:r,isRetryable:!0}):e}function yu(e=globalThis){var t,r,o;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(o=(r=e.process)==null?void 0:r.versions)!=null&&o.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function HP(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((r,o)=>{t[o.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(let[r,o]of e)o!=null&&(t[r.toLowerCase()]=o)}return t}function Ct(e,...t){let r=new Headers(HP(e)),o=r.get("user-agent")||"";return r.set("user-agent",[o,...t].filter(Boolean).join(" ")),Object.fromEntries(r.entries())}var Rw="4.0.14",BP=()=>globalThis.fetch,Ri=async({url:e,headers:t={},successfulResponseHandler:r,failedResponseHandler:o,abortSignal:n,fetch:i=BP()})=>{try{let s=await i(e,{method:"GET",headers:Ct(t,`ai-sdk/provider-utils/${Rw}`,yu()),signal:n}),l=ha(s);if(!s.ok){let d;try{d=await o({response:s,url:e,requestBodyValues:{}})}catch(u){throw un(u)||Ye.isInstance(u)?u:new Ye({message:"Failed to process error response",cause:u,statusCode:s.status,url:e,responseHeaders:l,requestBodyValues:{}})}throw d.value}try{return await r({response:s,url:e,requestBodyValues:{}})}catch(d){throw d instanceof Error&&(un(d)||Ye.isInstance(d))?d:new Ye({message:"Failed to process successful response",cause:d,statusCode:s.status,url:e,responseHeaders:l,requestBodyValues:{}})}}catch(s){throw Ow({error:s,url:e,requestBodyValues:{}})}};function _u(e){return e!=null}function Mw({mediaType:e,url:t,supportedUrls:r}){return t=t.toLowerCase(),e=e.toLowerCase(),Object.entries(r).map(([o,n])=>{let i=o.toLowerCase();return i==="*"||i==="*/*"?{mediaTypePrefix:"",regexes:n}:{mediaTypePrefix:i.replace(/\*/,""),regexes:n}}).filter(({mediaTypePrefix:o})=>e.startsWith(o)).flatMap(({regexes:o})=>o).some(o=>o.test(t))}function ya({apiKey:e,environmentVariableName:t,apiKeyParameterName:r="apiKey",description:o}){if(typeof e=="string")return e;if(e!=null)throw new qa({message:`${o} API key must be a string.`});if(typeof process=="undefined")throw new qa({message:`${o} API key is missing. Pass it using the '${r}' parameter. Environment variables is not supported in this environment.`});if(e=process.env[t],e==null)throw new qa({message:`${o} API key is missing. Pass it using the '${r}' parameter or the ${t} environment variable.`});if(typeof e!="string")throw new qa({message:`${o} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}function cn({settingValue:e,environmentVariableName:t}){if(typeof e=="string")return e;if(!(e!=null||typeof process=="undefined")&&(e=process.env[t],!(e==null||typeof e!="string")))return e}function Nw(e){var t;let[r,o=""]=e.toLowerCase().split("/");return(t={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[o])!=null?t:o}var JP=/"__proto__"\s*:/,WP=/"constructor"\s*:/;function $w(e){let t=JSON.parse(e);return t===null||typeof t!="object"||JP.test(e)===!1&&WP.test(e)===!1?t:KP(t)}function KP(e){let t=[e];for(;t.length;){let r=t;t=[];for(let o of r){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let n in o){let i=o[n];i&&typeof i=="object"&&t.push(i)}}}return e}function ih(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(r){return $w(e)}try{return $w(e)}finally{Error.stackTraceLimit=t}}function sh(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;let{properties:r}=e;if(r!=null)for(let o of Object.keys(r))r[o]=ao(r[o])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(ao):ao(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(ao)),e.allOf!=null&&(e.allOf=e.allOf.map(ao)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(ao));let{definitions:t}=e;if(t!=null)for(let r of Object.keys(t))t[r]=ao(t[r]);return e}function ao(e){return typeof e=="boolean"?e:sh(e)}var YP=Symbol("Let zodToJsonSchema decide on which parser to use"),Ew={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},XP=e=>typeof e=="string"?{...Ew,name:e}:{...Ew,...e};function or(){return{}}function QP(e,t){var r,o,n;let i={type:"array"};return(r=e.type)!=null&&r._def&&((n=(o=e.type)==null?void 0:o._def)==null?void 0:n.typeName)!==z.ZodAny&&(i.items=Be(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}function eO(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function tO(){return{type:"boolean"}}function jw(e,t){return Be(e.type._def,t)}var rO=(e,t)=>Be(e.innerType._def,t);function Dw(e,t,r){let o=r!=null?r:t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>Dw(e,t,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return nO(e)}}var nO=e=>{let t={type:"integer",format:"unix-time"};for(let r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function oO(e,t){return{...Be(e.innerType._def,t),default:e.defaultValue()}}function aO(e,t){return t.effectStrategy==="input"?Be(e.schema._def,t):or()}function iO(e){return{type:"string",enum:Array.from(e.values)}}var sO=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function lO(e,t){let r=[Be(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Be(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(n=>!!n),o=[];return r.forEach(n=>{if(sO(n))o.push(...n.allOf);else{let i=n;if("additionalProperties"in n&&n.additionalProperties===!1){let{additionalProperties:s,...l}=n;i=l}o.push(i)}}),o.length?{allOf:o}:void 0}function uO(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var rh=void 0,xr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(rh===void 0&&(rh=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rh),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function zw(e,t){let r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"email":switch(t.emailStrategy){case"format:email":wr(r,"email",o.message,t);break;case"format:idn-email":wr(r,"idn-email",o.message,t);break;case"pattern:zod":Vt(r,xr.email,o.message,t);break}break;case"url":wr(r,"uri",o.message,t);break;case"uuid":wr(r,"uuid",o.message,t);break;case"regex":Vt(r,o.regex,o.message,t);break;case"cuid":Vt(r,xr.cuid,o.message,t);break;case"cuid2":Vt(r,xr.cuid2,o.message,t);break;case"startsWith":Vt(r,RegExp(`^${nh(o.value,t)}`),o.message,t);break;case"endsWith":Vt(r,RegExp(`${nh(o.value,t)}$`),o.message,t);break;case"datetime":wr(r,"date-time",o.message,t);break;case"date":wr(r,"date",o.message,t);break;case"time":wr(r,"time",o.message,t);break;case"duration":wr(r,"duration",o.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"includes":{Vt(r,RegExp(nh(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&wr(r,"ipv4",o.message,t),o.version!=="v4"&&wr(r,"ipv6",o.message,t);break}case"base64url":Vt(r,xr.base64url,o.message,t);break;case"jwt":Vt(r,xr.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&Vt(r,xr.ipv4Cidr,o.message,t),o.version!=="v4"&&Vt(r,xr.ipv6Cidr,o.message,t);break}case"emoji":Vt(r,xr.emoji(),o.message,t);break;case"ulid":{Vt(r,xr.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{wr(r,"binary",o.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{Vt(r,xr.base64,o.message,t);break}}break}case"nanoid":Vt(r,xr.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function nh(e,t){return t.patternStrategy==="escape"?dO(e):e}var cO=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function dO(e){let t="";for(let r=0;ri.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&o.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function Vt(e,t,r,o){var n;e.pattern||(n=e.allOf)!=null&&n.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:Cw(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=Cw(t,o)}function Cw(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;let o={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=o.i?e.source.toLowerCase():e.source,i="",s=!1,l=!1,d=!1;for(let u=0;utypeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function fO(){return{not:or()}}function gO(){return{type:"null"}}var oh={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function hO(e,t){let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in oh&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let s=oh[i._def.typeName];return s&&!n.includes(s)?[...n,s]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...n,s];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];default:return n}},[]);if(o.length===r.length){let n=o.filter((i,s,l)=>l.indexOf(i)===s);return{type:n.length>1?n:n[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return vO(e,t)}var vO=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>Be(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function yO(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[oh[e.innerType._def.typeName],"null"]};let r=Be(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function _O(e){let t={type:"number"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function bO(e,t){let r={type:"object",properties:{}},o=[],n=e.shape();for(let s in n){let l=n[s];if(l===void 0||l._def===void 0)continue;let d=wO(l),u=Be(l._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});u!==void 0&&(r.properties[s]=u,d||o.push(s))}o.length&&(r.required=o);let i=xO(e,t);return i!==void 0&&(r.additionalProperties=i),r}function xO(e,t){if(e.catchall._def.typeName!=="ZodNever")return Be(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function wO(e){try{return e.isOptional()}catch(t){return!0}}var SO=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Be(e.innerType._def,t);let o=Be(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return o?{anyOf:[{not:or()},o]}:or()},kO=(e,t)=>{if(t.pipeStrategy==="input")return Be(e.in._def,t);if(t.pipeStrategy==="output")return Be(e.out._def,t);let r=Be(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=Be(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function IO(e,t){return Be(e.type._def,t)}function TO(e,t){let o={type:"array",uniqueItems:!0,items:Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}function $O(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>Be(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:Be(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>Be(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function EO(){return{not:or()}}function CO(){return or()}var AO=(e,t)=>Be(e.innerType._def,t),PO=(e,t,r)=>{switch(t){case z.ZodString:return zw(e,r);case z.ZodNumber:return _O(e);case z.ZodObject:return bO(e,r);case z.ZodBigInt:return eO(e);case z.ZodBoolean:return tO();case z.ZodDate:return Dw(e,r);case z.ZodUndefined:return EO();case z.ZodNull:return gO();case z.ZodArray:return QP(e,r);case z.ZodUnion:case z.ZodDiscriminatedUnion:return hO(e,r);case z.ZodIntersection:return lO(e,r);case z.ZodTuple:return $O(e,r);case z.ZodRecord:return Uw(e,r);case z.ZodLiteral:return uO(e);case z.ZodEnum:return iO(e);case z.ZodNativeEnum:return mO(e);case z.ZodNullable:return yO(e,r);case z.ZodOptional:return SO(e,r);case z.ZodMap:return pO(e,r);case z.ZodSet:return TO(e,r);case z.ZodLazy:return()=>e.getter()._def;case z.ZodPromise:return IO(e,r);case z.ZodNaN:case z.ZodNever:return fO();case z.ZodEffects:return aO(e,r);case z.ZodAny:return or();case z.ZodUnknown:return CO();case z.ZodDefault:return oO(e,r);case z.ZodBranded:return jw(e,r);case z.ZodReadonly:return AO(e,r);case z.ZodCatch:return rO(e,r);case z.ZodPipeline:return kO(e,r);case z.ZodFunction:case z.ZodVoid:case z.ZodSymbol:return;default:return(o=>{})(t)}},OO=(e,t)=>{let r=0;for(;r{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:OO(t.currentPath,e.path)};case"none":case"seen":return e.path.lengtht.currentPath[o]===r)||t.$refStrategy==="seen"?or():void 0}},MO=(e,t,r)=>(e.description&&(r.description=e.description),r),NO=e=>{let t=XP(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}},jO=(e,t)=>{var r;let o=NO(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[m,c])=>{var p;return{...u,[m]:(p=Be(c._def,{...o,currentPath:[...o.basePath,o.definitionPath,m]},!0))!=null?p:or()}},{}):void 0,i=typeof t=="string"?t:(t==null?void 0:t.nameStrategy)==="title"||t==null?void 0:t.name,s=(r=Be(e._def,i===void 0?o:{...o,currentPath:[...o.basePath,o.definitionPath,i]},!1))!=null?r:or(),l=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;l!==void 0&&(s.title=l);let d=i===void 0?n?{...s,[o.definitionPath]:n}:s:{$ref:[...o.$refStrategy==="relative"?[]:o.basePath,o.definitionPath,i].join("/"),[o.definitionPath]:{...n,[i]:s}};return d.$schema="http://json-schema.org/draft-07/schema#",d},ah=Symbol.for("vercel.ai.schema");function O(e){let t;return()=>(t==null&&(t=e()),t)}function Mi(e,{validate:t}={}){return{[ah]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function DO(e){return typeof e=="object"&&e!==null&&ah in e&&e[ah]===!0&&"jsonSchema"in e&&"validate"in e}function Zr(e){return e==null?Mi({properties:{},additionalProperties:!1}):DO(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?A(e):zO(e):e()}function zO(e){return Mi(()=>sh(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{let r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new hr({value:t,cause:r.issues})}}})}function UO(e,t){var r;let o=(r=t==null?void 0:t.useReferences)!=null?r:!1;return Mi(()=>jO(e,{$refStrategy:o?"root":"none"}),{validate:async n=>{let i=await e.safeParseAsync(n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function FO(e,t){var r;let o=(r=t==null?void 0:t.useReferences)!=null?r:!1;return Mi(()=>sh(On(e,{target:"draft-7",io:"input",reused:o?"ref":"inline"})),{validate:async n=>{let i=await eo(e,n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function LO(e){return"_zod"in e}function A(e,t){return LO(e)?FO(e,t):UO(e,t)}async function Je({value:e,schema:t,context:r}){let o=await Mt({value:e,schema:t,context:r});if(!o.success)throw hr.wrap({value:e,cause:o.error,context:r});return o.value}async function Mt({value:e,schema:t,context:r}){let o=Zr(t);try{if(o.validate==null)return{success:!0,value:e,rawValue:e};let n=await o.validate(e);return n.success?{success:!0,value:n.value,rawValue:e}:{success:!1,error:hr.wrap({value:e,cause:n.error,context:r}),rawValue:e}}catch(n){return{success:!1,error:hr.wrap({value:e,cause:n,context:r}),rawValue:e}}}async function qO({text:e,schema:t}){try{let r=ih(e);return t==null?r:Je({value:r,schema:t})}catch(r){throw La.isInstance(r)||hr.isInstance(r)?r:new La({text:e,cause:r})}}async function Yt({text:e,schema:t}){try{let r=ih(e);return t==null?{success:!0,value:r,rawValue:r}:await Mt({value:r,schema:t})}catch(r){return{success:!1,error:La.isInstance(r)?r:new La({text:e,cause:r}),rawValue:void 0}}}function _a(e){try{return ih(e),!0}catch(t){return!1}}function Fw({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new fu).pipeThrough(new TransformStream({async transform({data:r},o){r!=="[DONE]"&&o.enqueue(await Yt({text:r,schema:t}))}}))}async function Ee({provider:e,providerOptions:t,schema:r}){if((t==null?void 0:t[e])==null)return;let o=await Mt({value:t[e],schema:r});if(!o.success)throw new Io({argument:"providerOptions",message:`invalid ${e} provider options`,cause:o.error});return o.value}var ZO=()=>globalThis.fetch,we=async({url:e,headers:t,body:r,failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:s})=>Lw({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(r),values:r},failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:s}),ba=async({url:e,headers:t,formData:r,failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:s})=>Lw({url:e,headers:t,body:{content:r,values:Object.fromEntries(r.entries())},failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:s}),Lw=async({url:e,headers:t={},body:r,successfulResponseHandler:o,failedResponseHandler:n,abortSignal:i,fetch:s=ZO()})=>{try{let l=await s(e,{method:"POST",headers:Ct(t,`ai-sdk/provider-utils/${Rw}`,yu()),body:r.content,signal:i}),d=ha(l);if(!l.ok){let u;try{u=await n({response:l,url:e,requestBodyValues:r.values})}catch(m){throw un(m)||Ye.isInstance(m)?m:new Ye({message:"Failed to process error response",cause:m,statusCode:l.status,url:e,responseHeaders:d,requestBodyValues:r.values})}throw u.value}try{return await o({response:l,url:e,requestBodyValues:r.values})}catch(u){throw u instanceof Error&&(un(u)||Ye.isInstance(u))?u:new Ye({message:"Failed to process successful response",cause:u,statusCode:l.status,url:e,responseHeaders:d,requestBodyValues:r.values})}}catch(l){throw Ow({error:l,url:e,requestBodyValues:r.values})}};function Le({id:e,inputSchema:t}){return({execute:r,outputSchema:o,needsApproval:n,toModelOutput:i,onInputStart:s,onInputDelta:l,onInputAvailable:d,...u})=>({type:"provider",id:e,args:u,inputSchema:t,outputSchema:o,execute:r,needsApproval:n,toModelOutput:i,onInputStart:s,onInputDelta:l,onInputAvailable:d})}function je({id:e,inputSchema:t,outputSchema:r,supportsDeferredResults:o}){return({execute:n,needsApproval:i,toModelOutput:s,onInputStart:l,onInputDelta:d,onInputAvailable:u,...m})=>({type:"provider",id:e,args:m,inputSchema:t,outputSchema:r,execute:n,needsApproval:i,toModelOutput:s,onInputStart:l,onInputDelta:d,onInputAvailable:u,supportsDeferredResults:o})}async function ze(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var ot=({errorSchema:e,errorToMessage:t,isRetryable:r})=>async({response:o,url:n,requestBodyValues:i})=>{let s=await o.text(),l=ha(o);if(s.trim()==="")return{responseHeaders:l,value:new Ye({message:o.statusText,url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:l,responseBody:s,isRetryable:r==null?void 0:r(o)})};try{let d=await qO({text:s,schema:e});return{responseHeaders:l,value:new Ye({message:t(d),url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:l,responseBody:s,data:d,isRetryable:r==null?void 0:r(o,d)})}}catch(d){return{responseHeaders:l,value:new Ye({message:o.statusText,url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:l,responseBody:s,isRetryable:r==null?void 0:r(o)})}}},Nt=e=>async({response:t})=>{let r=ha(t);if(t.body==null)throw new a_({});return{responseHeaders:r,value:Fw({stream:t.body,schema:e})}},ke=e=>async({response:t,url:r,requestBodyValues:o})=>{let n=await t.text(),i=await Yt({text:n,schema:e}),s=ha(t);if(!i.success)throw new Ye({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:s,responseBody:n,url:r,requestBodyValues:o});return{responseHeaders:s,value:i.value,rawValue:i.rawValue}},qw=()=>async({response:e,url:t,requestBodyValues:r})=>{let o=ha(e);if(!e.body)throw new Ye({message:"Response body is empty",url:t,requestBodyValues:r,statusCode:e.status,responseHeaders:o,responseBody:void 0});try{let n=await e.arrayBuffer();return{responseHeaders:o,value:new Uint8Array(n)}}catch(n){throw new Ye({message:"Failed to read response as array buffer",url:t,requestBodyValues:r,statusCode:e.status,responseHeaders:o,responseBody:void 0,cause:n})}};function Vr(e){return e==null?void 0:e.replace(/\/$/,"")}function VO(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}async function*Zw({execute:e,input:t,options:r}){let o=e(t,r);if(VO(o)){let n;for await(let i of o)n=i,yield{type:"preliminary",output:i};yield{type:"final",output:n}}else yield{type:"final",output:await o}}var ch=a.object({error:a.object({message:a.string(),type:a.string().nullish(),param:a.any().nullish(),code:a.union([a.string(),a.number()]).nullish()})}),Sr=ot({errorSchema:ch,errorToMessage:e=>e.error.message});function aS(e){let t=e.startsWith("o3")||e.startsWith("o4-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-chat"),r=e.startsWith("gpt-4")||e.startsWith("gpt-5-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-nano")&&!e.startsWith("gpt-5-chat")||e.startsWith("o3")||e.startsWith("o4-mini"),o=e.startsWith("o1")||e.startsWith("o3")||e.startsWith("o4-mini")||e.startsWith("codex-mini")||e.startsWith("computer-use-preview")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-chat"),n=e.startsWith("gpt-5.1")||e.startsWith("gpt-5.2");return{supportsFlexProcessing:t,supportsPriorityProcessing:r,isReasoningModel:o,systemMessageMode:o?"developer":"system",supportsNonReasoningParameters:n}}function Vw(e){var t,r,o,n,i,s;if(e==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let l=(t=e.prompt_tokens)!=null?t:0,d=(r=e.completion_tokens)!=null?r:0,u=(n=(o=e.prompt_tokens_details)==null?void 0:o.cached_tokens)!=null?n:0,m=(s=(i=e.completion_tokens_details)==null?void 0:i.reasoning_tokens)!=null?s:0;return{inputTokens:{total:l,noCache:l-u,cacheRead:u,cacheWrite:void 0},outputTokens:{total:d,text:d-m,reasoning:m},raw:e}}function GO({prompt:e,systemMessageMode:t="system"}){var r;let o=[],n=[];for(let{role:i,content:s}of e)switch(i){case"system":{switch(t){case"system":{o.push({role:"system",content:s});break}case"developer":{o.push({role:"developer",content:s});break}case"remove":{n.push({type:"other",message:"system messages are removed for this model"});break}default:{let l=t;throw new Error(`Unsupported system message mode: ${l}`)}}break}case"user":{if(s.length===1&&s[0].type==="text"){o.push({role:"user",content:s[0].text});break}o.push({role:"user",content:s.map((l,d)=>{var u,m,c;switch(l.type){case"text":return{type:"text",text:l.text};case"file":if(l.mediaType.startsWith("image/")){let p=l.mediaType==="image/*"?"image/jpeg":l.mediaType;return{type:"image_url",image_url:{url:l.data instanceof URL?l.data.toString():`data:${p};base64,${kt(l.data)}`,detail:(m=(u=l.providerOptions)==null?void 0:u.openai)==null?void 0:m.imageDetail}}}else if(l.mediaType.startsWith("audio/")){if(l.data instanceof URL)throw new Re({functionality:"audio file parts with URLs"});switch(l.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:kt(l.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:kt(l.data),format:"mp3"}};default:throw new Re({functionality:`audio content parts with media type ${l.mediaType}`})}}else if(l.mediaType==="application/pdf"){if(l.data instanceof URL)throw new Re({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof l.data=="string"&&l.data.startsWith("file-")?{file_id:l.data}:{filename:(c=l.filename)!=null?c:`part-${d}.pdf`,file_data:`data:application/pdf;base64,${kt(l.data)}`}}}else throw new Re({functionality:`file part media type ${l.mediaType}`})}})});break}case"assistant":{let l="",d=[];for(let u of s)switch(u.type){case"text":{l+=u.text;break}case"tool-call":{d.push({id:u.toolCallId,type:"function",function:{name:u.toolName,arguments:JSON.stringify(u.input)}});break}}o.push({role:"assistant",content:l,tool_calls:d.length>0?d:void 0});break}case"tool":{for(let l of s){if(l.type==="tool-approval-response")continue;let d=l.output,u;switch(d.type){case"text":case"error-text":u=d.value;break;case"execution-denied":u=(r=d.reason)!=null?r:"Tool execution denied.";break;case"content":case"json":case"error-json":u=JSON.stringify(d.value);break}o.push({role:"tool",tool_call_id:l.toolCallId,content:u})}break}default:{let l=i;throw new Error(`Unsupported role: ${l}`)}}return{messages:o,warnings:n}}function lh({id:e,model:t,created:r}){return{id:e!=null?e:void 0,modelId:t!=null?t:void 0,timestamp:r?new Date(r*1e3):void 0}}function Gw(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var HO=O(()=>A(a.object({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({message:a.object({role:a.literal("assistant").nullish(),content:a.string().nullish(),tool_calls:a.array(a.object({id:a.string().nullish(),type:a.literal("function"),function:a.object({name:a.string(),arguments:a.string()})})).nullish(),annotations:a.array(a.object({type:a.literal("url_citation"),url_citation:a.object({start_index:a.number(),end_index:a.number(),url:a.string(),title:a.string()})})).nullish()}),index:a.number(),logprobs:a.object({content:a.array(a.object({token:a.string(),logprob:a.number(),top_logprobs:a.array(a.object({token:a.string(),logprob:a.number()}))})).nullish()}).nullish(),finish_reason:a.string().nullish()})),usage:a.object({prompt_tokens:a.number().nullish(),completion_tokens:a.number().nullish(),total_tokens:a.number().nullish(),prompt_tokens_details:a.object({cached_tokens:a.number().nullish()}).nullish(),completion_tokens_details:a.object({reasoning_tokens:a.number().nullish(),accepted_prediction_tokens:a.number().nullish(),rejected_prediction_tokens:a.number().nullish()}).nullish()}).nullish()}))),BO=O(()=>A(a.union([a.object({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({delta:a.object({role:a.enum(["assistant"]).nullish(),content:a.string().nullish(),tool_calls:a.array(a.object({index:a.number(),id:a.string().nullish(),type:a.literal("function").nullish(),function:a.object({name:a.string().nullish(),arguments:a.string().nullish()})})).nullish(),annotations:a.array(a.object({type:a.literal("url_citation"),url_citation:a.object({start_index:a.number(),end_index:a.number(),url:a.string(),title:a.string()})})).nullish()}).nullish(),logprobs:a.object({content:a.array(a.object({token:a.string(),logprob:a.number(),top_logprobs:a.array(a.object({token:a.string(),logprob:a.number()}))})).nullish()}).nullish(),finish_reason:a.string().nullish(),index:a.number()})),usage:a.object({prompt_tokens:a.number().nullish(),completion_tokens:a.number().nullish(),total_tokens:a.number().nullish(),prompt_tokens_details:a.object({cached_tokens:a.number().nullish()}).nullish(),completion_tokens_details:a.object({reasoning_tokens:a.number().nullish(),accepted_prediction_tokens:a.number().nullish(),rejected_prediction_tokens:a.number().nullish()}).nullish()}).nullish()}),ch]))),JO=O(()=>A(a.object({logitBias:a.record(a.coerce.number(),a.number()).optional(),logprobs:a.union([a.boolean(),a.number()]).optional(),parallelToolCalls:a.boolean().optional(),user:a.string().optional(),reasoningEffort:a.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:a.number().optional(),store:a.boolean().optional(),metadata:a.record(a.string().max(64),a.string().max(512)).optional(),prediction:a.record(a.string(),a.any()).optional(),serviceTier:a.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:a.boolean().optional(),textVerbosity:a.enum(["low","medium","high"]).optional(),promptCacheKey:a.string().optional(),promptCacheRetention:a.enum(["in_memory","24h"]).optional(),safetyIdentifier:a.string().optional(),systemMessageMode:a.enum(["system","developer","remove"]).optional(),forceReasoning:a.boolean().optional()})));function WO({tools:e,toolChoice:t}){e=e!=null&&e.length?e:void 0;let r=[];if(e==null)return{tools:void 0,toolChoice:void 0,toolWarnings:r};let o=[];for(let i of e)i.type==="function"?o.push({type:"function",function:{name:i.name,description:i.description,parameters:i.inputSchema,...i.strict!=null?{strict:i.strict}:{}}}):r.push({type:"unsupported",feature:`tool type: ${i.type}`});if(t==null)return{tools:o,toolChoice:void 0,toolWarnings:r};let n=t.type;switch(n){case"auto":case"none":case"required":return{tools:o,toolChoice:n,toolWarnings:r};case"tool":return{tools:o,toolChoice:{type:"function",function:{name:t.toolName}},toolWarnings:r};default:{let i=n;throw new Re({functionality:`tool choice type: ${i}`})}}}var KO=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,topK:n,frequencyPenalty:i,presencePenalty:s,stopSequences:l,responseFormat:d,seed:u,tools:m,toolChoice:c,providerOptions:p}){var f,v,g,y,S;let b=[],_=(f=await Ee({provider:"openai",providerOptions:p,schema:JO}))!=null?f:{},k=aS(this.modelId),w=(v=_.forceReasoning)!=null?v:k.isReasoningModel;n!=null&&b.push({type:"unsupported",feature:"topK"});let{messages:h,warnings:I}=GO({prompt:e,systemMessageMode:(g=_.systemMessageMode)!=null?g:w?"developer":k.systemMessageMode});b.push(...I);let j=(y=_.strictJsonSchema)!=null?y:!0,U={model:this.modelId,logit_bias:_.logitBias,logprobs:_.logprobs===!0||typeof _.logprobs=="number"?!0:void 0,top_logprobs:typeof _.logprobs=="number"?_.logprobs:typeof _.logprobs=="boolean"&&_.logprobs?0:void 0,user:_.user,parallel_tool_calls:_.parallelToolCalls,max_tokens:t,temperature:r,top_p:o,frequency_penalty:i,presence_penalty:s,response_format:(d==null?void 0:d.type)==="json"?d.schema!=null?{type:"json_schema",json_schema:{schema:d.schema,strict:j,name:(S=d.name)!=null?S:"response",description:d.description}}:{type:"json_object"}:void 0,stop:l,seed:u,verbosity:_.textVerbosity,max_completion_tokens:_.maxCompletionTokens,store:_.store,metadata:_.metadata,prediction:_.prediction,reasoning_effort:_.reasoningEffort,service_tier:_.serviceTier,prompt_cache_key:_.promptCacheKey,prompt_cache_retention:_.promptCacheRetention,safety_identifier:_.safetyIdentifier,messages:h};w?((_.reasoningEffort!=="none"||!k.supportsNonReasoningParameters)&&(U.temperature!=null&&(U.temperature=void 0,b.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),U.top_p!=null&&(U.top_p=void 0,b.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})),U.logprobs!=null&&(U.logprobs=void 0,b.push({type:"other",message:"logprobs is not supported for reasoning models"}))),U.frequency_penalty!=null&&(U.frequency_penalty=void 0,b.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"})),U.presence_penalty!=null&&(U.presence_penalty=void 0,b.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"})),U.logit_bias!=null&&(U.logit_bias=void 0,b.push({type:"other",message:"logitBias is not supported for reasoning models"})),U.top_logprobs!=null&&(U.top_logprobs=void 0,b.push({type:"other",message:"topLogprobs is not supported for reasoning models"})),U.max_tokens!=null&&(U.max_completion_tokens==null&&(U.max_completion_tokens=U.max_tokens),U.max_tokens=void 0)):(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview"))&&U.temperature!=null&&(U.temperature=void 0,b.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})),_.serviceTier==="flex"&&!k.supportsFlexProcessing&&(b.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),U.service_tier=void 0),_.serviceTier==="priority"&&!k.supportsPriorityProcessing&&(b.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),U.service_tier=void 0);let{tools:F,toolChoice:Z,toolWarnings:L}=WO({tools:m,toolChoice:c});return{args:{...U,tools:F,tool_choice:Z},warnings:[...b,...L]}}async doGenerate(e){var t,r,o,n,i,s,l;let{args:d,warnings:u}=await this.getArgs(e),{responseHeaders:m,value:c,rawValue:p}=await we({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:d,failedResponseHandler:Sr,successfulResponseHandler:ke(HO),abortSignal:e.abortSignal,fetch:this.config.fetch}),f=c.choices[0],v=[],g=f.message.content;g!=null&&g.length>0&&v.push({type:"text",text:g});for(let _ of(t=f.message.tool_calls)!=null?t:[])v.push({type:"tool-call",toolCallId:(r=_.id)!=null?r:Fe(),toolName:_.function.name,input:_.function.arguments});for(let _ of(o=f.message.annotations)!=null?o:[])v.push({type:"source",sourceType:"url",id:Fe(),url:_.url_citation.url,title:_.url_citation.title});let y=(n=c.usage)==null?void 0:n.completion_tokens_details,S=(i=c.usage)==null?void 0:i.prompt_tokens_details,b={openai:{}};return(y==null?void 0:y.accepted_prediction_tokens)!=null&&(b.openai.acceptedPredictionTokens=y==null?void 0:y.accepted_prediction_tokens),(y==null?void 0:y.rejected_prediction_tokens)!=null&&(b.openai.rejectedPredictionTokens=y==null?void 0:y.rejected_prediction_tokens),((s=f.logprobs)==null?void 0:s.content)!=null&&(b.openai.logprobs=f.logprobs.content),{content:v,finishReason:{unified:Gw(f.finish_reason),raw:(l=f.finish_reason)!=null?l:void 0},usage:Vw(c.usage),request:{body:d},response:{...lh(c),headers:m,body:p},warnings:u,providerMetadata:b}}async doStream(e){let{args:t,warnings:r}=await this.getArgs(e),o={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:n,value:i}=await we({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:o,failedResponseHandler:Sr,successfulResponseHandler:Nt(BO),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=[],l={unified:"other",raw:void 0},d,u=!1,m=!1,c={openai:{}};return{stream:i.pipeThrough(new TransformStream({start(p){p.enqueue({type:"stream-start",warnings:r})},transform(p,f){var v,g,y,S,b,_,k,w,h,I,j,U,F,Z,L,M,q;if(e.includeRawChunks&&f.enqueue({type:"raw",rawValue:p.rawValue}),!p.success){l={unified:"error",raw:void 0},f.enqueue({type:"error",error:p.error});return}let C=p.value;if("error"in C){l={unified:"error",raw:void 0},f.enqueue({type:"error",error:C.error});return}if(!u){let P=lh(C);Object.values(P).some(Boolean)&&(u=!0,f.enqueue({type:"response-metadata",...lh(C)}))}C.usage!=null&&(d=C.usage,((v=C.usage.completion_tokens_details)==null?void 0:v.accepted_prediction_tokens)!=null&&(c.openai.acceptedPredictionTokens=(g=C.usage.completion_tokens_details)==null?void 0:g.accepted_prediction_tokens),((y=C.usage.completion_tokens_details)==null?void 0:y.rejected_prediction_tokens)!=null&&(c.openai.rejectedPredictionTokens=(S=C.usage.completion_tokens_details)==null?void 0:S.rejected_prediction_tokens));let E=C.choices[0];if((E==null?void 0:E.finish_reason)!=null&&(l={unified:Gw(E.finish_reason),raw:E.finish_reason}),((b=E==null?void 0:E.logprobs)==null?void 0:b.content)!=null&&(c.openai.logprobs=E.logprobs.content),(E==null?void 0:E.delta)==null)return;let te=E.delta;if(te.content!=null&&(m||(f.enqueue({type:"text-start",id:"0"}),m=!0),f.enqueue({type:"text-delta",id:"0",delta:te.content})),te.tool_calls!=null)for(let P of te.tool_calls){let se=P.index;if(s[se]==null){if(P.type!=="function")throw new Gn({data:P,message:"Expected 'function' type."});if(P.id==null)throw new Gn({data:P,message:"Expected 'id' to be a string."});if(((_=P.function)==null?void 0:_.name)==null)throw new Gn({data:P,message:"Expected 'function.name' to be a string."});f.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),s[se]={id:P.id,type:"function",function:{name:P.function.name,arguments:(k=P.function.arguments)!=null?k:""},hasFinished:!1};let he=s[se];((w=he.function)==null?void 0:w.name)!=null&&((h=he.function)==null?void 0:h.arguments)!=null&&(he.function.arguments.length>0&&f.enqueue({type:"tool-input-delta",id:he.id,delta:he.function.arguments}),_a(he.function.arguments)&&(f.enqueue({type:"tool-input-end",id:he.id}),f.enqueue({type:"tool-call",toolCallId:(I=he.id)!=null?I:Fe(),toolName:he.function.name,input:he.function.arguments}),he.hasFinished=!0));continue}let ee=s[se];ee.hasFinished||(((j=P.function)==null?void 0:j.arguments)!=null&&(ee.function.arguments+=(F=(U=P.function)==null?void 0:U.arguments)!=null?F:""),f.enqueue({type:"tool-input-delta",id:ee.id,delta:(Z=P.function.arguments)!=null?Z:""}),((L=ee.function)==null?void 0:L.name)!=null&&((M=ee.function)==null?void 0:M.arguments)!=null&&_a(ee.function.arguments)&&(f.enqueue({type:"tool-input-end",id:ee.id}),f.enqueue({type:"tool-call",toolCallId:(q=ee.id)!=null?q:Fe(),toolName:ee.function.name,input:ee.function.arguments}),ee.hasFinished=!0))}if(te.annotations!=null)for(let P of te.annotations)f.enqueue({type:"source",sourceType:"url",id:Fe(),url:P.url_citation.url,title:P.url_citation.title})},flush(p){m&&p.enqueue({type:"text-end",id:"0"}),p.enqueue({type:"finish",finishReason:l,usage:Vw(d),...c!=null?{providerMetadata:c}:{}})}})),request:{body:o},response:{headers:n}}}};function Hw(e){var t,r,o,n;if(e==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let i=(t=e.prompt_tokens)!=null?t:0,s=(r=e.completion_tokens)!=null?r:0;return{inputTokens:{total:(o=e.prompt_tokens)!=null?o:void 0,noCache:i,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(n=e.completion_tokens)!=null?n:void 0,text:s,reasoning:void 0},raw:e}}function YO({prompt:e,user:t="user",assistant:r="assistant"}){let o="";e[0].role==="system"&&(o+=`${e[0].content} + +`,e=e.slice(1));for(let{role:n,content:i}of e)switch(n){case"system":throw new gr({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":{let s=i.map(l=>{if(l.type==="text")return l.text}).filter(Boolean).join("");o+=`${t}: +${s} + +`;break}case"assistant":{let s=i.map(l=>{switch(l.type){case"text":return l.text;case"tool-call":throw new Re({functionality:"tool-call messages"})}}).join("");o+=`${r}: +${s} + +`;break}case"tool":throw new Re({functionality:"tool messages"});default:{let s=n;throw new Error(`Unsupported role: ${s}`)}}return o+=`${r}: +`,{prompt:o,stopSequences:[` +${t}:`]}}function Bw({id:e,model:t,created:r}){return{id:e!=null?e:void 0,modelId:t!=null?t:void 0,timestamp:r!=null?new Date(r*1e3):void 0}}function Jw(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var XO=O(()=>A(a.object({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({text:a.string(),finish_reason:a.string(),logprobs:a.object({tokens:a.array(a.string()),token_logprobs:a.array(a.number()),top_logprobs:a.array(a.record(a.string(),a.number())).nullish()}).nullish()})),usage:a.object({prompt_tokens:a.number(),completion_tokens:a.number(),total_tokens:a.number()}).nullish()}))),QO=O(()=>A(a.union([a.object({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({text:a.string(),finish_reason:a.string().nullish(),index:a.number(),logprobs:a.object({tokens:a.array(a.string()),token_logprobs:a.array(a.number()),top_logprobs:a.array(a.record(a.string(),a.number())).nullish()}).nullish()})),usage:a.object({prompt_tokens:a.number(),completion_tokens:a.number(),total_tokens:a.number()}).nullish()}),ch]))),Ww=O(()=>A(a.object({echo:a.boolean().optional(),logitBias:a.record(a.string(),a.number()).optional(),suffix:a.string().optional(),user:a.string().optional(),logprobs:a.union([a.boolean(),a.number()]).optional()}))),eR=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={},this.modelId=e,this.config=t}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,topK:n,frequencyPenalty:i,presencePenalty:s,stopSequences:l,responseFormat:d,tools:u,toolChoice:m,seed:c,providerOptions:p}){let f=[],v={...await Ee({provider:"openai",providerOptions:p,schema:Ww}),...await Ee({provider:this.providerOptionsName,providerOptions:p,schema:Ww})};n!=null&&f.push({type:"unsupported",feature:"topK"}),u!=null&&u.length&&f.push({type:"unsupported",feature:"tools"}),m!=null&&f.push({type:"unsupported",feature:"toolChoice"}),d!=null&&d.type!=="text"&&f.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:g,stopSequences:y}=YO({prompt:e}),S=[...y!=null?y:[],...l!=null?l:[]];return{args:{model:this.modelId,echo:v.echo,logit_bias:v.logitBias,logprobs:(v==null?void 0:v.logprobs)===!0?0:(v==null?void 0:v.logprobs)===!1||v==null?void 0:v.logprobs,suffix:v.suffix,user:v.user,max_tokens:t,temperature:r,top_p:o,frequency_penalty:i,presence_penalty:s,seed:c,prompt:g,stop:S.length>0?S:void 0},warnings:f}}async doGenerate(e){var t;let{args:r,warnings:o}=await this.getArgs(e),{responseHeaders:n,value:i,rawValue:s}=await we({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:r,failedResponseHandler:Sr,successfulResponseHandler:ke(XO),abortSignal:e.abortSignal,fetch:this.config.fetch}),l=i.choices[0],d={openai:{}};return l.logprobs!=null&&(d.openai.logprobs=l.logprobs),{content:[{type:"text",text:l.text}],usage:Hw(i.usage),finishReason:{unified:Jw(l.finish_reason),raw:(t=l.finish_reason)!=null?t:void 0},request:{body:r},response:{...Bw(i),headers:n,body:s},providerMetadata:d,warnings:o}}async doStream(e){let{args:t,warnings:r}=await this.getArgs(e),o={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:n,value:i}=await we({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:o,failedResponseHandler:Sr,successfulResponseHandler:Nt(QO),abortSignal:e.abortSignal,fetch:this.config.fetch}),s={unified:"other",raw:void 0},l={openai:{}},d,u=!0;return{stream:i.pipeThrough(new TransformStream({start(m){m.enqueue({type:"stream-start",warnings:r})},transform(m,c){if(e.includeRawChunks&&c.enqueue({type:"raw",rawValue:m.rawValue}),!m.success){s={unified:"error",raw:void 0},c.enqueue({type:"error",error:m.error});return}let p=m.value;if("error"in p){s={unified:"error",raw:void 0},c.enqueue({type:"error",error:p.error});return}u&&(u=!1,c.enqueue({type:"response-metadata",...Bw(p)}),c.enqueue({type:"text-start",id:"0"})),p.usage!=null&&(d=p.usage);let f=p.choices[0];(f==null?void 0:f.finish_reason)!=null&&(s={unified:Jw(f.finish_reason),raw:f.finish_reason}),(f==null?void 0:f.logprobs)!=null&&(l.openai.logprobs=f.logprobs),(f==null?void 0:f.text)!=null&&f.text.length>0&&c.enqueue({type:"text-delta",id:"0",delta:f.text})},flush(m){u||m.enqueue({type:"text-end",id:"0"}),m.enqueue({type:"finish",finishReason:s,providerMetadata:l,usage:Hw(d)})}})),request:{body:o},response:{headers:n}}}},tR=O(()=>A(a.object({dimensions:a.number().optional(),user:a.string().optional()}))),rR=O(()=>A(a.object({data:a.array(a.object({embedding:a.array(a.number())})),usage:a.object({prompt_tokens:a.number()}).nullish()}))),nR=class{constructor(e,t){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=e,this.config=t}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:r,providerOptions:o}){var n;if(e.length>this.maxEmbeddingsPerCall)throw new To({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});let i=(n=await Ee({provider:"openai",providerOptions:o,schema:tR}))!=null?n:{},{responseHeaders:s,value:l,rawValue:d}=await we({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:_e(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:i.dimensions,user:i.user},failedResponseHandler:Sr,successfulResponseHandler:ke(rR),abortSignal:r,fetch:this.config.fetch});return{warnings:[],embeddings:l.data.map(u=>u.embedding),usage:l.usage?{tokens:l.usage.prompt_tokens}:void 0,response:{headers:s,body:d}}}},Kw=O(()=>A(a.object({created:a.number().nullish(),data:a.array(a.object({b64_json:a.string(),revised_prompt:a.string().nullish()})),background:a.string().nullish(),output_format:a.string().nullish(),size:a.string().nullish(),quality:a.string().nullish(),usage:a.object({input_tokens:a.number().nullish(),output_tokens:a.number().nullish(),total_tokens:a.number().nullish(),input_tokens_details:a.object({image_tokens:a.number().nullish(),text_tokens:a.number().nullish()}).nullish()}).nullish()}))),oR={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10},aR=["gpt-image-1-mini","gpt-image-1.5","gpt-image-1"];function iR(e){return aR.some(t=>e.startsWith(t))}var sR=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get maxImagesPerCall(){var e;return(e=oR[this.modelId])!=null?e:1}get provider(){return this.config.provider}async doGenerate({prompt:e,files:t,mask:r,n:o,size:n,aspectRatio:i,seed:s,providerOptions:l,headers:d,abortSignal:u}){var m,c,p,f,v,g,y,S,b,_,k;let w=[];i!=null&&w.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."}),s!=null&&w.push({type:"unsupported",feature:"seed"});let h=(p=(c=(m=this.config._internal)==null?void 0:m.currentDate)==null?void 0:c.call(m))!=null?p:new Date;if(t!=null){let{value:U,responseHeaders:F}=await ba({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:_e(this.config.headers(),d),formData:vu({model:this.modelId,prompt:e,image:await Promise.all(t.map(Z=>Z.type==="file"?new Blob([Z.data instanceof Uint8Array?new Blob([Z.data],{type:Z.mediaType}):new Blob([ar(Z.data)],{type:Z.mediaType})],{type:Z.mediaType}):Oi(Z.url))),mask:r!=null?await lR(r):void 0,n:o,size:n,...(f=l.openai)!=null?f:{}}),failedResponseHandler:Sr,successfulResponseHandler:ke(Kw),abortSignal:u,fetch:this.config.fetch});return{images:U.data.map(Z=>Z.b64_json),warnings:w,usage:U.usage!=null?{inputTokens:(v=U.usage.input_tokens)!=null?v:void 0,outputTokens:(g=U.usage.output_tokens)!=null?g:void 0,totalTokens:(y=U.usage.total_tokens)!=null?y:void 0}:void 0,response:{timestamp:h,modelId:this.modelId,headers:F},providerMetadata:{openai:{images:U.data.map(Z=>{var L,M,q,C,E;return{...Z.revised_prompt?{revisedPrompt:Z.revised_prompt}:{},created:(L=U.created)!=null?L:void 0,size:(M=U.size)!=null?M:void 0,quality:(q=U.quality)!=null?q:void 0,background:(C=U.background)!=null?C:void 0,outputFormat:(E=U.output_format)!=null?E:void 0}})}}}}let{value:I,responseHeaders:j}=await we({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:_e(this.config.headers(),d),body:{model:this.modelId,prompt:e,n:o,size:n,...(S=l.openai)!=null?S:{},...iR(this.modelId)?{}:{response_format:"b64_json"}},failedResponseHandler:Sr,successfulResponseHandler:ke(Kw),abortSignal:u,fetch:this.config.fetch});return{images:I.data.map(U=>U.b64_json),warnings:w,usage:I.usage!=null?{inputTokens:(b=I.usage.input_tokens)!=null?b:void 0,outputTokens:(_=I.usage.output_tokens)!=null?_:void 0,totalTokens:(k=I.usage.total_tokens)!=null?k:void 0}:void 0,response:{timestamp:h,modelId:this.modelId,headers:j},providerMetadata:{openai:{images:I.data.map(U=>{var F,Z,L,M,q;return{...U.revised_prompt?{revisedPrompt:U.revised_prompt}:{},created:(F=I.created)!=null?F:void 0,size:(Z=I.size)!=null?Z:void 0,quality:(L=I.quality)!=null?L:void 0,background:(M=I.background)!=null?M:void 0,outputFormat:(q=I.output_format)!=null?q:void 0}})}}}}};async function lR(e){if(!e)return;if(e.type==="url")return Oi(e.url);let t=e.data instanceof Uint8Array?e.data:ar(e.data);return new Blob([t],{type:e.mediaType})}var iS=O(()=>A(a.object({callId:a.string(),operation:a.discriminatedUnion("type",[a.object({type:a.literal("create_file"),path:a.string(),diff:a.string()}),a.object({type:a.literal("delete_file"),path:a.string()}),a.object({type:a.literal("update_file"),path:a.string(),diff:a.string()})])}))),sS=O(()=>A(a.object({status:a.enum(["completed","failed"]),output:a.string().optional()}))),KG=O(()=>A(a.object({}))),uR=je({id:"openai.apply_patch",inputSchema:iS,outputSchema:sS}),cR=uR,dR=O(()=>A(a.object({code:a.string().nullish(),containerId:a.string()}))),pR=O(()=>A(a.object({outputs:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("logs"),logs:a.string()}),a.object({type:a.literal("image"),url:a.string()})])).nullish()}))),mR=O(()=>A(a.object({container:a.union([a.string(),a.object({fileIds:a.array(a.string()).optional()})]).optional()}))),fR=je({id:"openai.code_interpreter",inputSchema:dR,outputSchema:pR}),gR=(e={})=>fR(e),lS=a.object({key:a.string(),type:a.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:a.union([a.string(),a.number(),a.boolean(),a.array(a.string())])}),uS=a.object({type:a.enum(["and","or"]),filters:a.array(a.union([lS,a.lazy(()=>uS)]))}),hR=O(()=>A(a.object({vectorStoreIds:a.array(a.string()),maxNumResults:a.number().optional(),ranking:a.object({ranker:a.string().optional(),scoreThreshold:a.number().optional()}).optional(),filters:a.union([lS,uS]).optional()}))),vR=O(()=>A(a.object({queries:a.array(a.string()),results:a.array(a.object({attributes:a.record(a.string(),a.unknown()),fileId:a.string(),filename:a.string(),score:a.number(),text:a.string()})).nullable()}))),yR=je({id:"openai.file_search",inputSchema:a.object({}),outputSchema:vR}),_R=O(()=>A(a.object({background:a.enum(["auto","opaque","transparent"]).optional(),inputFidelity:a.enum(["low","high"]).optional(),inputImageMask:a.object({fileId:a.string().optional(),imageUrl:a.string().optional()}).optional(),model:a.string().optional(),moderation:a.enum(["auto"]).optional(),outputCompression:a.number().int().min(0).max(100).optional(),outputFormat:a.enum(["png","jpeg","webp"]).optional(),partialImages:a.number().int().min(0).max(3).optional(),quality:a.enum(["auto","low","medium","high"]).optional(),size:a.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),bR=O(()=>A(a.object({}))),xR=O(()=>A(a.object({result:a.string()}))),wR=je({id:"openai.image_generation",inputSchema:bR,outputSchema:xR}),SR=(e={})=>wR(e),cS=O(()=>A(a.object({action:a.object({type:a.literal("exec"),command:a.array(a.string()),timeoutMs:a.number().optional(),user:a.string().optional(),workingDirectory:a.string().optional(),env:a.record(a.string(),a.string()).optional()})}))),dS=O(()=>A(a.object({output:a.string()}))),kR=je({id:"openai.local_shell",inputSchema:cS,outputSchema:dS}),pS=O(()=>A(a.object({action:a.object({commands:a.array(a.string()),timeoutMs:a.number().optional(),maxOutputLength:a.number().optional()})}))),mS=O(()=>A(a.object({output:a.array(a.object({stdout:a.string(),stderr:a.string(),outcome:a.discriminatedUnion("type",[a.object({type:a.literal("timeout")}),a.object({type:a.literal("exit"),exitCode:a.number()})])}))}))),IR=je({id:"openai.shell",inputSchema:pS,outputSchema:mS}),TR=O(()=>A(a.object({externalWebAccess:a.boolean().optional(),filters:a.object({allowedDomains:a.array(a.string()).optional()}).optional(),searchContextSize:a.enum(["low","medium","high"]).optional(),userLocation:a.object({type:a.literal("approximate"),country:a.string().optional(),city:a.string().optional(),region:a.string().optional(),timezone:a.string().optional()}).optional()}))),$R=O(()=>A(a.object({}))),ER=O(()=>A(a.object({action:a.discriminatedUnion("type",[a.object({type:a.literal("search"),query:a.string().optional()}),a.object({type:a.literal("openPage"),url:a.string().nullish()}),a.object({type:a.literal("findInPage"),url:a.string().nullish(),pattern:a.string().nullish()})]),sources:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("url"),url:a.string()}),a.object({type:a.literal("api"),name:a.string()})])).optional()}))),CR=je({id:"openai.web_search",inputSchema:$R,outputSchema:ER}),AR=(e={})=>CR(e),PR=O(()=>A(a.object({searchContextSize:a.enum(["low","medium","high"]).optional(),userLocation:a.object({type:a.literal("approximate"),country:a.string().optional(),city:a.string().optional(),region:a.string().optional(),timezone:a.string().optional()}).optional()}))),OR=O(()=>A(a.object({}))),RR=O(()=>A(a.object({action:a.discriminatedUnion("type",[a.object({type:a.literal("search"),query:a.string().optional()}),a.object({type:a.literal("openPage"),url:a.string().nullish()}),a.object({type:a.literal("findInPage"),url:a.string().nullish(),pattern:a.string().nullish()})])}))),MR=je({id:"openai.web_search_preview",inputSchema:OR,outputSchema:RR}),uh=a.lazy(()=>a.union([a.string(),a.number(),a.boolean(),a.null(),a.array(uh),a.record(a.string(),uh)])),NR=O(()=>A(a.object({serverLabel:a.string(),allowedTools:a.union([a.array(a.string()),a.object({readOnly:a.boolean().optional(),toolNames:a.array(a.string()).optional()})]).optional(),authorization:a.string().optional(),connectorId:a.string().optional(),headers:a.record(a.string(),a.string()).optional(),requireApproval:a.union([a.enum(["always","never"]),a.object({never:a.object({toolNames:a.array(a.string()).optional()}).optional()})]).optional(),serverDescription:a.string().optional(),serverUrl:a.string().optional()}).refine(e=>e.serverUrl!=null||e.connectorId!=null,"One of serverUrl or connectorId must be provided."))),jR=O(()=>A(a.object({}))),DR=O(()=>A(a.object({type:a.literal("call"),serverLabel:a.string(),name:a.string(),arguments:a.string(),output:a.string().nullish(),error:a.union([a.string(),uh]).optional()}))),zR=je({id:"openai.mcp",inputSchema:jR,outputSchema:DR}),UR=e=>zR(e),FR={applyPatch:cR,codeInterpreter:gR,fileSearch:yR,imageGeneration:SR,localShell:kR,shell:IR,webSearchPreview:MR,webSearch:AR,mcp:UR};function Yw(e){var t,r,o,n;if(e==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let i=e.input_tokens,s=e.output_tokens,l=(r=(t=e.input_tokens_details)==null?void 0:t.cached_tokens)!=null?r:0,d=(n=(o=e.output_tokens_details)==null?void 0:o.reasoning_tokens)!=null?n:0;return{inputTokens:{total:i,noCache:i-l,cacheRead:l,cacheWrite:void 0},outputTokens:{total:s,text:s-d,reasoning:d},raw:e}}function Xw(e,t){return t?t.some(r=>e.startsWith(r)):!1}async function LR({prompt:e,toolNameMapping:t,systemMessageMode:r,providerOptionsName:o,fileIdPrefixes:n,store:i,hasConversation:s=!1,hasLocalShellTool:l=!1,hasShellTool:d=!1,hasApplyPatchTool:u=!1}){var m,c,p,f,v,g,y,S,b,_,k,w,h;let I=[],j=[],U=new Set;for(let{role:F,content:Z}of e)switch(F){case"system":{switch(r){case"system":{I.push({role:"system",content:Z});break}case"developer":{I.push({role:"developer",content:Z});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:{let L=r;throw new Error(`Unsupported system message mode: ${L}`)}}break}case"user":{I.push({role:"user",content:Z.map((L,M)=>{var q,C,E;switch(L.type){case"text":return{type:"input_text",text:L.text};case"file":if(L.mediaType.startsWith("image/")){let te=L.mediaType==="image/*"?"image/jpeg":L.mediaType;return{type:"input_image",...L.data instanceof URL?{image_url:L.data.toString()}:typeof L.data=="string"&&Xw(L.data,n)?{file_id:L.data}:{image_url:`data:${te};base64,${kt(L.data)}`},detail:(C=(q=L.providerOptions)==null?void 0:q[o])==null?void 0:C.imageDetail}}else{if(L.mediaType==="application/pdf")return L.data instanceof URL?{type:"input_file",file_url:L.data.toString()}:{type:"input_file",...typeof L.data=="string"&&Xw(L.data,n)?{file_id:L.data}:{filename:(E=L.filename)!=null?E:`part-${M}.pdf`,file_data:`data:application/pdf;base64,${kt(L.data)}`}};throw new Re({functionality:`file part media type ${L.mediaType}`})}}})});break}case"assistant":{let L={};for(let M of Z)switch(M.type){case"text":{let q=(c=(m=M.providerOptions)==null?void 0:m[o])==null?void 0:c.itemId;if(s&&q!=null)break;if(i&&q!=null){I.push({type:"item_reference",id:q});break}I.push({role:"assistant",content:[{type:"output_text",text:M.text}],id:q});break}case"tool-call":{let q=(y=(f=(p=M.providerOptions)==null?void 0:p[o])==null?void 0:f.itemId)!=null?y:(g=(v=M.providerMetadata)==null?void 0:v[o])==null?void 0:g.itemId;if(s&&q!=null)break;if(M.providerExecuted){i&&q!=null&&I.push({type:"item_reference",id:q});break}if(i&&q!=null){I.push({type:"item_reference",id:q});break}let C=t.toProviderToolName(M.toolName);if(l&&C==="local_shell"){let E=await Je({value:M.input,schema:cS});I.push({type:"local_shell_call",call_id:M.toolCallId,id:q,action:{type:"exec",command:E.action.command,timeout_ms:E.action.timeoutMs,user:E.action.user,working_directory:E.action.workingDirectory,env:E.action.env}});break}if(d&&C==="shell"){let E=await Je({value:M.input,schema:pS});I.push({type:"shell_call",call_id:M.toolCallId,id:q,status:"completed",action:{commands:E.action.commands,timeout_ms:E.action.timeoutMs,max_output_length:E.action.maxOutputLength}});break}if(u&&C==="apply_patch"){let E=await Je({value:M.input,schema:iS});I.push({type:"apply_patch_call",call_id:E.callId,id:q,status:"completed",operation:E.operation});break}I.push({type:"function_call",call_id:M.toolCallId,name:C,arguments:JSON.stringify(M.input),id:q});break}case"tool-result":{if(M.output.type==="execution-denied"||M.output.type==="json"&&typeof M.output.value=="object"&&M.output.value!=null&&"type"in M.output.value&&M.output.value.type==="execution-denied"||s)break;if(i){let q=(_=(b=(S=M.providerMetadata)==null?void 0:S[o])==null?void 0:b.itemId)!=null?_:M.toolCallId;I.push({type:"item_reference",id:q})}else j.push({type:"other",message:`Results for OpenAI tool ${M.toolName} are not sent to the API when store is false`});break}case"reasoning":{let q=await Ee({provider:o,providerOptions:M.providerOptions,schema:qR}),C=q==null?void 0:q.itemId;if(s&&C!=null)break;if(C!=null){let E=L[C];if(i)E===void 0&&(I.push({type:"item_reference",id:C}),L[C]={type:"reasoning",id:C,summary:[]});else{let te=[];M.text.length>0?te.push({type:"summary_text",text:M.text}):E!==void 0&&j.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(M)}.`}),E===void 0?(L[C]={type:"reasoning",id:C,encrypted_content:q==null?void 0:q.reasoningEncryptedContent,summary:te},I.push(L[C])):(E.summary.push(...te),(q==null?void 0:q.reasoningEncryptedContent)!=null&&(E.encrypted_content=q.reasoningEncryptedContent))}}else j.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(M)}.`});break}}break}case"tool":{for(let L of Z){if(L.type==="tool-approval-response"){let E=L;if(U.has(E.approvalId))continue;U.add(E.approvalId),i&&I.push({type:"item_reference",id:E.approvalId}),I.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let M=L.output;if(M.type==="execution-denied"&&((w=(k=M.providerOptions)==null?void 0:k.openai)==null?void 0:w.approvalId))continue;let q=t.toProviderToolName(L.toolName);if(l&&q==="local_shell"&&M.type==="json"){let E=await Je({value:M.value,schema:dS});I.push({type:"local_shell_call_output",call_id:L.toolCallId,output:E.output});continue}if(d&&q==="shell"&&M.type==="json"){let E=await Je({value:M.value,schema:mS});I.push({type:"shell_call_output",call_id:L.toolCallId,output:E.output.map(te=>({stdout:te.stdout,stderr:te.stderr,outcome:te.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:te.outcome.exitCode}}))});continue}if(u&&L.toolName==="apply_patch"&&M.type==="json"){let E=await Je({value:M.value,schema:sS});I.push({type:"apply_patch_call_output",call_id:L.toolCallId,status:E.status,output:E.output});continue}let C;switch(M.type){case"text":case"error-text":C=M.value;break;case"execution-denied":C=(h=M.reason)!=null?h:"Tool execution denied.";break;case"json":case"error-json":C=JSON.stringify(M.value);break;case"content":C=M.value.map(E=>{var te;switch(E.type){case"text":return{type:"input_text",text:E.text};case"image-data":return{type:"input_image",image_url:`data:${E.mediaType};base64,${E.data}`};case"image-url":return{type:"input_image",image_url:E.url};case"file-data":return{type:"input_file",filename:(te=E.filename)!=null?te:"data",file_data:`data:${E.mediaType};base64,${E.data}`};default:{j.push({type:"other",message:`unsupported tool content part type: ${E.type}`});return}}}).filter(_u);break}I.push({type:"function_call_output",call_id:L.toolCallId,output:C})}break}default:{let L=F;throw new Error(`Unsupported role: ${L}`)}}return{input:I,warnings:j}}var qR=a.object({itemId:a.string().nullish(),reasoningEncryptedContent:a.string().nullish()});function Qw({finishReason:e,hasFunctionCall:t}){switch(e){case void 0:case null:return t?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return t?"tool-calls":"other"}}var ZR=O(()=>A(a.union([a.object({type:a.literal("response.output_text.delta"),item_id:a.string(),delta:a.string(),logprobs:a.array(a.object({token:a.string(),logprob:a.number(),top_logprobs:a.array(a.object({token:a.string(),logprob:a.number()}))})).nullish()}),a.object({type:a.enum(["response.completed","response.incomplete"]),response:a.object({incomplete_details:a.object({reason:a.string()}).nullish(),usage:a.object({input_tokens:a.number(),input_tokens_details:a.object({cached_tokens:a.number().nullish()}).nullish(),output_tokens:a.number(),output_tokens_details:a.object({reasoning_tokens:a.number().nullish()}).nullish()}),service_tier:a.string().nullish()})}),a.object({type:a.literal("response.created"),response:a.object({id:a.string(),created_at:a.number(),model:a.string(),service_tier:a.string().nullish()})}),a.object({type:a.literal("response.output_item.added"),output_index:a.number(),item:a.discriminatedUnion("type",[a.object({type:a.literal("message"),id:a.string()}),a.object({type:a.literal("reasoning"),id:a.string(),encrypted_content:a.string().nullish()}),a.object({type:a.literal("function_call"),id:a.string(),call_id:a.string(),name:a.string(),arguments:a.string()}),a.object({type:a.literal("web_search_call"),id:a.string(),status:a.string()}),a.object({type:a.literal("computer_call"),id:a.string(),status:a.string()}),a.object({type:a.literal("file_search_call"),id:a.string()}),a.object({type:a.literal("image_generation_call"),id:a.string()}),a.object({type:a.literal("code_interpreter_call"),id:a.string(),container_id:a.string(),code:a.string().nullable(),outputs:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("logs"),logs:a.string()}),a.object({type:a.literal("image"),url:a.string()})])).nullable(),status:a.string()}),a.object({type:a.literal("mcp_call"),id:a.string(),status:a.string(),approval_request_id:a.string().nullish()}),a.object({type:a.literal("mcp_list_tools"),id:a.string()}),a.object({type:a.literal("mcp_approval_request"),id:a.string()}),a.object({type:a.literal("apply_patch_call"),id:a.string(),call_id:a.string(),status:a.enum(["in_progress","completed"]),operation:a.discriminatedUnion("type",[a.object({type:a.literal("create_file"),path:a.string(),diff:a.string()}),a.object({type:a.literal("delete_file"),path:a.string()}),a.object({type:a.literal("update_file"),path:a.string(),diff:a.string()})])}),a.object({type:a.literal("shell_call"),id:a.string(),call_id:a.string(),status:a.enum(["in_progress","completed","incomplete"]),action:a.object({commands:a.array(a.string())})})])}),a.object({type:a.literal("response.output_item.done"),output_index:a.number(),item:a.discriminatedUnion("type",[a.object({type:a.literal("message"),id:a.string()}),a.object({type:a.literal("reasoning"),id:a.string(),encrypted_content:a.string().nullish()}),a.object({type:a.literal("function_call"),id:a.string(),call_id:a.string(),name:a.string(),arguments:a.string(),status:a.literal("completed")}),a.object({type:a.literal("code_interpreter_call"),id:a.string(),code:a.string().nullable(),container_id:a.string(),outputs:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("logs"),logs:a.string()}),a.object({type:a.literal("image"),url:a.string()})])).nullable()}),a.object({type:a.literal("image_generation_call"),id:a.string(),result:a.string()}),a.object({type:a.literal("web_search_call"),id:a.string(),status:a.string(),action:a.discriminatedUnion("type",[a.object({type:a.literal("search"),query:a.string().nullish(),sources:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("url"),url:a.string()}),a.object({type:a.literal("api"),name:a.string()})])).nullish()}),a.object({type:a.literal("open_page"),url:a.string().nullish()}),a.object({type:a.literal("find_in_page"),url:a.string().nullish(),pattern:a.string().nullish()})])}),a.object({type:a.literal("file_search_call"),id:a.string(),queries:a.array(a.string()),results:a.array(a.object({attributes:a.record(a.string(),a.union([a.string(),a.number(),a.boolean()])),file_id:a.string(),filename:a.string(),score:a.number(),text:a.string()})).nullish()}),a.object({type:a.literal("local_shell_call"),id:a.string(),call_id:a.string(),action:a.object({type:a.literal("exec"),command:a.array(a.string()),timeout_ms:a.number().optional(),user:a.string().optional(),working_directory:a.string().optional(),env:a.record(a.string(),a.string()).optional()})}),a.object({type:a.literal("computer_call"),id:a.string(),status:a.literal("completed")}),a.object({type:a.literal("mcp_call"),id:a.string(),status:a.string(),arguments:a.string(),name:a.string(),server_label:a.string(),output:a.string().nullish(),error:a.union([a.string(),a.object({type:a.string().optional(),code:a.union([a.number(),a.string()]).optional(),message:a.string().optional()}).loose()]).nullish(),approval_request_id:a.string().nullish()}),a.object({type:a.literal("mcp_list_tools"),id:a.string(),server_label:a.string(),tools:a.array(a.object({name:a.string(),description:a.string().optional(),input_schema:a.any(),annotations:a.record(a.string(),a.unknown()).optional()})),error:a.union([a.string(),a.object({type:a.string().optional(),code:a.union([a.number(),a.string()]).optional(),message:a.string().optional()}).loose()]).optional()}),a.object({type:a.literal("mcp_approval_request"),id:a.string(),server_label:a.string(),name:a.string(),arguments:a.string(),approval_request_id:a.string().optional()}),a.object({type:a.literal("apply_patch_call"),id:a.string(),call_id:a.string(),status:a.enum(["in_progress","completed"]),operation:a.discriminatedUnion("type",[a.object({type:a.literal("create_file"),path:a.string(),diff:a.string()}),a.object({type:a.literal("delete_file"),path:a.string()}),a.object({type:a.literal("update_file"),path:a.string(),diff:a.string()})])}),a.object({type:a.literal("shell_call"),id:a.string(),call_id:a.string(),status:a.enum(["in_progress","completed","incomplete"]),action:a.object({commands:a.array(a.string())})})])}),a.object({type:a.literal("response.function_call_arguments.delta"),item_id:a.string(),output_index:a.number(),delta:a.string()}),a.object({type:a.literal("response.image_generation_call.partial_image"),item_id:a.string(),output_index:a.number(),partial_image_b64:a.string()}),a.object({type:a.literal("response.code_interpreter_call_code.delta"),item_id:a.string(),output_index:a.number(),delta:a.string()}),a.object({type:a.literal("response.code_interpreter_call_code.done"),item_id:a.string(),output_index:a.number(),code:a.string()}),a.object({type:a.literal("response.output_text.annotation.added"),annotation:a.discriminatedUnion("type",[a.object({type:a.literal("url_citation"),start_index:a.number(),end_index:a.number(),url:a.string(),title:a.string()}),a.object({type:a.literal("file_citation"),file_id:a.string(),filename:a.string(),index:a.number()}),a.object({type:a.literal("container_file_citation"),container_id:a.string(),file_id:a.string(),filename:a.string(),start_index:a.number(),end_index:a.number()}),a.object({type:a.literal("file_path"),file_id:a.string(),index:a.number()})])}),a.object({type:a.literal("response.reasoning_summary_part.added"),item_id:a.string(),summary_index:a.number()}),a.object({type:a.literal("response.reasoning_summary_text.delta"),item_id:a.string(),summary_index:a.number(),delta:a.string()}),a.object({type:a.literal("response.reasoning_summary_part.done"),item_id:a.string(),summary_index:a.number()}),a.object({type:a.literal("response.apply_patch_call_operation_diff.delta"),item_id:a.string(),output_index:a.number(),delta:a.string(),obfuscation:a.string().nullish()}),a.object({type:a.literal("response.apply_patch_call_operation_diff.done"),item_id:a.string(),output_index:a.number(),diff:a.string()}),a.object({type:a.literal("error"),sequence_number:a.number(),error:a.object({type:a.string(),code:a.string(),message:a.string(),param:a.string().nullish()})}),a.object({type:a.string()}).loose().transform(e=>({type:"unknown_chunk",message:e.type}))]))),VR=O(()=>A(a.object({id:a.string().optional(),created_at:a.number().optional(),error:a.object({message:a.string(),type:a.string(),param:a.string().nullish(),code:a.string()}).nullish(),model:a.string().optional(),output:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("message"),role:a.literal("assistant"),id:a.string(),content:a.array(a.object({type:a.literal("output_text"),text:a.string(),logprobs:a.array(a.object({token:a.string(),logprob:a.number(),top_logprobs:a.array(a.object({token:a.string(),logprob:a.number()}))})).nullish(),annotations:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("url_citation"),start_index:a.number(),end_index:a.number(),url:a.string(),title:a.string()}),a.object({type:a.literal("file_citation"),file_id:a.string(),filename:a.string(),index:a.number()}),a.object({type:a.literal("container_file_citation"),container_id:a.string(),file_id:a.string(),filename:a.string(),start_index:a.number(),end_index:a.number()}),a.object({type:a.literal("file_path"),file_id:a.string(),index:a.number()})]))}))}),a.object({type:a.literal("web_search_call"),id:a.string(),status:a.string(),action:a.discriminatedUnion("type",[a.object({type:a.literal("search"),query:a.string().nullish(),sources:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("url"),url:a.string()}),a.object({type:a.literal("api"),name:a.string()})])).nullish()}),a.object({type:a.literal("open_page"),url:a.string().nullish()}),a.object({type:a.literal("find_in_page"),url:a.string().nullish(),pattern:a.string().nullish()})])}),a.object({type:a.literal("file_search_call"),id:a.string(),queries:a.array(a.string()),results:a.array(a.object({attributes:a.record(a.string(),a.union([a.string(),a.number(),a.boolean()])),file_id:a.string(),filename:a.string(),score:a.number(),text:a.string()})).nullish()}),a.object({type:a.literal("code_interpreter_call"),id:a.string(),code:a.string().nullable(),container_id:a.string(),outputs:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("logs"),logs:a.string()}),a.object({type:a.literal("image"),url:a.string()})])).nullable()}),a.object({type:a.literal("image_generation_call"),id:a.string(),result:a.string()}),a.object({type:a.literal("local_shell_call"),id:a.string(),call_id:a.string(),action:a.object({type:a.literal("exec"),command:a.array(a.string()),timeout_ms:a.number().optional(),user:a.string().optional(),working_directory:a.string().optional(),env:a.record(a.string(),a.string()).optional()})}),a.object({type:a.literal("function_call"),call_id:a.string(),name:a.string(),arguments:a.string(),id:a.string()}),a.object({type:a.literal("computer_call"),id:a.string(),status:a.string().optional()}),a.object({type:a.literal("reasoning"),id:a.string(),encrypted_content:a.string().nullish(),summary:a.array(a.object({type:a.literal("summary_text"),text:a.string()}))}),a.object({type:a.literal("mcp_call"),id:a.string(),status:a.string(),arguments:a.string(),name:a.string(),server_label:a.string(),output:a.string().nullish(),error:a.union([a.string(),a.object({type:a.string().optional(),code:a.union([a.number(),a.string()]).optional(),message:a.string().optional()}).loose()]).nullish(),approval_request_id:a.string().nullish()}),a.object({type:a.literal("mcp_list_tools"),id:a.string(),server_label:a.string(),tools:a.array(a.object({name:a.string(),description:a.string().optional(),input_schema:a.any(),annotations:a.record(a.string(),a.unknown()).optional()})),error:a.union([a.string(),a.object({type:a.string().optional(),code:a.union([a.number(),a.string()]).optional(),message:a.string().optional()}).loose()]).optional()}),a.object({type:a.literal("mcp_approval_request"),id:a.string(),server_label:a.string(),name:a.string(),arguments:a.string(),approval_request_id:a.string().optional()}),a.object({type:a.literal("apply_patch_call"),id:a.string(),call_id:a.string(),status:a.enum(["in_progress","completed"]),operation:a.discriminatedUnion("type",[a.object({type:a.literal("create_file"),path:a.string(),diff:a.string()}),a.object({type:a.literal("delete_file"),path:a.string()}),a.object({type:a.literal("update_file"),path:a.string(),diff:a.string()})])}),a.object({type:a.literal("shell_call"),id:a.string(),call_id:a.string(),status:a.enum(["in_progress","completed","incomplete"]),action:a.object({commands:a.array(a.string())})})])).optional(),service_tier:a.string().nullish(),incomplete_details:a.object({reason:a.string()}).nullish(),usage:a.object({input_tokens:a.number(),input_tokens_details:a.object({cached_tokens:a.number().nullish()}).nullish(),output_tokens:a.number(),output_tokens_details:a.object({reasoning_tokens:a.number().nullish()}).nullish()}).optional()}))),fS=20,GR=["o1","o1-2024-12-17","o3","o3-2025-04-16","o3-deep-research","o3-deep-research-2025-06-26","o3-mini","o3-mini-2025-01-31","o4-mini","o4-mini-2025-04-16","o4-mini-deep-research","o4-mini-deep-research-2025-06-26","codex-mini-latest","computer-use-preview","gpt-5","gpt-5-2025-08-07","gpt-5-codex","gpt-5-mini","gpt-5-mini-2025-08-07","gpt-5-nano","gpt-5-nano-2025-08-07","gpt-5-pro","gpt-5-pro-2025-10-06","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-pro"],w5=["gpt-4.1","gpt-4.1-2025-04-14","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4.1-nano-2025-04-14","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-audio-preview","gpt-4o-audio-preview-2024-10-01","gpt-4o-audio-preview-2024-12-17","gpt-4o-search-preview","gpt-4o-search-preview-2025-03-11","gpt-4o-mini-search-preview","gpt-4o-mini-search-preview-2025-03-11","gpt-4o-mini","gpt-4o-mini-2024-07-18","gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4-turbo-preview","gpt-4-0125-preview","gpt-4-1106-preview","gpt-4","gpt-4-0613","gpt-4.5-preview","gpt-4.5-preview-2025-02-27","gpt-3.5-turbo-0125","gpt-3.5-turbo","gpt-3.5-turbo-1106","chatgpt-4o-latest","gpt-5-chat-latest",...GR],eS=O(()=>A(a.object({conversation:a.string().nullish(),include:a.array(a.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:a.string().nullish(),logprobs:a.union([a.boolean(),a.number().min(1).max(fS)]).optional(),maxToolCalls:a.number().nullish(),metadata:a.any().nullish(),parallelToolCalls:a.boolean().nullish(),previousResponseId:a.string().nullish(),promptCacheKey:a.string().nullish(),promptCacheRetention:a.enum(["in_memory","24h"]).nullish(),reasoningEffort:a.string().nullish(),reasoningSummary:a.string().nullish(),safetyIdentifier:a.string().nullish(),serviceTier:a.enum(["auto","flex","priority","default"]).nullish(),store:a.boolean().nullish(),strictJsonSchema:a.boolean().nullish(),textVerbosity:a.enum(["low","medium","high"]).nullish(),truncation:a.enum(["auto","disabled"]).nullish(),user:a.string().nullish(),systemMessageMode:a.enum(["system","developer","remove"]).optional(),forceReasoning:a.boolean().optional()})));async function HR({tools:e,toolChoice:t}){e=e!=null&&e.length?e:void 0;let r=[];if(e==null)return{tools:void 0,toolChoice:void 0,toolWarnings:r};let o=[];for(let i of e)switch(i.type){case"function":o.push({type:"function",name:i.name,description:i.description,parameters:i.inputSchema,...i.strict!=null?{strict:i.strict}:{}});break;case"provider":{switch(i.id){case"openai.file_search":{let s=await Je({value:i.args,schema:hR});o.push({type:"file_search",vector_store_ids:s.vectorStoreIds,max_num_results:s.maxNumResults,ranking_options:s.ranking?{ranker:s.ranking.ranker,score_threshold:s.ranking.scoreThreshold}:void 0,filters:s.filters});break}case"openai.local_shell":{o.push({type:"local_shell"});break}case"openai.shell":{o.push({type:"shell"});break}case"openai.apply_patch":{o.push({type:"apply_patch"});break}case"openai.web_search_preview":{let s=await Je({value:i.args,schema:PR});o.push({type:"web_search_preview",search_context_size:s.searchContextSize,user_location:s.userLocation});break}case"openai.web_search":{let s=await Je({value:i.args,schema:TR});o.push({type:"web_search",filters:s.filters!=null?{allowed_domains:s.filters.allowedDomains}:void 0,external_web_access:s.externalWebAccess,search_context_size:s.searchContextSize,user_location:s.userLocation});break}case"openai.code_interpreter":{let s=await Je({value:i.args,schema:mR});o.push({type:"code_interpreter",container:s.container==null?{type:"auto",file_ids:void 0}:typeof s.container=="string"?s.container:{type:"auto",file_ids:s.container.fileIds}});break}case"openai.image_generation":{let s=await Je({value:i.args,schema:_R});o.push({type:"image_generation",background:s.background,input_fidelity:s.inputFidelity,input_image_mask:s.inputImageMask?{file_id:s.inputImageMask.fileId,image_url:s.inputImageMask.imageUrl}:void 0,model:s.model,moderation:s.moderation,partial_images:s.partialImages,quality:s.quality,output_compression:s.outputCompression,output_format:s.outputFormat,size:s.size});break}case"openai.mcp":{let s=await Je({value:i.args,schema:NR}),l=m=>({tool_names:m.toolNames}),d=s.requireApproval,u=d==null?void 0:typeof d=="string"?d:d.never!=null?{never:l(d.never)}:void 0;o.push({type:"mcp",server_label:s.serverLabel,allowed_tools:Array.isArray(s.allowedTools)?s.allowedTools:s.allowedTools?{read_only:s.allowedTools.readOnly,tool_names:s.allowedTools.toolNames}:void 0,authorization:s.authorization,connector_id:s.connectorId,headers:s.headers,require_approval:u!=null?u:"never",server_description:s.serverDescription,server_url:s.serverUrl});break}}break}default:r.push({type:"unsupported",feature:`function tool ${i}`});break}if(t==null)return{tools:o,toolChoice:void 0,toolWarnings:r};let n=t.type;switch(n){case"auto":case"none":case"required":return{tools:o,toolChoice:n,toolWarnings:r};case"tool":return{tools:o,toolChoice:t.toolName==="code_interpreter"||t.toolName==="file_search"||t.toolName==="image_generation"||t.toolName==="web_search_preview"||t.toolName==="web_search"||t.toolName==="mcp"||t.toolName==="apply_patch"?{type:t.toolName}:{type:"function",name:t.toolName},toolWarnings:r};default:{let i=n;throw new Re({functionality:`tool choice type: ${i}`})}}}function tS(e){var t,r;let o={};for(let n of e)if(n.role==="assistant")for(let i of n.content){if(i.type!=="tool-call")continue;let s=(r=(t=i.providerOptions)==null?void 0:t.openai)==null?void 0:r.approvalRequestId;s!=null&&(o[s]=i.toolCallId)}return o}var BR=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({maxOutputTokens:e,temperature:t,stopSequences:r,topP:o,topK:n,presencePenalty:i,frequencyPenalty:s,seed:l,prompt:d,providerOptions:u,tools:m,toolChoice:c,responseFormat:p}){var f,v,g,y,S,b;let _=[],k=aS(this.modelId);n!=null&&_.push({type:"unsupported",feature:"topK"}),l!=null&&_.push({type:"unsupported",feature:"seed"}),i!=null&&_.push({type:"unsupported",feature:"presencePenalty"}),s!=null&&_.push({type:"unsupported",feature:"frequencyPenalty"}),r!=null&&_.push({type:"unsupported",feature:"stopSequences"});let w=this.config.provider.includes("azure")?"azure":"openai",h=await Ee({provider:w,providerOptions:u,schema:eS});h==null&&w!=="openai"&&(h=await Ee({provider:"openai",providerOptions:u,schema:eS}));let I=(f=h==null?void 0:h.forceReasoning)!=null?f:k.isReasoningModel;h!=null&&h.conversation&&(h!=null&&h.previousResponseId)&&_.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});let j=gu({tools:m,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch"}}),{input:U,warnings:F}=await LR({prompt:d,toolNameMapping:j,systemMessageMode:(v=h==null?void 0:h.systemMessageMode)!=null?v:I?"developer":k.systemMessageMode,providerOptionsName:w,fileIdPrefixes:this.config.fileIdPrefixes,store:(g=h==null?void 0:h.store)!=null?g:!0,hasConversation:(h==null?void 0:h.conversation)!=null,hasLocalShellTool:q("openai.local_shell"),hasShellTool:q("openai.shell"),hasApplyPatchTool:q("openai.apply_patch")});_.push(...F);let Z=(y=h==null?void 0:h.strictJsonSchema)!=null?y:!0,L=h==null?void 0:h.include;function M(fe){L==null?L=[fe]:L.includes(fe)||(L=[...L,fe])}function q(fe){return(m==null?void 0:m.find(V=>V.type==="provider"&&V.id===fe))!=null}let C=typeof(h==null?void 0:h.logprobs)=="number"?h==null?void 0:h.logprobs:(h==null?void 0:h.logprobs)===!0?fS:void 0;C&&M("message.output_text.logprobs");let E=(S=m==null?void 0:m.find(fe=>fe.type==="provider"&&(fe.id==="openai.web_search"||fe.id==="openai.web_search_preview")))==null?void 0:S.name;E&&M("web_search_call.action.sources"),q("openai.code_interpreter")&&M("code_interpreter_call.outputs");let te=h==null?void 0:h.store;te===!1&&I&&M("reasoning.encrypted_content");let P={model:this.modelId,input:U,temperature:t,top_p:o,max_output_tokens:e,...((p==null?void 0:p.type)==="json"||(h==null?void 0:h.textVerbosity))&&{text:{...(p==null?void 0:p.type)==="json"&&{format:p.schema!=null?{type:"json_schema",strict:Z,name:(b=p.name)!=null?b:"response",description:p.description,schema:p.schema}:{type:"json_object"}},...(h==null?void 0:h.textVerbosity)&&{verbosity:h.textVerbosity}}},conversation:h==null?void 0:h.conversation,max_tool_calls:h==null?void 0:h.maxToolCalls,metadata:h==null?void 0:h.metadata,parallel_tool_calls:h==null?void 0:h.parallelToolCalls,previous_response_id:h==null?void 0:h.previousResponseId,store:te,user:h==null?void 0:h.user,instructions:h==null?void 0:h.instructions,service_tier:h==null?void 0:h.serviceTier,include:L,prompt_cache_key:h==null?void 0:h.promptCacheKey,prompt_cache_retention:h==null?void 0:h.promptCacheRetention,safety_identifier:h==null?void 0:h.safetyIdentifier,top_logprobs:C,truncation:h==null?void 0:h.truncation,...I&&((h==null?void 0:h.reasoningEffort)!=null||(h==null?void 0:h.reasoningSummary)!=null)&&{reasoning:{...(h==null?void 0:h.reasoningEffort)!=null&&{effort:h.reasoningEffort},...(h==null?void 0:h.reasoningSummary)!=null&&{summary:h.reasoningSummary}}}};I?(h==null?void 0:h.reasoningEffort)==="none"&&k.supportsNonReasoningParameters||(P.temperature!=null&&(P.temperature=void 0,_.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),P.top_p!=null&&(P.top_p=void 0,_.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"}))):((h==null?void 0:h.reasoningEffort)!=null&&_.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"}),(h==null?void 0:h.reasoningSummary)!=null&&_.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})),(h==null?void 0:h.serviceTier)==="flex"&&!k.supportsFlexProcessing&&(_.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete P.service_tier),(h==null?void 0:h.serviceTier)==="priority"&&!k.supportsPriorityProcessing&&(_.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete P.service_tier);let{tools:se,toolChoice:ee,toolWarnings:he}=await HR({tools:m,toolChoice:c});return{webSearchToolName:E,args:{...P,tools:se,tool_choice:ee},warnings:[..._,...he],store:te,toolNameMapping:j,providerOptionsName:w}}async doGenerate(e){var t,r,o,n,i,s,l,d,u,m,c,p,f,v,g,y,S,b,_,k,w,h,I,j,U;let{args:F,warnings:Z,webSearchToolName:L,toolNameMapping:M,providerOptionsName:q}=await this.getArgs(e),C=this.config.url({path:"/responses",modelId:this.modelId}),E=tS(e.prompt),{responseHeaders:te,value:P,rawValue:se}=await we({url:C,headers:_e(this.config.headers(),e.headers),body:F,failedResponseHandler:Sr,successfulResponseHandler:ke(VR),abortSignal:e.abortSignal,fetch:this.config.fetch});if(P.error)throw new Ye({message:P.error.message,url:C,requestBodyValues:F,statusCode:400,responseHeaders:te,responseBody:se,isRetryable:!1});let ee=[],he=[],fe=!1;for(let T of P.output)switch(T.type){case"reasoning":{T.summary.length===0&&T.summary.push({type:"summary_text",text:""});for(let pe of T.summary)ee.push({type:"reasoning",text:pe.text,providerMetadata:{[q]:{itemId:T.id,reasoningEncryptedContent:(t=T.encrypted_content)!=null?t:null}}});break}case"image_generation_call":{ee.push({type:"tool-call",toolCallId:T.id,toolName:M.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),ee.push({type:"tool-result",toolCallId:T.id,toolName:M.toCustomToolName("image_generation"),result:{result:T.result}});break}case"local_shell_call":{ee.push({type:"tool-call",toolCallId:T.call_id,toolName:M.toCustomToolName("local_shell"),input:JSON.stringify({action:T.action}),providerMetadata:{[q]:{itemId:T.id}}});break}case"shell_call":{ee.push({type:"tool-call",toolCallId:T.call_id,toolName:M.toCustomToolName("shell"),input:JSON.stringify({action:{commands:T.action.commands}}),providerMetadata:{[q]:{itemId:T.id}}});break}case"message":{for(let pe of T.content){(o=(r=e.providerOptions)==null?void 0:r[q])!=null&&o.logprobs&&pe.logprobs&&he.push(pe.logprobs);let de={itemId:T.id,...pe.annotations.length>0&&{annotations:pe.annotations}};ee.push({type:"text",text:pe.text,providerMetadata:{[q]:de}});for(let H of pe.annotations)H.type==="url_citation"?ee.push({type:"source",sourceType:"url",id:(s=(i=(n=this.config).generateId)==null?void 0:i.call(n))!=null?s:Fe(),url:H.url,title:H.title}):H.type==="file_citation"?ee.push({type:"source",sourceType:"document",id:(u=(d=(l=this.config).generateId)==null?void 0:d.call(l))!=null?u:Fe(),mediaType:"text/plain",title:H.filename,filename:H.filename,providerMetadata:{[q]:{type:H.type,fileId:H.file_id,index:H.index}}}):H.type==="container_file_citation"?ee.push({type:"source",sourceType:"document",id:(p=(c=(m=this.config).generateId)==null?void 0:c.call(m))!=null?p:Fe(),mediaType:"text/plain",title:H.filename,filename:H.filename,providerMetadata:{[q]:{type:H.type,fileId:H.file_id,containerId:H.container_id}}}):H.type==="file_path"&&ee.push({type:"source",sourceType:"document",id:(g=(v=(f=this.config).generateId)==null?void 0:v.call(f))!=null?g:Fe(),mediaType:"application/octet-stream",title:H.file_id,filename:H.file_id,providerMetadata:{[q]:{type:H.type,fileId:H.file_id,index:H.index}}})}break}case"function_call":{fe=!0,ee.push({type:"tool-call",toolCallId:T.call_id,toolName:T.name,input:T.arguments,providerMetadata:{[q]:{itemId:T.id}}});break}case"web_search_call":{ee.push({type:"tool-call",toolCallId:T.id,toolName:M.toCustomToolName(L!=null?L:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),ee.push({type:"tool-result",toolCallId:T.id,toolName:M.toCustomToolName(L!=null?L:"web_search"),result:nS(T.action)});break}case"mcp_call":{let pe=T.approval_request_id!=null&&(y=E[T.approval_request_id])!=null?y:T.id,de=`mcp.${T.name}`;ee.push({type:"tool-call",toolCallId:pe,toolName:de,input:T.arguments,providerExecuted:!0,dynamic:!0}),ee.push({type:"tool-result",toolCallId:pe,toolName:de,result:{type:"call",serverLabel:T.server_label,name:T.name,arguments:T.arguments,...T.output!=null?{output:T.output}:{},...T.error!=null?{error:T.error}:{}},providerMetadata:{[q]:{itemId:T.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{let pe=(S=T.approval_request_id)!=null?S:T.id,de=(k=(_=(b=this.config).generateId)==null?void 0:_.call(b))!=null?k:Fe(),H=`mcp.${T.name}`;ee.push({type:"tool-call",toolCallId:de,toolName:H,input:T.arguments,providerExecuted:!0,dynamic:!0}),ee.push({type:"tool-approval-request",approvalId:pe,toolCallId:de});break}case"computer_call":{ee.push({type:"tool-call",toolCallId:T.id,toolName:M.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),ee.push({type:"tool-result",toolCallId:T.id,toolName:M.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:T.status||"completed"}});break}case"file_search_call":{ee.push({type:"tool-call",toolCallId:T.id,toolName:M.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),ee.push({type:"tool-result",toolCallId:T.id,toolName:M.toCustomToolName("file_search"),result:{queries:T.queries,results:(h=(w=T.results)==null?void 0:w.map(pe=>({attributes:pe.attributes,fileId:pe.file_id,filename:pe.filename,score:pe.score,text:pe.text})))!=null?h:null}});break}case"code_interpreter_call":{ee.push({type:"tool-call",toolCallId:T.id,toolName:M.toCustomToolName("code_interpreter"),input:JSON.stringify({code:T.code,containerId:T.container_id}),providerExecuted:!0}),ee.push({type:"tool-result",toolCallId:T.id,toolName:M.toCustomToolName("code_interpreter"),result:{outputs:T.outputs}});break}case"apply_patch_call":{ee.push({type:"tool-call",toolCallId:T.call_id,toolName:M.toCustomToolName("apply_patch"),input:JSON.stringify({callId:T.call_id,operation:T.operation}),providerMetadata:{[q]:{itemId:T.id}}});break}}let V={[q]:{responseId:P.id,...he.length>0?{logprobs:he}:{},...typeof P.service_tier=="string"?{serviceTier:P.service_tier}:{}}},Ae=P.usage;return{content:ee,finishReason:{unified:Qw({finishReason:(I=P.incomplete_details)==null?void 0:I.reason,hasFunctionCall:fe}),raw:(U=(j=P.incomplete_details)==null?void 0:j.reason)!=null?U:void 0},usage:Yw(Ae),request:{body:F},response:{id:P.id,timestamp:new Date(P.created_at*1e3),modelId:P.model,headers:te,body:se},providerMetadata:V,warnings:Z}}async doStream(e){let{args:t,warnings:r,webSearchToolName:o,toolNameMapping:n,store:i,providerOptionsName:s}=await this.getArgs(e),{responseHeaders:l,value:d}=await we({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:{...t,stream:!0},failedResponseHandler:Sr,successfulResponseHandler:Nt(ZR),abortSignal:e.abortSignal,fetch:this.config.fetch}),u=this,m=tS(e.prompt),c=new Map,p={unified:"other",raw:void 0},f,v=[],g=null,y={},S=[],b=!1,_={},k;return{stream:d.pipeThrough(new TransformStream({start(w){w.enqueue({type:"stream-start",warnings:r})},transform(w,h){var I,j,U,F,Z,L,M,q,C,E,te,P,se,ee,he,fe,V,Ae,T,pe,de,H,le,R,D,Q,B,G,Me,sr;if(e.includeRawChunks&&h.enqueue({type:"raw",rawValue:w.rawValue}),!w.success){p={unified:"error",raw:void 0},h.enqueue({type:"error",error:w.error});return}let x=w.value;if(rS(x)){if(x.item.type==="function_call")y[x.output_index]={toolName:x.item.name,toolCallId:x.item.call_id},h.enqueue({type:"tool-input-start",id:x.item.call_id,toolName:x.item.name});else if(x.item.type==="web_search_call")y[x.output_index]={toolName:n.toCustomToolName(o!=null?o:"web_search"),toolCallId:x.item.id},h.enqueue({type:"tool-input-start",id:x.item.id,toolName:n.toCustomToolName(o!=null?o:"web_search"),providerExecuted:!0}),h.enqueue({type:"tool-input-end",id:x.item.id}),h.enqueue({type:"tool-call",toolCallId:x.item.id,toolName:n.toCustomToolName(o!=null?o:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if(x.item.type==="computer_call")y[x.output_index]={toolName:n.toCustomToolName("computer_use"),toolCallId:x.item.id},h.enqueue({type:"tool-input-start",id:x.item.id,toolName:n.toCustomToolName("computer_use"),providerExecuted:!0});else if(x.item.type==="code_interpreter_call")y[x.output_index]={toolName:n.toCustomToolName("code_interpreter"),toolCallId:x.item.id,codeInterpreter:{containerId:x.item.container_id}},h.enqueue({type:"tool-input-start",id:x.item.id,toolName:n.toCustomToolName("code_interpreter"),providerExecuted:!0}),h.enqueue({type:"tool-input-delta",id:x.item.id,delta:`{"containerId":"${x.item.container_id}","code":"`});else if(x.item.type==="file_search_call")h.enqueue({type:"tool-call",toolCallId:x.item.id,toolName:n.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if(x.item.type==="image_generation_call")h.enqueue({type:"tool-call",toolCallId:x.item.id,toolName:n.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if(!(x.item.type==="mcp_call"||x.item.type==="mcp_list_tools"||x.item.type==="mcp_approval_request"))if(x.item.type==="apply_patch_call"){let{call_id:ue,operation:Oe}=x.item;if(y[x.output_index]={toolName:n.toCustomToolName("apply_patch"),toolCallId:ue,applyPatch:{hasDiff:Oe.type==="delete_file",endEmitted:Oe.type==="delete_file"}},h.enqueue({type:"tool-input-start",id:ue,toolName:n.toCustomToolName("apply_patch")}),Oe.type==="delete_file"){let De=JSON.stringify({callId:ue,operation:Oe});h.enqueue({type:"tool-input-delta",id:ue,delta:De}),h.enqueue({type:"tool-input-end",id:ue})}else h.enqueue({type:"tool-input-delta",id:ue,delta:`{"callId":"${lo(ue)}","operation":{"type":"${lo(Oe.type)}","path":"${lo(Oe.path)}","diff":"`})}else x.item.type==="shell_call"?y[x.output_index]={toolName:n.toCustomToolName("shell"),toolCallId:x.item.call_id}:x.item.type==="message"?(S.splice(0,S.length),h.enqueue({type:"text-start",id:x.item.id,providerMetadata:{[s]:{itemId:x.item.id}}})):rS(x)&&x.item.type==="reasoning"&&(_[x.item.id]={encryptedContent:x.item.encrypted_content,summaryParts:{0:"active"}},h.enqueue({type:"reasoning-start",id:`${x.item.id}:0`,providerMetadata:{[s]:{itemId:x.item.id,reasoningEncryptedContent:(I=x.item.encrypted_content)!=null?I:null}}}))}else if(WR(x)){if(x.item.type==="message")h.enqueue({type:"text-end",id:x.item.id,providerMetadata:{[s]:{itemId:x.item.id,...S.length>0&&{annotations:S}}}});else if(x.item.type==="function_call")y[x.output_index]=void 0,b=!0,h.enqueue({type:"tool-input-end",id:x.item.call_id}),h.enqueue({type:"tool-call",toolCallId:x.item.call_id,toolName:x.item.name,input:x.item.arguments,providerMetadata:{[s]:{itemId:x.item.id}}});else if(x.item.type==="web_search_call")y[x.output_index]=void 0,h.enqueue({type:"tool-result",toolCallId:x.item.id,toolName:n.toCustomToolName(o!=null?o:"web_search"),result:nS(x.item.action)});else if(x.item.type==="computer_call")y[x.output_index]=void 0,h.enqueue({type:"tool-input-end",id:x.item.id}),h.enqueue({type:"tool-call",toolCallId:x.item.id,toolName:n.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),h.enqueue({type:"tool-result",toolCallId:x.item.id,toolName:n.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:x.item.status||"completed"}});else if(x.item.type==="file_search_call")y[x.output_index]=void 0,h.enqueue({type:"tool-result",toolCallId:x.item.id,toolName:n.toCustomToolName("file_search"),result:{queries:x.item.queries,results:(U=(j=x.item.results)==null?void 0:j.map(ue=>({attributes:ue.attributes,fileId:ue.file_id,filename:ue.filename,score:ue.score,text:ue.text})))!=null?U:null}});else if(x.item.type==="code_interpreter_call")y[x.output_index]=void 0,h.enqueue({type:"tool-result",toolCallId:x.item.id,toolName:n.toCustomToolName("code_interpreter"),result:{outputs:x.item.outputs}});else if(x.item.type==="image_generation_call")h.enqueue({type:"tool-result",toolCallId:x.item.id,toolName:n.toCustomToolName("image_generation"),result:{result:x.item.result}});else if(x.item.type==="mcp_call"){y[x.output_index]=void 0;let ue=(F=x.item.approval_request_id)!=null?F:void 0,Oe=ue!=null&&(L=(Z=c.get(ue))!=null?Z:m[ue])!=null?L:x.item.id,De=`mcp.${x.item.name}`;h.enqueue({type:"tool-call",toolCallId:Oe,toolName:De,input:x.item.arguments,providerExecuted:!0,dynamic:!0}),h.enqueue({type:"tool-result",toolCallId:Oe,toolName:De,result:{type:"call",serverLabel:x.item.server_label,name:x.item.name,arguments:x.item.arguments,...x.item.output!=null?{output:x.item.output}:{},...x.item.error!=null?{error:x.item.error}:{}},providerMetadata:{[s]:{itemId:x.item.id}}})}else if(x.item.type==="mcp_list_tools")y[x.output_index]=void 0;else if(x.item.type==="apply_patch_call"){let ue=y[x.output_index];ue!=null&&ue.applyPatch&&!ue.applyPatch.endEmitted&&x.item.operation.type!=="delete_file"&&(ue.applyPatch.hasDiff||h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:lo(x.item.operation.diff)}),h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:'"}}'}),h.enqueue({type:"tool-input-end",id:ue.toolCallId}),ue.applyPatch.endEmitted=!0),ue&&x.item.status==="completed"&&h.enqueue({type:"tool-call",toolCallId:ue.toolCallId,toolName:n.toCustomToolName("apply_patch"),input:JSON.stringify({callId:x.item.call_id,operation:x.item.operation}),providerMetadata:{[s]:{itemId:x.item.id}}}),y[x.output_index]=void 0}else if(x.item.type==="mcp_approval_request"){y[x.output_index]=void 0;let ue=(C=(q=(M=u.config).generateId)==null?void 0:q.call(M))!=null?C:Fe(),Oe=(E=x.item.approval_request_id)!=null?E:x.item.id;c.set(Oe,ue);let De=`mcp.${x.item.name}`;h.enqueue({type:"tool-call",toolCallId:ue,toolName:De,input:x.item.arguments,providerExecuted:!0,dynamic:!0}),h.enqueue({type:"tool-approval-request",approvalId:Oe,toolCallId:ue})}else if(x.item.type==="local_shell_call")y[x.output_index]=void 0,h.enqueue({type:"tool-call",toolCallId:x.item.call_id,toolName:n.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:x.item.action.command,timeoutMs:x.item.action.timeout_ms,user:x.item.action.user,workingDirectory:x.item.action.working_directory,env:x.item.action.env}}),providerMetadata:{[s]:{itemId:x.item.id}}});else if(x.item.type==="shell_call")y[x.output_index]=void 0,h.enqueue({type:"tool-call",toolCallId:x.item.call_id,toolName:n.toCustomToolName("shell"),input:JSON.stringify({action:{commands:x.item.action.commands}}),providerMetadata:{[s]:{itemId:x.item.id}}});else if(x.item.type==="reasoning"){let ue=_[x.item.id],Oe=Object.entries(ue.summaryParts).filter(([De,at])=>at==="active"||at==="can-conclude").map(([De])=>De);for(let De of Oe)h.enqueue({type:"reasoning-end",id:`${x.item.id}:${De}`,providerMetadata:{[s]:{itemId:x.item.id,reasoningEncryptedContent:(te=x.item.encrypted_content)!=null?te:null}}});delete _[x.item.id]}}else if(XR(x)){let ue=y[x.output_index];ue!=null&&h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:x.delta})}else if(rM(x)){let ue=y[x.output_index];ue!=null&&ue.applyPatch&&(h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:lo(x.delta)}),ue.applyPatch.hasDiff=!0)}else if(nM(x)){let ue=y[x.output_index];ue!=null&&ue.applyPatch&&!ue.applyPatch.endEmitted&&(ue.applyPatch.hasDiff||(h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:lo(x.diff)}),ue.applyPatch.hasDiff=!0),h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:'"}}'}),h.enqueue({type:"tool-input-end",id:ue.toolCallId}),ue.applyPatch.endEmitted=!0)}else if(QR(x))h.enqueue({type:"tool-result",toolCallId:x.item_id,toolName:n.toCustomToolName("image_generation"),result:{result:x.partial_image_b64},preliminary:!0});else if(eM(x)){let ue=y[x.output_index];ue!=null&&h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:lo(x.delta)})}else if(tM(x)){let ue=y[x.output_index];ue!=null&&(h.enqueue({type:"tool-input-delta",id:ue.toolCallId,delta:'"}'}),h.enqueue({type:"tool-input-end",id:ue.toolCallId}),h.enqueue({type:"tool-call",toolCallId:ue.toolCallId,toolName:n.toCustomToolName("code_interpreter"),input:JSON.stringify({code:x.code,containerId:ue.codeInterpreter.containerId}),providerExecuted:!0}))}else if(YR(x))g=x.response.id,h.enqueue({type:"response-metadata",id:x.response.id,timestamp:new Date(x.response.created_at*1e3),modelId:x.response.model});else if(JR(x))h.enqueue({type:"text-delta",id:x.item_id,delta:x.delta}),(se=(P=e.providerOptions)==null?void 0:P[s])!=null&&se.logprobs&&x.logprobs&&v.push(x.logprobs);else if(x.type==="response.reasoning_summary_part.added"){if(x.summary_index>0){let ue=_[x.item_id];ue.summaryParts[x.summary_index]="active";for(let Oe of Object.keys(ue.summaryParts))ue.summaryParts[Oe]==="can-conclude"&&(h.enqueue({type:"reasoning-end",id:`${x.item_id}:${Oe}`,providerMetadata:{[s]:{itemId:x.item_id}}}),ue.summaryParts[Oe]="concluded");h.enqueue({type:"reasoning-start",id:`${x.item_id}:${x.summary_index}`,providerMetadata:{[s]:{itemId:x.item_id,reasoningEncryptedContent:(he=(ee=_[x.item_id])==null?void 0:ee.encryptedContent)!=null?he:null}}})}}else x.type==="response.reasoning_summary_text.delta"?h.enqueue({type:"reasoning-delta",id:`${x.item_id}:${x.summary_index}`,delta:x.delta,providerMetadata:{[s]:{itemId:x.item_id}}}):x.type==="response.reasoning_summary_part.done"?i?(h.enqueue({type:"reasoning-end",id:`${x.item_id}:${x.summary_index}`,providerMetadata:{[s]:{itemId:x.item_id}}}),_[x.item_id].summaryParts[x.summary_index]="concluded"):_[x.item_id].summaryParts[x.summary_index]="can-conclude":KR(x)?(p={unified:Qw({finishReason:(fe=x.response.incomplete_details)==null?void 0:fe.reason,hasFunctionCall:b}),raw:(Ae=(V=x.response.incomplete_details)==null?void 0:V.reason)!=null?Ae:void 0},f=x.response.usage,typeof x.response.service_tier=="string"&&(k=x.response.service_tier)):oM(x)?(S.push(x.annotation),x.annotation.type==="url_citation"?h.enqueue({type:"source",sourceType:"url",id:(de=(pe=(T=u.config).generateId)==null?void 0:pe.call(T))!=null?de:Fe(),url:x.annotation.url,title:x.annotation.title}):x.annotation.type==="file_citation"?h.enqueue({type:"source",sourceType:"document",id:(R=(le=(H=u.config).generateId)==null?void 0:le.call(H))!=null?R:Fe(),mediaType:"text/plain",title:x.annotation.filename,filename:x.annotation.filename,providerMetadata:{[s]:{type:x.annotation.type,fileId:x.annotation.file_id,index:x.annotation.index}}}):x.annotation.type==="container_file_citation"?h.enqueue({type:"source",sourceType:"document",id:(B=(Q=(D=u.config).generateId)==null?void 0:Q.call(D))!=null?B:Fe(),mediaType:"text/plain",title:x.annotation.filename,filename:x.annotation.filename,providerMetadata:{[s]:{type:x.annotation.type,fileId:x.annotation.file_id,containerId:x.annotation.container_id}}}):x.annotation.type==="file_path"&&h.enqueue({type:"source",sourceType:"document",id:(sr=(Me=(G=u.config).generateId)==null?void 0:Me.call(G))!=null?sr:Fe(),mediaType:"application/octet-stream",title:x.annotation.file_id,filename:x.annotation.file_id,providerMetadata:{[s]:{type:x.annotation.type,fileId:x.annotation.file_id,index:x.annotation.index}}})):aM(x)&&h.enqueue({type:"error",error:x})},flush(w){let h={[s]:{responseId:g,...v.length>0?{logprobs:v}:{},...k!==void 0?{serviceTier:k}:{}}};w.enqueue({type:"finish",finishReason:p,usage:Yw(f),providerMetadata:h})}})),request:{body:t},response:{headers:l}}}};function JR(e){return e.type==="response.output_text.delta"}function WR(e){return e.type==="response.output_item.done"}function KR(e){return e.type==="response.completed"||e.type==="response.incomplete"}function YR(e){return e.type==="response.created"}function XR(e){return e.type==="response.function_call_arguments.delta"}function QR(e){return e.type==="response.image_generation_call.partial_image"}function eM(e){return e.type==="response.code_interpreter_call_code.delta"}function tM(e){return e.type==="response.code_interpreter_call_code.done"}function rM(e){return e.type==="response.apply_patch_call_operation_diff.delta"}function nM(e){return e.type==="response.apply_patch_call_operation_diff.done"}function rS(e){return e.type==="response.output_item.added"}function oM(e){return e.type==="response.output_text.annotation.added"}function aM(e){return e.type==="error"}function nS(e){var t;switch(e.type){case"search":return{action:{type:"search",query:(t=e.query)!=null?t:void 0},...e.sources!=null&&{sources:e.sources}};case"open_page":return{action:{type:"openPage",url:e.url}};case"find_in_page":return{action:{type:"findInPage",url:e.url,pattern:e.pattern}}}}function lo(e){return JSON.stringify(e).slice(1,-1)}var iM=O(()=>A(a.object({instructions:a.string().nullish(),speed:a.number().min(.25).max(4).default(1).nullish()}))),sM=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:e,voice:t="alloy",outputFormat:r="mp3",speed:o,instructions:n,language:i,providerOptions:s}){let l=[],d=await Ee({provider:"openai",providerOptions:s,schema:iM}),u={model:this.modelId,input:e,voice:t,response_format:"mp3",speed:o,instructions:n};if(r&&(["mp3","opus","aac","flac","wav","pcm"].includes(r)?u.response_format=r:l.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${r}. Using mp3 instead.`})),d){let m={};for(let c in m){let p=m[c];p!==void 0&&(u[c]=p)}}return i&&l.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${i}" was ignored.`}),{requestBody:u,warnings:l}}async doGenerate(e){var t,r,o;let n=(o=(r=(t=this.config._internal)==null?void 0:t.currentDate)==null?void 0:r.call(t))!=null?o:new Date,{requestBody:i,warnings:s}=await this.getArgs(e),{value:l,responseHeaders:d,rawValue:u}=await we({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:i,failedResponseHandler:Sr,successfulResponseHandler:qw(),abortSignal:e.abortSignal,fetch:this.config.fetch});return{audio:l,warnings:s,request:{body:JSON.stringify(i)},response:{timestamp:n,modelId:this.modelId,headers:d,body:u}}}},lM=O(()=>A(a.object({text:a.string(),language:a.string().nullish(),duration:a.number().nullish(),words:a.array(a.object({word:a.string(),start:a.number(),end:a.number()})).nullish(),segments:a.array(a.object({id:a.number(),seek:a.number(),start:a.number(),end:a.number(),text:a.string(),tokens:a.array(a.number()),temperature:a.number(),avg_logprob:a.number(),compression_ratio:a.number(),no_speech_prob:a.number()})).nullish()}))),uM=O(()=>A(a.object({include:a.array(a.string()).optional(),language:a.string().optional(),prompt:a.string().optional(),temperature:a.number().min(0).max(1).default(0).optional(),timestampGranularities:a.array(a.enum(["word","segment"])).default(["segment"]).optional()}))),oS={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},cM=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:e,mediaType:t,providerOptions:r}){let o=[],n=await Ee({provider:"openai",providerOptions:r,schema:uM}),i=new FormData,s=e instanceof Uint8Array?new Blob([e]):new Blob([ar(e)]);i.append("model",this.modelId);let l=Nw(t);if(i.append("file",new File([s],"audio",{type:t}),`audio.${l}`),n){let d={include:n.include,language:n.language,prompt:n.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:n.temperature,timestamp_granularities:n.timestampGranularities};for(let[u,m]of Object.entries(d))if(m!=null)if(Array.isArray(m))for(let c of m)i.append(`${u}[]`,String(c));else i.append(u,String(m))}return{formData:i,warnings:o}}async doGenerate(e){var t,r,o,n,i,s,l,d;let u=(o=(r=(t=this.config._internal)==null?void 0:t.currentDate)==null?void 0:r.call(t))!=null?o:new Date,{formData:m,warnings:c}=await this.getArgs(e),{value:p,responseHeaders:f,rawValue:v}=await ba({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),formData:m,failedResponseHandler:Sr,successfulResponseHandler:ke(lM),abortSignal:e.abortSignal,fetch:this.config.fetch}),g=p.language!=null&&p.language in oS?oS[p.language]:void 0;return{text:p.text,segments:(l=(s=(n=p.segments)==null?void 0:n.map(y=>({text:y.text,startSecond:y.start,endSecond:y.end})))!=null?s:(i=p.words)==null?void 0:i.map(y=>({text:y.word,startSecond:y.start,endSecond:y.end})))!=null?l:[],language:g,durationInSeconds:(d=p.duration)!=null?d:void 0,warnings:c,response:{timestamp:u,modelId:this.modelId,headers:f,body:v}}}},dM="3.0.26";function dh(e={}){var t,r;let o=(t=Vr(cn({settingValue:e.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?t:"https://api.openai.com/v1",n=(r=e.name)!=null?r:"openai",i=()=>Ct({Authorization:`Bearer ${ya({apiKey:e.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":e.organization,"OpenAI-Project":e.project,...e.headers},`ai-sdk/openai/${dM}`),s=g=>new KO(g,{provider:`${n}.chat`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch}),l=g=>new eR(g,{provider:`${n}.completion`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch}),d=g=>new nR(g,{provider:`${n}.embedding`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch}),u=g=>new sR(g,{provider:`${n}.image`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch}),m=g=>new cM(g,{provider:`${n}.transcription`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch}),c=g=>new sM(g,{provider:`${n}.speech`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch}),p=g=>{if(new.target)throw new Error("The OpenAI model function cannot be called with the new keyword.");return f(g)},f=g=>new BR(g,{provider:`${n}.responses`,url:({path:y})=>`${o}${y}`,headers:i,fetch:e.fetch,fileIdPrefixes:["file-"]}),v=function(g){return p(g)};return v.specificationVersion="v3",v.languageModel=p,v.chat=s,v.completion=l,v.responses=f,v.embedding=d,v.embeddingModel=d,v.textEmbedding=d,v.textEmbeddingModel=d,v.image=u,v.imageModel=u,v.transcription=m,v.transcriptionModel=m,v.speech=c,v.speechModel=c,v.tools=FR,v}var R5=dh();var pM=a.object({error:a.object({message:a.string(),type:a.string().nullish(),param:a.any().nullish(),code:a.union([a.string(),a.number()]).nullish()})}),ji={errorSchema:pM,errorToMessage:e=>e.error.message};function gS(e){var t,r,o,n,i,s;if(e==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let l=(t=e.prompt_tokens)!=null?t:0,d=(r=e.completion_tokens)!=null?r:0,u=(n=(o=e.prompt_tokens_details)==null?void 0:o.cached_tokens)!=null?n:0,m=(s=(i=e.completion_tokens_details)==null?void 0:i.reasoning_tokens)!=null?s:0;return{inputTokens:{total:l,noCache:l-u,cacheRead:u,cacheWrite:void 0},outputTokens:{total:d,text:d-m,reasoning:m},raw:e}}function Ni(e){var t,r;return(r=(t=e==null?void 0:e.providerOptions)==null?void 0:t.openaiCompatible)!=null?r:{}}function mM(e){switch(e){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function fM(e){var t,r,o;let n=[];for(let{role:i,content:s,...l}of e){let d=Ni({...l});switch(i){case"system":{n.push({role:"system",content:s,...d});break}case"user":{if(s.length===1&&s[0].type==="text"){n.push({role:"user",content:s[0].text,...Ni(s[0])});break}n.push({role:"user",content:s.map(u=>{var m;let c=Ni(u);switch(u.type){case"text":return{type:"text",text:u.text,...c};case"file":{if(u.mediaType.startsWith("image/")){let p=u.mediaType==="image/*"?"image/jpeg":u.mediaType;return{type:"image_url",image_url:{url:u.data instanceof URL?u.data.toString():`data:${p};base64,${kt(u.data)}`},...c}}if(u.mediaType.startsWith("audio/")){if(u.data instanceof URL)throw new Re({functionality:"audio file parts with URLs"});let p=mM(u.mediaType);if(p===null)throw new Re({functionality:`audio media type ${u.mediaType}`});return{type:"input_audio",input_audio:{data:kt(u.data),format:p},...c}}if(u.mediaType==="application/pdf"){if(u.data instanceof URL)throw new Re({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(m=u.filename)!=null?m:"document.pdf",file_data:`data:application/pdf;base64,${kt(u.data)}`},...c}}if(u.mediaType.startsWith("text/"))return{type:"text",text:u.data instanceof URL?u.data.toString():typeof u.data=="string"?u.data:new TextDecoder().decode(u.data),...c};throw new Re({functionality:`file part media type ${u.mediaType}`})}}}),...d});break}case"assistant":{let u="",m="",c=[];for(let p of s){let f=Ni(p);switch(p.type){case"text":{u+=p.text;break}case"reasoning":{m+=p.text;break}case"tool-call":{let v=(r=(t=p.providerOptions)==null?void 0:t.google)==null?void 0:r.thoughtSignature;c.push({id:p.toolCallId,type:"function",function:{name:p.toolName,arguments:JSON.stringify(p.input)},...f,...v?{extra_content:{google:{thought_signature:String(v)}}}:{}});break}}}n.push({role:"assistant",content:u,...m.length>0?{reasoning_content:m}:{},tool_calls:c.length>0?c:void 0,...d});break}case"tool":{for(let u of s){if(u.type==="tool-approval-response")continue;let m=u.output,c;switch(m.type){case"text":case"error-text":c=m.value;break;case"execution-denied":c=(o=m.reason)!=null?o:"Tool execution denied.";break;case"content":case"json":case"error-json":c=JSON.stringify(m.value);break}let p=Ni(u);n.push({role:"tool",tool_call_id:u.toolCallId,content:c,...p})}break}default:{let u=i;throw new Error(`Unsupported role: ${u}`)}}}return n}function hS({id:e,model:t,created:r}){return{id:e!=null?e:void 0,modelId:t!=null?t:void 0,timestamp:r!=null?new Date(r*1e3):void 0}}function vS(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bu=a.object({user:a.string().optional(),reasoningEffort:a.string().optional(),textVerbosity:a.string().optional(),strictJsonSchema:a.boolean().optional()});function gM({tools:e,toolChoice:t}){e=e!=null&&e.length?e:void 0;let r=[];if(e==null)return{tools:void 0,toolChoice:void 0,toolWarnings:r};let o=[];for(let i of e)i.type==="provider"?r.push({type:"unsupported",feature:`provider-defined tool ${i.id}`}):o.push({type:"function",function:{name:i.name,description:i.description,parameters:i.inputSchema,...i.strict!=null?{strict:i.strict}:{}}});if(t==null)return{tools:o,toolChoice:void 0,toolWarnings:r};let n=t.type;switch(n){case"auto":case"none":case"required":return{tools:o,toolChoice:n,toolWarnings:r};case"tool":return{tools:o,toolChoice:{type:"function",function:{name:t.toolName}},toolWarnings:r};default:{let i=n;throw new Re({functionality:`tool choice type: ${i}`})}}}var hM=class{constructor(e,t){this.specificationVersion="v3";var r,o;this.modelId=e,this.config=t;let n=(r=t.errorStructure)!=null?r:ji;this.chunkSchema=_M(n.errorSchema),this.failedResponseHandler=ot(n),this.supportsStructuredOutputs=(o=t.supportsStructuredOutputs)!=null?o:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var e,t,r;return(r=(t=(e=this.config).supportedUrls)==null?void 0:t.call(e))!=null?r:{}}transformRequestBody(e){var t,r,o;return(o=(r=(t=this.config).transformRequestBody)==null?void 0:r.call(t,e))!=null?o:e}async getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,topK:n,frequencyPenalty:i,presencePenalty:s,providerOptions:l,stopSequences:d,responseFormat:u,seed:m,toolChoice:c,tools:p}){var f,v,g,y,S;let b=[],_=await Ee({provider:"openai-compatible",providerOptions:l,schema:bu});_!=null&&b.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let k=Object.assign(_!=null?_:{},(f=await Ee({provider:"openaiCompatible",providerOptions:l,schema:bu}))!=null?f:{},(v=await Ee({provider:this.providerOptionsName,providerOptions:l,schema:bu}))!=null?v:{}),w=(g=k==null?void 0:k.strictJsonSchema)!=null?g:!0;n!=null&&b.push({type:"unsupported",feature:"topK"}),(u==null?void 0:u.type)==="json"&&u.schema!=null&&!this.supportsStructuredOutputs&&b.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:h,toolChoice:I,toolWarnings:j}=gM({tools:p,toolChoice:c});return{args:{model:this.modelId,user:k.user,max_tokens:t,temperature:r,top_p:o,frequency_penalty:i,presence_penalty:s,response_format:(u==null?void 0:u.type)==="json"?this.supportsStructuredOutputs===!0&&u.schema!=null?{type:"json_schema",json_schema:{schema:u.schema,strict:w,name:(y=u.name)!=null?y:"response",description:u.description}}:{type:"json_object"}:void 0,stop:d,seed:m,...Object.fromEntries(Object.entries((S=l==null?void 0:l[this.providerOptionsName])!=null?S:{}).filter(([U])=>!Object.keys(bu.shape).includes(U))),reasoning_effort:k.reasoningEffort,verbosity:k.textVerbosity,messages:fM(e),tools:h,tool_choice:I},warnings:[...b,...j]}}async doGenerate(e){var t,r,o,n,i,s,l,d;let{args:u,warnings:m}=await this.getArgs({...e}),c=this.transformRequestBody(u),p=JSON.stringify(c),{responseHeaders:f,value:v,rawValue:g}=await we({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:c,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:ke(vM),abortSignal:e.abortSignal,fetch:this.config.fetch}),y=v.choices[0],S=[],b=y.message.content;b!=null&&b.length>0&&S.push({type:"text",text:b});let _=(t=y.message.reasoning_content)!=null?t:y.message.reasoning;if(_!=null&&_.length>0&&S.push({type:"reasoning",text:_}),y.message.tool_calls!=null)for(let h of y.message.tool_calls){let I=(o=(r=h.extra_content)==null?void 0:r.google)==null?void 0:o.thought_signature;S.push({type:"tool-call",toolCallId:(n=h.id)!=null?n:Fe(),toolName:h.function.name,input:h.function.arguments,...I?{providerMetadata:{[this.providerOptionsName]:{thoughtSignature:I}}}:{}})}let k={[this.providerOptionsName]:{},...await((s=(i=this.config.metadataExtractor)==null?void 0:i.extractMetadata)==null?void 0:s.call(i,{parsedBody:g}))},w=(l=v.usage)==null?void 0:l.completion_tokens_details;return(w==null?void 0:w.accepted_prediction_tokens)!=null&&(k[this.providerOptionsName].acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens),(w==null?void 0:w.rejected_prediction_tokens)!=null&&(k[this.providerOptionsName].rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens),{content:S,finishReason:{unified:vS(y.finish_reason),raw:(d=y.finish_reason)!=null?d:void 0},usage:gS(v.usage),providerMetadata:k,request:{body:p},response:{...hS(v),headers:f,body:g},warnings:m}}async doStream(e){var t;let{args:r,warnings:o}=await this.getArgs({...e}),n=this.transformRequestBody({...r,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),i=(t=this.config.metadataExtractor)==null?void 0:t.createStreamExtractor(),{responseHeaders:s,value:l}=await we({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:n,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:Nt(this.chunkSchema),abortSignal:e.abortSignal,fetch:this.config.fetch}),d=[],u={unified:"other",raw:void 0},m,c=!0,p=this.providerOptionsName,f=!1,v=!1;return{stream:l.pipeThrough(new TransformStream({start(g){g.enqueue({type:"stream-start",warnings:o})},transform(g,y){var S,b,_,k,w,h,I,j,U,F,Z,L,M,q,C,E,te,P;if(e.includeRawChunks&&y.enqueue({type:"raw",rawValue:g.rawValue}),!g.success){u={unified:"error",raw:void 0},y.enqueue({type:"error",error:g.error});return}if(i==null||i.processChunk(g.rawValue),"error"in g.value){u={unified:"error",raw:void 0},y.enqueue({type:"error",error:g.value.error.message});return}let se=g.value;c&&(c=!1,y.enqueue({type:"response-metadata",...hS(se)})),se.usage!=null&&(m=se.usage);let ee=se.choices[0];if((ee==null?void 0:ee.finish_reason)!=null&&(u={unified:vS(ee.finish_reason),raw:(S=ee.finish_reason)!=null?S:void 0}),(ee==null?void 0:ee.delta)==null)return;let he=ee.delta,fe=(b=he.reasoning_content)!=null?b:he.reasoning;if(fe&&(f||(y.enqueue({type:"reasoning-start",id:"reasoning-0"}),f=!0),y.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:fe})),he.content&&(f&&(y.enqueue({type:"reasoning-end",id:"reasoning-0"}),f=!1),v||(y.enqueue({type:"text-start",id:"txt-0"}),v=!0),y.enqueue({type:"text-delta",id:"txt-0",delta:he.content})),he.tool_calls!=null){f&&(y.enqueue({type:"reasoning-end",id:"reasoning-0"}),f=!1);for(let V of he.tool_calls){let Ae=(_=V.index)!=null?_:d.length;if(d[Ae]==null){if(V.id==null)throw new Gn({data:V,message:"Expected 'id' to be a string."});if(((k=V.function)==null?void 0:k.name)==null)throw new Gn({data:V,message:"Expected 'function.name' to be a string."});y.enqueue({type:"tool-input-start",id:V.id,toolName:V.function.name}),d[Ae]={id:V.id,type:"function",function:{name:V.function.name,arguments:(w=V.function.arguments)!=null?w:""},hasFinished:!1,thoughtSignature:(j=(I=(h=V.extra_content)==null?void 0:h.google)==null?void 0:I.thought_signature)!=null?j:void 0};let pe=d[Ae];((U=pe.function)==null?void 0:U.name)!=null&&((F=pe.function)==null?void 0:F.arguments)!=null&&(pe.function.arguments.length>0&&y.enqueue({type:"tool-input-delta",id:pe.id,delta:pe.function.arguments}),_a(pe.function.arguments)&&(y.enqueue({type:"tool-input-end",id:pe.id}),y.enqueue({type:"tool-call",toolCallId:(Z=pe.id)!=null?Z:Fe(),toolName:pe.function.name,input:pe.function.arguments,...pe.thoughtSignature?{providerMetadata:{[p]:{thoughtSignature:pe.thoughtSignature}}}:{}}),pe.hasFinished=!0));continue}let T=d[Ae];T.hasFinished||(((L=V.function)==null?void 0:L.arguments)!=null&&(T.function.arguments+=(q=(M=V.function)==null?void 0:M.arguments)!=null?q:""),y.enqueue({type:"tool-input-delta",id:T.id,delta:(C=V.function.arguments)!=null?C:""}),((E=T.function)==null?void 0:E.name)!=null&&((te=T.function)==null?void 0:te.arguments)!=null&&_a(T.function.arguments)&&(y.enqueue({type:"tool-input-end",id:T.id}),y.enqueue({type:"tool-call",toolCallId:(P=T.id)!=null?P:Fe(),toolName:T.function.name,input:T.function.arguments,...T.thoughtSignature?{providerMetadata:{[p]:{thoughtSignature:T.thoughtSignature}}}:{}}),T.hasFinished=!0))}}},flush(g){var y,S,b,_,k;f&&g.enqueue({type:"reasoning-end",id:"reasoning-0"}),v&&g.enqueue({type:"text-end",id:"txt-0"});for(let h of d.filter(I=>!I.hasFinished))g.enqueue({type:"tool-input-end",id:h.id}),g.enqueue({type:"tool-call",toolCallId:(y=h.id)!=null?y:Fe(),toolName:h.function.name,input:h.function.arguments,...h.thoughtSignature?{providerMetadata:{[p]:{thoughtSignature:h.thoughtSignature}}}:{}});let w={[p]:{},...i==null?void 0:i.buildMetadata()};((S=m==null?void 0:m.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null&&(w[p].acceptedPredictionTokens=(b=m==null?void 0:m.completion_tokens_details)==null?void 0:b.accepted_prediction_tokens),((_=m==null?void 0:m.completion_tokens_details)==null?void 0:_.rejected_prediction_tokens)!=null&&(w[p].rejectedPredictionTokens=(k=m==null?void 0:m.completion_tokens_details)==null?void 0:k.rejected_prediction_tokens),g.enqueue({type:"finish",finishReason:u,usage:gS(m),providerMetadata:w})}})),request:{body:n},response:{headers:s}}}},SS=a.looseObject({prompt_tokens:a.number().nullish(),completion_tokens:a.number().nullish(),total_tokens:a.number().nullish(),prompt_tokens_details:a.object({cached_tokens:a.number().nullish()}).nullish(),completion_tokens_details:a.object({reasoning_tokens:a.number().nullish(),accepted_prediction_tokens:a.number().nullish(),rejected_prediction_tokens:a.number().nullish()}).nullish()}).nullish(),vM=a.looseObject({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({message:a.object({role:a.literal("assistant").nullish(),content:a.string().nullish(),reasoning_content:a.string().nullish(),reasoning:a.string().nullish(),tool_calls:a.array(a.object({id:a.string().nullish(),function:a.object({name:a.string(),arguments:a.string()}),extra_content:a.object({google:a.object({thought_signature:a.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:a.string().nullish()})),usage:SS}),yM=a.looseObject({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({delta:a.object({role:a.enum(["assistant"]).nullish(),content:a.string().nullish(),reasoning_content:a.string().nullish(),reasoning:a.string().nullish(),tool_calls:a.array(a.object({index:a.number().nullish(),id:a.string().nullish(),function:a.object({name:a.string().nullish(),arguments:a.string().nullish()}),extra_content:a.object({google:a.object({thought_signature:a.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:a.string().nullish()})),usage:SS}),_M=e=>a.union([yM,e]);function yS(e){var t,r;if(e==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let o=(t=e.prompt_tokens)!=null?t:0,n=(r=e.completion_tokens)!=null?r:0;return{inputTokens:{total:o,noCache:o,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:n,text:n,reasoning:void 0},raw:e}}function bM({prompt:e,user:t="user",assistant:r="assistant"}){let o="";e[0].role==="system"&&(o+=`${e[0].content} + +`,e=e.slice(1));for(let{role:n,content:i}of e)switch(n){case"system":throw new gr({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":{let s=i.map(l=>{if(l.type==="text")return l.text}).filter(Boolean).join("");o+=`${t}: +${s} + +`;break}case"assistant":{let s=i.map(l=>{switch(l.type){case"text":return l.text;case"tool-call":throw new Re({functionality:"tool-call messages"})}}).join("");o+=`${r}: +${s} + +`;break}case"tool":throw new Re({functionality:"tool messages"});default:{let s=n;throw new Error(`Unsupported role: ${s}`)}}return o+=`${r}: +`,{prompt:o,stopSequences:[` +${t}:`]}}function _S({id:e,model:t,created:r}){return{id:e!=null?e:void 0,modelId:t!=null?t:void 0,timestamp:r!=null?new Date(r*1e3):void 0}}function bS(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var xM=a.object({echo:a.boolean().optional(),logitBias:a.record(a.string(),a.number()).optional(),suffix:a.string().optional(),user:a.string().optional()}),wM=class{constructor(e,t){this.specificationVersion="v3";var r;this.modelId=e,this.config=t;let o=(r=t.errorStructure)!=null?r:ji;this.chunkSchema=kM(o.errorSchema),this.failedResponseHandler=ot(o)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var e,t,r;return(r=(t=(e=this.config).supportedUrls)==null?void 0:t.call(e))!=null?r:{}}async getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,topK:n,frequencyPenalty:i,presencePenalty:s,stopSequences:l,responseFormat:d,seed:u,providerOptions:m,tools:c,toolChoice:p}){var f;let v=[],g=(f=await Ee({provider:this.providerOptionsName,providerOptions:m,schema:xM}))!=null?f:{};n!=null&&v.push({type:"unsupported",feature:"topK"}),c!=null&&c.length&&v.push({type:"unsupported",feature:"tools"}),p!=null&&v.push({type:"unsupported",feature:"toolChoice"}),d!=null&&d.type!=="text"&&v.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:y,stopSequences:S}=bM({prompt:e}),b=[...S!=null?S:[],...l!=null?l:[]];return{args:{model:this.modelId,echo:g.echo,logit_bias:g.logitBias,suffix:g.suffix,user:g.user,max_tokens:t,temperature:r,top_p:o,frequency_penalty:i,presence_penalty:s,seed:u,...m==null?void 0:m[this.providerOptionsName],prompt:y,stop:b.length>0?b:void 0},warnings:v}}async doGenerate(e){let{args:t,warnings:r}=await this.getArgs(e),{responseHeaders:o,value:n,rawValue:i}=await we({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:t,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:ke(SM),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=n.choices[0],l=[];return s.text!=null&&s.text.length>0&&l.push({type:"text",text:s.text}),{content:l,usage:yS(n.usage),finishReason:{unified:bS(s.finish_reason),raw:s.finish_reason},request:{body:t},response:{..._S(n),headers:o,body:i},warnings:r}}async doStream(e){let{args:t,warnings:r}=await this.getArgs(e),o={...t,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:n,value:i}=await we({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:_e(this.config.headers(),e.headers),body:o,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:Nt(this.chunkSchema),abortSignal:e.abortSignal,fetch:this.config.fetch}),s={unified:"other",raw:void 0},l,d=!0;return{stream:i.pipeThrough(new TransformStream({start(u){u.enqueue({type:"stream-start",warnings:r})},transform(u,m){var c;if(e.includeRawChunks&&m.enqueue({type:"raw",rawValue:u.rawValue}),!u.success){s={unified:"error",raw:void 0},m.enqueue({type:"error",error:u.error});return}let p=u.value;if("error"in p){s={unified:"error",raw:void 0},m.enqueue({type:"error",error:p.error});return}d&&(d=!1,m.enqueue({type:"response-metadata",..._S(p)}),m.enqueue({type:"text-start",id:"0"})),p.usage!=null&&(l=p.usage);let f=p.choices[0];(f==null?void 0:f.finish_reason)!=null&&(s={unified:bS(f.finish_reason),raw:(c=f.finish_reason)!=null?c:void 0}),(f==null?void 0:f.text)!=null&&m.enqueue({type:"text-delta",id:"0",delta:f.text})},flush(u){d||u.enqueue({type:"text-end",id:"0"}),u.enqueue({type:"finish",finishReason:s,usage:yS(l)})}})),request:{body:o},response:{headers:n}}}},kS=a.object({prompt_tokens:a.number(),completion_tokens:a.number(),total_tokens:a.number()}),SM=a.object({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({text:a.string(),finish_reason:a.string()})),usage:kS.nullish()}),kM=e=>a.union([a.object({id:a.string().nullish(),created:a.number().nullish(),model:a.string().nullish(),choices:a.array(a.object({text:a.string(),finish_reason:a.string().nullish(),index:a.number()})),usage:kS.nullish()}),e]),ph=a.object({dimensions:a.number().optional(),user:a.string().optional()}),IM=class{constructor(e,t){this.specificationVersion="v3",this.modelId=e,this.config=t}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var e;return(e=this.config.maxEmbeddingsPerCall)!=null?e:2048}get supportsParallelCalls(){var e;return(e=this.config.supportsParallelCalls)!=null?e:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:e,headers:t,abortSignal:r,providerOptions:o}){var n,i,s;let l=[],d=await Ee({provider:"openai-compatible",providerOptions:o,schema:ph});d!=null&&l.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let u=Object.assign(d!=null?d:{},(n=await Ee({provider:"openaiCompatible",providerOptions:o,schema:ph}))!=null?n:{},(i=await Ee({provider:this.providerOptionsName,providerOptions:o,schema:ph}))!=null?i:{});if(e.length>this.maxEmbeddingsPerCall)throw new To({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});let{responseHeaders:m,value:c,rawValue:p}=await we({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:_e(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:u.dimensions,user:u.user},failedResponseHandler:ot((s=this.config.errorStructure)!=null?s:ji),successfulResponseHandler:ke(TM),abortSignal:r,fetch:this.config.fetch});return{warnings:l,embeddings:c.data.map(f=>f.embedding),usage:c.usage?{tokens:c.usage.prompt_tokens}:void 0,providerMetadata:c.providerMetadata,response:{headers:m,body:p}}}},TM=a.object({data:a.array(a.object({embedding:a.array(a.number())})),usage:a.object({prompt_tokens:a.number()}).nullish(),providerMetadata:a.record(a.string(),a.record(a.string(),a.any())).optional()}),$M=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(e){return{...e[this.providerOptionsKey],...e[EM(this.providerOptionsKey)]}}async doGenerate({prompt:e,n:t,size:r,aspectRatio:o,seed:n,providerOptions:i,headers:s,abortSignal:l,files:d,mask:u}){var m,c,p,f,v;let g=[];o!=null&&g.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."}),n!=null&&g.push({type:"unsupported",feature:"seed"});let y=(p=(c=(m=this.config._internal)==null?void 0:m.currentDate)==null?void 0:c.call(m))!=null?p:new Date,S=this.getArgs(i);if(d!=null&&d.length>0){let{value:k,responseHeaders:w}=await ba({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:_e(this.config.headers(),s),formData:vu({model:this.modelId,prompt:e,image:await Promise.all(d.map(h=>wS(h))),mask:u!=null?await wS(u):void 0,n:t,size:r,...S}),failedResponseHandler:ot((f=this.config.errorStructure)!=null?f:ji),successfulResponseHandler:ke(xS),abortSignal:l,fetch:this.config.fetch});return{images:k.data.map(h=>h.b64_json),warnings:g,response:{timestamp:y,modelId:this.modelId,headers:w}}}let{value:b,responseHeaders:_}=await we({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:_e(this.config.headers(),s),body:{model:this.modelId,prompt:e,n:t,size:r,...S,response_format:"b64_json"},failedResponseHandler:ot((v=this.config.errorStructure)!=null?v:ji),successfulResponseHandler:ke(xS),abortSignal:l,fetch:this.config.fetch});return{images:b.data.map(k=>k.b64_json),warnings:g,response:{timestamp:y,modelId:this.modelId,headers:_}}}},xS=a.object({data:a.array(a.object({b64_json:a.string()}))});async function wS(e){if(e.type==="url")return Oi(e.url);let t=e.data instanceof Uint8Array?e.data:ar(e.data);return new Blob([t],{type:e.mediaType})}function EM(e){return e.replace(/[_-]([a-z])/g,t=>t[1].toUpperCase())}var CM="2.0.28";function IS(e){let t=Vr(e.baseURL),r=e.name,o={...e.apiKey&&{Authorization:`Bearer ${e.apiKey}`},...e.headers},n=()=>Ct(o,`ai-sdk/openai-compatible/${CM}`),i=p=>({provider:`${r}.${p}`,url:({path:f})=>{let v=new URL(`${t}${f}`);return e.queryParams&&(v.search=new URLSearchParams(e.queryParams).toString()),v.toString()},headers:n,fetch:e.fetch}),s=p=>l(p),l=p=>new hM(p,{...i("chat"),includeUsage:e.includeUsage,supportsStructuredOutputs:e.supportsStructuredOutputs,transformRequestBody:e.transformRequestBody,metadataExtractor:e.metadataExtractor}),d=p=>new wM(p,{...i("completion"),includeUsage:e.includeUsage}),u=p=>new IM(p,{...i("embedding")}),m=p=>new $M(p,i("image")),c=p=>s(p);return c.specificationVersion="v3",c.languageModel=s,c.chatModel=l,c.completionModel=d,c.embeddingModel=u,c.textEmbeddingModel=u,c.imageModel=m,c}var AM="3.0.41",PM=O(()=>A(a.object({type:a.literal("error"),error:a.object({type:a.string(),message:a.string()})}))),TS=ot({errorSchema:PM,errorToMessage:e=>e.error.message}),OM=O(()=>A(a.object({type:a.literal("message"),id:a.string().nullish(),model:a.string().nullish(),content:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("text"),text:a.string(),citations:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("web_search_result_location"),cited_text:a.string(),url:a.string(),title:a.string(),encrypted_index:a.string()}),a.object({type:a.literal("page_location"),cited_text:a.string(),document_index:a.number(),document_title:a.string().nullable(),start_page_number:a.number(),end_page_number:a.number()}),a.object({type:a.literal("char_location"),cited_text:a.string(),document_index:a.number(),document_title:a.string().nullable(),start_char_index:a.number(),end_char_index:a.number()})])).optional()}),a.object({type:a.literal("thinking"),thinking:a.string(),signature:a.string()}),a.object({type:a.literal("redacted_thinking"),data:a.string()}),a.object({type:a.literal("compaction"),content:a.string()}),a.object({type:a.literal("tool_use"),id:a.string(),name:a.string(),input:a.unknown(),caller:a.union([a.object({type:a.literal("code_execution_20250825"),tool_id:a.string()}),a.object({type:a.literal("direct")})]).optional()}),a.object({type:a.literal("server_tool_use"),id:a.string(),name:a.string(),input:a.record(a.string(),a.unknown()).nullish()}),a.object({type:a.literal("mcp_tool_use"),id:a.string(),name:a.string(),input:a.unknown(),server_name:a.string()}),a.object({type:a.literal("mcp_tool_result"),tool_use_id:a.string(),is_error:a.boolean(),content:a.array(a.union([a.string(),a.object({type:a.literal("text"),text:a.string()})]))}),a.object({type:a.literal("web_fetch_tool_result"),tool_use_id:a.string(),content:a.union([a.object({type:a.literal("web_fetch_result"),url:a.string(),retrieved_at:a.string(),content:a.object({type:a.literal("document"),title:a.string().nullable(),citations:a.object({enabled:a.boolean()}).optional(),source:a.union([a.object({type:a.literal("base64"),media_type:a.literal("application/pdf"),data:a.string()}),a.object({type:a.literal("text"),media_type:a.literal("text/plain"),data:a.string()})])})}),a.object({type:a.literal("web_fetch_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("web_search_tool_result"),tool_use_id:a.string(),content:a.union([a.array(a.object({type:a.literal("web_search_result"),url:a.string(),title:a.string(),encrypted_content:a.string(),page_age:a.string().nullish()})),a.object({type:a.literal("web_search_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("code_execution_tool_result"),tool_use_id:a.string(),content:a.union([a.object({type:a.literal("code_execution_result"),stdout:a.string(),stderr:a.string(),return_code:a.number(),content:a.array(a.object({type:a.literal("code_execution_output"),file_id:a.string()})).optional().default([])}),a.object({type:a.literal("code_execution_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("bash_code_execution_tool_result"),tool_use_id:a.string(),content:a.discriminatedUnion("type",[a.object({type:a.literal("bash_code_execution_result"),content:a.array(a.object({type:a.literal("bash_code_execution_output"),file_id:a.string()})),stdout:a.string(),stderr:a.string(),return_code:a.number()}),a.object({type:a.literal("bash_code_execution_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("text_editor_code_execution_tool_result"),tool_use_id:a.string(),content:a.discriminatedUnion("type",[a.object({type:a.literal("text_editor_code_execution_tool_result_error"),error_code:a.string()}),a.object({type:a.literal("text_editor_code_execution_view_result"),content:a.string(),file_type:a.string(),num_lines:a.number().nullable(),start_line:a.number().nullable(),total_lines:a.number().nullable()}),a.object({type:a.literal("text_editor_code_execution_create_result"),is_file_update:a.boolean()}),a.object({type:a.literal("text_editor_code_execution_str_replace_result"),lines:a.array(a.string()).nullable(),new_lines:a.number().nullable(),new_start:a.number().nullable(),old_lines:a.number().nullable(),old_start:a.number().nullable()})])}),a.object({type:a.literal("tool_search_tool_result"),tool_use_id:a.string(),content:a.union([a.object({type:a.literal("tool_search_tool_search_result"),tool_references:a.array(a.object({type:a.literal("tool_reference"),tool_name:a.string()}))}),a.object({type:a.literal("tool_search_tool_result_error"),error_code:a.string()})])})])),stop_reason:a.string().nullish(),stop_sequence:a.string().nullish(),usage:a.looseObject({input_tokens:a.number(),output_tokens:a.number(),cache_creation_input_tokens:a.number().nullish(),cache_read_input_tokens:a.number().nullish(),iterations:a.array(a.object({type:a.union([a.literal("compaction"),a.literal("message")]),input_tokens:a.number(),output_tokens:a.number()})).nullish()}),container:a.object({expires_at:a.string(),id:a.string(),skills:a.array(a.object({type:a.union([a.literal("anthropic"),a.literal("custom")]),skill_id:a.string(),version:a.string()})).nullish()}).nullish(),context_management:a.object({applied_edits:a.array(a.union([a.object({type:a.literal("clear_tool_uses_20250919"),cleared_tool_uses:a.number(),cleared_input_tokens:a.number()}),a.object({type:a.literal("clear_thinking_20251015"),cleared_thinking_turns:a.number(),cleared_input_tokens:a.number()}),a.object({type:a.literal("compact_20260112")})]))}).nullish()}))),RM=O(()=>A(a.discriminatedUnion("type",[a.object({type:a.literal("message_start"),message:a.object({id:a.string().nullish(),model:a.string().nullish(),role:a.string().nullish(),usage:a.looseObject({input_tokens:a.number(),cache_creation_input_tokens:a.number().nullish(),cache_read_input_tokens:a.number().nullish()}),content:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("tool_use"),id:a.string(),name:a.string(),input:a.unknown(),caller:a.union([a.object({type:a.literal("code_execution_20250825"),tool_id:a.string()}),a.object({type:a.literal("direct")})]).optional()})])).nullish(),stop_reason:a.string().nullish(),container:a.object({expires_at:a.string(),id:a.string()}).nullish()})}),a.object({type:a.literal("content_block_start"),index:a.number(),content_block:a.discriminatedUnion("type",[a.object({type:a.literal("text"),text:a.string()}),a.object({type:a.literal("thinking"),thinking:a.string()}),a.object({type:a.literal("tool_use"),id:a.string(),name:a.string(),input:a.record(a.string(),a.unknown()).optional(),caller:a.union([a.object({type:a.literal("code_execution_20250825"),tool_id:a.string()}),a.object({type:a.literal("direct")})]).optional()}),a.object({type:a.literal("redacted_thinking"),data:a.string()}),a.object({type:a.literal("compaction"),content:a.string().nullish()}),a.object({type:a.literal("server_tool_use"),id:a.string(),name:a.string(),input:a.record(a.string(),a.unknown()).nullish()}),a.object({type:a.literal("mcp_tool_use"),id:a.string(),name:a.string(),input:a.unknown(),server_name:a.string()}),a.object({type:a.literal("mcp_tool_result"),tool_use_id:a.string(),is_error:a.boolean(),content:a.array(a.union([a.string(),a.object({type:a.literal("text"),text:a.string()})]))}),a.object({type:a.literal("web_fetch_tool_result"),tool_use_id:a.string(),content:a.union([a.object({type:a.literal("web_fetch_result"),url:a.string(),retrieved_at:a.string(),content:a.object({type:a.literal("document"),title:a.string().nullable(),citations:a.object({enabled:a.boolean()}).optional(),source:a.union([a.object({type:a.literal("base64"),media_type:a.literal("application/pdf"),data:a.string()}),a.object({type:a.literal("text"),media_type:a.literal("text/plain"),data:a.string()})])})}),a.object({type:a.literal("web_fetch_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("web_search_tool_result"),tool_use_id:a.string(),content:a.union([a.array(a.object({type:a.literal("web_search_result"),url:a.string(),title:a.string(),encrypted_content:a.string(),page_age:a.string().nullish()})),a.object({type:a.literal("web_search_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("code_execution_tool_result"),tool_use_id:a.string(),content:a.union([a.object({type:a.literal("code_execution_result"),stdout:a.string(),stderr:a.string(),return_code:a.number(),content:a.array(a.object({type:a.literal("code_execution_output"),file_id:a.string()})).optional().default([])}),a.object({type:a.literal("code_execution_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("bash_code_execution_tool_result"),tool_use_id:a.string(),content:a.discriminatedUnion("type",[a.object({type:a.literal("bash_code_execution_result"),content:a.array(a.object({type:a.literal("bash_code_execution_output"),file_id:a.string()})),stdout:a.string(),stderr:a.string(),return_code:a.number()}),a.object({type:a.literal("bash_code_execution_tool_result_error"),error_code:a.string()})])}),a.object({type:a.literal("text_editor_code_execution_tool_result"),tool_use_id:a.string(),content:a.discriminatedUnion("type",[a.object({type:a.literal("text_editor_code_execution_tool_result_error"),error_code:a.string()}),a.object({type:a.literal("text_editor_code_execution_view_result"),content:a.string(),file_type:a.string(),num_lines:a.number().nullable(),start_line:a.number().nullable(),total_lines:a.number().nullable()}),a.object({type:a.literal("text_editor_code_execution_create_result"),is_file_update:a.boolean()}),a.object({type:a.literal("text_editor_code_execution_str_replace_result"),lines:a.array(a.string()).nullable(),new_lines:a.number().nullable(),new_start:a.number().nullable(),old_lines:a.number().nullable(),old_start:a.number().nullable()})])}),a.object({type:a.literal("tool_search_tool_result"),tool_use_id:a.string(),content:a.union([a.object({type:a.literal("tool_search_tool_search_result"),tool_references:a.array(a.object({type:a.literal("tool_reference"),tool_name:a.string()}))}),a.object({type:a.literal("tool_search_tool_result_error"),error_code:a.string()})])})])}),a.object({type:a.literal("content_block_delta"),index:a.number(),delta:a.discriminatedUnion("type",[a.object({type:a.literal("input_json_delta"),partial_json:a.string()}),a.object({type:a.literal("text_delta"),text:a.string()}),a.object({type:a.literal("thinking_delta"),thinking:a.string()}),a.object({type:a.literal("signature_delta"),signature:a.string()}),a.object({type:a.literal("compaction_delta"),content:a.string()}),a.object({type:a.literal("citations_delta"),citation:a.discriminatedUnion("type",[a.object({type:a.literal("web_search_result_location"),cited_text:a.string(),url:a.string(),title:a.string(),encrypted_index:a.string()}),a.object({type:a.literal("page_location"),cited_text:a.string(),document_index:a.number(),document_title:a.string().nullable(),start_page_number:a.number(),end_page_number:a.number()}),a.object({type:a.literal("char_location"),cited_text:a.string(),document_index:a.number(),document_title:a.string().nullable(),start_char_index:a.number(),end_char_index:a.number()})])})])}),a.object({type:a.literal("content_block_stop"),index:a.number()}),a.object({type:a.literal("error"),error:a.object({type:a.string(),message:a.string()})}),a.object({type:a.literal("message_delta"),delta:a.object({stop_reason:a.string().nullish(),stop_sequence:a.string().nullish(),container:a.object({expires_at:a.string(),id:a.string(),skills:a.array(a.object({type:a.union([a.literal("anthropic"),a.literal("custom")]),skill_id:a.string(),version:a.string()})).nullish()}).nullish()}),usage:a.looseObject({input_tokens:a.number().nullish(),output_tokens:a.number(),cache_creation_input_tokens:a.number().nullish(),cache_read_input_tokens:a.number().nullish(),iterations:a.array(a.object({type:a.union([a.literal("compaction"),a.literal("message")]),input_tokens:a.number(),output_tokens:a.number()})).nullish()}),context_management:a.object({applied_edits:a.array(a.union([a.object({type:a.literal("clear_tool_uses_20250919"),cleared_tool_uses:a.number(),cleared_input_tokens:a.number()}),a.object({type:a.literal("clear_thinking_20251015"),cleared_thinking_turns:a.number(),cleared_input_tokens:a.number()}),a.object({type:a.literal("compact_20260112")})]))}).nullish()}),a.object({type:a.literal("message_stop")}),a.object({type:a.literal("ping")})]))),MM=O(()=>A(a.object({signature:a.string().optional(),redactedData:a.string().optional()}))),$S=a.object({citations:a.object({enabled:a.boolean()}).optional(),title:a.string().optional(),context:a.string().optional()}),ES=a.object({sendReasoning:a.boolean().optional(),structuredOutputMode:a.enum(["outputFormat","jsonTool","auto"]).optional(),thinking:a.discriminatedUnion("type",[a.object({type:a.literal("adaptive")}),a.object({type:a.literal("enabled"),budgetTokens:a.number().optional()}),a.object({type:a.literal("disabled")})]).optional(),disableParallelToolUse:a.boolean().optional(),cacheControl:a.object({type:a.literal("ephemeral"),ttl:a.union([a.literal("5m"),a.literal("1h")]).optional()}).optional(),mcpServers:a.array(a.object({type:a.literal("url"),name:a.string(),url:a.string(),authorizationToken:a.string().nullish(),toolConfiguration:a.object({enabled:a.boolean().nullish(),allowedTools:a.array(a.string()).nullish()}).nullish()})).optional(),container:a.object({id:a.string().optional(),skills:a.array(a.object({type:a.union([a.literal("anthropic"),a.literal("custom")]),skillId:a.string(),version:a.string().optional()})).optional()}).optional(),toolStreaming:a.boolean().optional(),effort:a.enum(["low","medium","high","max"]).optional(),speed:a.literal("fast").optional(),contextManagement:a.object({edits:a.array(a.discriminatedUnion("type",[a.object({type:a.literal("clear_tool_uses_20250919"),trigger:a.discriminatedUnion("type",[a.object({type:a.literal("input_tokens"),value:a.number()}),a.object({type:a.literal("tool_uses"),value:a.number()})]).optional(),keep:a.object({type:a.literal("tool_uses"),value:a.number()}).optional(),clearAtLeast:a.object({type:a.literal("input_tokens"),value:a.number()}).optional(),clearToolInputs:a.boolean().optional(),excludeTools:a.array(a.string()).optional()}),a.object({type:a.literal("clear_thinking_20251015"),keep:a.union([a.literal("all"),a.object({type:a.literal("thinking_turns"),value:a.number()})]).optional()}),a.object({type:a.literal("compact_20260112"),trigger:a.object({type:a.literal("input_tokens"),value:a.number()}).optional(),pauseAfterCompaction:a.boolean().optional(),instructions:a.string().optional()})]))}).optional()}),CS=4;function NM(e){var t;let r=e==null?void 0:e.anthropic;return(t=r==null?void 0:r.cacheControl)!=null?t:r==null?void 0:r.cache_control}var hh=class{constructor(){this.breakpointCount=0,this.warnings=[]}getCacheControl(e,t){let r=NM(e);if(r){if(!t.canCache){this.warnings.push({type:"unsupported",feature:"cache_control on non-cacheable context",details:`cache_control cannot be set on ${t.type}. It will be ignored.`});return}if(this.breakpointCount++,this.breakpointCount>CS){this.warnings.push({type:"unsupported",feature:"cacheControl breakpoint limit",details:`Maximum ${CS} cache breakpoints exceeded (found ${this.breakpointCount}). This breakpoint will be ignored.`});return}return r}}getWarnings(){return this.warnings}},jM=O(()=>A(a.object({maxCharacters:a.number().optional()}))),DM=O(()=>A(a.object({command:a.enum(["view","create","str_replace","insert"]),path:a.string(),file_text:a.string().optional(),insert_line:a.number().int().optional(),new_str:a.string().optional(),insert_text:a.string().optional(),old_str:a.string().optional(),view_range:a.array(a.number().int()).optional()}))),zM=Le({id:"anthropic.text_editor_20250728",inputSchema:DM}),UM=(e={})=>zM(e),FM=O(()=>A(a.object({maxUses:a.number().optional(),allowedDomains:a.array(a.string()).optional(),blockedDomains:a.array(a.string()).optional(),userLocation:a.object({type:a.literal("approximate"),city:a.string().optional(),region:a.string().optional(),country:a.string().optional(),timezone:a.string().optional()}).optional()}))),RS=O(()=>A(a.array(a.object({url:a.string(),title:a.string().nullable(),pageAge:a.string().nullable(),encryptedContent:a.string(),type:a.literal("web_search_result")})))),LM=O(()=>A(a.object({query:a.string()}))),qM=je({id:"anthropic.web_search_20250305",inputSchema:LM,outputSchema:RS,supportsDeferredResults:!0}),ZM=(e={})=>qM(e),VM=O(()=>A(a.object({maxUses:a.number().optional(),allowedDomains:a.array(a.string()).optional(),blockedDomains:a.array(a.string()).optional(),citations:a.object({enabled:a.boolean()}).optional(),maxContentTokens:a.number().optional()}))),MS=O(()=>A(a.object({type:a.literal("web_fetch_result"),url:a.string(),content:a.object({type:a.literal("document"),title:a.string().nullable(),citations:a.object({enabled:a.boolean()}).optional(),source:a.union([a.object({type:a.literal("base64"),mediaType:a.literal("application/pdf"),data:a.string()}),a.object({type:a.literal("text"),mediaType:a.literal("text/plain"),data:a.string()})])}),retrievedAt:a.string().nullable()}))),GM=O(()=>A(a.object({url:a.string()}))),HM=je({id:"anthropic.web_fetch_20250910",inputSchema:GM,outputSchema:MS,supportsDeferredResults:!0}),BM=(e={})=>HM(e);async function JM({tools:e,toolChoice:t,disableParallelToolUse:r,cacheControlValidator:o,supportsStructuredOutput:n}){var i;e=e!=null&&e.length?e:void 0;let s=[],l=new Set,d=o||new hh;if(e==null)return{tools:void 0,toolChoice:void 0,toolWarnings:s,betas:l};let u=[];for(let c of e)switch(c.type){case"function":{let p=d.getCacheControl(c.providerOptions,{type:"tool definition",canCache:!0}),f=(i=c.providerOptions)==null?void 0:i.anthropic,v=f==null?void 0:f.deferLoading,g=f==null?void 0:f.allowedCallers;u.push({name:c.name,description:c.description,input_schema:c.inputSchema,cache_control:p,...n===!0&&c.strict!=null?{strict:c.strict}:{},...v!=null?{defer_loading:v}:{},...g!=null?{allowed_callers:g}:{},...c.inputExamples!=null?{input_examples:c.inputExamples.map(y=>y.input)}:{}}),n===!0&&l.add("structured-outputs-2025-11-13"),(c.inputExamples!=null||g!=null)&&l.add("advanced-tool-use-2025-11-20");break}case"provider":{switch(c.id){case"anthropic.code_execution_20250522":{l.add("code-execution-2025-05-22"),u.push({type:"code_execution_20250522",name:"code_execution",cache_control:void 0});break}case"anthropic.code_execution_20250825":{l.add("code-execution-2025-08-25"),u.push({type:"code_execution_20250825",name:"code_execution"});break}case"anthropic.computer_20250124":{l.add("computer-use-2025-01-24"),u.push({name:"computer",type:"computer_20250124",display_width_px:c.args.displayWidthPx,display_height_px:c.args.displayHeightPx,display_number:c.args.displayNumber,cache_control:void 0});break}case"anthropic.computer_20251124":{l.add("computer-use-2025-11-24"),u.push({name:"computer",type:"computer_20251124",display_width_px:c.args.displayWidthPx,display_height_px:c.args.displayHeightPx,display_number:c.args.displayNumber,enable_zoom:c.args.enableZoom,cache_control:void 0});break}case"anthropic.computer_20241022":{l.add("computer-use-2024-10-22"),u.push({name:"computer",type:"computer_20241022",display_width_px:c.args.displayWidthPx,display_height_px:c.args.displayHeightPx,display_number:c.args.displayNumber,cache_control:void 0});break}case"anthropic.text_editor_20250124":{l.add("computer-use-2025-01-24"),u.push({name:"str_replace_editor",type:"text_editor_20250124",cache_control:void 0});break}case"anthropic.text_editor_20241022":{l.add("computer-use-2024-10-22"),u.push({name:"str_replace_editor",type:"text_editor_20241022",cache_control:void 0});break}case"anthropic.text_editor_20250429":{l.add("computer-use-2025-01-24"),u.push({name:"str_replace_based_edit_tool",type:"text_editor_20250429",cache_control:void 0});break}case"anthropic.text_editor_20250728":{let p=await Je({value:c.args,schema:jM});u.push({name:"str_replace_based_edit_tool",type:"text_editor_20250728",max_characters:p.maxCharacters,cache_control:void 0});break}case"anthropic.bash_20250124":{l.add("computer-use-2025-01-24"),u.push({name:"bash",type:"bash_20250124",cache_control:void 0});break}case"anthropic.bash_20241022":{l.add("computer-use-2024-10-22"),u.push({name:"bash",type:"bash_20241022",cache_control:void 0});break}case"anthropic.memory_20250818":{l.add("context-management-2025-06-27"),u.push({name:"memory",type:"memory_20250818"});break}case"anthropic.web_fetch_20250910":{l.add("web-fetch-2025-09-10");let p=await Je({value:c.args,schema:VM});u.push({type:"web_fetch_20250910",name:"web_fetch",max_uses:p.maxUses,allowed_domains:p.allowedDomains,blocked_domains:p.blockedDomains,citations:p.citations,max_content_tokens:p.maxContentTokens,cache_control:void 0});break}case"anthropic.web_search_20250305":{let p=await Je({value:c.args,schema:FM});u.push({type:"web_search_20250305",name:"web_search",max_uses:p.maxUses,allowed_domains:p.allowedDomains,blocked_domains:p.blockedDomains,user_location:p.userLocation,cache_control:void 0});break}case"anthropic.tool_search_regex_20251119":{l.add("advanced-tool-use-2025-11-20"),u.push({type:"tool_search_tool_regex_20251119",name:"tool_search_tool_regex"});break}case"anthropic.tool_search_bm25_20251119":{l.add("advanced-tool-use-2025-11-20"),u.push({type:"tool_search_tool_bm25_20251119",name:"tool_search_tool_bm25"});break}default:{s.push({type:"unsupported",feature:`provider-defined tool ${c.id}`});break}}break}default:{s.push({type:"unsupported",feature:`tool ${c}`});break}}if(t==null)return{tools:u,toolChoice:r?{type:"auto",disable_parallel_tool_use:r}:void 0,toolWarnings:s,betas:l};let m=t.type;switch(m){case"auto":return{tools:u,toolChoice:{type:"auto",disable_parallel_tool_use:r},toolWarnings:s,betas:l};case"required":return{tools:u,toolChoice:{type:"any",disable_parallel_tool_use:r},toolWarnings:s,betas:l};case"none":return{tools:void 0,toolChoice:void 0,toolWarnings:s,betas:l};case"tool":return{tools:u,toolChoice:{type:"tool",name:t.toolName,disable_parallel_tool_use:r},toolWarnings:s,betas:l};default:{let c=m;throw new Re({functionality:`tool choice type: ${c}`})}}}function AS({usage:e,rawUsage:t}){var r,o;let n=(r=e.cache_creation_input_tokens)!=null?r:0,i=(o=e.cache_read_input_tokens)!=null?o:0,s,l;if(e.iterations&&e.iterations.length>0){let d=e.iterations.reduce((u,m)=>({input:u.input+m.input_tokens,output:u.output+m.output_tokens}),{input:0,output:0});s=d.input,l=d.output}else s=e.input_tokens,l=e.output_tokens;return{inputTokens:{total:s+n+i,noCache:s,cacheRead:i,cacheWrite:n},outputTokens:{total:l,text:void 0,reasoning:void 0},raw:t!=null?t:e}}var NS=O(()=>A(a.object({type:a.literal("code_execution_result"),stdout:a.string(),stderr:a.string(),return_code:a.number(),content:a.array(a.object({type:a.literal("code_execution_output"),file_id:a.string()})).optional().default([])}))),WM=O(()=>A(a.object({code:a.string()}))),KM=je({id:"anthropic.code_execution_20250522",inputSchema:WM,outputSchema:NS}),YM=(e={})=>KM(e),jS=O(()=>A(a.discriminatedUnion("type",[a.object({type:a.literal("code_execution_result"),stdout:a.string(),stderr:a.string(),return_code:a.number(),content:a.array(a.object({type:a.literal("code_execution_output"),file_id:a.string()})).optional().default([])}),a.object({type:a.literal("bash_code_execution_result"),content:a.array(a.object({type:a.literal("bash_code_execution_output"),file_id:a.string()})),stdout:a.string(),stderr:a.string(),return_code:a.number()}),a.object({type:a.literal("bash_code_execution_tool_result_error"),error_code:a.string()}),a.object({type:a.literal("text_editor_code_execution_tool_result_error"),error_code:a.string()}),a.object({type:a.literal("text_editor_code_execution_view_result"),content:a.string(),file_type:a.string(),num_lines:a.number().nullable(),start_line:a.number().nullable(),total_lines:a.number().nullable()}),a.object({type:a.literal("text_editor_code_execution_create_result"),is_file_update:a.boolean()}),a.object({type:a.literal("text_editor_code_execution_str_replace_result"),lines:a.array(a.string()).nullable(),new_lines:a.number().nullable(),new_start:a.number().nullable(),old_lines:a.number().nullable(),old_start:a.number().nullable()})]))),XM=O(()=>A(a.discriminatedUnion("type",[a.object({type:a.literal("programmatic-tool-call"),code:a.string()}),a.object({type:a.literal("bash_code_execution"),command:a.string()}),a.discriminatedUnion("command",[a.object({type:a.literal("text_editor_code_execution"),command:a.literal("view"),path:a.string()}),a.object({type:a.literal("text_editor_code_execution"),command:a.literal("create"),path:a.string(),file_text:a.string().nullish()}),a.object({type:a.literal("text_editor_code_execution"),command:a.literal("str_replace"),path:a.string(),old_str:a.string(),new_str:a.string()})])]))),QM=je({id:"anthropic.code_execution_20250825",inputSchema:XM,outputSchema:jS,supportsDeferredResults:!0}),eN=(e={})=>QM(e),DS=O(()=>A(a.array(a.object({type:a.literal("tool_reference"),toolName:a.string()})))),tN=O(()=>A(a.object({pattern:a.string(),limit:a.number().optional()}))),rN=je({id:"anthropic.tool_search_regex_20251119",inputSchema:tN,outputSchema:DS,supportsDeferredResults:!0}),nN=(e={})=>rN(e);function oN(e){if(typeof e=="string")return Buffer.from(e,"base64").toString("utf-8");if(e instanceof Uint8Array)return new TextDecoder().decode(e);throw e instanceof URL?new Re({functionality:"URL-based text documents are not supported for citations"}):new Re({functionality:`unsupported data type for text documents: ${typeof e}`})}function mh(e){return e instanceof URL||aN(e)}function aN(e){return typeof e=="string"&&/^https?:\/\//i.test(e)}function fh(e){return e instanceof URL?e.toString():e}async function iN({prompt:e,sendReasoning:t,warnings:r,cacheControlValidator:o,toolNameMapping:n}){var i,s,l,d,u,m,c,p,f,v,g,y,S,b,_,k,w,h;let I=new Set,j=sN(e),U=o||new hh,F,Z=[];async function L(q){var C,E;let te=await Ee({provider:"anthropic",providerOptions:q,schema:$S});return(E=(C=te==null?void 0:te.citations)==null?void 0:C.enabled)!=null?E:!1}async function M(q){let C=await Ee({provider:"anthropic",providerOptions:q,schema:$S});return{title:C==null?void 0:C.title,context:C==null?void 0:C.context}}for(let q=0;q({type:"text",text:P,cache_control:U.getCacheControl(se,{type:"system message",canCache:!0})}));break}case"user":{let P=[];for(let se of C.messages){let{role:ee,content:he}=se;switch(ee){case"user":{for(let fe=0;fe{var le;switch(H.type){case"text":return{type:"text",text:H.text};case"image-data":return{type:"image",source:{type:"base64",media_type:H.mediaType,data:H.data}};case"image-url":return{type:"image",source:{type:"url",url:H.url}};case"file-url":return{type:"document",source:{type:"url",url:H.url}};case"file-data":{if(H.mediaType==="application/pdf")return I.add("pdfs-2024-09-25"),{type:"document",source:{type:"base64",media_type:H.mediaType,data:H.data}};r.push({type:"other",message:`unsupported tool content part type: ${H.type} with media type: ${H.mediaType}`});return}case"custom":{let R=(le=H.providerOptions)==null?void 0:le.anthropic;if((R==null?void 0:R.type)==="tool-reference")return{type:"tool_reference",tool_name:R.toolName};r.push({type:"other",message:"unsupported custom tool content part"});return}default:{r.push({type:"other",message:`unsupported tool content part type: ${H.type}`});return}}}).filter(_u);break;case"text":case"error-text":de=pe.value;break;case"execution-denied":de=(u=pe.reason)!=null?u:"Tool execution denied.";break;default:de=JSON.stringify(pe.value);break}P.push({type:"tool_result",tool_use_id:V.toolCallId,content:de,is_error:pe.type==="error-text"||pe.type==="error-json"?!0:void 0,cache_control:T})}break}default:{let fe=ee;throw new Error(`Unsupported role: ${fe}`)}}}Z.push({role:"user",content:P});break}case"assistant":{let P=[],se=new Set;for(let ee=0;ee({url:D.url,title:D.title,page_age:D.pageAge,encrypted_content:D.encryptedContent,type:D.type})),cache_control:de});break}if(H==="tool_search_tool_regex"||H==="tool_search_tool_bm25"){let le=T.output;if(le.type!=="json"){r.push({type:"other",message:`provider executed tool result output type ${le.type} for tool ${T.toolName} is not supported`});break}let D=(await Je({value:le.value,schema:DS})).map(Q=>({type:"tool_reference",tool_name:Q.toolName}));P.push({type:"tool_search_tool_result",tool_use_id:T.toolCallId,content:{type:"tool_search_tool_search_result",tool_references:D},cache_control:de});break}r.push({type:"other",message:`provider executed tool result for tool ${T.toolName} is not supported`});break}}}}Z.push({role:"assistant",content:P});break}default:{let P=te;throw new Error(`content type: ${P}`)}}}return{prompt:{system:F,messages:Z},betas:I}}function sN(e){let t=[],r;for(let o of e){let{role:n}=o;switch(n){case"system":{(r==null?void 0:r.type)!=="system"&&(r={type:"system",messages:[]},t.push(r)),r.messages.push(o);break}case"assistant":{(r==null?void 0:r.type)!=="assistant"&&(r={type:"assistant",messages:[]},t.push(r)),r.messages.push(o);break}case"user":{(r==null?void 0:r.type)!=="user"&&(r={type:"user",messages:[]},t.push(r)),r.messages.push(o);break}case"tool":{(r==null?void 0:r.type)!=="user"&&(r={type:"user",messages:[]},t.push(r)),r.messages.push(o);break}default:{let i=n;throw new Error(`Unsupported role: ${i}`)}}}return t}function gh({finishReason:e,isJsonResponseFromTool:t}){switch(e){case"pause_turn":case"end_turn":case"stop_sequence":return"stop";case"refusal":return"content-filter";case"tool_use":return t?"stop":"tool-calls";case"max_tokens":case"model_context_window_exceeded":return"length";case"compaction":return"other";default:return"other"}}function PS(e,t,r){var o;if(e.type==="web_search_result_location")return{type:"source",sourceType:"url",id:r(),url:e.url,title:e.title,providerMetadata:{anthropic:{citedText:e.cited_text,encryptedIndex:e.encrypted_index}}};if(e.type!=="page_location"&&e.type!=="char_location")return;let n=t[e.document_index];if(n)return{type:"source",sourceType:"document",id:r(),mediaType:n.mediaType,title:(o=e.document_title)!=null?o:n.title,filename:n.filename,providerMetadata:{anthropic:e.type==="page_location"?{citedText:e.cited_text,startPageNumber:e.start_page_number,endPageNumber:e.end_page_number}:{citedText:e.cited_text,startCharIndex:e.start_char_index,endCharIndex:e.end_char_index}}}}var lN=class{constructor(e,t){this.specificationVersion="v3";var r;this.modelId=e,this.config=t,this.generateId=(r=t.generateId)!=null?r:Fe}supportsUrl(e){return e.protocol==="https:"}get provider(){return this.config.provider}get providerOptionsName(){let e=this.config.provider,t=e.indexOf(".");return t===-1?e:e.substring(0,t)}get supportedUrls(){var e,t,r;return(r=(t=(e=this.config).supportedUrls)==null?void 0:t.call(e))!=null?r:{}}async getArgs({userSuppliedBetas:e,prompt:t,maxOutputTokens:r,temperature:o,topP:n,topK:i,frequencyPenalty:s,presencePenalty:l,stopSequences:d,responseFormat:u,seed:m,tools:c,toolChoice:p,providerOptions:f,stream:v}){var g,y,S,b,_,k;let w=[];s!=null&&w.push({type:"unsupported",feature:"frequencyPenalty"}),l!=null&&w.push({type:"unsupported",feature:"presencePenalty"}),m!=null&&w.push({type:"unsupported",feature:"seed"}),o!=null&&o>1?(w.push({type:"unsupported",feature:"temperature",details:`${o} exceeds anthropic maximum of 1.0. clamped to 1.0`}),o=1):o!=null&&o<0&&(w.push({type:"unsupported",feature:"temperature",details:`${o} is below anthropic minimum of 0. clamped to 0`}),o=0),(u==null?void 0:u.type)==="json"&&u.schema==null&&w.push({type:"unsupported",feature:"responseFormat",details:"JSON response format requires a schema. The response format is ignored."});let h=this.providerOptionsName,I=await Ee({provider:"anthropic",providerOptions:f,schema:ES}),j=h!=="anthropic"?await Ee({provider:h,providerOptions:f,schema:ES}):null,U=j!=null,F=Object.assign({},I!=null?I:{},j!=null?j:{}),{maxOutputTokens:Z,supportsStructuredOutput:L,isKnownModel:M}=uN(this.modelId),q=((g=this.config.supportsNativeStructuredOutput)!=null?g:!0)&&L,C=(y=F==null?void 0:F.structuredOutputMode)!=null?y:"auto",E=C==="outputFormat"||C==="auto"&&q,te=(u==null?void 0:u.type)==="json"&&u.schema!=null&&!E?{type:"function",name:"json",description:"Respond with a JSON object.",inputSchema:u.schema}:void 0,P=F==null?void 0:F.contextManagement,se=new hh,ee=gu({tools:c,providerToolNames:{"anthropic.code_execution_20250522":"code_execution","anthropic.code_execution_20250825":"code_execution","anthropic.computer_20241022":"computer","anthropic.computer_20250124":"computer","anthropic.text_editor_20241022":"str_replace_editor","anthropic.text_editor_20250124":"str_replace_editor","anthropic.text_editor_20250429":"str_replace_based_edit_tool","anthropic.text_editor_20250728":"str_replace_based_edit_tool","anthropic.bash_20241022":"bash","anthropic.bash_20250124":"bash","anthropic.memory_20250818":"memory","anthropic.web_search_20250305":"web_search","anthropic.web_fetch_20250910":"web_fetch","anthropic.tool_search_regex_20251119":"tool_search_tool_regex","anthropic.tool_search_bm25_20251119":"tool_search_tool_bm25"}}),{prompt:he,betas:fe}=await iN({prompt:t,sendReasoning:(S=F==null?void 0:F.sendReasoning)!=null?S:!0,warnings:w,cacheControlValidator:se,toolNameMapping:ee}),V=(b=F==null?void 0:F.thinking)==null?void 0:b.type,Ae=V==="enabled"||V==="adaptive",T=V==="enabled"?(_=F==null?void 0:F.thinking)==null?void 0:_.budgetTokens:void 0,pe=r!=null?r:Z,de={model:this.modelId,max_tokens:pe,temperature:o,top_k:i,top_p:n,stop_sequences:d,...Ae&&{thinking:{type:V,...T!=null&&{budget_tokens:T}}},...(F==null?void 0:F.effort)&&{output_config:{effort:F.effort}},...(F==null?void 0:F.speed)&&{speed:F.speed},...E&&(u==null?void 0:u.type)==="json"&&u.schema!=null&&{output_format:{type:"json_schema",schema:u.schema}},...(F==null?void 0:F.mcpServers)&&F.mcpServers.length>0&&{mcp_servers:F.mcpServers.map(G=>({type:G.type,name:G.name,url:G.url,authorization_token:G.authorizationToken,tool_configuration:G.toolConfiguration?{allowed_tools:G.toolConfiguration.allowedTools,enabled:G.toolConfiguration.enabled}:void 0}))},...(F==null?void 0:F.container)&&{container:F.container.skills&&F.container.skills.length>0?{id:F.container.id,skills:F.container.skills.map(G=>({type:G.type,skill_id:G.skillId,version:G.version}))}:F.container.id},system:he.system,messages:he.messages,...P&&{context_management:{edits:P.edits.map(G=>{let Me=G.type;switch(Me){case"clear_tool_uses_20250919":return{type:G.type,...G.trigger!==void 0&&{trigger:G.trigger},...G.keep!==void 0&&{keep:G.keep},...G.clearAtLeast!==void 0&&{clear_at_least:G.clearAtLeast},...G.clearToolInputs!==void 0&&{clear_tool_inputs:G.clearToolInputs},...G.excludeTools!==void 0&&{exclude_tools:G.excludeTools}};case"clear_thinking_20251015":return{type:G.type,...G.keep!==void 0&&{keep:G.keep}};case"compact_20260112":return{type:G.type,...G.trigger!==void 0&&{trigger:G.trigger},...G.pauseAfterCompaction!==void 0&&{pause_after_compaction:G.pauseAfterCompaction},...G.instructions!==void 0&&{instructions:G.instructions}};default:w.push({type:"other",message:`Unknown context management strategy: ${Me}`});return}}).filter(G=>G!==void 0)}}};Ae?(V==="enabled"&&T==null&&(w.push({type:"compatibility",feature:"extended thinking",details:"thinking budget is required when thinking is enabled. using default budget of 1024 tokens."}),de.thinking={type:"enabled",budget_tokens:1024},T=1024),de.temperature!=null&&(de.temperature=void 0,w.push({type:"unsupported",feature:"temperature",details:"temperature is not supported when thinking is enabled"})),i!=null&&(de.top_k=void 0,w.push({type:"unsupported",feature:"topK",details:"topK is not supported when thinking is enabled"})),n!=null&&(de.top_p=void 0,w.push({type:"unsupported",feature:"topP",details:"topP is not supported when thinking is enabled"})),de.max_tokens=pe+(T!=null?T:0)):n!=null&&o!=null&&(w.push({type:"unsupported",feature:"topP",details:"topP is not supported when temperature is set. topP is ignored."}),de.top_p=void 0),M&&de.max_tokens>Z&&(r!=null&&w.push({type:"unsupported",feature:"maxOutputTokens",details:`${de.max_tokens} (maxOutputTokens + thinkingBudget) is greater than ${this.modelId} ${Z} max output tokens. The max output tokens have been limited to ${Z}.`}),de.max_tokens=Z),F!=null&&F.mcpServers&&F.mcpServers.length>0&&fe.add("mcp-client-2025-04-04"),P&&(fe.add("context-management-2025-06-27"),P.edits.some(G=>G.type==="compact_20260112")&&fe.add("compact-2026-01-12")),F!=null&&F.container&&F.container.skills&&F.container.skills.length>0&&(fe.add("code-execution-2025-08-25"),fe.add("skills-2025-10-02"),fe.add("files-api-2025-04-14"),c!=null&&c.some(G=>G.type==="provider"&&G.id==="anthropic.code_execution_20250825")||w.push({type:"other",message:"code execution tool is required when using skills"})),F!=null&&F.effort&&fe.add("effort-2025-11-24"),F!=null&&F.speed&&fe.add("fast-mode-2026-02-01"),v&&((k=F==null?void 0:F.toolStreaming)==null||k)&&fe.add("fine-grained-tool-streaming-2025-05-14"),E&&(u==null?void 0:u.type)==="json"&&u.schema!=null&&fe.add("structured-outputs-2025-11-13");let{tools:le,toolChoice:R,toolWarnings:D,betas:Q}=await JM(te!=null?{tools:[...c!=null?c:[],te],toolChoice:{type:"required"},disableParallelToolUse:!0,cacheControlValidator:se,supportsStructuredOutput:!1}:{tools:c!=null?c:[],toolChoice:p,disableParallelToolUse:F==null?void 0:F.disableParallelToolUse,cacheControlValidator:se,supportsStructuredOutput:q}),B=se.getWarnings();return{args:{...de,tools:le,tool_choice:R,stream:v===!0?!0:void 0},warnings:[...w,...D,...B],betas:new Set([...fe,...Q,...e]),usesJsonResponseTool:te!=null,toolNameMapping:ee,providerOptionsName:h,usedCustomProviderKey:U}}async getHeaders({betas:e,headers:t}){return _e(await ze(this.config.headers),t,e.size>0?{"anthropic-beta":Array.from(e).join(",")}:{})}async getBetasFromHeaders(e){var t,r;let n=(t=(await ze(this.config.headers))["anthropic-beta"])!=null?t:"",i=(r=e==null?void 0:e["anthropic-beta"])!=null?r:"";return new Set([...n.toLowerCase().split(","),...i.toLowerCase().split(",")].map(s=>s.trim()).filter(s=>s!==""))}buildRequestUrl(e){var t,r,o;return(o=(r=(t=this.config).buildRequestUrl)==null?void 0:r.call(t,this.config.baseURL,e))!=null?o:`${this.config.baseURL}/messages`}transformRequestBody(e){var t,r,o;return(o=(r=(t=this.config).transformRequestBody)==null?void 0:r.call(t,e))!=null?o:e}extractCitationDocuments(e){let t=r=>{var o,n;if(r.type!=="file"||r.mediaType!=="application/pdf"&&r.mediaType!=="text/plain")return!1;let i=(o=r.providerOptions)==null?void 0:o.anthropic,s=i==null?void 0:i.citations;return(n=s==null?void 0:s.enabled)!=null?n:!1};return e.filter(r=>r.role==="user").flatMap(r=>r.content).filter(t).map(r=>{var o;let n=r;return{title:(o=n.filename)!=null?o:"Untitled Document",filename:n.filename,mediaType:n.mediaType}})}async doGenerate(e){var t,r,o,n,i,s;let{args:l,warnings:d,betas:u,usesJsonResponseTool:m,toolNameMapping:c,providerOptionsName:p,usedCustomProviderKey:f}=await this.getArgs({...e,stream:!1,userSuppliedBetas:await this.getBetasFromHeaders(e.headers)}),v=[...this.extractCitationDocuments(e.prompt)],{responseHeaders:g,value:y,rawValue:S}=await we({url:this.buildRequestUrl(!1),headers:await this.getHeaders({betas:u,headers:e.headers}),body:this.transformRequestBody(l),failedResponseHandler:TS,successfulResponseHandler:ke(OM),abortSignal:e.abortSignal,fetch:this.config.fetch}),b=[],_={},k={},w=!1;for(let h of y.content)switch(h.type){case"text":{if(!m&&(b.push({type:"text",text:h.text}),h.citations))for(let I of h.citations){let j=PS(I,v,this.generateId);j&&b.push(j)}break}case"thinking":{b.push({type:"reasoning",text:h.thinking,providerMetadata:{anthropic:{signature:h.signature}}});break}case"redacted_thinking":{b.push({type:"reasoning",text:"",providerMetadata:{anthropic:{redactedData:h.data}}});break}case"compaction":{b.push({type:"text",text:h.content,providerMetadata:{anthropic:{type:"compaction"}}});break}case"tool_use":{if(m&&h.name==="json")w=!0,b.push({type:"text",text:JSON.stringify(h.input)});else{let j=h.caller,U=j?{type:j.type,toolId:"tool_id"in j?j.tool_id:void 0}:void 0;b.push({type:"tool-call",toolCallId:h.id,toolName:h.name,input:JSON.stringify(h.input),...U&&{providerMetadata:{anthropic:{caller:U}}}})}break}case"server_tool_use":{if(h.name==="text_editor_code_execution"||h.name==="bash_code_execution")b.push({type:"tool-call",toolCallId:h.id,toolName:c.toCustomToolName("code_execution"),input:JSON.stringify({type:h.name,...h.input}),providerExecuted:!0});else if(h.name==="web_search"||h.name==="code_execution"||h.name==="web_fetch"){let I=h.name==="code_execution"&&h.input!=null&&typeof h.input=="object"&&"code"in h.input&&!("type"in h.input)?{type:"programmatic-tool-call",...h.input}:h.input;b.push({type:"tool-call",toolCallId:h.id,toolName:c.toCustomToolName(h.name),input:JSON.stringify(I),providerExecuted:!0})}else(h.name==="tool_search_tool_regex"||h.name==="tool_search_tool_bm25")&&(k[h.id]=h.name,b.push({type:"tool-call",toolCallId:h.id,toolName:c.toCustomToolName(h.name),input:JSON.stringify(h.input),providerExecuted:!0}));break}case"mcp_tool_use":{_[h.id]={type:"tool-call",toolCallId:h.id,toolName:h.name,input:JSON.stringify(h.input),providerExecuted:!0,dynamic:!0,providerMetadata:{anthropic:{type:"mcp-tool-use",serverName:h.server_name}}},b.push(_[h.id]);break}case"mcp_tool_result":{b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:_[h.tool_use_id].toolName,isError:h.is_error,result:h.content,dynamic:!0,providerMetadata:_[h.tool_use_id].providerMetadata});break}case"web_fetch_tool_result":{h.content.type==="web_fetch_result"?(v.push({title:(t=h.content.content.title)!=null?t:h.content.url,mediaType:h.content.content.source.media_type}),b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("web_fetch"),result:{type:"web_fetch_result",url:h.content.url,retrievedAt:h.content.retrieved_at,content:{type:h.content.content.type,title:h.content.content.title,citations:h.content.content.citations,source:{type:h.content.content.source.type,mediaType:h.content.content.source.media_type,data:h.content.content.source.data}}}})):h.content.type==="web_fetch_tool_result_error"&&b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("web_fetch"),isError:!0,result:{type:"web_fetch_tool_result_error",errorCode:h.content.error_code}});break}case"web_search_tool_result":{if(Array.isArray(h.content)){b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("web_search"),result:h.content.map(I=>{var j;return{url:I.url,title:I.title,pageAge:(j=I.page_age)!=null?j:null,encryptedContent:I.encrypted_content,type:I.type}})});for(let I of h.content)b.push({type:"source",sourceType:"url",id:this.generateId(),url:I.url,title:I.title,providerMetadata:{anthropic:{pageAge:(r=I.page_age)!=null?r:null}}})}else b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("web_search"),isError:!0,result:{type:"web_search_tool_result_error",errorCode:h.content.error_code}});break}case"code_execution_tool_result":{h.content.type==="code_execution_result"?b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("code_execution"),result:{type:h.content.type,stdout:h.content.stdout,stderr:h.content.stderr,return_code:h.content.return_code,content:(o=h.content.content)!=null?o:[]}}):h.content.type==="code_execution_tool_result_error"&&b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("code_execution"),isError:!0,result:{type:"code_execution_tool_result_error",errorCode:h.content.error_code}});break}case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":{b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName("code_execution"),result:h.content});break}case"tool_search_tool_result":{let I=k[h.tool_use_id];if(I==null){let j=c.toCustomToolName("tool_search_tool_bm25"),U=c.toCustomToolName("tool_search_tool_regex");j!=="tool_search_tool_bm25"?I="tool_search_tool_bm25":I="tool_search_tool_regex"}h.content.type==="tool_search_tool_search_result"?b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName(I),result:h.content.tool_references.map(j=>({type:j.type,toolName:j.tool_name}))}):b.push({type:"tool-result",toolCallId:h.tool_use_id,toolName:c.toCustomToolName(I),isError:!0,result:{type:"tool_search_tool_result_error",errorCode:h.content.error_code}});break}}return{content:b,finishReason:{unified:gh({finishReason:y.stop_reason,isJsonResponseFromTool:w}),raw:(n=y.stop_reason)!=null?n:void 0},usage:AS({usage:y.usage}),request:{body:l},response:{id:(i=y.id)!=null?i:void 0,modelId:(s=y.model)!=null?s:void 0,headers:g,body:S},warnings:d,providerMetadata:(()=>{var h,I,j,U,F;let Z={usage:y.usage,cacheCreationInputTokens:(h=y.usage.cache_creation_input_tokens)!=null?h:null,stopSequence:(I=y.stop_sequence)!=null?I:null,iterations:y.usage.iterations?y.usage.iterations.map(M=>({type:M.type,inputTokens:M.input_tokens,outputTokens:M.output_tokens})):null,container:y.container?{expiresAt:y.container.expires_at,id:y.container.id,skills:(U=(j=y.container.skills)==null?void 0:j.map(M=>({type:M.type,skillId:M.skill_id,version:M.version})))!=null?U:null}:null,contextManagement:(F=OS(y.context_management))!=null?F:null},L={anthropic:Z};return f&&p!=="anthropic"&&(L[p]=Z),L})()}}async doStream(e){var t,r;let{args:o,warnings:n,betas:i,usesJsonResponseTool:s,toolNameMapping:l,providerOptionsName:d,usedCustomProviderKey:u}=await this.getArgs({...e,stream:!0,userSuppliedBetas:await this.getBetasFromHeaders(e.headers)}),m=[...this.extractCitationDocuments(e.prompt)],c=this.buildRequestUrl(!0),{responseHeaders:p,value:f}=await we({url:c,headers:await this.getHeaders({betas:i,headers:e.headers}),body:this.transformRequestBody(o),failedResponseHandler:TS,successfulResponseHandler:Nt(RM),abortSignal:e.abortSignal,fetch:this.config.fetch}),v={unified:"other",raw:void 0},g={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,iterations:null},y={},S={},b={},_=null,k,w=null,h=null,I=null,j=!1,U,F=this.generateId,Z=f.pipeThrough(new TransformStream({start(C){C.enqueue({type:"stream-start",warnings:n})},transform(C,E){var te,P,se,ee,he,fe,V,Ae,T,pe,de,H,le;if(e.includeRawChunks&&E.enqueue({type:"raw",rawValue:C.rawValue}),!C.success){E.enqueue({type:"error",error:C.error});return}let R=C.value;switch(R.type){case"ping":return;case"content_block_start":{let D=R.content_block,Q=D.type;switch(U=Q,Q){case"text":{if(s)return;y[R.index]={type:"text"},E.enqueue({type:"text-start",id:String(R.index)});return}case"thinking":{y[R.index]={type:"reasoning"},E.enqueue({type:"reasoning-start",id:String(R.index)});return}case"redacted_thinking":{y[R.index]={type:"reasoning"},E.enqueue({type:"reasoning-start",id:String(R.index),providerMetadata:{anthropic:{redactedData:D.data}}});return}case"compaction":{y[R.index]={type:"text"},E.enqueue({type:"text-start",id:String(R.index),providerMetadata:{anthropic:{type:"compaction"}}});return}case"tool_use":{if(s&&D.name==="json")j=!0,y[R.index]={type:"text"},E.enqueue({type:"text-start",id:String(R.index)});else{let G=D.caller,Me=G?{type:G.type,toolId:"tool_id"in G?G.tool_id:void 0}:void 0,x=D.input&&Object.keys(D.input).length>0?JSON.stringify(D.input):"";y[R.index]={type:"tool-call",toolCallId:D.id,toolName:D.name,input:x,firstDelta:x.length===0,...Me&&{caller:Me}},E.enqueue({type:"tool-input-start",id:D.id,toolName:D.name})}return}case"server_tool_use":{if(["web_fetch","web_search","code_execution","text_editor_code_execution","bash_code_execution"].includes(D.name)){let B=D.name==="text_editor_code_execution"||D.name==="bash_code_execution"?"code_execution":D.name,G=l.toCustomToolName(B);y[R.index]={type:"tool-call",toolCallId:D.id,toolName:G,input:"",providerExecuted:!0,firstDelta:!0,providerToolName:D.name},E.enqueue({type:"tool-input-start",id:D.id,toolName:G,providerExecuted:!0})}else if(D.name==="tool_search_tool_regex"||D.name==="tool_search_tool_bm25"){b[D.id]=D.name;let B=l.toCustomToolName(D.name);y[R.index]={type:"tool-call",toolCallId:D.id,toolName:B,input:"",providerExecuted:!0,firstDelta:!0,providerToolName:D.name},E.enqueue({type:"tool-input-start",id:D.id,toolName:B,providerExecuted:!0})}return}case"web_fetch_tool_result":{D.content.type==="web_fetch_result"?(m.push({title:(te=D.content.content.title)!=null?te:D.content.url,mediaType:D.content.content.source.media_type}),E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("web_fetch"),result:{type:"web_fetch_result",url:D.content.url,retrievedAt:D.content.retrieved_at,content:{type:D.content.content.type,title:D.content.content.title,citations:D.content.content.citations,source:{type:D.content.content.source.type,mediaType:D.content.content.source.media_type,data:D.content.content.source.data}}}})):D.content.type==="web_fetch_tool_result_error"&&E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("web_fetch"),isError:!0,result:{type:"web_fetch_tool_result_error",errorCode:D.content.error_code}});return}case"web_search_tool_result":{if(Array.isArray(D.content)){E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("web_search"),result:D.content.map(B=>{var G;return{url:B.url,title:B.title,pageAge:(G=B.page_age)!=null?G:null,encryptedContent:B.encrypted_content,type:B.type}})});for(let B of D.content)E.enqueue({type:"source",sourceType:"url",id:F(),url:B.url,title:B.title,providerMetadata:{anthropic:{pageAge:(P=B.page_age)!=null?P:null}}})}else E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("web_search"),isError:!0,result:{type:"web_search_tool_result_error",errorCode:D.content.error_code}});return}case"code_execution_tool_result":{D.content.type==="code_execution_result"?E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("code_execution"),result:{type:D.content.type,stdout:D.content.stdout,stderr:D.content.stderr,return_code:D.content.return_code,content:(se=D.content.content)!=null?se:[]}}):D.content.type==="code_execution_tool_result_error"&&E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("code_execution"),isError:!0,result:{type:"code_execution_tool_result_error",errorCode:D.content.error_code}});return}case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":{E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName("code_execution"),result:D.content});return}case"tool_search_tool_result":{let B=b[D.tool_use_id];if(B==null){let G=l.toCustomToolName("tool_search_tool_bm25"),Me=l.toCustomToolName("tool_search_tool_regex");G!=="tool_search_tool_bm25"?B="tool_search_tool_bm25":B="tool_search_tool_regex"}D.content.type==="tool_search_tool_search_result"?E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName(B),result:D.content.tool_references.map(G=>({type:G.type,toolName:G.tool_name}))}):E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:l.toCustomToolName(B),isError:!0,result:{type:"tool_search_tool_result_error",errorCode:D.content.error_code}});return}case"mcp_tool_use":{S[D.id]={type:"tool-call",toolCallId:D.id,toolName:D.name,input:JSON.stringify(D.input),providerExecuted:!0,dynamic:!0,providerMetadata:{anthropic:{type:"mcp-tool-use",serverName:D.server_name}}},E.enqueue(S[D.id]);return}case"mcp_tool_result":{E.enqueue({type:"tool-result",toolCallId:D.tool_use_id,toolName:S[D.tool_use_id].toolName,isError:D.is_error,result:D.content,dynamic:!0,providerMetadata:S[D.tool_use_id].providerMetadata});return}default:{let B=Q;throw new Error(`Unsupported content block type: ${B}`)}}}case"content_block_stop":{if(y[R.index]!=null){let D=y[R.index];switch(D.type){case"text":{E.enqueue({type:"text-end",id:String(R.index)});break}case"reasoning":{E.enqueue({type:"reasoning-end",id:String(R.index)});break}case"tool-call":if(!(s&&D.toolName==="json")){E.enqueue({type:"tool-input-end",id:D.toolCallId});let B=D.input===""?"{}":D.input;if(D.providerToolName==="code_execution")try{let G=JSON.parse(B);G!=null&&typeof G=="object"&&"code"in G&&!("type"in G)&&(B=JSON.stringify({type:"programmatic-tool-call",...G}))}catch(G){}E.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:D.toolName,input:B,providerExecuted:D.providerExecuted,...D.caller&&{providerMetadata:{anthropic:{caller:D.caller}}}})}break}delete y[R.index]}U=void 0;return}case"content_block_delta":{let D=R.delta.type;switch(D){case"text_delta":{if(s)return;E.enqueue({type:"text-delta",id:String(R.index),delta:R.delta.text});return}case"thinking_delta":{E.enqueue({type:"reasoning-delta",id:String(R.index),delta:R.delta.thinking});return}case"signature_delta":{U==="thinking"&&E.enqueue({type:"reasoning-delta",id:String(R.index),delta:"",providerMetadata:{anthropic:{signature:R.delta.signature}}});return}case"compaction_delta":{E.enqueue({type:"text-delta",id:String(R.index),delta:R.delta.content});return}case"input_json_delta":{let Q=y[R.index],B=R.delta.partial_json;if(B.length===0)return;if(j){if((Q==null?void 0:Q.type)!=="text")return;E.enqueue({type:"text-delta",id:String(R.index),delta:B})}else{if((Q==null?void 0:Q.type)!=="tool-call")return;Q.firstDelta&&(Q.providerToolName==="bash_code_execution"||Q.providerToolName==="text_editor_code_execution")&&(B=`{"type": "${Q.providerToolName}",${B.substring(1)}`),E.enqueue({type:"tool-input-delta",id:Q.toolCallId,delta:B}),Q.input+=B,Q.firstDelta=!1}return}case"citations_delta":{let Q=R.delta.citation,B=PS(Q,m,F);B&&E.enqueue(B);return}default:{let Q=D;throw new Error(`Unsupported delta type: ${Q}`)}}}case"message_start":{if(g.input_tokens=R.message.usage.input_tokens,g.cache_read_input_tokens=(ee=R.message.usage.cache_read_input_tokens)!=null?ee:0,g.cache_creation_input_tokens=(he=R.message.usage.cache_creation_input_tokens)!=null?he:0,k={...R.message.usage},w=(fe=R.message.usage.cache_creation_input_tokens)!=null?fe:null,R.message.container!=null&&(I={expiresAt:R.message.container.expires_at,id:R.message.container.id,skills:null}),R.message.stop_reason!=null&&(v={unified:gh({finishReason:R.message.stop_reason,isJsonResponseFromTool:j}),raw:R.message.stop_reason}),E.enqueue({type:"response-metadata",id:(V=R.message.id)!=null?V:void 0,modelId:(Ae=R.message.model)!=null?Ae:void 0}),R.message.content!=null)for(let D=0;D({type:D.type,skillId:D.skill_id,version:D.version})))!=null?le:null}:null,R.context_management&&(_=OS(R.context_management)),k={...k,...R.usage};return}case"message_stop":{let D={usage:k!=null?k:null,cacheCreationInputTokens:w,stopSequence:h,iterations:g.iterations?g.iterations.map(B=>({type:B.type,inputTokens:B.input_tokens,outputTokens:B.output_tokens})):null,container:I,contextManagement:_},Q={anthropic:D};u&&d!=="anthropic"&&(Q[d]=D),E.enqueue({type:"finish",finishReason:v,usage:AS({usage:g,rawUsage:k}),providerMetadata:Q});return}case"error":{E.enqueue({type:"error",error:R.error});return}default:{let D=R;throw new Error(`Unsupported chunk type: ${D}`)}}}})),[L,M]=Z.tee(),q=L.getReader();try{await q.read();let C=await q.read();if(((t=C.value)==null?void 0:t.type)==="raw"&&(C=await q.read()),((r=C.value)==null?void 0:r.type)==="error"){let E=C.value.error;throw new Ye({message:E.message,url:c,requestBodyValues:o,statusCode:E.type==="overloaded_error"?529:500,responseHeaders:p,responseBody:JSON.stringify(E),isRetryable:E.type==="overloaded_error"})}}finally{q.cancel().catch(()=>{}),q.releaseLock()}return{stream:M,request:{body:o},response:{headers:p}}}};function uN(e){return e.includes("claude-opus-4-6")?{maxOutputTokens:128e3,supportsStructuredOutput:!0,isKnownModel:!0}:e.includes("claude-sonnet-4-5")||e.includes("claude-opus-4-5")||e.includes("claude-haiku-4-5")?{maxOutputTokens:64e3,supportsStructuredOutput:!0,isKnownModel:!0}:e.includes("claude-opus-4-1")?{maxOutputTokens:32e3,supportsStructuredOutput:!0,isKnownModel:!0}:e.includes("claude-sonnet-4-")||e.includes("claude-3-7-sonnet")?{maxOutputTokens:64e3,supportsStructuredOutput:!1,isKnownModel:!0}:e.includes("claude-opus-4-")?{maxOutputTokens:32e3,supportsStructuredOutput:!1,isKnownModel:!0}:e.includes("claude-3-5-haiku")?{maxOutputTokens:8192,supportsStructuredOutput:!1,isKnownModel:!0}:e.includes("claude-3-haiku")?{maxOutputTokens:4096,supportsStructuredOutput:!1,isKnownModel:!0}:{maxOutputTokens:4096,supportsStructuredOutput:!1,isKnownModel:!1}}function OS(e){return e?{appliedEdits:e.applied_edits.map(t=>{switch(t.type){case"clear_tool_uses_20250919":return{type:t.type,clearedToolUses:t.cleared_tool_uses,clearedInputTokens:t.cleared_input_tokens};case"clear_thinking_20251015":return{type:t.type,clearedThinkingTurns:t.cleared_thinking_turns,clearedInputTokens:t.cleared_input_tokens};case"compact_20260112":return{type:t.type}}}).filter(t=>t!==void 0)}:null}var cN=O(()=>A(a.object({command:a.string(),restart:a.boolean().optional()}))),dN=Le({id:"anthropic.bash_20241022",inputSchema:cN}),pN=O(()=>A(a.object({command:a.string(),restart:a.boolean().optional()}))),mN=Le({id:"anthropic.bash_20250124",inputSchema:pN}),fN=O(()=>A(a.object({action:a.enum(["key","type","mouse_move","left_click","left_click_drag","right_click","middle_click","double_click","screenshot","cursor_position"]),coordinate:a.array(a.number().int()).optional(),text:a.string().optional()}))),gN=Le({id:"anthropic.computer_20241022",inputSchema:fN}),hN=O(()=>A(a.object({action:a.enum(["key","hold_key","type","cursor_position","mouse_move","left_mouse_down","left_mouse_up","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","wait","screenshot"]),coordinate:a.tuple([a.number().int(),a.number().int()]).optional(),duration:a.number().optional(),scroll_amount:a.number().optional(),scroll_direction:a.enum(["up","down","left","right"]).optional(),start_coordinate:a.tuple([a.number().int(),a.number().int()]).optional(),text:a.string().optional()}))),vN=Le({id:"anthropic.computer_20250124",inputSchema:hN}),yN=O(()=>A(a.object({action:a.enum(["key","hold_key","type","cursor_position","mouse_move","left_mouse_down","left_mouse_up","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","wait","screenshot","zoom"]),coordinate:a.tuple([a.number().int(),a.number().int()]).optional(),duration:a.number().optional(),region:a.tuple([a.number().int(),a.number().int(),a.number().int(),a.number().int()]).optional(),scroll_amount:a.number().optional(),scroll_direction:a.enum(["up","down","left","right"]).optional(),start_coordinate:a.tuple([a.number().int(),a.number().int()]).optional(),text:a.string().optional()}))),_N=Le({id:"anthropic.computer_20251124",inputSchema:yN}),bN=O(()=>A(a.discriminatedUnion("command",[a.object({command:a.literal("view"),path:a.string(),view_range:a.tuple([a.number(),a.number()]).optional()}),a.object({command:a.literal("create"),path:a.string(),file_text:a.string()}),a.object({command:a.literal("str_replace"),path:a.string(),old_str:a.string(),new_str:a.string()}),a.object({command:a.literal("insert"),path:a.string(),insert_line:a.number(),insert_text:a.string()}),a.object({command:a.literal("delete"),path:a.string()}),a.object({command:a.literal("rename"),old_path:a.string(),new_path:a.string()})]))),xN=Le({id:"anthropic.memory_20250818",inputSchema:bN}),wN=O(()=>A(a.object({command:a.enum(["view","create","str_replace","insert","undo_edit"]),path:a.string(),file_text:a.string().optional(),insert_line:a.number().int().optional(),new_str:a.string().optional(),insert_text:a.string().optional(),old_str:a.string().optional(),view_range:a.array(a.number().int()).optional()}))),SN=Le({id:"anthropic.text_editor_20241022",inputSchema:wN}),kN=O(()=>A(a.object({command:a.enum(["view","create","str_replace","insert","undo_edit"]),path:a.string(),file_text:a.string().optional(),insert_line:a.number().int().optional(),new_str:a.string().optional(),insert_text:a.string().optional(),old_str:a.string().optional(),view_range:a.array(a.number().int()).optional()}))),IN=Le({id:"anthropic.text_editor_20250124",inputSchema:kN}),TN=O(()=>A(a.object({command:a.enum(["view","create","str_replace","insert"]),path:a.string(),file_text:a.string().optional(),insert_line:a.number().int().optional(),new_str:a.string().optional(),insert_text:a.string().optional(),old_str:a.string().optional(),view_range:a.array(a.number().int()).optional()}))),$N=Le({id:"anthropic.text_editor_20250429",inputSchema:TN}),EN=O(()=>A(a.array(a.object({type:a.literal("tool_reference"),toolName:a.string()})))),CN=O(()=>A(a.object({query:a.string(),limit:a.number().optional()}))),AN=je({id:"anthropic.tool_search_bm25_20251119",inputSchema:CN,outputSchema:EN,supportsDeferredResults:!0}),PN=(e={})=>AN(e),ON={bash_20241022:dN,bash_20250124:mN,codeExecution_20250522:YM,codeExecution_20250825:eN,computer_20241022:gN,computer_20250124:vN,computer_20251124:_N,memory_20250818:xN,textEditor_20241022:SN,textEditor_20250124:IN,textEditor_20250429:$N,textEditor_20250728:UM,webFetch_20250910:BM,webSearch_20250305:ZM,toolSearchRegex_20251119:nN,toolSearchBm25_20251119:PN};function vh(e={}){var t,r;let o=(t=Vr(cn({settingValue:e.baseURL,environmentVariableName:"ANTHROPIC_BASE_URL"})))!=null?t:"https://api.anthropic.com/v1",n=(r=e.name)!=null?r:"anthropic.messages";if(e.apiKey&&e.authToken)throw new Io({argument:"apiKey/authToken",message:"Both apiKey and authToken were provided. Please use only one authentication method."});let i=()=>{let d=e.authToken?{Authorization:`Bearer ${e.authToken}`}:{"x-api-key":ya({apiKey:e.apiKey,environmentVariableName:"ANTHROPIC_API_KEY",description:"Anthropic"})};return Ct({"anthropic-version":"2023-06-01",...d,...e.headers},`ai-sdk/anthropic/${AM}`)},s=d=>{var u;return new lN(d,{provider:n,baseURL:o,headers:i,fetch:e.fetch,generateId:(u=e.generateId)!=null?u:Fe,supportedUrls:()=>({"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]})})},l=function(d){if(new.target)throw new Error("The Anthropic model function cannot be called with the new keyword.");return s(d)};return l.specificationVersion="v3",l.languageModel=s,l.chat=s,l.messages=s,l.embeddingModel=d=>{throw new Wc({modelId:d,modelType:"embeddingModel"})},l.textEmbeddingModel=l.embeddingModel,l.imageModel=d=>{throw new Wc({modelId:d,modelType:"imageModel"})},l.tools=ON,l}var oB=vh();var RN="3.0.24",MN=O(()=>A(a.object({error:a.object({code:a.number().nullable(),message:a.string(),status:a.string()})}))),uo=ot({errorSchema:MN,errorToMessage:e=>e.error.message}),NN=O(()=>A(a.object({outputDimensionality:a.number().optional(),taskType:a.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional()}))),jN=class{constructor(e,t){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=e,this.config=t}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:r,providerOptions:o}){let n=await Ee({provider:"google",providerOptions:o,schema:NN});if(e.length>this.maxEmbeddingsPerCall)throw new To({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});let i=_e(await ze(this.config.headers),t);if(e.length===1){let{responseHeaders:u,value:m,rawValue:c}=await we({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:i,body:{model:`models/${this.modelId}`,content:{parts:[{text:e[0]}]},outputDimensionality:n==null?void 0:n.outputDimensionality,taskType:n==null?void 0:n.taskType},failedResponseHandler:uo,successfulResponseHandler:ke(zN),abortSignal:r,fetch:this.config.fetch});return{warnings:[],embeddings:[m.embedding.values],usage:void 0,response:{headers:u,body:c}}}let{responseHeaders:s,value:l,rawValue:d}=await we({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:i,body:{requests:e.map(u=>({model:`models/${this.modelId}`,content:{role:"user",parts:[{text:u}]},outputDimensionality:n==null?void 0:n.outputDimensionality,taskType:n==null?void 0:n.taskType}))},failedResponseHandler:uo,successfulResponseHandler:ke(DN),abortSignal:r,fetch:this.config.fetch});return{warnings:[],embeddings:l.embeddings.map(u=>u.values),usage:void 0,response:{headers:s,body:d}}}},DN=O(()=>A(a.object({embeddings:a.array(a.object({values:a.array(a.number())}))}))),zN=O(()=>A(a.object({embedding:a.object({values:a.array(a.number())})})));function zS(e){var t,r,o,n;if(e==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let i=(t=e.promptTokenCount)!=null?t:0,s=(r=e.candidatesTokenCount)!=null?r:0,l=(o=e.cachedContentTokenCount)!=null?o:0,d=(n=e.thoughtsTokenCount)!=null?n:0;return{inputTokens:{total:i,noCache:i-l,cacheRead:l,cacheWrite:void 0},outputTokens:{total:s+d,text:s,reasoning:d},raw:e}}function Gr(e,t=!0){if(e==null)return;if(UN(e))return t?void 0:typeof e=="object"&&e.description?{type:"object",description:e.description}:{type:"object"};if(typeof e=="boolean")return{type:"boolean",properties:{}};let{type:r,description:o,required:n,properties:i,items:s,allOf:l,anyOf:d,oneOf:u,format:m,const:c,minLength:p,enum:f}=e,v={};if(o&&(v.description=o),n&&(v.required=n),m&&(v.format=m),c!==void 0&&(v.enum=[c]),r)if(Array.isArray(r)){let g=r.includes("null"),y=r.filter(S=>S!=="null");y.length===0?v.type="null":(v.anyOf=y.map(S=>({type:S})),g&&(v.nullable=!0))}else v.type=r;if(f!==void 0&&(v.enum=f),i!=null&&(v.properties=Object.entries(i).reduce((g,[y,S])=>(g[y]=Gr(S,!1),g),{})),s&&(v.items=Array.isArray(s)?s.map(g=>Gr(g,!1)):Gr(s,!1)),l&&(v.allOf=l.map(g=>Gr(g,!1))),d)if(d.some(g=>typeof g=="object"&&(g==null?void 0:g.type)==="null")){let g=d.filter(y=>!(typeof y=="object"&&(y==null?void 0:y.type)==="null"));if(g.length===1){let y=Gr(g[0],!1);typeof y=="object"&&(v.nullable=!0,Object.assign(v,y))}else v.anyOf=g.map(y=>Gr(y,!1)),v.nullable=!0}else v.anyOf=d.map(g=>Gr(g,!1));return u&&(v.oneOf=u.map(g=>Gr(g,!1))),p!==void 0&&(v.minLength=p),v}function UN(e){return e!=null&&typeof e=="object"&&e.type==="object"&&(e.properties==null||Object.keys(e.properties).length===0)&&!e.additionalProperties}function FN(e,t){var r,o,n;let i=[],s=[],l=!0,d=(r=t==null?void 0:t.isGemmaModel)!=null?r:!1,u=(o=t==null?void 0:t.providerOptionsName)!=null?o:"google";for(let{role:m,content:c}of e)switch(m){case"system":{if(!l)throw new Re({functionality:"system messages are only supported at the beginning of the conversation"});i.push({text:c});break}case"user":{l=!1;let p=[];for(let f of c)switch(f.type){case"text":{p.push({text:f.text});break}case"file":{let v=f.mediaType==="image/*"?"image/jpeg":f.mediaType;p.push(f.data instanceof URL?{fileData:{mimeType:v,fileUri:f.data.toString()}}:{inlineData:{mimeType:v,data:kt(f.data)}});break}}s.push({role:"user",parts:p});break}case"assistant":{l=!1,s.push({role:"model",parts:c.map(p=>{var f;let v=(f=p.providerOptions)==null?void 0:f[u],g=(v==null?void 0:v.thoughtSignature)!=null?String(v.thoughtSignature):void 0;switch(p.type){case"text":return p.text.length===0?void 0:{text:p.text,thoughtSignature:g};case"reasoning":return p.text.length===0?void 0:{text:p.text,thought:!0,thoughtSignature:g};case"file":{if(p.data instanceof URL)throw new Re({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:p.mediaType,data:kt(p.data)},thoughtSignature:g}}case"tool-call":return{functionCall:{name:p.toolName,args:p.input},thoughtSignature:g}}}).filter(p=>p!==void 0)});break}case"tool":{l=!1;let p=[];for(let f of c){if(f.type==="tool-approval-response")continue;let v=f.output;if(v.type==="content")for(let g of v.value)switch(g.type){case"text":p.push({functionResponse:{name:f.toolName,response:{name:f.toolName,content:g.text}}});break;case"image-data":p.push({inlineData:{mimeType:g.mediaType,data:g.data}},{text:"Tool executed successfully and returned this image as a response"});break;default:p.push({text:JSON.stringify(g)});break}else p.push({functionResponse:{name:f.toolName,response:{name:f.toolName,content:v.type==="execution-denied"?(n=v.reason)!=null?n:"Tool execution denied.":v.value}}})}s.push({role:"user",parts:p});break}}if(d&&i.length>0&&s.length>0&&s[0].role==="user"){let m=i.map(c=>c.text).join(` + +`);s[0].parts.unshift({text:m+` + +`})}return{systemInstruction:i.length>0&&!d?{parts:i}:void 0,contents:s}}function US(e){return e.includes("/")?e:`models/${e}`}var FS=O(()=>A(a.object({responseModalities:a.array(a.enum(["TEXT","IMAGE"])).optional(),thinkingConfig:a.object({thinkingBudget:a.number().optional(),includeThoughts:a.boolean().optional(),thinkingLevel:a.enum(["minimal","low","medium","high"]).optional()}).optional(),cachedContent:a.string().optional(),structuredOutputs:a.boolean().optional(),safetySettings:a.array(a.object({category:a.enum(["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_CIVIC_INTEGRITY"]),threshold:a.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"])})).optional(),threshold:a.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"]).optional(),audioTimestamp:a.boolean().optional(),labels:a.record(a.string(),a.string()).optional(),mediaResolution:a.enum(["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]).optional(),imageConfig:a.object({aspectRatio:a.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"]).optional(),imageSize:a.enum(["1K","2K","4K"]).optional()}).optional(),retrievalConfig:a.object({latLng:a.object({latitude:a.number(),longitude:a.number()}).optional()}).optional()})));function LN({tools:e,toolChoice:t,modelId:r}){var o;e=e!=null&&e.length?e:void 0;let n=[],i=["gemini-flash-latest","gemini-flash-lite-latest","gemini-pro-latest"].some(f=>f===r),s=r.includes("gemini-2")||r.includes("gemini-3")||i,l=r.includes("gemini-1.5-flash")&&!r.includes("-8b"),d=r.includes("gemini-2.5")||r.includes("gemini-3");if(e==null)return{tools:void 0,toolConfig:void 0,toolWarnings:n};let u=e.some(f=>f.type==="function"),m=e.some(f=>f.type==="provider");if(u&&m&&n.push({type:"unsupported",feature:"combination of function and provider-defined tools"}),m){let f=[];return e.filter(g=>g.type==="provider").forEach(g=>{switch(g.id){case"google.google_search":s?f.push({googleSearch:{}}):l?f.push({googleSearchRetrieval:{dynamicRetrievalConfig:{mode:g.args.mode,dynamicThreshold:g.args.dynamicThreshold}}}):f.push({googleSearchRetrieval:{}});break;case"google.enterprise_web_search":s?f.push({enterpriseWebSearch:{}}):n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`,details:"Enterprise Web Search requires Gemini 2.0 or newer."});break;case"google.url_context":s?f.push({urlContext:{}}):n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`,details:"The URL context tool is not supported with other Gemini models than Gemini 2."});break;case"google.code_execution":s?f.push({codeExecution:{}}):n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`,details:"The code execution tools is not supported with other Gemini models than Gemini 2."});break;case"google.file_search":d?f.push({fileSearch:{...g.args}}):n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`,details:"The file search tool is only supported with Gemini 2.5 models and Gemini 3 models."});break;case"google.vertex_rag_store":s?f.push({retrieval:{vertex_rag_store:{rag_resources:{rag_corpus:g.args.ragCorpus},similarity_top_k:g.args.topK}}}):n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`,details:"The RAG store tool is not supported with other Gemini models than Gemini 2."});break;case"google.google_maps":s?f.push({googleMaps:{}}):n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`,details:"The Google Maps grounding tool is not supported with Gemini models other than Gemini 2 or newer."});break;default:n.push({type:"unsupported",feature:`provider-defined tool ${g.id}`});break}}),{tools:f.length>0?f:void 0,toolConfig:void 0,toolWarnings:n}}let c=[];for(let f of e)f.type==="function"?c.push({name:f.name,description:(o=f.description)!=null?o:"",parameters:Gr(f.inputSchema)}):n.push({type:"unsupported",feature:`function tool ${f.name}`});if(t==null)return{tools:[{functionDeclarations:c}],toolConfig:void 0,toolWarnings:n};let p=t.type;switch(p){case"auto":return{tools:[{functionDeclarations:c}],toolConfig:{functionCallingConfig:{mode:"AUTO"}},toolWarnings:n};case"none":return{tools:[{functionDeclarations:c}],toolConfig:{functionCallingConfig:{mode:"NONE"}},toolWarnings:n};case"required":return{tools:[{functionDeclarations:c}],toolConfig:{functionCallingConfig:{mode:"ANY"}},toolWarnings:n};case"tool":return{tools:[{functionDeclarations:c}],toolConfig:{functionCallingConfig:{mode:"ANY",allowedFunctionNames:[t.toolName]}},toolWarnings:n};default:{let f=p;throw new Re({functionality:`tool choice type: ${f}`})}}}function LS({finishReason:e,hasToolCalls:t}){switch(e){case"STOP":return t?"tool-calls":"stop";case"MAX_TOKENS":return"length";case"IMAGE_SAFETY":case"RECITATION":case"SAFETY":case"BLOCKLIST":case"PROHIBITED_CONTENT":case"SPII":return"content-filter";case"MALFORMED_FUNCTION_CALL":return"error";default:return"other"}}var qN=class{constructor(e,t){this.specificationVersion="v3";var r;this.modelId=e,this.config=t,this.generateId=(r=t.generateId)!=null?r:Fe}get provider(){return this.config.provider}get supportedUrls(){var e,t,r;return(r=(t=(e=this.config).supportedUrls)==null?void 0:t.call(e))!=null?r:{}}async getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,topK:n,frequencyPenalty:i,presencePenalty:s,stopSequences:l,responseFormat:d,seed:u,tools:m,toolChoice:c,providerOptions:p}){var f;let v=[],g=this.config.provider.includes("vertex")?"vertex":"google",y=await Ee({provider:g,providerOptions:p,schema:FS});y==null&&g!=="google"&&(y=await Ee({provider:"google",providerOptions:p,schema:FS})),m!=null&&m.some(I=>I.type==="provider"&&I.id==="google.vertex_rag_store")&&!this.config.provider.startsWith("google.vertex.")&&v.push({type:"other",message:`The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`});let S=this.modelId.toLowerCase().startsWith("gemma-"),{contents:b,systemInstruction:_}=FN(e,{isGemmaModel:S,providerOptionsName:g}),{tools:k,toolConfig:w,toolWarnings:h}=LN({tools:m,toolChoice:c,modelId:this.modelId});return{args:{generationConfig:{maxOutputTokens:t,temperature:r,topK:n,topP:o,frequencyPenalty:i,presencePenalty:s,stopSequences:l,seed:u,responseMimeType:(d==null?void 0:d.type)==="json"?"application/json":void 0,responseSchema:(d==null?void 0:d.type)==="json"&&d.schema!=null&&((f=y==null?void 0:y.structuredOutputs)==null||f)?Gr(d.schema):void 0,...(y==null?void 0:y.audioTimestamp)&&{audioTimestamp:y.audioTimestamp},responseModalities:y==null?void 0:y.responseModalities,thinkingConfig:y==null?void 0:y.thinkingConfig,...(y==null?void 0:y.mediaResolution)&&{mediaResolution:y.mediaResolution},...(y==null?void 0:y.imageConfig)&&{imageConfig:y.imageConfig}},contents:b,systemInstruction:S?void 0:_,safetySettings:y==null?void 0:y.safetySettings,tools:k,toolConfig:y!=null&&y.retrievalConfig?{...w,retrievalConfig:y.retrievalConfig}:w,cachedContent:y==null?void 0:y.cachedContent,labels:y==null?void 0:y.labels},warnings:[...v,...h],providerOptionsName:g}}async doGenerate(e){var t,r,o,n,i,s,l,d,u,m;let{args:c,warnings:p,providerOptionsName:f}=await this.getArgs(e),v=_e(await ze(this.config.headers),e.headers),{responseHeaders:g,value:y,rawValue:S}=await we({url:`${this.config.baseURL}/${US(this.modelId)}:generateContent`,headers:v,body:c,failedResponseHandler:uo,successfulResponseHandler:ke(VN),abortSignal:e.abortSignal,fetch:this.config.fetch}),b=y.candidates[0],_=[],k=(r=(t=b.content)==null?void 0:t.parts)!=null?r:[],w=y.usageMetadata,h;for(let j of k)if("executableCode"in j&&((o=j.executableCode)!=null&&o.code)){let U=this.config.generateId();h=U,_.push({type:"tool-call",toolCallId:U,toolName:"code_execution",input:JSON.stringify(j.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in j&&j.codeExecutionResult)_.push({type:"tool-result",toolCallId:h,toolName:"code_execution",result:{outcome:j.codeExecutionResult.outcome,output:(n=j.codeExecutionResult.output)!=null?n:""}}),h=void 0;else if("text"in j&&j.text!=null){let U=j.thoughtSignature?{[f]:{thoughtSignature:j.thoughtSignature}}:void 0;if(j.text.length===0){if(U!=null&&_.length>0){let F=_[_.length-1];F.providerMetadata=U}}else _.push({type:j.thought===!0?"reasoning":"text",text:j.text,providerMetadata:U})}else"functionCall"in j?_.push({type:"tool-call",toolCallId:this.config.generateId(),toolName:j.functionCall.name,input:JSON.stringify(j.functionCall.args),providerMetadata:j.thoughtSignature?{[f]:{thoughtSignature:j.thoughtSignature}}:void 0}):"inlineData"in j&&_.push({type:"file",data:j.inlineData.data,mediaType:j.inlineData.mimeType,providerMetadata:j.thoughtSignature?{[f]:{thoughtSignature:j.thoughtSignature}}:void 0});let I=(i=qS({groundingMetadata:b.groundingMetadata,generateId:this.config.generateId}))!=null?i:[];for(let j of I)_.push(j);return{content:_,finishReason:{unified:LS({finishReason:b.finishReason,hasToolCalls:_.some(j=>j.type==="tool-call"&&!j.providerExecuted)}),raw:(s=b.finishReason)!=null?s:void 0},usage:zS(w),warnings:p,providerMetadata:{[f]:{promptFeedback:(l=y.promptFeedback)!=null?l:null,groundingMetadata:(d=b.groundingMetadata)!=null?d:null,urlContextMetadata:(u=b.urlContextMetadata)!=null?u:null,safetyRatings:(m=b.safetyRatings)!=null?m:null,usageMetadata:w!=null?w:null}},request:{body:c},response:{headers:g,body:S}}}async doStream(e){let{args:t,warnings:r,providerOptionsName:o}=await this.getArgs(e),n=_e(await ze(this.config.headers),e.headers),{responseHeaders:i,value:s}=await we({url:`${this.config.baseURL}/${US(this.modelId)}:streamGenerateContent?alt=sse`,headers:n,body:t,failedResponseHandler:uo,successfulResponseHandler:Nt(GN),abortSignal:e.abortSignal,fetch:this.config.fetch}),l={unified:"other",raw:void 0},d,u,m=this.config.generateId,c=!1,p=null,f=null,v=0,g=new Set,y;return{stream:s.pipeThrough(new TransformStream({start(S){S.enqueue({type:"stream-start",warnings:r})},transform(S,b){var _,k,w,h,I,j,U,F;if(e.includeRawChunks&&b.enqueue({type:"raw",rawValue:S.rawValue}),!S.success){b.enqueue({type:"error",error:S.error});return}let Z=S.value,L=Z.usageMetadata;L!=null&&(d=L);let M=(_=Z.candidates)==null?void 0:_[0];if(M==null)return;let q=M.content,C=qS({groundingMetadata:M.groundingMetadata,generateId:m});if(C!=null)for(let E of C)E.sourceType==="url"&&!g.has(E.url)&&(g.add(E.url),b.enqueue(E));if(q!=null){let E=(k=q.parts)!=null?k:[];for(let P of E)if("executableCode"in P&&((w=P.executableCode)!=null&&w.code)){let se=m();y=se,b.enqueue({type:"tool-call",toolCallId:se,toolName:"code_execution",input:JSON.stringify(P.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in P&&P.codeExecutionResult){let se=y;se&&(b.enqueue({type:"tool-result",toolCallId:se,toolName:"code_execution",result:{outcome:P.codeExecutionResult.outcome,output:(h=P.codeExecutionResult.output)!=null?h:""}}),y=void 0)}else if("text"in P&&P.text!=null){let se=P.thoughtSignature?{[o]:{thoughtSignature:P.thoughtSignature}}:void 0;P.text.length===0?se!=null&&p!==null&&b.enqueue({type:"text-delta",id:p,delta:"",providerMetadata:se}):P.thought===!0?(p!==null&&(b.enqueue({type:"text-end",id:p}),p=null),f===null&&(f=String(v++),b.enqueue({type:"reasoning-start",id:f,providerMetadata:se})),b.enqueue({type:"reasoning-delta",id:f,delta:P.text,providerMetadata:se})):(f!==null&&(b.enqueue({type:"reasoning-end",id:f}),f=null),p===null&&(p=String(v++),b.enqueue({type:"text-start",id:p,providerMetadata:se})),b.enqueue({type:"text-delta",id:p,delta:P.text,providerMetadata:se}))}else"inlineData"in P&&b.enqueue({type:"file",mediaType:P.inlineData.mimeType,data:P.inlineData.data});let te=ZN({parts:q.parts,generateId:m,providerOptionsName:o});if(te!=null)for(let P of te)b.enqueue({type:"tool-input-start",id:P.toolCallId,toolName:P.toolName,providerMetadata:P.providerMetadata}),b.enqueue({type:"tool-input-delta",id:P.toolCallId,delta:P.args,providerMetadata:P.providerMetadata}),b.enqueue({type:"tool-input-end",id:P.toolCallId,providerMetadata:P.providerMetadata}),b.enqueue({type:"tool-call",toolCallId:P.toolCallId,toolName:P.toolName,input:P.args,providerMetadata:P.providerMetadata}),c=!0}M.finishReason!=null&&(l={unified:LS({finishReason:M.finishReason,hasToolCalls:c}),raw:M.finishReason},u={[o]:{promptFeedback:(I=Z.promptFeedback)!=null?I:null,groundingMetadata:(j=M.groundingMetadata)!=null?j:null,urlContextMetadata:(U=M.urlContextMetadata)!=null?U:null,safetyRatings:(F=M.safetyRatings)!=null?F:null}},L!=null&&(u[o].usageMetadata=L))},flush(S){p!==null&&S.enqueue({type:"text-end",id:p}),f!==null&&S.enqueue({type:"reasoning-end",id:f}),S.enqueue({type:"finish",finishReason:l,usage:zS(d),providerMetadata:u})}})),response:{headers:i},request:{body:t}}}};function ZN({parts:e,generateId:t,providerOptionsName:r}){let o=e==null?void 0:e.filter(n=>"functionCall"in n);return o==null||o.length===0?void 0:o.map(n=>({type:"tool-call",toolCallId:t(),toolName:n.functionCall.name,args:JSON.stringify(n.functionCall.args),providerMetadata:n.thoughtSignature?{[r]:{thoughtSignature:n.thoughtSignature}}:void 0}))}function qS({groundingMetadata:e,generateId:t}){var r,o,n,i,s;if(!(e!=null&&e.groundingChunks))return;let l=[];for(let d of e.groundingChunks)if(d.web!=null)l.push({type:"source",sourceType:"url",id:t(),url:d.web.uri,title:(r=d.web.title)!=null?r:void 0});else if(d.retrievedContext!=null){let u=d.retrievedContext.uri,m=d.retrievedContext.fileSearchStore;if(u&&(u.startsWith("http://")||u.startsWith("https://")))l.push({type:"source",sourceType:"url",id:t(),url:u,title:(o=d.retrievedContext.title)!=null?o:void 0});else if(u){let c=(n=d.retrievedContext.title)!=null?n:"Unknown Document",p="application/octet-stream",f;u.endsWith(".pdf")?(p="application/pdf",f=u.split("/").pop()):u.endsWith(".txt")?(p="text/plain",f=u.split("/").pop()):u.endsWith(".docx")?(p="application/vnd.openxmlformats-officedocument.wordprocessingml.document",f=u.split("/").pop()):u.endsWith(".doc")?(p="application/msword",f=u.split("/").pop()):(u.match(/\.(md|markdown)$/)&&(p="text/markdown"),f=u.split("/").pop()),l.push({type:"source",sourceType:"document",id:t(),mediaType:p,title:c,filename:f})}else if(m){let c=(i=d.retrievedContext.title)!=null?i:"Unknown Document";l.push({type:"source",sourceType:"document",id:t(),mediaType:"application/octet-stream",title:c,filename:m.split("/").pop()})}}else d.maps!=null&&d.maps.uri&&l.push({type:"source",sourceType:"url",id:t(),url:d.maps.uri,title:(s=d.maps.title)!=null?s:void 0});return l.length>0?l:void 0}var VS=()=>a.object({webSearchQueries:a.array(a.string()).nullish(),retrievalQueries:a.array(a.string()).nullish(),searchEntryPoint:a.object({renderedContent:a.string()}).nullish(),groundingChunks:a.array(a.object({web:a.object({uri:a.string(),title:a.string().nullish()}).nullish(),retrievedContext:a.object({uri:a.string().nullish(),title:a.string().nullish(),text:a.string().nullish(),fileSearchStore:a.string().nullish()}).nullish(),maps:a.object({uri:a.string().nullish(),title:a.string().nullish(),text:a.string().nullish(),placeId:a.string().nullish()}).nullish()})).nullish(),groundingSupports:a.array(a.object({segment:a.object({startIndex:a.number().nullish(),endIndex:a.number().nullish(),text:a.string().nullish()}).nullish(),segment_text:a.string().nullish(),groundingChunkIndices:a.array(a.number()).nullish(),supportChunkIndices:a.array(a.number()).nullish(),confidenceScores:a.array(a.number()).nullish(),confidenceScore:a.array(a.number()).nullish()})).nullish(),retrievalMetadata:a.union([a.object({webDynamicRetrievalScore:a.number()}),a.object({})]).nullish()}),GS=()=>a.object({parts:a.array(a.union([a.object({functionCall:a.object({name:a.string(),args:a.unknown()}),thoughtSignature:a.string().nullish()}),a.object({inlineData:a.object({mimeType:a.string(),data:a.string()}),thoughtSignature:a.string().nullish()}),a.object({executableCode:a.object({language:a.string(),code:a.string()}).nullish(),codeExecutionResult:a.object({outcome:a.string(),output:a.string().nullish()}).nullish(),text:a.string().nullish(),thought:a.boolean().nullish(),thoughtSignature:a.string().nullish()})])).nullish()}),xu=()=>a.object({category:a.string().nullish(),probability:a.string().nullish(),probabilityScore:a.number().nullish(),severity:a.string().nullish(),severityScore:a.number().nullish(),blocked:a.boolean().nullish()}),HS=a.object({cachedContentTokenCount:a.number().nullish(),thoughtsTokenCount:a.number().nullish(),promptTokenCount:a.number().nullish(),candidatesTokenCount:a.number().nullish(),totalTokenCount:a.number().nullish(),trafficType:a.string().nullish()}),BS=()=>a.object({urlMetadata:a.array(a.object({retrievedUrl:a.string(),urlRetrievalStatus:a.string()}))}),VN=O(()=>A(a.object({candidates:a.array(a.object({content:GS().nullish().or(a.object({}).strict()),finishReason:a.string().nullish(),safetyRatings:a.array(xu()).nullish(),groundingMetadata:VS().nullish(),urlContextMetadata:BS().nullish()})),usageMetadata:HS.nullish(),promptFeedback:a.object({blockReason:a.string().nullish(),safetyRatings:a.array(xu()).nullish()}).nullish()}))),GN=O(()=>A(a.object({candidates:a.array(a.object({content:GS().nullish(),finishReason:a.string().nullish(),safetyRatings:a.array(xu()).nullish(),groundingMetadata:VS().nullish(),urlContextMetadata:BS().nullish()})).nullish(),usageMetadata:HS.nullish(),promptFeedback:a.object({blockReason:a.string().nullish(),safetyRatings:a.array(xu()).nullish()}).nullish()}))),HN=je({id:"google.code_execution",inputSchema:a.object({language:a.string().describe("The programming language of the code."),code:a.string().describe("The code to be executed.")}),outputSchema:a.object({outcome:a.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),output:a.string().describe("The output from the code execution.")})}),BN=Le({id:"google.enterprise_web_search",inputSchema:O(()=>A(a.object({})))}),JN=a.object({fileSearchStoreNames:a.array(a.string()).describe("The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"),topK:a.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),metadataFilter:a.string().describe("Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.").optional()}).passthrough(),WN=O(()=>A(JN)),KN=Le({id:"google.file_search",inputSchema:WN}),YN=Le({id:"google.google_maps",inputSchema:O(()=>A(a.object({})))}),XN=Le({id:"google.google_search",inputSchema:O(()=>A(a.object({mode:a.enum(["MODE_DYNAMIC","MODE_UNSPECIFIED"]).default("MODE_UNSPECIFIED"),dynamicThreshold:a.number().default(1)})))}),QN=Le({id:"google.url_context",inputSchema:O(()=>A(a.object({})))}),ej=Le({id:"google.vertex_rag_store",inputSchema:a.object({ragCorpus:a.string(),topK:a.number().optional()})}),tj={googleSearch:XN,enterpriseWebSearch:BN,googleMaps:YN,urlContext:QN,fileSearch:KN,codeExecution:HN,vertexRagStore:ej},rj=class{constructor(e,t,r){this.modelId=e,this.settings=t,this.config=r,this.specificationVersion="v3"}get maxImagesPerCall(){var e;return(e=this.settings.maxImagesPerCall)!=null?e:4}get provider(){return this.config.provider}async doGenerate(e){var t,r,o;let{prompt:n,n:i=1,size:s,aspectRatio:l="1:1",seed:d,providerOptions:u,headers:m,abortSignal:c,files:p,mask:f}=e,v=[];if(p!=null&&p.length>0)throw new Error("Google Generative AI does not support image editing. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.");if(f!=null)throw new Error("Google Generative AI does not support image editing with masks. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.");s!=null&&v.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."}),d!=null&&v.push({type:"unsupported",feature:"seed",details:"This model does not support the `seed` option through this provider."});let g=await Ee({provider:"google",providerOptions:u,schema:oj}),y=(o=(r=(t=this.config._internal)==null?void 0:t.currentDate)==null?void 0:r.call(t))!=null?o:new Date,S={sampleCount:i};l!=null&&(S.aspectRatio=l),g&&Object.assign(S,g);let b={instances:[{prompt:n}],parameters:S},{responseHeaders:_,value:k}=await we({url:`${this.config.baseURL}/models/${this.modelId}:predict`,headers:_e(await ze(this.config.headers),m),body:b,failedResponseHandler:uo,successfulResponseHandler:ke(nj),abortSignal:c,fetch:this.config.fetch});return{images:k.predictions.map(w=>w.bytesBase64Encoded),warnings:v!=null?v:[],providerMetadata:{google:{images:k.predictions.map(w=>({}))}},response:{timestamp:y,modelId:this.modelId,headers:_}}}},nj=O(()=>A(a.object({predictions:a.array(a.object({bytesBase64Encoded:a.string()})).default([])}))),oj=O(()=>A(a.object({personGeneration:a.enum(["dont_allow","allow_adult","allow_all"]).nullish(),aspectRatio:a.enum(["1:1","3:4","4:3","9:16","16:9"]).nullish()}))),aj=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}get maxVideosPerCall(){return 4}async doGenerate(e){var t,r,o,n,i,s,l,d;let u=(o=(r=(t=this.config._internal)==null?void 0:t.currentDate)==null?void 0:r.call(t))!=null?o:new Date,m=[],c=await Ee({provider:"google",providerOptions:e.providerOptions,schema:ij}),p=[{}],f=p[0];if(e.prompt!=null&&(f.prompt=e.prompt),e.image!=null)if(e.image.type==="url")m.push({type:"unsupported",feature:"URL-based image input",details:"Google Generative AI video models require base64-encoded images. URL will be ignored."});else{let Z=typeof e.image.data=="string"?e.image.data:pr(e.image.data);f.image={inlineData:{mimeType:e.image.mediaType||"image/png",data:Z}}}(c==null?void 0:c.referenceImages)!=null&&(f.referenceImages=c.referenceImages.map(Z=>Z.bytesBase64Encoded?{inlineData:{mimeType:"image/png",data:Z.bytesBase64Encoded}}:Z.gcsUri?{gcsUri:Z.gcsUri}:Z));let v={sampleCount:e.n};if(e.aspectRatio&&(v.aspectRatio=e.aspectRatio),e.resolution){let Z={"1280x720":"720p","1920x1080":"1080p","3840x2160":"4k"};v.resolution=Z[e.resolution]||e.resolution}if(e.duration&&(v.durationSeconds=e.duration),e.seed&&(v.seed=e.seed),c!=null){let Z=c;Z.personGeneration!==void 0&&Z.personGeneration!==null&&(v.personGeneration=Z.personGeneration),Z.negativePrompt!==void 0&&Z.negativePrompt!==null&&(v.negativePrompt=Z.negativePrompt);for(let[L,M]of Object.entries(Z))["pollIntervalMs","pollTimeoutMs","personGeneration","negativePrompt","referenceImages"].includes(L)||(v[L]=M)}let{value:g}=await we({url:`${this.config.baseURL}/models/${this.modelId}:predictLongRunning`,headers:_e(await ze(this.config.headers),e.headers),body:{instances:p,parameters:v},successfulResponseHandler:ke(ZS),failedResponseHandler:uo,abortSignal:e.abortSignal,fetch:this.config.fetch}),y=g.name;if(!y)throw new oe({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:"No operation name returned from API"});let S=(n=c==null?void 0:c.pollIntervalMs)!=null?n:1e4,b=(i=c==null?void 0:c.pollTimeoutMs)!=null?i:6e5,_=Date.now(),k=g,w;for(;!k.done;){if(Date.now()-_>b)throw new oe({name:"GOOGLE_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${b}ms`});if(await hu(S),(s=e.abortSignal)!=null&&s.aborted)throw new oe({name:"GOOGLE_VIDEO_GENERATION_ABORTED",message:"Video generation request was aborted"});let{value:Z,responseHeaders:L}=await Ri({url:`${this.config.baseURL}/${y}`,headers:_e(await ze(this.config.headers),e.headers),successfulResponseHandler:ke(ZS),failedResponseHandler:uo,abortSignal:e.abortSignal,fetch:this.config.fetch});k=Z,w=L}if(k.error)throw new oe({name:"GOOGLE_VIDEO_GENERATION_FAILED",message:`Video generation failed: ${k.error.message}`});let h=k.response;if(!((l=h==null?void 0:h.generateVideoResponse)!=null&&l.generatedSamples)||h.generateVideoResponse.generatedSamples.length===0)throw new oe({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:`No videos in response. Response: ${JSON.stringify(k)}`});let I=[],j=[],U=await ze(this.config.headers),F=U==null?void 0:U["x-goog-api-key"];for(let Z of h.generateVideoResponse.generatedSamples)if((d=Z.video)!=null&&d.uri){let L=F?`${Z.video.uri}${Z.video.uri.includes("?")?"&":"?"}key=${F}`:Z.video.uri;I.push({type:"url",url:L,mediaType:"video/mp4"}),j.push({uri:Z.video.uri})}if(I.length===0)throw new oe({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:"No valid videos in response"});return{videos:I,warnings:m,response:{timestamp:u,modelId:this.modelId,headers:w},providerMetadata:{google:{videos:j}}}}},ZS=a.object({name:a.string().nullish(),done:a.boolean().nullish(),error:a.object({code:a.number().nullish(),message:a.string(),status:a.string().nullish()}).nullish(),response:a.object({generateVideoResponse:a.object({generatedSamples:a.array(a.object({video:a.object({uri:a.string().nullish()}).nullish()})).nullish()}).nullish()}).nullish()}),ij=O(()=>A(a.object({pollIntervalMs:a.number().positive().nullish(),pollTimeoutMs:a.number().positive().nullish(),personGeneration:a.enum(["dont_allow","allow_adult","allow_all"]).nullish(),negativePrompt:a.string().nullish(),referenceImages:a.array(a.object({bytesBase64Encoded:a.string().nullish(),gcsUri:a.string().nullish()})).nullish()}).passthrough()));function yh(e={}){var t,r;let o=(t=Vr(e.baseURL))!=null?t:"https://generativelanguage.googleapis.com/v1beta",n=(r=e.name)!=null?r:"google.generative-ai",i=()=>Ct({"x-goog-api-key":ya({apiKey:e.apiKey,environmentVariableName:"GOOGLE_GENERATIVE_AI_API_KEY",description:"Google Generative AI"}),...e.headers},`ai-sdk/google/${RN}`),s=c=>{var p;return new qN(c,{provider:n,baseURL:o,headers:i,generateId:(p=e.generateId)!=null?p:Fe,supportedUrls:()=>({"*":[new RegExp(`^${o}/files/.*$`),new RegExp("^https://(?:www\\.)?youtube\\.com/watch\\?v=[\\w-]+(?:&[\\w=&.-]*)?$"),new RegExp("^https://youtu\\.be/[\\w-]+(?:\\?[\\w=&.-]*)?$")]}),fetch:e.fetch})},l=c=>new jN(c,{provider:n,baseURL:o,headers:i,fetch:e.fetch}),d=(c,p={})=>new rj(c,p,{provider:n,baseURL:o,headers:i,fetch:e.fetch}),u=c=>{var p;return new aj(c,{provider:n,baseURL:o,headers:i,fetch:e.fetch,generateId:(p=e.generateId)!=null?p:Fe})},m=function(c){if(new.target)throw new Error("The Google Generative AI model function cannot be called with the new keyword.");return s(c)};return m.specificationVersion="v3",m.languageModel=s,m.chat=s,m.generativeAI=s,m.embedding=l,m.embeddingModel=l,m.textEmbedding=l,m.textEmbeddingModel=l,m.image=d,m.imageModel=d,m.video=u,m.videoModel=u,m.tools=tj,m}var qB=yh();var sj=Object.defineProperty,lj=Object.defineProperties,uj=Object.getOwnPropertyDescriptors,Tu=Object.getOwnPropertySymbols,Ok=Object.prototype.hasOwnProperty,Rk=Object.prototype.propertyIsEnumerable,Mk=e=>{throw TypeError(e)},JS=(e,t,r)=>t in e?sj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,re=(e,t)=>{for(var r in t||(t={}))Ok.call(t,r)&&JS(e,r,t[r]);if(Tu)for(var r of Tu(t))Rk.call(t,r)&&JS(e,r,t[r]);return e},qe=(e,t)=>lj(e,uj(t)),kh=(e,t)=>{var r={};for(var o in e)Ok.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&Tu)for(var o of Tu(e))t.indexOf(o)<0&&Rk.call(e,o)&&(r[o]=e[o]);return r},cj=(e,t,r)=>t.has(e)||Mk("Cannot "+r),WS=(e,t,r)=>(cj(e,t,"read from private field"),r?r.call(e):t.get(e)),dj=(e,t,r)=>t.has(e)?Mk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Nk="vercel.ai.error",pj=Symbol.for(Nk),KS,YS,et=class jk extends(YS=Error,KS=pj,YS){constructor({name:t,message:r,cause:o}){super(r),this[KS]=!0,this.name=t,this.cause=o}static isInstance(t){return jk.hasMarker(t,Nk)}static hasMarker(t,r){let o=Symbol.for(r);return t!=null&&typeof t=="object"&&o in t&&typeof t[o]=="boolean"&&t[o]===!0}},Dk="AI_APICallError",zk=`vercel.ai.error.${Dk}`,mj=Symbol.for(zk),XS,QS,$r=class extends(QS=et,XS=mj,QS){constructor({message:e,url:t,requestBodyValues:r,statusCode:o,responseHeaders:n,responseBody:i,cause:s,isRetryable:l=o!=null&&(o===408||o===409||o===429||o>=500),data:d}){super({name:Dk,message:e,cause:s}),this[XS]=!0,this.url=t,this.requestBodyValues=r,this.statusCode=o,this.responseHeaders=n,this.responseBody=i,this.isRetryable=l,this.data=d}static isInstance(e){return et.hasMarker(e,zk)}},Uk="AI_EmptyResponseBodyError",Fk=`vercel.ai.error.${Uk}`,fj=Symbol.for(Fk),ek,tk,gj=class extends(tk=et,ek=fj,tk){constructor({message:e="Empty response body"}={}){super({name:Uk,message:e}),this[ek]=!0}static isInstance(e){return et.hasMarker(e,Fk)}};function Lk(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var qk="AI_InvalidArgumentError",Zk=`vercel.ai.error.${qk}`,hj=Symbol.for(Zk),rk,nk,Vk=class extends(nk=et,rk=hj,nk){constructor({message:e,cause:t,argument:r}){super({name:qk,message:e,cause:t}),this[rk]=!0,this.argument=r}static isInstance(e){return et.hasMarker(e,Zk)}},Gk="AI_InvalidPromptError",Hk=`vercel.ai.error.${Gk}`,vj=Symbol.for(Hk),ok,ak,yj=class extends(ak=et,ok=vj,ak){constructor({prompt:e,message:t,cause:r}){super({name:Gk,message:`Invalid prompt: ${t}`,cause:r}),this[ok]=!0,this.prompt=e}static isInstance(e){return et.hasMarker(e,Hk)}},Bk="AI_InvalidResponseDataError",Jk=`vercel.ai.error.${Bk}`,_j=Symbol.for(Jk),ik,sk,Di=class extends(sk=et,ik=_j,sk){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:Bk,message:t}),this[ik]=!0,this.data=e}static isInstance(e){return et.hasMarker(e,Jk)}},Wk="AI_JSONParseError",Kk=`vercel.ai.error.${Wk}`,bj=Symbol.for(Kk),lk,uk,$u=class extends(uk=et,lk=bj,uk){constructor({text:e,cause:t}){super({name:Wk,message:`JSON parsing failed: Text: ${e}. +Error message: ${Lk(t)}`,cause:t}),this[lk]=!0,this.text=e}static isInstance(e){return et.hasMarker(e,Kk)}},Yk="AI_LoadAPIKeyError",Xk=`vercel.ai.error.${Yk}`,xj=Symbol.for(Xk),ck,dk,wu=class extends(dk=et,ck=xj,dk){constructor({message:e}){super({name:Yk,message:e}),this[ck]=!0}static isInstance(e){return et.hasMarker(e,Xk)}},Qk="AI_LoadSettingError",eI=`vercel.ai.error.${Qk}`,wj=Symbol.for(eI),pk,mk,JB=class extends(mk=et,pk=wj,mk){constructor({message:e}){super({name:Qk,message:e}),this[pk]=!0}static isInstance(e){return et.hasMarker(e,eI)}},tI="AI_NoContentGeneratedError",rI=`vercel.ai.error.${tI}`,Sj=Symbol.for(rI),fk,gk,Ah=class extends(gk=et,fk=Sj,gk){constructor({message:e="No content generated."}={}){super({name:tI,message:e}),this[fk]=!0}static isInstance(e){return et.hasMarker(e,rI)}},nI="AI_NoSuchModelError",oI=`vercel.ai.error.${nI}`,kj=Symbol.for(oI),hk,vk,WB=class extends(vk=et,hk=kj,vk){constructor({errorName:e=nI,modelId:t,modelType:r,message:o=`No such ${r}: ${t}`}){super({name:e,message:o}),this[hk]=!0,this.modelId=t,this.modelType=r}static isInstance(e){return et.hasMarker(e,oI)}},aI="AI_TooManyEmbeddingValuesForCallError",iI=`vercel.ai.error.${aI}`,Ij=Symbol.for(iI),yk,_k,KB=class extends(_k=et,yk=Ij,_k){constructor(e){super({name:aI,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[yk]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return et.hasMarker(e,iI)}},sI="AI_TypeValidationError",lI=`vercel.ai.error.${sI}`,Tj=Symbol.for(lI),bk,xk,zi=class Ih extends(xk=et,bk=Tj,xk){constructor({value:t,cause:r}){super({name:sI,message:`Type validation failed: Value: ${JSON.stringify(t)}. +Error message: ${Lk(r)}`,cause:r}),this[bk]=!0,this.value=t}static isInstance(t){return et.hasMarker(t,lI)}static wrap({value:t,cause:r}){return Ih.isInstance(r)&&r.value===t?r:new Ih({value:t,cause:r})}},uI="AI_UnsupportedFunctionalityError",cI=`vercel.ai.error.${uI}`,$j=Symbol.for(cI),wk,Sk,dn=class extends(Sk=et,wk=$j,Sk){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:uI,message:t}),this[wk]=!0,this.functionality=e}static isInstance(e){return et.hasMarker(e,cI)}},kk=class extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}};function _h(e){}function Ej(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=_h,onError:r=_h,onRetry:o=_h,onComment:n}=e,i="",s=!0,l,d="",u="";function m(g){let y=s?g.replace(/^\xEF\xBB\xBF/,""):g,[S,b]=Cj(`${i}${y}`);for(let _ of S)c(_);i=b,s=!1}function c(g){if(g===""){f();return}if(g.startsWith(":")){n&&n(g.slice(g.startsWith(": ")?2:1));return}let y=g.indexOf(":");if(y!==-1){let S=g.slice(0,y),b=g[y+1]===" "?2:1,_=g.slice(y+b);p(S,_,g);return}p(g,"",g)}function p(g,y,S){switch(g){case"event":u=y;break;case"data":d=`${d}${y} +`;break;case"id":l=y.includes("\0")?void 0:y;break;case"retry":/^\d+$/.test(y)?o(parseInt(y,10)):r(new kk(`Invalid \`retry\` value: "${y}"`,{type:"invalid-retry",value:y,line:S}));break;default:r(new kk(`Unknown field "${g.length>20?`${g.slice(0,20)}\u2026`:g}"`,{type:"unknown-field",field:g,value:y,line:S}));break}}function f(){d.length>0&&t({id:l,event:u||void 0,data:d.endsWith(` +`)?d.slice(0,-1):d}),l=void 0,d="",u=""}function v(g={}){i&&g.consume&&c(i),s=!0,l=void 0,d="",u="",i=""}return{feed:m,reset:v}}function Cj(e){let t=[],r="",o=0;for(;o{n.enqueue(i)},onError(i){e==="terminate"?n.error(i):typeof e=="function"&&e(i)},onRetry:t,onComment:r})},transform(n){o.feed(n)}})}};function xa(...e){return e.reduce((t,r)=>re(re({},t),r!=null?r:{}),{})}function Pu(e){return Object.fromEntries([...e.headers])}var{btoa:Pj,atob:e3}=globalThis;function Oj(e){let t="";for(let r=0;r{let n=()=>{let i=r.length,s=new Array(t);for(let l=0;l`${e}${o}${n()}`},Tr=Mj();function Th(e){return(e instanceof Error||e instanceof DOMException)&&(e.name==="AbortError"||e.name==="ResponseAborted"||e.name==="TimeoutError")}var Nj=["fetch failed","failed to fetch"];function jj({error:e,url:t,requestBodyValues:r}){if(Th(e))return e;if(e instanceof TypeError&&Nj.includes(e.message.toLowerCase())){let o=e.cause;if(o!=null)return new $r({message:`Cannot connect to API: ${o.message}`,cause:o,url:t,requestBodyValues:r,isRetryable:!0})}return e}function Dj(e=globalThis){var t,r,o;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(o=(r=e.process)==null?void 0:r.versions)!=null&&o.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function zj(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((r,o)=>{t[o.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(let[r,o]of e)o!=null&&(t[r.toLowerCase()]=o)}return t}function Uj(e,...t){let r=new Headers(zj(e)),o=r.get("user-agent")||"";return r.set("user-agent",[o,...t].filter(Boolean).join(" ")),Object.fromEntries(r.entries())}var Fj="4.0.1";function Lj({apiKey:e,environmentVariableName:t,apiKeyParameterName:r="apiKey",description:o}){if(typeof e=="string")return e;if(e!=null)throw new wu({message:`${o} API key must be a string.`});if(typeof process=="undefined")throw new wu({message:`${o} API key is missing. Pass it using the '${r}' parameter. Environment variables is not supported in this environment.`});if(e=process.env[t],e==null)throw new wu({message:`${o} API key is missing. Pass it using the '${r}' parameter or the ${t} environment variable.`});if(typeof e!="string")throw new wu({message:`${o} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var qj=/"__proto__"\s*:/,Zj=/"constructor"\s*:/;function $k(e){let t=JSON.parse(e);return t===null||typeof t!="object"||qj.test(e)===!1&&Zj.test(e)===!1?t:Vj(t)}function Vj(e){let t=[e];for(;t.length;){let r=t;t=[];for(let o of r){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let n in o){let i=o[n];i&&typeof i=="object"&&t.push(i)}}}return e}function Ph(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(r){return $k(e)}try{return $k(e)}finally{Error.stackTraceLimit=t}}function Su(e){if(e.type==="object"){e.additionalProperties=!1;let t=e.properties;if(t!=null)for(let r in t)t[r]=Su(t[r])}return e.type==="array"&&e.items!=null&&(Array.isArray(e.items)?e.items=e.items.map(t=>Su(t)):e.items=Su(e.items)),e}var Gj=Symbol("Let zodToJsonSchema decide on which parser to use"),Ek={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Hj=e=>typeof e=="string"?qe(re({},Ek),{name:e}):re(re({},Ek),e);function ir(){return{}}function Bj(e,t){var r,o,n;let i={type:"array"};return(r=e.type)!=null&&r._def&&((n=(o=e.type)==null?void 0:o._def)==null?void 0:n.typeName)!==z.ZodAny&&(i.items=We(e.type._def,qe(re({},t),{currentPath:[...t.currentPath,"items"]}))),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}function Jj(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function Wj(){return{type:"boolean"}}function mI(e,t){return We(e.type._def,t)}var Kj=(e,t)=>We(e.innerType._def,t);function fI(e,t,r){let o=r!=null?r:t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>fI(e,t,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Yj(e)}}var Yj=e=>{let t={type:"integer",format:"unix-time"};for(let r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function Xj(e,t){return qe(re({},We(e.innerType._def,t)),{default:e.defaultValue()})}function Qj(e,t){return t.effectStrategy==="input"?We(e.schema._def,t):ir()}function eD(e){return{type:"string",enum:Array.from(e.values)}}var tD=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function rD(e,t){let r=[We(e.left._def,qe(re({},t),{currentPath:[...t.currentPath,"allOf","0"]})),We(e.right._def,qe(re({},t),{currentPath:[...t.currentPath,"allOf","1"]}))].filter(n=>!!n),o=[];return r.forEach(n=>{if(tD(n))o.push(...n.allOf);else{let i=n;if("additionalProperties"in n&&n.additionalProperties===!1){let s=n,{additionalProperties:l}=s;i=kh(s,["additionalProperties"])}o.push(i)}}),o.length?{allOf:o}:void 0}function nD(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var bh=void 0,kr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(bh===void 0&&(bh=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),bh),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function gI(e,t){let r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"email":switch(t.emailStrategy){case"format:email":Ir(r,"email",o.message,t);break;case"format:idn-email":Ir(r,"idn-email",o.message,t);break;case"pattern:zod":Gt(r,kr.email,o.message,t);break}break;case"url":Ir(r,"uri",o.message,t);break;case"uuid":Ir(r,"uuid",o.message,t);break;case"regex":Gt(r,o.regex,o.message,t);break;case"cuid":Gt(r,kr.cuid,o.message,t);break;case"cuid2":Gt(r,kr.cuid2,o.message,t);break;case"startsWith":Gt(r,RegExp(`^${xh(o.value,t)}`),o.message,t);break;case"endsWith":Gt(r,RegExp(`${xh(o.value,t)}$`),o.message,t);break;case"datetime":Ir(r,"date-time",o.message,t);break;case"date":Ir(r,"date",o.message,t);break;case"time":Ir(r,"time",o.message,t);break;case"duration":Ir(r,"duration",o.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"includes":{Gt(r,RegExp(xh(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Ir(r,"ipv4",o.message,t),o.version!=="v4"&&Ir(r,"ipv6",o.message,t);break}case"base64url":Gt(r,kr.base64url,o.message,t);break;case"jwt":Gt(r,kr.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&Gt(r,kr.ipv4Cidr,o.message,t),o.version!=="v4"&&Gt(r,kr.ipv6Cidr,o.message,t);break}case"emoji":Gt(r,kr.emoji(),o.message,t);break;case"ulid":{Gt(r,kr.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Ir(r,"binary",o.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{Gt(r,kr.base64,o.message,t);break}}break}case"nanoid":Gt(r,kr.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function xh(e,t){return t.patternStrategy==="escape"?aD(e):e}var oD=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function aD(e){let t="";for(let r=0;ri.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push(re({format:t},r&&o.errorMessages&&{errorMessage:{format:r}}))):e.format=t}function Gt(e,t,r,o){var n;e.pattern||(n=e.allOf)!=null&&n.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push(re({pattern:Ck(t,o)},r&&o.errorMessages&&{errorMessage:{pattern:r}}))):e.pattern=Ck(t,o)}function Ck(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;let o={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=o.i?e.source.toLowerCase():e.source,i="",s=!1,l=!1,d=!1;for(let u=0;utypeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function lD(){return{not:ir()}}function uD(){return{type:"null"}}var $h={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function cD(e,t){let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in $h&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let s=$h[i._def.typeName];return s&&!n.includes(s)?[...n,s]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...n,s];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];default:return n}},[]);if(o.length===r.length){let n=o.filter((i,s,l)=>l.indexOf(i)===s);return{type:n.length>1?n:n[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return dD(e,t)}var dD=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>We(o._def,qe(re({},t),{currentPath:[...t.currentPath,"anyOf",`${n}`]}))).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function pD(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[$h[e.innerType._def.typeName],"null"]};let r=We(e.innerType._def,qe(re({},t),{currentPath:[...t.currentPath,"anyOf","0"]}));return r&&{anyOf:[r,{type:"null"}]}}function mD(e){let t={type:"number"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function fD(e,t){let r={type:"object",properties:{}},o=[],n=e.shape();for(let s in n){let l=n[s];if(l===void 0||l._def===void 0)continue;let d=hD(l),u=We(l._def,qe(re({},t),{currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]}));u!==void 0&&(r.properties[s]=u,d||o.push(s))}o.length&&(r.required=o);let i=gD(e,t);return i!==void 0&&(r.additionalProperties=i),r}function gD(e,t){if(e.catchall._def.typeName!=="ZodNever")return We(e.catchall._def,qe(re({},t),{currentPath:[...t.currentPath,"additionalProperties"]}));switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function hD(e){try{return e.isOptional()}catch(t){return!0}}var vD=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return We(e.innerType._def,t);let o=We(e.innerType._def,qe(re({},t),{currentPath:[...t.currentPath,"anyOf","1"]}));return o?{anyOf:[{not:ir()},o]}:ir()},yD=(e,t)=>{if(t.pipeStrategy==="input")return We(e.in._def,t);if(t.pipeStrategy==="output")return We(e.out._def,t);let r=We(e.in._def,qe(re({},t),{currentPath:[...t.currentPath,"allOf","0"]})),o=We(e.out._def,qe(re({},t),{currentPath:[...t.currentPath,"allOf",r?"1":"0"]}));return{allOf:[r,o].filter(n=>n!==void 0)}};function _D(e,t){return We(e.type._def,t)}function bD(e,t){let o={type:"array",uniqueItems:!0,items:We(e.valueType._def,qe(re({},t),{currentPath:[...t.currentPath,"items"]}))};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}function xD(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>We(r._def,qe(re({},t),{currentPath:[...t.currentPath,"items",`${o}`]}))).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:We(e.rest._def,qe(re({},t),{currentPath:[...t.currentPath,"additionalItems"]}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>We(r._def,qe(re({},t),{currentPath:[...t.currentPath,"items",`${o}`]}))).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function wD(){return{not:ir()}}function SD(){return ir()}var kD=(e,t)=>We(e.innerType._def,t),ID=(e,t,r)=>{switch(t){case z.ZodString:return gI(e,r);case z.ZodNumber:return mD(e);case z.ZodObject:return fD(e,r);case z.ZodBigInt:return Jj(e);case z.ZodBoolean:return Wj();case z.ZodDate:return fI(e,r);case z.ZodUndefined:return wD();case z.ZodNull:return uD();case z.ZodArray:return Bj(e,r);case z.ZodUnion:case z.ZodDiscriminatedUnion:return cD(e,r);case z.ZodIntersection:return rD(e,r);case z.ZodTuple:return xD(e,r);case z.ZodRecord:return hI(e,r);case z.ZodLiteral:return nD(e);case z.ZodEnum:return eD(e);case z.ZodNativeEnum:return sD(e);case z.ZodNullable:return pD(e,r);case z.ZodOptional:return vD(e,r);case z.ZodMap:return iD(e,r);case z.ZodSet:return bD(e,r);case z.ZodLazy:return()=>e.getter()._def;case z.ZodPromise:return _D(e,r);case z.ZodNaN:case z.ZodNever:return lD();case z.ZodEffects:return Qj(e,r);case z.ZodAny:return ir();case z.ZodUnknown:return SD();case z.ZodDefault:return Xj(e,r);case z.ZodBranded:return mI(e,r);case z.ZodReadonly:return kD(e,r);case z.ZodCatch:return Kj(e,r);case z.ZodPipeline:return yD(e,r);case z.ZodFunction:case z.ZodVoid:case z.ZodSymbol:return;default:return(o=>{})(t)}},TD=(e,t)=>{let r=0;for(;r{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:TD(t.currentPath,e.path)};case"none":case"seen":return e.path.lengtht.currentPath[o]===r)||t.$refStrategy==="seen"?ir():void 0}},ED=(e,t,r)=>(e.description&&(r.description=e.description),r),CD=e=>{let t=Hj(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return qe(re({},t),{currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))})},AD=(e,t)=>{var r;let o=CD(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[m,c])=>{var p;return qe(re({},u),{[m]:(p=We(c._def,qe(re({},o),{currentPath:[...o.basePath,o.definitionPath,m]}),!0))!=null?p:ir()})},{}):void 0,i=typeof t=="string"?t:(t==null?void 0:t.nameStrategy)==="title"||t==null?void 0:t.name,s=(r=We(e._def,i===void 0?o:qe(re({},o),{currentPath:[...o.basePath,o.definitionPath,i]}),!1))!=null?r:ir(),l=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;l!==void 0&&(s.title=l);let d=i===void 0?n?qe(re({},s),{[o.definitionPath]:n}):s:{$ref:[...o.$refStrategy==="relative"?[]:o.basePath,o.definitionPath,i].join("/"),[o.definitionPath]:qe(re({},n),{[i]:s})};return d.$schema="http://json-schema.org/draft-07/schema#",d},Eh=Symbol.for("vercel.ai.schema");function Ou(e,{validate:t}={}){return{[Eh]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function PD(e){return typeof e=="object"&&e!==null&&Eh in e&&e[Eh]===!0&&"jsonSchema"in e&&"validate"in e}function OD(e){return e==null?Ou({properties:{},additionalProperties:!1}):PD(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?DD(e):RD(e):e()}function RD(e){return Ou(()=>e["~standard"].jsonSchema.input({target:"draft-07"}),{validate:async t=>{let r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new zi({value:t,cause:r.issues})}}})}function MD(e,t){var r;let o=(r=t==null?void 0:t.useReferences)!=null?r:!1;return Ou(()=>AD(e,{$refStrategy:o?"root":"none"}),{validate:async n=>{let i=await e.safeParseAsync(n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function ND(e,t){var r;let o=(r=t==null?void 0:t.useReferences)!=null?r:!1;return Ou(()=>Su(On(e,{target:"draft-7",io:"input",reused:o?"ref":"inline"})),{validate:async n=>{let i=await eo(e,n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function jD(e){return"_zod"in e}function DD(e,t){return jD(e)?ND(e,t):MD(e,t)}async function zD({value:e,schema:t}){let r=await vI({value:e,schema:t});if(!r.success)throw zi.wrap({value:e,cause:r.error});return r.value}async function vI({value:e,schema:t}){let r=OD(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let o=await r.validate(e);return o.success?{success:!0,value:o.value,rawValue:e}:{success:!1,error:zi.wrap({value:e,cause:o.error}),rawValue:e}}catch(o){return{success:!1,error:zi.wrap({value:e,cause:o}),rawValue:e}}}async function UD({text:e,schema:t}){try{let r=Ph(e);return t==null?r:zD({value:r,schema:t})}catch(r){throw $u.isInstance(r)||zi.isInstance(r)?r:new $u({text:e,cause:r})}}async function yI({text:e,schema:t}){try{let r=Ph(e);return t==null?{success:!0,value:r,rawValue:r}:await vI({value:r,schema:t})}catch(r){return{success:!1,error:$u.isInstance(r)?r:new $u({text:e,cause:r}),rawValue:void 0}}}function wh(e){try{return Ph(e),!0}catch(t){return!1}}function FD({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Aj).pipeThrough(new TransformStream({async transform({data:r},o){r!=="[DONE]"&&o.enqueue(await yI({text:r,schema:t}))}}))}var LD=()=>globalThis.fetch,wa=async({url:e,headers:t,body:r,failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:s})=>qD({url:e,headers:re({"Content-Type":"application/json"},t),body:{content:JSON.stringify(r),values:r},failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:s}),qD=async({url:e,headers:t={},body:r,successfulResponseHandler:o,failedResponseHandler:n,abortSignal:i,fetch:s=LD()})=>{try{let l=await s(e,{method:"POST",headers:Uj(t,`ai-sdk/provider-utils/${Fj}`,Dj()),body:r.content,signal:i}),d=Pu(l);if(!l.ok){let u;try{u=await n({response:l,url:e,requestBodyValues:r.values})}catch(m){throw Th(m)||$r.isInstance(m)?m:new $r({message:"Failed to process error response",cause:m,statusCode:l.status,url:e,responseHeaders:d,requestBodyValues:r.values})}throw u.value}try{return await o({response:l,url:e,requestBodyValues:r.values})}catch(u){throw u instanceof Error&&(Th(u)||$r.isInstance(u))?u:new $r({message:"Failed to process successful response",cause:u,statusCode:l.status,url:e,responseHeaders:d,requestBodyValues:r.values})}}catch(l){throw jj({error:l,url:e,requestBodyValues:r.values})}},ZD=({errorSchema:e,errorToMessage:t,isRetryable:r})=>async({response:o,url:n,requestBodyValues:i})=>{let s=await o.text(),l=Pu(o);if(s.trim()==="")return{responseHeaders:l,value:new $r({message:o.statusText,url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:l,responseBody:s,isRetryable:r==null?void 0:r(o)})};try{let d=await UD({text:s,schema:e});return{responseHeaders:l,value:new $r({message:t(d),url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:l,responseBody:s,data:d,isRetryable:r==null?void 0:r(o,d)})}}catch(d){return{responseHeaders:l,value:new $r({message:o.statusText,url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:l,responseBody:s,isRetryable:r==null?void 0:r(o)})}}},_I=e=>async({response:t})=>{let r=Pu(t);if(t.body==null)throw new gj({});return{responseHeaders:r,value:FD({stream:t.body,schema:e})}},Ru=e=>async({response:t,url:r,requestBodyValues:o})=>{let n=await t.text(),i=await yI({text:n,schema:e}),s=Pu(t);if(!i.success)throw new $r({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:s,responseBody:n,url:r,requestBodyValues:o});return{responseHeaders:s,value:i.value,rawValue:i.rawValue}};function VD(e){return e==null?void 0:e.replace(/\/$/,"")}function Sh(e){return e!=null}var bI=(e=>(e.Unknown="unknown",e.OpenAIResponsesV1="openai-responses-v1",e.XAIResponsesV1="xai-responses-v1",e.AnthropicClaudeV1="anthropic-claude-v1",e.GoogleGeminiV1="google-gemini-v1",e))(bI||{}),Oh=a.object({id:a.string().nullish(),format:a.enum(bI).nullish(),index:a.number().optional()}).loose(),GD=a.object({type:a.literal("reasoning.summary"),summary:a.string()}).extend(Oh.shape),HD=a.object({type:a.literal("reasoning.encrypted"),data:a.string()}).extend(Oh.shape),BD=a.object({type:a.literal("reasoning.text"),text:a.string().nullish(),signature:a.string().nullish()}).extend(Oh.shape),Rh=a.union([GD,HD,BD]),ku=a.union([Rh,a.unknown().transform(()=>null)]),Mh=a.array(ku).transform(e=>e.filter(t=>!!t)),n3=a.union([a.object({delta:a.object({reasoning_details:a.array(ku)})}).transform(e=>e.delta.reasoning_details.filter(Sh)),a.object({message:a.object({reasoning_details:a.array(ku)})}).transform(e=>e.message.reasoning_details.filter(Sh)),a.object({text:a.string(),reasoning_details:a.array(ku)}).transform(e=>e.reasoning_details.filter(Sh))]),Mu=a.object({error:a.object({code:a.union([a.string(),a.number()]).nullable().optional().default(null),message:a.string(),type:a.string().nullable().optional().default(null),param:a.any().nullable().optional().default(null)}).passthrough()}).passthrough(),Sa=ZD({errorSchema:Mu,errorToMessage:e=>e.error.message}),xI=a.object({type:a.literal("file"),file:a.object({hash:a.string(),name:a.string(),content:a.array(a.object({type:a.string(),text:a.string().optional()}).catchall(a.any())).optional()}).catchall(a.any())}).catchall(a.any()),Nh=a.object({provider:a.string(),reasoning_details:a.array(Rh).optional(),annotations:a.array(xI).optional(),usage:a.object({promptTokens:a.number(),promptTokensDetails:a.object({cachedTokens:a.number()}).catchall(a.any()).optional(),completionTokens:a.number(),completionTokensDetails:a.object({reasoningTokens:a.number()}).catchall(a.any()).optional(),totalTokens:a.number(),cost:a.number().optional(),costDetails:a.object({upstreamInferenceCost:a.number()}).catchall(a.any()).optional()}).catchall(a.any())}).catchall(a.any()),wI=a.object({openrouter:a.object({reasoning_details:a.array(Rh).optional(),annotations:a.array(xI).optional()}).optional()}).optional();function Eu(e){var t,r,o,n,i,s,l,d;let u=(t=e.prompt_tokens)!=null?t:0,m=(r=e.completion_tokens)!=null?r:0,c=(n=(o=e.prompt_tokens_details)==null?void 0:o.cached_tokens)!=null?n:0,p=(s=(i=e.prompt_tokens_details)==null?void 0:i.cache_write_tokens)!=null?s:void 0,f=(d=(l=e.completion_tokens_details)==null?void 0:l.reasoning_tokens)!=null?d:0;return{inputTokens:{total:u,noCache:u-c,cacheRead:c,cacheWrite:p},outputTokens:{total:m,text:m-f,reasoning:f},raw:e}}function SI(){return{inputTokens:{total:0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:0,text:void 0,reasoning:void 0},raw:void 0}}function JD(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function Cu(e){return{unified:JD(e),raw:e!=null?e:void 0}}function Dn(e,t){return{unified:e,raw:t}}var Iu,WD=class{constructor(){dj(this,Iu,new Set)}upsert(e){let t=this.getCanonicalKey(e);return t===null||WS(this,Iu).has(t)?!1:(WS(this,Iu).add(t),!0)}getCanonicalKey(e){switch(e.type){case"reasoning.summary":return e.summary;case"reasoning.encrypted":return e.id?e.id:e.data;case"reasoning.text":return e.text?e.text:e.signature?e.signature:null;default:return null}}};Iu=new WeakMap;var KD=["wav","mp3","aiff","aac","ogg","flac","m4a","pcm16","pcm24"];function jh({url:e,protocols:t}){try{let r=new URL(e);return t.has(r.protocol)}catch(r){return!1}}function kI({data:e,mediaType:t,defaultMediaType:r}){if(e instanceof Uint8Array){let n=Oj(e);return`data:${t!=null?t:r};base64,${n}`}let o=e.toString();return jh({url:o,protocols:new Set(["http:","https:"])})||o.startsWith("data:")?o:`data:${t!=null?t:r};base64,${o}`}function Ch({part:e,defaultMediaType:t}){let r=e.data instanceof URL?e.data.toString():e.data;return kI({data:r,mediaType:e.mediaType,defaultMediaType:t})}function Ak(e,t){var r;let o=e.match(/^data:([^;]+)/);return o&&(r=o[1])!=null?r:t}function Au(e){let t=e.match(/^data:[^;]*;base64,(.+)$/);return t?t[1]:e}var YD={mpeg:"mp3",mp3:"mp3","x-wav":"wav",wave:"wav",wav:"wav",ogg:"ogg",vorbis:"ogg",aac:"aac","x-aac":"aac",m4a:"m4a","x-m4a":"m4a",mp4:"m4a",aiff:"aiff","x-aiff":"aiff",flac:"flac","x-flac":"flac",pcm16:"pcm16",pcm24:"pcm24"};function XD(e){let t=Ch({part:e,defaultMediaType:"audio/mpeg"});if(jh({url:t,protocols:new Set(["http:","https:"])}))throw new Error(`Audio files cannot be provided as URLs. + +OpenRouter requires audio to be base64-encoded. Please: +1. Download the audio file locally +2. Read it as a Buffer or Uint8Array +3. Pass it as the data parameter + +The AI SDK will automatically handle base64 encoding. + +Learn more: https://openrouter.ai/docs/features/multimodal/audio`);let r=Au(t),o=e.mediaType||"audio/mpeg",n=o.replace("audio/",""),i=YD[n];if(i===void 0){let s=KD.join(", ");throw new Error(`Unsupported audio format: "${o}" + +OpenRouter supports the following audio formats: ${s} + +Learn more: https://openrouter.ai/docs/features/multimodal/audio`)}return{data:r,format:i}}function jn(e){var t,r,o;let n=e==null?void 0:e.anthropic,i=e==null?void 0:e.openrouter;return(o=(r=(t=i==null?void 0:i.cacheControl)!=null?t:i==null?void 0:i.cache_control)!=null?r:n==null?void 0:n.cacheControl)!=null?o:n==null?void 0:n.cache_control}function QD(e){var t,r,o,n,i,s,l,d;let u=[],m=new WD;for(let{role:c,content:p,providerOptions:f}of e)switch(c){case"system":{let v=jn(f);u.push({role:"system",content:[re({type:"text",text:p},v&&{cache_control:v})]});break}case"user":{if(p.length===1&&((t=p[0])==null?void 0:t.type)==="text"){let S=(r=jn(f))!=null?r:jn(p[0].providerOptions),b=S?[{type:"text",text:p[0].text,cache_control:S}]:p[0].text;u.push({role:"user",content:b});break}let v=jn(f),g=-1;for(let S=p.length-1;S>=0;S--)if(((o=p[S])==null?void 0:o.type)==="text"){g=S;break}let y=p.map((S,b)=>{var _,k,w,h,I,j;let U=S.type==="text"&&b===g,F=jn(S.providerOptions),Z=S.type==="text"?F!=null?F:U?v:void 0:F;switch(S.type){case"text":return re({type:"text",text:S.text},Z&&{cache_control:Z});case"file":{if((_=S.mediaType)!=null&&_.startsWith("image/")){let q=Ch({part:S,defaultMediaType:"image/jpeg"});return re({type:"image_url",image_url:{url:q}},Z&&{cache_control:Z})}if((k=S.mediaType)!=null&&k.startsWith("audio/"))return re({type:"input_audio",input_audio:XD(S)},Z&&{cache_control:Z});let L=String((j=(I=(h=(w=S.providerOptions)==null?void 0:w.openrouter)==null?void 0:h.filename)!=null?I:S.filename)!=null?j:""),M=Ch({part:S,defaultMediaType:"application/pdf"});return jh({url:M,protocols:new Set(["http:","https:"])})?{type:"file",file:{filename:L,file_data:M}}:re({type:"file",file:{filename:L,file_data:M}},Z&&{cache_control:Z})}default:return re({type:"text",text:""},Z&&{cache_control:Z})}});u.push({role:"user",content:y});break}case"assistant":{let v="",g="",y=[];for(let h of p)switch(h.type){case"text":{v+=h.text;break}case"tool-call":{y.push({id:h.toolCallId,type:"function",function:{name:h.toolName,arguments:JSON.stringify(h.input)}});break}case"reasoning":{g+=h.text;break}case"file":break;default:break}let S=wI.safeParse(f),b=S.success?(i=(n=S.data)==null?void 0:n.openrouter)==null?void 0:i.reasoning_details:void 0,_=S.success?(l=(s=S.data)==null?void 0:s.openrouter)==null?void 0:l.annotations:void 0,k=b&&Array.isArray(b)&&b.length>0?b:tz(p),w;if(k&&k.length>0){let h=[];for(let I of k)m.upsert(I)&&h.push(I);w=h.length>0?h:void 0}u.push({role:"assistant",content:v,tool_calls:y.length>0?y:void 0,reasoning:g||void 0,reasoning_details:w,annotations:_,cache_control:jn(f)});break}case"tool":{for(let v of p){if(v.type==="tool-approval-response")continue;let g=ez(v);u.push({role:"tool",tool_call_id:v.toolCallId,content:g,cache_control:(d=jn(f))!=null?d:jn(v.providerOptions)})}break}default:break}return u}function ez(e){var t;switch(e.output.type){case"text":case"error-text":return e.output.value;case"json":case"error-json":case"content":return JSON.stringify(e.output.value);case"execution-denied":return(t=e.output.reason)!=null?t:"Tool execution denied"}}function tz(e){var t,r,o;for(let n of e)if(n.type==="tool-call"){let i=(t=n.providerOptions)==null?void 0:t.openrouter,s=i==null?void 0:i.reasoning_details;if(Array.isArray(s)&&s.length>0)return s}for(let n of e)if(n.type==="reasoning"){let i=wI.safeParse(n.providerOptions);if(i.success&&((o=(r=i.data)==null?void 0:r.openrouter)!=null&&o.reasoning_details)&&i.data.openrouter.reasoning_details.length>0)return i.data.openrouter.reasoning_details}}var s3=a.union([a.literal("auto"),a.literal("none"),a.literal("required"),a.object({type:a.literal("function"),function:a.object({name:a.string()})})]);function rz(e){switch(e.type){case"auto":case"none":case"required":return e.type;case"tool":return{type:"function",function:{name:e.toolName}};default:throw new Vk({argument:"toolChoice",message:`Invalid tool choice type: ${JSON.stringify(e)}`})}}var nz=a.object({type:a.literal("image_url"),image_url:a.object({url:a.string()}).passthrough()}).passthrough(),oz=a.union([nz,a.unknown().transform(()=>null)]),II=a.array(oz).transform(e=>e.filter(t=>!!t)),TI=a.object({id:a.string().optional(),model:a.string().optional(),provider:a.string().optional(),usage:a.object({prompt_tokens:a.number(),prompt_tokens_details:a.object({cached_tokens:a.number(),cache_write_tokens:a.number().nullish()}).passthrough().nullish(),completion_tokens:a.number(),completion_tokens_details:a.object({reasoning_tokens:a.number()}).passthrough().nullish(),total_tokens:a.number(),cost:a.number().optional(),cost_details:a.object({upstream_inference_cost:a.number().nullish()}).passthrough().nullish()}).passthrough().nullish()}).passthrough(),az=a.union([TI.extend({choices:a.array(a.object({message:a.object({role:a.literal("assistant"),content:a.string().nullable().optional(),reasoning:a.string().nullable().optional(),reasoning_details:Mh.nullish(),images:II.nullish(),tool_calls:a.array(a.object({id:a.string().optional().nullable(),type:a.literal("function"),function:a.object({name:a.string(),arguments:a.string().optional()}).passthrough()}).passthrough()).optional(),annotations:a.array(a.union([a.object({type:a.literal("url_citation"),url_citation:a.object({url:a.string(),title:a.string().optional(),start_index:a.number().optional(),end_index:a.number().optional(),content:a.string().optional()}).passthrough()}).passthrough(),a.object({type:a.literal("file_annotation"),file_annotation:a.object({file_id:a.string(),quote:a.string().optional()}).passthrough()}).passthrough(),a.object({type:a.literal("file"),file:a.object({hash:a.string(),name:a.string(),content:a.array(a.object({type:a.string(),text:a.string().optional()}).passthrough()).optional()}).passthrough()}).passthrough()])).nullish()}).passthrough(),index:a.number().nullish(),logprobs:a.object({content:a.array(a.object({token:a.string(),logprob:a.number(),top_logprobs:a.array(a.object({token:a.string(),logprob:a.number()}).passthrough())}).passthrough()).nullable()}).passthrough().nullable().optional(),finish_reason:a.string().optional().nullable()}).passthrough())}),Mu.extend({user_id:a.string().optional()})]),iz=a.union([TI.extend({choices:a.array(a.object({delta:a.object({role:a.enum(["assistant"]).optional(),content:a.string().nullish(),reasoning:a.string().nullish().optional(),reasoning_details:Mh.nullish(),images:II.nullish(),tool_calls:a.array(a.object({index:a.number().nullish(),id:a.string().nullish(),type:a.literal("function").optional(),function:a.object({name:a.string().nullish(),arguments:a.string().nullish()}).passthrough()}).passthrough()).nullish(),annotations:a.array(a.union([a.object({type:a.literal("url_citation"),url_citation:a.object({url:a.string(),title:a.string().optional(),start_index:a.number().optional(),end_index:a.number().optional(),content:a.string().optional()}).passthrough()}).passthrough(),a.object({type:a.literal("file_annotation"),file_annotation:a.object({file_id:a.string(),quote:a.string().optional()}).passthrough()}).passthrough(),a.object({type:a.literal("file"),file:a.object({hash:a.string(),name:a.string(),content:a.array(a.object({type:a.string(),text:a.string().optional()}).passthrough()).optional()}).passthrough()}).passthrough()])).nullish()}).passthrough().nullish(),logprobs:a.object({content:a.array(a.object({token:a.string(),logprob:a.number(),top_logprobs:a.array(a.object({token:a.string(),logprob:a.number()}).passthrough())}).passthrough()).nullable()}).passthrough().nullish(),finish_reason:a.string().nullable().optional(),index:a.number().nullish()}).passthrough())}),Mu]),sz=class{constructor(e,t,r){this.specificationVersion="v3",this.provider="openrouter",this.defaultObjectGenerationMode="tool",this.supportsImageUrls=!0,this.supportedUrls={"image/*":[/^data:image\/[a-zA-Z]+;base64,/,/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)$/i],"application/*":[/^data:application\//,/^https?:\/\/.+$/]},this.modelId=e,this.settings=t,this.config=r}getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,frequencyPenalty:n,presencePenalty:i,seed:s,stopSequences:l,responseFormat:d,topK:u,tools:m,toolChoice:c}){var p;let f=re(re({model:this.modelId,models:this.settings.models,logit_bias:this.settings.logitBias,logprobs:this.settings.logprobs===!0||typeof this.settings.logprobs=="number"?!0:void 0,top_logprobs:typeof this.settings.logprobs=="number"?this.settings.logprobs:typeof this.settings.logprobs=="boolean"&&this.settings.logprobs?0:void 0,user:this.settings.user,parallel_tool_calls:this.settings.parallelToolCalls,max_tokens:t,temperature:r,top_p:o,frequency_penalty:n,presence_penalty:i,seed:s,stop:l,response_format:(d==null?void 0:d.type)==="json"?d.schema!=null?{type:"json_schema",json_schema:re({schema:d.schema,strict:!0,name:(p=d.name)!=null?p:"response"},d.description&&{description:d.description})}:{type:"json_object"}:void 0,top_k:u,messages:QD(e),include_reasoning:this.settings.includeReasoning,reasoning:this.settings.reasoning,usage:this.settings.usage,plugins:this.settings.plugins,web_search_options:this.settings.web_search_options,provider:this.settings.provider,debug:this.settings.debug},this.config.extraBody),this.settings.extraBody);if(m&&m.length>0){let v=m.filter(g=>g.type==="function").map(g=>({type:"function",function:{name:g.name,description:g.description,parameters:g.inputSchema}}));return qe(re({},f),{tools:v,tool_choice:c?rz(c):void 0})}return f}async doGenerate(e){var t,r,o,n,i,s,l,d,u,m,c,p,f,v,g,y,S,b,_,k,w,h;let j=(e.providerOptions||{}).openrouter||{},U=re(re({},this.getArgs(e)),j),{value:F,responseHeaders:Z}=await wa({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:xa(this.config.headers(),e.headers),body:U,failedResponseHandler:Sa,successfulResponseHandler:Ru(az),abortSignal:e.abortSignal,fetch:this.config.fetch});if("error"in F){let V=F.error;throw new $r({message:V.message,url:this.config.url({path:"/chat/completions",modelId:this.modelId}),requestBodyValues:U,statusCode:200,responseHeaders:Z,data:V})}let L=F,M=L.choices[0];if(!M)throw new Ah({message:"No choice in response"});let q=L.usage?Eu(L.usage):SI(),C=(t=M.message.reasoning_details)!=null?t:[],E=C.length>0?C.map(V=>{switch(V.type){case"reasoning.text":{if(V.text)return{type:"reasoning",text:V.text,providerMetadata:{openrouter:{reasoning_details:[V]}}};break}case"reasoning.summary":{if(V.summary)return{type:"reasoning",text:V.summary,providerMetadata:{openrouter:{reasoning_details:[V]}}};break}case"reasoning.encrypted":{if(V.data)return{type:"reasoning",text:"[REDACTED]",providerMetadata:{openrouter:{reasoning_details:[V]}}};break}default:}return null}).filter(V=>V!==null):M.message.reasoning?[{type:"reasoning",text:M.message.reasoning}]:[],te=[];if(te.push(...E),M.message.content&&te.push({type:"text",text:M.message.content}),M.message.tool_calls){let V=!1;for(let Ae of M.message.tool_calls)te.push({type:"tool-call",toolCallId:(r=Ae.id)!=null?r:Tr(),toolName:Ae.function.name,input:(o=Ae.function.arguments)!=null?o:"{}",providerMetadata:V?void 0:{openrouter:{reasoning_details:C}}}),V=!0}if(M.message.images)for(let V of M.message.images)te.push({type:"file",mediaType:Ak(V.image_url.url,"image/jpeg"),data:Au(V.image_url.url)});if(M.message.annotations)for(let V of M.message.annotations)V.type==="url_citation"&&te.push({type:"source",sourceType:"url",id:V.url_citation.url,url:V.url_citation.url,title:(n=V.url_citation.title)!=null?n:"",providerMetadata:{openrouter:{content:(i=V.url_citation.content)!=null?i:"",startIndex:(s=V.url_citation.start_index)!=null?s:0,endIndex:(l=V.url_citation.end_index)!=null?l:0}}});let P=(d=M.message.annotations)==null?void 0:d.filter(V=>V.type==="file"),se=M.message.tool_calls&&M.message.tool_calls.length>0,ee=C.some(V=>V.type==="reasoning.encrypted"&&V.data),fe=se&&ee&&M.finish_reason==="stop"?Dn("tool-calls",(u=M.finish_reason)!=null?u:void 0):Cu(M.finish_reason);return{content:te,finishReason:fe,usage:q,warnings:[],providerMetadata:{openrouter:Nh.parse({provider:(m=L.provider)!=null?m:"",reasoning_details:(c=M.message.reasoning_details)!=null?c:[],annotations:P&&P.length>0?P:void 0,usage:re(re(re(re({promptTokens:(p=q.inputTokens.total)!=null?p:0,completionTokens:(f=q.outputTokens.total)!=null?f:0,totalTokens:((v=q.inputTokens.total)!=null?v:0)+((g=q.outputTokens.total)!=null?g:0)},((y=L.usage)==null?void 0:y.cost)!=null?{cost:L.usage.cost}:{}),((b=(S=L.usage)==null?void 0:S.prompt_tokens_details)==null?void 0:b.cached_tokens)!=null?{promptTokensDetails:{cachedTokens:L.usage.prompt_tokens_details.cached_tokens}}:{}),((k=(_=L.usage)==null?void 0:_.completion_tokens_details)==null?void 0:k.reasoning_tokens)!=null?{completionTokensDetails:{reasoningTokens:L.usage.completion_tokens_details.reasoning_tokens}}:{}),((h=(w=L.usage)==null?void 0:w.cost_details)==null?void 0:h.upstream_inference_cost)!=null?{costDetails:{upstreamInferenceCost:L.usage.cost_details.upstream_inference_cost}}:{})})},request:{body:U},response:{id:L.id,modelId:L.model,headers:Z}}}async doStream(e){var t;let o=(e.providerOptions||{}).openrouter||{},n=re(re({},this.getArgs(e)),o),{value:i,responseHeaders:s}=await wa({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:xa(this.config.headers(),e.headers),body:qe(re({},n),{stream:!0,stream_options:this.config.compatibility==="strict"?re({include_usage:!0},(t=this.settings.usage)!=null&&t.include?{include_usage:!0}:{}):void 0}),failedResponseHandler:Sa,successfulResponseHandler:_I(iz),abortSignal:e.abortSignal,fetch:this.config.fetch}),l=[],d=Dn("other"),u={inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0},m={},c,p=[],f=!1,v=[],g=!1,y=!1,S,b,_,k;return{stream:i.pipeThrough(new TransformStream({transform(w,h){var I,j,U,F,Z,L,M,q,C,E,te,P,se,ee,he,fe,V,Ae,T,pe,de;if(e.includeRawChunks&&h.enqueue({type:"raw",rawValue:w.rawValue}),!w.success){d=Dn("error"),h.enqueue({type:"error",error:w.error});return}let H=w.value;if("error"in H){d=Dn("error"),h.enqueue({type:"error",error:H.error});return}if(H.provider&&(k=H.provider),H.id&&(_=H.id,h.enqueue({type:"response-metadata",id:H.id})),H.model&&h.enqueue({type:"response-metadata",modelId:H.model}),H.usage!=null){let Q=Eu(H.usage);Object.assign(u.inputTokens,Q.inputTokens),Object.assign(u.outputTokens,Q.outputTokens),c=H.usage;let B=(I=H.usage.prompt_tokens)!=null?I:0,G=(j=H.usage.completion_tokens)!=null?j:0;m.promptTokens=B,H.usage.prompt_tokens_details&&(m.promptTokensDetails={cachedTokens:(U=H.usage.prompt_tokens_details.cached_tokens)!=null?U:0}),m.completionTokens=G,H.usage.completion_tokens_details&&(m.completionTokensDetails={reasoningTokens:(F=H.usage.completion_tokens_details.reasoning_tokens)!=null?F:0}),H.usage.cost!=null&&(m.cost=H.usage.cost),m.totalTokens=H.usage.total_tokens;let Me=(Z=H.usage.cost_details)==null?void 0:Z.upstream_inference_cost;Me!=null&&(m.costDetails={upstreamInferenceCost:Me})}let le=H.choices[0];if((le==null?void 0:le.finish_reason)!=null&&(d=Cu(le.finish_reason)),(le==null?void 0:le.delta)==null)return;let R=le.delta,D=(Q,B)=>{y||(b=_||Tr(),h.enqueue({providerMetadata:B,type:"reasoning-start",id:b}),y=!0),h.enqueue({providerMetadata:B,type:"reasoning-delta",delta:Q,id:b||Tr()})};if(R.reasoning_details&&R.reasoning_details.length>0){for(let B of R.reasoning_details)if(B.type==="reasoning.text"){let G=p[p.length-1];(G==null?void 0:G.type)==="reasoning.text"?(G.text=(G.text||"")+(B.text||""),G.signature=G.signature||B.signature,G.format=G.format||B.format):p.push(re({},B))}else p.push(B);let Q={openrouter:{reasoning_details:R.reasoning_details}};for(let B of R.reasoning_details)switch(B.type){case"reasoning.text":{B.text&&D(B.text,Q);break}case"reasoning.encrypted":{B.data&&D("[REDACTED]",Q);break}case"reasoning.summary":{B.summary&&D(B.summary,Q);break}default:break}}else R.reasoning&&D(R.reasoning);if(R.content&&(y&&!g&&(h.enqueue({type:"reasoning-end",id:b||Tr(),providerMetadata:p.length>0?{openrouter:{reasoning_details:p}}:void 0}),y=!1),g||(S=_||Tr(),h.enqueue({type:"text-start",id:S}),g=!0),h.enqueue({type:"text-delta",delta:R.content,id:S||Tr()})),R.annotations){for(let Q of R.annotations)if(Q.type==="url_citation")h.enqueue({type:"source",sourceType:"url",id:Q.url_citation.url,url:Q.url_citation.url,title:(L=Q.url_citation.title)!=null?L:"",providerMetadata:{openrouter:{content:(M=Q.url_citation.content)!=null?M:"",startIndex:(q=Q.url_citation.start_index)!=null?q:0,endIndex:(C=Q.url_citation.end_index)!=null?C:0}}});else if(Q.type==="file"){let B=Q.file;B&&typeof B=="object"&&"hash"in B&&"name"in B&&v.push(Q)}}if(R.tool_calls!=null)for(let Q of R.tool_calls){let B=(E=Q.index)!=null?E:l.length-1;if(l[B]==null){if(Q.type!=="function")throw new Di({data:Q,message:"Expected 'function' type."});if(Q.id==null)throw new Di({data:Q,message:"Expected 'id' to be a string."});if(((te=Q.function)==null?void 0:te.name)==null)throw new Di({data:Q,message:"Expected 'function.name' to be a string."});l[B]={id:Q.id,type:"function",function:{name:Q.function.name,arguments:(P=Q.function.arguments)!=null?P:""},inputStarted:!1,sent:!1};let Me=l[B];if(Me==null)throw new Di({data:{index:B,toolCallsLength:l.length},message:`Tool call at index ${B} is missing after creation.`});((se=Me.function)==null?void 0:se.name)!=null&&((ee=Me.function)==null?void 0:ee.arguments)!=null&&wh(Me.function.arguments)&&(Me.inputStarted=!0,h.enqueue({type:"tool-input-start",id:Me.id,toolName:Me.function.name}),h.enqueue({type:"tool-input-delta",id:Me.id,delta:Me.function.arguments}),h.enqueue({type:"tool-input-end",id:Me.id}),h.enqueue({type:"tool-call",toolCallId:Me.id,toolName:Me.function.name,input:Me.function.arguments,providerMetadata:f?void 0:{openrouter:{reasoning_details:p}}}),f=!0,Me.sent=!0);continue}let G=l[B];if(G==null)throw new Di({data:{index:B,toolCallsLength:l.length,toolCallDelta:Q},message:`Tool call at index ${B} is missing during merge.`});G.inputStarted||(G.inputStarted=!0,h.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name})),((he=Q.function)==null?void 0:he.arguments)!=null&&(G.function.arguments+=(V=(fe=Q.function)==null?void 0:fe.arguments)!=null?V:""),h.enqueue({type:"tool-input-delta",id:G.id,delta:(Ae=Q.function.arguments)!=null?Ae:""}),((T=G.function)==null?void 0:T.name)!=null&&((pe=G.function)==null?void 0:pe.arguments)!=null&&wh(G.function.arguments)&&(h.enqueue({type:"tool-call",toolCallId:(de=G.id)!=null?de:Tr(),toolName:G.function.name,input:G.function.arguments,providerMetadata:f?void 0:{openrouter:{reasoning_details:p}}}),f=!0,G.sent=!0)}if(R.images!=null)for(let Q of R.images)h.enqueue({type:"file",mediaType:Ak(Q.image_url.url,"image/jpeg"),data:Au(Q.image_url.url)})},flush(w){var h;let I=l.length>0,j=p.some(F=>F.type==="reasoning.encrypted"&&F.data);if(I&&j&&d.unified==="stop"&&(d=Dn("tool-calls",d.raw)),d.unified==="tool-calls")for(let F of l)F&&!F.sent&&(w.enqueue({type:"tool-call",toolCallId:(h=F.id)!=null?h:Tr(),toolName:F.function.name,input:wh(F.function.arguments)?F.function.arguments:"{}",providerMetadata:f?void 0:{openrouter:{reasoning_details:p}}}),f=!0,F.sent=!0);y&&w.enqueue({type:"reasoning-end",id:b||Tr(),providerMetadata:p.length>0?{openrouter:{reasoning_details:p}}:void 0}),g&&w.enqueue({type:"text-end",id:S||Tr()});let U={usage:m};k!==void 0&&(U.provider=k),p.length>0&&(U.reasoning_details=p),v.length>0&&(U.annotations=v),u.raw=c,w.enqueue({type:"finish",finishReason:d,usage:u,providerMetadata:{openrouter:U}})}})),warnings:[],request:{body:n},response:{headers:s}}}};function lz({prompt:e,inputFormat:t,user:r="user",assistant:o="assistant"}){if(t==="prompt"&&e.length===1&&e[0]&&e[0].role==="user"&&e[0].content.length===1&&e[0].content[0]&&e[0].content[0].type==="text")return{prompt:e[0].content[0].text};let n="";e[0]&&e[0].role==="system"&&(n+=`${e[0].content} + +`,e=e.slice(1));for(let{role:i,content:s}of e)switch(i){case"system":throw new yj({message:`Unexpected system message in prompt: ${s}`,prompt:e});case"user":{let l=s.map(d=>{switch(d.type){case"text":return d.text;case"file":throw new dn({functionality:"file attachments"});default:return""}}).join("");n+=`${r}: +${l} + +`;break}case"assistant":{let l=s.map(d=>{switch(d.type){case"text":return d.text;case"tool-call":throw new dn({functionality:"tool-call messages"});case"tool-result":throw new dn({functionality:"tool-result messages"});case"reasoning":throw new dn({functionality:"reasoning messages"});case"file":throw new dn({functionality:"file attachments"});default:return""}}).join("");n+=`${o}: +${l} + +`;break}case"tool":throw new dn({functionality:"tool messages"});default:break}return n+=`${o}: +`,{prompt:n}}var Pk=a.union([a.object({id:a.string().optional(),model:a.string().optional(),provider:a.string().optional(),choices:a.array(a.object({text:a.string(),reasoning:a.string().nullish().optional(),reasoning_details:Mh.nullish(),finish_reason:a.string().nullish(),index:a.number().nullish(),logprobs:a.object({tokens:a.array(a.string()),token_logprobs:a.array(a.number()),top_logprobs:a.array(a.record(a.string(),a.number())).nullable()}).passthrough().nullable().optional()}).passthrough()),usage:a.object({prompt_tokens:a.number(),prompt_tokens_details:a.object({cached_tokens:a.number(),cache_write_tokens:a.number().nullish()}).passthrough().nullish(),completion_tokens:a.number(),completion_tokens_details:a.object({reasoning_tokens:a.number()}).passthrough().nullish(),total_tokens:a.number(),cost:a.number().optional(),cost_details:a.object({upstream_inference_cost:a.number().nullish()}).passthrough().nullish()}).passthrough().nullish()}).passthrough(),Mu]),uz=class{constructor(e,t,r){this.specificationVersion="v3",this.provider="openrouter",this.supportsImageUrls=!0,this.supportedUrls={"image/*":[/^data:image\/[a-zA-Z]+;base64,/,/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)$/i],"text/*":[/^data:text\//,/^https?:\/\/.+$/],"application/*":[/^data:application\//,/^https?:\/\/.+$/]},this.defaultObjectGenerationMode=void 0,this.modelId=e,this.settings=t,this.config=r}getArgs({prompt:e,maxOutputTokens:t,temperature:r,topP:o,frequencyPenalty:n,presencePenalty:i,seed:s,responseFormat:l,topK:d,stopSequences:u,tools:m,toolChoice:c}){let{prompt:p}=lz({prompt:e,inputFormat:"prompt"});if(m!=null&&m.length)throw new dn({functionality:"tools"});if(c)throw new dn({functionality:"toolChoice"});return re(re({model:this.modelId,models:this.settings.models,logit_bias:this.settings.logitBias,logprobs:typeof this.settings.logprobs=="number"?this.settings.logprobs:typeof this.settings.logprobs=="boolean"&&this.settings.logprobs?0:void 0,suffix:this.settings.suffix,user:this.settings.user,max_tokens:t,temperature:r,top_p:o,frequency_penalty:n,presence_penalty:i,seed:s,stop:u,response_format:l,top_k:d,prompt:p,include_reasoning:this.settings.includeReasoning,reasoning:this.settings.reasoning},this.config.extraBody),this.settings.extraBody)}async doGenerate(e){var t,r,o,n,i,s,l,d,u,m,c,p,f,v,g,y,S;let _=(e.providerOptions||{}).openrouter||{},k=re(re({},this.getArgs(e)),_),{value:w,responseHeaders:h}=await wa({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:xa(this.config.headers(),e.headers),body:k,failedResponseHandler:Sa,successfulResponseHandler:Ru(Pk),abortSignal:e.abortSignal,fetch:this.config.fetch});if("error"in w){let j=w.error;throw new $r({message:j.message,url:this.config.url({path:"/completions",modelId:this.modelId}),requestBodyValues:k,statusCode:200,responseHeaders:h,data:j})}let I=w.choices[0];if(!I)throw new Ah({message:"No choice in OpenRouter completion response"});return{content:[{type:"text",text:(t=I.text)!=null?t:""}],finishReason:Cu(I.finish_reason),usage:w.usage?Eu(w.usage):SI(),warnings:[],providerMetadata:{openrouter:Nh.parse({provider:(r=w.provider)!=null?r:"",usage:re(re(re(re({promptTokens:(n=(o=w.usage)==null?void 0:o.prompt_tokens)!=null?n:0,completionTokens:(s=(i=w.usage)==null?void 0:i.completion_tokens)!=null?s:0,totalTokens:((d=(l=w.usage)==null?void 0:l.prompt_tokens)!=null?d:0)+((m=(u=w.usage)==null?void 0:u.completion_tokens)!=null?m:0)},((c=w.usage)==null?void 0:c.cost)!=null?{cost:w.usage.cost}:{}),((f=(p=w.usage)==null?void 0:p.prompt_tokens_details)==null?void 0:f.cached_tokens)!=null?{promptTokensDetails:{cachedTokens:w.usage.prompt_tokens_details.cached_tokens}}:{}),((g=(v=w.usage)==null?void 0:v.completion_tokens_details)==null?void 0:g.reasoning_tokens)!=null?{completionTokensDetails:{reasoningTokens:w.usage.completion_tokens_details.reasoning_tokens}}:{}),((S=(y=w.usage)==null?void 0:y.cost_details)==null?void 0:S.upstream_inference_cost)!=null?{costDetails:{upstreamInferenceCost:w.usage.cost_details.upstream_inference_cost}}:{})})},response:{headers:h}}}async doStream(e){let r=(e.providerOptions||{}).openrouter||{},o=re(re({},this.getArgs(e)),r),{value:n,responseHeaders:i}=await wa({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:xa(this.config.headers(),e.headers),body:qe(re({},o),{stream:!0,stream_options:this.config.compatibility==="strict"?{include_usage:!0}:void 0}),failedResponseHandler:Sa,successfulResponseHandler:_I(Pk),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=Dn("other"),l={inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0},d={},u,m;return{stream:n.pipeThrough(new TransformStream({transform(c,p){var f,v,g,y,S;if(e.includeRawChunks&&p.enqueue({type:"raw",rawValue:c.rawValue}),!c.success){s=Dn("error"),p.enqueue({type:"error",error:c.error});return}let b=c.value;if("error"in b){s=Dn("error"),p.enqueue({type:"error",error:b.error});return}if(b.provider&&(u=b.provider),b.usage!=null){let k=Eu(b.usage);Object.assign(l.inputTokens,k.inputTokens),Object.assign(l.outputTokens,k.outputTokens),m=b.usage;let w=(f=b.usage.prompt_tokens)!=null?f:0,h=(v=b.usage.completion_tokens)!=null?v:0;d.promptTokens=w,b.usage.prompt_tokens_details&&(d.promptTokensDetails={cachedTokens:(g=b.usage.prompt_tokens_details.cached_tokens)!=null?g:0}),d.completionTokens=h,b.usage.completion_tokens_details&&(d.completionTokensDetails={reasoningTokens:(y=b.usage.completion_tokens_details.reasoning_tokens)!=null?y:0}),b.usage.cost!=null&&(d.cost=b.usage.cost),d.totalTokens=b.usage.total_tokens;let I=(S=b.usage.cost_details)==null?void 0:S.upstream_inference_cost;I!=null&&(d.costDetails={upstreamInferenceCost:I})}let _=b.choices[0];(_==null?void 0:_.finish_reason)!=null&&(s=Cu(_.finish_reason)),(_==null?void 0:_.text)!=null&&p.enqueue({type:"text-delta",delta:_.text,id:Tr()})},flush(c){l.raw=m;let p={usage:d};u!==void 0&&(p.provider=u),c.enqueue({type:"finish",finishReason:s,usage:l,providerMetadata:{openrouter:p}})}})),response:{headers:i}}}},cz=a.object({prompt_tokens:a.number(),total_tokens:a.number(),cost:a.number().optional()}),dz=a.object({object:a.literal("embedding"),embedding:a.array(a.number()),index:a.number().optional()}),pz=a.object({id:a.string().optional(),object:a.literal("list"),data:a.array(dz),model:a.string(),provider:a.string().optional(),usage:cz.optional()}),mz=class{constructor(e,t,r){this.specificationVersion="v3",this.provider="openrouter",this.maxEmbeddingsPerCall=void 0,this.supportsParallelCalls=!0,this.modelId=e,this.settings=t,this.config=r}async doEmbed(e){var t,r,o,n,i,s;let{values:l,abortSignal:d,headers:u}=e,m=re(re({model:this.modelId,input:l,user:this.settings.user,provider:this.settings.provider},this.config.extraBody),this.settings.extraBody),{value:c,responseHeaders:p}=await wa({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:xa(this.config.headers(),u),body:m,failedResponseHandler:Sa,successfulResponseHandler:Ru(pz),abortSignal:d,fetch:this.config.fetch});return{embeddings:c.data.map(f=>f.embedding),usage:c.usage?{tokens:c.usage.prompt_tokens}:void 0,providerMetadata:{openrouter:Nh.parse({provider:(t=c.provider)!=null?t:"",usage:re({promptTokens:(o=(r=c.usage)==null?void 0:r.prompt_tokens)!=null?o:0,completionTokens:0,totalTokens:(i=(n=c.usage)==null?void 0:n.total_tokens)!=null?i:0},((s=c.usage)==null?void 0:s.cost)!=null?{cost:c.usage.cost}:{})})},response:{headers:p,body:c},warnings:[]}}};var fz=a.object({id:a.string().optional(),object:a.string().optional(),created:a.number().optional(),model:a.string(),choices:a.array(a.object({index:a.number(),message:a.object({role:a.string(),content:a.string().nullable().optional(),images:a.array(a.object({type:a.literal("image_url"),image_url:a.object({url:a.string()})}).passthrough()).optional()}).passthrough(),finish_reason:a.string().nullable().optional()}).passthrough()),usage:a.object({prompt_tokens:a.number(),completion_tokens:a.number(),total_tokens:a.number()}).passthrough().optional()}).passthrough(),gz=class{constructor(e,t,r){this.specificationVersion="v3",this.provider="openrouter",this.maxImagesPerCall=1,this.modelId=e,this.settings=t,this.config=r}async doGenerate(e){var t;let{prompt:r,n:o,size:n,aspectRatio:i,seed:s,files:l,mask:d,abortSignal:u,headers:m,providerOptions:c}=e,p=(c==null?void 0:c.openrouter)||{},f=[];if(d!==void 0)throw new dn({functionality:"image inpainting (mask parameter)"});o>1&&f.push({type:"unsupported",feature:"n > 1",details:`OpenRouter image generation returns 1 image per call. Requested ${o} images.`}),n!==void 0&&f.push({type:"unsupported",feature:"size",details:"Use aspectRatio instead. Size parameter is not supported by OpenRouter image generation."});let v=i!==void 0?{aspect_ratio:i}:void 0,y=l!==void 0&&l.length>0?[...l.map(I=>vz(I)),{type:"text",text:r!=null?r:""}]:r!=null?r:"",S=re(re(re(re(re(re(re({model:this.modelId,messages:[{role:"user",content:y}],modalities:["image","text"]},v!==void 0&&{image_config:v}),s!==void 0&&{seed:s}),this.settings.user!==void 0&&{user:this.settings.user}),this.settings.provider!==void 0&&{provider:this.settings.provider}),this.config.extraBody),this.settings.extraBody),p),{value:b,responseHeaders:_}=await wa({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:xa(this.config.headers(),m),body:S,failedResponseHandler:Sa,successfulResponseHandler:Ru(fz),abortSignal:u,fetch:this.config.fetch}),k=b.choices[0];if(!k)throw new Ah({message:"No choice in response"});let w=[];if((t=k.message)!=null&&t.images)for(let I of k.message.images){let j=I.image_url.url;w.push(Au(j))}let h=b.usage?{inputTokens:b.usage.prompt_tokens,outputTokens:b.usage.completion_tokens,totalTokens:b.usage.total_tokens}:void 0;return{images:w,warnings:f,response:{timestamp:new Date,modelId:b.model,headers:_},usage:h}}},hz="image/png";function vz(e){return e.type==="url"?{type:"image_url",image_url:{url:e.url}}:{type:"image_url",image_url:{url:kI({data:e.data,mediaType:e.mediaType,defaultMediaType:hz})}}}function yz(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}function _z(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{}}function bz(e,t){let r=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===r)}function xz(e,...t){let r=_z(e),o=yz(r),n=bz(o,"user-agent"),i=n?o[n]:void 0,s=i!=null&&i.trim()?i:t.filter(Boolean).join(" "),l=Object.fromEntries(Object.entries(o).filter(([d])=>d.toLowerCase()!=="user-agent"));return qe(re({},l),{"user-agent":s})}var wz="2.2.3";function Dh(e={}){var t,r,o;let n=(r=VD((t=e.baseURL)!=null?t:e.baseUrl))!=null?r:"https://openrouter.ai/api/v1",i=(o=e.compatibility)!=null?o:"compatible",s=()=>xz(re(re({Authorization:`Bearer ${Lj({apiKey:e.apiKey,environmentVariableName:"OPENROUTER_API_KEY",description:"OpenRouter"})}`},e.headers),e.api_keys&&Object.keys(e.api_keys).length>0&&{"X-Provider-API-Keys":JSON.stringify(e.api_keys)}),`ai-sdk/openrouter/${wz}`),l=(f,v={})=>new sz(f,v,{provider:"openrouter.chat",url:({path:g})=>`${n}${g}`,headers:s,compatibility:i,fetch:e.fetch,extraBody:e.extraBody}),d=(f,v={})=>new uz(f,v,{provider:"openrouter.completion",url:({path:g})=>`${n}${g}`,headers:s,compatibility:i,fetch:e.fetch,extraBody:e.extraBody}),u=(f,v={})=>new mz(f,v,{provider:"openrouter.embedding",url:({path:g})=>`${n}${g}`,headers:s,fetch:e.fetch,extraBody:e.extraBody}),m=(f,v={})=>new gz(f,v,{provider:"openrouter.image",url:({path:g})=>`${n}${g}`,headers:s,fetch:e.fetch,extraBody:e.extraBody}),c=(f,v)=>{if(new.target)throw new Error("The OpenRouter model function cannot be called with the new keyword.");return f==="openai/gpt-3.5-turbo-instruct"?d(f,v):l(f,v)},p=(f,v)=>c(f,v);return p.languageModel=c,p.chat=l,p.completion=d,p.textEmbeddingModel=u,p.embedding=u,p.imageModel=m,p}var m3=Dh({compatibility:"strict"});var BT=ds(Qh(),1),JT=ds(Qh(),1);var Q1="vercel.ai.gateway.error",ev=Symbol.for(Q1),sT,lT,Ht=class jT extends(lT=Error,sT=ev,lT){constructor({message:t,statusCode:r=500,cause:o,generationId:n}){super(n?`${t} [${n}]`:t),this[sT]=!0,this.statusCode=r,this.cause=o,this.generationId=n}static isInstance(t){return jT.hasMarker(t)}static hasMarker(t){return typeof t=="object"&&t!==null&&ev in t&&t[ev]===!0}},DT="GatewayAuthenticationError",e4=`vercel.ai.gateway.error.${DT}`,uT=Symbol.for(e4),cT,dT,Fu=class zT extends(dT=Ht,cT=uT,dT){constructor({message:t="Authentication failed",statusCode:r=401,cause:o,generationId:n}={}){super({message:t,statusCode:r,cause:o,generationId:n}),this[cT]=!0,this.name=DT,this.type="authentication_error"}static isInstance(t){return Ht.hasMarker(t)&&uT in t}static createContextualError({apiKeyProvided:t,oidcTokenProvided:r,message:o="Authentication failed",statusCode:n=401,cause:i,generationId:s}){let l;return t?l=`AI Gateway authentication failed: Invalid API key. + +Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys + +Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`:r?l=`AI Gateway authentication failed: Invalid OIDC token. + +Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token. + +Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`:l=`AI Gateway authentication failed: No authentication provided. + +Option 1 - API key: +Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys +Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable. + +Option 2 - OIDC token: +Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`,new zT({message:l,statusCode:n,cause:i,generationId:s})}},UT="GatewayInvalidRequestError",t4=`vercel.ai.gateway.error.${UT}`,pT=Symbol.for(t4),mT,fT,r4=class extends(fT=Ht,mT=pT,fT){constructor({message:e="Invalid request",statusCode:t=400,cause:r,generationId:o}={}){super({message:e,statusCode:t,cause:r,generationId:o}),this[mT]=!0,this.name=UT,this.type="invalid_request_error"}static isInstance(e){return Ht.hasMarker(e)&&pT in e}},FT="GatewayRateLimitError",n4=`vercel.ai.gateway.error.${FT}`,gT=Symbol.for(n4),hT,vT,o4=class extends(vT=Ht,hT=gT,vT){constructor({message:e="Rate limit exceeded",statusCode:t=429,cause:r,generationId:o}={}){super({message:e,statusCode:t,cause:r,generationId:o}),this[hT]=!0,this.name=FT,this.type="rate_limit_exceeded"}static isInstance(e){return Ht.hasMarker(e)&&gT in e}},LT="GatewayModelNotFoundError",a4=`vercel.ai.gateway.error.${LT}`,yT=Symbol.for(a4),i4=O(()=>A(a.object({modelId:a.string()}))),_T,bT,s4=class extends(bT=Ht,_T=yT,bT){constructor({message:e="Model not found",statusCode:t=404,modelId:r,cause:o,generationId:n}={}){super({message:e,statusCode:t,cause:o,generationId:n}),this[_T]=!0,this.name=LT,this.type="model_not_found",this.modelId=r}static isInstance(e){return Ht.hasMarker(e)&&yT in e}},qT="GatewayInternalServerError",l4=`vercel.ai.gateway.error.${qT}`,xT=Symbol.for(l4),wT,ST,kT=class extends(ST=Ht,wT=xT,ST){constructor({message:e="Internal server error",statusCode:t=500,cause:r,generationId:o}={}){super({message:e,statusCode:t,cause:r,generationId:o}),this[wT]=!0,this.name=qT,this.type="internal_server_error"}static isInstance(e){return Ht.hasMarker(e)&&xT in e}},ZT="GatewayResponseError",u4=`vercel.ai.gateway.error.${ZT}`,IT=Symbol.for(u4),TT,$T,c4=class extends($T=Ht,TT=IT,$T){constructor({message:e="Invalid response from Gateway",statusCode:t=502,response:r,validationError:o,cause:n,generationId:i}={}){super({message:e,statusCode:t,cause:n,generationId:i}),this[TT]=!0,this.name=ZT,this.type="response_error",this.response=r,this.validationError=o}static isInstance(e){return Ht.hasMarker(e)&&IT in e}};async function ET({response:e,statusCode:t,defaultMessage:r="Gateway request failed",cause:o,authMethod:n}){var i;let s=await Mt({value:e,schema:d4});if(!s.success){let c=typeof e=="object"&&e!==null&&"generationId"in e?e.generationId:void 0;return new c4({message:`Invalid error response format: ${r}`,statusCode:t,response:e,validationError:s.error,cause:o,generationId:c})}let l=s.value,d=l.error.type,u=l.error.message,m=(i=l.generationId)!=null?i:void 0;switch(d){case"authentication_error":return Fu.createContextualError({apiKeyProvided:n==="api-key",oidcTokenProvided:n==="oidc",statusCode:t,cause:o,generationId:m});case"invalid_request_error":return new r4({message:u,statusCode:t,cause:o,generationId:m});case"rate_limit_exceeded":return new o4({message:u,statusCode:t,cause:o,generationId:m});case"model_not_found":{let c=await Mt({value:l.error.param,schema:i4});return new s4({message:u,statusCode:t,modelId:c.success?c.value.modelId:void 0,cause:o,generationId:m})}case"internal_server_error":return new kT({message:u,statusCode:t,cause:o,generationId:m});default:return new kT({message:u,statusCode:t,cause:o,generationId:m})}}var d4=O(()=>A(a.object({error:a.object({message:a.string(),type:a.string().nullish(),param:a.unknown().nullish(),code:a.union([a.string(),a.number()]).nullish()}),generationId:a.string().nullish()}))),VT="GatewayTimeoutError",p4=`vercel.ai.gateway.error.${VT}`,CT=Symbol.for(p4),AT,PT,OT=class GT extends(PT=Ht,AT=CT,PT){constructor({message:t="Request timed out",statusCode:r=408,cause:o,generationId:n}={}){super({message:t,statusCode:r,cause:o,generationId:n}),this[AT]=!0,this.name=VT,this.type="timeout_error"}static isInstance(t){return Ht.hasMarker(t)&&CT in t}static createTimeoutError({originalMessage:t,statusCode:r=408,cause:o,generationId:n}){let i=`Gateway request timed out: ${t} + + This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new GT({message:i,statusCode:r,cause:o,generationId:n})}};function RT(e){if(!(e instanceof Error))return!1;let t=e.code;return typeof t=="string"?["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(t):!1}async function pn(e,t){var r;return Ht.isInstance(e)?e:RT(e)?OT.createTimeoutError({originalMessage:e instanceof Error?e.message:"Unknown error",cause:e}):Ye.isInstance(e)?e.cause&&RT(e.cause)?OT.createTimeoutError({originalMessage:e.message,cause:e}):await ET({response:m4(e),statusCode:(r=e.statusCode)!=null?r:500,defaultMessage:"Gateway request failed",cause:e,authMethod:t}):await ET({response:{},statusCode:500,defaultMessage:e instanceof Error?`Gateway request failed: ${e.message}`:"Unknown Gateway error",cause:e,authMethod:t})}function m4(e){if(e.data!==void 0)return e.data;if(e.responseBody!=null)try{return JSON.parse(e.responseBody)}catch(t){return e.responseBody}return{}}var HT="ai-gateway-auth-method";async function mo(e){let t=await Mt({value:e[HT],schema:f4});return t.success?t.value:void 0}var f4=O(()=>A(a.union([a.literal("api-key"),a.literal("oidc")]))),MT=class{constructor(e){this.config=e}async getAvailableModels(){try{let{value:e}=await Ri({url:`${this.config.baseURL}/config`,headers:await ze(this.config.headers()),successfulResponseHandler:ke(g4),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:t=>t}),fetch:this.config.fetch});return e}catch(e){throw await pn(e)}}async getCredits(){try{let e=new URL(this.config.baseURL),{value:t}=await Ri({url:`${e.origin}/v1/credits`,headers:await ze(this.config.headers()),successfulResponseHandler:ke(h4),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:r=>r}),fetch:this.config.fetch});return t}catch(e){throw await pn(e)}}},g4=O(()=>A(a.object({models:a.array(a.object({id:a.string(),name:a.string(),description:a.string().nullish(),pricing:a.object({input:a.string(),output:a.string(),input_cache_read:a.string().nullish(),input_cache_write:a.string().nullish()}).transform(({input:e,output:t,input_cache_read:r,input_cache_write:o})=>({input:e,output:t,...r?{cachedInputTokens:r}:{},...o?{cacheCreationInputTokens:o}:{}})).nullish(),specification:a.object({specificationVersion:a.literal("v3"),provider:a.string(),modelId:a.string()}),modelType:a.enum(["embedding","image","language","video"]).nullish()}))}))),h4=O(()=>A(a.object({balance:a.string(),total_used:a.string()}).transform(({balance:e,total_used:t})=>({balance:e,totalUsed:t})))),v4=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs(e){let{abortSignal:t,...r}=e;return{args:this.maybeEncodeFileParts(r),warnings:[]}}async doGenerate(e){let{args:t,warnings:r}=await this.getArgs(e),{abortSignal:o}=e,n=await ze(this.config.headers());try{let{responseHeaders:i,value:s,rawValue:l}=await we({url:this.getUrl(),headers:_e(n,e.headers,this.getModelConfigHeaders(this.modelId,!1),await ze(this.config.o11yHeaders)),body:t,successfulResponseHandler:ke(a.any()),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:d=>d}),...o&&{abortSignal:o},fetch:this.config.fetch});return{...s,request:{body:t},response:{headers:i,body:l},warnings:r}}catch(i){throw await pn(i,await mo(n))}}async doStream(e){let{args:t,warnings:r}=await this.getArgs(e),{abortSignal:o}=e,n=await ze(this.config.headers());try{let{value:i,responseHeaders:s}=await we({url:this.getUrl(),headers:_e(n,e.headers,this.getModelConfigHeaders(this.modelId,!0),await ze(this.config.o11yHeaders)),body:t,successfulResponseHandler:Nt(a.any()),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:l=>l}),...o&&{abortSignal:o},fetch:this.config.fetch});return{stream:i.pipeThrough(new TransformStream({start(l){r.length>0&&l.enqueue({type:"stream-start",warnings:r})},transform(l,d){if(l.success){let u=l.value;if(u.type==="raw"&&!e.includeRawChunks)return;u.type==="response-metadata"&&u.timestamp&&typeof u.timestamp=="string"&&(u.timestamp=new Date(u.timestamp)),d.enqueue(u)}else d.error(l.error)}})),request:{body:t},response:{headers:s}}}catch(i){throw await pn(i,await mo(n))}}isFilePart(e){return e&&typeof e=="object"&&"type"in e&&e.type==="file"}maybeEncodeFileParts(e){for(let t of e.prompt)for(let r of t.content)if(this.isFilePart(r)){let o=r;if(o.data instanceof Uint8Array){let n=Uint8Array.from(o.data),i=Buffer.from(n).toString("base64");o.data=new URL(`data:${o.mediaType||"application/octet-stream"};base64,${i}`)}}return e}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders(e,t){return{"ai-language-model-specification-version":"3","ai-language-model-id":e,"ai-language-model-streaming":String(t)}}},y4=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:r,providerOptions:o}){var n;let i=await ze(this.config.headers());try{let{responseHeaders:s,value:l,rawValue:d}=await we({url:this.getUrl(),headers:_e(i,t!=null?t:{},this.getModelConfigHeaders(),await ze(this.config.o11yHeaders)),body:{values:e,...o?{providerOptions:o}:{}},successfulResponseHandler:ke(_4),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:u=>u}),...r&&{abortSignal:r},fetch:this.config.fetch});return{embeddings:l.embeddings,usage:(n=l.usage)!=null?n:void 0,providerMetadata:l.providerMetadata,response:{headers:s,body:d},warnings:[]}}catch(s){throw await pn(s,await mo(i))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},_4=O(()=>A(a.object({embeddings:a.array(a.array(a.number())),usage:a.object({tokens:a.number()}).nullish(),providerMetadata:a.record(a.string(),a.record(a.string(),a.unknown())).optional()}))),b4=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:r,aspectRatio:o,seed:n,files:i,mask:s,providerOptions:l,headers:d,abortSignal:u}){var m,c,p,f;let v=await ze(this.config.headers());try{let{responseHeaders:g,value:y,rawValue:S}=await we({url:this.getUrl(),headers:_e(v,d!=null?d:{},this.getModelConfigHeaders(),await ze(this.config.o11yHeaders)),body:{prompt:e,n:t,...r&&{size:r},...o&&{aspectRatio:o},...n&&{seed:n},...l&&{providerOptions:l},...i&&{files:i.map(b=>NT(b))},...s&&{mask:NT(s)}},successfulResponseHandler:ke(k4),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:b=>b}),...u&&{abortSignal:u},fetch:this.config.fetch});return{images:y.images,warnings:(m=y.warnings)!=null?m:[],providerMetadata:y.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:g},...y.usage!=null&&{usage:{inputTokens:(c=y.usage.inputTokens)!=null?c:void 0,outputTokens:(p=y.usage.outputTokens)!=null?p:void 0,totalTokens:(f=y.usage.totalTokens)!=null?f:void 0}}}}catch(g){throw pn(g,await mo(v))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function NT(e){return e.type==="file"&&e.data instanceof Uint8Array?{...e,data:pr(e.data)}:e}var x4=a.object({images:a.array(a.unknown()).optional()}).catchall(a.unknown()),w4=a.discriminatedUnion("type",[a.object({type:a.literal("unsupported"),feature:a.string(),details:a.string().optional()}),a.object({type:a.literal("compatibility"),feature:a.string(),details:a.string().optional()}),a.object({type:a.literal("other"),message:a.string()})]),S4=a.object({inputTokens:a.number().nullish(),outputTokens:a.number().nullish(),totalTokens:a.number().nullish()}),k4=a.object({images:a.array(a.string()),warnings:a.array(w4).optional(),providerMetadata:a.record(a.string(),x4).optional(),usage:S4.optional()}),I4=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,aspectRatio:r,resolution:o,duration:n,fps:i,seed:s,image:l,providerOptions:d,headers:u,abortSignal:m}){var c;let p=await ze(this.config.headers());try{let{responseHeaders:f,value:v,rawValue:g}=await we({url:this.getUrl(),headers:_e(p,u!=null?u:{},this.getModelConfigHeaders(),await ze(this.config.o11yHeaders)),body:{prompt:e,n:t,...r&&{aspectRatio:r},...o&&{resolution:o},...n&&{duration:n},...i&&{fps:i},...s&&{seed:s},...d&&{providerOptions:d},...l&&{image:T4(l)}},successfulResponseHandler:ke(C4),failedResponseHandler:ot({errorSchema:a.any(),errorToMessage:y=>y}),...m&&{abortSignal:m},fetch:this.config.fetch});return{videos:v.videos,warnings:(c=v.warnings)!=null?c:[],providerMetadata:v.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:f}}}catch(f){throw pn(f,await mo(p))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function T4(e){return e.type==="file"&&e.data instanceof Uint8Array?{...e,data:pr(e.data)}:e}var $4=a.object({videos:a.array(a.unknown()).optional()}).catchall(a.unknown()),E4=a.union([a.object({type:a.literal("url"),url:a.string(),mediaType:a.string()}),a.object({type:a.literal("base64"),data:a.string(),mediaType:a.string()})]),C4=a.object({videos:a.array(E4),warnings:a.array(a.object({type:a.literal("other"),message:a.string()})).optional(),providerMetadata:a.record(a.string(),$4).optional()}),A4=O(()=>A(a.object({objective:a.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:a.array(a.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:a.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:a.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:a.object({include_domains:a.array(a.string()).optional().describe("List of domains to include in search results."),exclude_domains:a.array(a.string()).optional().describe("List of domains to exclude from search results."),after_date:a.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:a.object({max_chars_per_result:a.number().optional().describe("Maximum characters per result."),max_chars_total:a.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:a.object({max_age_seconds:a.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),P4=O(()=>A(a.union([a.object({searchId:a.string(),results:a.array(a.object({url:a.string(),title:a.string(),excerpt:a.string(),publishDate:a.string().nullable().optional(),relevanceScore:a.number().optional()}))}),a.object({error:a.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:a.number().optional(),message:a.string()})]))),O4=je({id:"gateway.parallel_search",inputSchema:A4,outputSchema:P4}),R4=(e={})=>O4(e),M4=O(()=>A(a.object({query:a.union([a.string(),a.array(a.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:a.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:a.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:a.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:a.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:a.array(a.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:a.array(a.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:a.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:a.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:a.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:a.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:a.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),N4=O(()=>A(a.union([a.object({results:a.array(a.object({title:a.string(),url:a.string(),snippet:a.string(),date:a.string().optional(),lastUpdated:a.string().optional()})),id:a.string()}),a.object({error:a.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:a.number().optional(),message:a.string()})]))),j4=je({id:"gateway.perplexity_search",inputSchema:M4,outputSchema:N4}),D4=(e={})=>j4(e),z4={parallelSearch:R4,perplexitySearch:D4};async function U4(){var e;return(e=(0,BT.getContext)().headers)==null?void 0:e["x-vercel-id"]}var F4="3.0.40",L4="0.0.1";function q4(e={}){var t,r;let o=null,n=null,i=(t=e.metadataCacheRefreshMillis)!=null?t:1e3*60*5,s=0,l=(r=Vr(e.baseURL))!=null?r:"https://ai-gateway.vercel.sh/v3/ai",d=async()=>{try{let g=await Z4(e);return Ct({Authorization:`Bearer ${g.token}`,"ai-gateway-protocol-version":L4,[HT]:g.authMethod,...e.headers},`ai-sdk/gateway/${F4}`)}catch(g){throw Fu.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:g})}},u=()=>{let g=cn({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),y=cn({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),S=cn({settingValue:void 0,environmentVariableName:"VERCEL_REGION"});return async()=>{let b=await U4();return{...g&&{"ai-o11y-deployment-id":g},...y&&{"ai-o11y-environment":y},...S&&{"ai-o11y-region":S},...b&&{"ai-o11y-request-id":b}}}},m=g=>new v4(g,{provider:"gateway",baseURL:l,headers:d,fetch:e.fetch,o11yHeaders:u()}),c=async()=>{var g,y,S;let b=(S=(y=(g=e._internal)==null?void 0:g.currentDate)==null?void 0:y.call(g).getTime())!=null?S:Date.now();return(!o||b-s>i)&&(s=b,o=new MT({baseURL:l,headers:d,fetch:e.fetch}).getAvailableModels().then(_=>(n=_,_)).catch(async _=>{throw await pn(_,await mo(await d()))})),n?Promise.resolve(n):o},p=async()=>new MT({baseURL:l,headers:d,fetch:e.fetch}).getCredits().catch(async g=>{throw await pn(g,await mo(await d()))}),f=function(g){if(new.target)throw new Error("The Gateway Provider model function cannot be called with the new keyword.");return m(g)};f.specificationVersion="v3",f.getAvailableModels=c,f.getCredits=p,f.imageModel=g=>new b4(g,{provider:"gateway",baseURL:l,headers:d,fetch:e.fetch,o11yHeaders:u()}),f.languageModel=m;let v=g=>new y4(g,{provider:"gateway",baseURL:l,headers:d,fetch:e.fetch,o11yHeaders:u()});return f.embeddingModel=v,f.textEmbeddingModel=v,f.videoModel=g=>new I4(g,{provider:"gateway",baseURL:l,headers:d,fetch:e.fetch,o11yHeaders:u()}),f.chat=f.languageModel,f.embedding=f.embeddingModel,f.image=f.imageModel,f.video=f.videoModel,f.tools=z4,f}var WT=q4();async function Z4(e){let t=cn({settingValue:e.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});return t?{token:t,authMethod:"api-key"}:{token:await(0,JT.getVercelOidcToken)(),authMethod:"oidc"}}var KT=typeof globalThis=="object"?globalThis:global;var mn="1.9.0";var YT=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function V4(e){var t=new Set([e]),r=new Set,o=e.match(YT);if(!o)return function(){return!1};var n={major:+o[1],minor:+o[2],patch:+o[3],prerelease:o[4]};if(n.prerelease!=null)return function(d){return d===e};function i(l){return r.add(l),!1}function s(l){return t.add(l),!0}return function(d){if(t.has(d))return!0;if(r.has(d))return!1;var u=d.match(YT);if(!u)return i(d);var m={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return m.prerelease!=null||n.major!==m.major?i(d):n.major===0?n.minor===m.minor&&n.patch<=m.patch?s(d):i(d):n.minor<=m.minor?s(d):i(d)}}var XT=V4(mn);var G4=mn.split(".")[0],Zi=Symbol.for("opentelemetry.js.api."+G4),Vi=KT;function Ta(e,t,r,o){var n;o===void 0&&(o=!1);var i=Vi[Zi]=(n=Vi[Zi])!==null&&n!==void 0?n:{version:mn};if(!o&&i[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(s.stack||s.message),!1}if(i.version!==mn){var s=new Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+mn);return r.error(s.stack||s.message),!1}return i[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+mn+"."),!0}function fn(e){var t,r,o=(t=Vi[Zi])===null||t===void 0?void 0:t.version;if(!(!o||!XT(o)))return(r=Vi[Zi])===null||r===void 0?void 0:r[e]}function $a(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+mn+".");var r=Vi[Zi];r&&delete r[e]}var H4=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i},B4=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;oBt.ALL&&(e=Bt.ALL),t=t||{};function r(o,n){var i=t[o];return typeof i=="function"&&e>=n?i.bind(t):function(){}}return{error:r("error",Bt.ERROR),warn:r("warn",Bt.WARN),info:r("info",Bt.INFO),debug:r("debug",Bt.DEBUG),verbose:r("verbose",Bt.VERBOSE)}}var J4=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i},W4=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o";m.warn("Current logger will be overwritten from "+p),c.warn("Current logger will overwrite one already registered from "+p)}return Ta("diag",c,r,!0)};r.setLogger=o,r.disable=function(){$a(K4,r)},r.createComponentLogger=function(n){return new QT(n)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e})();function t0(e){return Symbol.for(e)}var Y4=(function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(o){return r._currentContext.get(o)},r.setValue=function(o,n){var i=new e(r._currentContext);return i._currentContext.set(o,n),i},r.deleteValue=function(o){var n=new e(r._currentContext);return n._currentContext.delete(o),n}}return e})(),r0=new Y4;var X4=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i},Q4=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o0)&&!(n=o.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i},tU=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o{for(var r in t)dU(e,r,{get:t[r],enumerable:!0})},k0="AI_InvalidArgumentError",I0=`vercel.ai.error.${k0}`,mU=Symbol.for(I0),T0,Hr=class extends oe{constructor({parameter:e,value:t,message:r}){super({name:k0,message:`Invalid argument for parameter ${e}: ${r}`}),this[T0]=!0,this.parameter=e,this.value=t}static isInstance(e){return oe.hasMarker(e,I0)}};T0=mU;var fU="AI_InvalidStreamPartError",gU=`vercel.ai.error.${fU}`,hU=Symbol.for(gU),vU;vU=hU;var $0="AI_InvalidToolApprovalError",E0=`vercel.ai.error.${$0}`,yU=Symbol.for(E0),C0,_U=class extends oe{constructor({approvalId:e}){super({name:$0,message:`Tool approval response references unknown approvalId: "${e}". No matching tool-approval-request found in message history.`}),this[C0]=!0,this.approvalId=e}static isInstance(e){return oe.hasMarker(e,E0)}};C0=yU;var A0="AI_InvalidToolInputError",P0=`vercel.ai.error.${A0}`,bU=Symbol.for(P0),O0,fv=class extends oe{constructor({toolInput:e,toolName:t,cause:r,message:o=`Invalid input for tool ${t}: ${fr(r)}`}){super({name:A0,message:o,cause:r}),this[O0]=!0,this.toolInput=e,this.toolName=t}static isInstance(e){return oe.hasMarker(e,P0)}};O0=bU;var R0="AI_ToolCallNotFoundForApprovalError",M0=`vercel.ai.error.${R0}`,xU=Symbol.for(M0),N0,gv=class extends oe{constructor({toolCallId:e,approvalId:t}){super({name:R0,message:`Tool call "${e}" not found for approval request "${t}".`}),this[N0]=!0,this.toolCallId=e,this.approvalId=t}static isInstance(e){return oe.hasMarker(e,M0)}};N0=xU;var j0="AI_MissingToolResultsError",D0=`vercel.ai.error.${j0}`,wU=Symbol.for(D0),z0,p0=class extends oe{constructor({toolCallIds:e}){super({name:j0,message:`Tool result${e.length>1?"s are":" is"} missing for tool call${e.length>1?"s":""} ${e.join(", ")}.`}),this[z0]=!0,this.toolCallIds=e}static isInstance(e){return oe.hasMarker(e,D0)}};z0=wU;var SU="AI_NoImageGeneratedError",kU=`vercel.ai.error.${SU}`,IU=Symbol.for(kU),TU;TU=IU;var U0="AI_NoObjectGeneratedError",F0=`vercel.ai.error.${U0}`,$U=Symbol.for(F0),L0,Un=class extends oe{constructor({message:e="No object generated.",cause:t,text:r,response:o,usage:n,finishReason:i}){super({name:U0,message:e,cause:t}),this[L0]=!0,this.text=r,this.response=o,this.usage=n,this.finishReason=i}static isInstance(e){return oe.hasMarker(e,F0)}};L0=$U;var q0="AI_NoOutputGeneratedError",Z0=`vercel.ai.error.${q0}`,EU=Symbol.for(Z0),V0,G0=class extends oe{constructor({message:e="No output generated.",cause:t}={}){super({name:q0,message:e,cause:t}),this[V0]=!0}static isInstance(e){return oe.hasMarker(e,Z0)}};V0=EU;var CU="AI_NoSpeechGeneratedError",AU=`vercel.ai.error.${CU}`,PU=Symbol.for(AU),OU;OU=PU;var RU="AI_NoTranscriptGeneratedError",MU=`vercel.ai.error.${RU}`,NU=Symbol.for(MU),jU;jU=NU;var DU="AI_NoVideoGeneratedError",zU=`vercel.ai.error.${DU}`,UU=Symbol.for(zU),FU;FU=UU;var H0="AI_NoSuchToolError",B0=`vercel.ai.error.${H0}`,LU=Symbol.for(B0),J0,cv=class extends oe{constructor({toolName:e,availableTools:t=void 0,message:r=`Model tried to call unavailable tool '${e}'. ${t===void 0?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:H0,message:r}),this[J0]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return oe.hasMarker(e,B0)}};J0=LU;var W0="AI_ToolCallRepairError",K0=`vercel.ai.error.${W0}`,qU=Symbol.for(K0),Y0,ZU=class extends oe{constructor({cause:e,originalError:t,message:r=`Error repairing tool call: ${fr(e)}`}){super({name:W0,message:r,cause:e}),this[Y0]=!0,this.originalError=t}static isInstance(e){return oe.hasMarker(e,K0)}};Y0=qU;var VU=class extends oe{constructor(e){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`}),this.version=e.version,this.provider=e.provider,this.modelId=e.modelId}},X0="AI_UIMessageStreamError",Q0=`vercel.ai.error.${X0}`,GU=Symbol.for(Q0),e$,Pa=class extends oe{constructor({chunkType:e,chunkId:t,message:r}){super({name:X0,message:r}),this[e$]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return oe.hasMarker(e,Q0)}};e$=GU;var HU="AI_InvalidDataContentError",BU=`vercel.ai.error.${HU}`,JU=Symbol.for(BU),WU;WU=JU;var t$="AI_InvalidMessageRoleError",r$=`vercel.ai.error.${t$}`,KU=Symbol.for(r$),n$,YU=class extends oe{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:t$,message:t}),this[n$]=!0,this.role=e}static isInstance(e){return oe.hasMarker(e,r$)}};n$=KU;var XU="AI_MessageConversionError",QU=`vercel.ai.error.${XU}`,e2=Symbol.for(QU),t2;t2=e2;var o$="AI_RetryError",a$=`vercel.ai.error.${o$}`,r2=Symbol.for(a$),i$,m0=class extends oe{constructor({message:e,reason:t,errors:r}){super({name:o$,message:e}),this[i$]=!0,this.reason=t,this.errors=r,this.lastError=r[r.length-1]}static isInstance(e){return oe.hasMarker(e,a$)}};i$=r2;var f0=!1,hv=e=>{if(e.warnings.length===0)return;let t=globalThis.AI_SDK_LOG_WARNINGS;if(t!==!1){if(typeof t=="function"){t(e);return}f0||(f0=!0);for(let r of e.warnings);}};function n2({provider:e,modelId:t}){hv({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:e,model:t})}function o2(e){return e.specificationVersion==="v3"?e:(n2({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get(t,r){switch(r){case"specificationVersion":return"v3";case"doGenerate":return async(...o)=>{let n=await t.doGenerate(...o);return{...n,finishReason:s$(n.finishReason),usage:l$(n.usage)}};case"doStream":return async(...o)=>{let n=await t.doStream(...o);return{...n,stream:a2(n.stream)}};default:return t[r]}}}))}function a2(e){return e.pipeThrough(new TransformStream({transform(t,r){t.type==="finish"?r.enqueue({...t,finishReason:s$(t.finishReason),usage:l$(t.usage)}):r.enqueue(t)}}))}function s$(e){return{unified:e==="unknown"?"other":e,raw:void 0}}function l$(e){return{inputTokens:{total:e.inputTokens,noCache:void 0,cacheRead:e.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:e.outputTokens,text:void 0,reasoning:e.reasoningTokens}}}function Ju(e){if(typeof e!="string"){if(e.specificationVersion!=="v3"&&e.specificationVersion!=="v2"){let t=e;throw new VU({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return o2(e)}return i2().languageModel(e)}function i2(){var e;return(e=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?e:WT}function vv(e){if(e!=null)return typeof e=="number"?e:e.totalMs}function u$(e){if(!(e==null||typeof e=="number"))return e.stepMs}function s2(e){if(!(e==null||typeof e=="number"))return e.chunkMs}var l2=[{mediaType:"image/gif",bytesPrefix:[71,73,70]},{mediaType:"image/png",bytesPrefix:[137,80,78,71]},{mediaType:"image/jpeg",bytesPrefix:[255,216]},{mediaType:"image/webp",bytesPrefix:[82,73,70,70,null,null,null,null,87,69,66,80]},{mediaType:"image/bmp",bytesPrefix:[66,77]},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0]},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42]},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102]},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99]}];var u2=e=>{let t=typeof e=="string"?ar(e):e,r=(t[6]&127)<<21|(t[7]&127)<<14|(t[8]&127)<<7|t[9]&127;return t.slice(r+10)};function c2(e){return typeof e=="string"&&e.startsWith("SUQz")||typeof e!="string"&&e.length>10&&e[0]===73&&e[1]===68&&e[2]===51?u2(e):e}function d2({data:e,signatures:t}){let r=c2(e),o=typeof r=="string"?ar(r.substring(0,Math.min(r.length,24))):r;for(let n of t)if(o.length>=n.bytesPrefix.length&&n.bytesPrefix.every((i,s)=>i===null||o[s]===i))return n.mediaType}var c$="6.0.79",p2=async({url:e})=>{var t;let r=e.toString();try{let o=await fetch(r,{headers:Ct({},`ai-sdk/${c$}`,yu())});if(!o.ok)throw new io({url:r,statusCode:o.status,statusText:o.statusText});return{data:new Uint8Array(await o.arrayBuffer()),mediaType:(t=o.headers.get("content-type"))!=null?t:void 0}}catch(o){throw io.isInstance(o)?o:new io({url:r,cause:o})}},m2=(e=p2)=>t=>Promise.all(t.map(async r=>r.isUrlSupportedByModel?null:e(r)));function f2(e){try{let[t,r]=e.split(",");return{mediaType:t.split(";")[0].split(":")[1],base64Content:r}}catch(t){return{mediaType:void 0,base64Content:void 0}}}var d$=a.union([a.string(),a.instanceof(Uint8Array),a.instanceof(ArrayBuffer),a.custom(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]);function p$(e){if(e instanceof Uint8Array)return{data:e,mediaType:void 0};if(e instanceof ArrayBuffer)return{data:new Uint8Array(e),mediaType:void 0};if(typeof e=="string")try{e=new URL(e)}catch(t){}if(e instanceof URL&&e.protocol==="data:"){let{mediaType:t,base64Content:r}=f2(e.toString());if(t==null||r==null)throw new oe({name:"InvalidDataContentError",message:`Invalid data URL format in content ${e.toString()}`});return{data:r,mediaType:t}}return{data:e,mediaType:void 0}}function g2(e){return typeof e=="string"?e:e instanceof ArrayBuffer?pr(new Uint8Array(e)):pr(e)}function Wi(e){return e===void 0?[]:Array.isArray(e)?e:[e]}async function m$({prompt:e,supportedUrls:t,download:r=m2()}){let o=await v2(e.messages,r,t),n=new Map;for(let u of e.messages)if(u.role==="assistant"&&Array.isArray(u.content))for(let m of u.content)m.type==="tool-approval-request"&&"approvalId"in m&&"toolCallId"in m&&n.set(m.approvalId,m.toolCallId);let i=new Set;for(let u of e.messages)if(u.role==="tool"){for(let m of u.content)if(m.type==="tool-approval-response"){let c=n.get(m.approvalId);c&&i.add(c)}}let s=[...e.system!=null?typeof e.system=="string"?[{role:"system",content:e.system}]:Wi(e.system).map(u=>({role:"system",content:u.content,providerOptions:u.providerOptions})):[],...e.messages.map(u=>h2({message:u,downloadedAssets:o}))],l=[];for(let u of s){if(u.role!=="tool"){l.push(u);continue}let m=l.at(-1);(m==null?void 0:m.role)==="tool"?m.content.push(...u.content):l.push(u)}let d=new Set;for(let u of l)switch(u.role){case"assistant":{for(let m of u.content)m.type==="tool-call"&&!m.providerExecuted&&d.add(m.toolCallId);break}case"tool":{for(let m of u.content)m.type==="tool-result"&&d.delete(m.toolCallId);break}case"user":case"system":for(let m of i)d.delete(m);if(d.size>0)throw new p0({toolCallIds:Array.from(d)});break}for(let u of i)d.delete(u);if(d.size>0)throw new p0({toolCallIds:Array.from(d)});return l.filter(u=>u.role!=="tool"||u.content.length>0)}function h2({message:e,downloadedAssets:t}){let r=e.role;switch(r){case"system":return{role:"system",content:e.content,providerOptions:e.providerOptions};case"user":return typeof e.content=="string"?{role:"user",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"user",content:e.content.map(o=>y2(o,t)).filter(o=>o.type!=="text"||o.text!==""),providerOptions:e.providerOptions};case"assistant":return typeof e.content=="string"?{role:"assistant",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"assistant",content:e.content.filter(o=>o.type!=="text"||o.text!==""||o.providerOptions!=null).filter(o=>o.type!=="tool-approval-request").map(o=>{let n=o.providerOptions;switch(o.type){case"file":{let{data:i,mediaType:s}=p$(o.data);return{type:"file",data:i,filename:o.filename,mediaType:s!=null?s:o.mediaType,providerOptions:n}}case"reasoning":return{type:"reasoning",text:o.text,providerOptions:n};case"text":return{type:"text",text:o.text,providerOptions:n};case"tool-call":return{type:"tool-call",toolCallId:o.toolCallId,toolName:o.toolName,input:o.input,providerExecuted:o.providerExecuted,providerOptions:n};case"tool-result":return{type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:g0(o.output),providerOptions:n}}}),providerOptions:e.providerOptions};case"tool":return{role:"tool",content:e.content.filter(o=>o.type!=="tool-approval-response"||o.providerExecuted).map(o=>{switch(o.type){case"tool-result":return{type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:g0(o.output),providerOptions:o.providerOptions};case"tool-approval-response":return{type:"tool-approval-response",approvalId:o.approvalId,approved:o.approved,reason:o.reason}}}),providerOptions:e.providerOptions};default:{let o=r;throw new YU({role:o})}}}async function v2(e,t,r){let o=e.filter(i=>i.role==="user").map(i=>i.content).filter(i=>Array.isArray(i)).flat().filter(i=>i.type==="image"||i.type==="file").map(i=>{var s;let l=(s=i.mediaType)!=null?s:i.type==="image"?"image/*":void 0,d=i.type==="image"?i.image:i.data;if(typeof d=="string")try{d=new URL(d)}catch(u){}return{mediaType:l,data:d}}).filter(i=>i.data instanceof URL).map(i=>({url:i.data,isUrlSupportedByModel:i.mediaType!=null&&Mw({url:i.data.toString(),mediaType:i.mediaType,supportedUrls:r})})),n=await t(o);return Object.fromEntries(n.map((i,s)=>i==null?null:[o[s].url.toString(),{data:i.data,mediaType:i.mediaType}]).filter(i=>i!=null))}function y2(e,t){var r;if(e.type==="text")return{type:"text",text:e.text,providerOptions:e.providerOptions};let o,n=e.type;switch(n){case"image":o=e.image;break;case"file":o=e.data;break;default:throw new Error(`Unsupported part type: ${n}`)}let{data:i,mediaType:s}=p$(o),l=s!=null?s:e.mediaType,d=i;if(d instanceof URL){let u=t[d.toString()];u&&(d=u.data,l!=null||(l=u.mediaType))}switch(n){case"image":return(d instanceof Uint8Array||typeof d=="string")&&(l=(r=d2({data:d,signatures:l2}))!=null?r:l),{type:"file",mediaType:l!=null?l:"image/*",filename:void 0,data:d,providerOptions:e.providerOptions};case"file":{if(l==null)throw new Error("Media type is missing for file part");return{type:"file",mediaType:l,filename:e.filename,data:d,providerOptions:e.providerOptions}}}}function g0(e){return e.type!=="content"?e:{type:"content",value:e.value.map(t=>t.type!=="media"?t:t.mediaType.startsWith("image/")?{type:"image-data",data:t.data,mediaType:t.mediaType}:{type:"file-data",data:t.data,mediaType:t.mediaType})}}async function Ji({toolCallId:e,input:t,output:r,tool:o,errorMode:n}){return n==="text"?{type:"error-text",value:fr(r)}:n==="json"?{type:"error-json",value:h0(r)}:o!=null&&o.toModelOutput?await o.toModelOutput({toolCallId:e,input:t,output:r}):typeof r=="string"?{type:"text",value:r}:{type:"json",value:h0(r)}}function h0(e){return e===void 0?null:e}function dv({maxOutputTokens:e,temperature:t,topP:r,topK:o,presencePenalty:n,frequencyPenalty:i,seed:s,stopSequences:l}){if(e!=null){if(!Number.isInteger(e))throw new Hr({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be an integer"});if(e<1)throw new Hr({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be >= 1"})}if(t!=null&&typeof t!="number")throw new Hr({parameter:"temperature",value:t,message:"temperature must be a number"});if(r!=null&&typeof r!="number")throw new Hr({parameter:"topP",value:r,message:"topP must be a number"});if(o!=null&&typeof o!="number")throw new Hr({parameter:"topK",value:o,message:"topK must be a number"});if(n!=null&&typeof n!="number")throw new Hr({parameter:"presencePenalty",value:n,message:"presencePenalty must be a number"});if(i!=null&&typeof i!="number")throw new Hr({parameter:"frequencyPenalty",value:i,message:"frequencyPenalty must be a number"});if(s!=null&&!Number.isInteger(s))throw new Hr({parameter:"seed",value:s,message:"seed must be an integer"});return{maxOutputTokens:e,temperature:t,topP:r,topK:o,presencePenalty:n,frequencyPenalty:i,stopSequences:l,seed:s}}function _2(e){return e!=null&&Object.keys(e).length>0}async function f$({tools:e,toolChoice:t,activeTools:r}){if(!_2(e))return{tools:void 0,toolChoice:void 0};let o=r!=null?Object.entries(e).filter(([i])=>r.includes(i)):Object.entries(e),n=[];for(let[i,s]of o){let l=s.type;switch(l){case void 0:case"dynamic":case"function":n.push({type:"function",name:i,description:s.description,inputSchema:await Zr(s.inputSchema).jsonSchema,...s.inputExamples!=null?{inputExamples:s.inputExamples}:{},providerOptions:s.providerOptions,...s.strict!=null?{strict:s.strict}:{}});break;case"provider":n.push({type:"provider",name:i,id:s.id,args:s.args});break;default:{let d=l;throw new Error(`Unsupported tool type: ${d}`)}}}return{tools:n,toolChoice:t==null?{type:"auto"}:typeof t=="string"?{type:t}:{type:"tool",toolName:t.toolName}}}var Ki=a.lazy(()=>a.union([a.null(),a.string(),a.number(),a.boolean(),a.record(a.string(),Ki.optional()),a.array(Ki)])),ve=a.record(a.string(),a.record(a.string(),Ki.optional())),g$=a.object({type:a.literal("text"),text:a.string(),providerOptions:ve.optional()}),b2=a.object({type:a.literal("image"),image:a.union([d$,a.instanceof(URL)]),mediaType:a.string().optional(),providerOptions:ve.optional()}),h$=a.object({type:a.literal("file"),data:a.union([d$,a.instanceof(URL)]),filename:a.string().optional(),mediaType:a.string(),providerOptions:ve.optional()}),x2=a.object({type:a.literal("reasoning"),text:a.string(),providerOptions:ve.optional()}),w2=a.object({type:a.literal("tool-call"),toolCallId:a.string(),toolName:a.string(),input:a.unknown(),providerOptions:ve.optional(),providerExecuted:a.boolean().optional()}),S2=a.discriminatedUnion("type",[a.object({type:a.literal("text"),value:a.string(),providerOptions:ve.optional()}),a.object({type:a.literal("json"),value:Ki,providerOptions:ve.optional()}),a.object({type:a.literal("execution-denied"),reason:a.string().optional(),providerOptions:ve.optional()}),a.object({type:a.literal("error-text"),value:a.string(),providerOptions:ve.optional()}),a.object({type:a.literal("error-json"),value:Ki,providerOptions:ve.optional()}),a.object({type:a.literal("content"),value:a.array(a.union([a.object({type:a.literal("text"),text:a.string(),providerOptions:ve.optional()}),a.object({type:a.literal("media"),data:a.string(),mediaType:a.string()}),a.object({type:a.literal("file-data"),data:a.string(),mediaType:a.string(),filename:a.string().optional(),providerOptions:ve.optional()}),a.object({type:a.literal("file-url"),url:a.string(),providerOptions:ve.optional()}),a.object({type:a.literal("file-id"),fileId:a.union([a.string(),a.record(a.string(),a.string())]),providerOptions:ve.optional()}),a.object({type:a.literal("image-data"),data:a.string(),mediaType:a.string(),providerOptions:ve.optional()}),a.object({type:a.literal("image-url"),url:a.string(),providerOptions:ve.optional()}),a.object({type:a.literal("image-file-id"),fileId:a.union([a.string(),a.record(a.string(),a.string())]),providerOptions:ve.optional()}),a.object({type:a.literal("custom"),providerOptions:ve.optional()})]))})]),v$=a.object({type:a.literal("tool-result"),toolCallId:a.string(),toolName:a.string(),output:S2,providerOptions:ve.optional()}),k2=a.object({type:a.literal("tool-approval-request"),approvalId:a.string(),toolCallId:a.string()}),I2=a.object({type:a.literal("tool-approval-response"),approvalId:a.string(),approved:a.boolean(),reason:a.string().optional()}),T2=a.object({role:a.literal("system"),content:a.string(),providerOptions:ve.optional()}),$2=a.object({role:a.literal("user"),content:a.union([a.string(),a.array(a.union([g$,b2,h$]))]),providerOptions:ve.optional()}),E2=a.object({role:a.literal("assistant"),content:a.union([a.string(),a.array(a.union([g$,h$,x2,w2,v$,k2]))]),providerOptions:ve.optional()}),C2=a.object({role:a.literal("tool"),content:a.array(a.union([v$,I2])),providerOptions:ve.optional()}),A2=a.union([T2,$2,E2,C2]);async function y$(e){if(e.prompt==null&&e.messages==null)throw new gr({prompt:e,message:"prompt or messages must be defined"});if(e.prompt!=null&&e.messages!=null)throw new gr({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(e.system!=null&&typeof e.system!="string"&&!Wi(e.system).every(o=>typeof o=="object"&&o!==null&&"role"in o&&o.role==="system"))throw new gr({prompt:e,message:"system must be a string, SystemModelMessage, or array of SystemModelMessage"});let t;if(e.prompt!=null&&typeof e.prompt=="string")t=[{role:"user",content:e.prompt}];else if(e.prompt!=null&&Array.isArray(e.prompt))t=e.prompt;else if(e.messages!=null)t=e.messages;else throw new gr({prompt:e,message:"prompt or messages must be defined"});if(t.length===0)throw new gr({prompt:e,message:"messages must not be empty"});let r=await Mt({value:t,schema:a.array(A2)});if(!r.success)throw new gr({prompt:e,message:"The messages do not match the ModelMessage[] schema.",cause:r.error});return{messages:t,system:e.system}}function _$(e){if(!Fu.isInstance(e))return e;let t=(process==null?void 0:process.env.NODE_ENV)==="production",r="https://ai-sdk.dev/unauthenticated-ai-gateway";return t?new oe({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${r}`}):Object.assign(new Error(`\x1B[1m\x1B[31mUnauthenticated request to AI Gateway.\x1B[0m + +To authenticate, set the \x1B[33mAI_GATEWAY_API_KEY\x1B[0m environment variable with your API key. + +Alternatively, you can use a provider module instead of the AI Gateway. + +Learn more: \x1B[34m${r}\x1B[0m + +`),{name:"GatewayAuthenticationError"})}function Yi({operationId:e,telemetry:t}){return{"operation.name":`${e}${(t==null?void 0:t.functionId)!=null?` ${t.functionId}`:""}`,"resource.name":t==null?void 0:t.functionId,"ai.operationId":e,"ai.telemetry.functionId":t==null?void 0:t.functionId}}function b$({model:e,settings:t,telemetry:r,headers:o}){var n;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce((i,[s,l])=>{if(s==="timeout"){let d=vv(l);d!=null&&(i[`ai.settings.${s}`]=d)}else i[`ai.settings.${s}`]=l;return i},{}),...Object.entries((n=r==null?void 0:r.metadata)!=null?n:{}).reduce((i,[s,l])=>(i[`ai.telemetry.metadata.${s}`]=l,i),{}),...Object.entries(o!=null?o:{}).reduce((i,[s,l])=>(l!==void 0&&(i[`ai.request.headers.${s}`]=l),i),{})}}var P2={startSpan(){return Bu},startActiveSpan(e,t,r,o){if(typeof t=="function")return t(Bu);if(typeof r=="function")return r(Bu);if(typeof o=="function")return o(Bu)}},Bu={spanContext(){return O2},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},O2={traceId:"",spanId:"",traceFlags:0};function x$({isEnabled:e=!1,tracer:t}={}){return e?t||lv.getTracer("ai"):P2}async function Xi({name:e,tracer:t,attributes:r,fn:o,endWhenDone:n=!0}){return t.startActiveSpan(e,{attributes:await r},async i=>{let s=Hu.active();try{let l=await Hu.with(s,()=>o(i));return n&&i.end(),l}catch(l){try{w$(i,l)}finally{i.end()}throw l}})}function w$(e,t){t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:Aa.ERROR,message:t.message})):e.setStatus({code:Aa.ERROR})}async function Br({telemetry:e,attributes:t}){if((e==null?void 0:e.isEnabled)!==!0)return{};let r={};for(let[o,n]of Object.entries(t))if(n!=null){if(typeof n=="object"&&"input"in n&&typeof n.input=="function"){if((e==null?void 0:e.recordInputs)===!1)continue;let i=await n.input();i!=null&&(r[o]=i);continue}if(typeof n=="object"&&"output"in n&&typeof n.output=="function"){if((e==null?void 0:e.recordOutputs)===!1)continue;let i=await n.output();i!=null&&(r[o]=i);continue}r[o]=n}return r}function S$(e){return JSON.stringify(e.map(t=>({...t,content:typeof t.content=="string"?t.content:t.content.map(r=>r.type==="file"?{...r,data:r.data instanceof Uint8Array?g2(r.data):r.data}:r)})))}function k$(e){return{inputTokens:e.inputTokens.total,inputTokenDetails:{noCacheTokens:e.inputTokens.noCache,cacheReadTokens:e.inputTokens.cacheRead,cacheWriteTokens:e.inputTokens.cacheWrite},outputTokens:e.outputTokens.total,outputTokenDetails:{textTokens:e.outputTokens.text,reasoningTokens:e.outputTokens.reasoning},totalTokens:Er(e.inputTokens.total,e.outputTokens.total),raw:e.raw,reasoningTokens:e.outputTokens.reasoning,cachedInputTokens:e.inputTokens.cacheRead}}function uv(){return{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0}}function I$(e,t){var r,o,n,i,s,l,d,u,m,c;return{inputTokens:Er(e.inputTokens,t.inputTokens),inputTokenDetails:{noCacheTokens:Er((r=e.inputTokenDetails)==null?void 0:r.noCacheTokens,(o=t.inputTokenDetails)==null?void 0:o.noCacheTokens),cacheReadTokens:Er((n=e.inputTokenDetails)==null?void 0:n.cacheReadTokens,(i=t.inputTokenDetails)==null?void 0:i.cacheReadTokens),cacheWriteTokens:Er((s=e.inputTokenDetails)==null?void 0:s.cacheWriteTokens,(l=t.inputTokenDetails)==null?void 0:l.cacheWriteTokens)},outputTokens:Er(e.outputTokens,t.outputTokens),outputTokenDetails:{textTokens:Er((d=e.outputTokenDetails)==null?void 0:d.textTokens,(u=t.outputTokenDetails)==null?void 0:u.textTokens),reasoningTokens:Er((m=e.outputTokenDetails)==null?void 0:m.reasoningTokens,(c=t.outputTokenDetails)==null?void 0:c.reasoningTokens)},totalTokens:Er(e.totalTokens,t.totalTokens),reasoningTokens:Er(e.reasoningTokens,t.reasoningTokens),cachedInputTokens:Er(e.cachedInputTokens,t.cachedInputTokens)}}function Er(e,t){return e==null&&t==null?void 0:(e!=null?e:0)+(t!=null?t:0)}function Ku(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let r={...e};for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let n=t[o];if(n===void 0)continue;let i=o in e?e[o]:void 0,s=n!==null&&typeof n=="object"&&!Array.isArray(n)&&!(n instanceof Date)&&!(n instanceof RegExp),l=i!=null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp);s&&l?r[o]=Ku(i,n):r[o]=n}return r}function R2({error:e,exponentialBackoffDelay:t}){let r=e.responseHeaders;if(!r)return t;let o,n=r["retry-after-ms"];if(n){let s=parseFloat(n);Number.isNaN(s)||(o=s)}let i=r["retry-after"];if(i&&o===void 0){let s=parseFloat(i);Number.isNaN(s)?o=Date.parse(i)-Date.now():o=s*1e3}return o!=null&&!Number.isNaN(o)&&0<=o&&(o<60*1e3||oasync n=>T$(n,{maxRetries:e,delayInMs:t,backoffFactor:r,abortSignal:o});async function T$(e,{maxRetries:t,delayInMs:r,backoffFactor:o,abortSignal:n},i=[]){try{return await e()}catch(s){if(un(s)||t===0)throw s;let l=va(s),d=[...i,s],u=d.length;if(u>t)throw new m0({message:`Failed after ${u} attempts. Last error: ${l}`,reason:"maxRetriesExceeded",errors:d});if(s instanceof Error&&Ye.isInstance(s)&&s.isRetryable===!0&&u<=t)return await hu(R2({error:s,exponentialBackoffDelay:r}),{abortSignal:n}),T$(e,{maxRetries:t,delayInMs:o*r,backoffFactor:o,abortSignal:n},d);throw u===1?s:new m0({message:`Failed after ${u} attempts with non-retryable error: '${l}'`,reason:"errorNotRetryable",errors:d})}}function $$({maxRetries:e,abortSignal:t}){if(e!=null){if(!Number.isInteger(e))throw new Hr({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new Hr({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}let r=e!=null?e:2;return{maxRetries:r,retry:M2({maxRetries:r,abortSignal:t})}}function E$({messages:e}){let t=e.at(-1);if((t==null?void 0:t.role)!="tool")return{approvedToolApprovals:[],deniedToolApprovals:[]};let r={};for(let d of e)if(d.role==="assistant"&&typeof d.content!="string"){let u=d.content;for(let m of u)m.type==="tool-call"&&(r[m.toolCallId]=m)}let o={};for(let d of e)if(d.role==="assistant"&&typeof d.content!="string"){let u=d.content;for(let m of u)m.type==="tool-approval-request"&&(o[m.approvalId]=m)}let n={};for(let d of t.content)d.type==="tool-result"&&(n[d.toolCallId]=d);let i=[],s=[],l=t.content.filter(d=>d.type==="tool-approval-response");for(let d of l){let u=o[d.approvalId];if(u==null)throw new _U({approvalId:d.approvalId});if(n[u.toolCallId]!=null)continue;let m=r[u.toolCallId];if(m==null)throw new gv({toolCallId:u.toolCallId,approvalId:u.approvalId});let c={approvalRequest:u,approvalResponse:d,toolCall:m};d.approved?i.push(c):s.push(c)}return{approvedToolApprovals:i,deniedToolApprovals:s}}async function yv({toolCall:e,tools:t,tracer:r,telemetry:o,messages:n,abortSignal:i,experimental_context:s,onPreliminaryToolResult:l}){let{toolName:d,toolCallId:u,input:m}=e,c=t==null?void 0:t[d];if((c==null?void 0:c.execute)!=null)return Xi({name:"ai.toolCall",attributes:Br({telemetry:o,attributes:{...Yi({operationId:"ai.toolCall",telemetry:o}),"ai.toolCall.name":d,"ai.toolCall.id":u,"ai.toolCall.args":{output:()=>JSON.stringify(m)}}}),tracer:r,fn:async p=>{let f;try{let v=Zw({execute:c.execute.bind(c),input:m,options:{toolCallId:u,messages:n,abortSignal:i,experimental_context:s}});for await(let g of v)g.type==="preliminary"?l==null||l({...e,type:"tool-result",output:g.output,preliminary:!0}):f=g.output}catch(v){return w$(p,v),{type:"tool-error",toolCallId:u,toolName:d,input:m,error:v,dynamic:c.type==="dynamic",...e.providerMetadata!=null?{providerMetadata:e.providerMetadata}:{}}}try{p.setAttributes(await Br({telemetry:o,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(f)}}}))}catch(v){}return{type:"tool-result",toolCallId:u,toolName:d,input:m,output:f,dynamic:c.type==="dynamic",...e.providerMetadata!=null?{providerMetadata:e.providerMetadata}:{}}}})}function v0(e){let t=e.filter(r=>r.type==="reasoning");return t.length===0?void 0:t.map(r=>r.text).join(` +`)}function y0(e){let t=e.filter(r=>r.type==="text");if(t.length!==0)return t.map(r=>r.text).join("")}var C$=class{constructor({data:e,mediaType:t}){let r=e instanceof Uint8Array;this.base64Data=r?void 0:e,this.uint8ArrayData=r?e:void 0,this.mediaType=t}get base64(){return this.base64Data==null&&(this.base64Data=pr(this.uint8ArrayData)),this.base64Data}get uint8Array(){return this.uint8ArrayData==null&&(this.uint8ArrayData=ar(this.base64Data)),this.uint8ArrayData}},N2=class extends C${constructor(e){super(e),this.type="file"}};async function A$({tool:e,toolCall:t,messages:r,experimental_context:o}){return e.needsApproval==null?!1:typeof e.needsApproval=="boolean"?e.needsApproval:await e.needsApproval(t.input,{toolCallId:t.toolCallId,messages:r,experimental_context:o})}var j2={};pU(j2,{array:()=>U2,choice:()=>F2,json:()=>L2,object:()=>z2,text:()=>Wu});function D2(e){let t=["ROOT"],r=-1,o=null;function n(d,u,m){switch(d){case'"':{r=u,t.pop(),t.push(m),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{r=u,o=u,t.pop(),t.push(m),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(m),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=u,t.pop(),t.push(m),t.push("INSIDE_NUMBER");break}case"{":{r=u,t.pop(),t.push(m),t.push("INSIDE_OBJECT_START");break}case"[":{r=u,t.pop(),t.push(m),t.push("INSIDE_ARRAY_START");break}}}function i(d,u){switch(d){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=u,t.pop();break}}}function s(d,u){switch(d){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=u,t.pop();break}}}for(let d=0;d=0;d--)switch(t[d]){case"INSIDE_STRING":{l+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{l+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{l+="]";break}case"INSIDE_LITERAL":{let m=e.substring(o,e.length);"true".startsWith(m)?l+="true".slice(m.length):"false".startsWith(m)?l+="false".slice(m.length):"null".startsWith(m)&&(l+="null".slice(m.length))}}return l}async function Qi(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Yt({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Yt({text:D2(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var Wu=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),z2=({schema:e,name:t,description:r})=>{let o=Zr(e);return{name:"object",responseFormat:ze(o.jsonSchema).then(n=>({type:"json",schema:n,...t!=null&&{name:t},...r!=null&&{description:r}})),async parseCompleteOutput({text:n},i){let s=await Yt({text:n});if(!s.success)throw new Un({message:"No object generated: could not parse the response.",cause:s.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});let l=await Mt({value:s.value,schema:o});if(!l.success)throw new Un({message:"No object generated: response did not match schema.",cause:l.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});return l.value},async parsePartialOutput({text:n}){let i=await Qi(n);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:i.value}}},createElementStreamTransform(){}}},U2=({element:e,name:t,description:r})=>{let o=Zr(e);return{name:"array",responseFormat:ze(o.jsonSchema).then(n=>{let{$schema:i,...s}=n;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:s}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}}),async parseCompleteOutput({text:n},i){let s=await Yt({text:n});if(!s.success)throw new Un({message:"No object generated: could not parse the response.",cause:s.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});let l=s.value;if(l==null||typeof l!="object"||!("elements"in l)||!Array.isArray(l.elements))throw new Un({message:"No object generated: response did not match schema.",cause:new hr({value:l,cause:"response must be an object with an elements array"}),text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});for(let d of l.elements){let u=await Mt({value:d,schema:o});if(!u.success)throw new Un({message:"No object generated: response did not match schema.",cause:u.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason})}return l.elements},async parsePartialOutput({text:n}){let i=await Qi(n);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let s=i.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))return;let l=i.state==="repaired-parse"&&s.elements.length>0?s.elements.slice(0,-1):s.elements,d=[];for(let u of l){let m=await Mt({value:u,schema:o});m.success&&d.push(m.value)}return{partial:d}}}},createElementStreamTransform(){let n=0;return new TransformStream({transform({partialOutput:i},s){if(i!=null)for(;n({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}),async parseCompleteOutput({text:o},n){let i=await Yt({text:o});if(!i.success)throw new Un({message:"No object generated: could not parse the response.",cause:i.error,text:o,response:n.response,usage:n.usage,finishReason:n.finishReason});let s=i.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string"||!e.includes(s.result))throw new Un({message:"No object generated: response did not match schema.",cause:new hr({value:s,cause:"response must be an object that contains a choice value."}),text:o,response:n.response,usage:n.usage,finishReason:n.finishReason});return s.result},async parsePartialOutput({text:o}){let n=await Qi(o);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let i=n.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string")return;let s=e.filter(l=>l.startsWith(i.result));return n.state==="successful-parse"?s.includes(i.result)?{partial:i.result}:void 0:s.length===1?{partial:s[0]}:void 0}}},createElementStreamTransform(){}}),L2=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:r},o){let n=await Yt({text:r});if(!n.success)throw new Un({message:"No object generated: could not parse the response.",cause:n.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return n.value},async parsePartialOutput({text:r}){let o=await Qi(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return o.value===void 0?void 0:{partial:o.value}}},createElementStreamTransform(){}});async function P$({toolCall:e,tools:t,repairToolCall:r,system:o,messages:n}){var i;try{if(t==null){if(e.providerExecuted&&e.dynamic)return await O$(e);throw new cv({toolName:e.toolName})}try{return await _0({toolCall:e,tools:t})}catch(s){if(r==null||!(cv.isInstance(s)||fv.isInstance(s)))throw s;let l=null;try{l=await r({toolCall:e,tools:t,inputSchema:async({toolName:d})=>{let{inputSchema:u}=t[d];return await Zr(u).jsonSchema},system:o,messages:n,error:s})}catch(d){throw new ZU({cause:d,originalError:s})}if(l==null)throw s;return await _0({toolCall:l,tools:t})}}catch(s){let l=await Yt({text:e.input}),d=l.success?l.value:e.input;return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:d,dynamic:!0,invalid:!0,error:s,title:(i=t==null?void 0:t[e.toolName])==null?void 0:i.title,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}}}async function O$(e){let t=e.input.trim()===""?{success:!0,value:{}}:await Yt({text:e.input});if(t.success===!1)throw new fv({toolName:e.toolName,toolInput:e.input,cause:t.error});return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:t.value,providerExecuted:!0,dynamic:!0,providerMetadata:e.providerMetadata}}async function _0({toolCall:e,tools:t}){let r=e.toolName,o=t[r];if(o==null){if(e.providerExecuted&&e.dynamic)return await O$(e);throw new cv({toolName:e.toolName,availableTools:Object.keys(t)})}let n=Zr(o.inputSchema),i=e.input.trim()===""?await Mt({value:{},schema:n}):await Yt({text:e.input,schema:n});if(i.success===!1)throw new fv({toolName:r,toolInput:e.input,cause:i.error});return o.type==="dynamic"?{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:i.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,dynamic:!0,title:o.title}:{type:"tool-call",toolCallId:e.toolCallId,toolName:r,input:i.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:o.title}}var R$=class{constructor({content:e,finishReason:t,rawFinishReason:r,usage:o,warnings:n,request:i,response:s,providerMetadata:l}){this.content=e,this.finishReason=t,this.rawFinishReason=r,this.usage=o,this.warnings=n,this.request=i,this.response=s,this.providerMetadata=l}get text(){return this.content.filter(e=>e.type==="text").map(e=>e.text).join("")}get reasoning(){return this.content.filter(e=>e.type==="reasoning")}get reasoningText(){return this.reasoning.length===0?void 0:this.reasoning.map(e=>e.text).join("")}get files(){return this.content.filter(e=>e.type==="file").map(e=>e.file)}get sources(){return this.content.filter(e=>e.type==="source")}get toolCalls(){return this.content.filter(e=>e.type==="tool-call")}get staticToolCalls(){return this.toolCalls.filter(e=>e.dynamic!==!0)}get dynamicToolCalls(){return this.toolCalls.filter(e=>e.dynamic===!0)}get toolResults(){return this.content.filter(e=>e.type==="tool-result")}get staticToolResults(){return this.toolResults.filter(e=>e.dynamic!==!0)}get dynamicToolResults(){return this.toolResults.filter(e=>e.dynamic===!0)}};function M$(e){return({steps:t})=>t.length===e}async function N$({stopConditions:e,steps:t}){return(await Promise.all(e.map(r=>r({steps:t})))).some(r=>r)}async function pv({content:e,tools:t}){let r=[],o=[];for(let i of e)if(i.type!=="source"&&!((i.type==="tool-result"||i.type==="tool-error")&&!i.providerExecuted)&&!(i.type==="text"&&i.text.length===0))switch(i.type){case"text":o.push({type:"text",text:i.text,providerOptions:i.providerMetadata});break;case"reasoning":o.push({type:"reasoning",text:i.text,providerOptions:i.providerMetadata});break;case"file":o.push({type:"file",data:i.file.base64,mediaType:i.file.mediaType,providerOptions:i.providerMetadata});break;case"tool-call":o.push({type:"tool-call",toolCallId:i.toolCallId,toolName:i.toolName,input:i.input,providerExecuted:i.providerExecuted,providerOptions:i.providerMetadata});break;case"tool-result":{let s=await Ji({toolCallId:i.toolCallId,input:i.input,tool:t==null?void 0:t[i.toolName],output:i.output,errorMode:"none"});o.push({type:"tool-result",toolCallId:i.toolCallId,toolName:i.toolName,output:s,providerOptions:i.providerMetadata});break}case"tool-error":{let s=await Ji({toolCallId:i.toolCallId,input:i.input,tool:t==null?void 0:t[i.toolName],output:i.error,errorMode:"json"});o.push({type:"tool-result",toolCallId:i.toolCallId,toolName:i.toolName,output:s,providerOptions:i.providerMetadata});break}case"tool-approval-request":o.push({type:"tool-approval-request",approvalId:i.approvalId,toolCallId:i.toolCall.toolCallId});break}o.length>0&&r.push({role:"assistant",content:o});let n=[];for(let i of e){if(!(i.type==="tool-result"||i.type==="tool-error")||i.providerExecuted)continue;let s=await Ji({toolCallId:i.toolCallId,input:i.input,tool:t==null?void 0:t[i.toolName],output:i.type==="tool-result"?i.output:i.error,errorMode:i.type==="tool-error"?"text":"none"});n.push({type:"tool-result",toolCallId:i.toolCallId,toolName:i.toolName,output:s,...i.providerMetadata!=null?{providerOptions:i.providerMetadata}:{}})}return n.length>0&&r.push({role:"tool",content:n}),r}function j$(...e){let t=e.filter(o=>o!=null);if(t.length===0)return;if(t.length===1)return t[0];let r=new AbortController;for(let o of t){if(o.aborted)return r.abort(o.reason),r.signal;o.addEventListener("abort",()=>{r.abort(o.reason)},{once:!0})}return r.signal}var q2=qr({prefix:"aitxt",size:24});async function _v({model:e,tools:t,toolChoice:r,system:o,prompt:n,messages:i,maxRetries:s,abortSignal:l,timeout:d,headers:u,stopWhen:m=M$(1),experimental_output:c,output:p=c,experimental_telemetry:f,providerOptions:v,experimental_activeTools:g,activeTools:y=g,experimental_prepareStep:S,prepareStep:b=S,experimental_repairToolCall:_,experimental_download:k,experimental_context:w,experimental_include:h,_internal:{generateId:I=q2}={},onStepFinish:j,onFinish:U,...F}){let Z=Ju(e),L=Wi(m),M=vv(d),q=u$(d),C=q!=null?new AbortController:void 0,E=j$(l,M!=null?AbortSignal.timeout(M):void 0,C==null?void 0:C.signal),{maxRetries:te,retry:P}=$$({maxRetries:s,abortSignal:E}),se=dv(F),ee=Ct(u!=null?u:{},`ai/${c$}`),he=b$({model:Z,telemetry:f,headers:ee,settings:{...se,maxRetries:te}}),fe=await y$({system:o,prompt:n,messages:i}),V=x$(f);try{return await Xi({name:"ai.generateText",attributes:Br({telemetry:f,attributes:{...Yi({operationId:"ai.generateText",telemetry:f}),...he,"ai.model.provider":Z.provider,"ai.model.id":Z.modelId,"ai.prompt":{input:()=>JSON.stringify({system:o,prompt:n,messages:i})}}}),tracer:V,fn:async Ae=>{var T,pe,de,H,le,R,D,Q,B,G,Me;let sr=fe.messages,x=[],{approvedToolApprovals:ue,deniedToolApprovals:Oe}=E$({messages:sr}),De=ue.filter(Ze=>!Ze.toolCall.providerExecuted);if(Oe.length>0||De.length>0){let Ze=await b0({toolCalls:De.map(be=>be.toolCall),tools:t,tracer:V,telemetry:f,messages:sr,abortSignal:E,experimental_context:w}),It=[];for(let be of Ze){let tt=await Ji({toolCallId:be.toolCallId,input:be.input,tool:t==null?void 0:t[be.toolName],output:be.type==="tool-result"?be.output:be.error,errorMode:be.type==="tool-error"?"json":"none"});It.push({type:"tool-result",toolCallId:be.toolCallId,toolName:be.toolName,output:tt})}for(let be of Oe)It.push({type:"tool-result",toolCallId:be.toolCall.toolCallId,toolName:be.toolCall.toolName,output:{type:"execution-denied",reason:be.approvalResponse.reason,...be.toolCall.providerExecuted&&{providerOptions:{openai:{approvalId:be.approvalResponse.approvalId}}}}});x.push({role:"tool",content:It})}let at=[...ue,...Oe].filter(Ze=>Ze.toolCall.providerExecuted);at.length>0&&x.push({role:"tool",content:at.map(Ze=>({type:"tool-approval-response",approvalId:Ze.approvalResponse.approvalId,approved:Ze.approvalResponse.approved,reason:Ze.approvalResponse.reason,providerExecuted:!0}))});let gt=dv(F),ge,_t=[],Xt=[],ne=[],He=new Map;do{let Ze=q!=null?setTimeout(()=>C.abort(),q):void 0;try{let It=[...sr,...x],be=await(b==null?void 0:b({model:Z,steps:ne,stepNumber:ne.length,messages:It,experimental_context:w})),tt=Ju((T=be==null?void 0:be.model)!=null?T:Z),ct=await m$({prompt:{system:(pe=be==null?void 0:be.system)!=null?pe:fe.system,messages:(de=be==null?void 0:be.messages)!=null?de:It},supportedUrls:await tt.supportedUrls,download:k});w=(H=be==null?void 0:be.experimental_context)!=null?H:w;let{toolChoice:hn,tools:ho}=await f$({tools:t,toolChoice:(le=be==null?void 0:be.toolChoice)!=null?le:r,activeTools:(R=be==null?void 0:be.activeTools)!=null?R:y});ge=await P(()=>{var Ie;return Xi({name:"ai.generateText.doGenerate",attributes:Br({telemetry:f,attributes:{...Yi({operationId:"ai.generateText.doGenerate",telemetry:f}),...he,"ai.model.provider":tt.provider,"ai.model.id":tt.modelId,"ai.prompt.messages":{input:()=>S$(ct)},"ai.prompt.tools":{input:()=>ho==null?void 0:ho.map(Pt=>JSON.stringify(Pt))},"ai.prompt.toolChoice":{input:()=>hn!=null?JSON.stringify(hn):void 0},"gen_ai.system":tt.provider,"gen_ai.request.model":tt.modelId,"gen_ai.request.frequency_penalty":F.frequencyPenalty,"gen_ai.request.max_tokens":F.maxOutputTokens,"gen_ai.request.presence_penalty":F.presencePenalty,"gen_ai.request.stop_sequences":F.stopSequences,"gen_ai.request.temperature":(Ie=F.temperature)!=null?Ie:void 0,"gen_ai.request.top_k":F.topK,"gen_ai.request.top_p":F.topP}}),tracer:V,fn:async Pt=>{var Vn,Wr,ss,ls,Na,vo,Kr,ja;let Pc=Ku(v,be==null?void 0:be.providerOptions),St=await tt.doGenerate({...gt,tools:ho,toolChoice:hn,responseFormat:await(p==null?void 0:p.responseFormat),prompt:ct,providerOptions:Pc,abortSignal:E,headers:ee}),lr={id:(Wr=(Vn=St.response)==null?void 0:Vn.id)!=null?Wr:I(),timestamp:(ls=(ss=St.response)==null?void 0:ss.timestamp)!=null?ls:new Date,modelId:(vo=(Na=St.response)==null?void 0:Na.modelId)!=null?vo:tt.modelId,headers:(Kr=St.response)==null?void 0:Kr.headers,body:(ja=St.response)==null?void 0:ja.body};return Pt.setAttributes(await Br({telemetry:f,attributes:{"ai.response.finishReason":St.finishReason.unified,"ai.response.text":{output:()=>y0(St.content)},"ai.response.reasoning":{output:()=>v0(St.content)},"ai.response.toolCalls":{output:()=>{let yn=x0(St.content);return yn==null?void 0:JSON.stringify(yn)}},"ai.response.id":lr.id,"ai.response.model":lr.modelId,"ai.response.timestamp":lr.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(St.providerMetadata),"ai.usage.promptTokens":St.usage.inputTokens.total,"ai.usage.completionTokens":St.usage.outputTokens.total,"gen_ai.response.finish_reasons":[St.finishReason.unified],"gen_ai.response.id":lr.id,"gen_ai.response.model":lr.modelId,"gen_ai.usage.input_tokens":St.usage.inputTokens.total,"gen_ai.usage.output_tokens":St.usage.outputTokens.total}})),{...St,response:lr}}})});let vn=await Promise.all(ge.content.filter(Ie=>Ie.type==="tool-call").map(Ie=>P$({toolCall:Ie,tools:t,repairToolCall:_,system:o,messages:It}))),Cr={};for(let Ie of vn){if(Ie.invalid)continue;let Pt=t==null?void 0:t[Ie.toolName];Pt!=null&&((Pt==null?void 0:Pt.onInputAvailable)!=null&&await Pt.onInputAvailable({input:Ie.input,toolCallId:Ie.toolCallId,messages:It,abortSignal:E,experimental_context:w}),await A$({tool:Pt,toolCall:Ie,messages:It,experimental_context:w})&&(Cr[Ie.toolCallId]={type:"tool-approval-request",approvalId:I(),toolCall:Ie}))}let Ac=vn.filter(Ie=>Ie.invalid&&Ie.dynamic);Xt=[];for(let Ie of Ac)Xt.push({type:"tool-error",toolCallId:Ie.toolCallId,toolName:Ie.toolName,input:Ie.input,error:va(Ie.error),dynamic:!0});_t=vn.filter(Ie=>!Ie.providerExecuted),t!=null&&Xt.push(...await b0({toolCalls:_t.filter(Ie=>!Ie.invalid&&Cr[Ie.toolCallId]==null),tools:t,tracer:V,telemetry:f,messages:It,abortSignal:E,experimental_context:w}));for(let Ie of vn){if(!Ie.providerExecuted)continue;let Pt=t==null?void 0:t[Ie.toolName];(Pt==null?void 0:Pt.type)==="provider"&&Pt.supportsDeferredResults&&(ge.content.some(Wr=>Wr.type==="tool-result"&&Wr.toolCallId===Ie.toolCallId)||He.set(Ie.toolCallId,{toolName:Ie.toolName}))}for(let Ie of ge.content)Ie.type==="tool-result"&&He.delete(Ie.toolCallId);let Ma=V2({content:ge.content,toolCalls:vn,toolOutputs:Xt,toolApprovalRequests:Object.values(Cr),tools:t});x.push(...await pv({content:Ma,tools:t}));let is=(D=h==null?void 0:h.requestBody)==null||D?(Q=ge.request)!=null?Q:{}:{...ge.request,body:void 0},Zn={...ge.response,messages:structuredClone(x),body:(B=h==null?void 0:h.responseBody)==null||B?(G=ge.response)==null?void 0:G.body:void 0},Tt=new R$({content:Ma,finishReason:ge.finishReason.unified,rawFinishReason:ge.finishReason.raw,usage:k$(ge.usage),warnings:ge.warnings,providerMetadata:ge.providerMetadata,request:is,response:Zn});hv({warnings:(Me=ge.warnings)!=null?Me:[],provider:tt.provider,model:tt.modelId}),ne.push(Tt),await(j==null?void 0:j(Tt))}finally{Ze!=null&&clearTimeout(Ze)}}while((_t.length>0&&Xt.length===_t.length||He.size>0)&&!await N$({stopConditions:L,steps:ne}));Ae.setAttributes(await Br({telemetry:f,attributes:{"ai.response.finishReason":ge.finishReason.unified,"ai.response.text":{output:()=>y0(ge.content)},"ai.response.reasoning":{output:()=>v0(ge.content)},"ai.response.toolCalls":{output:()=>{let Ze=x0(ge.content);return Ze==null?void 0:JSON.stringify(Ze)}},"ai.response.providerMetadata":JSON.stringify(ge.providerMetadata),"ai.usage.promptTokens":ge.usage.inputTokens.total,"ai.usage.completionTokens":ge.usage.outputTokens.total}}));let Ue=ne[ne.length-1],gn=ne.reduce((Ze,It)=>I$(Ze,It.usage),{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0});await(U==null?void 0:U({finishReason:Ue.finishReason,rawFinishReason:Ue.rawFinishReason,usage:Ue.usage,content:Ue.content,text:Ue.text,reasoningText:Ue.reasoningText,reasoning:Ue.reasoning,files:Ue.files,sources:Ue.sources,toolCalls:Ue.toolCalls,staticToolCalls:Ue.staticToolCalls,dynamicToolCalls:Ue.dynamicToolCalls,toolResults:Ue.toolResults,staticToolResults:Ue.staticToolResults,dynamicToolResults:Ue.dynamicToolResults,request:Ue.request,response:Ue.response,warnings:Ue.warnings,providerMetadata:Ue.providerMetadata,steps:ne,totalUsage:gn,experimental_context:w}));let qn;return Ue.finishReason==="stop"&&(qn=await(p!=null?p:Wu()).parseCompleteOutput({text:Ue.text},{response:Ue.response,usage:Ue.usage,finishReason:Ue.finishReason})),new Z2({steps:ne,totalUsage:gn,output:qn})}})}catch(Ae){throw _$(Ae)}}async function b0({toolCalls:e,tools:t,tracer:r,telemetry:o,messages:n,abortSignal:i,experimental_context:s}){return(await Promise.all(e.map(async d=>yv({toolCall:d,tools:t,tracer:r,telemetry:o,messages:n,abortSignal:i,experimental_context:s})))).filter(d=>d!=null)}var Z2=class{constructor(e){this.steps=e.steps,this._output=e.output,this.totalUsage=e.totalUsage}get finalStep(){return this.steps[this.steps.length-1]}get content(){return this.finalStep.content}get text(){return this.finalStep.text}get files(){return this.finalStep.files}get reasoningText(){return this.finalStep.reasoningText}get reasoning(){return this.finalStep.reasoning}get toolCalls(){return this.finalStep.toolCalls}get staticToolCalls(){return this.finalStep.staticToolCalls}get dynamicToolCalls(){return this.finalStep.dynamicToolCalls}get toolResults(){return this.finalStep.toolResults}get staticToolResults(){return this.finalStep.staticToolResults}get dynamicToolResults(){return this.finalStep.dynamicToolResults}get sources(){return this.finalStep.sources}get finishReason(){return this.finalStep.finishReason}get rawFinishReason(){return this.finalStep.rawFinishReason}get warnings(){return this.finalStep.warnings}get providerMetadata(){return this.finalStep.providerMetadata}get response(){return this.finalStep.response}get request(){return this.finalStep.request}get usage(){return this.finalStep.usage}get experimental_output(){return this.output}get output(){if(this._output==null)throw new G0;return this._output}};function x0(e){let t=e.filter(r=>r.type==="tool-call");if(t.length!==0)return t.map(r=>({toolCallId:r.toolCallId,toolName:r.toolName,input:r.input}))}function V2({content:e,toolCalls:t,toolOutputs:r,toolApprovalRequests:o,tools:n}){let i=[];for(let s of e)switch(s.type){case"text":case"reasoning":case"source":i.push(s);break;case"file":{i.push({type:"file",file:new C$(s),...s.providerMetadata!=null?{providerMetadata:s.providerMetadata}:{}});break}case"tool-call":{i.push(t.find(l=>l.toolCallId===s.toolCallId));break}case"tool-result":{let l=t.find(d=>d.toolCallId===s.toolCallId);if(l==null){let d=n==null?void 0:n[s.toolName];if(!((d==null?void 0:d.type)==="provider"&&d.supportsDeferredResults))throw new Error(`Tool call ${s.toolCallId} not found.`);s.isError?i.push({type:"tool-error",toolCallId:s.toolCallId,toolName:s.toolName,input:void 0,error:s.result,providerExecuted:!0,dynamic:s.dynamic}):i.push({type:"tool-result",toolCallId:s.toolCallId,toolName:s.toolName,input:void 0,output:s.result,providerExecuted:!0,dynamic:s.dynamic});break}s.isError?i.push({type:"tool-error",toolCallId:s.toolCallId,toolName:s.toolName,input:l.input,error:s.result,providerExecuted:!0,dynamic:l.dynamic}):i.push({type:"tool-result",toolCallId:s.toolCallId,toolName:s.toolName,input:l.input,output:s.result,providerExecuted:!0,dynamic:l.dynamic});break}case"tool-approval-request":{let l=t.find(d=>d.toolCallId===s.toolCallId);if(l==null)throw new gv({toolCallId:s.toolCallId,approvalId:s.approvalId});i.push({type:"tool-approval-request",approvalId:s.approvalId,toolCall:l});break}}return[...i,...r,...o]}function Yu(e,t){let r=new Headers(e!=null?e:{});for(let[o,n]of Object.entries(t))r.has(o)||r.set(o,n);return r}function G2({status:e,statusText:t,headers:r,textStream:o}){return new Response(o.pipeThrough(new TextEncoderStream),{status:e!=null?e:200,statusText:t,headers:Yu(r,{"content-type":"text/plain; charset=utf-8"})})}function D$({response:e,status:t,statusText:r,headers:o,stream:n}){let i=t!=null?t:200;r!==void 0?e.writeHead(i,r,o):e.writeHead(i,o);let s=n.getReader();(async()=>{try{for(;;){let{done:d,value:u}=await s.read();if(d)break;e.write(u)||await new Promise(c=>{e.once("drain",c)})}}catch(d){throw d}finally{e.end()}})()}function H2({response:e,status:t,statusText:r,headers:o,textStream:n}){D$({response:e,status:t,statusText:r,headers:Object.fromEntries(Yu(o,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:n.pipeThrough(new TextEncoderStream)})}var z$=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)} + +`)},flush(e){e.enqueue(`data: [DONE] + +`)}})}},U$={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};function B2({status:e,statusText:t,headers:r,stream:o,consumeSseStream:n}){let i=o.pipeThrough(new z$);if(n){let[s,l]=i.tee();i=s,n({stream:l})}return new Response(i.pipeThrough(new TextEncoderStream),{status:e,statusText:t,headers:Yu(r,U$)})}function J2({originalMessages:e,responseMessageId:t}){if(e==null)return;let r=e[e.length-1];return(r==null?void 0:r.role)==="assistant"?r.id:typeof t=="function"?t():t}var OW=O(()=>A(a.union([a.strictObject({type:a.literal("text-start"),id:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("text-delta"),id:a.string(),delta:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("text-end"),id:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("error"),errorText:a.string()}),a.strictObject({type:a.literal("tool-input-start"),toolCallId:a.string(),toolName:a.string(),providerExecuted:a.boolean().optional(),providerMetadata:ve.optional(),dynamic:a.boolean().optional(),title:a.string().optional()}),a.strictObject({type:a.literal("tool-input-delta"),toolCallId:a.string(),inputTextDelta:a.string()}),a.strictObject({type:a.literal("tool-input-available"),toolCallId:a.string(),toolName:a.string(),input:a.unknown(),providerExecuted:a.boolean().optional(),providerMetadata:ve.optional(),dynamic:a.boolean().optional(),title:a.string().optional()}),a.strictObject({type:a.literal("tool-input-error"),toolCallId:a.string(),toolName:a.string(),input:a.unknown(),providerExecuted:a.boolean().optional(),providerMetadata:ve.optional(),dynamic:a.boolean().optional(),errorText:a.string(),title:a.string().optional()}),a.strictObject({type:a.literal("tool-approval-request"),approvalId:a.string(),toolCallId:a.string()}),a.strictObject({type:a.literal("tool-output-available"),toolCallId:a.string(),output:a.unknown(),providerExecuted:a.boolean().optional(),dynamic:a.boolean().optional(),preliminary:a.boolean().optional()}),a.strictObject({type:a.literal("tool-output-error"),toolCallId:a.string(),errorText:a.string(),providerExecuted:a.boolean().optional(),dynamic:a.boolean().optional()}),a.strictObject({type:a.literal("tool-output-denied"),toolCallId:a.string()}),a.strictObject({type:a.literal("reasoning-start"),id:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("reasoning-delta"),id:a.string(),delta:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("reasoning-end"),id:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("source-url"),sourceId:a.string(),url:a.string(),title:a.string().optional(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("source-document"),sourceId:a.string(),mediaType:a.string(),title:a.string(),filename:a.string().optional(),providerMetadata:ve.optional()}),a.strictObject({type:a.literal("file"),url:a.string(),mediaType:a.string(),providerMetadata:ve.optional()}),a.strictObject({type:a.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:a.string().optional(),data:a.unknown(),transient:a.boolean().optional()}),a.strictObject({type:a.literal("start-step")}),a.strictObject({type:a.literal("finish-step")}),a.strictObject({type:a.literal("start"),messageId:a.string().optional(),messageMetadata:a.unknown().optional()}),a.strictObject({type:a.literal("finish"),finishReason:a.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:a.unknown().optional()}),a.strictObject({type:a.literal("abort"),reason:a.string().optional()}),a.strictObject({type:a.literal("message-metadata"),messageMetadata:a.unknown()})])));function W2(e){return e.type.startsWith("data-")}function mv(e){return e.type.startsWith("tool-")}function K2(e){return e.type==="dynamic-tool"}function Y2(e){return mv(e)||K2(e)}function w0(e){return e.type.split("-").slice(1).join("-")}function X2({lastMessage:e,messageId:t}){return{message:(e==null?void 0:e.role)==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Q2({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:o,onError:n,onToolCall:i,onData:s}){return e.pipeThrough(new TransformStream({async transform(l,d){await o(async({state:u,write:m})=>{var c,p,f,v;function g(_){let w=u.message.parts.filter(Y2).find(h=>h.toolCallId===_);if(w==null)throw new Pa({chunkType:"tool-invocation",chunkId:_,message:`No tool invocation found for tool call ID "${_}".`});return w}function y(_){var k;let w=u.message.parts.find(j=>mv(j)&&j.toolCallId===_.toolCallId),h=_,I=w;w!=null?(w.state=_.state,I.input=h.input,I.output=h.output,I.errorText=h.errorText,I.rawInput=h.rawInput,I.preliminary=h.preliminary,_.title!==void 0&&(I.title=_.title),I.providerExecuted=(k=h.providerExecuted)!=null?k:w.providerExecuted,h.providerMetadata!=null&&(w.callProviderMetadata=h.providerMetadata)):u.message.parts.push({type:`tool-${_.toolName}`,toolCallId:_.toolCallId,state:_.state,title:_.title,input:h.input,output:h.output,rawInput:h.rawInput,errorText:h.errorText,providerExecuted:h.providerExecuted,preliminary:h.preliminary,...h.providerMetadata!=null?{callProviderMetadata:h.providerMetadata}:{}})}function S(_){var k,w;let h=u.message.parts.find(U=>U.type==="dynamic-tool"&&U.toolCallId===_.toolCallId),I=_,j=h;h!=null?(h.state=_.state,j.toolName=_.toolName,j.input=I.input,j.output=I.output,j.errorText=I.errorText,j.rawInput=(k=I.rawInput)!=null?k:j.rawInput,j.preliminary=I.preliminary,_.title!==void 0&&(j.title=_.title),j.providerExecuted=(w=I.providerExecuted)!=null?w:h.providerExecuted,I.providerMetadata!=null&&(h.callProviderMetadata=I.providerMetadata)):u.message.parts.push({type:"dynamic-tool",toolName:_.toolName,toolCallId:_.toolCallId,state:_.state,input:I.input,output:I.output,errorText:I.errorText,preliminary:I.preliminary,providerExecuted:I.providerExecuted,title:_.title,...I.providerMetadata!=null?{callProviderMetadata:I.providerMetadata}:{}})}async function b(_){if(_!=null){let k=u.message.metadata!=null?Ku(u.message.metadata,_):_;t!=null&&await Je({value:k,schema:t,context:{field:"message.metadata",entityId:u.message.id}}),u.message.metadata=k}}switch(l.type){case"text-start":{let _={type:"text",text:"",providerMetadata:l.providerMetadata,state:"streaming"};u.activeTextParts[l.id]=_,u.message.parts.push(_),m();break}case"text-delta":{let _=u.activeTextParts[l.id];if(_==null)throw new Pa({chunkType:"text-delta",chunkId:l.id,message:`Received text-delta for missing text part with ID "${l.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});_.text+=l.delta,_.providerMetadata=(c=l.providerMetadata)!=null?c:_.providerMetadata,m();break}case"text-end":{let _=u.activeTextParts[l.id];if(_==null)throw new Pa({chunkType:"text-end",chunkId:l.id,message:`Received text-end for missing text part with ID "${l.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});_.state="done",_.providerMetadata=(p=l.providerMetadata)!=null?p:_.providerMetadata,delete u.activeTextParts[l.id],m();break}case"reasoning-start":{let _={type:"reasoning",text:"",providerMetadata:l.providerMetadata,state:"streaming"};u.activeReasoningParts[l.id]=_,u.message.parts.push(_),m();break}case"reasoning-delta":{let _=u.activeReasoningParts[l.id];if(_==null)throw new Pa({chunkType:"reasoning-delta",chunkId:l.id,message:`Received reasoning-delta for missing reasoning part with ID "${l.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});_.text+=l.delta,_.providerMetadata=(f=l.providerMetadata)!=null?f:_.providerMetadata,m();break}case"reasoning-end":{let _=u.activeReasoningParts[l.id];if(_==null)throw new Pa({chunkType:"reasoning-end",chunkId:l.id,message:`Received reasoning-end for missing reasoning part with ID "${l.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});_.providerMetadata=(v=l.providerMetadata)!=null?v:_.providerMetadata,_.state="done",delete u.activeReasoningParts[l.id],m();break}case"file":{u.message.parts.push({type:"file",mediaType:l.mediaType,url:l.url}),m();break}case"source-url":{u.message.parts.push({type:"source-url",sourceId:l.sourceId,url:l.url,title:l.title,providerMetadata:l.providerMetadata}),m();break}case"source-document":{u.message.parts.push({type:"source-document",sourceId:l.sourceId,mediaType:l.mediaType,title:l.title,filename:l.filename,providerMetadata:l.providerMetadata}),m();break}case"tool-input-start":{let _=u.message.parts.filter(mv);u.partialToolCalls[l.toolCallId]={text:"",toolName:l.toolName,index:_.length,dynamic:l.dynamic,title:l.title},l.dynamic?S({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-streaming",input:void 0,providerExecuted:l.providerExecuted,title:l.title,providerMetadata:l.providerMetadata}):y({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-streaming",input:void 0,providerExecuted:l.providerExecuted,title:l.title,providerMetadata:l.providerMetadata}),m();break}case"tool-input-delta":{let _=u.partialToolCalls[l.toolCallId];if(_==null)throw new Pa({chunkType:"tool-input-delta",chunkId:l.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${l.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});_.text+=l.inputTextDelta;let{value:k}=await Qi(_.text);_.dynamic?S({toolCallId:l.toolCallId,toolName:_.toolName,state:"input-streaming",input:k,title:_.title}):y({toolCallId:l.toolCallId,toolName:_.toolName,state:"input-streaming",input:k,title:_.title}),m();break}case"tool-input-available":{l.dynamic?S({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-available",input:l.input,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata,title:l.title}):y({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-available",input:l.input,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata,title:l.title}),m(),i&&!l.providerExecuted&&await i({toolCall:l});break}case"tool-input-error":{l.dynamic?S({toolCallId:l.toolCallId,toolName:l.toolName,state:"output-error",input:l.input,errorText:l.errorText,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata}):y({toolCallId:l.toolCallId,toolName:l.toolName,state:"output-error",input:void 0,rawInput:l.input,errorText:l.errorText,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata}),m();break}case"tool-approval-request":{let _=g(l.toolCallId);_.state="approval-requested",_.approval={id:l.approvalId},m();break}case"tool-output-denied":{let _=g(l.toolCallId);_.state="output-denied",m();break}case"tool-output-available":{let _=g(l.toolCallId);_.type==="dynamic-tool"?S({toolCallId:l.toolCallId,toolName:_.toolName,state:"output-available",input:_.input,output:l.output,preliminary:l.preliminary,providerExecuted:l.providerExecuted,title:_.title}):y({toolCallId:l.toolCallId,toolName:w0(_),state:"output-available",input:_.input,output:l.output,providerExecuted:l.providerExecuted,preliminary:l.preliminary,title:_.title}),m();break}case"tool-output-error":{let _=g(l.toolCallId);_.type==="dynamic-tool"?S({toolCallId:l.toolCallId,toolName:_.toolName,state:"output-error",input:_.input,errorText:l.errorText,providerExecuted:l.providerExecuted,title:_.title}):y({toolCallId:l.toolCallId,toolName:w0(_),state:"output-error",input:_.input,rawInput:_.rawInput,errorText:l.errorText,providerExecuted:l.providerExecuted,title:_.title}),m();break}case"start-step":{u.message.parts.push({type:"step-start"});break}case"finish-step":{u.activeTextParts={},u.activeReasoningParts={};break}case"start":{l.messageId!=null&&(u.message.id=l.messageId),await b(l.messageMetadata),(l.messageId!=null||l.messageMetadata!=null)&&m();break}case"finish":{l.finishReason!=null&&(u.finishReason=l.finishReason),await b(l.messageMetadata),l.messageMetadata!=null&&m();break}case"message-metadata":{await b(l.messageMetadata),l.messageMetadata!=null&&m();break}case"error":{n==null||n(new Error(l.errorText));break}default:if(W2(l)){if((r==null?void 0:r[l.type])!=null){let w=u.message.parts.findIndex(I=>"id"in I&&"data"in I&&I.id===l.id&&I.type===l.type),h=w>=0?w:u.message.parts.length;await Je({value:l.data,schema:r[l.type],context:{field:`message.parts[${h}].data`,entityName:l.type,entityId:l.id}})}let _=l;if(_.transient){s==null||s(_);break}let k=_.id!=null?u.message.parts.find(w=>_.type===w.type&&_.id===w.id):void 0;k!=null?k.data=_.data:u.message.parts.push(_),s==null||s(_),m()}}d.enqueue(l)})}}))}function eF({messageId:e,originalMessages:t=[],onFinish:r,onError:o,stream:n}){let i=t==null?void 0:t[t.length-1];(i==null?void 0:i.role)!=="assistant"?i=void 0:e=i.id;let s=!1,l=n.pipeThrough(new TransformStream({transform(p,f){if(p.type==="start"){let v=p;v.messageId==null&&e!=null&&(v.messageId=e)}p.type==="abort"&&(s=!0),f.enqueue(p)}}));if(r==null)return l;let d=X2({lastMessage:i?structuredClone(i):void 0,messageId:e!=null?e:""}),u=async p=>{await p({state:d,write:()=>{}})},m=!1,c=async()=>{if(m||!r)return;m=!0;let p=d.message.id===(i==null?void 0:i.id);await r({isAborted:s,isContinuation:p,responseMessage:d.message,messages:[...p?t.slice(0,-1):t,d.message],finishReason:d.finishReason})};return Q2({stream:l,runUpdateMessageJob:u,onError:o}).pipeThrough(new TransformStream({transform(p,f){f.enqueue(p)},async cancel(){await c()},async flush(){await c()}}))}function tF({response:e,status:t,statusText:r,headers:o,stream:n,consumeSseStream:i}){let s=n.pipeThrough(new z$);if(i){let[l,d]=s.tee();s=l,i({stream:d})}D$({response:e,status:t,statusText:r,headers:Object.fromEntries(Yu(o,U$).entries()),stream:s.pipeThrough(new TextEncoderStream)})}function Bi(e){let t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){let r=this.getReader(),o=!1;async function n(i){var s;if(!o){o=!0;try{i&&await((s=r.cancel)==null?void 0:s.call(r))}finally{try{r.releaseLock()}catch(l){}}}}return{async next(){if(o)return{done:!0,value:void 0};let{done:i,value:s}=await r.read();return i?(await n(!0),{done:!0,value:void 0}):{done:!1,value:s}},async return(){return await n(!0),{done:!0,value:void 0}},async throw(i){throw await n(!0),i}}},t}async function rF({stream:e,onError:t}){let r=e.getReader();try{for(;;){let{done:o}=await r.read();if(o)break}}catch(o){t==null||t(o)}finally{r.releaseLock()}}function S0(){let e,t;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function nF(){let e=[],t=null,r=!1,o=S0(),n=()=>{r=!0,o.resolve(),e.forEach(s=>s.cancel()),e=[],t==null||t.close()},i=async()=>{if(r&&e.length===0){t==null||t.close();return}if(e.length===0)return o=S0(),await o.promise,i();try{let{value:s,done:l}=await e[0].read();l?(e.shift(),e.length===0&&r?t==null||t.close():await i()):t==null||t.enqueue(s)}catch(s){t==null||t.error(s),e.shift(),n()}};return{stream:new ReadableStream({start(s){t=s},pull:i,async cancel(){for(let s of e)await s.cancel();e=[],r=!0}}),addStream:s=>{if(r)throw new Error("Cannot add inner stream: outer stream is closed");e.push(s.getReader()),o.resolve()},close:()=>{r=!0,o.resolve(),e.length===0&&(t==null||t.close())},terminate:n}}function oF(){var e,t;return(t=(e=globalThis==null?void 0:globalThis.performance)==null?void 0:e.now())!=null?t:Date.now()}function aF({tools:e,generatorStream:t,tracer:r,telemetry:o,system:n,messages:i,abortSignal:s,repairToolCall:l,experimental_context:d,generateId:u}){let m=null,c=new ReadableStream({start(_){m=_}}),p=new Set,f=new Map,v=new Map,g=!1,y;function S(){g&&p.size===0&&(y!=null&&m.enqueue(y),m.close())}let b=new TransformStream({async transform(_,k){let w=_.type;switch(w){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":{k.enqueue(_);break}case"file":{k.enqueue({type:"file",file:new N2({data:_.data,mediaType:_.mediaType})});break}case"finish":{y={type:"finish",finishReason:_.finishReason.unified,rawFinishReason:_.finishReason.raw,usage:k$(_.usage),providerMetadata:_.providerMetadata};break}case"tool-approval-request":{let h=v.get(_.toolCallId);if(h==null){m.enqueue({type:"error",error:new gv({toolCallId:_.toolCallId,approvalId:_.approvalId})});break}k.enqueue({type:"tool-approval-request",approvalId:_.approvalId,toolCall:h});break}case"tool-call":{try{let h=await P$({toolCall:_,tools:e,repairToolCall:l,system:n,messages:i});if(v.set(h.toolCallId,h),k.enqueue(h),h.invalid){m.enqueue({type:"tool-error",toolCallId:h.toolCallId,toolName:h.toolName,input:h.input,error:va(h.error),dynamic:!0,title:h.title});break}let I=e==null?void 0:e[h.toolName];if(I==null)break;if(I.onInputAvailable!=null&&await I.onInputAvailable({input:h.input,toolCallId:h.toolCallId,messages:i,abortSignal:s,experimental_context:d}),await A$({tool:I,toolCall:h,messages:i,experimental_context:d})){m.enqueue({type:"tool-approval-request",approvalId:u(),toolCall:h});break}if(f.set(h.toolCallId,h.input),I.execute!=null&&h.providerExecuted!==!0){let j=u();p.add(j),yv({toolCall:h,tools:e,tracer:r,telemetry:o,messages:i,abortSignal:s,experimental_context:d,onPreliminaryToolResult:U=>{m.enqueue(U)}}).then(U=>{m.enqueue(U)}).catch(U=>{m.enqueue({type:"error",error:U})}).finally(()=>{p.delete(j),S()})}}catch(h){m.enqueue({type:"error",error:h})}break}case"tool-result":{let h=_.toolName;_.isError?m.enqueue({type:"tool-error",toolCallId:_.toolCallId,toolName:h,input:f.get(_.toolCallId),providerExecuted:!0,error:_.result,dynamic:_.dynamic}):k.enqueue({type:"tool-result",toolCallId:_.toolCallId,toolName:h,input:f.get(_.toolCallId),output:_.result,providerExecuted:!0,dynamic:_.dynamic});break}default:{let h=w;throw new Error(`Unhandled chunk type: ${h}`)}}},flush(){g=!0,S()}});return new ReadableStream({async start(_){return Promise.all([t.pipeThrough(b).pipeTo(new WritableStream({write(k){_.enqueue(k)},close(){}})),c.pipeTo(new WritableStream({write(k){_.enqueue(k)},close(){_.close()}}))])}})}var iF=qr({prefix:"aitxt",size:24});function bv({model:e,tools:t,toolChoice:r,system:o,prompt:n,messages:i,maxRetries:s,abortSignal:l,timeout:d,headers:u,stopWhen:m=M$(1),experimental_output:c,output:p=c,experimental_telemetry:f,prepareStep:v,providerOptions:g,experimental_activeTools:y,activeTools:S=y,experimental_repairToolCall:b,experimental_transform:_,experimental_download:k,includeRawChunks:w=!1,onChunk:h,onError:I=({error:E})=>{},onFinish:j,onAbort:U,onStepFinish:F,experimental_context:Z,experimental_include:L,_internal:{now:M=oF,generateId:q=iF}={},...C}){let E=vv(d),te=u$(d),P=s2(d),se=te!=null?new AbortController:void 0,ee=P!=null?new AbortController:void 0;return new lF({model:Ju(e),telemetry:f,headers:u,settings:C,maxRetries:s,abortSignal:j$(l,E!=null?AbortSignal.timeout(E):void 0,se==null?void 0:se.signal,ee==null?void 0:ee.signal),stepTimeoutMs:te,stepAbortController:se,chunkTimeoutMs:P,chunkAbortController:ee,system:o,prompt:n,messages:i,tools:t,toolChoice:r,transforms:Wi(_),activeTools:S,repairToolCall:b,stopConditions:Wi(m),output:p,providerOptions:g,prepareStep:v,includeRawChunks:w,onChunk:h,onError:I,onFinish:j,onAbort:U,onStepFinish:F,now:M,generateId:q,experimental_context:Z,download:k,include:L})}function sF(e){let t,r="",o="",n,i="";function s({controller:l,partialOutput:d=void 0}){l.enqueue({part:{type:"text-delta",id:t,text:o,providerMetadata:n},partialOutput:d}),o=""}return new TransformStream({async transform(l,d){var u;if(l.type==="finish-step"&&o.length>0&&s({controller:d}),l.type!=="text-delta"&&l.type!=="text-start"&&l.type!=="text-end"){d.enqueue({part:l,partialOutput:void 0});return}if(t==null)t=l.id;else if(l.id!==t){d.enqueue({part:l,partialOutput:void 0});return}if(l.type==="text-start"){d.enqueue({part:l,partialOutput:void 0});return}if(l.type==="text-end"){o.length>0&&s({controller:d}),d.enqueue({part:l,partialOutput:void 0});return}r+=l.text,o+=l.text,n=(u=l.providerMetadata)!=null?u:n;let m=await e.parsePartialOutput({text:r});if(m!==void 0){let c=JSON.stringify(m.partial);c!==i&&(s({controller:d,partialOutput:m.partial}),i=c)}}})}var lF=class{constructor({model:e,telemetry:t,headers:r,settings:o,maxRetries:n,abortSignal:i,stepTimeoutMs:s,stepAbortController:l,chunkTimeoutMs:d,chunkAbortController:u,system:m,prompt:c,messages:p,tools:f,toolChoice:v,transforms:g,activeTools:y,repairToolCall:S,stopConditions:b,output:_,providerOptions:k,prepareStep:w,includeRawChunks:h,now:I,generateId:j,onChunk:U,onError:F,onFinish:Z,onAbort:L,onStepFinish:M,experimental_context:q,download:C,include:E}){this._totalUsage=new so,this._finishReason=new so,this._rawFinishReason=new so,this._steps=new so,this.outputSpecification=_,this.includeRawChunks=h,this.tools=f;let te,P=[],se=[],ee,he,fe,V={},Ae=[],T=[],pe=new Map,de,H={},le={},R=new TransformStream({async transform(De,at){var gt,ge,_t,Xt;at.enqueue(De);let{part:ne}=De;if((ne.type==="text-delta"||ne.type==="reasoning-delta"||ne.type==="source"||ne.type==="tool-call"||ne.type==="tool-result"||ne.type==="tool-input-start"||ne.type==="tool-input-delta"||ne.type==="raw")&&await(U==null?void 0:U({chunk:ne})),ne.type==="error"&&await F({error:_$(ne.error)}),ne.type==="text-start"&&(H[ne.id]={type:"text",text:"",providerMetadata:ne.providerMetadata},P.push(H[ne.id])),ne.type==="text-delta"){let He=H[ne.id];if(He==null){at.enqueue({part:{type:"error",error:`text part ${ne.id} not found`},partialOutput:void 0});return}He.text+=ne.text,He.providerMetadata=(gt=ne.providerMetadata)!=null?gt:He.providerMetadata}if(ne.type==="text-end"){let He=H[ne.id];if(He==null){at.enqueue({part:{type:"error",error:`text part ${ne.id} not found`},partialOutput:void 0});return}He.providerMetadata=(ge=ne.providerMetadata)!=null?ge:He.providerMetadata,delete H[ne.id]}if(ne.type==="reasoning-start"&&(le[ne.id]={type:"reasoning",text:"",providerMetadata:ne.providerMetadata},P.push(le[ne.id])),ne.type==="reasoning-delta"){let He=le[ne.id];if(He==null){at.enqueue({part:{type:"error",error:`reasoning part ${ne.id} not found`},partialOutput:void 0});return}He.text+=ne.text,He.providerMetadata=(_t=ne.providerMetadata)!=null?_t:He.providerMetadata}if(ne.type==="reasoning-end"){let He=le[ne.id];if(He==null){at.enqueue({part:{type:"error",error:`reasoning part ${ne.id} not found`},partialOutput:void 0});return}He.providerMetadata=(Xt=ne.providerMetadata)!=null?Xt:He.providerMetadata,delete le[ne.id]}if(ne.type==="file"&&P.push({type:"file",file:ne.file}),ne.type==="source"&&P.push(ne),ne.type==="tool-call"&&P.push(ne),ne.type==="tool-result"&&!ne.preliminary&&P.push(ne),ne.type==="tool-approval-request"&&P.push(ne),ne.type==="tool-error"&&P.push(ne),ne.type==="start-step"&&(P=[],le={},H={},V=ne.request,Ae=ne.warnings),ne.type==="finish-step"){let He=await pv({content:P,tools:f}),Ue=new R$({content:P,finishReason:ne.finishReason,rawFinishReason:ne.rawFinishReason,usage:ne.usage,warnings:Ae,request:V,response:{...ne.response,messages:[...se,...He]},providerMetadata:ne.providerMetadata});await(M==null?void 0:M(Ue)),hv({warnings:Ae,provider:e.provider,model:e.modelId}),T.push(Ue),se.push(...He),te.resolve()}ne.type==="finish"&&(fe=ne.totalUsage,ee=ne.finishReason,he=ne.rawFinishReason)},async flush(De){try{if(T.length===0){let _t=i!=null&&i.aborted?i.reason:new G0({message:"No output generated. Check the stream for errors."});Oe._finishReason.reject(_t),Oe._rawFinishReason.reject(_t),Oe._totalUsage.reject(_t),Oe._steps.reject(_t);return}let at=ee!=null?ee:"other",gt=fe!=null?fe:uv();Oe._finishReason.resolve(at),Oe._rawFinishReason.resolve(he),Oe._totalUsage.resolve(gt),Oe._steps.resolve(T);let ge=T[T.length-1];await(Z==null?void 0:Z({finishReason:ge.finishReason,rawFinishReason:ge.rawFinishReason,totalUsage:gt,usage:ge.usage,content:ge.content,text:ge.text,reasoningText:ge.reasoningText,reasoning:ge.reasoning,files:ge.files,sources:ge.sources,toolCalls:ge.toolCalls,staticToolCalls:ge.staticToolCalls,dynamicToolCalls:ge.dynamicToolCalls,toolResults:ge.toolResults,staticToolResults:ge.staticToolResults,dynamicToolResults:ge.dynamicToolResults,request:ge.request,response:ge.response,warnings:ge.warnings,providerMetadata:ge.providerMetadata,steps:T,experimental_context:q})),de.setAttributes(await Br({telemetry:t,attributes:{"ai.response.finishReason":at,"ai.response.text":{output:()=>ge.text},"ai.response.reasoning":{output:()=>ge.reasoningText},"ai.response.toolCalls":{output:()=>{var _t;return(_t=ge.toolCalls)!=null&&_t.length?JSON.stringify(ge.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(ge.providerMetadata),"ai.usage.inputTokens":gt.inputTokens,"ai.usage.outputTokens":gt.outputTokens,"ai.usage.totalTokens":gt.totalTokens,"ai.usage.reasoningTokens":gt.reasoningTokens,"ai.usage.cachedInputTokens":gt.cachedInputTokens}}))}catch(at){De.error(at)}finally{de.end()}}}),D=nF();this.addStream=D.addStream,this.closeStream=D.close;let Q=D.stream.getReader(),B=new ReadableStream({async start(De){De.enqueue({type:"start"})},async pull(De){function at(){L==null||L({steps:T}),De.enqueue({type:"abort",...(i==null?void 0:i.reason)!==void 0?{reason:fr(i.reason)}:{}}),De.close()}try{let{done:gt,value:ge}=await Q.read();if(gt){De.close();return}if(i!=null&&i.aborted){at();return}De.enqueue(ge)}catch(gt){un(gt)&&(i!=null&&i.aborted)?at():De.error(gt)}},cancel(De){return D.stream.cancel(De)}});for(let De of g)B=B.pipeThrough(De({tools:f,stopStream(){D.terminate()}}));this.baseStream=B.pipeThrough(sF(_!=null?_:Wu())).pipeThrough(R);let{maxRetries:G,retry:Me}=$$({maxRetries:n,abortSignal:i}),sr=x$(t),x=dv(o),ue=b$({model:e,telemetry:t,headers:r,settings:{...x,maxRetries:G}}),Oe=this;Xi({name:"ai.streamText",attributes:Br({telemetry:t,attributes:{...Yi({operationId:"ai.streamText",telemetry:t}),...ue,"ai.prompt":{input:()=>JSON.stringify({system:m,prompt:c,messages:p})}}}),tracer:sr,endWhenDone:!1,fn:async De=>{de=De;let at=await y$({system:m,prompt:c,messages:p}),gt=at.messages,ge=[],{approvedToolApprovals:_t,deniedToolApprovals:Xt}=E$({messages:gt});if(Xt.length>0||_t.length>0){let He=[..._t,...Xt].filter(be=>be.toolCall.providerExecuted),Ue=_t.filter(be=>!be.toolCall.providerExecuted),gn=Xt.filter(be=>!be.toolCall.providerExecuted),qn=Xt.filter(be=>be.toolCall.providerExecuted),Ze,It=new ReadableStream({start(be){Ze=be}});Oe.addStream(It);try{for(let tt of[...gn,...qn])Ze==null||Ze.enqueue({type:"tool-output-denied",toolCallId:tt.toolCall.toolCallId,toolName:tt.toolCall.toolName});let be=[];if(await Promise.all(Ue.map(async tt=>{let ct=await yv({toolCall:tt.toolCall,tools:f,tracer:sr,telemetry:t,messages:gt,abortSignal:i,experimental_context:q,onPreliminaryToolResult:hn=>{Ze==null||Ze.enqueue(hn)}});ct!=null&&(Ze==null||Ze.enqueue(ct),be.push(ct))})),He.length>0&&ge.push({role:"tool",content:He.map(tt=>({type:"tool-approval-response",approvalId:tt.approvalResponse.approvalId,approved:tt.approvalResponse.approved,reason:tt.approvalResponse.reason,providerExecuted:!0}))}),be.length>0||gn.length>0){let tt=[];for(let ct of be)tt.push({type:"tool-result",toolCallId:ct.toolCallId,toolName:ct.toolName,output:await Ji({toolCallId:ct.toolCallId,input:ct.input,tool:f==null?void 0:f[ct.toolName],output:ct.type==="tool-result"?ct.output:ct.error,errorMode:ct.type==="tool-error"?"json":"none"})});for(let ct of gn)tt.push({type:"tool-result",toolCallId:ct.toolCall.toolCallId,toolName:ct.toolCall.toolName,output:{type:"execution-denied",reason:ct.approvalResponse.reason}});ge.push({role:"tool",content:tt})}}finally{Ze==null||Ze.close()}}se.push(...ge);async function ne({currentStep:He,responseMessages:Ue,usage:gn}){var qn,Ze,It,be,tt,ct,hn;let ho=Oe.includeRawChunks,vn=s!=null?setTimeout(()=>l.abort(),s):void 0,Cr;function Ac(){d!=null&&(Cr!=null&&clearTimeout(Cr),Cr=setTimeout(()=>u.abort(),d))}function Ma(){Cr!=null&&(clearTimeout(Cr),Cr=void 0)}function is(){vn!=null&&clearTimeout(vn)}try{te=new so;let Zn=[...gt,...Ue],Tt=await(w==null?void 0:w({model:e,steps:T,stepNumber:T.length,messages:Zn,experimental_context:q})),Ie=Ju((qn=Tt==null?void 0:Tt.model)!=null?qn:e),Pt=await m$({prompt:{system:(Ze=Tt==null?void 0:Tt.system)!=null?Ze:at.system,messages:(It=Tt==null?void 0:Tt.messages)!=null?It:Zn},supportedUrls:await Ie.supportedUrls,download:C}),{toolChoice:Vn,tools:Wr}=await f$({tools:f,toolChoice:(be=Tt==null?void 0:Tt.toolChoice)!=null?be:v,activeTools:(tt=Tt==null?void 0:Tt.activeTools)!=null?tt:y});q=(ct=Tt==null?void 0:Tt.experimental_context)!=null?ct:q;let ss=Ku(k,Tt==null?void 0:Tt.providerOptions),{result:{stream:ls,response:Na,request:vo},doStreamSpan:Kr,startTimestampMs:ja}=await Me(()=>Xi({name:"ai.streamText.doStream",attributes:Br({telemetry:t,attributes:{...Yi({operationId:"ai.streamText.doStream",telemetry:t}),...ue,"ai.model.provider":Ie.provider,"ai.model.id":Ie.modelId,"ai.prompt.messages":{input:()=>S$(Pt)},"ai.prompt.tools":{input:()=>Wr==null?void 0:Wr.map(ye=>JSON.stringify(ye))},"ai.prompt.toolChoice":{input:()=>Vn!=null?JSON.stringify(Vn):void 0},"gen_ai.system":Ie.provider,"gen_ai.request.model":Ie.modelId,"gen_ai.request.frequency_penalty":x.frequencyPenalty,"gen_ai.request.max_tokens":x.maxOutputTokens,"gen_ai.request.presence_penalty":x.presencePenalty,"gen_ai.request.stop_sequences":x.stopSequences,"gen_ai.request.temperature":x.temperature,"gen_ai.request.top_k":x.topK,"gen_ai.request.top_p":x.topP}}),tracer:sr,endWhenDone:!1,fn:async ye=>({startTimestampMs:I(),doStreamSpan:ye,result:await Ie.doStream({...x,tools:Wr,toolChoice:Vn,responseFormat:await(_==null?void 0:_.responseFormat),prompt:Pt,providerOptions:ss,abortSignal:i,headers:r,includeRawChunks:ho})})})),Pc=aF({tools:f,generatorStream:ls,tracer:sr,telemetry:t,system:m,messages:Zn,repairToolCall:S,abortSignal:i,experimental_context:q,generateId:j}),St=(hn=E==null?void 0:E.requestBody)==null||hn?vo!=null?vo:{}:{...vo,body:void 0},lr=[],yn=[],Oc,Rc={},yo="other",Mc,mr=uv(),Nc,$v=!0,Ar={id:j(),timestamp:new Date,modelId:e.modelId},Ev="";Oe.addStream(Pc.pipeThrough(new TransformStream({async transform(ye,$t){var Da,za,us,pt,Pr;if(Ac(),ye.type==="stream-start"){Oc=ye.warnings;return}if($v){let ht=I()-ja;$v=!1,Kr.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":ht}),Kr.setAttributes({"ai.response.msToFirstChunk":ht}),$t.enqueue({type:"start-step",request:St,warnings:Oc!=null?Oc:[]})}let jc=ye.type;switch(jc){case"tool-approval-request":case"text-start":case"text-end":{$t.enqueue(ye);break}case"text-delta":{ye.delta.length>0&&($t.enqueue({type:"text-delta",id:ye.id,text:ye.delta,providerMetadata:ye.providerMetadata}),Ev+=ye.delta);break}case"reasoning-start":case"reasoning-end":{$t.enqueue(ye);break}case"reasoning-delta":{$t.enqueue({type:"reasoning-delta",id:ye.id,text:ye.delta,providerMetadata:ye.providerMetadata});break}case"tool-call":{$t.enqueue(ye),lr.push(ye);break}case"tool-result":{$t.enqueue(ye),ye.preliminary||yn.push(ye);break}case"tool-error":{$t.enqueue(ye),yn.push(ye);break}case"response-metadata":{Ar={id:(Da=ye.id)!=null?Da:Ar.id,timestamp:(za=ye.timestamp)!=null?za:Ar.timestamp,modelId:(us=ye.modelId)!=null?us:Ar.modelId};break}case"finish":{mr=ye.usage,yo=ye.finishReason,Mc=ye.rawFinishReason,Nc=ye.providerMetadata;let ht=I()-ja;Kr.addEvent("ai.stream.finish"),Kr.setAttributes({"ai.response.msToFinish":ht,"ai.response.avgOutputTokensPerSecond":1e3*((pt=mr.outputTokens)!=null?pt:0)/ht});break}case"file":{$t.enqueue(ye);break}case"source":{$t.enqueue(ye);break}case"tool-input-start":{Rc[ye.id]=ye.toolName;let ht=f==null?void 0:f[ye.toolName];(ht==null?void 0:ht.onInputStart)!=null&&await ht.onInputStart({toolCallId:ye.id,messages:Zn,abortSignal:i,experimental_context:q}),$t.enqueue({...ye,dynamic:(Pr=ye.dynamic)!=null?Pr:(ht==null?void 0:ht.type)==="dynamic",title:ht==null?void 0:ht.title});break}case"tool-input-end":{delete Rc[ye.id],$t.enqueue(ye);break}case"tool-input-delta":{let ht=Rc[ye.id],Dc=f==null?void 0:f[ht];(Dc==null?void 0:Dc.onInputDelta)!=null&&await Dc.onInputDelta({inputTextDelta:ye.delta,toolCallId:ye.id,messages:Zn,abortSignal:i,experimental_context:q}),$t.enqueue(ye);break}case"error":{$t.enqueue(ye),yo="error";break}case"raw":{ho&&$t.enqueue(ye);break}default:{let ht=jc;throw new Error(`Unknown chunk type: ${ht}`)}}},async flush(ye){let $t=lr.length>0?JSON.stringify(lr):void 0;try{Kr.setAttributes(await Br({telemetry:t,attributes:{"ai.response.finishReason":yo,"ai.response.text":{output:()=>Ev},"ai.response.reasoning":{output:()=>{let pt=P.filter(Pr=>Pr.type==="reasoning");return pt.length>0?pt.map(Pr=>Pr.text).join(` +`):void 0}},"ai.response.toolCalls":{output:()=>$t},"ai.response.id":Ar.id,"ai.response.model":Ar.modelId,"ai.response.timestamp":Ar.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(Nc),"ai.usage.inputTokens":mr.inputTokens,"ai.usage.outputTokens":mr.outputTokens,"ai.usage.totalTokens":mr.totalTokens,"ai.usage.reasoningTokens":mr.reasoningTokens,"ai.usage.cachedInputTokens":mr.cachedInputTokens,"gen_ai.response.finish_reasons":[yo],"gen_ai.response.id":Ar.id,"gen_ai.response.model":Ar.modelId,"gen_ai.usage.input_tokens":mr.inputTokens,"gen_ai.usage.output_tokens":mr.outputTokens}}))}catch(pt){}finally{Kr.end()}ye.enqueue({type:"finish-step",finishReason:yo,rawFinishReason:Mc,usage:mr,providerMetadata:Nc,response:{...Ar,headers:Na==null?void 0:Na.headers}});let Da=I$(gn,mr);await te.promise;let za=lr.filter(pt=>pt.providerExecuted!==!0),us=yn.filter(pt=>pt.providerExecuted!==!0);for(let pt of lr){if(pt.providerExecuted!==!0)continue;let Pr=f==null?void 0:f[pt.toolName];(Pr==null?void 0:Pr.type)==="provider"&&Pr.supportsDeferredResults&&(yn.some(ht=>(ht.type==="tool-result"||ht.type==="tool-error")&&ht.toolCallId===pt.toolCallId)||pe.set(pt.toolCallId,{toolName:pt.toolName}))}for(let pt of yn)(pt.type==="tool-result"||pt.type==="tool-error")&&pe.delete(pt.toolCallId);if(is(),Ma(),(za.length>0&&us.length===za.length||pe.size>0)&&!await N$({stopConditions:b,steps:T})){Ue.push(...await pv({content:T[T.length-1].content,tools:f}));try{await ne({currentStep:He+1,responseMessages:Ue,usage:Da})}catch(pt){ye.enqueue({type:"error",error:pt}),Oe.closeStream()}}else ye.enqueue({type:"finish",finishReason:yo,rawFinishReason:Mc,totalUsage:Da}),Oe.closeStream()}})))}finally{is(),Ma()}}await ne({currentStep:0,responseMessages:ge,usage:uv()})}}).catch(De=>{Oe.addStream(new ReadableStream({start(at){at.enqueue({type:"error",error:De}),at.close()}})),Oe.closeStream()})}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then(e=>e[e.length-1])}get content(){return this.finalStep.then(e=>e.content)}get warnings(){return this.finalStep.then(e=>e.warnings)}get providerMetadata(){return this.finalStep.then(e=>e.providerMetadata)}get text(){return this.finalStep.then(e=>e.text)}get reasoningText(){return this.finalStep.then(e=>e.reasoningText)}get reasoning(){return this.finalStep.then(e=>e.reasoning)}get sources(){return this.finalStep.then(e=>e.sources)}get files(){return this.finalStep.then(e=>e.files)}get toolCalls(){return this.finalStep.then(e=>e.toolCalls)}get staticToolCalls(){return this.finalStep.then(e=>e.staticToolCalls)}get dynamicToolCalls(){return this.finalStep.then(e=>e.dynamicToolCalls)}get toolResults(){return this.finalStep.then(e=>e.toolResults)}get staticToolResults(){return this.finalStep.then(e=>e.staticToolResults)}get dynamicToolResults(){return this.finalStep.then(e=>e.dynamicToolResults)}get usage(){return this.finalStep.then(e=>e.usage)}get request(){return this.finalStep.then(e=>e.request)}get response(){return this.finalStep.then(e=>e.response)}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}get rawFinishReason(){return this.consumeStream(),this._rawFinishReason.promise}teeStream(){let[e,t]=this.baseStream.tee();return this.baseStream=t,e}get textStream(){return Bi(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){e.type==="text-delta"&&t.enqueue(e.text)}})))}get fullStream(){return Bi(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){t.enqueue(e)}})))}async consumeStream(e){var t;try{await rF({stream:this.fullStream,onError:e==null?void 0:e.onError})}catch(r){(t=e==null?void 0:e.onError)==null||t.call(e,r)}}get experimental_partialOutputStream(){return this.partialOutputStream}get partialOutputStream(){return Bi(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:e},t){e!=null&&t.enqueue(e)}})))}get elementStream(){var e,t,r;let o=(e=this.outputSpecification)==null?void 0:e.createElementStreamTransform();if(o==null)throw new Re({functionality:`element streams in ${(r=(t=this.outputSpecification)==null?void 0:t.name)!=null?r:"text"} mode`});return Bi(this.teeStream().pipeThrough(o))}get output(){return this.finalStep.then(e=>{var t;return((t=this.outputSpecification)!=null?t:Wu()).parseCompleteOutput({text:e.text},{response:e.response,usage:e.usage,finishReason:e.finishReason})})}toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:o,sendReasoning:n=!0,sendSources:i=!1,sendStart:s=!0,sendFinish:l=!0,onError:d=fr}={}){let u=t!=null?J2({originalMessages:e,responseMessageId:t}):void 0,m=p=>{var f;let v=(f=this.tools)==null?void 0:f[p.toolName];return v==null?p.dynamic:(v==null?void 0:v.type)==="dynamic"?!0:void 0},c=this.fullStream.pipeThrough(new TransformStream({transform:async(p,f)=>{let v=o==null?void 0:o({part:p}),g=p.type;switch(g){case"text-start":{f.enqueue({type:"text-start",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"text-delta":{f.enqueue({type:"text-delta",id:p.id,delta:p.text,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"text-end":{f.enqueue({type:"text-end",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"reasoning-start":{f.enqueue({type:"reasoning-start",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"reasoning-delta":{n&&f.enqueue({type:"reasoning-delta",id:p.id,delta:p.text,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"reasoning-end":{f.enqueue({type:"reasoning-end",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"file":{f.enqueue({type:"file",mediaType:p.file.mediaType,url:`data:${p.file.mediaType};base64,${p.file.base64}`});break}case"source":{i&&p.sourceType==="url"&&f.enqueue({type:"source-url",sourceId:p.id,url:p.url,title:p.title,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}}),i&&p.sourceType==="document"&&f.enqueue({type:"source-document",sourceId:p.id,mediaType:p.mediaType,title:p.title,filename:p.filename,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"tool-input-start":{let y=m(p);f.enqueue({type:"tool-input-start",toolCallId:p.id,toolName:p.toolName,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{},...y!=null?{dynamic:y}:{},...p.title!=null?{title:p.title}:{}});break}case"tool-input-delta":{f.enqueue({type:"tool-input-delta",toolCallId:p.id,inputTextDelta:p.delta});break}case"tool-call":{let y=m(p);p.invalid?f.enqueue({type:"tool-input-error",toolCallId:p.toolCallId,toolName:p.toolName,input:p.input,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{},...y!=null?{dynamic:y}:{},errorText:d(p.error),...p.title!=null?{title:p.title}:{}}):f.enqueue({type:"tool-input-available",toolCallId:p.toolCallId,toolName:p.toolName,input:p.input,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{},...y!=null?{dynamic:y}:{},...p.title!=null?{title:p.title}:{}});break}case"tool-approval-request":{f.enqueue({type:"tool-approval-request",approvalId:p.approvalId,toolCallId:p.toolCall.toolCallId});break}case"tool-result":{let y=m(p);f.enqueue({type:"tool-output-available",toolCallId:p.toolCallId,output:p.output,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.preliminary!=null?{preliminary:p.preliminary}:{},...y!=null?{dynamic:y}:{}});break}case"tool-error":{let y=m(p);f.enqueue({type:"tool-output-error",toolCallId:p.toolCallId,errorText:d(p.error),...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...y!=null?{dynamic:y}:{}});break}case"tool-output-denied":{f.enqueue({type:"tool-output-denied",toolCallId:p.toolCallId});break}case"error":{f.enqueue({type:"error",errorText:d(p.error)});break}case"start-step":{f.enqueue({type:"start-step"});break}case"finish-step":{f.enqueue({type:"finish-step"});break}case"start":{s&&f.enqueue({type:"start",...v!=null?{messageMetadata:v}:{},...u!=null?{messageId:u}:{}});break}case"finish":{l&&f.enqueue({type:"finish",finishReason:p.finishReason,...v!=null?{messageMetadata:v}:{}});break}case"abort":{f.enqueue(p);break}case"tool-input-end":break;case"raw":break;default:{let y=g;throw new Error(`Unknown chunk type: ${y}`)}}v!=null&&g!=="start"&&g!=="finish"&&f.enqueue({type:"message-metadata",messageMetadata:v})}}));return Bi(eF({stream:c,messageId:u!=null?u:t==null?void 0:t(),originalMessages:e,onFinish:r,onError:d}))}pipeUIMessageStreamToResponse(e,{originalMessages:t,generateMessageId:r,onFinish:o,messageMetadata:n,sendReasoning:i,sendSources:s,sendFinish:l,sendStart:d,onError:u,...m}={}){tF({response:e,stream:this.toUIMessageStream({originalMessages:t,generateMessageId:r,onFinish:o,messageMetadata:n,sendReasoning:i,sendSources:s,sendFinish:l,sendStart:d,onError:u}),...m})}pipeTextStreamToResponse(e,t){H2({response:e,textStream:this.textStream,...t})}toUIMessageStreamResponse({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:o,sendReasoning:n,sendSources:i,sendFinish:s,sendStart:l,onError:d,...u}={}){return B2({stream:this.toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:o,sendReasoning:n,sendSources:i,sendFinish:s,sendStart:l,onError:d}),...u})}toTextStreamResponse(e){return G2({textStream:this.textStream,...e})}};var jW=O(()=>A(a.array(a.object({id:a.string(),role:a.enum(["system","user","assistant"]),metadata:a.unknown().optional(),parts:a.array(a.union([a.object({type:a.literal("text"),text:a.string(),state:a.enum(["streaming","done"]).optional(),providerMetadata:ve.optional()}),a.object({type:a.literal("reasoning"),text:a.string(),state:a.enum(["streaming","done"]).optional(),providerMetadata:ve.optional()}),a.object({type:a.literal("source-url"),sourceId:a.string(),url:a.string(),title:a.string().optional(),providerMetadata:ve.optional()}),a.object({type:a.literal("source-document"),sourceId:a.string(),mediaType:a.string(),title:a.string(),filename:a.string().optional(),providerMetadata:ve.optional()}),a.object({type:a.literal("file"),mediaType:a.string(),filename:a.string().optional(),url:a.string(),providerMetadata:ve.optional()}),a.object({type:a.literal("step-start")}),a.object({type:a.string().startsWith("data-"),id:a.string().optional(),data:a.unknown()}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("input-streaming"),input:a.unknown().optional(),providerExecuted:a.boolean().optional(),callProviderMetadata:ve.optional(),output:a.never().optional(),errorText:a.never().optional(),approval:a.never().optional()}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("input-available"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.never().optional()}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("approval-requested"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.never().optional(),reason:a.never().optional()})}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("approval-responded"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.boolean(),reason:a.string().optional()})}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("output-available"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.unknown(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),preliminary:a.boolean().optional(),approval:a.object({id:a.string(),approved:a.literal(!0),reason:a.string().optional()}).optional()}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("output-error"),input:a.unknown(),rawInput:a.unknown().optional(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.string(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.literal(!0),reason:a.string().optional()}).optional()}),a.object({type:a.literal("dynamic-tool"),toolName:a.string(),toolCallId:a.string(),state:a.literal("output-denied"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.literal(!1),reason:a.string().optional()})}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("input-streaming"),providerExecuted:a.boolean().optional(),callProviderMetadata:ve.optional(),input:a.unknown().optional(),output:a.never().optional(),errorText:a.never().optional(),approval:a.never().optional()}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("input-available"),providerExecuted:a.boolean().optional(),input:a.unknown(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.never().optional()}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("approval-requested"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.never().optional(),reason:a.never().optional()})}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("approval-responded"),input:a.unknown(),providerExecuted:a.boolean().optional(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.boolean(),reason:a.string().optional()})}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("output-available"),providerExecuted:a.boolean().optional(),input:a.unknown(),output:a.unknown(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),preliminary:a.boolean().optional(),approval:a.object({id:a.string(),approved:a.literal(!0),reason:a.string().optional()}).optional()}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("output-error"),providerExecuted:a.boolean().optional(),input:a.unknown(),rawInput:a.unknown().optional(),output:a.never().optional(),errorText:a.string(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.literal(!0),reason:a.string().optional()}).optional()}),a.object({type:a.string().startsWith("tool-"),toolCallId:a.string(),state:a.literal("output-denied"),providerExecuted:a.boolean().optional(),input:a.unknown(),output:a.never().optional(),errorText:a.never().optional(),callProviderMetadata:ve.optional(),approval:a.object({id:a.string(),approved:a.literal(!1),reason:a.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var zW=qr({prefix:"aiobj",size:24});var FW=qr({prefix:"aiobj",size:24});var uF="AI_NoSuchProviderError",cF=`vercel.ai.error.${uF}`,dF=Symbol.for(cF),pF;pF=dF;var jt=class{getSystemMessageRole(){return"system"}supportsSystemField(){return!1}supportsToolCalling(){return!0}requiresApiKey(){return!0}extractModelName(t){return t.startsWith(`${this.type}@`)?t.substring(this.type.length+1):t}prefixModelId(t){return`${this.type}@${t}`}handleFetchError(t,r){let o=r||`Error fetching ${this.displayName} models`}validateApiKey(t){return!(!t&&this.requiresApiKey())}getApiPathSuffix(t){return"/v1"}};var Xu=class extends jt{constructor(){super(...arguments);this.type="openai";this.displayName="OpenAI"}getDefaultBaseUrl(){return"https://api.openai.com"}getAuthHeaders(r){return{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}}async fetchModels(r,o,n,i){if(!this.validateApiKey(o))return[];try{let s=this.getAuthHeaders(o);return(await i(`${r}/v1/models`,s,this.type)).data.filter(d=>this.isValidChatModel(d)).sort((d,u)=>d.idu.id?-1:0).map(d=>this.prefixModelId(d.id))}catch(s){return this.handleFetchError(s),[]}}isValidChatModel(r){let o=r.id,n=o.includes("o3")||o.includes("o4")||o.includes("o1")||o.includes("gpt-4")||o.includes("gpt-5")||o.includes("gpt-3"),i=o.includes("audio")||o.includes("transcribe")||o.includes("realtime")||o.includes("o1-pro")||o.includes("tts");return n&&!i}getSystemMessageRole(){return"developer"}};var F$=require("obsidian");var Qu=class extends jt{constructor(){super(...arguments);this.type="anthropic";this.displayName="Anthropic"}getDefaultBaseUrl(){return"https://api.anthropic.com"}getAuthHeaders(r){return{"x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true","Content-Type":"application/json"}}async fetchModels(r,o,n,i){if(!this.validateApiKey(o))return[];try{let s=this.getApiPathSuffix(r),l=`${r.replace(/\/$/,"")}${s}/models`,d=this.getAuthHeaders(o),m=(await(0,F$.requestUrl)({url:l,method:"GET",headers:d})).json;return m.data&&Array.isArray(m.data)?m.data.filter(c=>c.type==="model"&&c.id).map(c=>this.prefixModelId(c.id)).sort():[]}catch(s){return this.handleFetchError(s),[]}}supportsSystemField(){return!0}};var ec=class extends jt{constructor(){super(...arguments);this.type="ollama";this.displayName="Ollama"}getDefaultBaseUrl(){return"http://localhost:11434"}getAuthHeaders(r){return{"Content-Type":"application/json"}}async fetchModels(r,o,n,i){try{let s=this.getAuthHeaders(o);return(await i(`${r}/api/tags`,s,this.type)).models.sort((u,m)=>u.namem.name?-1:0).map(u=>this.prefixModelId(u.name))}catch(s){return this.handleFetchError(s),[]}}requiresApiKey(){return!1}};var tc=class extends jt{constructor(){super(...arguments);this.type="openrouter";this.displayName="OpenRouter"}getDefaultBaseUrl(){return"https://openrouter.ai"}getAuthHeaders(r){return{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}}getApiPathSuffix(r){return"/api/v1"}async fetchModels(r,o,n,i){if(!this.validateApiKey(o))return[];try{let s=this.getAuthHeaders(o),l=this.getApiPathSuffix(r);return(await i(`${r}${l}/models`,s,this.type)).data.sort((u,m)=>u.idm.id?-1:0).map(u=>this.prefixModelId(u.id))}catch(s){return this.handleFetchError(s),[]}}};var rc=class extends jt{constructor(){super(...arguments);this.type="gemini";this.displayName="Gemini"}getDefaultBaseUrl(){return"https://generativelanguage.googleapis.com"}getAuthHeaders(r){return{"Content-Type":"application/json"}}async fetchModels(r,o,n,i){if(!this.validateApiKey(o))return[];try{let s=`${r}/v1beta/models?key=${o}`,l=this.getAuthHeaders(o),d=await i(s,l,this.type);return d.models&&Array.isArray(d.models)?d.models.filter(u=>u.name&&u.name.includes("generate")).map(u=>{let m=u.name.split("/").pop();return m?this.prefixModelId(m):null}).filter(u=>u!==null).sort():[]}catch(s){return this.handleFetchError(s),[]}}};var nc=class extends jt{constructor(){super(...arguments);this.type="lmstudio";this.displayName="LM Studio"}getDefaultBaseUrl(){return"http://localhost:1234"}getAuthHeaders(r){return{"Content-Type":"application/json"}}async fetchModels(r,o,n,i){try{let s=this.getAuthHeaders(o),l=await i(`${r}/v1/models`,s,this.type);return l.data&&Array.isArray(l.data)?l.data.map(d=>this.prefixModelId(d.id)).sort():[]}catch(s){return this.handleFetchError(s),[]}}supportsToolCalling(){return!1}requiresApiKey(){return!1}};var oc=class extends jt{constructor(){super(...arguments);this.type="zai";this.displayName="Z.AI";this.KNOWN_MODELS=["glm-4.5","glm-4.6","glm-4.6v","glm-4.6v-flash","glm-4.6v-flashx","glm-4.7","glm-4.7-flash"]}getDefaultBaseUrl(){return"https://api.z.ai"}isAnthropicMode(r){return r.includes("/api/anthropic")}getAuthHeaders(r){return{Authorization:`Bearer ${r}`,"Content-Type":"application/json"}}getAuthHeadersForUrl(r,o){return this.isAnthropicMode(o)?{"x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true","Content-Type":"application/json"}:this.getAuthHeaders(r)}getApiPathSuffix(r){return r&&this.isAnthropicMode(r)?"/api/anthropic/v1":"/api/paas/v4"}async fetchModels(r,o,n,i){return this.validateApiKey(o)?this.KNOWN_MODELS.map(s=>this.prefixModelId(s)).sort():[]}supportsSystemField(){return!1}supportsSystemFieldForUrl(r){return this.isAnthropicMode(r)}supportsToolCalling(){return!0}requiresApiKey(){return!0}};var ac=class ac{constructor(){this.inferTitleFromMessages=async(t,r,o)=>{try{if(r.length<2)return this.notificationService.showWarning("Not enough messages to infer title. Minimum 2 messages."),"";let n=`Infer title from the summary of the content of these messages. The title **cannot** contain any of the following characters: colon (:), back slash (\\), forward slash (/), asterisk (*), question mark (?), double quote ("), less than (<), greater than (>), or pipe (|) as these are invalid in file names. Just return the title. Write the title in ${o.inferTitleLanguage}. +Messages:${vt}${JSON.stringify(r)}`,i=this.getDefaultConfig(),s={...i,...o};s.model||(s.model=i.model),s.url||(s.url=i.url);try{return(await this.callNonStreamingAPI(t,[{role:zt,content:n}],s,o)).fullString}catch(l){return""}}catch(n){return this.showNoTitleInferredNotification(),""}};this.notificationService=new Ut,this.errorService=new Nr(this.notificationService),this.apiService=new ko(this.errorService,this.notificationService),this.apiAuthService=new xn(this.notificationService),this.adapters=new Map([["openai",new Xu],["anthropic",new Qu],["ollama",new ec],["openrouter",new tc],["gemini",new rc],["lmstudio",new nc],["zai",new oc]]),this.currentAdapter=this.adapters.get("openai")}static setSaveSettingsCallback(t){ac.saveSettingsCallback=t}setProviderFromModel(t){for(let[r,o]of this.adapters)if(t.startsWith(`${r}@`)){this.currentAdapter=o;return}this.currentAdapter=this.adapters.get("openai")}modelSupportsTools(t,r){return Ss(t,r.toolEnabledModels||"")}getDefaultConfig(){return{provider:this.currentAdapter.type,model:"",maxTokens:400,temperature:.7,stream:!0,url:this.currentAdapter.getDefaultBaseUrl(),title:"Untitled",system_commands:null,tags:null}}getApiKeyFromSettings(t){return this.apiAuthService.getApiKey(t,this.currentAdapter.type)}async fetchAvailableModels(t,r,o,n){try{if(n){let i=this.adapters.get(n);i&&(this.currentAdapter=i)}return!r&&this.currentAdapter.requiresApiKey()?[]:await this.currentAdapter.fetchModels(t,r,o,this.apiService.makeGetRequest.bind(this.apiService))}catch(i){return[]}}async callAiAPI(t,r={},o,n,i,s,l,d,u){let m={...this.getDefaultConfig(),...r};return this.setProviderFromModel(m.model),d&&(m.url=n),m.stream&&i?this.callStreamingAPI(l,t,m,i,o,s,d,u):this.callNonStreamingAPI(l,t,m,d,u)}async inferTitle(t,r,o,n){try{if(!t.file)throw new Error("No active file found");let i=this.getApiKeyFromSettings(r),s=await this.inferTitleFromMessages(i,o,r),l="";if(typeof s=="string"){if(this.isTruncationError(s))return this.handleTitleTruncationError(t,s),this.showNoTitleInferredNotification(),"";l=s}else if(s&&typeof s=="object"){let u=s.fullString||"";if(this.isTruncationError(u))return this.handleTitleTruncationError(t,u),this.showNoTitleInferredNotification(),"";l=u}return l&&l.trim().length>0?(await n.writeInferredTitle(t,l.trim()),l.trim()):(this.showNoTitleInferredNotification(),"")}catch(i){return this.showNoTitleInferredNotification(),""}}showNoTitleInferredNotification(){this.notificationService.showWarning("Could not infer title. The file name was not changed.")}isTruncationError(t){return t.includes(ty)}handleTitleTruncationError(t,r){let o=t.editor,n=o.lastLine(),i=o.getLine(n).length,s={line:n,ch:i};o.setCursor(s);let d=` +--- +${"#".repeat(2)+" "}${ry} +`;o.replaceRange(d+r+` +`,s)}stopStreaming(){var t;(t=this.apiService)==null||t.stopStreaming()}ensureProvider(t,r){if(this.provider)return;let o=this.apiService.createFetchAdapter(),n=this.getProviderFactory(this.currentAdapter.type,r.url),i=this.currentAdapter.getApiPathSuffix(r.url);this.provider=n({apiKey:t||"",baseURL:`${r.url}${i}`,fetch:o,name:this.currentAdapter.type})}getProviderFactory(t,r){switch(t){case"openai":return dh;case"anthropic":return vh;case"gemini":return yh;case"ollama":case"lmstudio":case"zai":return IS;case"openrouter":return Dh;default:throw new Error(`Unsupported provider: ${t}`)}}extractModelName(t){return this.currentAdapter.extractModelName(t)}async callStreamingAPI(t,r,o,n,i,s,l,d){this.ensureProvider(t,o);let u=this.extractModelName(o.model),m=this.provider(u),c=d&&l?d.getToolsForRequest(l):void 0;return this.callAiSdkStreamText(m,o.model,r,o,n,i,s,c,d,l)}async callNonStreamingAPI(t,r,o,n,i){this.ensureProvider(t,o);let s=this.extractModelName(o.model),l=this.provider(s),d=i&&n?i.getToolsForRequest(n):void 0;return this.callAiSdkGenerateText(l,o.model,r,d,i,n)}async callAiSdkGenerateText(t,r,o,n,i,s){var p;let l=o.map(f=>({role:f.role,content:f.content})),d={model:t,messages:l};n&&typeof n=="object"&&Object.keys(n).length>0&&s&&this.modelSupportsTools(r,s)&&(d.tools=n);let c;try{c=await _v(d)}catch(f){throw f}if(i&&c.toolCalls&&c.toolCalls.length>0){let f=await i.handleToolCalls(c.toolCalls,r),{contextMessages:v}=await i.processToolResults(c.toolCalls,f,r),g=[...l];return(p=c.text)!=null&&p.trim()&&g.push({role:"assistant",content:c.text}),g.push(...v),{fullString:(await _v({model:t,messages:g})).text,mode:"non-streaming"}}return{fullString:c.text,mode:"non-streaming"}}async callAiSdkStreamText(t,r,o,n,i,s,l,d,u,m){let{aiSdkMessages:c,handler:p,abortController:f}=this.setupStreamingContext(o,i,s,r,l);try{let v=this.buildStreamRequest(t,c,f.signal,d,r,m);p.startBuffering();let g=bv(v),y=await this.consumeStream(g,p),S=await g;if(this.checkForStreamError(S),u&&(S!=null&&S.toolCalls)){let b=await S.toolCalls;(b==null?void 0:b.length)>0&&(y=await this.handleStreamToolCalls(b,y,p,i,t,c,u,r))}return l||i.setCursor(p.getCursor()),{fullString:y,mode:"streaming",wasAborted:this.apiService.wasAborted()}}catch(v){return this.handleStreamError(v,p,i)}}setupStreamingContext(t,r,o,n,i){let s=this.prepareAiSdkMessages(t),l=_y(r,o,n),d=new AbortController;this.apiService.setAbortController(d);let u=i?l.initialCursor:l.newCursor,m=new xs(r,u,i);return{aiSdkMessages:s,handler:m,abortController:d}}handleStreamError(t,r,o){r.stopBuffering();let n=this.formatStreamError(t),i=r.getCursor();return o.replaceRange(n,i),{fullString:n,mode:"streaming"}}prepareAiSdkMessages(t){return t.map(r=>({role:r.role,content:r.content}))}buildStreamRequest(t,r,o,n,i,s){let l={model:t,messages:r,abortSignal:o};return n&&typeof n=="object"&&Object.keys(n).length>0&&s&&this.modelSupportsTools(i,s)&&(l.tools=n),l}async consumeStream(t,r){let o="",{textStream:n}=t;for await(let i of n){if(this.apiService.wasAborted())break;o+=i,r.appendText(i)}return r.stopBuffering(),o}async checkForStreamError(t){if(await(t==null?void 0:t.finishReason)==="error"){let o=t.error;throw o||new Error("Stream finished with error")}}async handleStreamToolCalls(t,r,o,n,i,s,l,d){let u=`_[Tool approval required...]_ +`,m=o.getCursor();n.replaceRange(u,m),o.updateCursorAfterInsert(u,m);let c=await l.handleToolCalls(t,d),{contextMessages:p}=await l.processToolResults(t,c,d),f=o.getCursor();n.replaceRange("",{line:f.line-1,ch:0},f),o.setCursor({line:f.line-1,ch:0});let v=[...s,{role:"assistant",content:r},...p];return this.streamContinuation(i,v,o,r)}async streamContinuation(t,r,o,n){let i=bv({model:t,messages:r}),s=o.getCursor();o.reset(s),o.startBuffering();let l=n;try{for await(let u of i.textStream){if(this.apiService.wasAborted())break;l+=u,o.appendText(u)}let d=await i;return this.checkForStreamError(d),l}finally{o.stopBuffering()}}formatStreamError(t){var n;let r=t;for(;r!=null&&r.cause&&this.isRetryError(r);)r=r.cause;let o="Error: ";return r!=null&&r.message?o+=r.message:t!=null&&t.message?o+=t.message:typeof t=="string"?o+=t:o+="Unknown error occurred",r!=null&&r.name&&r.name!=="Error"&&(o=`Error (${r.name}): ${o.replace("Error: ","")}`),(n=t==null?void 0:t.cause)!=null&&n.message&&(t==null?void 0:t.cause)!==r&&(o+=` + +Details: ${t.cause.message}`),o}isRetryError(t){var r;return(t==null?void 0:t.name)==="AI_RetryError"||((r=t==null?void 0:t.message)==null?void 0:r.includes("Retry"))}};ac.saveSettingsCallback=null;var es=ac;var H$=require("obsidian");var Ke={aiService:rt,frequency_penalty:0,max_tokens:400,model:"openai@gpt-4.1-mini",presence_penalty:0,stream:!0,system_commands:null,tags:[],temperature:.7,title:"Untitled",top_p:1,url:"https://api.openai.com"},At={aiService:st,max_tokens:400,model:"anthropic@claude-sonnet-4-20250514",stream:!0,system_commands:null,tags:[],temperature:.7,title:"Untitled",top_p:1,url:"https://api.anthropic.com"},Jr={aiService:it,model:"",url:"http://localhost:11434",stream:!0,title:"Untitled",system_commands:null,temperature:.7,top_p:1},dt={aiService:Ve,frequency_penalty:.5,max_tokens:400,model:"openrouter@openai/gpt-4.1-mini",openrouterApiKey:"",presence_penalty:.5,stream:!0,system_commands:null,tags:[],temperature:.7,title:"Untitled",top_p:1,url:"https://openrouter.ai"},bt={aiService:ut,model:"",url:"http://localhost:1234",stream:!0,title:"Untitled",system_commands:null,temperature:.7,top_p:1,presence_penalty:0,frequency_penalty:0},xt={aiService:lt,max_tokens:400,model:"gemini@",stream:!0,system_commands:null,tags:[],temperature:.7,title:"Untitled",top_p:1,url:"https://generativelanguage.googleapis.com"},Dt={aiService:mt,max_tokens:400,model:"zai@glm-4.7",stream:!0,system_commands:null,tags:[],temperature:.7,title:"Untitled",top_p:1,url:"https://api.z.ai"};var mF=()=>`--- +system_commands: ['You are a helpful assistant.'] +frequency_penalty: ${Ke.frequency_penalty} +max_tokens: ${Ke.max_tokens} +model: ${Ke.model} +presence_penalty: ${Ke.presence_penalty} +stream: true +temperature: ${Ke.temperature} +---`,xv={apiKey:"",openrouterApiKey:"",anthropicApiKey:"",geminiApiKey:"",zaiApiKey:"",openaiUrl:Ke.url,openrouterUrl:dt.url,ollamaUrl:Jr.url,lmstudioUrl:bt.url,anthropicUrl:At.url,geminiUrl:xt.url,zaiUrl:Dt.url,chatFolder:"ChatGPT_MD/chats",chatTemplateFolder:"ChatGPT_MD/templates",agentFolder:"ChatGPT_MD/agents",stream:!0,generateAtCursor:!1,autoInferTitle:!1,enableToolCalling:!1,toolEnabledModels:ky(),debugMode:!1,pluginSystemMessage:fs,webSearchProvider:"brave",webSearchApiKey:"",webSearchApiUrl:"",maxWebSearchResults:5,dateFormat:ms,headingLevel:Gv,inferTitleLanguage:Hv,defaultChatFrontmatter:mF(),openaiDefaultModel:Ke.model,openaiDefaultTemperature:Ke.temperature,openaiDefaultTopP:Ke.top_p,openaiDefaultMaxTokens:Ke.max_tokens,openaiDefaultPresencePenalty:Ke.presence_penalty,openaiDefaultFrequencyPenalty:Ke.frequency_penalty,anthropicDefaultModel:At.model,anthropicDefaultTemperature:At.temperature,anthropicDefaultMaxTokens:At.max_tokens,geminiDefaultModel:xt.model,geminiDefaultTemperature:xt.temperature,geminiDefaultTopP:xt.top_p,geminiDefaultMaxTokens:xt.max_tokens,openrouterDefaultModel:dt.model,openrouterDefaultTemperature:dt.temperature,openrouterDefaultTopP:dt.top_p,openrouterDefaultMaxTokens:dt.max_tokens,openrouterDefaultPresencePenalty:dt.presence_penalty,openrouterDefaultFrequencyPenalty:dt.frequency_penalty,ollamaDefaultTemperature:.7,ollamaDefaultTopP:1,lmstudioDefaultTemperature:bt.temperature,lmstudioDefaultTopP:bt.top_p,lmstudioDefaultPresencePenalty:bt.presence_penalty,lmstudioDefaultFrequencyPenalty:bt.frequency_penalty,zaiDefaultModel:Dt.model,zaiDefaultTemperature:Dt.temperature,zaiDefaultMaxTokens:Dt.max_tokens};var sc=require("obsidian");var fF=["OpenAI","Anthropic","Gemini","OpenRouter","Z.AI","Ollama (Local)","LM Studio (Local)"],ic=class extends sc.PluginSettingTab{constructor(t,r,o){super(t,r),this.settingsProvider=o}updateSetting(t,r){this.settingsProvider.settings[t]=r}display(){let{containerEl:t}=this;t.empty();let r=[{id:"apiKey",name:"OpenAI API Key",description:"API Key for OpenAI",type:"text",placeholder:"your openAI API Key",group:"API Keys"},{id:"openrouterApiKey",name:"OpenRouter.ai API Key",description:"API Key for OpenRouter.ai",type:"text",placeholder:"your openRouter API Key",group:"API Keys"},{id:"anthropicApiKey",name:"Anthropic API Key",description:"API Key for Anthropic (Claude)",type:"text",placeholder:"your Anthropic API Key",group:"API Keys"},{id:"geminiApiKey",name:"Gemini API Key",description:"API Key for Google Gemini (Google AI Studio)",type:"text",placeholder:"your Gemini API Key",group:"API Keys"},{id:"zaiApiKey",name:"Z.AI API Key",description:"API Key for Z.AI (GLM models). Works with both Standard API and Coding Plan. Get your key at https://z.ai",type:"text",placeholder:"your Z.AI API Key",group:"API Keys"},{id:"defaultChatFrontmatter",name:"Default Chat Frontmatter",description:"Default frontmatter for new chat files. You can change/use all of the settings exposed by the OpenAI API here: https://platform.openai.com/docs/api-reference/chat/create",type:"textarea",placeholder:this.settingsProvider.settings.defaultChatFrontmatter,group:"Chat Behavior"},{id:"pluginSystemMessage",name:"Plugin System Message",description:"System message that provides context about the Obsidian/ChatGPT MD plugin environment. This helps the AI understand it's working within Obsidian and format responses appropriately.",type:"textarea",group:"Chat Behavior"},{id:"stream",name:"Stream",description:"Stream responses from OpenAI",type:"toggle",group:"Chat Behavior"},{id:"generateAtCursor",name:"Generate at Cursor",description:"Generate text at cursor instead of end of file",type:"toggle",group:"Chat Behavior"},{id:"autoInferTitle",name:"Automatically Infer Title",description:"Automatically infer title after 4 messages have been exchanged",type:"toggle",group:"Chat Behavior"},{id:"inferTitleLanguage",name:"Infer Title Language",description:"Language to use for title inference.",type:"dropdown",options:{English:"English",Japanese:"Japanese",Spanish:"Spanish",French:"French",German:"German",Chinese:"Chinese",Korean:"Korean",Italian:"Italian",Russian:"Russian"},group:"Chat Behavior"},{id:"openaiUrl",name:"API URL",description:`URL for OpenAI API +Default URL: ${Ke.url}`,type:"text",placeholder:Ke.url,group:"OpenAI"},{id:"openaiDefaultModel",name:"Default Model",description:"Default model for OpenAI chats",type:"text",placeholder:"openai@gpt-4",group:"OpenAI"},{id:"openaiDefaultTemperature",name:"Default Temperature",description:"Default temperature for OpenAI chats (0.0 to 2.0)",type:"text",placeholder:"0.7",group:"OpenAI"},{id:"openaiDefaultMaxTokens",name:"Default Max Tokens",description:"Default max tokens for OpenAI chats",type:"text",placeholder:"400",group:"OpenAI"},{id:"anthropicUrl",name:"API URL",description:`URL for Anthropic API +Default URL: ${At.url}`,type:"text",placeholder:At.url,group:"Anthropic"},{id:"anthropicDefaultModel",name:"Default Model",description:"Default model for Anthropic chats",type:"text",placeholder:"anthropic@claude-3-5-sonnet-20241022",group:"Anthropic"},{id:"anthropicDefaultTemperature",name:"Default Temperature",description:"Default temperature for Anthropic chats (0.0 to 1.0)",type:"text",placeholder:"0.7",group:"Anthropic"},{id:"anthropicDefaultMaxTokens",name:"Default Max Tokens",description:"Default max tokens for Anthropic chats",type:"text",placeholder:"400",group:"Anthropic"},{id:"geminiUrl",name:"API URL",description:`URL for Gemini API +Default URL: ${xt.url}`,type:"text",placeholder:xt.url,group:"Gemini"},{id:"geminiDefaultModel",name:"Default Model",description:"Default model for Gemini chats",type:"text",placeholder:"gemini@gemini-1.5-pro",group:"Gemini"},{id:"geminiDefaultTemperature",name:"Default Temperature",description:"Default temperature for Gemini chats (0.0 to 2.0)",type:"text",placeholder:"0.7",group:"Gemini"},{id:"geminiDefaultMaxTokens",name:"Default Max Tokens",description:"Default max tokens for Gemini chats",type:"text",placeholder:"400",group:"Gemini"},{id:"openrouterUrl",name:"API URL",description:`URL for OpenRouter.ai API +Default URL: ${dt.url}`,type:"text",placeholder:dt.url,group:"OpenRouter"},{id:"openrouterDefaultModel",name:"Default Model",description:"Default model for OpenRouter chats",type:"text",placeholder:"openrouter@anthropic/claude-3.5-sonnet",group:"OpenRouter"},{id:"openrouterDefaultTemperature",name:"Default Temperature",description:"Default temperature for OpenRouter chats (0.0 to 2.0)",type:"text",placeholder:"0.7",group:"OpenRouter"},{id:"openrouterDefaultMaxTokens",name:"Default Max Tokens",description:"Default max tokens for OpenRouter chats",type:"text",placeholder:"400",group:"OpenRouter"},{id:"zaiUrl",name:"API URL",description:`URL for Z.AI API. Two modes available: +\u2022 Standard API (pay-per-token): https://api.z.ai/api/paas/v4 +\u2022 Coding Plan (subscription): https://api.z.ai/api/anthropic + +Default: https://api.z.ai (uses Standard API mode)`,type:"text",placeholder:Dt.url,group:"Z.AI"},{id:"zaiDefaultModel",name:"Default Model",description:"Default model for Z.AI chats (e.g., zai@glm-4.7)",type:"text",placeholder:Dt.model,group:"Z.AI"},{id:"zaiDefaultTemperature",name:"Default Temperature",description:"Default temperature for Z.AI chats (0.0 to 1.0)",type:"text",placeholder:"0.7",group:"Z.AI"},{id:"zaiDefaultMaxTokens",name:"Default Max Tokens",description:"Default max tokens for Z.AI chats",type:"text",placeholder:"400",group:"Z.AI"},{id:"ollamaUrl",name:"API URL",description:`URL for Ollama API +Default URL: ${Jr.url}`,type:"text",placeholder:Jr.url,group:"Ollama (Local)"},{id:"ollamaDefaultTemperature",name:"Default Temperature",description:"Default temperature for Ollama chats (0.0 to 2.0)",type:"text",placeholder:"0.7",group:"Ollama (Local)"},{id:"lmstudioUrl",name:"API URL",description:`URL for LM Studio API +Default URL: ${bt.url}`,type:"text",placeholder:bt.url,group:"LM Studio (Local)"},{id:"lmstudioDefaultTemperature",name:"Default Temperature",description:"Default temperature for LM Studio chats (0.0 to 2.0)",type:"text",placeholder:"0.7",group:"LM Studio (Local)"},{id:"chatFolder",name:"Chat Folder",description:"Path to folder for chat files",type:"text",group:"Folders"},{id:"chatTemplateFolder",name:"Chat Template Folder",description:"Path to folder for chat file templates",type:"text",placeholder:"chat-templates",group:"Folders"},{id:"agentFolder",name:"Agent Folder",description:"Path to folder for agent files",type:"text",placeholder:"ChatGPT_MD/agents",group:"Folders"},{id:"dateFormat",name:"Date Format",description:"Date format for chat files. Valid date blocks are: YYYY, MM, DD, hh, mm, ss",type:"text",placeholder:ms,group:"Formatting"},{id:"headingLevel",name:"Heading Level",description:`Heading level for messages (example for heading level 2: '## ${Rr}${zt}'). Valid heading levels are 0, 1, 2, 3, 4, 5, 6`,type:"text",group:"Formatting"},{id:"enableToolCalling",name:"Enable AI Tool Calling (Experimental, read only)",description:"Privacy Focus: All tool calls require your explicit approval before the LLM sees the data. Allow the AI to use tools: Search files, Read file contents, Web Search (Privacy focused Brave Search API). ",type:"toggle",group:"Tool Calling"},{id:"toolEnabledModels",name:"Tool-Enabled Models",description:`Models allowed to use tools (vault search, file read, web search). + +Format: One model pattern per line. Supports wildcards (*). +Examples: 'gpt-4o', 'claude-*', 'gemini-1.5*' + +Only tested models are included by default.`,type:"textarea",placeholder:`gpt-5.2 +gpt-5.2-chat-latest +o3 +claude-opus-4-5`,group:"Tool Calling"},{id:"webSearchApiKey",name:"Brave Search API Key",description:"API key for Brave Search.",type:"text",placeholder:"your Brave Search API key",group:"Tool Calling"},{id:"webSearchProvider",name:"Alternative Search Provider",description:"Use a custom search API endpoint instead of Brave Search",type:"dropdown",options:{brave:"Brave Search (Default)",custom:"Custom API Endpoint"},group:"Tool Calling"},{id:"webSearchApiUrl",name:"Custom Search API URL",description:"URL for custom search API endpoint (only when using Custom provider)",type:"text",placeholder:"https://your-search-api.com/search",group:"Tool Calling"},{id:"maxWebSearchResults",name:"Max Web Search Results",description:"Maximum number of search results to return (1-10)",type:"text",placeholder:"5",group:"Tool Calling"},{id:"debugMode",name:"Debug Mode",description:"Enable detailed logging for debugging tool operations. Messages will appear in the console.",type:"toggle",group:"Tool Calling"}],o={};r.forEach(s=>{o[s.group]||(o[s.group]=[]),o[s.group].push(s)});let n={},i={};if(Object.entries(o).forEach(([s,l])=>{fF.includes(s)?n[s]=l:i[s]=l}),i["API Keys"]&&(this.renderGroupHeader(t,"API Keys"),i["API Keys"].forEach(s=>{this.createSettingElement(t,s)}),t.createEl("hr"),delete i["API Keys"]),i["Chat Behavior"]&&(this.renderGroupHeader(t,"Chat Behavior"),i["Chat Behavior"].forEach(s=>{this.createSettingElement(t,s)}),t.createEl("hr"),delete i["Chat Behavior"]),Object.keys(n).length>0){this.renderGroupHeader(t,"Provider Settings");let s=t.createEl("p",{text:"Configure default settings for each AI provider. Click to expand.",cls:"setting-item-description"});s.style.marginTop="-10px",s.style.marginBottom="15px",Object.entries(n).forEach(([l,d])=>{this.renderCollapsibleGroup(t,l,d)}),t.createEl("hr")}Object.entries(i).forEach(([s,l])=>{this.renderGroupHeader(t,s),l.forEach(d=>{this.createSettingElement(t,d)}),t.createEl("hr")})}renderGroupHeader(t,r){t.createEl("h3",{text:r})}renderCollapsibleGroup(t,r,o){let n=t.createEl("details",{cls:"chatgpt-md-collapsible-group"});n.style.marginBottom="10px",n.style.border="1px solid var(--background-modifier-border)",n.style.borderRadius="5px",n.style.padding="0";let i=n.createEl("summary",{text:r});i.style.padding="10px 15px",i.style.cursor="pointer",i.style.fontWeight="600",i.style.backgroundColor="var(--background-secondary)",i.style.borderRadius="5px",i.style.userSelect="none";let s=n.createEl("div",{cls:"chatgpt-md-collapsible-content"});s.style.padding="10px 15px",o.forEach(l=>{this.createSettingElement(s,l)})}createSettingElement(t,r){let o=new sc.Setting(t).setName(r.name).setDesc(r.description);r.type==="text"?o.addText(n=>(n.setPlaceholder(r.placeholder||"").setValue(String(this.settingsProvider.settings[r.id])).onChange(async i=>{this.updateSetting(r.id,i),await this.settingsProvider.saveSettings()}),n.inputEl.style.width="300px",n)):r.type==="textarea"?o.addTextArea(n=>(n.setPlaceholder(r.placeholder||"").setValue(String(this.settingsProvider.settings[r.id]||r.placeholder)).onChange(async i=>{this.updateSetting(r.id,i),await this.settingsProvider.saveSettings()}),n.inputEl.style.width="300px",(r.id==="defaultChatFrontmatter"||r.id==="pluginSystemMessage")&&(n.inputEl.style.height="260px",n.inputEl.style.minHeight="260px"),r.id==="toolEnabledModels"&&(n.inputEl.style.height="200px",n.inputEl.style.minHeight="200px"),n)):r.type==="toggle"?o.addToggle(n=>n.setValue(!!this.settingsProvider.settings[r.id]).onChange(async i=>{this.updateSetting(r.id,i),await this.settingsProvider.saveSettings()})):r.type==="dropdown"&&r.options&&o.addDropdown(n=>(n.addOptions(r.options||{}),n.setValue(String(this.settingsProvider.settings[r.id])),n.onChange(async i=>{this.updateSetting(r.id,i),await this.settingsProvider.saveSettings()}),n.selectEl.style.width="300px",n))}};var gF=`You are an AI assistant integrated into Obsidian through the ChatGPT MD plugin. You are helping a user who is working within their Obsidian vault - a personal knowledge management system where they store notes, thoughts, and information in Markdown format. + +Key context: +- The user is writing in Markdown format within Obsidian +- They may reference other notes in their vault using [[wiki links]] or standard [markdown links](url) +- Your responses will be inserted directly into their Markdown document +- Be concise but helpful, and format your responses appropriately for Markdown +- If you provide code examples, use proper markdown code blocks with language specification +- When suggesting organizational strategies, consider that this is within a personal knowledge management context +- The user may be taking notes, brainstorming, writing, researching, or organizing information + +Code block formatting requirements: +- Code blocks must start and end with exactly 3 backticks (\`\`\`) on a new line +- There should be no whitespace before the opening or closing backticks +- The language name should be specified immediately after the opening backticks +- The actual code should start on a new line after the language specification +- Example format: +\`\`\`javascript +console.log("Hello World"); +\`\`\` + +Inline code formatting requirements: +- Use single backticks (\`) for inline code references like filenames (e.g., \`example.md\`), variable names (e.g., \`myVariable\`), or short code snippets referenced within a paragraph. +- Always ensure that single backticks are properly closed to avoid breaking Markdown rendering. For example, use \`code\` not \`code. + +Table formatting requirements: +- Use standard Markdown table syntax. +- Tables should NOT be wrapped in code blocks. + +Respond naturally and helpfully while being mindful of this Obsidian/note-taking context.`,lc=class{async migrateSettings(t,r){let o=!1;return o=await this.migrateUrlSettings(t,r)||o,o=await this.migrateFrontmatterSettings(t,r)||o,o=await this.migratePluginSystemMessage(t,r)||o,o}async migrateUrlSettings(t,r){let o=[{setting:"ollamaUrl",pattern:/\/api\/$/,replacement:"",description:"Removing trailing /api/ from Ollama URL",introducedIn:"2.1.3"},{setting:"openrouterUrl",pattern:/\/api\/$/,replacement:"",description:"Removing trailing /api/ from OpenRouter URL",introducedIn:"2.1.3"},{setting:"openaiUrl",pattern:/\/$/,replacement:"",description:"Removing trailing slash from OpenAI URL",introducedIn:"2.1.3"}],n=!1;for(let i of o){let s=i.setting,l=t[s];l&&i.pattern.test(l)&&(r({[s]:l.replace(i.pattern,i.replacement)}),n=!0)}return n}async migrateFrontmatterSettings(t,r){if(t.hasOwnProperty("openaiDefaultModel")||t.hasOwnProperty("anthropicDefaultModel"))return!1;let n={openaiDefaultModel:Ke.model,openaiDefaultTemperature:Ke.temperature,openaiDefaultTopP:Ke.top_p,openaiDefaultMaxTokens:Ke.max_tokens,openaiDefaultPresencePenalty:Ke.presence_penalty,openaiDefaultFrequencyPenalty:Ke.frequency_penalty,anthropicDefaultModel:At.model,anthropicDefaultTemperature:At.temperature,anthropicDefaultMaxTokens:At.max_tokens,geminiDefaultModel:xt.model,geminiDefaultTemperature:xt.temperature,geminiDefaultTopP:xt.top_p,geminiDefaultMaxTokens:xt.max_tokens,openrouterDefaultModel:dt.model,openrouterDefaultTemperature:dt.temperature,openrouterDefaultTopP:dt.top_p,openrouterDefaultMaxTokens:dt.max_tokens,openrouterDefaultPresencePenalty:dt.presence_penalty,openrouterDefaultFrequencyPenalty:dt.frequency_penalty,ollamaDefaultTemperature:.7,ollamaDefaultTopP:1,lmstudioDefaultTemperature:bt.temperature,lmstudioDefaultTopP:bt.top_p,lmstudioDefaultPresencePenalty:bt.presence_penalty,lmstudioDefaultFrequencyPenalty:bt.frequency_penalty};return r({...n}),!0}async migratePluginSystemMessage(t,r){var i;let o=(i=t.pluginSystemMessage)==null?void 0:i.trim(),n=gF.trim();return o!==n?!1:(r({pluginSystemMessage:fs}),!0)}migrateFrontmatterString(t){let r={"model: gpt-4":"model: ${openaiDefaultModel}","model: gpt-4o":"model: ${openaiDefaultModel}","model: claude-3":"model: ${anthropicDefaultModel}","model: gemini-pro":"model: ${geminiDefaultModel}","temperature: 1":"temperature: ${providerDefaultTemperature}","max_tokens: 300":"max_tokens: ${providerDefaultMaxTokens}"},o=t;for(let[n,i]of Object.entries(r))o=o.replace(new RegExp(n,"g"),i);return o!==t&&(o=`# Migrated frontmatter - consider using provider-specific defaults in settings +${o}`),o}};function wv(e){return{[rt]:Ke,[it]:Jr,[Ve]:dt,[ut]:bt,[st]:At,[lt]:xt,[mt]:Dt}[e]||Ke}function L$(e){return wv(e).model||""}function q$(e){let t={[rt]:Ke,[Ve]:dt,[it]:Jr,[ut]:bt,[st]:At,[lt]:xt,[mt]:Dt};return Object.fromEntries([rt,Ve,it,ut,st,lt,mt].map(o=>[o,e[`${o}Url`]||t[o].url]))}function Z$(e="",t){if(!e||!t)return!1;let r=t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&").replace("YYYY","\\d{4}").replace("MM","\\d{2}").replace("DD","\\d{2}").replace("hh","\\d{2}").replace("mm","\\d{2}").replace("ss","\\d{2}"),o=new RegExp(`^${r}$`);return e.length===t.length&&o.test(e)}var V$=(e,t)=>{if(!t)return;let r=[["openai@",rt],["anthropic@",st],["gemini@",lt],["ollama@",it],["lmstudio@",ut],["openrouter@",Ve],["zai@",mt],["local@",it]];for(let[o,n]of r)if(t.startsWith(o))return n;if(e){let n=e.replace(/\/$/,"").replace(/^https?:\/\//,"");if(n.includes("openrouter.ai"))return Ve;if(n.includes("localhost:1234")||n.includes("127.0.0.1:1234"))return ut;if(n.includes("localhost:11434")||n.includes("127.0.0.1:11434"))return it;if(n.includes("api.anthropic.com"))return st;if(n.includes("generativelanguage.googleapis.com"))return lt;if(n.includes("api.z.ai"))return mt}},G$=e=>{let t=ur(e.openrouterApiKey),r=ur(e.apiKey),o=ur(e.anthropicApiKey),n=ur(e.geminiApiKey),i=ur(e.zaiApiKey);return r?rt:o?st:n?lt:t?Ve:i?mt:null};var hF={[rt]:e=>({model:e.openaiDefaultModel,temperature:e.openaiDefaultTemperature,top_p:e.openaiDefaultTopP,max_tokens:e.openaiDefaultMaxTokens,presence_penalty:e.openaiDefaultPresencePenalty,frequency_penalty:e.openaiDefaultFrequencyPenalty}),[it]:e=>({url:e.ollamaUrl,temperature:e.ollamaDefaultTemperature,top_p:e.ollamaDefaultTopP}),[Ve]:e=>({model:e.openrouterDefaultModel,temperature:e.openrouterDefaultTemperature,top_p:e.openrouterDefaultTopP,max_tokens:e.openrouterDefaultMaxTokens,presence_penalty:e.openrouterDefaultPresencePenalty,frequency_penalty:e.openrouterDefaultFrequencyPenalty}),[ut]:e=>({url:e.lmstudioUrl,temperature:e.lmstudioDefaultTemperature,top_p:e.lmstudioDefaultTopP,presence_penalty:e.lmstudioDefaultPresencePenalty,frequency_penalty:e.lmstudioDefaultFrequencyPenalty}),[st]:e=>({model:e.anthropicDefaultModel,url:e.anthropicUrl,temperature:e.anthropicDefaultTemperature,max_tokens:e.anthropicDefaultMaxTokens}),[lt]:e=>({model:e.geminiDefaultModel,url:e.geminiUrl,temperature:e.geminiDefaultTemperature,top_p:e.geminiDefaultTopP,max_tokens:e.geminiDefaultMaxTokens}),[mt]:e=>({model:e.zaiDefaultModel,url:e.zaiUrl,temperature:e.zaiDefaultTemperature,max_tokens:e.zaiDefaultMaxTokens})},uc=class{constructor(t,r,o=new Ut,n=new Nr(new Ut)){this.plugin=t;this.frontmatterManager=r;this.notificationService=o;this.errorService=n;this.migrationService=new lc,this.settings=structuredClone(xv),this.loadSettings().catch(i=>this.notificationService.showError("Failed to load settings"))}setAgentService(t){this.agentService=t}getSettings(){return this.settings}async migrateSettings(){await this.migrationService.migrateSettings(this.settings,this.updateSettings.bind(this))&&await this.saveSettings()}migrateFrontmatterString(t){return this.migrationService.migrateFrontmatterString(t)}async loadSettings(){let t=await this.plugin.loadData();return Object.assign(this.settings,xv,t),this.settings}async saveSettings(){await this.plugin.saveData(this.settings)}updateSettings(t){Object.assign(this.settings,t)}async addSettingTab(){await this.loadSettings(),this.plugin.addSettingTab(new ic(this.plugin.app,this.plugin,{settings:this.settings,saveSettings:this.saveSettings.bind(this)}))}async getFrontmatter(t){let r={};if(t.file){let u=await this.frontmatterManager.readFrontmatter(t.file);u&&(r={...u})}let o=this.settings.defaultChatFrontmatter?hs(this.settings.defaultChatFrontmatter):{},n=await this.resolveAgentFrontmatter(r),i={...o,...this.settings,...n,...r},s=i.aiService||V$(i.url,i.model)||G$(i)||rt;return{...wv(s),...o,...this.settings,...n,...r,aiService:s}}async resolveAgentFrontmatter(t){let r=t.agent;if(!r||!this.agentService)return{};let o=await this.agentService.resolveAgentByName(r,this.settings);if(!o)return{};let{position:n,...i}=o.frontmatter;return o.body&&(i._agentSystemMessage=o.body),i}async updateFrontmatterField(t,r,o){let n=this.plugin.app.workspace.getActiveViewOfType(H$.MarkdownView);if(!n||!n.file)return;let i=n.file;try{await this.frontmatterManager.updateFrontmatterField(i,r,o)}catch(s){throw s}}generateFrontmatter(t={}){if(this.settings.defaultChatFrontmatter)return this.handleExistingTemplate(t);let r=t.aiService||rt,o=hF[r],n={stream:this.settings.stream,...t,...o?o(this.settings):{}};return Zc(n)}handleExistingTemplate(t){if(Object.keys(t).length>0){let o={...hs(this.settings.defaultChatFrontmatter),...t};return Zc(o)}return this.settings.defaultChatFrontmatter+` + +`}};var W$=require("obsidian");var B$=require("obsidian"),vF=50,Oa=class{constructor(t,r){this.app=t;this.fileService=r}async searchVault(t,r){var c;let{query:o,limit:n=10}=t,s=o.toLowerCase().split(/\s+/).filter(p=>p.length>0),l=[],d=this.app.vault.getMarkdownFiles(),u=this.app.workspace.getActiveFile(),m=u==null?void 0:u.path;for(let p of d){if((c=r.abortSignal)!=null&&c.aborted)break;if(m&&p.path===m)continue;let f=p.basename.toLowerCase(),v=!1;for(let g of s)if(f.includes(g)){v=!0;break}if(v)l.push({path:p.path,basename:p.basename,matches:1});else{let y=(await this.app.vault.read(p)).toLowerCase();for(let S of s)if(y.includes(S)){l.push({path:p.path,basename:p.basename,matches:1});break}}if(l.length>=Math.min(n,vF))break}return l}async readFiles(t,r){var i;let{filePaths:o}=t,n=[];for(let s of o){if((i=r.abortSignal)!=null&&i.aborted)break;let l=this.app.vault.getAbstractFileByPath(s);if(l instanceof B$.TFile)try{let d=await this.app.vault.read(l);n.push({path:l.path,content:d,size:l.stat.size})}catch(d){n.push({path:s,content:`Error reading file: ${d}`,size:0})}else n.push({path:s,content:`File not found: ${s}`,size:0})}return n}};var Sv=require("obsidian"),yF=10,Ra=class{constructor(t){this.notificationService=t}async searchBrave(t,r,o=5){var n,i;try{let s=`https://api.search.brave.com/res/v1/web/search?q=${encodeURIComponent(t)}&count=${o}`;return((i=(n=(await(0,Sv.requestUrl)({url:s,method:"GET",headers:{Accept:"application/json","X-Subscription-Token":r}})).json.web)==null?void 0:n.results)==null?void 0:i.map(u=>({title:u.title,url:u.url,snippet:u.description})))||[]}catch(s){return this.notificationService.showWarning("Web search failed. Check your API key."),[]}}async searchCustom(t,r,o,n=5){var i;try{let s=`${r}?q=${encodeURIComponent(t)}&limit=${n}`,l={Accept:"application/json","Content-Type":"application/json"};return o&&(l.Authorization=`Bearer ${o}`),((i=(await(0,Sv.requestUrl)({url:s,method:"GET",headers:l})).json.results)==null?void 0:i.slice(0,n).map(m=>({title:m.title||"Untitled",url:m.url||m.link||"",snippet:m.snippet||m.description||""})))||[]}catch(s){return this.notificationService.showWarning("Custom web search failed. Check your endpoint configuration."),[]}}async searchWeb(t,r,o,n){let{query:i,limit:s=5}=t,l=Math.min(s,yF);switch(r){case"brave":return o?this.searchBrave(i,o,l):(this.notificationService.showWarning("Brave Search requires an API key. Please configure in settings."),[]);case"custom":return n?this.searchCustom(i,n,o,l):(this.notificationService.showWarning("Custom search requires an API URL. Please configure in settings."),[]);default:return this.notificationService.showWarning("Unknown search provider. Please configure in settings."),[]}}};var J$=require("obsidian"),Fn=class extends J$.Modal{constructor(r,o="AI"){super(r);this.result=null;this.selections=new Map;this.modelName=o,this.modalPromise=new Promise(n=>{this.resolveModalPromise=n})}onOpen(){let{contentEl:r}=this;r.addClass(this.getCssClass()),this.renderHeader(r),this.renderDescription(r),this.renderSelectionItems(r),this.renderSelectAllButtons(r),this.renderControlNote(r),this.renderActionButtons(r)}renderHeader(r){let o=r.createEl("h2",{text:this.getModalTitle()});o.style.marginBottom="12px",o.style.fontWeight="600"}renderDescription(r){let o=r.createEl("p",{text:this.getDescription()});o.style.marginBottom="12px",o.style.opacity="0.7"}renderSelectAllButtons(r){let o=r.createDiv();o.style.display="flex",o.style.gap="8px",o.style.marginBottom="16px";let n=o.createEl("button",{text:"Select All"});this.styleSecondaryButton(n),n.style.flex="1",n.onclick=()=>{this.setAllSelections(!0),this.refreshSelectionItems()};let i=o.createEl("button",{text:"Deselect All"});this.styleSecondaryButton(i),i.style.flex="1",i.onclick=()=>{this.setAllSelections(!1),this.refreshSelectionItems()}}setAllSelections(r){for(let o of this.selections.keys())this.selections.set(o,r)}refreshSelectionItems(){this.close()}renderControlNote(r){let o=r.createEl("div",{text:this.getControlNoteText()});o.style.padding="12px",o.style.backgroundColor="var(--background-secondary)",o.style.borderRadius="6px",o.style.fontSize="0.9em",o.style.lineHeight="1.4",o.style.opacity="0.85",o.style.marginTop="12px",o.style.marginBottom="12px"}renderActionButtons(r){let o=r.createDiv();o.style.display="flex",o.style.gap="8px",o.style.justifyContent="flex-end",o.style.marginTop="20px";let n=o.createEl("button",{text:this.getCancelText()});this.styleCancelButton(n),n.onclick=()=>{this.result=this.buildCancelledResult(),this.resolveModalPromise(this.result),this.close()};let i=o.createEl("button",{text:this.getApproveText()});this.styleApproveButton(i),i.onclick=()=>{this.result=this.buildApprovedResult(),this.resolveModalPromise(this.result),this.close()}}styleSecondaryButton(r){r.style.padding="6px 12px",r.style.borderRadius="4px",r.style.border="1px solid var(--background-modifier-border)",r.style.backgroundColor="transparent",r.style.cursor="pointer",r.style.fontSize="0.9em"}styleCancelButton(r){r.style.padding="8px 16px",r.style.borderRadius="4px",r.style.border="1px solid var(--background-modifier-border)",r.style.backgroundColor="transparent",r.style.cursor="pointer"}styleApproveButton(r){r.style.padding="8px 16px",r.style.borderRadius="4px",r.style.border="none",r.style.backgroundColor="var(--interactive-accent)",r.style.color="var(--text-on-accent)",r.style.cursor="pointer",r.style.fontWeight="500"}waitForResult(){return this.modalPromise}onClose(){let{contentEl:r}=this;r.empty(),this.result||this.resolveModalPromise(this.buildCancelledResult())}};var cc=class extends Fn{constructor(t,r,o,n="AI"){super(t,n),this.query=r,this.results=o}getModalTitle(){return"ChatGPT MD - Vault Search Results"}getCssClass(){return"search-results-approval-modal"}getDescription(){return`${this.results.length} result${this.results.length!==1?"s":""} have been found and can be shared with '${this.modelName}'.`}renderSelectionItems(t){let r=t.createEl("p",{text:"Select which files to share:"});r.style.marginTop="8px",r.style.marginBottom="8px",r.style.fontWeight="500",r.style.opacity="0.7";let o=t.createDiv();o.style.marginBottom="12px";for(let n of this.results){this.selections.has(n.path)||this.selections.set(n.path,!0);let i=this.selections.get(n.path)||!1,s=n.path,l=n.path.match(/\]\((.*?)\)$/);l&&(s=l[1]);let d=o.createDiv();d.style.display="flex",d.style.alignItems="center",d.style.padding="8px",d.style.marginBottom="4px",d.style.borderRadius="4px",d.style.backgroundColor="var(--background-secondary)";let u=d.createEl("input");u.type="checkbox",u.checked=i,u.style.marginRight="8px",u.onchange=()=>{this.selections.set(n.path,u.checked)};let m=d.createEl("label");m.style.flex="1",m.style.cursor="pointer";let c=m.createEl("div",{text:n.basename});c.style.fontWeight="500",c.style.fontSize="0.95em";let p=m.createEl("div",{text:s});p.style.fontSize="0.85em",p.style.opacity="0.6",p.style.marginTop="2px",m.onclick=()=>{u.checked=!u.checked,this.selections.set(n.path,u.checked)}}}getControlNoteText(){return"You control what data is shared. The AI will only know about files you select. Deselected files remain private."}getCancelText(){return"Cancel"}getApproveText(){return"Approve and Continue"}buildApprovedResult(){return{approved:!0,approvedResults:this.results.filter(r=>this.selections.get(r.path)===!0)}}buildCancelledResult(){return{approved:!1,approvedResults:[]}}refreshSelectionItems(){let{contentEl:t}=this;t.empty(),this.onOpen()}};var dc=class extends Fn{constructor(t,r,o,n="AI"){super(t,n),this.query=r,this.results=o;for(let i of o)this.selections.set(i.url,!0)}getModalTitle(){return"ChatGPT MD - Web Search Results"}getCssClass(){return"websearch-approval-modal"}getDescription(){return`${this.results.length} result${this.results.length!==1?"s":""} have been found and can be shared with '${this.modelName}'.`}renderSelectionItems(t){var n;let r=t.createEl("p",{text:"Select which results to share:"});r.style.marginTop="8px",r.style.marginBottom="8px",r.style.fontWeight="500",r.style.opacity="0.7";let o=t.createDiv();o.style.marginBottom="12px";for(let i of this.results){let s=(n=this.selections.get(i.url))!=null?n:!0,l=o.createDiv();l.style.display="flex",l.style.alignItems="flex-start",l.style.padding="8px",l.style.marginBottom="8px",l.style.borderRadius="4px",l.style.backgroundColor="var(--background-secondary)",l.style.gap="8px";let d=l.createEl("input");d.type="checkbox",d.checked=s,d.style.marginTop="2px",d.style.flexShrink="0",d.onchange=()=>{this.selections.set(i.url,d.checked)};let u=l.createEl("label");u.style.flex="1",u.style.cursor="pointer",u.style.display="flex",u.style.flexDirection="column",u.style.gap="4px";let m=u.createEl("div",{text:i.title});m.style.fontWeight="500",m.style.fontSize="0.95em";let c=u.createEl("a",{text:i.url,href:i.url});if(c.style.fontSize="0.8em",c.style.opacity="0.6",c.setAttr("target","_blank"),i.snippet){let p=u.createEl("div",{text:i.snippet.substring(0,150)+(i.snippet.length>150?"...":"")});p.style.fontSize="0.85em",p.style.opacity="0.7",p.style.lineHeight="1.3"}u.onclick=()=>{d.checked=!d.checked,this.selections.set(i.url,d.checked)}}}getControlNoteText(){return"You control what data is shared. Only selected results will be visible to the AI. Deselected results remain private."}getCancelText(){return"Cancel"}getApproveText(){return"Share Selected Results"}buildApprovedResult(){return{approved:!0,approvedResults:this.results.filter(r=>this.selections.get(r.url)===!0)}}buildCancelledResult(){return{approved:!1,approvedResults:[]}}refreshSelectionItems(){let{contentEl:t}=this;t.empty(),this.onOpen()}};var pc=class extends Fn{constructor(r,o,n,i="AI"){super(r,i);this.editedQuery=null;this.queryTextarea=null;this.approveBtn=null;this.toolName=o,this.args=n}getModalTitle(){return{vault_search:"ChatGPT MD - Vault Search",file_read:"ChatGPT MD - File Read",web_search:"ChatGPT MD - Web Search"}[this.toolName]||this.toolName}getCssClass(){return"tool-approval-modal"}getDescription(){return""}renderSelectionItems(r){this.renderRequestDescription(r),this.toolName==="file_read"&&this.args&&Array.isArray(this.args.filePaths)&&this.renderFileSelection(r,this.args.filePaths)}renderFileSelection(r,o){let n=r.createEl("p",{text:"Select files to share:"});n.style.marginTop="16px",n.style.marginBottom="8px",n.style.fontWeight="500",n.style.opacity="0.7";let i=r.createDiv();i.style.marginBottom="12px";for(let s of o){this.selections.has(s)||this.selections.set(s,!0);let l=s.split("/").pop()||s,d=this.selections.get(s)||!1,u=i.createDiv();u.style.display="flex",u.style.alignItems="center",u.style.padding="8px",u.style.marginBottom="4px",u.style.borderRadius="4px",u.style.backgroundColor="var(--background-secondary)";let m=u.createEl("input");m.type="checkbox",m.checked=d,m.style.marginRight="8px",m.onchange=()=>{this.selections.set(s,m.checked)};let c=u.createEl("label");c.style.flex="1",c.style.cursor="pointer";let p=c.createEl("div",{text:l});p.style.fontWeight="500",p.style.fontSize="0.95em";let f=c.createEl("div",{text:s});f.style.fontSize="0.85em",f.style.opacity="0.6",f.style.marginTop="2px",c.onclick=()=>{m.checked=!m.checked,this.selections.set(s,m.checked)}}}getControlNoteText(){return this.toolName==="vault_search"||this.toolName==="web_search"?"After the search completes, you'll review and approve the results before they're shared with the AI.":""}renderControlNote(r){(this.toolName==="vault_search"||this.toolName==="web_search")&&super.renderControlNote(r)}getCancelText(){return"Cancel"}getApproveText(){return"Approve and Execute"}renderActionButtons(r){let o=r.createDiv();o.style.display="flex",o.style.gap="8px",o.style.justifyContent="flex-end",o.style.marginTop="20px";let n=o.createEl("button",{text:this.getCancelText()});this.styleCancelButton(n),n.onclick=()=>{this.result=this.buildCancelledResult(),this.resolveModalPromise(this.result),this.close()},this.approveBtn=o.createEl("button",{text:this.getApproveText()}),this.styleApproveButton(this.approveBtn),this.validateApproveButton(),this.approveBtn.onclick=()=>{this.result=this.buildApprovedResult(),this.resolveModalPromise(this.result),this.close()}}buildApprovedResult(){return{approvalId:this.toolName,approved:!0,modifiedArgs:this.getModifiedArgs()}}buildCancelledResult(){return{approvalId:this.toolName,approved:!1}}validateApproveButton(){if(this.approveBtn)if((this.toolName==="vault_search"||this.toolName==="web_search")&&this.queryTextarea){let o=this.queryTextarea.value.trim().length>0;this.approveBtn.disabled=!o,this.approveBtn.style.opacity=o?"1":"0.5",this.approveBtn.style.cursor=o?"pointer":"not-allowed"}else this.approveBtn.disabled=!1,this.approveBtn.style.opacity="1",this.approveBtn.style.cursor="pointer"}getModifiedArgs(){let r=this.args||{};if(this.toolName==="file_read"&&r.filePaths){let o=Array.from(this.selections.entries()).filter(([n,i])=>i).map(([n,i])=>n);return{...r,filePaths:o}}return(this.toolName==="vault_search"||this.toolName==="web_search")&&this.editedQuery?{...r,query:this.editedQuery}:r}renderRequestDescription(r){var s,l;let o=((s=this.args)==null?void 0:s.query)||"",n=(l=this.args)==null?void 0:l.filePaths,i=r.createEl("p");switch(i.style.marginBottom="8px",i.style.lineHeight="1.5",i.style.fontSize="0.95em",i.appendChild(document.createTextNode(`'${this.modelName}'`)),this.toolName){case"vault_search":i.appendChild(document.createTextNode(" requests to search your vault for:"));break;case"file_read":i.appendChild(document.createTextNode(` requests to read ${(n==null?void 0:n.length)||0} file${(n==null?void 0:n.length)!==1?"s":""}:`));break;case"web_search":i.appendChild(document.createTextNode(" requests to search the web for:"));break;default:i.appendChild(document.createTextNode(" requests to use a tool."))}if((this.toolName==="vault_search"||this.toolName==="web_search")&&o){let d=r.createEl("label",{text:"Search query:"});d.style.display="block",d.style.marginBottom="8px",d.style.fontWeight="500",d.style.opacity="0.7",this.queryTextarea=r.createEl("textarea"),this.queryTextarea.value=o,this.queryTextarea.style.width="100%",this.queryTextarea.style.minHeight="80px",this.queryTextarea.style.padding="8px",this.queryTextarea.style.borderRadius="4px",this.queryTextarea.style.border="1px solid var(--background-modifier-border)",this.queryTextarea.style.backgroundColor="var(--background-secondary)",this.queryTextarea.style.color="var(--text-normal)",this.queryTextarea.style.fontSize="0.95em",this.queryTextarea.style.fontFamily="var(--font-interface)",this.queryTextarea.style.resize="vertical",this.queryTextarea.style.marginBottom="16px",this.queryTextarea.addEventListener("input",()=>{this.editedQuery=this.queryTextarea.value.trim(),this.validateApproveButton()})}else if(this.toolName==="file_read"){let d=r.createEl("p",{text:"You can select which files to share on the next screen."});d.style.marginBottom="16px",d.style.opacity="0.7",d.style.fontSize="0.9em"}else{let d=r.createEl("p",{text:""});d.style.marginBottom="16px"}}refreshSelectionItems(){let{contentEl:r}=this;r.empty(),this.onOpen()}};var mc=class{constructor(t,r,o,n,i,s){this.app=t;this.fileService=r;this.notificationService=o;this.settingsService=n;this.tools=new Map;this.toolResultHandlers={vault_search:this.handleVaultSearchResult.bind(this),file_read:this.handleFileReadResult.bind(this),web_search:this.handleWebSearchResult.bind(this)},this.vaultSearchService=i||new Oa(t,r),this.webSearchService=s||new Ra(o),this.registerDefaultTools()}registerDefaultTools(){let t={description:"Search the Obsidian vault for files by name or content. Returns file paths, names, and content previews. Use this to find relevant notes before reading them.",inputSchema:A(a.object({query:a.string().describe("The search query to find files. Can be keywords, topics, or phrases to search for in file names and content."),limit:a.number().optional().default(10).describe("Maximum number of search results to return. Default is 10, maximum is 50.")})),execute:async n=>(await this.vaultSearchService.searchVault(n,{app:this.app,toolCallId:"",messages:[]})).map(s=>({...s,path:`[${s.basename}](${s.path})`}))};this.registerTool("vault_search",t);let r={description:"Read the full contents of specific files from the vault. User will be asked to approve which files to share. Use this after searching to get complete file contents.",inputSchema:A(a.object({filePaths:a.array(a.string()).describe("Array of file paths to read. Use the paths returned from vault_search.")})),execute:async n=>await this.vaultSearchService.readFiles(n,{app:this.app,toolCallId:"",messages:[]})};this.registerTool("file_read",r);let o={description:"Search the web for information on a topic. Returns titles, URLs, and snippets from search results. User will be asked to approve which results to share.",inputSchema:A(a.object({query:a.string().describe("The search query to look up on the web"),limit:a.number().optional().default(5).describe("Maximum number of search results to return. Default is 5, maximum is 10.")})),execute:async n=>await this.webSearchService.searchWeb(n,this.settingsService.webSearchProvider,this.settingsService.webSearchApiKey,this.settingsService.webSearchApiUrl)};this.registerTool("web_search",o)}registerTool(t,r){this.tools.set(t,r)}isWebSearchAvailable(t){return t.webSearchProvider==="brave"?!!t.webSearchApiKey&&t.webSearchApiKey.trim().length>0:t.webSearchProvider==="custom"?!!t.webSearchApiUrl&&t.webSearchApiUrl.trim().length>0:!1}getTool(t){return this.tools.get(t)}getAllTools(){let t={};return this.tools.forEach((r,o)=>{t[o]=r}),t}getEnabledTools(t){if(!t.enableToolCalling)return;let r=this.getAllTools(),o={};return r.vault_search&&(o.vault_search=r.vault_search),r.file_read&&(o.file_read=r.file_read),r.web_search&&this.isWebSearchAvailable(t)&&(o.web_search=r.web_search),Object.keys(o).length>0?o:void 0}async requestApproval(t){let r=new pc(this.app,t.toolName,t.args,t.modelName);r.open();let o=await r.waitForResult();return o.approved||this.notificationService.showWarning(`Tool execution cancelled: ${t.toolName}`),o}setApprovalHandler(t){this.approvalHandler=t}getToolsForRequest(t){return this.getEnabledTools(t)}async requestSearchResultsApproval(t,r,o){let n=new cc(this.app,t,r,o);n.open();let i=await n.waitForResult();return i.approved?i.approvedResults:[]}async requestWebSearchResultsApproval(t,r,o){let n=new dc(this.app,t,r,o);n.open();let i=await n.waitForResult();return i.approved?i.approvedResults:[]}async readFilesFromSearchResults(t){let r=[];for(let o of t)try{let n=o.path,i=n.match(/\]\((.*?)\)$/);i&&(n=i[1]);let s=this.app.vault.getAbstractFileByPath(n);if(s instanceof W$.TFile){let l=await this.app.vault.read(s);r.push({path:n,content:l})}}catch(n){}return r}async handleVaultSearchResult(t,r,o,n,i){var d;let s=t.result;if(!Array.isArray(s)){o.push(t);return}let l=((d=r==null?void 0:r.input)==null?void 0:d.query)||"unknown";if(s.length>0){let u=await this.requestSearchResultsApproval(l,s,i);if(o.push({...t,result:u}),u.length>0){let m=await this.readFilesFromSearchResults(u);for(let c of m)n.push({role:"user",content:`[vault_search result] + +File: ${c.path} + +${c.content}`})}else n.push({role:"user",content:`[vault_search result - no files found] + +The search for "${l}" returned no results. Try searching with different keywords or single words.`})}else o.push(t),n.push({role:"user",content:`[vault_search result - no files found] + +The search for "${l}" returned no results. Try searching with different keywords or single words.`})}async handleFileReadResult(t,r,o,n,i){let s=t.result;if(!(!Array.isArray(s)||s.length===0)){o.push(t);for(let l of s)l.content&&typeof l.content=="string"&&n.push({role:"user",content:`[file_read result] + +File: ${l.path} + +${l.content}`})}}async handleWebSearchResult(t,r,o,n,i){var d;let s=t.result;if(!Array.isArray(s)){o.push(t);return}let l=((d=r==null?void 0:r.input)==null?void 0:d.query)||"unknown";if(s.length>0){let u=await this.requestWebSearchResultsApproval(l,s,i);if(o.push({...t,result:u}),u.length>0)for(let m of u)n.push({role:"user",content:`[web_search result] + +Title: ${m.title} +URL: ${m.url} + +${m.content||m.snippet}`});else n.push({role:"user",content:`[web_search result - no results selected] + +The web search for "${l}" returned results, but none were approved for sharing.`})}else o.push(t),n.push({role:"user",content:`[web_search result - no results found] + +The web search for "${l}" returned no results. Try different search terms.`})}async processToolResults(t,r,o){let n=[],i=[];for(let s of r){let l=t.find(m=>(m.toolCallId||m.id||"unknown")===s.toolCallId),d=l==null?void 0:l.toolName,u=this.toolResultHandlers[d];u?await u(s,l,i,n,o):i.push(s)}return{filteredResults:i,contextMessages:n}}async handleToolCalls(t,r){return Promise.all(t.map(o=>this.executeToolCall(o,r)))}async executeToolCall(t,r){let{toolName:o,args:n,toolCallId:i}=this.normalizeToolCall(t),s=await this.requestApproval({toolCallId:i,toolName:o,args:n,modelName:r});return s.approved?this.executeTool(o,s.modifiedArgs||n,i):{toolCallId:i,result:{error:"User declined tool execution"}}}normalizeToolCall(t){return{toolName:t.toolName||t.name||t.tool,args:t.args||t.input||t.arguments||{},toolCallId:t.toolCallId||t.id||"unknown"}}async executeTool(t,r,o){try{let n=this.getTool(t);if(!n||!n.execute)return{toolCallId:o,result:{error:"Tool not found or has no execute function"}};let i=await n.execute(r,{app:this.app,toolCallId:o,messages:[]});return{toolCallId:o,result:i}}catch(n){return{toolCallId:o,result:{error:`Tool execution failed: ${n}`}}}}};var fo=require("obsidian");var fc=class{constructor(t,r,o){this.app=t;this.fileService=r;this.frontmatterManager=o}getAgentFiles(t){let r=this.app.vault.getAbstractFileByPath(t.agentFolder);return r instanceof fo.TFolder?r.children.filter(o=>o instanceof fo.TFile&&o.extension==="md"):[]}async readAgent(t){let r=await this.app.vault.read(t),o=await this.frontmatterManager.readFrontmatter(t)||{},n=this.extractBody(r);return{frontmatter:o,body:n}}async resolveAgentByName(t,r){let n=this.getAgentFiles(r).find(i=>i.basename===t);return n?this.readAgent(n):null}async createAgentFile(t,r,o,n,i){await this.fileService.ensureFolderExists(i.agentFolder,Fa);let s=this.fileService.sanitizeFileName(t),l=(0,fo.normalizePath)(`${i.agentFolder}/${s}.md`);for(let m=1;await this.app.vault.adapter.exists(l);m++)l=(0,fo.normalizePath)(`${i.agentFolder}/${s} (${m}).md`);let u=`${this.buildAgentFrontmatter(r,o)} +${n}`;return this.app.vault.create(l,u)}extractBody(t){let r=t.match(/^---\n[\s\S]*?\n---\n?/);return r?t.slice(r[0].length).trim():t.trim()}buildAgentFrontmatter(t,r){return["---",`model: ${t}`,`temperature: ${r}`,"stream: true","---"].join(` +`)}};var gc=class e{constructor(t,r,o,n,i,s,l,d,u,m,c,p,f,v,g,y,S){this.app=t,this.plugin=r,this.notificationService=o,this.errorService=n,this.apiService=i,this.apiAuthService=s,this.fileService=l,this.frontmatterManager=d,this.messageService=u,this.templateService=m,this.editorService=c,this.aiProviderService=p,this.settingsService=f,this.agentService=v,this.vaultSearchService=g,this.webSearchService=y,this.toolService=S}static create(t,r){let o=new Ut,n=new Nr(o),i=new ko(n,o),s=new xn(o),l=new _o(t),d=new So(t),u=new xo(l,o),m=new uc(r,d,o,n),c=new ys(t,l,u,void 0,m),p=new wo(t,l,c),f=new fc(t,l,d);m.setAgentService(f);let v=()=>new es;es.setSaveSettingsCallback(m.saveSettings.bind(m));let g=new Oa(t,l),y=new Ra(o),S=new mc(t,l,o,m.getSettings(),g,y);return new e(t,r,o,n,i,s,l,d,u,p,c,v,m,f,g,y,S)}};var go=require("obsidian");var K$=require("obsidian");function yt(e){return q$(e)}function Y$(e){return{[rt]:e.openaiUrl||Ke.url,[Ve]:e.openrouterUrl||dt.url,[it]:e.ollamaUrl||Jr.url,[ut]:e.lmstudioUrl||bt.url,[st]:e.anthropicUrl||At.url,[lt]:e.geminiUrl||xt.url,[mt]:e.zaiUrl||Dt.url}}async function kv(e,t,r,o,n,i){function s(l,d,u){return Promise.race([l,new Promise(m=>setTimeout(()=>m(u),d))])}try{let l=[];l.push(s(e.fetchAvailableModels(t[it],void 0,i.getSettings(),"ollama"),_n,[])),l.push(s(e.fetchAvailableModels(t[ut],void 0,i.getSettings(),"lmstudio"),_n,[])),ur(r)&&l.push(s(e.fetchAvailableModels(t[rt],r,i.getSettings(),"openai"),_n,[])),ur(o)&&l.push(s(e.fetchAvailableModels(t[Ve],o,i.getSettings(),"openrouter"),_n,[]));let d=n.getApiKey(i.getSettings(),st);ur(d)&&l.push(s(e.fetchAvailableModels(t[st],d,i.getSettings(),"anthropic"),_n,[]));let u=n.getApiKey(i.getSettings(),lt);ur(u)&&l.push(s(e.fetchAvailableModels(t[lt],u,i.getSettings(),"gemini"),_n,[]));let m=n.getApiKey(i.getSettings(),mt);return ur(m)&&l.push(s(e.fetchAvailableModels(t[mt],m,i.getSettings(),"zai"),_n,[])),(await Promise.all(l)).flat()}catch(l){return new K$.Notice("Error fetching models: "+(l instanceof Error?l.message:String(l))),[]}}var ts=class{constructor(t,r){this.services=t;this.stopStreamingHandler=r;this.statusBarItemEl=t.plugin.addStatusBarItem()}static getCommand(){return{id:Ov,name:"Chat",icon:"message-circle"}}async execute(t,r){var m;let{editorService:o,settingsService:n,apiAuthService:i,toolService:s}=this.services,l=n.getSettings(),d=await o.getFrontmatter(r,l,this.services.app),u=this.services.aiProviderService();this.stopStreamingHandler.setCurrentAiService(u);try{let{messagesWithRole:c,messages:p}=await o.getMessagesFromEditor(t,l),f=this.buildSystemMessages(d);f.length>0&&c.unshift(...f),l.generateAtCursor||o.moveCursorToEnd(t),go.Platform.isMobile?new go.Notice(`${Uc} Calling ${d.model}`):this.updateStatusBar(`Calling ${d.model}`);let v=i.getApiKey(l,d.aiService),g=l.enableToolCalling?s:void 0,y=await u.callAiAPI(c,d,Qr(l.headingLevel),yt(d)[d.aiService],t,l.generateAtCursor,v,l,g);if(o.processResponse(t,y,l),l.autoInferTitle&&Z$((m=r==null?void 0:r.file)==null?void 0:m.basename,l.dateFormat)&&c.length>Bv){let S={...l,...d,openrouterApiKey:i.getApiKey(l,Ve),url:yt(d)[d.aiService]};if(!S.model&&(S.model=L$(d.aiService),!S.model)){new go.Notice(`Auto title inference skipped: No model configured for ${d.aiService}. Please set a model in settings.`,Kv);return}await u.inferTitle(r,S,p,o)}}catch(c){go.Platform.isMobile&&new go.Notice(`${Uc} Calling ${d.model}. `+c,Yv),this.services.errorService.handleApiError(c,"ChatHandler.execute",{showNotification:!0})}this.updateStatusBar("")}buildSystemMessages(t){let r=[],o=t._agentSystemMessage;if(o&&r.push({role:"system",content:o}),t.system_commands&&Array.isArray(t.system_commands))for(let n of t.system_commands)typeof n=="string"&&n.trim()&&r.push({role:"system",content:n});return r}updateStatusBar(t){this.statusBarItemEl.setText(t)}};var rs=require("obsidian");var ns=class extends rs.SuggestModal{constructor(t,r,o,n=[],i){super(t),this.modelNames=n,this.editor=r,this.editorService=o,this.settings=i,this.limit=this.modelNames.length,this.modelNames.length>0?this.setPlaceholder("Select Large Language Model"):this.setPlaceholder("Loading available models...")}getSuggestions(t){return this.modelNames.filter(r=>r.toLowerCase().includes(t.toLowerCase()))}renderSuggestion(t,r){var n;let o=r.createEl("div",{cls:"ai-model-suggestion"});if(o.style.display="flex",o.style.alignItems="center",o.style.gap="8px",o.createEl("span",{text:t}),(n=this.settings)!=null&&n.enableToolCalling&&Ss(t,this.settings.toolEnabledModels)){let i=o.createEl("span",{cls:"ai-model-tool-badge",text:"Tools"});i.title="This model supports tool calling (vault search, file read, web search)"}}async onChooseSuggestion(t,r){if(!(this.modelNames.indexOf(t)===-1||this.modelNames.length===0)){new rs.Notice(`Selected model: ${t}`);try{await this.editorService.setModel(this.editor,t)}catch(o){new rs.Notice(`Error setting model: ${o.message}`)}}}};var os=class{constructor(t){this.services=t;this.availableModels=[]}static getCommand(){return{id:"select-model-command",name:"Select Model",icon:"list"}}async execute(t,r){let{editorService:o,settingsService:n,apiAuthService:i}=this.services,s=n.getSettings(),l=new ns(this.services.app,t,o,this.availableModels,s);l.open(),(async()=>{try{let d=await o.getFrontmatter(r,s,this.services.app),u=i.getApiKey(s,rt),m=i.getApiKey(s,Ve),c={[rt]:String(d.openaiUrl||s.openaiUrl||yt(d).openai),[Ve]:String(d.openrouterUrl||s.openrouterUrl||yt(d).openrouter),[it]:String(d.ollamaUrl||s.ollamaUrl||yt(d).ollama),[ut]:String(d.lmstudioUrl||s.lmstudioUrl||yt(d).lmstudio),[st]:String(d.anthropicUrl||s.anthropicUrl||yt(d).anthropic),[lt]:String(d.geminiUrl||s.geminiUrl||yt(d).gemini),[mt]:String(d.zaiUrl||s.zaiUrl||yt(d).zai||Dt.url)},p=this.services.aiProviderService(),f=await kv(p,c,u,m,i,n),v=new Set(this.availableModels),g=new Set(f);(this.availableModels.length!==f.length||![...v].every(S=>g.has(S))||![...g].every(S=>v.has(S)))&&f.length>0&&(this.availableModels=f,l.close(),new ns(this.services.app,t,o,this.availableModels,s).open())}catch(d){}})()}getAvailableModels(){return this.availableModels}async initializeAvailableModels(){try{let{settingsService:t,apiAuthService:r}=this.services,o=t.getSettings(),n=r.getApiKey(o,rt),i=r.getApiKey(o,Ve),s={[rt]:o.openaiUrl||yt({}).openai,[Ve]:o.openrouterUrl||yt({}).openrouter,[it]:o.ollamaUrl||yt({}).ollama,[ut]:o.lmstudioUrl||yt({}).lmstudio,[st]:o.anthropicUrl||yt({}).anthropic,[lt]:o.geminiUrl||yt({}).gemini,[mt]:o.zaiUrl||yt({}).zai||Dt.url},l=this.services.aiProviderService();this.availableModels=await kv(l,s,n,i,r,t)}catch(t){this.availableModels=[]}}};var hc=class{constructor(t){this.services=t}async execute(t){let{editorService:r,settingsService:o}=this.services,n=o.getSettings();r.addHorizontalRule(t,zt,n.headingLevel)}getCommand(){return{id:Pv,name:"Add divider",icon:"minus"}}},vc=class{constructor(t){this.services=t}execute(t){let r=t.getCursor(),o=r.line,n=r.ch,i=`${Zv}${vt}${Vv}`;t.replaceRange(i,r);let s={line:o+1,ch:n};t.setCursor(s)}getCommand(){return{id:"add-comment-block",name:"Add comment block",icon:"comment"}}};var yc=class{constructor(t){this.services=t;this.currentAiService=null}setCurrentAiService(t){this.currentAiService=t}execute(){this.currentAiService&&"stopStreaming"in this.currentAiService?this.currentAiService.stopStreaming():this.services.notificationService.showWarning("No active streaming request to stop")}getCommand(){return{id:Rv,name:"Stop streaming",icon:"octagon"}}};var X$=require("obsidian");var _c=class{constructor(t){this.statusBarItemEl=t.addStatusBarItem()}setText(t){this.statusBarItemEl.setText(t)}clear(){this.statusBarItemEl.setText("")}};var bc=class{constructor(t,r){this.services=t;this.stopStreamingHandler=r;this.statusBarManager=new _c(t.plugin)}async execute(t,r){let{editorService:o,settingsService:n,apiAuthService:i}=this.services,s=n.getSettings(),l=await o.getFrontmatter(r,s,this.services.app),d=this.services.aiProviderService();if(this.stopStreamingHandler.setCurrentAiService(d),!l.model){new X$.Notice("Model not set in frontmatter. Please configure a model in settings or frontmatter.");return}this.statusBarManager.setText(`Calling ${l.model}`);let{messages:u}=await o.getMessagesFromEditor(t,s),m={...s,...l,openrouterApiKey:i.getApiKey(s,Ve),url:yt(l)[l.aiService]};await d.inferTitle(r,m,u,o),this.statusBarManager.clear()}getCommand(){return{id:Nv,name:"Infer title",icon:"subtitles"}}};var Iv=require("obsidian");var xc=class{constructor(t){this.services=t}async execute(t){let{editorService:r,settingsService:o}=this.services,n=o.getSettings();try{await r.createNewChatWithHighlightedText(t,n)}catch(i){new Iv.Notice("[ChatGPT MD] Error in Create new chat with highlighted text, check console")}}getCommand(){return{id:Mv,name:"Create new chat with highlighted text",icon:"highlighter"}}},wc=class{constructor(t){this.services=t}async execute(){let{editorService:t,settingsService:r}=this.services,o=r.getSettings();if(o.dateFormat){await t.createNewChatFromTemplate(o,t.getDate(new Date,o.dateFormat));return}new Iv.Notice("date format cannot be empty in your ChatGPT MD settings. You can choose something like YYYYMMDDhhmmss")}getCommand(){return{id:jv,name:"Create new chat from template",icon:"layout-template"}}},Sc=class{constructor(t){this.services=t}async execute(t){let{editorService:r}=this.services;await r.clearChat(t)}getCommand(){return{id:Dv,name:"Clear chat (except frontmatter)",icon:"trash"}}};var Tv=require("obsidian");var Ln=require("obsidian"),kc=class extends Ln.SuggestModal{constructor(r,o,n,i){super(r);this.agentService=o;this.settingsService=n;this.settings=i;this.agents=this.loadAgents(),this.limit=this.agents.length,this.setPlaceholder(this.agents.length>0?"Select an agent":"No agents found")}loadAgents(){return this.agentService.getAgentFiles(this.settings).map(r=>({title:r.basename,file:r})).sort((r,o)=>r.title.localeCompare(o.title))}getSuggestions(r){return r?this.agents.filter(o=>o.title.toLowerCase().includes(r.toLowerCase())):this.agents}renderSuggestion(r,o){o.createEl("div",{text:r.title})}async onChooseSuggestion(r){try{let o=this.app.workspace.getActiveViewOfType(Ln.MarkdownView);if(!o){new Ln.Notice("[ChatGPT MD] No active note found");return}await this.settingsService.updateFrontmatterField(o.editor,"agent",r.title),new Ln.Notice(`Agent set to "${r.title}"`)}catch(o){new Ln.Notice(`[ChatGPT MD] Error setting agent: ${o.message}`)}}};var wt=require("obsidian");var Ic=class extends wt.Modal{constructor(r,o,n,i,s){super(r);this.agentService=o;this.settings=n;this.availableModels=i;this.services=s;this.name="";this.model="";this.temperature=.7;this.message="";this.step="mode-select";this.wizardModel="";this.wizardIdea="";this.cameFromWizard=!1}onOpen(){(!this.services||this.availableModels.length===0)&&(this.step="manual-form"),this.render()}onClose(){this.contentEl.empty()}render(){switch(this.contentEl.empty(),this.step){case"mode-select":this.renderModeSelect();break;case"wizard-input":this.renderWizardInput();break;case"wizard-loading":this.renderWizardLoading();break;case"manual-form":this.renderManualForm();break}}navigateTo(r){this.step=r,this.render()}renderModeSelect(){let{contentEl:r}=this;r.createEl("h2",{text:"Create New Agent"});let o=r.createEl("p",{text:"How would you like to create your agent?"});o.style.color="var(--text-muted)",o.style.marginBottom="16px";let n=r.createDiv();n.style.display="flex",n.style.gap="12px",n.style.marginTop="8px",this.createModeCard(n,"Manual","Configure everything yourself",()=>this.navigateTo("manual-form")),this.createModeCard(n,"AI Wizard","Describe your idea, AI creates the agent",()=>this.navigateTo("wizard-input"))}createModeCard(r,o,n,i){let s=r.createDiv();s.style.flex="1",s.style.padding="20px",s.style.borderRadius="8px",s.style.border="1px solid var(--background-modifier-border)",s.style.cursor="pointer",s.style.textAlign="center",s.style.transition="border-color 0.15s ease, background-color 0.15s ease",s.createEl("h3",{text:o}).style.margin="0 0 8px 0";let l=s.createEl("p",{text:n});l.style.margin="0",l.style.color="var(--text-muted)",l.style.fontSize="0.85em",s.addEventListener("mouseenter",()=>{s.style.borderColor="var(--interactive-accent)",s.style.backgroundColor="var(--background-modifier-hover)"}),s.addEventListener("mouseleave",()=>{s.style.borderColor="var(--background-modifier-border)",s.style.backgroundColor=""}),s.addEventListener("click",i)}renderWizardInput(){let{contentEl:r}=this;r.createEl("h2",{text:"AI Agent Wizard"}),this.addWizardModelField(r),new wt.Setting(r).setName("Describe your agent idea").addTextArea(o=>{o.setPlaceholder("e.g., A coding assistant that specializes in TypeScript and React, helps with code reviews, and suggests best practices...").setValue(this.wizardIdea).onChange(n=>{this.wizardIdea=n}),o.inputEl.style.width="100%",o.inputEl.style.height="150px"}),this.addWizardButtons(r)}addWizardModelField(r){let o;new wt.Setting(r).setName("AI Model").setDesc("Select which model generates the agent").addText(n=>{n.setPlaceholder("Type to filter models...").onChange(i=>{this.wizardModel=i,this.updateModelSuggestions(i,o,!0)}),n.inputEl.style.width="300px",this.wizardModel&&n.setValue(this.wizardModel),this.modelInputEl=n.inputEl}),o=r.createDiv({cls:"chatgpt-md-model-suggestions"}),o.style.maxHeight="150px",o.style.overflowY="auto",o.style.marginTop="-10px",o.style.marginBottom="10px"}addWizardButtons(r){let o=r.createDiv();o.style.display="flex",o.style.gap="8px",o.style.justifyContent="flex-end",o.style.marginTop="20px";let n=o.createEl("button",{text:"Back"});n.onclick=()=>this.navigateTo("mode-select");let i=o.createEl("button",{text:"Create with AI",cls:"mod-cta"});i.onclick=()=>this.handleWizardGenerate()}renderWizardLoading(){let{contentEl:r}=this;r.createEl("h2",{text:"Creating your agent..."});let o=r.createDiv();o.style.textAlign="center",o.style.padding="40px 0";let n=o.createDiv();n.style.display="inline-block",n.style.width="32px",n.style.height="32px",n.style.border="3px solid var(--background-modifier-border)",n.style.borderTop="3px solid var(--interactive-accent)",n.style.borderRadius="50%",n.style.animation="chatgpt-md-spin 1s linear infinite";let i=o.createEl("p",{text:"AI is crafting your agent's configuration..."});i.style.color="var(--text-muted)",i.style.marginTop="16px",this.addSpinnerStyle()}addSpinnerStyle(){if(document.getElementById("chatgpt-md-spinner-style"))return;let r=document.createElement("style");r.id="chatgpt-md-spinner-style",r.textContent="@keyframes chatgpt-md-spin { to { transform: rotate(360deg); } }",document.head.appendChild(r)}renderManualForm(){let{contentEl:r}=this;r.createEl("h2",{text:"Create New Agent"}),this.addNameField(r),this.addModelField(r),this.addTemperatureField(r),this.addMessageField(r),this.addManualButtons(r)}addNameField(r){new wt.Setting(r).setName("Agent Name").addText(o=>{o.setPlaceholder("My Agent").setValue(this.name).onChange(n=>{this.name=n}),o.inputEl.style.width="300px"})}addModelField(r){new wt.Setting(r).setName("Model").addText(n=>{n.setPlaceholder("Type to filter models...").setValue(this.model).onChange(i=>{this.model=i,this.updateModelSuggestions(i,o,!1)}),n.inputEl.style.width="300px",this.modelInputEl=n.inputEl});let o=r.createDiv({cls:"chatgpt-md-model-suggestions"});o.style.maxHeight="150px",o.style.overflowY="auto",o.style.marginTop="-10px",o.style.marginBottom="10px",this.updateModelSuggestions("",o,!1)}updateModelSuggestions(r,o,n){o.empty();let i=this.availableModels.filter(s=>s.toLowerCase().includes(r.toLowerCase()));for(let s of i){let l=o.createDiv({cls:"suggestion-item"});l.setText(s),l.style.padding="4px 8px",l.style.cursor="pointer",l.style.borderRadius="4px",l.addEventListener("mouseenter",()=>l.style.backgroundColor="var(--background-modifier-hover)"),l.addEventListener("mouseleave",()=>l.style.backgroundColor=""),l.addEventListener("click",()=>{n?this.wizardModel=s:this.model=s,this.modelInputEl&&(this.modelInputEl.value=s,this.modelInputEl.dispatchEvent(new Event("input"))),o.empty()})}}addTemperatureField(r){let o=r.createEl("span",{text:this.temperature.toFixed(1)});o.style.marginLeft="8px",o.style.fontFamily="monospace",new wt.Setting(r).setName("Temperature").addSlider(s=>{s.setLimits(0,2,.1).setValue(this.temperature).onChange(l=>{this.temperature=l,o.setText(l.toFixed(1))}),s.sliderEl.style.width="250px",s.sliderEl.addEventListener("input",()=>{o.setText(s.getValue().toFixed(1))})});let n=r.lastElementChild,i=n==null?void 0:n.querySelector(".setting-item-control");i&&i.appendChild(o)}addMessageField(r){new wt.Setting(r).setName("Agent Message").addTextArea(o=>{o.setPlaceholder("Enter the agent's initial prompt or instructions...").setValue(this.message).onChange(n=>{this.message=n}),o.inputEl.style.width="100%",o.inputEl.style.height="200px"})}addManualButtons(r){let o=r.createDiv();o.style.display="flex",o.style.gap="8px",o.style.justifyContent="flex-end",o.style.marginTop="20px";let n=o.createEl("button",{text:"Back"});n.onclick=()=>this.navigateTo(this.cameFromWizard?"wizard-input":"mode-select");let i=o.createEl("button",{text:"Create Agent",cls:"mod-cta"});i.onclick=()=>this.handleCreate()}async handleWizardGenerate(){if(!this.wizardModel.trim()){new wt.Notice("Please select a model");return}if(!this.wizardIdea.trim()){new wt.Notice("Please describe your agent idea");return}if(!this.services){new wt.Notice("AI services not available");return}this.navigateTo("wizard-loading");try{let r=await this.callAiForAgentConfig(),o=this.parseWizardResponse(r);if(!o){new wt.Notice("Could not parse AI response. Please try again."),this.navigateTo("wizard-input");return}this.name=o.name,this.temperature=Math.max(0,Math.min(2,o.temperature)),this.message=o.prompt,this.model=this.wizardModel,this.cameFromWizard=!0,this.navigateTo("manual-form")}catch(r){new wt.Notice(`AI wizard error: ${r instanceof Error?r.message:String(r)}`),this.navigateTo("wizard-input")}}async callAiForAgentConfig(){let r=this.services,o=r.aiProviderService(),n=this.getProviderTypeFromModel(this.wizardModel),i=r.apiAuthService.getApiKey(this.settings,n),l=Y$(this.settings)[n]||"",d=[{role:"system",content:Xv},{role:"user",content:this.wizardIdea}];return(await o.callAiAPI(d,{model:this.wizardModel,stream:!1,temperature:.7},"",l,void 0,!1,i,this.settings)).fullString}getProviderTypeFromModel(r){let o=["ollama","openrouter","lmstudio","anthropic","gemini","zai"];for(let n of o)if(r.startsWith(`${n}@`))return n;return"openai"}parseWizardResponse(r){let o=r.replace(/```json\s*/g,"").replace(/```\s*/g,"").trim();try{let n=JSON.parse(o);if(typeof n.name=="string"&&typeof n.temperature=="number"&&typeof n.prompt=="string")return{name:n.name,temperature:n.temperature,prompt:n.prompt}}catch(n){let i=o.match(/\{[\s\S]*\}/);if(i)try{let s=JSON.parse(i[0]);if(typeof s.name=="string"&&typeof s.temperature=="number"&&typeof s.prompt=="string")return{name:s.name,temperature:s.temperature,prompt:s.prompt}}catch(s){}}return null}async handleCreate(){if(!this.name.trim()){new wt.Notice("Please enter an agent name");return}if(!this.model.trim()){new wt.Notice("Please select or enter a model");return}try{await this.agentService.createAgentFile(this.name,this.model,this.temperature,this.message,this.settings),new wt.Notice(`Agent "${this.name}" created`),this.close()}catch(r){new wt.Notice(`[ChatGPT MD] Error creating agent: ${r.message}`)}}};var Tc=class{constructor(t){this.services=t}async execute(){let{agentService:t,fileService:r,settingsService:o}=this.services,n=o.getSettings();if(!n.agentFolder||n.agentFolder.trim()===""){new Tv.Notice("[ChatGPT MD] No agent folder value found. Please set one in settings.");return}await r.ensureFolderExists(n.agentFolder,Fa)&&new kc(this.services.app,t,o,n).open()}getCommand(){return{id:Uv,name:"Choose agent",icon:"bot"}}},$c=class{constructor(t,r){this.services=t;this.modelSelectHandler=r}async execute(){let{agentService:t,fileService:r,settingsService:o}=this.services,n=o.getSettings();if(!n.agentFolder||n.agentFolder.trim()===""){new Tv.Notice("[ChatGPT MD] No agent folder value found. Please set one in settings.");return}if(!await r.ensureFolderExists(n.agentFolder,Fa))return;let s=this.modelSelectHandler.getAvailableModels();new Ic(this.services.app,t,n,s,this.services).open()}getCommand(){return{id:Fv,name:"Create new agent",icon:"bot-message-square"}}};var Ec=class{constructor(t){this.plugin=t}registerEditorCommand(t){let r=t.getCommand();this.plugin.addCommand({...r,editorCallback:(o,n)=>t.execute(o)})}registerEditorViewCommand(t){let r=t.getCommand();this.plugin.addCommand({...r,editorCallback:(o,n)=>t.execute(o,n)})}registerCallbackCommand(t){let r=t.getCommand();this.plugin.addCommand({...r,callback:()=>t.execute()})}};var Cc=class extends as.Plugin{async onload(){this.services=gc.create(this.app,this);let t=this.services.settingsService;await t.loadSettings(),await t.migrateSettings(),await t.addSettingTab(),this.stopStreamingHandler=new yc(this.services),this.chatHandler=new ts(this.services,this.stopStreamingHandler),this.inferTitleHandler=new bc(this.services,this.stopStreamingHandler),this.modelSelectHandler=new os(this.services),this.registerCommands(),this.modelSelectHandler.initializeAvailableModels().catch(r=>{})}registerCommands(){let t=new Ec(this);this.addCommand({...ts.getCommand(),editorCallback:(r,o)=>{o instanceof as.MarkdownView&&this.chatHandler.execute(r,o)}}),this.addCommand({...os.getCommand(),editorCallback:(r,o)=>{o instanceof as.MarkdownView&&this.modelSelectHandler.execute(r,o)}}),t.registerEditorCommand(new hc(this.services)),t.registerEditorCommand(new vc(this.services)),t.registerCallbackCommand(this.stopStreamingHandler),t.registerEditorViewCommand(this.inferTitleHandler),t.registerEditorCommand(new xc(this.services)),t.registerCallbackCommand(new wc(this.services)),t.registerEditorCommand(new Sc(this.services)),t.registerCallbackCommand(new Tc(this.services)),t.registerCallbackCommand(new $c(this.services,this.modelSelectHandler))}}; + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/chatgpt-md/manifest.json b/.obsidian/plugins/chatgpt-md/manifest.json new file mode 100644 index 0000000..da33528 --- /dev/null +++ b/.obsidian/plugins/chatgpt-md/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "chatgpt-md", + "name": "ChatGPT MD", + "version": "3.1.0", + "minAppVersion": "0.15.0", + "description": "A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into Obsidian.", + "author": "Deniz Okcu (created by Bram Adams)", + "authorUrl": "https://www.bramadams.dev", + "fundingUrl": "https://www.bramadams.dev/#/portal/", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/chatgpt-md/styles.css b/.obsidian/plugins/chatgpt-md/styles.css new file mode 100644 index 0000000..d706564 --- /dev/null +++ b/.obsidian/plugins/chatgpt-md/styles.css @@ -0,0 +1,64 @@ +.chatgpt-md-websearch-approval-modal { + max-width: 600px; +} + +.websearch-query-info { + margin-bottom: 10px; + padding: 8px; + background: var(--background-secondary); + border-radius: 4px; +} + +.websearch-button-container { + display: flex; + gap: 8px; + margin-bottom: 10px; +} + +.websearch-results-container { + max-height: 300px; + overflow-y: auto; + margin-bottom: 10px; +} + +.websearch-result-item { + border-bottom: 1px solid var(--background-modifier-border); + padding: 8px 0; +} + +.websearch-result-url { + font-size: 0.85em; + color: var(--text-muted); +} + +.websearch-result-snippet { + font-size: 0.9em; + color: var(--text-muted); +} + +.websearch-privacy-warning { + background: var(--background-modifier-warning); + padding: 8px; + border-radius: 4px; + margin-bottom: 10px; +} + +.websearch-action-buttons { + display: flex; + justify-content: flex-end; + gap: 8px; +} + +/* Model suggestion tool badge */ +.ai-model-tool-badge { + background-color: var(--interactive-accent, #7b6cd9); + color: var(--text-on-accent, #ffffff); + padding: 2px 8px; + border-radius: 4px; + font-size: 11px; + font-weight: 500; + flex-shrink: 0; + white-space: nowrap; + display: inline-block; + line-height: 1.4; +} diff --git a/.obsidian/plugins/csv-lite/main.js b/.obsidian/plugins/csv-lite/main.js index 24dac3c..a4585c5 100644 --- a/.obsidian/plugins/csv-lite/main.js +++ b/.obsidian/plugins/csv-lite/main.js @@ -3,18 +3,18 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ -var et=Object.create;var ye=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,it=Object.prototype.hasOwnProperty;var nt=(w,t)=>()=>(t||w((t={exports:{}}).exports,t),t.exports),at=(w,t)=>{for(var e in t)ye(w,e,{get:t[e],enumerable:!0})},Ue=(w,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of st(t))!it.call(w,a)&&a!==e&&ye(w,a,{get:()=>t[a],enumerable:!(r=tt(t,a))||r.enumerable});return w};var ot=(w,t,e)=>(e=w!=null?et(rt(w)):{},Ue(t||!w||!w.__esModule?ye(e,"default",{value:w,enumerable:!0}):e,w)),lt=w=>Ue(ye({},"__esModule",{value:!0}),w);var $e=nt((He,Ae)=>{((w,t)=>{typeof define=="function"&&define.amd?define([],t):typeof Ae=="object"&&typeof He!="undefined"?Ae.exports=t():w.Papa=t()})(He,function w(){var t=typeof self!="undefined"?self:typeof window!="undefined"?window:t!==void 0?t:{},e,r=!t.document&&!!t.postMessage,a=t.IS_PAPA_WORKER||!1,o={},p=0,s={};function c(i){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(n){var l=oe(n);l.chunkSize=parseInt(l.chunkSize),n.step||n.chunk||(l.chunkSize=null),this._handle=new C(l),(this._handle.streamer=this)._config=l}.call(this,i),this.parseChunk=function(n,l){var g=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),a)t.postMessage({results:f,workerId:s.WORKER_ID,finished:g});else if(P(this._config.chunk)&&!l){if(this._config.chunk(f,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=f=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(f.data),this._completeResults.errors=this._completeResults.errors.concat(f.errors),this._completeResults.meta=f.meta),this._completed||!g||!P(this._config.complete)||f&&f.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),g||f&&f.meta.paused||this._nextChunk(),f}this._halted=!0},this._sendError=function(n){P(this._config.error)?this._config.error(n):a&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:n,finished:!1})}}function u(i){var n;(i=i||{}).chunkSize||(i.chunkSize=s.RemoteChunkSize),c.call(this,i),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(l){this._input=l,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(n=new XMLHttpRequest,this._config.withCredentials&&(n.withCredentials=this._config.withCredentials),r||(n.onload=N(this._chunkLoaded,this),n.onerror=N(this._chunkError,this)),n.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var l,g=this._config.downloadRequestHeaders;for(l in g)n.setRequestHeader(l,g[l])}var f;this._config.chunkSize&&(f=this._start+this._config.chunkSize-1,n.setRequestHeader("Range","bytes="+this._start+"-"+f));try{n.send(this._config.downloadRequestBody)}catch(x){this._chunkError(x.message)}r&&n.status===0&&this._chunkError()}},this._chunkLoaded=function(){n.readyState===4&&(n.status<200||400<=n.status?this._chunkError():(this._start+=this._config.chunkSize||n.responseText.length,this._finished=!this._config.chunkSize||this._start>=(l=>(l=l.getResponseHeader("Content-Range"))!==null?parseInt(l.substring(l.lastIndexOf("/")+1)):-1)(n),this.parseChunk(n.responseText)))},this._chunkError=function(l){l=n.statusText||l,this._sendError(new Error(l))}}function b(i){(i=i||{}).chunkSize||(i.chunkSize=s.LocalChunkSize),c.call(this,i);var n,l,g=typeof FileReader!="undefined";this.stream=function(f){this._input=f,l=f.slice||f.webkitSlice||f.mozSlice,g?((n=new FileReader).onload=N(this._chunkLoaded,this),n.onerror=N(this._chunkError,this)):n=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(f.target.result)},this._chunkError=function(){this._sendError(n.error)}}function S(i){var n;c.call(this,i=i||{}),this.stream=function(l){return n=l,this._nextChunk()},this._nextChunk=function(){var l,g;if(!this._finished)return l=this._config.chunkSize,n=l?(g=n.substring(0,l),n.substring(l)):(g=n,""),this._finished=!n,this.parseChunk(g)}}function $(i){c.call(this,i=i||{});var n=[],l=!0,g=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(f){this._input=f,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){g&&n.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),n.length?this.parseChunk(n.shift()):l=!0},this._streamData=N(function(f){try{n.push(typeof f=="string"?f:f.toString(this._config.encoding)),l&&(l=!1,this._checkIsFinished(),this.parseChunk(n.shift()))}catch(x){this._streamError(x)}},this),this._streamError=N(function(f){this._streamCleanUp(),this._sendError(f)},this),this._streamEnd=N(function(){this._streamCleanUp(),g=!0,this._streamData("")},this),this._streamCleanUp=N(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function C(i){var n,l,g,f,x=Math.pow(2,53),j=-x,B=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Q=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,M=this,U=0,k=0,J=!1,d=!1,m=[],h={data:[],errors:[],meta:{}};function T(y){return i.skipEmptyLines==="greedy"?y.join("").trim()==="":y.length===1&&y[0].length===0}function v(){if(h&&g&&(I("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),g=!1),i.skipEmptyLines&&(h.data=h.data.filter(function(F){return!T(F)})),E()){let F=function(X,V){P(i.transformHeader)&&(X=i.transformHeader(X,V)),m.push(X)};var D=F;if(h)if(Array.isArray(h.data[0])){for(var y=0;E()&&y(Y=>(i.dynamicTypingFunction&&i.dynamicTyping[Y]===void 0&&(i.dynamicTyping[Y]=i.dynamicTypingFunction(Y)),(i.dynamicTyping[Y]||i.dynamicTyping)===!0))(A)?W==="true"||W==="TRUE"||W!=="false"&&W!=="FALSE"&&((Y=>{if(B.test(Y)&&(Y=parseFloat(Y),j=m.length?"__parsed_extra":m[z]:_,ee=i.transform?i.transform(ee,_):ee);_==="__parsed_extra"?(V[_]=V[_]||[],V[_].push(ee)):V[_]=ee}return i.header&&(z>m.length?I("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+z,k+X):zi.preview?l.abort():(h.data=h.data[0],f(h,M))))}),this.parse=function(y,L,K){var D=i.quoteChar||'"',D=(i.newline||(i.newline=this.guessLineEndings(y,D)),g=!1,i.delimiter?P(i.delimiter)&&(i.delimiter=i.delimiter(y),h.meta.delimiter=i.delimiter):((D=((F,X,V,z,_)=>{var ee,A,W,Y;_=_||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var pe=0;pe<_.length;pe++){for(var le,me=_[pe],te=0,ce=0,G=0,re=(W=void 0,new q({comments:z,delimiter:me,newline:X,preview:10}).parse(F)),de=0;de=K.length/2?`\r -`:"\r"}}function R(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(i){var n=(i=i||{}).delimiter,l=i.newline,g=i.comments,f=i.step,x=i.preview,j=i.fastMode,B=null,Q=!1,M=i.quoteChar==null?'"':i.quoteChar,U=M;if(i.escapeChar!==void 0&&(U=i.escapeChar),(typeof n!="string"||-1()=>(e||p((e={exports:{}}).exports,e),e.exports),ht=(p,e)=>{for(var t in e)Ce(p,t,{get:e[t],enumerable:!0})},je=(p,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of at(e))!lt.call(p,n)&&n!==t&&Ce(p,n,{get:()=>e[n],enumerable:!(r=nt(e,n))||r.enumerable});return p};var ut=(p,e,t)=>(t=p!=null?it(ot(p)):{},je(e||!p||!p.__esModule?Ce(t,"default",{value:p,enumerable:!0}):t,p)),dt=p=>je(Ce({},"__esModule",{value:!0}),p);var Ke=ct((He,Oe)=>{((p,e)=>{typeof define=="function"&&define.amd?define([],e):typeof Oe=="object"&&typeof He!="undefined"?Oe.exports=e():p.Papa=e()})(He,function p(){var e=typeof self!="undefined"?self:typeof window!="undefined"?window:e!==void 0?e:{},t,r=!e.document&&!!e.postMessage,n=e.IS_PAPA_WORKER||!1,o={},u=0,s={};function c(i){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(a){var l=oe(a);l.chunkSize=parseInt(l.chunkSize),a.step||a.chunk||(l.chunkSize=null),this._handle=new y(l),(this._handle.streamer=this)._config=l}.call(this,i),this.parseChunk=function(a,l){var m=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),n)e.postMessage({results:g,workerId:s.WORKER_ID,finished:m});else if(N(this._config.chunk)&&!l){if(this._config.chunk(g,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=g=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(g.data),this._completeResults.errors=this._completeResults.errors.concat(g.errors),this._completeResults.meta=g.meta),this._completed||!m||!N(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),m||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(a){N(this._config.error)?this._config.error(a):n&&this._config.error&&e.postMessage({workerId:s.WORKER_ID,error:a,finished:!1})}}function h(i){var a;(i=i||{}).chunkSize||(i.chunkSize=s.RemoteChunkSize),c.call(this,i),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(l){this._input=l,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(a=new XMLHttpRequest,this._config.withCredentials&&(a.withCredentials=this._config.withCredentials),r||(a.onload=j(this._chunkLoaded,this),a.onerror=j(this._chunkError,this)),a.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var l,m=this._config.downloadRequestHeaders;for(l in m)a.setRequestHeader(l,m[l])}var g;this._config.chunkSize&&(g=this._start+this._config.chunkSize-1,a.setRequestHeader("Range","bytes="+this._start+"-"+g));try{a.send(this._config.downloadRequestBody)}catch(L){this._chunkError(L.message)}r&&a.status===0&&this._chunkError()}},this._chunkLoaded=function(){a.readyState===4&&(a.status<200||400<=a.status?this._chunkError():(this._start+=this._config.chunkSize||a.responseText.length,this._finished=!this._config.chunkSize||this._start>=(l=>(l=l.getResponseHeader("Content-Range"))!==null?parseInt(l.substring(l.lastIndexOf("/")+1)):-1)(a),this.parseChunk(a.responseText)))},this._chunkError=function(l){l=a.statusText||l,this._sendError(new Error(l))}}function E(i){(i=i||{}).chunkSize||(i.chunkSize=s.LocalChunkSize),c.call(this,i);var a,l,m=typeof FileReader!="undefined";this.stream=function(g){this._input=g,l=g.slice||g.webkitSlice||g.mozSlice,m?((a=new FileReader).onload=j(this._chunkLoaded,this),a.onerror=j(this._chunkError,this)):a=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(g.target.result)},this._chunkError=function(){this._sendError(a.error)}}function x(i){var a;c.call(this,i=i||{}),this.stream=function(l){return a=l,this._nextChunk()},this._nextChunk=function(){var l,m;if(!this._finished)return l=this._config.chunkSize,a=l?(m=a.substring(0,l),a.substring(l)):(m=a,""),this._finished=!a,this.parseChunk(m)}}function $(i){c.call(this,i=i||{});var a=[],l=!0,m=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(g){this._input=g,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){m&&a.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),a.length?this.parseChunk(a.shift()):l=!0},this._streamData=j(function(g){try{a.push(typeof g=="string"?g:g.toString(this._config.encoding)),l&&(l=!1,this._checkIsFinished(),this.parseChunk(a.shift()))}catch(L){this._streamError(L)}},this),this._streamError=j(function(g){this._streamCleanUp(),this._sendError(g)},this),this._streamEnd=j(function(){this._streamCleanUp(),m=!0,this._streamData("")},this),this._streamCleanUp=j(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function y(i){var a,l,m,g,L=Math.pow(2,53),Q=-L,V=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Y=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,M=this,K=0,R=0,X=!1,f=!1,w=[],d={data:[],errors:[],meta:{}};function _(b){return i.skipEmptyLines==="greedy"?b.join("").trim()==="":b.length===1&&b[0].length===0}function v(){if(d&&m&&(A("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),m=!1),i.skipEmptyLines&&(d.data=d.data.filter(function(S){return!_(S)})),C()){let S=function(U,H){N(i.transformHeader)&&(U=i.transformHeader(U,H)),w.push(U)};var I=S;if(d)if(Array.isArray(d.data[0])){for(var b=0;C()&&b(J=>(i.dynamicTypingFunction&&i.dynamicTyping[J]===void 0&&(i.dynamicTyping[J]=i.dynamicTypingFunction(J)),(i.dynamicTyping[J]||i.dynamicTyping)===!0))(F)?W==="true"||W==="TRUE"||W!=="false"&&W!=="FALSE"&&((J=>{if(V.test(J)&&(J=parseFloat(J),Q=w.length?"__parsed_extra":w[q]:T,Z=i.transform?i.transform(Z,T):Z);T==="__parsed_extra"?(H[T]=H[T]||[],H[T].push(Z)):H[T]=Z}return i.header&&(q>w.length?A("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+q,R+U):qi.preview?l.abort():(d.data=d.data[0],g(d,M))))}),this.parse=function(b,O,B){var I=i.quoteChar||'"',I=(i.newline||(i.newline=this.guessLineEndings(b,I)),m=!1,i.delimiter?N(i.delimiter)&&(i.delimiter=i.delimiter(b),d.meta.delimiter=i.delimiter):((I=((S,U,H,q,T)=>{var Z,F,W,J;T=T||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var fe=0;fe=B.length/2?`\r +`:"\r"}}function D(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function z(i){var a=(i=i||{}).delimiter,l=i.newline,m=i.comments,g=i.step,L=i.preview,Q=i.fastMode,V=null,Y=!1,M=i.quoteChar==null?'"':i.quoteChar,K=M;if(i.escapeChar!==void 0&&(K=i.escapeChar),(typeof a!="string"||-1=x)return te(!0);break}K.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:L.length,index:k}),A++}}else if(g&&D.length===0&&d.substring(k,k+I)===g){if(_===-1)return te();k=_+E,_=d.indexOf(l,k),z=d.indexOf(n,k)}else if(z!==-1&&(z<_||_===-1))D.push(d.substring(k,z)),k=z+v,z=d.indexOf(n,k);else{if(_===-1)break;if(D.push(d.substring(k,_)),me(_+E),y&&(ce(),J))return te();if(x&&L.length>=x)return te(!0)}return le();function Y(G){L.push(G),F=k}function pe(G){var re=0;return re=G!==-1&&(G=d.substring(A+1,G))&&G.trim()===""?G.length:re}function le(G){return h||(G===void 0&&(G=d.substring(k)),D.push(G),k=T,Y(D),y&&ce()),te()}function me(G){k=G,Y(D),D=[],_=d.indexOf(l,k)}function te(G){if(i.header&&!m&&L.length&&!Q){var re=L[0],de={},Ie=new Set(re);let We=!1;for(let fe=0;feg.charCodeAt(0)!==65279?g:g.slice(1))(i),l=new(n.download?u:S)(n)):i.readable===!0&&P(i.read)&&P(i.on)?l=new $(n):(t.File&&i instanceof File||i instanceof Object)&&(l=new b(n)),l.stream(i);(l=(()=>{var g;return!!s.WORKERS_SUPPORTED&&(g=(()=>{var f=t.URL||t.webkitURL||null,x=w.toString();return s.BLOB_URL||(s.BLOB_URL=f.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",x,")();"],{type:"text/javascript"})))})(),(g=new t.Worker(g)).onmessage=Z,g.id=p++,o[g.id]=g)})()).userStep=n.step,l.userChunk=n.chunk,l.userComplete=n.complete,l.userError=n.error,n.step=P(n.step),n.chunk=P(n.chunk),n.complete=P(n.complete),n.error=P(n.error),delete n.worker,l.postMessage({input:i,config:n,workerId:l.id})},s.unparse=function(i,n){var l=!1,g=!0,f=",",x=`\r -`,j='"',B=j+j,Q=!1,M=null,U=!1,k=((()=>{if(typeof n=="object"){if(typeof n.delimiter!="string"||s.BAD_DELIMITERS.filter(function(m){return n.delimiter.indexOf(m)!==-1}).length||(f=n.delimiter),typeof n.quotes!="boolean"&&typeof n.quotes!="function"&&!Array.isArray(n.quotes)||(l=n.quotes),typeof n.skipEmptyLines!="boolean"&&typeof n.skipEmptyLines!="string"||(Q=n.skipEmptyLines),typeof n.newline=="string"&&(x=n.newline),typeof n.quoteChar=="string"&&(j=n.quoteChar),typeof n.header=="boolean"&&(g=n.header),Array.isArray(n.columns)){if(n.columns.length===0)throw new Error("Option columns is empty");M=n.columns}n.escapeChar!==void 0&&(B=n.escapeChar+j),n.escapeFormulae instanceof RegExp?U=n.escapeFormulae:typeof n.escapeFormulae=="boolean"&&n.escapeFormulae&&(U=/^[=+\-@\t\r].*$/)}})(),new RegExp(R(j),"g"));if(typeof i=="string"&&(i=JSON.parse(i)),Array.isArray(i)){if(!i.length||Array.isArray(i[0]))return J(null,i,Q);if(typeof i[0]=="object")return J(M||Object.keys(i[0]),i,Q)}else if(typeof i=="object")return typeof i.data=="string"&&(i.data=JSON.parse(i.data)),Array.isArray(i.data)&&(i.fields||(i.fields=i.meta&&i.meta.fields||M),i.fields||(i.fields=Array.isArray(i.data[0])?i.fields:typeof i.data[0]=="object"?Object.keys(i.data[0]):[]),Array.isArray(i.data[0])||typeof i.data[0]=="object"||(i.data=[i.data])),J(i.fields||[],i.data||[],Q);throw new Error("Unable to serialize unrecognized input");function J(m,h,T){var v="",E=(typeof m=="string"&&(m=JSON.parse(m)),typeof h=="string"&&(h=JSON.parse(h)),Array.isArray(m)&&0{for(var y=0;y_e});module.exports=lt(ut);var De=require("obsidian");var ne=require("obsidian");var Ee=ot($e()),qe=require("obsidian");var je={buttons:{undo:"\u64A4\u9500",redo:"\u91CD\u505A",addRow:"\u6DFB\u52A0\u884C",deleteRow:"\u5220\u9664\u884C",addColumn:"\u6DFB\u52A0\u5217",deleteColumn:"\u5220\u9664\u5217",resetColumnWidth:"\u91CD\u7F6E\u5217\u5BBD",sourceMode:"\u6E90\u7801\u6A21\u5F0F",tableMode:"\u8868\u683C\u6A21\u5F0F",insertRowBefore:"\u4E0A\u65B9\u63D2\u5165\u884C",insertRowAfter:"\u4E0B\u65B9\u63D2\u5165\u884C"},editBar:{placeholder:"\u7F16\u8F91\u9009\u4E2D\u5355\u5143\u683C..."},csv:{error:"\u9519\u8BEF",parsingFailed:"CSV\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u683C\u5F0F"},settings:{fieldSeparator:"\u5B57\u6BB5\u5206\u9694\u7B26",fieldSeparatorDesc:"\u7528\u4E8E\u5206\u9694\u5B57\u6BB5\u7684\u5B57\u7B26\uFF08\u4F8B\u5982\uFF1A\u9017\u53F7\u3001\u5206\u53F7\u3001\u5236\u8868\u7B26\uFF09",quoteChar:"\u5F15\u53F7\u5B57\u7B26",quoteCharDesc:"\u7528\u4E8E\u5305\u56F4\u542B\u6709\u7279\u6B8A\u5B57\u7B26\u7684\u5B57\u6BB5"},search:{placeholder:"\u641C\u7D22\u8868\u683C\u5185\u5BB9...",noResults:"\u672A\u627E\u5230\u5339\u914D\u7ED3\u679C",moreResults:"\u8FD8\u6709 {count} \u4E2A\u7ED3\u679C...",rowColumn:"\u7B2C{row}\u884C\uFF0C\u7B2C{col}\u5217"},table:{headerRow:"\u8868\u5934\u884C",dataRow:"\u6570\u636E\u884C"},contextMenu:{insertRowAbove:"\u4E0A\u65B9\u63D2\u5165\u884C",insertRowBelow:"\u4E0B\u65B9\u63D2\u5165\u884C",deleteRow:"\u5220\u9664\u672C\u884C",moveRowUp:"\u5411\u4E0A\u79FB\u52A8\u4E00\u884C",moveRowDown:"\u5411\u4E0B\u79FB\u52A8\u4E00\u884C",insertColLeft:"\u5DE6\u4FA7\u63D2\u5165\u5217",insertColRight:"\u53F3\u4FA7\u63D2\u5165\u5217",deleteCol:"\u5220\u9664\u672C\u5217",moveColLeft:"\u5411\u5DE6\u79FB\u52A8\u4E00\u5217",moveColRight:"\u5411\u53F3\u79FB\u52A8\u4E00\u5217"}};var Ke={buttons:{undo:"Undo",redo:"Redo",addRow:"Add row",deleteRow:"Delete row",addColumn:"Add column",deleteColumn:"Delete column",resetColumnWidth:"Reset column width",sourceMode:"Source Mode",tableMode:"Table Mode"},editBar:{placeholder:"Edit selected cell..."},csv:{error:"Error",parsingFailed:"Failed to parse CSV. Please check file format."},settings:{fieldSeparator:"Field Separator",fieldSeparatorDesc:"The character used to separate fields (e.g., comma, semicolon, tab)",quoteChar:"Quote Character",quoteCharDesc:"Character used to enclose fields containing special characters"},search:{placeholder:"Search table content...",noResults:"No matching results found",moreResults:"{count} more results...",rowColumn:"Row {row}, Column {col}"},table:{headerRow:"Header Row",dataRow:"Data Row"},contextMenu:{insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:"Delete this row",moveRowUp:"Move row up",moveRowDown:"Move row down",insertColLeft:"Insert column left",insertColRight:"Insert column right",deleteCol:"Delete this column",moveColLeft:"Move column left",moveColRight:"Move column right"}};var Qe={"zh-cn":je,en:Ke},Oe=class{constructor(t){this.locale="en";this.setLocale(t||"en")}setLocale(t){console.log(`I18n: Attempting to set locale to '${t}'`);let e=t.toLowerCase(),r="en";e.startsWith("zh")?r="zh-cn":e.startsWith("en")&&(r="en"),r in Qe?(this.locale=r,console.log(`I18n: Successfully set locale to '${this.locale}'`)):(this.locale="en",console.warn(`I18n: Locale '${r}' is not fully supported, falling back to 'en'`))}t(t,e){let r=this.getTranslation(t,this.locale);r===null&&this.locale!=="en"&&(console.warn(`I18n: Key '${t}' not found in '${this.locale}', falling back to 'en'.`),r=this.getTranslation(t,"en"));let a=r!=null?r:t;return e&&Object.keys(e).forEach(o=>{let p=`{${o}}`;a=a.replace(new RegExp(p,"g"),String(e[o]))}),a}getTranslation(t,e){let r=Qe[e],a=t.split("."),o=r;for(let p of a)if(o&&typeof o=="object"&&p in o)o=o[p];else return null;return typeof o=="string"?o:null}getCurrentLocale(){return this.locale}},O=new Oe;var ue=class{static detectDelimiter(t,e='"'){if(!t||t.length===0)return",";let r=[",",";"," ","|"],a=[],o="",p=!1;for(let b=0;b0&&a.push(o);let s=a.map(b=>b).filter(b=>b.trim().length>0).slice(0,20);if(s.length===0)return",";function c(b,S){let $=!1,C=0;for(let R=0;Rc(q,b)),$=S.reduce((q,Z)=>q+Z,0)/S.length,C=S.reduce((q,Z)=>q+Math.pow(Z-$,2),0)/S.length,R=($>1?$:0)-C*.1;(!u||R>u.score)&&(u={delim:b,score:R,avgFields:$,consistency:C})}return u&&u.avgFields>=1.5?u.delim:","}static parseCSV(t,e){try{let r={...this.defaultConfig,...e};if(!r.delimiter||r.delimiter==="auto"){let o=this.detectDelimiter(t,r.quoteChar);r.delimiter=o}let a=Ee.parse(t,r);return a.errors&&a.errors.length>0&&(console.warn("CSV\u89E3\u6790\u8B66\u544A:",a.errors),new qe.Notice(`CSV\u89E3\u6790\u63D0\u793A: ${a.errors[0].message}`)),a.data}catch(r){return console.error("CSV\u89E3\u6790\u9519\u8BEF:",r),new qe.Notice(`${O.t("csv.error")}: CSV\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u683C\u5F0F`),[[""]]}}static unparseCSV(t,e){return Ee.unparse(t,{...{header:!1,newline:` -`},...e})}static normalizeTableData(t){if(!t||t.length===0)return[[""]];let e=0;for(let a of t)a&&(e=Math.max(e,a.length));return t.map(a=>{let o=a?[...a]:[];for(;o.lengththis.maxSize?this.history.shift():this.currentIndex++}undo(){return this.canUndo()?(this.currentIndex--,new be.Notice("\u5DF2\u64A4\u9500\u4E0A\u4E00\u6B65\u64CD\u4F5C"),this.getCurrentState()):(new be.Notice("\u6CA1\u6709\u66F4\u591A\u53EF\u64A4\u9500\u7684\u64CD\u4F5C"),null)}redo(){return this.canRedo()?(this.currentIndex++,new be.Notice("\u5DF2\u91CD\u505A\u64CD\u4F5C"),this.getCurrentState()):(new be.Notice("\u6CA1\u6709\u66F4\u591A\u53EF\u91CD\u505A\u7684\u64CD\u4F5C"),null)}getCurrentState(){return this.currentIndex>=0&&this.currentIndex0}canRedo(){return this.currentIndex0&&Array.isArray(t[0])?t.map(e=>[...e]):[...t]:typeof t=="object"&&t!==null?JSON.parse(JSON.stringify(t)):t}},we=class extends ze{cloneState(t){return t.map(e=>[...e])}};var Pe=require("obsidian"),ae=class{static calculateColumnWidths(t){if(!t||t.length===0||!t[0])return[];let e=t[0].map(()=>100);return t.forEach(r=>{r.forEach((a,o)=>{let p=Math.max(50,Math.min(300,a.length*10));e[o]=Math.max(e[o],p)})}),e}static addRow(t){let e=t.length>0?t[0].length:1,r=Array(e).fill("");return[...t,r]}static deleteRow(t){return t.length<=1?(new Pe.Notice("\u81F3\u5C11\u9700\u8981\u4FDD\u7559\u4E00\u884C"),t):t.slice(0,-1)}static addColumn(t){return t.map(e=>[...e,""])}static deleteColumn(t){return!t[0]||t[0].length<=1?(new Pe.Notice("\u81F3\u5C11\u9700\u8981\u4FDD\u7559\u4E00\u5217"),t):t.map(e=>e.slice(0,-1))}static addColumnToLeft(t,e){return!t||t.length===0?[]:t.map(r=>{let a=[...r];return a.splice(e,0,""),a})}static addColumnToRight(t,e){return!t||t.length===0?[]:t.map(r=>{let a=[...r];return a.splice(e+1,0,""),a})}static getColumnLabel(t){let e="",r=t;for(;r>=0;)e=String.fromCharCode(65+r%26)+e,r=Math.floor(r/26)-1;return e}static getCellAddress(t,e){let r=this.getColumnLabel(e),a=t+1;return`${r}${a}`}static getTableData(t){return Array.from(t.querySelectorAll("tr")).map(r=>Array.from(r.querySelectorAll("td, th")).map(o=>o.textContent||""))}};var Ye=require("obsidian"),Ce=class{static async withRetry(t,e=3,r=500){let a=new Error("Unknown error occurred");for(let o=0;o<=e;o++)try{return await t()}catch(p){if(a=p,!(p instanceof Error&&(p.message.includes("EBUSY")||p.message.includes("busy")||p.message.includes("locked")))||o===e)break;o===0&&new Ye.Notice(`File is busy. Retrying... (${o+1}/${e})`),await new Promise(c=>setTimeout(c,r))}throw a}};function Se(w){let{editBarEl:t,editInput:e,activeCellEl:r,activeRowIndex:a,activeColIndex:o,tableData:p,onEdit:s}=w;if(r){e.value=r.value;let c=ae.getCellAddress(a,o);t.setAttribute("data-cell-address",c),r.value?e.placeholder="":e.placeholder=c}else e.value="",e.placeholder=O.t("editBar.placeholder"),t.removeAttribute("data-cell-address");e.oninput=null,e.oninput=()=>{r&&a>=0&&o>=0&&(r.value=e.value,p[a][o]!==e.value&&s(a,o,e.value))}}var Re=class{constructor(t,e){this.searchMatches=[];this.currentSearchIndex=-1;this.options=e,this.searchContainer=t.createEl("div",{cls:"csv-search-container"}),this.searchInput=this.searchContainer.createEl("input",{cls:"csv-search-input",attr:{type:"text",placeholder:O.t("search.placeholder")}}),this.searchResults=this.searchContainer.createEl("div",{cls:"csv-search-results"}),this.setupSearchEvents()}setupSearchEvents(){let t;this.searchInput.addEventListener("input",()=>{clearTimeout(t),t=setTimeout(()=>{this.performSearch(this.searchInput.value)},300)}),this.searchInput.addEventListener("focus",()=>{this.searchMatches.length>0&&this.searchResults.classList.add("show")}),this.searchInput.addEventListener("keydown",e=>{e.key==="ArrowDown"?(e.preventDefault(),this.navigateSearchResults(1)):e.key==="ArrowUp"?(e.preventDefault(),this.navigateSearchResults(-1)):e.key==="Enter"?(e.preventDefault(),this.selectCurrentSearchResult()):e.key==="Escape"&&(this.searchInput.value="",this.performSearch(""),this.hideSearchResults())}),document.addEventListener("click",e=>{this.searchContainer.contains(e.target)||this.hideSearchResults()})}performSearch(t){if(this.searchMatches=[],this.currentSearchIndex=-1,!t.trim()){this.hideSearchResults(),this.options.clearSearchHighlights();return}let e=t.toLowerCase().trim(),r=this.options.getTableData();for(let a=0;a{let o=this.searchResults.createEl("div",{cls:"csv-search-result-item"}),p=o.createEl("div");p.createEl("span",{cls:"csv-search-result-cell",text:this.options.getCellAddress(r.row,r.col)}),p.createEl("span",{cls:"csv-search-result-address",text:O.t("search.rowColumn",{row:(r.row+1).toString(),col:(r.col+1).toString()})});let s=o.createEl("div",{cls:"csv-search-result-preview"});s.innerHTML=this.highlightSearchTerm(r.value,t),o.addEventListener("click",()=>{this.options.jumpToCell(r.row,r.col),this.hideSearchResults()}),o.setAttribute("data-index",a.toString())}),this.searchMatches.length>10){let r=this.searchResults.createEl("div",{cls:"csv-search-result-item",text:O.t("search.moreResults",{count:(this.searchMatches.length-10).toString()})});r.style.color="var(--text-muted)",r.style.fontStyle="italic"}this.searchResults.classList.add("show")}highlightSearchTerm(t,e){if(!e.trim())return t;let r=new RegExp(`(${e.replace(/[.*+?^${}()|[\\]\\]/g,"\\$&")})`,"gi");return t.replace(r,'$1')}navigateSearchResults(t){let e=this.searchResults.querySelectorAll(".csv-search-result-item[data-index]");if(e.length===0)return;e.forEach(a=>a.classList.remove("csv-search-result-hover")),this.currentSearchIndex=Math.max(0,Math.min(e.length-1,this.currentSearchIndex+t));let r=e[this.currentSearchIndex];r&&(r.classList.add("csv-search-result-hover"),r.scrollIntoView({block:"nearest"}))}selectCurrentSearchResult(){if(this.currentSearchIndex>=0&&this.currentSearchIndex{let h=M.createEl("th",{cls:"csv-col-number",attr:{style:`width: ${e[m]||100}px`,draggable:"true"}});if(h.textContent=Z(m),h.onclick=v=>{v.stopPropagation(),q(m)},j){let v=(f==null?void 0:f.has(m))||!1,E=h.createEl("button",{cls:`csv-pin-btn csv-pin-col ${v?"pinned":""}`,attr:{title:v?"Unpin column":"Pin column"}});(0,Be.setIcon)(E,v?"pin-off":"pin"),E.onclick=I=>{I.stopPropagation(),j(m)}}if(h.ondragstart=v=>{var E;(E=v.dataTransfer)==null||E.setData("text/col-index",String(m)),h.classList.add("dragging"),Q("col",m),typeof S=="function"&&S()},h.ondragend=()=>{h.classList.remove("dragging"),Q(null,null),typeof S=="function"&&S()},h.ondragover=v=>{v.preventDefault(),h.classList.add("drag-over")},h.ondragleave=()=>{h.classList.remove("drag-over")},h.ondrop=v=>{var y;v.preventDefault(),h.classList.remove("drag-over"),Q(null,null);let E=Number((y=v.dataTransfer)==null?void 0:y.getData("text/col-index")),I=m;n&&E!==I&&n(E,I)},B.type!=="col"){let v=h.createEl("button",{cls:"csv-insert-col-btn left"});v.innerText="+",v.title=O.t("buttons.insertColBefore")||"Insert column before",v.onclick=y=>{y.stopPropagation(),w.insertColAt(m,!1)};let E=h.createEl("button",{cls:"csv-insert-col-btn right"});E.innerText="+",E.title=O.t("buttons.insertColAfter")||"Insert column after",E.onclick=y=>{y.stopPropagation(),w.insertColAt(m,!0)};let I=h.createEl("button",{cls:"csv-del-col-btn"});I.innerText="-",I.title=O.t("buttons.deleteColumn")||"Delete column",I.onclick=y=>{y.stopPropagation(),w.deleteColAt(m)}}if(B.type==="col"&&B.index!==null){let v=Math.max(0,B.index-2),E=Math.min(t[0].length-1,B.index+2);m>=v&&m<=E&&h.classList.add("csv-dragging-highlight")}let T=h.createEl("div",{cls:"resize-handle"});H(T,m)});let k=a.createEl("tbody");for(let d=0;d{v.stopPropagation(),R(d)},x){let v=(g==null?void 0:g.has(d))||!1,E=T.createEl("button",{cls:`csv-pin-btn csv-pin-row ${v?"pinned":""}`,attr:{title:v?"Unpin row":"Pin row"}});(0,Be.setIcon)(E,v?"pin-off":"pin"),E.onclick=I=>{I.stopPropagation(),x(d)}}if(T.ondragstart=v=>{var E;(E=v.dataTransfer)==null||E.setData("text/row-index",String(d)),T.classList.add("dragging"),Q("row",d),typeof S=="function"&&S()},T.ondragend=()=>{T.classList.remove("dragging"),Q(null,null),typeof S=="function"&&S()},T.ondragover=v=>{v.preventDefault(),T.classList.add("drag-over")},T.ondragleave=()=>{T.classList.remove("drag-over")},T.ondrop=v=>{var y;v.preventDefault(),T.classList.remove("drag-over"),Q(null,null);let E=Number((y=v.dataTransfer)==null?void 0:y.getData("text/row-index")),I=d;l&&E!==I&&l(E,I)},B.type!=="row"){let v=T.createEl("button",{cls:"csv-insert-row-btn above"});v.innerText="+",v.title=O.t("buttons.insertRowBefore")||"Insert row before",v.onclick=y=>{y.stopPropagation(),w.insertRowAt(d,!1)};let E=T.createEl("button",{cls:"csv-insert-row-btn below"});E.innerText="+",E.title=O.t("buttons.insertRowAfter")||"Insert row after",E.onclick=y=>{y.stopPropagation(),w.insertRowAt(d,!0)};let I=T.createEl("button",{cls:"csv-del-row-btn"});I.innerText="-",I.title=O.t("buttons.deleteRow")||"Delete row",I.onclick=y=>{y.stopPropagation(),w.deleteRowAt(d)}}if(B.type==="row"&&B.index!==null){let v=Math.max(0,B.index-2),E=Math.min(t.length-1,B.index+2);d>=v&&d<=E&&(T.classList.add("csv-dragging-highlight"),Array.from(h.children).forEach(I=>{I.classList.add("csv-dragging-highlight")}))}m.forEach((v,E)=>{let y=h.createEl("td",{attr:{style:`width: ${e[E]||100}px`}}).createEl("input",{cls:"csv-cell-input",attr:{value:v}});$(y),y.oninput=L=>{L.currentTarget instanceof HTMLInputElement&&(b(),t[d][E]=L.currentTarget.value,p===L.currentTarget&&o&&(o.value=L.currentTarget.value),i&&i(d,E,L.currentTarget),S(),r&&C(L.currentTarget))},y.onfocus=L=>{u(d,E,L.currentTarget)}})}let J=()=>{a.querySelectorAll(".csv-col-number.active, .csv-row-number.active").forEach(m=>m.classList.remove("active"))};document.addEventListener("click",d=>{let m=d.target;(m==null?void 0:m.closest(".csv-col-number, .csv-row-number"))||J()})}var ke=class{constructor(t){this.selectedRow=-1;this.selectedCol=-1;this.tableEl=t}selectRow(t){if(console.log("[HighlightManager] selectRow called with index:",t),this.selectedRow===t){this.clearSelection();return}this.clearSelection(),this.selectedRow=t,this.highlightRow(t)}selectColumn(t){if(console.log("[HighlightManager] selectColumn called with index:",t),this.selectedCol===t){this.clearSelection();return}this.clearSelection(),this.selectedCol=t,this.highlightColumn(t)}clearSelection(){console.log("[HighlightManager] clearSelection called"),this.selectedRow=-1,this.selectedCol=-1,this.clearHighlight()}getSelectedRow(){return this.selectedRow}getSelectedCol(){return this.selectedCol}setTableEl(t){this.tableEl=t}highlightRow(t){var a;console.log("[HighlightManager] highlightRow called with index:",t);let e=(a=this.tableEl)==null?void 0:a.querySelectorAll("tbody tr");console.log("[HighlightManager] \u627E\u5230\u7684tbody\u884C\u6570:",e==null?void 0:e.length);let r=t;e&&e[r]?(console.log("[HighlightManager] \u9AD8\u4EAE\u76EE\u6807\u884C:",e[r]),e[r].classList.add("csv-row-selected")):console.log("[HighlightManager] \u672A\u627E\u5230\u76EE\u6807\u884C\uFF0CrowIndex:",t,"targetRowIndex:",r)}highlightColumn(t){var r;console.log("[HighlightManager] highlightColumn called with index:",t);let e=(r=this.tableEl)==null?void 0:r.querySelectorAll(`th:nth-child(${t+2}), td:nth-child(${t+2})`);console.log("[HighlightManager] \u627E\u5230\u7684\u5217\u5355\u5143\u683C\u6570:",e==null?void 0:e.length),e&&console.log("[HighlightManager] \u5217\u5355\u5143\u683C:",e),e==null||e.forEach(a=>{a instanceof HTMLElement&&a.classList.add("csv-col-selected")})}clearHighlight(){var e;console.log("[HighlightManager] clearHighlight called");let t=(e=this.tableEl)==null?void 0:e.querySelectorAll(".csv-row-selected, .csv-col-selected");console.log("[HighlightManager] \u6E05\u9664\u9AD8\u4EAE\u5143\u7D20\u6570:",t==null?void 0:t.length),t==null||t.forEach(r=>{r instanceof HTMLElement&&(r.classList.remove("csv-row-selected"),r.classList.remove("csv-col-selected"))})}};var Fe=class{constructor(){this.menuEl=null;this.outsideHandler=null;this.keyHandler=null}showMenu(t,e,r,a){this.closeMenu(),this.menuEl=document.createElement("div"),this.menuEl.className="csv-header-context-menu menu",Object.assign(this.menuEl.style,{position:"absolute",left:`${e}px`,top:`${r}px`,zIndex:"9999",minWidth:"160px"}),t.forEach(o=>{let p=document.createElement("div");p.className="menu-item csv-header-context-menu-item",p.textContent=O.t(o.label)||o.label,Object.assign(p.style,{padding:"6px 18px",cursor:"pointer"}),p.onclick=s=>{s.stopPropagation(),s.preventDefault(),this.closeMenu(),o.onClick()},p.onmouseenter=()=>p.classList.add("is-hovered"),p.onmouseleave=()=>p.classList.remove("is-hovered"),this.menuEl.appendChild(p)}),document.body.appendChild(this.menuEl),this.outsideHandler=o=>{this.menuEl&&!this.menuEl.contains(o.target)&&this.closeMenu(a)},this.keyHandler=o=>{o.key==="Escape"&&this.closeMenu(a)},setTimeout(()=>{document.addEventListener("mousedown",this.outsideHandler),document.addEventListener("keydown",this.keyHandler)},0)}closeMenu(t){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),document.removeEventListener("mousedown",this.outsideHandler),document.removeEventListener("keydown",this.keyHandler),t&&t()}};function Xe(w,t){let e=new Fe,r=a=>{let o=a.target;if(o.classList.contains("csv-row-number")){a.preventDefault();let p=o.closest("tr");if(!p)return;let c=Array.from(p.parentElement.children).indexOf(p);t.selectRow&&t.selectRow(c);let u=[{label:"contextMenu.insertRowAbove",onClick:()=>t.onInsertRowAbove(c)},{label:"contextMenu.insertRowBelow",onClick:()=>t.onInsertRowBelow(c)},{label:"contextMenu.deleteRow",onClick:()=>t.onDeleteRow(c)},{label:"contextMenu.moveRowUp",onClick:()=>t.onMoveRowUp(c)},{label:"contextMenu.moveRowDown",onClick:()=>t.onMoveRowDown(c)}];e.showMenu(u,a.pageX,a.pageY,()=>{t.clearSelection&&t.clearSelection(),t.onMenuClose&&t.onMenuClose()})}else if(o.classList.contains("csv-col-number")){a.preventDefault();let s=Array.from(w.querySelectorAll(".csv-col-number")).indexOf(o);t.selectColumn&&t.selectColumn(s);let c=[{label:"contextMenu.insertColLeft",onClick:()=>t.onInsertColLeft(s)},{label:"contextMenu.insertColRight",onClick:()=>t.onInsertColRight(s)},{label:"contextMenu.deleteCol",onClick:()=>t.onDeleteCol(s)},{label:"contextMenu.moveColLeft",onClick:()=>t.onMoveColLeft(s)},{label:"contextMenu.moveColRight",onClick:()=>t.onMoveColRight(s)}];e.showMenu(c,a.pageX,a.pageY,()=>{t.clearSelection&&t.clearSelection(),t.onMenuClose&&t.onMenuClose()})}};return w.addEventListener("contextmenu",r),()=>{w.removeEventListener("contextmenu",r),e.closeMenu()}}var Le="csv-view",xe=class extends ne.TextFileView{constructor(e){super(e);this.tableData=[[""]];this.maxHistorySize=50;this.columnWidths=[];this.autoResize=!0;this.delimiter="auto";this.quoteChar='"';this.originalFileDelimiter=null;this.activeCellEl=null;this.activeRowIndex=-1;this.activeColIndex=-1;this.searchMatches=[];this.currentSearchIndex=-1;this.isSourceMode=!1;this.sourceTextarea=null;this.sourceCursorPos={start:0,end:0};this.headerContextMenuCleanup=null;this.stickyRows=new Set;this.stickyColumns=new Set;this.stickyHeaders=!0;this.stickyRowNumbers=!0;this.historyManager=new we(void 0,this.maxHistorySize),this.file=this.file,this.headerEl=this.headerEl,this.setupSafeSave()}getIcon(){return"table"}getViewData(){let e=this.originalFileDelimiter||(this.delimiter==="auto"?void 0:this.delimiter);return ue.unparseCSV(this.tableData,e?{delimiter:e}:void 0)}setupSafeSave(){this.originalRequestSave=this.requestSave,this.requestSave=async()=>{try{await Ce.withRetry(async()=>(this.originalRequestSave(),Promise.resolve()))}catch(e){console.error("Failed to save CSV file after retries:",e),new ne.Notice(`Failed to save file: ${e.message}. The file might be open in another program.`)}}}setViewData(e,r){try{if(this.tableData=ue.parseCSV(e,{delimiter:this.delimiter,quoteChar:this.quoteChar}),!this.originalFileDelimiter)try{this.originalFileDelimiter=ue.detectDelimiter(e,this.quoteChar)}catch(a){console.warn("Failed to detect original delimiter:",a)}(!this.tableData||this.tableData.length===0)&&(this.tableData=[[""]]),this.tableData=ue.normalizeTableData(this.tableData),r&&this.historyManager.reset(this.tableData),this.refresh()}catch(a){console.error("CSV\u5904\u7406\u9519\u8BEF:",a),this.tableData=[[""]],r&&this.historyManager.reset(this.tableData),this.refresh()}}reparseAndRefresh(){let e=this.data;this.setViewData(e,!1)}refresh(){var o,p;if(!this.contentEl)return;this.contentEl.querySelectorAll(".csv-source-mode").forEach(s=>s.remove()),(!this.tableData||!Array.isArray(this.tableData)||this.tableData.length===0)&&(console.warn("Table data not properly initialized, setting default"),this.tableData=[[""]]);let e=(s,c,u)=>{Se({editBarEl:this.editBarEl,editInput:this.editInput,activeCellEl:u,activeRowIndex:s,activeColIndex:c,tableData:this.tableData,onEdit:(b,S,$)=>{this.saveSnapshot(),this.tableData[b][S]=$,this.requestSave()}})};Je({tableData:this.tableData,columnWidths:this.columnWidths,autoResize:this.autoResize,tableEl:this.tableEl,editInput:this.editInput,activeCellEl:this.activeCellEl,activeRowIndex:this.activeRowIndex,activeColIndex:this.activeColIndex,setActiveCell:(s,c,u)=>{this.setActiveCell(s,c,u),e(s,c,u)},saveSnapshot:()=>this.saveSnapshot(),requestSave:()=>this.requestSave(),setupAutoResize:s=>this.setupAutoResize(s),adjustInputHeight:s=>this.adjustInputHeight(s),selectRow:s=>this.highlightManager.selectRow(s),selectColumn:s=>this.highlightManager.selectColumn(s),getColumnLabel:s=>this.getColumnLabel(s),setupColumnResize:(s,c)=>this.setupColumnResize(s,c),insertRowAt:(s,c=!1)=>{this.saveSnapshot();let u=c?s+1:s;this.tableData.splice(u,0,Array(this.tableData[0].length).fill("")),this.refresh(),this.requestSave()},deleteRowAt:s=>{this.tableData.length<=1||(this.saveSnapshot(),this.tableData.splice(s,1),this.refresh(),this.requestSave())},insertColAt:(s,c=!1)=>{this.saveSnapshot();let u=c?s+1:s;this.tableData.forEach(b=>b.splice(u,0,"")),this.refresh(),this.requestSave()},deleteColAt:s=>{this.tableData[0].length<=1||(this.saveSnapshot(),this.tableData.forEach(c=>c.splice(s,1)),this.refresh(),this.requestSave())},renderEditBar:e,onColumnReorder:(s,c)=>{if(s!==c){this.saveSnapshot();for(let u of this.tableData){let[b]=u.splice(s,1);u.splice(c,0,b)}if(this.columnWidths&&this.columnWidths.length>0){let[u]=this.columnWidths.splice(s,1);this.columnWidths.splice(c,0,u)}this.refresh(),this.requestSave()}},onRowReorder:(s,c)=>{if(s===c)return;this.saveSnapshot();let[u]=this.tableData.splice(s,1);this.tableData.splice(c,0,u),this.refresh(),this.requestSave()},stickyRows:this.stickyRows,stickyColumns:this.stickyColumns,toggleRowSticky:s=>this.toggleRowSticky(s),toggleColumnSticky:s=>this.toggleColumnSticky(s)}),requestAnimationFrame(()=>{this.applyStickyStyles()});let r=(p=(o=this.operationEl)==null?void 0:o.querySelector)==null?void 0:p.call(o,".top-scroll");if(r&&this.tableEl){let s=this.tableEl.offsetWidth,c=()=>{let u=document.createElement("div");return u.style.width=s+"px",u.style.height="1px",u};r.empty(),r.appendChild(c())}let a=this.tableEl.parentElement;if(a){this._csvTableClickHandler&&a.removeEventListener("click",this._csvTableClickHandler);let s=c=>{let u=c.target;u.tagName==="TH"&&u.classList.contains("csv-col-number")||u.tagName==="TD"&&u.classList.contains("csv-row-number")||this.highlightManager.clearSelection()};this._csvTableClickHandler=s,a.addEventListener("click",s)}this.headerContextMenuCleanup&&(this.headerContextMenuCleanup(),this.headerContextMenuCleanup=null),this.headerContextMenuCleanup=Xe(this.tableEl,{selectRow:s=>this.highlightManager.selectRow(s),selectColumn:s=>this.highlightManager.selectColumn(s),clearSelection:()=>this.highlightManager.clearSelection(),onMenuClose:()=>{console.log("[DEBUG] Header context menu closed")},onInsertRowAbove:s=>this.refreshInsertRow(s,!1),onInsertRowBelow:s=>this.refreshInsertRow(s,!0),onDeleteRow:s=>this.refreshDeleteRow(s),onMoveRowUp:s=>this.moveRow(s,s-1),onMoveRowDown:s=>this.moveRow(s,s+1),onInsertColLeft:s=>this.refreshInsertCol(s,!1),onInsertColRight:s=>this.refreshInsertCol(s,!0),onDeleteCol:s=>this.refreshDeleteCol(s),onMoveColLeft:s=>this.moveCol(s,s-1),onMoveColRight:s=>this.moveCol(s,s+1)}),this.tableData[0].forEach((s,c)=>{let u=this.tableEl.querySelector(`.resize-handle[data-index='${c}']`);u&&this.setupColumnResize(u,c)}),this.tableData.forEach((s,c)=>{let u=this.tableEl.querySelector(`.resize-handle-row[data-row-index='${c}']`);u&&this.setupColumnResize(u,c)})}getColumnLabel(e){let r="",a=e;do r=String.fromCharCode(65+a%26)+r,a=Math.floor(a/26)-1;while(a>=0);return r}setActiveCell(e,r,a){this.activeCellEl&&this.activeCellEl.parentElement&&this.activeCellEl.parentElement.classList.remove("csv-active-cell"),this.activeRowIndex=e,this.activeColIndex=r,this.activeCellEl=a,a.parentElement&&a.parentElement.classList.add("csv-active-cell"),this.editInput&&this.editBarEl&&Se({editBarEl:this.editBarEl,editInput:this.editInput,activeCellEl:a,activeRowIndex:e,activeColIndex:r,tableData:this.tableData,onEdit:(o,p,s)=>{this.saveSnapshot(),this.tableData[o][p]=s,this.requestSave()}})}setupColumnResize(e,r){let a,o,p=u=>{a=u.clientX,o=this.columnWidths[r]||100,document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),u.preventDefault()},s=u=>{let b=o+(u.clientX-a);b>=50&&(this.columnWidths[r]=b,this.refresh())},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)};e.addEventListener("mousedown",p)}setupAutoResize(e){this.adjustInputHeight(e),e.addEventListener("input",()=>{this.autoResize&&this.adjustInputHeight(e)})}adjustInputHeight(e){let r=(e.value.match(/\n/g)||[]).length+1,p=Math.max(24,r*20);e.style.height=`${p}px`}saveSnapshot(){this.historyManager.push(this.tableData)}undo(){let e=this.historyManager.undo();e&&(this.tableData=e,this.refresh(),this.requestSave())}redo(){let e=this.historyManager.redo();e&&(this.tableData=e,this.refresh(),this.requestSave())}clear(){this.tableData=[[""]],this.historyManager.reset(this.tableData),this.refresh()}getViewType(){return Le}async onOpen(){var e,r;try{let a=(r=(e=this.headerEl)==null?void 0:e.querySelector)==null?void 0:r.call(e,".view-actions");if(a&&!a.querySelector(".csv-switch-source")){let C=document.createElement("button");C.className="clickable-icon csv-switch-source",C.setAttribute("aria-label","\u5207\u6362\u5230\u6E90\u7801\u6A21\u5F0F"),C.innerHTML='',C.onclick=async()=>{let R=this.file;if(!R)return;let q=this.app.workspace.getLeavesOfType("csv-source-view"),Z=!1;for(let H of q)if(H.view&&H.view.file&&H.view.file.path===R.path){this.app.workspace.setActiveLeaf(H,!0,!0),Z=!0;break}if(!Z){let H=this.app.workspace.getLeaf(!0);await H.openFile(R,{active:!0,state:{mode:"source"}}),await H.setViewState({type:"csv-source-view",active:!0,state:{file:R.path}}),this.app.workspace.setActiveLeaf(H,!0,!0)}},a.appendChild(C)}this.contentEl.empty(),this.operationEl=this.contentEl.createEl("div",{cls:"csv-operations"});let o=this.operationEl.createEl("div",{cls:"csv-parser-settings"});new ne.Setting(o).setName(O.t("settings.fieldSeparator")).setDesc(O.t("settings.fieldSeparatorDesc")).addDropdown(C=>{var q,Z;try{let H=(Z=(q=this.app.plugins)==null?void 0:q.getPlugin)==null?void 0:Z.call(q,"csv-lite");H&&H.settings&&H.settings.preferredDelimiter&&(this.delimiter=H.settings.preferredDelimiter)}catch(H){}let R=ue.detectDelimiter(this.data||"",this.quoteChar);C.addOption("auto",`Auto (detected: ${R})`),C.addOption(",",","),C.addOption(";",";"),C.setValue(this.delimiter||"auto"),C.onChange(async H=>{var ie,oe;this.delimiter=H==="\\t"?" ":H;try{let N=(oe=(ie=this.app.plugins)==null?void 0:ie.getPlugin)==null?void 0:oe.call(ie,"csv-lite");N&&typeof N.saveSettings=="function"&&(N.settings={...N.settings||{},preferredDelimiter:this.delimiter},await N.saveSettings())}catch(N){}this.reparseAndRefresh()})}),new ne.Setting(o).setName(O.t("settings.quoteChar")).setDesc(O.t("settings.quoteCharDesc")).addText(C=>{C.setValue(this.quoteChar).setPlaceholder('\u9ED8\u8BA4\u4E3A\u53CC\u5F15\u53F7 "').onChange(async R=>{this.quoteChar=R||'"',this.reparseAndRefresh()})});let p=this.operationEl.createEl("div",{cls:"csv-operation-buttons"}),s=p.createEl("div",{cls:"csv-buttons-group"}),c=p.createEl("div",{cls:"csv-search-bar-container"});this.searchBar=new Re(c,{getTableData:()=>this.tableData,tableEl:this.tableEl,getColumnLabel:C=>this.getColumnLabel(C),getCellAddress:(C,R)=>this.getCellAddress(C,R),jumpToCell:(C,R)=>this.jumpToCell(C,R),clearSearchHighlights:()=>this.clearSearchHighlights()}),new ne.ButtonComponent(s).setButtonText(O.t("buttons.undo")).setIcon("undo").onClick(()=>this.undo()),new ne.ButtonComponent(s).setButtonText(O.t("buttons.redo")).setIcon("redo").onClick(()=>this.redo()),new ne.ButtonComponent(s).setButtonText(O.t("buttons.resetColumnWidth")).onClick(()=>{this.columnWidths=[],this.calculateColumnWidths(),this.refresh()});let u=s.createEl("div",{cls:"csv-delimiter-compact"});new ne.Setting(u).addDropdown(C=>{var q,Z;try{let H=(Z=(q=this.app.plugins)==null?void 0:q.getPlugin)==null?void 0:Z.call(q,"csv-lite");H&&H.settings&&H.settings.preferredDelimiter&&(this.delimiter=H.settings.preferredDelimiter)}catch(H){}let R=ue.detectDelimiter(this.data||"",this.quoteChar);C.addOption("auto",`Auto (${R})`),C.addOption(",",","),C.addOption(";",";"),C.setValue(this.delimiter||"auto"),C.onChange(async H=>{var ie,oe;this.delimiter=H==="\\t"?" ":H;try{let N=(oe=(ie=this.app.plugins)==null?void 0:ie.getPlugin)==null?void 0:oe.call(ie,"csv-lite");N&&typeof N.saveSettings=="function"&&(N.settings={...N.settings||{},preferredDelimiter:this.delimiter},await N.saveSettings())}catch(N){}this.reparseAndRefresh()})}),this.editBarEl=this.operationEl.createEl("div",{cls:"csv-edit-bar"}),this.editInput=this.editBarEl.createEl("input",{cls:"csv-edit-input",attr:{placeholder:O.t("editBar.placeholder")}}),Se({editBarEl:this.editBarEl,editInput:this.editInput,activeCellEl:this.activeCellEl,activeRowIndex:this.activeRowIndex,activeColIndex:this.activeColIndex,tableData:this.tableData,onEdit:(C,R,q)=>{this.saveSnapshot(),this.tableData[C][R]=q,this.requestSave()}});let b=this.operationEl.createEl("div",{cls:"scroll-container top-scroll"}),$=this.contentEl.createEl("div",{cls:"table-wrapper"}).createEl("div",{cls:"table-container main-scroll"});this.tableEl=$.createEl("table",{cls:"csv-lite-table"}),this.highlightManager=new ke(this.tableEl),this.setupScrollSync(b,$),this.historyManager||(this.historyManager=new we(this.tableData,this.maxHistorySize)),this.registerDomEvent(document,"keydown",C=>{(C.ctrlKey||C.metaKey)&&C.key==="z"&&(C.shiftKey?(C.preventDefault(),this.redo()):(C.preventDefault(),this.undo()))}),(!this.tableData||!Array.isArray(this.tableData)||this.tableData.length===0)&&(this.tableData=[[""]]),this.refresh(),this.tableEl&&this.tableEl.addEventListener("click",C=>{let R=C.target;R.tagName==="TH"&&(R.classList.contains("csv-row-header")||R.classList.contains("csv-col-header"))||this.highlightManager.clearSelection()}),this.operationEl.classList.add("csv-toolbar-sticky")}catch(a){console.error("Error in onOpen:",a),new ne.Notice(`Failed to open CSV view: ${a.message}`),this.contentEl.empty();let o=this.contentEl.createEl("div",{cls:"csv-error"});o.createEl("h3",{text:"Error opening CSV file"}),o.createEl("p",{text:a.message}),this.tableData=[[""]],this.tableEl=this.contentEl.createEl("table"),this.refresh()}}setTableContent(e){this.tableData=e,this.refresh()}getTableContent(){return this.tableData}calculateColumnWidths(){this.columnWidths=ae.calculateColumnWidths(this.tableData)}setupScrollSync(e,r){r.addEventListener("scroll",()=>{e.scrollLeft=r.scrollLeft}),e.addEventListener("scroll",()=>{r.scrollLeft=e.scrollLeft})}async onClose(){let e=document.head.querySelector("#csv-edit-bar-styles");e&&e.remove(),this.headerContextMenuCleanup&&(this.headerContextMenuCleanup(),this.headerContextMenuCleanup=null),this.contentEl.empty()}addRow(){this.saveSnapshot(),this.tableData=ae.addRow(this.tableData),this.refresh(),this.requestSave()}deleteRow(){this.saveSnapshot(),this.tableData=ae.deleteRow(this.tableData),this.refresh(),this.requestSave()}addColumn(){this.saveSnapshot(),this.tableData=ae.addColumn(this.tableData),this.refresh(),this.requestSave()}deleteColumn(){this.saveSnapshot(),this.tableData=ae.deleteColumn(this.tableData),this.refresh(),this.requestSave()}getCellAddress(e,r){return`${this.getColumnLabel(r)}${e+1}`}jumpToCell(e,r){var p;this.clearSearchHighlights();let a=(p=this.tableEl)==null?void 0:p.querySelectorAll("tr"),o=e===0?1:e+1;if(a&&o{S.focus(),S.select(),S.parentElement&&(S.parentElement.classList.add("csv-search-current"),setTimeout(()=>{S.parentElement&&S.parentElement.classList.remove("csv-search-current")},3e3))},100))}}}clearSearchHighlights(){var e;(e=this.tableEl)==null||e.querySelectorAll(".csv-search-current").forEach(r=>{r instanceof HTMLElement&&r.classList.remove("csv-search-current")})}async openSourceMode(){let e=this.file;if(!e)return;let r=this.app.workspace.getLeaf(!0);await r.openFile(e,{active:!0,state:{mode:"source"}}),await r.setViewState({type:"csv-source-view",active:!0,state:{file:e.path}}),this.leaf.detach()}moveRow(e,r){if(e<0||r<0||e>=this.tableData.length||r>=this.tableData.length)return;this.saveSnapshot();let a=this.tableData.splice(e,1)[0];this.tableData.splice(r,0,a),this.refresh(),this.requestSave()}toggleRowSticky(e){this.stickyRows.has(e)?this.stickyRows.delete(e):this.stickyRows.add(e),this.applyStickyStyles()}toggleColumnSticky(e){this.stickyColumns.has(e)?this.stickyColumns.delete(e):this.stickyColumns.add(e),this.applyStickyStyles()}applyStickyStyles(){if(!this.tableEl)return;this.tableEl.querySelectorAll(".csv-sticky-row, .csv-sticky-col, .csv-sticky-header, .csv-sticky-row-number").forEach(s=>{s.classList.remove("csv-sticky-row","csv-sticky-col","csv-sticky-header","csv-sticky-row-number"),s.style.removeProperty("left"),s.style.removeProperty("top")});let e=()=>{let s=this.tableEl.querySelector("tbody tr td:first-child");return s?s.offsetWidth:40},r=()=>{let s=this.tableEl.querySelector("thead tr");return s?s.offsetHeight:30},a=s=>{let c=e();for(let u=0;u{let c=r();for(let u=0;u{c.classList.add("csv-sticky-header"),c.style.top="0px"}),this.stickyRowNumbers){let s=e(),c=this.tableEl.querySelector("thead tr th:first-child");c&&(c.classList.add("csv-sticky-row-number"),c.style.left="0px",c.style.top="0px"),this.tableEl.querySelectorAll("tbody tr td:first-child").forEach(b=>{b.classList.add("csv-sticky-row-number"),b.style.left="0px"})}let p=r();this.stickyRows.forEach(s=>{let c=o(s);this.tableEl.querySelectorAll(`tbody tr:nth-child(${s+1}) td`).forEach(b=>{b.classList.add("csv-sticky-row"),b.style.top=`${c}px`})}),this.stickyColumns.forEach(s=>{let c=a(s),u=this.tableEl.querySelector(`thead tr th:nth-child(${s+2})`);u&&(u.classList.add("csv-sticky-col"),u.style.left=`${c}px`,u.style.top="0px"),this.tableEl.querySelectorAll(`tbody tr td:nth-child(${s+2})`).forEach(S=>{S.classList.add("csv-sticky-col"),S.style.left=`${c}px`})}),console.log("Applied sticky styles:",{stickyHeaders:this.stickyHeaders,stickyRowNumbers:this.stickyRowNumbers,stickyRows:Array.from(this.stickyRows),stickyColumns:Array.from(this.stickyColumns),rowNumberWidth:e(),headerHeight:r()})}moveCol(e,r){e<0||r<0||e>=this.tableData[0].length||r>=this.tableData[0].length||(this.saveSnapshot(),this.tableData.forEach(a=>{let o=a.splice(e,1)[0];a.splice(r,0,o)}),this.refresh(),this.requestSave())}refreshInsertRow(e,r){this.saveSnapshot();let a=r?e+1:e;this.tableData.splice(a,0,Array(this.tableData[0].length).fill("")),this.refresh(),this.requestSave()}refreshDeleteRow(e){this.tableData.length<=1||(this.saveSnapshot(),this.tableData.splice(e,1),this.refresh(),this.requestSave())}refreshInsertCol(e,r){this.saveSnapshot();let a=r?e+1:e;this.tableData.forEach(o=>o.splice(a,0,"")),this.refresh(),this.requestSave()}refreshDeleteCol(e){this.tableData[0].length<=1||(this.saveSnapshot(),this.tableData.forEach(r=>r.splice(e,1)),this.refresh(),this.requestSave())}};var Ze=require("obsidian"),Te=require("@codemirror/state"),se=require("@codemirror/view"),ge=require("@codemirror/commands"),Ve="csv-source-view",ct=se.ViewPlugin.fromClass(class{constructor(w){this.decorations=Ge(w)}update(w){(w.docChanged||w.viewportChanged)&&(this.decorations=Ge(w.view))}},{decorations:w=>w.decorations});function Ge(w){let t=new Te.RangeSetBuilder,e=/[;, ]/g;for(let{from:r,to:a}of w.visibleRanges){let o=w.state.doc.sliceString(r,a),p;for(;(p=e.exec(o))!==null;){let s=r+p.index;t.add(s,s+1,se.Decoration.mark({class:"csv-separator-highlight"}))}}return t.finish()}var Me=class extends Ze.TextFileView{constructor(e){super(e);this.file=this.file,this.headerEl=this.headerEl}getViewType(){return Ve}getDisplayText(){return this.file?`CSV source: ${this.file.basename}`:"CSV source"}getIcon(){return"file-code"}async onOpen(){var c,u;let e=(u=(c=this.headerEl)==null?void 0:c.querySelector)==null?void 0:u.call(c,".view-actions");if(e&&!e.querySelector(".csv-switch-table")){let b=document.createElement("button");b.className="clickable-icon csv-switch-table",b.setAttribute("aria-label","\u5207\u6362\u5230\u8868\u683C\u6A21\u5F0F"),b.innerHTML='',b.onclick=async()=>{let S=this.file;if(!S)return;let $=this.app.workspace.getLeavesOfType("csv-view"),C=!1;for(let R of $)if(R.view&&R.view.file&&R.view.file.path===S.path){this.app.workspace.setActiveLeaf(R,!0,!0),C=!0;break}if(!C){let R=this.app.workspace.getLeaf(!0);await R.openFile(S,{active:!0}),await R.setViewState({type:"csv-view",active:!0,state:{file:S.path}}),this.app.workspace.setActiveLeaf(R,!0,!0)}},e.appendChild(b)}let r=this.containerEl.children[1];r.empty();let o=r.createDiv({cls:"csv-source-editor-container"}).createDiv({cls:"csv-source-cm-container"}),p=[(0,se.lineNumbers)(),(0,se.drawSelection)(),(0,ge.history)(),se.keymap.of([...ge.defaultKeymap,...ge.historyKeymap]),ct,(0,se.placeholder)("\u8F93\u5165 CSV \u6E90\u7801..."),se.EditorView.lineWrapping,se.EditorView.updateListener.of(b=>{b.docChanged&&this.save()})],s=Te.EditorState.create({doc:this.data||"",extensions:p});this.editor=new se.EditorView({state:s,parent:o}),this.addEditorStyles(),setTimeout(()=>this.editor.focus(),10)}addToolbarButton(e,r,a,o,p){e.createEl("button",{text:r,cls:"csv-source-button",attr:{"aria-label":o}}).addEventListener("click",p)}addEditorStyles(){let e=document.createElement("style");e.textContent=` +`);var R=0,X=!1;this.parse=function(f,w,d){if(typeof f!="string")throw new Error("Input must be a string");var _=f.length,v=a.length,C=l.length,A=m.length,b=N(g),O=[],B=[],I=[],S=R=0;if(!f)return te();if(Q||Q!==!1&&f.indexOf(M)===-1){for(var U=f.split(l),H=0;H=L)return te(!0);break}B.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:R}),F++}}else if(m&&I.length===0&&f.substring(R,R+A)===m){if(T===-1)return te();R=T+C,T=f.indexOf(l,R),q=f.indexOf(a,R)}else if(q!==-1&&(q=L)return te(!0)}return le();function J(G){O.push(G),S=R}function fe(G){var re=0;return re=G!==-1&&(G=f.substring(F+1,G))&&G.trim()===""?G.length:re}function le(G){return d||(G===void 0&&(G=f.substring(R)),I.push(G),R=_,J(I),b&&ce()),te()}function be(G){R=G,J(I),I=[],T=f.indexOf(l,R)}function te(G){if(i.header&&!w&&O.length&&!Y){var re=O[0],de={},Ae=new Set(re);let We=!1;for(let ge=0;gem.charCodeAt(0)!==65279?m:m.slice(1))(i),l=new(a.download?h:x)(a)):i.readable===!0&&N(i.read)&&N(i.on)?l=new $(a):(e.File&&i instanceof File||i instanceof Object)&&(l=new E(a)),l.stream(i);(l=(()=>{var m;return!!s.WORKERS_SUPPORTED&&(m=(()=>{var g=e.URL||e.webkitURL||null,L=p.toString();return s.BLOB_URL||(s.BLOB_URL=g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",L,")();"],{type:"text/javascript"})))})(),(m=new e.Worker(m)).onmessage=ee,m.id=u++,o[m.id]=m)})()).userStep=a.step,l.userChunk=a.chunk,l.userComplete=a.complete,l.userError=a.error,a.step=N(a.step),a.chunk=N(a.chunk),a.complete=N(a.complete),a.error=N(a.error),delete a.worker,l.postMessage({input:i,config:a,workerId:l.id})},s.unparse=function(i,a){var l=!1,m=!0,g=",",L=`\r +`,Q='"',V=Q+Q,Y=!1,M=null,K=!1,R=((()=>{if(typeof a=="object"){if(typeof a.delimiter!="string"||s.BAD_DELIMITERS.filter(function(w){return a.delimiter.indexOf(w)!==-1}).length||(g=a.delimiter),typeof a.quotes!="boolean"&&typeof a.quotes!="function"&&!Array.isArray(a.quotes)||(l=a.quotes),typeof a.skipEmptyLines!="boolean"&&typeof a.skipEmptyLines!="string"||(Y=a.skipEmptyLines),typeof a.newline=="string"&&(L=a.newline),typeof a.quoteChar=="string"&&(Q=a.quoteChar),typeof a.header=="boolean"&&(m=a.header),Array.isArray(a.columns)){if(a.columns.length===0)throw new Error("Option columns is empty");M=a.columns}a.escapeChar!==void 0&&(V=a.escapeChar+Q),a.escapeFormulae instanceof RegExp?K=a.escapeFormulae:typeof a.escapeFormulae=="boolean"&&a.escapeFormulae&&(K=/^[=+\-@\t\r].*$/)}})(),new RegExp(D(Q),"g"));if(typeof i=="string"&&(i=JSON.parse(i)),Array.isArray(i)){if(!i.length||Array.isArray(i[0]))return X(null,i,Y);if(typeof i[0]=="object")return X(M||Object.keys(i[0]),i,Y)}else if(typeof i=="object")return typeof i.data=="string"&&(i.data=JSON.parse(i.data)),Array.isArray(i.data)&&(i.fields||(i.fields=i.meta&&i.meta.fields||M),i.fields||(i.fields=Array.isArray(i.data[0])?i.fields:typeof i.data[0]=="object"?Object.keys(i.data[0]):[]),Array.isArray(i.data[0])||typeof i.data[0]=="object"||(i.data=[i.data])),X(i.fields||[],i.data||[],Y);throw new Error("Unable to serialize unrecognized input");function X(w,d,_){var v="",C=(typeof w=="string"&&(w=JSON.parse(w)),typeof d=="string"&&(d=JSON.parse(d)),Array.isArray(w)&&0{for(var b=0;bIe});module.exports=dt(mt);var pe=require("obsidian");var ne=require("obsidian");var Se=ut(Ke()),Fe=require("obsidian");var Qe={buttons:{undo:"\u64A4\u9500",redo:"\u91CD\u505A",addRow:"\u6DFB\u52A0\u884C",deleteRow:"\u5220\u9664\u884C",addColumn:"\u6DFB\u52A0\u5217",deleteColumn:"\u5220\u9664\u5217",resetColumnWidth:"\u91CD\u7F6E\u5217\u5BBD",sourceMode:"\u6E90\u7801\u6A21\u5F0F",tableMode:"\u8868\u683C\u6A21\u5F0F",insertRowBefore:"\u4E0A\u65B9\u63D2\u5165\u884C",insertRowAfter:"\u4E0B\u65B9\u63D2\u5165\u884C"},editBar:{placeholder:"\u7F16\u8F91\u9009\u4E2D\u5355\u5143\u683C..."},csv:{error:"\u9519\u8BEF",parsingFailed:"CSV\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u683C\u5F0F",parseWarning:"CSV\u89E3\u6790\u63D0\u793A:"},settings:{fieldSeparator:"\u5B57\u6BB5\u5206\u9694\u7B26",fieldSeparatorDesc:"\u7528\u4E8E\u5206\u9694\u5B57\u6BB5\u7684\u5B57\u7B26\uFF08\u4F8B\u5982\uFF1A\u9017\u53F7\u3001\u5206\u53F7\u3001\u5236\u8868\u7B26\uFF09",quoteChar:"\u5F15\u53F7\u5B57\u7B26",quoteCharDesc:"\u7528\u4E8E\u5305\u56F4\u542B\u6709\u7279\u6B8A\u5B57\u7B26\u7684\u5B57\u6BB5"},search:{placeholder:"\u641C\u7D22\u8868\u683C\u5185\u5BB9...",noResults:"\u672A\u627E\u5230\u5339\u914D\u7ED3\u679C",moreResults:"\u8FD8\u6709 {count} \u4E2A\u7ED3\u679C...",rowColumn:"\u7B2C{row}\u884C\uFF0C\u7B2C{col}\u5217"},table:{headerRow:"\u8868\u5934\u884C",dataRow:"\u6570\u636E\u884C"},contextMenu:{insertRowAbove:"\u4E0A\u65B9\u63D2\u5165\u884C",insertRowBelow:"\u4E0B\u65B9\u63D2\u5165\u884C",deleteRow:"\u5220\u9664\u672C\u884C",moveRowUp:"\u5411\u4E0A\u79FB\u52A8\u4E00\u884C",moveRowDown:"\u5411\u4E0B\u79FB\u52A8\u4E00\u884C",insertColLeft:"\u5DE6\u4FA7\u63D2\u5165\u5217",insertColRight:"\u53F3\u4FA7\u63D2\u5165\u5217",deleteCol:"\u5220\u9664\u672C\u5217",moveColLeft:"\u5411\u5DE6\u79FB\u52A8\u4E00\u5217",moveColRight:"\u5411\u53F3\u79FB\u52A8\u4E00\u5217",createNewCsv:"\u521B\u5EFA\u65B0 CSV \u6587\u4EF6"},commands:{createNewCsv:"\u521B\u5EFA\u65B0 CSV \u6587\u4EF6",fileExists:"\u6587\u4EF6\u5DF2\u5B58\u5728"},tableMessages:{atLeastOneRow:"\u81F3\u5C11\u9700\u8981\u4FDD\u7559\u4E00\u884C",atLeastOneColumn:"\u81F3\u5C11\u9700\u8981\u4FDD\u7559\u4E00\u5217"},notifications:{undo:"\u5DF2\u64A4\u9500\u4E0A\u4E00\u6B65\u64CD\u4F5C",noMoreUndo:"\u6CA1\u6709\u66F4\u591A\u53EF\u64A4\u9500\u7684\u64CD\u4F5C",redo:"\u5DF2\u91CD\u505A\u64CD\u4F5C",noMoreRedo:"\u6CA1\u6709\u66F4\u591A\u53EF\u91CD\u505A\u7684\u64CD\u4F5C"}};var Ye={buttons:{undo:"Undo",redo:"Redo",addRow:"Add row",deleteRow:"Delete row",addColumn:"Add column",deleteColumn:"Delete column",resetColumnWidth:"Reset column width",sourceMode:"Source Mode",tableMode:"Table Mode"},editBar:{placeholder:"Edit selected cell..."},csv:{error:"Error",parsingFailed:"Failed to parse CSV. Please check file format.",parseWarning:"CSV parse warning:"},settings:{fieldSeparator:"Field Separator",fieldSeparatorDesc:"The character used to separate fields (e.g., comma, semicolon, tab)",quoteChar:"Quote Character",quoteCharDesc:"Character used to enclose fields containing special characters"},search:{placeholder:"Search table content...",noResults:"No matching results found",moreResults:"{count} more results...",rowColumn:"Row {row}, Column {col}"},table:{headerRow:"Header Row",dataRow:"Data Row"},contextMenu:{insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:"Delete this row",moveRowUp:"Move row up",moveRowDown:"Move row down",insertColLeft:"Insert column left",insertColRight:"Insert column right",deleteCol:"Delete this column",moveColLeft:"Move column left",moveColRight:"Move column right",createNewCsv:"Create new CSV file"},commands:{createNewCsv:"Create new CSV file",fileExists:"File already exists"},tableMessages:{atLeastOneRow:"At least one row must remain",atLeastOneColumn:"At least one column must remain"},notifications:{undo:"Undid last action",noMoreUndo:"There is nothing more to undo",redo:"Redid action",noMoreRedo:"There is nothing more to redo"}};var Je={"zh-cn":Qe,en:Ye},qe=class{constructor(e){this.locale="en";this.setLocale(e||"en")}setLocale(e){console.log(`I18n: Attempting to set locale to '${e}'`);let t=e.toLowerCase(),r="en";t.startsWith("zh")?r="zh-cn":t.startsWith("en")&&(r="en"),r in Je?(this.locale=r,console.log(`I18n: Successfully set locale to '${this.locale}'`)):(this.locale="en",console.warn(`I18n: Locale '${r}' is not fully supported, falling back to 'en'`))}t(e,t){let r=this.getTranslation(e,this.locale);r===null&&this.locale!=="en"&&(console.warn(`I18n: Key '${e}' not found in '${this.locale}', falling back to 'en'.`),r=this.getTranslation(e,"en"));let n=r!=null?r:e;return t&&Object.keys(t).forEach(o=>{let u=`{${o}}`;n=n.replace(new RegExp(u,"g"),String(t[o]))}),n}getTranslation(e,t){let r=Je[t],n=e.split("."),o=r;for(let u of n)if(o&&typeof o=="object"&&u in o)o=o[u];else return null;return typeof o=="string"?o:null}getCurrentLocale(){return this.locale}},k=new qe;var ue=class{static detectDelimiter(e,t='"'){if(!e||e.length===0)return",";let r=[",",";"," ","|"],n=[],o="",u=!1;for(let E=0;E0&&n.push(o);let s=n.map(E=>E).filter(E=>E.trim().length>0).slice(0,20);if(s.length===0)return",";function c(E,x){let $=!1,y=0;for(let D=0;Dc(z,E)),$=x.reduce((z,ee)=>z+ee,0)/x.length,y=x.reduce((z,ee)=>z+Math.pow(ee-$,2),0)/x.length,D=($>1?$:0)-y*.1;(!h||D>h.score)&&(h={delim:E,score:D,avgFields:$,consistency:y})}return h&&h.avgFields>=1.5?h.delim:","}static parseCSV(e,t){try{let r={...this.defaultConfig,...t};if(!r.delimiter||r.delimiter==="auto"){let o=this.detectDelimiter(e,r.quoteChar);r.delimiter=o}let n=Se.parse(e,r);return n.errors&&n.errors.length>0&&(console.warn("CSV parse warnings:",n.errors),new Fe.Notice(`${k.t("csv.parseWarning")} ${n.errors[0].message}`)),n.data}catch(r){return console.error("CSV parse error:",r),new Fe.Notice(k.t("csv.parsingFailed")),[[""]]}}static unparseCSV(e,t){return Se.unparse(e,{...{header:!1,newline:` +`},...t})}static normalizeTableData(e){if(!e||e.length===0)return[[""]];let t=0;for(let n of e)n&&(t=Math.max(t,n.length));return e.map(n=>{let o=n?[...n]:[];for(;o.lengththis.maxSize?this.history.shift():this.currentIndex++}undo(){return this.canUndo()?(this.currentIndex--,new ye.Notice(k.t("notifications.undo")),this.getCurrentState()):(new ye.Notice(k.t("notifications.noMoreUndo")),null)}redo(){return this.canRedo()?(this.currentIndex++,new ye.Notice(k.t("notifications.redo")),this.getCurrentState()):(new ye.Notice(k.t("notifications.noMoreRedo")),null)}getCurrentState(){return this.currentIndex>=0&&this.currentIndex0}canRedo(){return this.currentIndex0&&Array.isArray(e[0])?e.map(t=>[...t]):[...e]:typeof e=="object"&&e!==null?JSON.parse(JSON.stringify(e)):e}},Ee=class extends Pe{cloneState(e){return e.map(t=>[...t])}};var ze=require("obsidian");var ae=class{static calculateColumnWidths(e){if(!e||e.length===0||!e[0])return[];let t=e[0].map(()=>100);return e.forEach(r=>{r.forEach((n,o)=>{let u=Math.max(50,Math.min(300,n.length*10));t[o]=Math.max(t[o],u)})}),t}static addRow(e){let t=e.length>0?e[0].length:1,r=Array(t).fill("");return[...e,r]}static deleteRow(e){return e.length<=1?(new ze.Notice(k.t("tableMessages.atLeastOneRow")),e):e.slice(0,-1)}static addColumn(e){return e.map(t=>[...t,""])}static deleteColumn(e){return!e[0]||e[0].length<=1?(new ze.Notice(k.t("tableMessages.atLeastOneColumn")),e):e.map(t=>t.slice(0,-1))}static addColumnToLeft(e,t){return!e||e.length===0?[]:e.map(r=>{let n=[...r];return n.splice(t,0,""),n})}static addColumnToRight(e,t){return!e||e.length===0?[]:e.map(r=>{let n=[...r];return n.splice(t+1,0,""),n})}static getColumnLabel(e){let t="",r=e;for(;r>=0;)t=String.fromCharCode(65+r%26)+t,r=Math.floor(r/26)-1;return t}static getCellAddress(e,t){let r=this.getColumnLabel(t),n=e+1;return`${r}${n}`}static getTableData(e){return Array.from(e.querySelectorAll("tr")).map(r=>Array.from(r.querySelectorAll("td, th")).map(o=>o.textContent||""))}};var Xe=require("obsidian"),me=class{static async withRetry(e,t=3,r=500){let n=new Error("Unknown error occurred");for(let o=0;o<=t;o++)try{return await e()}catch(u){if(n=u,!(u instanceof Error&&(u.message.includes("EBUSY")||u.message.includes("busy")||u.message.includes("locked")))||o===t)break;o===0&&new Xe.Notice(`File is busy. Retrying... (${o+1}/${t})`),await new Promise(c=>setTimeout(c,r))}throw n}};function Re(p){let{editBarEl:e,editInput:t,activeCellEl:r,activeRowIndex:n,activeColIndex:o,tableData:u,onEdit:s}=p;if(r){t.value=r.value;let c=ae.getCellAddress(n,o);e.setAttribute("data-cell-address",c),r.value?t.placeholder="":t.placeholder=c}else t.value="",t.placeholder=k.t("editBar.placeholder"),e.removeAttribute("data-cell-address");t.oninput=null,t.oninput=()=>{r&&n>=0&&o>=0&&(r.value=t.value,u[n][o]!==t.value&&s(n,o,t.value))}}var xe=class{constructor(e,t){this.searchMatches=[];this.currentSearchIndex=-1;this.options=t,this.searchContainer=e.createEl("div",{cls:"csv-search-container"}),this.searchInput=this.searchContainer.createEl("input",{cls:"csv-search-input",attr:{type:"text",placeholder:k.t("search.placeholder")}}),this.searchResults=this.searchContainer.createEl("div",{cls:"csv-search-results"}),this.setupSearchEvents()}setupSearchEvents(){let e;this.searchInput.addEventListener("input",()=>{clearTimeout(e),e=setTimeout(()=>{this.performSearch(this.searchInput.value)},300)}),this.searchInput.addEventListener("focus",()=>{this.searchMatches.length>0&&this.searchResults.classList.add("show")}),this.searchInput.addEventListener("keydown",t=>{t.key==="ArrowDown"?(t.preventDefault(),this.navigateSearchResults(1)):t.key==="ArrowUp"?(t.preventDefault(),this.navigateSearchResults(-1)):t.key==="Enter"?(t.preventDefault(),this.selectCurrentSearchResult()):t.key==="Escape"&&(this.searchInput.value="",this.performSearch(""),this.hideSearchResults())}),document.addEventListener("click",t=>{this.searchContainer.contains(t.target)||this.hideSearchResults()})}performSearch(e){if(this.searchMatches=[],this.currentSearchIndex=-1,!e.trim()){this.hideSearchResults(),this.options.clearSearchHighlights();return}let t=e.toLowerCase().trim(),r=this.options.getTableData();for(let n=0;n{let o=this.searchResults.createEl("div",{cls:"csv-search-result-item"}),u=o.createEl("div");u.createEl("span",{cls:"csv-search-result-cell",text:this.options.getCellAddress(r.row,r.col)}),u.createEl("span",{cls:"csv-search-result-address",text:k.t("search.rowColumn",{row:(r.row+1).toString(),col:(r.col+1).toString()})});let s=o.createEl("div",{cls:"csv-search-result-preview"});s.innerHTML=this.highlightSearchTerm(r.value,e),o.addEventListener("click",()=>{this.options.jumpToCell(r.row,r.col),this.hideSearchResults()}),o.setAttribute("data-index",n.toString())}),this.searchMatches.length>10){let r=this.searchResults.createEl("div",{cls:"csv-search-result-item",text:k.t("search.moreResults",{count:(this.searchMatches.length-10).toString()})});r.style.color="var(--text-muted)",r.style.fontStyle="italic"}this.searchResults.classList.add("show")}highlightSearchTerm(e,t){if(!t.trim())return e;let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\\]\\]/g,"\\$&")})`,"gi");return e.replace(r,'$1')}navigateSearchResults(e){let t=this.searchResults.querySelectorAll(".csv-search-result-item[data-index]");if(t.length===0)return;t.forEach(n=>n.classList.remove("csv-search-result-hover")),this.currentSearchIndex=Math.max(0,Math.min(t.length-1,this.currentSearchIndex+e));let r=t[this.currentSearchIndex];r&&(r.classList.add("csv-search-result-hover"),r.scrollIntoView({block:"nearest"}))}selectCurrentSearchResult(){if(this.currentSearchIndex>=0&&this.currentSearchIndexu.index>=h.index&&u.indexc.index-h.index);let s=0;for(let c of t)c.index>s&&e.push({text:p.substring(s,c.index),isUrl:!1}),e.push({text:c.displayText,isUrl:!0,url:c.url,displayText:c.displayText}),s=c.index+c.length;return s{u.stopPropagation()},t.appendChild(o)}else{let o=document.createElement("span");o.textContent=n.text,t.appendChild(o)}if(e){let n=document.createElement("span");n.className="csv-cell-edit-btn",n.textContent="\u270E",n.title="Click to edit",n.onclick=o=>{o.stopPropagation(),e()},t.appendChild(n),t.onclick=o=>{o.target.tagName!=="A"&&e()}}return t}function et(p){let{tableData:e,columnWidths:t,autoResize:r,tableEl:n,editInput:o,activeCellEl:u,activeRowIndex:s,activeColIndex:c,setActiveCell:h,saveSnapshot:E,requestSave:x,setupAutoResize:$,adjustInputHeight:y,selectRow:D,selectColumn:z,getColumnLabel:ee,setupColumnResize:P,insertRowAt:ie,deleteRowAt:oe,insertColAt:j,deleteColAt:N,renderEditBar:i,onColumnReorder:a,onRowReorder:l,stickyRows:m,stickyColumns:g,toggleRowSticky:L,toggleColumnSticky:Q}=p;n.empty(),window._csvLiteDragState||(window._csvLiteDragState={type:null,index:null});let V=window._csvLiteDragState;function Y(f,w){V.type=f,V.index=w,n.classList.remove("csv-dragging-row","csv-dragging-col"),f==="row"&&n.classList.add("csv-dragging-row"),f==="col"&&n.classList.add("csv-dragging-col")}if(t.length===0&&e[0]){let f=ae.calculateColumnWidths(e);t.splice(0,t.length,...f)}let M=n.createEl("thead").createEl("tr"),K=M.createEl("th",{cls:"csv-corner-cell"});e[0]&&e[0].forEach((f,w)=>{let d=M.createEl("th",{cls:"csv-col-number",attr:{style:`width: ${t[w]||100}px`,draggable:"true"}});if(d.textContent=ee(w),d.onclick=v=>{v.stopPropagation(),z(w)},Q){let v=(g==null?void 0:g.has(w))||!1,C=d.createEl("button",{cls:`csv-pin-btn csv-pin-col ${v?"pinned":""}`,attr:{title:v?"Unpin column":"Pin column"}});(0,Be.setIcon)(C,v?"pin-off":"pin"),C.onclick=A=>{A.stopPropagation(),Q(w)}}if(d.ondragstart=v=>{var C;(C=v.dataTransfer)==null||C.setData("text/col-index",String(w)),d.classList.add("dragging"),Y("col",w),typeof x=="function"&&x()},d.ondragend=()=>{d.classList.remove("dragging"),Y(null,null),typeof x=="function"&&x()},d.ondragover=v=>{v.preventDefault(),d.classList.add("drag-over")},d.ondragleave=()=>{d.classList.remove("drag-over")},d.ondrop=v=>{var b;v.preventDefault(),d.classList.remove("drag-over"),Y(null,null);let C=Number((b=v.dataTransfer)==null?void 0:b.getData("text/col-index")),A=w;a&&C!==A&&a(C,A)},V.type!=="col"){let v=d.createEl("button",{cls:"csv-insert-col-btn left"});v.innerText="+",v.title=k.t("buttons.insertColBefore")||"Insert column before",v.onclick=b=>{b.stopPropagation(),p.insertColAt(w,!1)};let C=d.createEl("button",{cls:"csv-insert-col-btn right"});C.innerText="+",C.title=k.t("buttons.insertColAfter")||"Insert column after",C.onclick=b=>{b.stopPropagation(),p.insertColAt(w,!0)};let A=d.createEl("button",{cls:"csv-del-col-btn"});A.innerText="-",A.title=k.t("buttons.deleteColumn")||"Delete column",A.onclick=b=>{b.stopPropagation(),p.deleteColAt(w)}}if(V.type==="col"&&V.index!==null){let v=Math.max(0,V.index-2),C=Math.min(e[0].length-1,V.index+2);w>=v&&w<=C&&d.classList.add("csv-dragging-highlight")}let _=d.createEl("div",{cls:"resize-handle"});P(_,w)});let R=n.createEl("tbody");for(let f=0;f{v.stopPropagation(),D(f)},L){let v=(m==null?void 0:m.has(f))||!1,C=_.createEl("button",{cls:`csv-pin-btn csv-pin-row ${v?"pinned":""}`,attr:{title:v?"Unpin row":"Pin row"}});(0,Be.setIcon)(C,v?"pin-off":"pin"),C.onclick=A=>{A.stopPropagation(),L(f)}}if(_.ondragstart=v=>{var C;(C=v.dataTransfer)==null||C.setData("text/row-index",String(f)),_.classList.add("dragging"),Y("row",f),typeof x=="function"&&x()},_.ondragend=()=>{_.classList.remove("dragging"),Y(null,null),typeof x=="function"&&x()},_.ondragover=v=>{v.preventDefault(),_.classList.add("drag-over")},_.ondragleave=()=>{_.classList.remove("drag-over")},_.ondrop=v=>{var b;v.preventDefault(),_.classList.remove("drag-over"),Y(null,null);let C=Number((b=v.dataTransfer)==null?void 0:b.getData("text/row-index")),A=f;l&&C!==A&&l(C,A)},V.type!=="row"){let v=_.createEl("button",{cls:"csv-insert-row-btn above"});v.innerText="+",v.title=k.t("buttons.insertRowBefore")||"Insert row before",v.onclick=b=>{b.stopPropagation(),p.insertRowAt(f,!1)};let C=_.createEl("button",{cls:"csv-insert-row-btn below"});C.innerText="+",C.title=k.t("buttons.insertRowAfter")||"Insert row after",C.onclick=b=>{b.stopPropagation(),p.insertRowAt(f,!0)};let A=_.createEl("button",{cls:"csv-del-row-btn"});A.innerText="-",A.title=k.t("buttons.deleteRow")||"Delete row",A.onclick=b=>{b.stopPropagation(),p.deleteRowAt(f)}}if(V.type==="row"&&V.index!==null){let v=Math.max(0,V.index-2),C=Math.min(e.length-1,V.index+2);f>=v&&f<=C&&(_.classList.add("csv-dragging-highlight"),Array.from(d.children).forEach(A=>{A.classList.add("csv-dragging-highlight")}))}w.forEach((v,C)=>{let A=d.createEl("td",{attr:{style:`width: ${t[C]||100}px`}}),b=A.createEl("input",{cls:"csv-cell-input",attr:{value:v}}),O=ke(v),B=null;O&&(B=Ne(v,()=>{let S=A.querySelector(".csv-cell-display");S&&(S.style.display="none"),b.style.display="block",b.focus()}),A.insertBefore(B,b)),$(b),O&&B&&(b.style.display="none",B.style.display="block"),b.oninput=S=>{if(S.currentTarget instanceof HTMLInputElement){E(),e[f][C]=S.currentTarget.value,u===S.currentTarget&&o&&(o.value=S.currentTarget.value),i&&i(f,C,S.currentTarget),x(),r&&y(S.currentTarget);let U=ke(S.currentTarget.value),H=S.currentTarget.parentElement;if(H){let q=H.querySelector(".csv-cell-display");if(U){q&&q.remove();let T=S.currentTarget,Z=Ne(S.currentTarget.value,()=>{let F=H.querySelector(".csv-cell-display");F&&(F.style.display="none"),T.style.display="block",T.focus()});H.insertBefore(Z,S.currentTarget)}else q&&q.remove()}}},b.onfocus=S=>{if(S.currentTarget instanceof HTMLInputElement){h(f,C,S.currentTarget);let U=S.currentTarget.parentElement;if(U){let H=U.querySelector(".csv-cell-display");H&&(H.style.display="none",S.currentTarget.style.display="block")}}},b.onblur=S=>{if(S.currentTarget instanceof HTMLInputElement){let U=S.currentTarget.parentElement;if(U){let H=U.querySelector(".csv-cell-display");H&&ke(S.currentTarget.value)&&(H.style.display="block",S.currentTarget.style.display="none")}}}})}let X=()=>{n.querySelectorAll(".csv-col-number.active, .csv-row-number.active").forEach(w=>w.classList.remove("active"))};document.addEventListener("click",f=>{let w=f.target;w!=null&&w.closest(".csv-col-number, .csv-row-number")||X()})}var Le=class{constructor(e){this.selectedRow=-1;this.selectedCol=-1;this.tableEl=e}selectRow(e){if(console.log("[HighlightManager] selectRow called with index:",e),this.selectedRow===e){this.clearSelection();return}this.clearSelection(),this.selectedRow=e,this.highlightRow(e)}selectColumn(e){if(console.log("[HighlightManager] selectColumn called with index:",e),this.selectedCol===e){this.clearSelection();return}this.clearSelection(),this.selectedCol=e,this.highlightColumn(e)}clearSelection(){console.log("[HighlightManager] clearSelection called"),this.selectedRow=-1,this.selectedCol=-1,this.clearHighlight()}getSelectedRow(){return this.selectedRow}getSelectedCol(){return this.selectedCol}setTableEl(e){this.tableEl=e}highlightRow(e){var n;console.log("[HighlightManager] highlightRow called with index:",e);let t=(n=this.tableEl)==null?void 0:n.querySelectorAll("tbody tr");console.log("[HighlightManager] \u627E\u5230\u7684tbody\u884C\u6570:",t==null?void 0:t.length);let r=e;t&&t[r]?(console.log("[HighlightManager] \u9AD8\u4EAE\u76EE\u6807\u884C:",t[r]),t[r].classList.add("csv-row-selected")):console.log("[HighlightManager] \u672A\u627E\u5230\u76EE\u6807\u884C\uFF0CrowIndex:",e,"targetRowIndex:",r)}highlightColumn(e){var r;console.log("[HighlightManager] highlightColumn called with index:",e);let t=(r=this.tableEl)==null?void 0:r.querySelectorAll(`th:nth-child(${e+2}), td:nth-child(${e+2})`);console.log("[HighlightManager] \u627E\u5230\u7684\u5217\u5355\u5143\u683C\u6570:",t==null?void 0:t.length),t&&console.log("[HighlightManager] \u5217\u5355\u5143\u683C:",t),t==null||t.forEach(n=>{n instanceof HTMLElement&&n.classList.add("csv-col-selected")})}clearHighlight(){var t;console.log("[HighlightManager] clearHighlight called");let e=(t=this.tableEl)==null?void 0:t.querySelectorAll(".csv-row-selected, .csv-col-selected");console.log("[HighlightManager] \u6E05\u9664\u9AD8\u4EAE\u5143\u7D20\u6570:",e==null?void 0:e.length),e==null||e.forEach(r=>{r instanceof HTMLElement&&(r.classList.remove("csv-row-selected"),r.classList.remove("csv-col-selected"))})}};var Ue=class{constructor(){this.menuEl=null;this.outsideHandler=null;this.keyHandler=null}showMenu(e,t,r,n){this.closeMenu(),this.menuEl=document.createElement("div"),this.menuEl.className="csv-header-context-menu menu",Object.assign(this.menuEl.style,{position:"absolute",left:`${t}px`,top:`${r}px`,zIndex:"9999",minWidth:"160px"}),e.forEach(o=>{let u=document.createElement("div");u.className="menu-item csv-header-context-menu-item",u.textContent=k.t(o.label)||o.label,Object.assign(u.style,{padding:"6px 18px",cursor:"pointer"}),u.onclick=s=>{s.stopPropagation(),s.preventDefault(),this.closeMenu(),o.onClick()},u.onmouseenter=()=>u.classList.add("is-hovered"),u.onmouseleave=()=>u.classList.remove("is-hovered"),this.menuEl.appendChild(u)}),document.body.appendChild(this.menuEl),this.outsideHandler=o=>{this.menuEl&&!this.menuEl.contains(o.target)&&this.closeMenu(n)},this.keyHandler=o=>{o.key==="Escape"&&this.closeMenu(n)},setTimeout(()=>{document.addEventListener("mousedown",this.outsideHandler),document.addEventListener("keydown",this.keyHandler)},0)}closeMenu(e){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),document.removeEventListener("mousedown",this.outsideHandler),document.removeEventListener("keydown",this.keyHandler),e&&e()}};function tt(p,e){let t=new Ue,r=n=>{let o=n.target;if(o.classList.contains("csv-row-number")){n.preventDefault();let u=o.closest("tr");if(!u)return;let c=Array.from(u.parentElement.children).indexOf(u);e.selectRow&&e.selectRow(c);let h=[{label:"contextMenu.insertRowAbove",onClick:()=>e.onInsertRowAbove(c)},{label:"contextMenu.insertRowBelow",onClick:()=>e.onInsertRowBelow(c)},{label:"contextMenu.deleteRow",onClick:()=>e.onDeleteRow(c)},{label:"contextMenu.moveRowUp",onClick:()=>e.onMoveRowUp(c)},{label:"contextMenu.moveRowDown",onClick:()=>e.onMoveRowDown(c)}];t.showMenu(h,n.pageX,n.pageY,()=>{e.clearSelection&&e.clearSelection(),e.onMenuClose&&e.onMenuClose()})}else if(o.classList.contains("csv-col-number")){n.preventDefault();let s=Array.from(p.querySelectorAll(".csv-col-number")).indexOf(o);e.selectColumn&&e.selectColumn(s);let c=[{label:"contextMenu.insertColLeft",onClick:()=>e.onInsertColLeft(s)},{label:"contextMenu.insertColRight",onClick:()=>e.onInsertColRight(s)},{label:"contextMenu.deleteCol",onClick:()=>e.onDeleteCol(s)},{label:"contextMenu.moveColLeft",onClick:()=>e.onMoveColLeft(s)},{label:"contextMenu.moveColRight",onClick:()=>e.onMoveColRight(s)}];t.showMenu(c,n.pageX,n.pageY,()=>{e.clearSelection&&e.clearSelection(),e.onMenuClose&&e.onMenuClose()})}};return p.addEventListener("contextmenu",r),()=>{p.removeEventListener("contextmenu",r),t.closeMenu()}}var Me="csv-lite-view",Te=class extends ne.TextFileView{constructor(t){super(t);this.tableData=[[""]];this.maxHistorySize=50;this.columnWidths=[];this.autoResize=!0;this.delimiter="auto";this.quoteChar='"';this.originalFileDelimiter=null;this.activeCellEl=null;this.activeRowIndex=-1;this.activeColIndex=-1;this.searchMatches=[];this.currentSearchIndex=-1;this.isSourceMode=!1;this.sourceTextarea=null;this.sourceCursorPos={start:0,end:0};this.headerContextMenuCleanup=null;this.stickyRows=new Set;this.stickyColumns=new Set;this.stickyHeaders=!0;this.stickyRowNumbers=!0;this.historyManager=new Ee(void 0,this.maxHistorySize),this.file=this.file,this.headerEl=this.headerEl,this.setupSafeSave()}getIcon(){return"table"}getViewData(){let t=this.originalFileDelimiter||(this.delimiter==="auto"?void 0:this.delimiter);return ue.unparseCSV(this.tableData,t?{delimiter:t}:void 0)}setupSafeSave(){this.originalRequestSave=this.requestSave,this.requestSave=async()=>{try{await me.withRetry(async()=>(this.originalRequestSave(),Promise.resolve()))}catch(t){console.error("Failed to save CSV file after retries:",t),new ne.Notice(`Failed to save file: ${t.message}. The file might be open in another program.`)}}}setViewData(t,r){try{if(this.tableData=ue.parseCSV(t,{delimiter:this.delimiter,quoteChar:this.quoteChar}),!this.originalFileDelimiter)try{this.originalFileDelimiter=ue.detectDelimiter(t,this.quoteChar)}catch(n){console.warn("Failed to detect original delimiter:",n)}(!this.tableData||this.tableData.length===0)&&(this.tableData=[[""]]),this.tableData=ue.normalizeTableData(this.tableData),r&&this.historyManager.reset(this.tableData),this.refresh()}catch(n){console.error("CSV\u5904\u7406\u9519\u8BEF:",n),this.tableData=[[""]],r&&this.historyManager.reset(this.tableData),this.refresh()}}reparseAndRefresh(){let t=this.data;this.setViewData(t,!1)}refresh(){var o,u;if(!this.contentEl)return;this.contentEl.querySelectorAll(".csv-source-mode").forEach(s=>s.remove()),(!this.tableData||!Array.isArray(this.tableData)||this.tableData.length===0)&&(console.warn("Table data not properly initialized, setting default"),this.tableData=[[""]]);let t=(s,c,h)=>{Re({editBarEl:this.editBarEl,editInput:this.editInput,activeCellEl:h,activeRowIndex:s,activeColIndex:c,tableData:this.tableData,onEdit:(E,x,$)=>{this.saveSnapshot(),this.tableData[E][x]=$,this.requestSave()}})};et({tableData:this.tableData,columnWidths:this.columnWidths,autoResize:this.autoResize,tableEl:this.tableEl,editInput:this.editInput,activeCellEl:this.activeCellEl,activeRowIndex:this.activeRowIndex,activeColIndex:this.activeColIndex,setActiveCell:(s,c,h)=>{this.setActiveCell(s,c,h),t(s,c,h)},saveSnapshot:()=>this.saveSnapshot(),requestSave:()=>this.requestSave(),setupAutoResize:s=>this.setupAutoResize(s),adjustInputHeight:s=>this.adjustInputHeight(s),selectRow:s=>this.highlightManager.selectRow(s),selectColumn:s=>this.highlightManager.selectColumn(s),getColumnLabel:s=>this.getColumnLabel(s),setupColumnResize:(s,c)=>this.setupColumnResize(s,c),insertRowAt:(s,c=!1)=>{this.saveSnapshot();let h=c?s+1:s;this.tableData.splice(h,0,Array(this.tableData[0].length).fill("")),this.refresh(),this.requestSave()},deleteRowAt:s=>{this.tableData.length<=1||(this.saveSnapshot(),this.tableData.splice(s,1),this.refresh(),this.requestSave())},insertColAt:(s,c=!1)=>{this.saveSnapshot();let h=c?s+1:s;this.tableData.forEach(E=>E.splice(h,0,"")),this.refresh(),this.requestSave()},deleteColAt:s=>{this.tableData[0].length<=1||(this.saveSnapshot(),this.tableData.forEach(c=>c.splice(s,1)),this.refresh(),this.requestSave())},renderEditBar:t,onColumnReorder:(s,c)=>{if(s!==c){this.saveSnapshot();for(let h of this.tableData){let[E]=h.splice(s,1);h.splice(c,0,E)}if(this.columnWidths&&this.columnWidths.length>0){let[h]=this.columnWidths.splice(s,1);this.columnWidths.splice(c,0,h)}this.refresh(),this.requestSave()}},onRowReorder:(s,c)=>{if(s===c)return;this.saveSnapshot();let[h]=this.tableData.splice(s,1);this.tableData.splice(c,0,h),this.refresh(),this.requestSave()},stickyRows:this.stickyRows,stickyColumns:this.stickyColumns,toggleRowSticky:s=>this.toggleRowSticky(s),toggleColumnSticky:s=>this.toggleColumnSticky(s)}),requestAnimationFrame(()=>{this.applyStickyStyles()});let r=(u=(o=this.operationEl)==null?void 0:o.querySelector)==null?void 0:u.call(o,".top-scroll");if(r&&this.tableEl){let s=this.tableEl.offsetWidth,c=()=>{let h=document.createElement("div");return h.style.width=s+"px",h.style.height="1px",h};r.empty(),r.appendChild(c())}let n=this.tableEl.parentElement;if(n){this._csvTableClickHandler&&n.removeEventListener("click",this._csvTableClickHandler);let s=c=>{let h=c.target;h.tagName==="TH"&&h.classList.contains("csv-col-number")||h.tagName==="TD"&&h.classList.contains("csv-row-number")||this.highlightManager.clearSelection()};this._csvTableClickHandler=s,n.addEventListener("click",s)}this.headerContextMenuCleanup&&(this.headerContextMenuCleanup(),this.headerContextMenuCleanup=null),this.headerContextMenuCleanup=tt(this.tableEl,{selectRow:s=>this.highlightManager.selectRow(s),selectColumn:s=>this.highlightManager.selectColumn(s),clearSelection:()=>this.highlightManager.clearSelection(),onMenuClose:()=>{console.log("[DEBUG] Header context menu closed")},onInsertRowAbove:s=>this.refreshInsertRow(s,!1),onInsertRowBelow:s=>this.refreshInsertRow(s,!0),onDeleteRow:s=>this.refreshDeleteRow(s),onMoveRowUp:s=>this.moveRow(s,s-1),onMoveRowDown:s=>this.moveRow(s,s+1),onInsertColLeft:s=>this.refreshInsertCol(s,!1),onInsertColRight:s=>this.refreshInsertCol(s,!0),onDeleteCol:s=>this.refreshDeleteCol(s),onMoveColLeft:s=>this.moveCol(s,s-1),onMoveColRight:s=>this.moveCol(s,s+1)}),this.tableData[0].forEach((s,c)=>{let h=this.tableEl.querySelector(`.resize-handle[data-index='${c}']`);h&&this.setupColumnResize(h,c)}),this.tableData.forEach((s,c)=>{let h=this.tableEl.querySelector(`.resize-handle-row[data-row-index='${c}']`);h&&this.setupColumnResize(h,c)})}getColumnLabel(t){let r="",n=t;do r=String.fromCharCode(65+n%26)+r,n=Math.floor(n/26)-1;while(n>=0);return r}setActiveCell(t,r,n){this.activeCellEl&&this.activeCellEl.parentElement&&this.activeCellEl.parentElement.classList.remove("csv-active-cell"),this.activeRowIndex=t,this.activeColIndex=r,this.activeCellEl=n,n.parentElement&&n.parentElement.classList.add("csv-active-cell"),this.editInput&&this.editBarEl&&Re({editBarEl:this.editBarEl,editInput:this.editInput,activeCellEl:n,activeRowIndex:t,activeColIndex:r,tableData:this.tableData,onEdit:(o,u,s)=>{this.saveSnapshot(),this.tableData[o][u]=s,this.requestSave()}})}setupColumnResize(t,r){let n,o,u=h=>{n=h.clientX,o=this.columnWidths[r]||100,document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),h.preventDefault()},s=h=>{let E=o+(h.clientX-n);E>=50&&(this.columnWidths[r]=E,this.refresh())},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)};t.addEventListener("mousedown",u)}setupAutoResize(t){this.adjustInputHeight(t),t.addEventListener("input",()=>{this.autoResize&&this.adjustInputHeight(t)})}adjustInputHeight(t){let r=(t.value.match(/\n/g)||[]).length+1,u=Math.max(24,r*20);t.style.height=`${u}px`}saveSnapshot(){this.historyManager.push(this.tableData)}undo(){let t=this.historyManager.undo();t&&(this.tableData=t,this.refresh(),this.requestSave())}redo(){let t=this.historyManager.redo();t&&(this.tableData=t,this.refresh(),this.requestSave())}clear(){this.tableData=[[""]],this.historyManager.reset(this.tableData),this.refresh()}getViewType(){return Me}async onOpen(){var t,r;try{let n=(r=(t=this.headerEl)==null?void 0:t.querySelector)==null?void 0:r.call(t,".view-actions");if(n&&!n.querySelector(".csv-switch-source")){let y=document.createElement("button");y.className="clickable-icon csv-switch-source",y.setAttribute("aria-label","\u5207\u6362\u5230\u6E90\u7801\u6A21\u5F0F"),y.innerHTML='',y.onclick=async()=>{let D=this.file;if(!D)return;let z=this.app.workspace.getLeavesOfType("csv-lite-source-view"),ee=!1;for(let P of z)if(P.view&&P.view.file&&P.view.file.path===D.path){this.app.workspace.setActiveLeaf(P,!0,!0),ee=!0;break}if(!ee){let P=this.app.workspace.getLeaf(!0);await P.openFile(D,{active:!0,state:{mode:"source"}}),await P.setViewState({type:"csv-lite-source-view",active:!0,state:{file:D.path}}),this.app.workspace.setActiveLeaf(P,!0,!0)}},n.appendChild(y)}this.contentEl.empty(),this.operationEl=this.contentEl.createEl("div",{cls:"csv-operations"});let o=this.operationEl.createEl("div",{cls:"csv-parser-settings"});new ne.Setting(o).setName(k.t("settings.fieldSeparator")).setDesc(k.t("settings.fieldSeparatorDesc")).addDropdown(y=>{var z,ee;try{let P=(ee=(z=this.app.plugins)==null?void 0:z.getPlugin)==null?void 0:ee.call(z,"csv-lite");P&&P.settings&&P.settings.preferredDelimiter&&(this.delimiter=P.settings.preferredDelimiter)}catch(P){}let D=ue.detectDelimiter(this.data||"",this.quoteChar);y.addOption("auto",`Auto (detected: ${D})`),y.addOption(",",","),y.addOption(";",";"),y.setValue(this.delimiter||"auto"),y.onChange(async P=>{var ie,oe;this.delimiter=P==="\\t"?" ":P;try{let j=(oe=(ie=this.app.plugins)==null?void 0:ie.getPlugin)==null?void 0:oe.call(ie,"csv-lite");j&&typeof j.saveSettings=="function"&&(j.settings={...j.settings||{},preferredDelimiter:this.delimiter},await j.saveSettings())}catch(j){}this.reparseAndRefresh()})}),new ne.Setting(o).setName(k.t("settings.quoteChar")).setDesc(k.t("settings.quoteCharDesc")).addText(y=>{y.setValue(this.quoteChar).setPlaceholder('\u9ED8\u8BA4\u4E3A\u53CC\u5F15\u53F7 "').onChange(async D=>{this.quoteChar=D||'"',this.reparseAndRefresh()})});let u=this.operationEl.createEl("div",{cls:"csv-operation-buttons"}),s=u.createEl("div",{cls:"csv-buttons-group"}),c=u.createEl("div",{cls:"csv-search-bar-container"});this.searchBar=new xe(c,{getTableData:()=>this.tableData,tableEl:this.tableEl,getColumnLabel:y=>this.getColumnLabel(y),getCellAddress:(y,D)=>this.getCellAddress(y,D),jumpToCell:(y,D)=>this.jumpToCell(y,D),clearSearchHighlights:()=>this.clearSearchHighlights()}),new ne.ButtonComponent(s).setButtonText(k.t("buttons.undo")).setIcon("undo").onClick(()=>this.undo()),new ne.ButtonComponent(s).setButtonText(k.t("buttons.redo")).setIcon("redo").onClick(()=>this.redo()),new ne.ButtonComponent(s).setButtonText(k.t("buttons.resetColumnWidth")).onClick(()=>{this.columnWidths=[],this.calculateColumnWidths(),this.refresh()});let h=s.createEl("div",{cls:"csv-delimiter-compact"});new ne.Setting(h).addDropdown(y=>{var z,ee;try{let P=(ee=(z=this.app.plugins)==null?void 0:z.getPlugin)==null?void 0:ee.call(z,"csv-lite");P&&P.settings&&P.settings.preferredDelimiter&&(this.delimiter=P.settings.preferredDelimiter)}catch(P){}let D=ue.detectDelimiter(this.data||"",this.quoteChar);y.addOption("auto",`Auto (${D})`),y.addOption(",",","),y.addOption(";",";"),y.setValue(this.delimiter||"auto"),y.onChange(async P=>{var ie,oe;this.delimiter=P==="\\t"?" ":P;try{let j=(oe=(ie=this.app.plugins)==null?void 0:ie.getPlugin)==null?void 0:oe.call(ie,"csv-lite");j&&typeof j.saveSettings=="function"&&(j.settings={...j.settings||{},preferredDelimiter:this.delimiter},await j.saveSettings())}catch(j){}this.reparseAndRefresh()})}),this.editBarEl=this.operationEl.createEl("div",{cls:"csv-edit-bar"}),this.editInput=this.editBarEl.createEl("input",{cls:"csv-edit-input",attr:{placeholder:k.t("editBar.placeholder")}}),Re({editBarEl:this.editBarEl,editInput:this.editInput,activeCellEl:this.activeCellEl,activeRowIndex:this.activeRowIndex,activeColIndex:this.activeColIndex,tableData:this.tableData,onEdit:(y,D,z)=>{this.saveSnapshot(),this.tableData[y][D]=z,this.requestSave()}});let E=this.operationEl.createEl("div",{cls:"scroll-container top-scroll"}),$=this.contentEl.createEl("div",{cls:"table-wrapper"}).createEl("div",{cls:"table-container main-scroll"});this.tableEl=$.createEl("table",{cls:"csv-lite-table"}),this.highlightManager=new Le(this.tableEl),this.setupScrollSync(E,$),this.historyManager||(this.historyManager=new Ee(this.tableData,this.maxHistorySize)),this.registerDomEvent(document,"keydown",y=>{this.app.workspace.activeLeaf===this.leaf&&(y.ctrlKey||y.metaKey)&&y.key==="z"&&(y.shiftKey?(y.preventDefault(),this.redo()):(y.preventDefault(),this.undo()))}),(!this.tableData||!Array.isArray(this.tableData)||this.tableData.length===0)&&(this.tableData=[[""]]),this.refresh(),this.tableEl&&this.tableEl.addEventListener("click",y=>{let D=y.target;D.tagName==="TH"&&(D.classList.contains("csv-row-header")||D.classList.contains("csv-col-header"))||this.highlightManager.clearSelection()}),this.operationEl.classList.add("csv-toolbar-sticky")}catch(n){console.error("Error in onOpen:",n),new ne.Notice(`Failed to open CSV view: ${n.message}`),this.contentEl.empty();let o=this.contentEl.createEl("div",{cls:"csv-error"});o.createEl("h3",{text:"Error opening CSV file"}),o.createEl("p",{text:n.message}),this.tableData=[[""]],this.tableEl=this.contentEl.createEl("table"),this.refresh()}}setTableContent(t){this.tableData=t,this.refresh()}getTableContent(){return this.tableData}calculateColumnWidths(){this.columnWidths=ae.calculateColumnWidths(this.tableData)}setupScrollSync(t,r){r.addEventListener("scroll",()=>{t.scrollLeft=r.scrollLeft}),t.addEventListener("scroll",()=>{r.scrollLeft=t.scrollLeft})}async onClose(){let t=document.head.querySelector("#csv-edit-bar-styles");t&&t.remove(),this.headerContextMenuCleanup&&(this.headerContextMenuCleanup(),this.headerContextMenuCleanup=null),this.contentEl.empty()}addRow(){this.saveSnapshot(),this.tableData=ae.addRow(this.tableData),this.refresh(),this.requestSave()}deleteRow(){this.saveSnapshot(),this.tableData=ae.deleteRow(this.tableData),this.refresh(),this.requestSave()}addColumn(){this.saveSnapshot(),this.tableData=ae.addColumn(this.tableData),this.refresh(),this.requestSave()}deleteColumn(){this.saveSnapshot(),this.tableData=ae.deleteColumn(this.tableData),this.refresh(),this.requestSave()}getCellAddress(t,r){return`${this.getColumnLabel(r)}${t+1}`}jumpToCell(t,r){var u;this.clearSearchHighlights();let n=(u=this.tableEl)==null?void 0:u.querySelectorAll("tr"),o=t===0?1:t+1;if(n&&o{x.focus(),x.select(),x.parentElement&&(x.parentElement.classList.add("csv-search-current"),setTimeout(()=>{x.parentElement&&x.parentElement.classList.remove("csv-search-current")},3e3))},100))}}}clearSearchHighlights(){var t;(t=this.tableEl)==null||t.querySelectorAll(".csv-search-current").forEach(r=>{r instanceof HTMLElement&&r.classList.remove("csv-search-current")})}async openSourceMode(){let t=this.file;if(!t)return;let r=this.app.workspace.getLeaf(!0);await r.openFile(t,{active:!0,state:{mode:"source"}}),await r.setViewState({type:"csv-lite-source-view",active:!0,state:{file:t.path}}),this.leaf.detach()}moveRow(t,r){if(t<0||r<0||t>=this.tableData.length||r>=this.tableData.length)return;this.saveSnapshot();let n=this.tableData.splice(t,1)[0];this.tableData.splice(r,0,n),this.refresh(),this.requestSave()}toggleRowSticky(t){this.stickyRows.has(t)?this.stickyRows.delete(t):this.stickyRows.add(t),this.applyStickyStyles()}toggleColumnSticky(t){this.stickyColumns.has(t)?this.stickyColumns.delete(t):this.stickyColumns.add(t),this.applyStickyStyles()}applyStickyStyles(){if(!this.tableEl)return;this.tableEl.querySelectorAll(".csv-sticky-row, .csv-sticky-col, .csv-sticky-header, .csv-sticky-row-number").forEach(s=>{s.classList.remove("csv-sticky-row","csv-sticky-col","csv-sticky-header","csv-sticky-row-number"),s.style.removeProperty("left"),s.style.removeProperty("top")});let t=()=>{let s=this.tableEl.querySelector("tbody tr td:first-child");return s?s.offsetWidth:40},r=()=>{let s=this.tableEl.querySelector("thead tr");return s?s.offsetHeight:30},n=s=>{let c=t();for(let h=0;h{let c=r();for(let h=0;h{c.classList.add("csv-sticky-header"),c.style.top="0px"}),this.stickyRowNumbers){let s=t(),c=this.tableEl.querySelector("thead tr th:first-child");c&&(c.classList.add("csv-sticky-row-number"),c.style.left="0px",c.style.top="0px"),this.tableEl.querySelectorAll("tbody tr td:first-child").forEach(E=>{E.classList.add("csv-sticky-row-number"),E.style.left="0px"})}let u=r();this.stickyRows.forEach(s=>{let c=o(s);this.tableEl.querySelectorAll(`tbody tr:nth-child(${s+1}) td`).forEach(E=>{E.classList.add("csv-sticky-row"),E.style.top=`${c}px`})}),this.stickyColumns.forEach(s=>{let c=n(s),h=this.tableEl.querySelector(`thead tr th:nth-child(${s+2})`);h&&(h.classList.add("csv-sticky-col"),h.style.left=`${c}px`,h.style.top="0px"),this.tableEl.querySelectorAll(`tbody tr td:nth-child(${s+2})`).forEach(x=>{x.classList.add("csv-sticky-col"),x.style.left=`${c}px`})}),console.log("Applied sticky styles:",{stickyHeaders:this.stickyHeaders,stickyRowNumbers:this.stickyRowNumbers,stickyRows:Array.from(this.stickyRows),stickyColumns:Array.from(this.stickyColumns),rowNumberWidth:t(),headerHeight:r()})}moveCol(t,r){t<0||r<0||t>=this.tableData[0].length||r>=this.tableData[0].length||(this.saveSnapshot(),this.tableData.forEach(n=>{let o=n.splice(t,1)[0];n.splice(r,0,o)}),this.refresh(),this.requestSave())}refreshInsertRow(t,r){this.saveSnapshot();let n=r?t+1:t;this.tableData.splice(n,0,Array(this.tableData[0].length).fill("")),this.refresh(),this.requestSave()}refreshDeleteRow(t){this.tableData.length<=1||(this.saveSnapshot(),this.tableData.splice(t,1),this.refresh(),this.requestSave())}refreshInsertCol(t,r){this.saveSnapshot();let n=r?t+1:t;this.tableData.forEach(o=>o.splice(n,0,"")),this.refresh(),this.requestSave()}refreshDeleteCol(t){this.tableData[0].length<=1||(this.saveSnapshot(),this.tableData.forEach(r=>r.splice(t,1)),this.refresh(),this.requestSave())}};var rt=require("obsidian"),De=require("@codemirror/state"),se=require("@codemirror/view"),ve=require("@codemirror/commands"),Ve="csv-lite-source-view",ft=se.ViewPlugin.fromClass(class{constructor(p){this.decorations=st(p)}update(p){(p.docChanged||p.viewportChanged)&&(this.decorations=st(p.view))}},{decorations:p=>p.decorations});function st(p){let e=new De.RangeSetBuilder,t=/[;, ]/g;for(let{from:r,to:n}of p.visibleRanges){let o=p.state.doc.sliceString(r,n),u;for(;(u=t.exec(o))!==null;){let s=r+u.index;e.add(s,s+1,se.Decoration.mark({class:"csv-separator-highlight"}))}}return e.finish()}var _e=class extends rt.TextFileView{constructor(e){super(e),this.file=this.file,this.headerEl=this.headerEl}getViewType(){return Ve}getDisplayText(){return this.file?`CSV source: ${this.file.basename}`:"CSV source"}getIcon(){return"file-code"}async onOpen(){var s,c;let e=(c=(s=this.headerEl)==null?void 0:s.querySelector)==null?void 0:c.call(s,".view-actions");if(e&&!e.querySelector(".csv-switch-table")){let h=document.createElement("button");h.className="clickable-icon csv-switch-table",h.setAttribute("aria-label","\u5207\u6362\u5230\u8868\u683C\u6A21\u5F0F"),h.innerHTML='',h.onclick=async()=>{let E=this.file;if(!E)return;let x=this.app.workspace.getLeavesOfType("csv-lite-view"),$=!1;for(let y of x)if(y.view&&y.view.file&&y.view.file.path===E.path){this.app.workspace.setActiveLeaf(y,!0,!0),$=!0;break}if(!$){let y=this.app.workspace.getLeaf(!0);await y.openFile(E,{active:!0}),await y.setViewState({type:"csv-lite-view",active:!0,state:{file:E.path}}),this.app.workspace.setActiveLeaf(y,!0,!0)}},e.appendChild(h)}let t=this.containerEl.children[1];t.empty();let n=t.createDiv({cls:"csv-source-editor-container"}).createDiv({cls:"csv-source-cm-container"}),o=[(0,se.lineNumbers)(),(0,se.drawSelection)(),(0,ve.history)(),se.keymap.of([...ve.defaultKeymap,...ve.historyKeymap]),ft,(0,se.placeholder)("\u8F93\u5165 CSV \u6E90\u7801..."),se.EditorView.lineWrapping,se.EditorView.updateListener.of(h=>{h.docChanged&&this.save()})],u=De.EditorState.create({doc:this.data||"",extensions:o});this.editor=new se.EditorView({state:u,parent:n}),this.addEditorStyles(),setTimeout(()=>this.editor.focus(),10)}addToolbarButton(e,t,r,n,o){e.createEl("button",{text:t,cls:"csv-source-button",attr:{"aria-label":n}}).addEventListener("click",o)}addEditorStyles(){let e=document.createElement("style");e.textContent=` .csv-source-editor-container { height: 100%; display: flex; @@ -88,7 +88,7 @@ var et=Object.create;var ye=Object.defineProperty;var tt=Object.getOwnPropertyDe .csv-source-cm-container .cm-lineNumbers .cm-gutterElement { color: var(--text-faint); } - `,document.head.appendChild(e),this.register(()=>{document.head.removeChild(e)})}async onClose(){await this.save()}getViewData(){return this.editor?this.editor.state.doc.toString():this.data||""}setViewData(e,r){if(r&&this.clear(),this.data=e,this.editor){let a=this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:e}});this.editor.dispatch(a)}}clear(){if(this.data="",this.editor){let e=this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:""}});this.editor.dispatch(e)}}};var ht={csvSettings:"default",preferredDelimiter:"auto"},_e=class extends De.Plugin{async onload(){await this.loadSettings();let e=De.moment.locale();O.setLocale(e),console.log(`CSV Plugin: Setting locale to '${e}'`),console.log(`CSV Plugin: Test translation - buttons.undo: '${O.t("buttons.undo")}'`),this.registerView(Le,r=>new xe(r)),this.registerView(Ve,r=>new Me(r)),this.registerExtensions(["csv"],Le)}onunload(){}async loadSettings(){this.settings=Object.assign({},ht,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}}; + `,document.head.appendChild(e),this.register(()=>{document.head.removeChild(e)})}async onClose(){await this.save()}getViewData(){return this.editor?this.editor.state.doc.toString():this.data||""}setViewData(e,t){if(t&&this.clear(),this.data=e,this.editor){let r=this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:e}});this.editor.dispatch(r)}}clear(){if(this.data="",this.editor){let e=this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:""}});this.editor.dispatch(e)}}};var gt={csvSettings:"default",preferredDelimiter:"auto"},Ie=class extends pe.Plugin{async onload(){await this.loadSettings();let e=pe.moment.locale();k.setLocale(e),console.log(`CSV Plugin: Setting locale to '${e}'`),console.log(`CSV Plugin: Test translation - buttons.undo: '${k.t("buttons.undo")}'`),this.registerView(Me,t=>new Te(t)),this.registerView(Ve,t=>new _e(t)),this.registerExtensions(["csv"],Me),this.addCommand({id:"csv-lite-create-new-csv-file",name:k.t("commands.createNewCsv"),callback:()=>{this.createCsvInFolder("")}}),this.registerEvent(this.app.workspace.on("file-menu",(t,r)=>{t.addItem(n=>{n.setTitle(k.t("contextMenu.createNewCsv")||k.t("commands.createNewCsv")).setIcon("file-plus").onClick(()=>{let o="";if(r.path){let u=r.path,s=u.lastIndexOf("/");s>0&&(o=u.substring(0,s))}this.createCsvInFolder(o)})})}))}async createCsvInFolder(e){let r="new.csv",n=0;for(;this.app.vault.getAbstractFileByPath(e?`${e}/${r}`:r);)if(n++,r=`new-${n}.csv`,n>1e3)return new pe.Notice(k.t("modal.errors.createFailed")||"Failed to create file"),null;let o=e?`${e}/${r}`:r;try{await me.withRetry(()=>this.app.vault.create(o,""));let u=this.app.vault.getAbstractFileByPath(o);return u&&await this.app.workspace.getLeaf(!0).openFile(u),u}catch(u){return console.error("CreateCsv: failed to create file",u),new pe.Notice(k.t("modal.errors.createFailed")||"Failed to create file"),null}}onunload(){}async loadSettings(){this.settings=Object.assign({},gt,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}}; /*! Bundled license information: papaparse/papaparse.min.js: diff --git a/.obsidian/plugins/csv-lite/manifest.json b/.obsidian/plugins/csv-lite/manifest.json index 5a254d6..2ed81df 100644 --- a/.obsidian/plugins/csv-lite/manifest.json +++ b/.obsidian/plugins/csv-lite/manifest.json @@ -1,7 +1,7 @@ { "id": "csv-lite", "name": "CSV Lite", - "version": "1.1.4", + "version": "1.7.0", "minAppVersion": "1.8.0", "description": "Just open and edit CSV files directly, no more. Keep it simple.", "author": "Jay Bridge", diff --git a/.obsidian/plugins/csv-lite/styles.css b/.obsidian/plugins/csv-lite/styles.css index b2cdb89..fac1232 100644 --- a/.obsidian/plugins/csv-lite/styles.css +++ b/.obsidian/plugins/csv-lite/styles.css @@ -53,6 +53,74 @@ If your plugin does not need CSS, delete this file. line-height: 1.4; } +/* URL display layer */ +.csv-cell-display { + padding: 2px 4px; + min-height: 24px; + cursor: text; + white-space: pre-wrap; + word-break: break-word; + line-height: 1.4; + user-select: text; + transition: background-color 0.15s ease; + position: relative; + padding-right: 24px; /* Space for edit button */ +} + +/* Hover effect on cell to show it's editable */ +.csv-cell-display:hover { + background-color: var(--background-modifier-hover); + border-radius: 3px; +} + +/* Edit button for URL cells */ +.csv-cell-edit-btn { + cursor: pointer; + color: var(--text-muted); + font-size: 12px; + padding: 2px 4px; + border-radius: 3px; + opacity: 0; + transition: opacity 0.15s ease, background-color 0.15s ease; + position: absolute; + right: 2px; + top: 50%; + transform: translateY(-50%); +} + +.csv-cell-display:hover .csv-cell-edit-btn { + opacity: 1; +} + +.csv-cell-edit-btn:hover { + background-color: var(--interactive-accent); + color: var(--text-on-accent); +} + +/* Clickable URL links */ +.csv-cell-link { + color: var(--link-color); + text-decoration: none; + cursor: pointer; + border-bottom: 1px solid var(--link-color); + transition: all 0.2s ease; + position: relative; + z-index: 1; +} + +.csv-cell-link:hover { + color: var(--link-color-hover); + border-bottom-color: var(--link-color-hover); + text-decoration: none; + background-color: rgba(var(--interactive-accent-rgb), 0.1); + padding: 0 2px; + border-radius: 2px; +} + +.csv-cell-link:active { + opacity: 0.7; +} + /* csv-cell-input 特有样式(宽度由 JS 控制) */ .csv-cell-input { width: 100%; @@ -123,6 +191,8 @@ If your plugin does not need CSS, delete this file. /* Align dropdown vertically with buttons */ .csv-delimiter-compact .setting-item-control { margin: 0 !important; + padding-left: 0 !important; + padding-right: 0 !important; } .csv-delimiter-compact .setting-item-control .dropdown { height: 32px !important; diff --git a/.obsidian/plugins/extended-graph/data.json b/.obsidian/plugins/extended-graph/data.json index e33d8fc..05e8046 100644 --- a/.obsidian/plugins/extended-graph/data.json +++ b/.obsidian/plugins/extended-graph/data.json @@ -119,7 +119,7 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.10289036731160874, + "scale": 0.09849900300199312, "close": true }, "openInNewTab": true, diff --git a/.obsidian/plugins/homepage/main.js b/.obsidian/plugins/homepage/main.js index bc4854a..b4f167c 100644 --- a/.obsidian/plugins/homepage/main.js +++ b/.obsidian/plugins/homepage/main.js @@ -1,4 +1,3 @@ -"use strict";var ze=Object.create;var j=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var $e=Object.getPrototypeOf,Je=Object.prototype.hasOwnProperty;var Qe=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Ze=(a,t)=>{for(var e in t)j(a,e,{get:t[e],enumerable:!0})},ve=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ge(t))!Je.call(a,i)&&i!==e&&j(a,i,{get:()=>t[i],enumerable:!(n=qe(t,i))||n.enumerable});return a};var Xe=(a,t,e)=>(e=a!=null?ze($e(a)):{},ve(t||!a||!a.__esModule?j(e,"default",{value:a,enumerable:!0}):e,a)),et=a=>ve(j({},"__esModule",{value:!0}),a);var _e=Qe(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var g=require("obsidian"),te="YYYY-MM-DD",ne="gggg-[W]ww",De="YYYY-MM",Ee="YYYY-[Q]Q",Se="YYYY";function x(a){let t=window.app.plugins.getPlugin("periodic-notes");return t&&t.settings?.[a]?.enabled}function O(){try{let{internalPlugins:a,plugins:t}=window.app;if(x("daily")){let{format:o,folder:s,template:c}=t.getPlugin("periodic-notes")?.settings?.daily||{};return{format:o||te,folder:s?.trim()||"",template:c?.trim()||""}}let{folder:e,format:n,template:i}=a.getPluginById("daily-notes")?.instance?.options||{};return{format:n||te,folder:e?.trim()||"",template:i?.trim()||""}}catch(a){console.info("No custom daily note settings found!",a)}}function C(){try{let a=window.app.plugins,t=a.getPlugin("calendar")?.options,e=a.getPlugin("periodic-notes")?.settings?.weekly;if(x("weekly"))return{format:e.format||ne,folder:e.folder?.trim()||"",template:e.template?.trim()||""};let n=t||{};return{format:n.weeklyNoteFormat||ne,folder:n.weeklyNoteFolder?.trim()||"",template:n.weeklyNoteTemplate?.trim()||""}}catch(a){console.info("No custom weekly note settings found!",a)}}function H(){let a=window.app.plugins;try{let t=x("monthly")&&a.getPlugin("periodic-notes")?.settings?.monthly||{};return{format:t.format||De,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch(t){console.info("No custom monthly note settings found!",t)}}function R(){let a=window.app.plugins;try{let t=x("quarterly")&&a.getPlugin("periodic-notes")?.settings?.quarterly||{};return{format:t.format||Ee,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch(t){console.info("No custom quarterly note settings found!",t)}}function I(){let a=window.app.plugins;try{let t=x("yearly")&&a.getPlugin("periodic-notes")?.settings?.yearly||{};return{format:t.format||Se,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch(t){console.info("No custom yearly note settings found!",t)}}function Fe(...a){let t=[];for(let n=0,i=a.length;n{let Q=n(),Z=a.clone().set({hour:Q.get("hour"),minute:Q.get("minute"),second:Q.get("second")});return E&&Z.add(parseInt(b,10),w),f?Z.format(f.substring(1).trim()):Z.format(o)}).replace(/{{\s*yesterday\s*}}/gi,a.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,a.clone().add(1,"d").format(o)));return t.foldManager.save(m,u),m}catch(m){console.error(`Failed to create file: '${d}'`,m),new g.Notice("Unable to create new file.")}}function st(a,t){return t[k(a,"day")]??null}function rt(){let{vault:a}=window.app,{folder:t}=O(),e=a.getAbstractFileByPath(g.normalizePath(t));if(!e)throw new ae("Failed to find daily notes folder");let n={};return g.Vault.recurseChildren(e,i=>{if(i instanceof g.TFile){let o=A(i,"day");if(o){let s=k(o,"day");n[s]=i}}}),n}var ie=class extends Error{};function lt(){let{moment:a}=window,t=a.localeData()._week.dow,e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;t;)e.push(e.shift()),t--;return e}function ct(a){return lt().indexOf(a.toLowerCase())}async function xe(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=C(),[o,s]=await F(e),c=a.format(n),u=await _(i,c);try{let r=await t.create(u,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,m,P,T,E,b)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return P&&f.add(parseInt(T,10),E),b?f.format(b.substring(1).trim()):f.format(n)}).replace(/{{\s*title\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,m,P)=>{let T=ct(m);return a.weekday(T).format(P.trim())}));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${u}'`,r),new g.Notice("Unable to create new file.")}}function dt(a,t){return t[k(a,"week")]??null}function pt(){let a={};if(!Ce())return a;let{vault:t}=window.app,{folder:e}=C(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new ie("Failed to find weekly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=A(i,"week");if(o){let s=k(o,"week");a[s]=i}}}),a}var oe=class extends Error{};async function Oe(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=H(),[o,s]=await F(e),c=a.format(n),u=await _(i,c);try{let r=await t.create(u,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,m,P,T,E,b)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return P&&f.add(parseInt(T,10),E),b?f.format(b.substring(1).trim()):f.format(n)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${u}'`,r),new g.Notice("Unable to create new file.")}}function ut(a,t){return t[k(a,"month")]??null}function gt(){let a={};if(!He())return a;let{vault:t}=window.app,{folder:e}=H(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new oe("Failed to find monthly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=A(i,"month");if(o){let s=k(o,"month");a[s]=i}}}),a}var se=class extends Error{};async function mt(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=R(),[o,s]=await F(e),c=a.format(n),u=await _(i,c);try{let r=await t.create(u,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,m,P,T,E,b)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return P&&f.add(parseInt(T,10),E),b?f.format(b.substring(1).trim()):f.format(n)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${u}'`,r),new g.Notice("Unable to create new file.")}}function ht(a,t){return t[k(a,"quarter")]??null}function ft(){let a={};if(!Re())return a;let{vault:t}=window.app,{folder:e}=R(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new se("Failed to find quarterly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=A(i,"quarter");if(o){let s=k(o,"quarter");a[s]=i}}}),a}var re=class extends Error{};async function wt(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=I(),[o,s]=await F(e),c=a.format(n),u=await _(i,c);try{let r=await t.create(u,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,m,P,T,E,b)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return P&&f.add(parseInt(T,10),E),b?f.format(b.substring(1).trim()):f.format(n)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${u}'`,r),new g.Notice("Unable to create new file.")}}function yt(a,t){return t[k(a,"year")]??null}function vt(){let a={};if(!Ie())return a;let{vault:t}=window.app,{folder:e}=I(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new re("Failed to find yearly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=A(i,"year");if(o){let s=k(o,"year");a[s]=i}}}),a}function bt(){let{app:a}=window,t=a.internalPlugins.plugins["daily-notes"];if(t&&t.enabled)return!0;let e=a.plugins.getPlugin("periodic-notes");return e&&e.settings?.daily?.enabled}function Ce(){let{app:a}=window;if(a.plugins.getPlugin("calendar"))return!0;let t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.weekly?.enabled}function He(){let{app:a}=window,t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.monthly?.enabled}function Re(){let{app:a}=window,t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.quarterly?.enabled}function Ie(){let{app:a}=window,t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.yearly?.enabled}function Nt(a){let t={day:O,week:C,month:H,quarter:R,year:I}[a];return t()}function kt(a,t){return{day:Le,month:Oe,week:xe}[a](t)}l.DEFAULT_DAILY_NOTE_FORMAT=te;l.DEFAULT_MONTHLY_NOTE_FORMAT=De;l.DEFAULT_QUARTERLY_NOTE_FORMAT=Ee;l.DEFAULT_WEEKLY_NOTE_FORMAT=ne;l.DEFAULT_YEARLY_NOTE_FORMAT=Se;l.appHasDailyNotesPluginLoaded=bt;l.appHasMonthlyNotesPluginLoaded=He;l.appHasQuarterlyNotesPluginLoaded=Re;l.appHasWeeklyNotesPluginLoaded=Ce;l.appHasYearlyNotesPluginLoaded=Ie;l.createDailyNote=Le;l.createMonthlyNote=Oe;l.createPeriodicNote=kt;l.createQuarterlyNote=mt;l.createWeeklyNote=xe;l.createYearlyNote=wt;l.getAllDailyNotes=rt;l.getAllMonthlyNotes=gt;l.getAllQuarterlyNotes=ft;l.getAllWeeklyNotes=pt;l.getAllYearlyNotes=vt;l.getDailyNote=st;l.getDailyNoteSettings=O;l.getDateFromFile=A;l.getDateFromPath=ot;l.getDateUID=k;l.getMonthlyNote=ut;l.getMonthlyNoteSettings=H;l.getPeriodicNoteSettings=Nt;l.getQuarterlyNote=ht;l.getQuarterlyNoteSettings=R;l.getTemplateInfo=F;l.getWeeklyNote=dt;l.getWeeklyNoteSettings=C;l.getYearlyNote=yt;l.getYearlyNoteSettings=I});var St={};Ze(St,{default:()=>J});module.exports=et(St);var N=require("obsidian");var v=require("obsidian");var ce=require("obsidian");var S=require("obsidian");function D(a){return a?a.extension=="md"?a.path.slice(0,-3):a.path:""}function be(a){return a.split("/").slice(-1)[0].contains(".")?a:`${a}.md`}function X(a,t=void 0){let e=a.vault.getFiles();if(t){let n=a.vault.getFolderByPath(t);if(!n)return;e=Ne(n)}if(e.filter(n=>["md","canvas","base"].contains(n.extension)),e.length){let n=Math.floor(Math.random()*e.length);return D(e[n])}}function Ne(a){let t=[];for(let e of a.children)e instanceof S.TFolder?t.push(...Ne(e)):t.push(e);return t}function ke(a){return a.workspace.getActiveViewOfType(S.View)?.getViewType()=="empty"}function ee(a,t){return a.localeCompare(t,void 0,{sensitivity:"accent"})===0}function U(a){return new Promise(t=>setTimeout(t,a))}async function Pe(a){let t=a.workspace.getLayout();t.main={id:"5324373015726ba8",type:"split",children:[{id:"4509724f8bf84da7",type:"tabs",children:[{id:"e7a7b303c61786dc",type:"leaf",state:{type:"empty",state:{},icon:"lucide-file",title:"New tab"}}]}],direction:"vertical"},t.active="e7a7b303c61786dc",await a.workspace.changeLayout(t),S.Platform.isMobile&&(a.workspace.rightSplit?.updateInfo(),tt(a))}function tt(a){let t=a.internalPlugins.plugins.sync?.instance;t&&a.workspace.onLayoutReady(()=>{t.statusIconEl=a.workspace.rightSplit.addHeaderButton("sync-small",t.openStatusIconMenu.bind(t)),t.statusIconEl.addEventListener("contextmenu",t.openStatusIconMenu.bind(t)),t.statusIconEl.addClass("sync-status-icon")})}function Te(a){let t=a.internalPlugins.plugins.sync,e=[new Promise(n=>{let i=async()=>{n(),a.workspace.off("layout-change",i)};a.workspace.on("layout-change",i)})];return t.enabled&&t.instance.syncing&&e.push(new Promise(n=>{let i=async()=>{n(),t.instance.off("status-change",i)};t.instance.on("status-change",i)})),Promise.race([Promise.all(e),new Promise(n=>setTimeout(n,1500))])}var p=Xe(_e()),Pt="custom-journal-locale",le={["Daily Note"]:{noun:"day",adjective:"daily",create:p.createDailyNote,get:p.getDailyNote,getAll:p.getAllDailyNotes},["Weekly Note"]:{noun:"week",adjective:"weekly",create:p.createWeeklyNote,get:p.getWeeklyNote,getAll:p.getAllWeeklyNotes},["Monthly Note"]:{noun:"month",adjective:"monthly",create:p.createMonthlyNote,get:p.getMonthlyNote,getAll:p.getAllMonthlyNotes},["Yearly Note"]:{noun:"year",adjective:"yearly",create:p.createYearlyNote,get:p.getYearlyNote,getAll:p.getAllYearlyNotes}},B=["Daily Note","Weekly Note","Monthly Note","Yearly Note"],We="Date-dependent file",de="Date-dependent notes in Homepage have been removed. Set your Homepage as a Periodic or Daily Note instead.";async function Ve(a,t){let e=t.communityPlugins["periodic-notes"],n=le[a],i=(0,ce.moment)().startOf(n.noun),o;if(je(e)){let s=n.getAll();Object.keys(s).length?o=n.get(i,s)||await n.create(i):o=await n.create(i),o||(o=n.get(i,s))}else e.cache.initialize(),o=e.getPeriodicNote(n.noun,i)||await e.createPeriodicNote(n.noun,i);return D(o)}function Ye(a,t){if(a=="Daily Note"&&t.internalPlugins["daily-notes"]?.enabled)return!0;let e=t.communityPlugins["periodic-notes"];if(!e)return!1;if(je(e)){let n=le[a].adjective;return e.settings[n]?.enabled}else{let n=le[a].noun;return e?.calendarSetManager?.getActiveSet()[n]?.enabled}}function K(a){let t=a.internalPlugins["daily-notes"];return t?.enabled&&t?.instance.options.autorun}function je(a){return(a?.manifest.version||"0").startsWith("0")}function Ue(a){return!!a.plugin.communityPlugins.journals.getJournal(a.data.value)}async function Be(a,t){let e=t.communityPlugins.journals,n=e.getJournal(a),i=n.config.value.autoCreate;e.reprocessNotes(),n.config.value.autoCreate=!0,await n.autoCreate(),n.config.value.autoCreate=i;let o=(0,ce.moment)().locale(Pt).startOf("day");return n.getNotePath(n?.get(o)).replace(/\.md$/,"")}var y=require("obsidian");var h=require("obsidian");var pe=class extends h.AbstractInputSuggest{getSuggestions(e){let n=this.app.vault.getAllLoadedFiles(),i=[],o=e.toLowerCase();return n.forEach(s=>{s instanceof h.TFile&&["md","canvas","base"].contains(s.extension)&&s.path.toLowerCase().contains(o)&&i.push(s)}),i}renderSuggestion(e,n){e.extension=="md"?n.setText(D(e)):(n.setText(e.path.split(".").slice(0,-1).join(".")),n.insertAdjacentHTML("beforeend",``))}selectSuggestion(e){this.textInputEl.value=D(e),this.textInputEl.trigger("input"),this.close()}},ue=class extends h.AbstractInputSuggest{getSuggestions(e){let n=e.toLowerCase();return this.app.vault.getAllFolders().filter(i=>i.path.toLowerCase().contains(n))}renderSuggestion(e,n){n.setText(e.path)}selectSuggestion(e){this.textInputEl.value=e.path,this.textInputEl.trigger("input"),this.close()}},ge=class extends h.AbstractInputSuggest{getSuggestions(e){let n=Object.keys(this.app.internalPlugins.plugins.workspaces?.instance.workspaces),i=e.toLowerCase();return n.filter(o=>o.toLowerCase().contains(i))}renderSuggestion(e,n){n.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},me=class extends h.AbstractInputSuggest{getSuggestions(e){let n=this.app.plugins.plugins.journals.journals.map(o=>o.name),i=e.toLowerCase();return n.filter(o=>o.toLowerCase().contains(i))}renderSuggestion(e,n){n.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},Ke={["File"]:pe,["Workspace"]:ge,["Random in folder"]:ue,["Journal"]:me},z=class{constructor(t){this.app=t.plugin.app,this.homepage=t.plugin.homepage,this.tab=t,this.container=t.containerEl.createDiv({cls:"nv-command-box"}),this.dropzone=document.createElement("div"),this.dropzone.className="nv-command-pill nv-dropzone",this.dropzone.addEventListener("dragenter",e=>e.preventDefault()),this.dropzone.addEventListener("dragover",e=>e.preventDefault()),this.dropzone.addEventListener("drop",()=>this.terminateDrag()),this.update()}update(){this.container.innerHTML="",this.activeDrag=null,this.activeCommand=null;for(let t of this.homepage.data.commands){let e=this.app.commands.findCommand(t.id),n=this.container.createDiv({cls:"nv-command-pill",attr:{draggable:!0}});n.addEventListener("dragstart",o=>{o.dataTransfer.effectAllowed="move",this.activeCommand=this.homepage.data.commands.splice(this.indexOf(n),1)[0],this.activeDrag=n,this.dropzone.style.width=`${n.clientWidth}px`,this.dropzone.style.height=`${n.clientHeight}px`}),n.addEventListener("dragover",o=>this.moveDropzone(n,o)),n.addEventListener("drop",o=>o.preventDefault()),n.addEventListener("dragend",()=>this.terminateDrag()),n.createSpan({cls:"nv-command-text",text:e?.name??t.id});let i=new h.ButtonComponent(n).setIcon("route").setClass("clickable-icon").setClass("nv-command-period").onClick(o=>this.showMenu(t,o,i));t.period!="Both"&&(i.setClass("nv-command-selected"),i.setIcon(""),i.buttonEl.createSpan({text:t.period})),new h.ButtonComponent(n).setIcon("trash-2").setClass("clickable-icon").setClass("nv-command-delete").onClick(()=>this.delete(t)),e||(n.classList.add("nv-command-invalid"),n.prepend((0,h.getIcon)("ban")),(0,h.setTooltip)(n,"This command can't be found, so it won't be executed. It may belong to a disabled plugin.",{delay:.001}))}new h.ButtonComponent(this.container).setClass("nv-command-add-button").setButtonText("Add...").onClick(()=>{new he(this.tab).open()})}delete(t){this.homepage.data.commands.remove(t),this.homepage.save(),this.update()}showMenu(t,e,n){let i=new h.Menu;for(let s of Object.values(q))i.addItem(c=>{c.setTitle(s),c.setChecked(t.period==s),c.onClick(()=>{t.period=s,this.homepage.save(),this.update()})});let o=n.buttonEl.getBoundingClientRect();i.showAtPosition({x:o.x-22,y:o.y+o.height+8})}indexOf(t){return Array.from(this.container.children).indexOf(t)}moveDropzone(t,e){if(!this.activeDrag)return;this.activeDrag.hidden=!0;let n=t.getBoundingClientRect();e.xawait this.copyDebugInfo()})}sanitiseNote(e){return e===null||e.match(/^\s*$/)!==null?null:(0,y.normalizePath)(e)}display(){let e=this.plugin.homepage.data.kind,n=K(this.plugin),i=!1,o=Ke[e];this.containerEl.empty(),this.elements={};let s=new y.Setting(this.containerEl).setName("Homepage").addDropdown(async r=>{for(let d of Object.values(M)){if(!this.plugin.hasRequiredPlugin(d))if(d==this.plugin.homepage.data.kind)i=!0;else{r.selectEl.createEl("option",{text:d,attr:{disabled:!0}});continue}r.addOption(d,d)}r.setValue(this.plugin.homepage.data.kind),r.onChange(async d=>{this.plugin.homepage.data.kind=d,d=="Random file"&&(this.plugin.homepage.data.value=""),await this.plugin.homepage.save(),this.display()})});s.settingEl.id="nv-main-setting";let c=s.settingEl.createEl("article",{text:Tt[e],attr:{id:"nv-desc"}});i&&c.createDiv({text:"The plugin required for this homepage type isn't available.",cls:"mod-warning"}),ye.includes(e)?s.addText(r=>{r.setDisabled(!0)}):s.addText(r=>{new o(this.app,r.inputEl),r.setPlaceholder(L.value),r.setValue(L.value==this.plugin.homepage.data.value?"":this.plugin.homepage.data.value),r.onChange(async d=>{this.plugin.homepage.data.value=this.sanitiseNote(d)||L.value,await this.plugin.homepage.save()})}),this.addToggle("Open on startup","When launching Obsidian, open the homepage.","openOnStartup",r=>this.display()),n&&(this.elements.openOnStartup.descEl.createDiv({text:`This setting has been disabled, as it isn't compatible with Daily Notes' "Open daily note on startup" functionality. To use it, disable the Daily Notes setting.`,attr:{class:"mod-warning"}}),this.disableSetting("openOnStartup")),this.addToggle("Open when empty","When there are no tabs open, open the homepage.","openWhenEmpty"),this.addToggle("Use when opening normally","Use homepage settings when opening it normally, such as from a link or the file browser.","alwaysApply");let u=new y.Setting(this.containerEl).setName("Separate mobile homepage").setDesc("For mobile devices, store the homepage and its settings separately.").addToggle(r=>r.setValue(this.plugin.settings.separateMobile).onChange(async d=>{this.plugin.settings.separateMobile=d,this.plugin.homepage=this.plugin.getHomepage(),await this.plugin.saveSettings(),this.display()}));if(this.plugin.settings.separateMobile){let r=y.Platform.isMobile?"desktop":"mobile",d=document.createElement("div");u.setClass("nv-mobile-setting"),d.className="mod-warning nv-mobile-info",d.innerHTML=`Mobile settings are stored separately. Therefore, changes to other settings will not affect - ${r} devices. To edit ${r} settings, use a ${r} device.`,u.settingEl.append(d)}this.addHeading("Commands","commandsHeading"),this.containerEl.createDiv({cls:"nv-command-desc setting-item-description",text:"Select commands that will be executed when opening the homepage."}),this.commandBox=new z(this),this.addHeading("Vault environment","vaultHeading"),this.addDropdown("Opening method","Determine how extant tabs and views are affected on startup.","openMode",$),this.addDropdown("Manual opening method","Determine how extant tabs and views are affected when opening with commands or the ribbon button.","manualOpenMode",$),this.addToggle("Pin","Pin the homepage when opening.","pin"),this.addToggle("Hide release notes","Never display release notes when Obsidian updates.","hideReleaseNotes"),this.addToggle("Auto-create","When the homepage doesn't exist, create a note with its name.","autoCreate"),this.elements.autoCreate.descEl.createDiv({text:"If this vault is synced using unofficial services, this may lead to content being overwritten.",cls:"mod-warning"}),this.addHeading("Opened view","paneHeading"),this.addDropdown("Homepage view","Choose what view to open the homepage in.","view",we),this.addToggle("Revert view on close","When navigating away from the homepage, restore the default view.","revertView"),this.addToggle("Auto-scroll","When opening the homepage, scroll to the bottom and focus on the last line.","autoScroll"),"dataview"in this.plugin.communityPlugins&&(this.addToggle("Refresh Dataview","Always attempt to reload Dataview views when opening the homepage.","refreshDataview"),this.elements.refreshDataview.descEl.createDiv({text:"Requires Dataview auto-refresh to be enabled.",attr:{class:"mod-warning"}})),y.Platform.isMobile||new y.ButtonComponent(this.containerEl).setButtonText("Copy debug info").setClass("nv-debug-button").onClick(async()=>await this.copyDebugInfo()),["Workspace","Nothing"].includes(e)&&this.disableSettings("openWhenEmpty","alwaysApply","vaultHeading","openMode","manualOpenMode","autoCreate","pin"),["Workspace","Nothing","Graph view"].includes(e)&&this.disableSettings("paneHeading","view","revertView","autoScroll","refreshDataview"),(!this.plugin.homepage.data.openOnStartup||n)&&this.disableSetting("openMode"),(B.includes(e)||e==="Journal")&&this.disableSetting("autoCreate")}disableSetting(e){this.elements[e]?.settingEl.setAttribute("nv-greyed","")}disableSettings(...e){e.forEach(n=>this.disableSetting(n))}addHeading(e,n){let i=new y.Setting(this.containerEl).setHeading().setName(e);this.elements[n]=i}addDropdown(e,n,i,o,s){let c=new y.Setting(this.containerEl).setName(e).setDesc(n).addDropdown(async u=>{for(let r of Object.values(o))u.addOption(r,r);u.setValue(this.plugin.homepage.data[i]),u.onChange(async r=>{this.plugin.homepage.data[i]=r,await this.plugin.homepage.save(),s&&s(r)})});return this.elements[i]=c,c}addToggle(e,n,i,o){let s=new y.Setting(this.containerEl).setName(e).setDesc(n).addToggle(c=>c.setValue(this.plugin.homepage.data[i]).onChange(async u=>{this.plugin.homepage.data[i]=u,await this.plugin.homepage.save(),o&&o(u)}));return this.elements[i]=s,s}async copyDebugInfo(){let e=this.app.vault.config,n={...this.settings,_defaultViewMode:e.defaultViewMode||"default",_livePreview:e.livePreview!==void 0?e.livePreview:"default",_focusNewTab:e.focusNewTab!==void 0?e.focusNewTab:"default",_plugins:Object.keys(this.plugin.communityPlugins),_internalPlugins:Object.values(this.plugin.internalPlugins).flatMap(i=>i.enabled?[i.instance.id]:[]),_obsidianVersion:window.electron?.ipcRenderer.sendSync("version")||"unknown"};await navigator.clipboard.writeText(JSON.stringify(n)),new y.Notice("Copied homepage debug information to clipboard")}};var Dt=["markdown","canvas","kanban","bases"],V="Main Homepage",Y="Mobile Homepage",$=(n=>(n.ReplaceAll="Replace all open notes",n.ReplaceLast="Replace last note",n.Retain="Keep open notes",n))($||{}),we=(i=>(i.Default="Default view",i.Reading="Reading view",i.Source="Editing view (Source)",i.LivePreview="Editing view (Live Preview)",i))(we||{}),M=(m=>(m.File="File",m.Workspace="Workspace",m.Random="Random file",m.RandomFolder="Random in folder",m.Graph="Graph view",m.None="Nothing",m.Journal="Journal",m.DailyNote="Daily Note",m.WeeklyNote="Weekly Note",m.MonthlyNote="Monthly Note",m.YearlyNote="Yearly Note",m))(M||{}),q=(n=>(n.Both="Both",n.Startup="Startup only",n.Manual="Manual only",n))(q||{}),ye=["Random file","Graph view","Nothing",...B],W=class{constructor(t,e){this.lastView=void 0;this.openedViews=new WeakMap;this.name=t,this.plugin=e,this.app=e.app;let n=this.plugin.settings.homepages[t];n?this.data=Object.assign({},L,n):(this.plugin.settings.homepages[t]={...L},this.data=this.plugin.settings.homepages[t])}async open(t=!1){if(this.plugin.hasRequiredPlugin(this.data.kind)){if(this.data.kind==="Journal"&&!Ue(this)){new v.Notice(`Cannot find the journal "${this.data.value}" to use as the homepage.`);return}}else{new v.Notice("Homepage cannot be opened due to plugin unavailablity.");return}if(this.data.kind==="Workspace")await this.launchWorkspace();else if(this.data.kind!=="Nothing"){let n=this.plugin.loaded?this.data.manualOpenMode:this.data.openMode;t&&(n="Keep open notes"),await this.launchLeaf(n)}if(this.data.commands.length<1)return;let e=this.plugin.loaded?"Startup only":"Manual only";await Te(this.app);for(let{id:n,period:i}of this.data.commands)i!==e&&this.app.commands.executeCommandById(n)}async launchWorkspace(){let t=this.plugin.internalPlugins.workspaces?.instance;if(!(this.data.value in t.workspaces)){new v.Notice(`Cannot find the workspace "${this.data.value}" to use as the homepage.`);return}t.loadWorkspace(this.data.value),await U(100)}async launchLeaf(t){let e;if(this.computedValue=await this.computeValue(),this.plugin.executing=!0,!(K(this.plugin)&&!this.plugin.loaded)){if(t!=="Replace all open notes"){let n=this.getOpened();if(n.length>0){this.app.workspace.setActiveLeaf(n[0]),await this.configure(n[0]);return}else t=="Keep open notes"&&ke(this.app)&&(t="Replace last note")}t!=="Keep open notes"&&this.app.workspace.getActiveViewOfType(v.View)?.leaf.setPinned(!1),t==="Replace all open notes"&&(this.app.workspace?.floatingSplit?.children&&(await U(0),this.app.workspace.floatingSplit.children.forEach(n=>n.win.close())),await Pe(this.app),await U(0)),this.data.kind==="Graph view"?e=await this.launchGraph(t):e=await this.launchNote(t),e&&await this.configure(e)}}async launchGraph(t){if(t==="Keep open notes"){let e=this.app.workspace.getLeaf("tab");this.app.workspace.setActiveLeaf(e)}return this.app.commands.executeCommandById("graph:open"),this.app.workspace.getActiveViewOfType(v.View)?.leaf}async launchNote(t){let e=this.app.metadataCache.getFirstLinkpathDest(this.computedValue,"/");if(!e){if(!this.data.autoCreate){new v.Notice(`Homepage "${this.computedValue}" does not exist.`);return}e=await this.app.vault.create(be(this.computedValue),"")}let n=await this.app.vault.cachedRead(e),i=this.app.workspace.getLeaf(t=="Keep open notes");return await i.openFile(e),this.app.workspace.setActiveLeaf(i),n!==await this.app.vault.read(e)&&await this.app.vault.modify(e,n),i}async configure(t){this.plugin.executing=!1;let e=t.view;if(!(e instanceof v.MarkdownView)){this.data.pin&&e.leaf.setPinned(!0),this.configurePlugins();return}let n=e.getState();if(this.data.revertView&&(this.lastView=new WeakRef(e)),this.data.autoScroll){let i=e.editor.lineCount();n.mode=="preview"?e.previewMode.applyScroll(i-4):(e.editor.setCursor(i),e.editor.focus())}if(this.data.pin&&e.leaf.setPinned(!0),this.data.view!=="Default view"){switch(this.data.view){case"Editing view (Live Preview)":case"Editing view (Source)":n.mode="source",n.source=this.data.view!="Editing view (Live Preview)";break;case"Reading view":n.mode="preview";break}await e.leaf.setViewState({type:"markdown",state:n})}this.configurePlugins()}configurePlugins(){this.plugin.loaded&&this.data.refreshDataview&&this.plugin.communityPlugins.dataview?.index.touch(),this.plugin.communityPlugins["obsidian-file-color"]?.generateColorStyles()}getOpened(){return this.data.kind=="Graph view"?this.app.workspace.getLeavesOfType("graph"):Dt.flatMap(e=>this.app.workspace.getLeavesOfType(e)).filter(e=>{let n=e.view.getState().file;return ee(n.endsWith("md")?n.slice(0,-3):n,this.computedValue)})}async computeValue(){let t=this.data.value,e;switch(this.data.kind){case"Random file":e=X(this.app),e&&(t=e);break;case"Random in folder":e=X(this.app,t),e&&(t=e);break;case"Journal":t=await Be(t,this.plugin);break;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":t=await Ve(this.data.kind,this.plugin);break}return t}async save(){this.plugin.settings.homepages[this.name]=this.data,await this.plugin.saveSettings()}async setToActiveFile(){this.data.value=D(this.app.workspace.getActiveFile()),await this.save(),new v.Notice(`The homepage has been changed to "${this.data.value}".`)}canSetToFile(){return this.app.workspace.getActiveFile()!==null&&!ye.includes(this.data.kind)}async revertView(){if(this.lastView==null||this.data.view=="Default view")return;let t=this.lastView.deref();if(!t||ee(D(t.file),this.computedValue))return;let e=t.getState(),n=this.app.vault.config,i=n.defaultViewMode||"source",o=n.livePreview!==void 0?!n.livePreview:!1;t.leaf.getViewState().type=="markdown"&&(i!=e.mode||o!=e.source)&&(e.mode=i,e.source=o,await t.leaf.setViewState({type:"markdown",state:e,active:!0})),this.lastView=void 0}async openWhenEmpty(){if(!this.plugin.loaded||this.plugin.executing)return;let t=this.app.workspace.getActiveViewOfType(v.View)?.leaf;t?.getViewState().type!=="empty"||t.parentSplit.children.length!=1||await this.open(!0)}async apply(){let t=this.app.workspace.getActiveViewOfType(v.FileView);if(!t)return;let e=D(t.file);this.openedViews.get(t)!==e&&(this.openedViews.set(t,e),e===await this.computeValue()&&this.plugin.loaded&&!this.plugin.executing&&await this.configure(t.leaf))}};var Et='',J=class extends N.Plugin{constructor(){super(...arguments);this.newRelease=!1;this.loaded=!1;this.executing=!1;this.onLayoutChange=async()=>{this.homepage.data.revertView&&await this.homepage.revertView(),this.homepage.data.openWhenEmpty&&await this.homepage.openWhenEmpty(),this.homepage.data.alwaysApply&&await this.homepage.apply()};this.hideInterstitial=()=>{this.interstitial?.detach(),window.removeEventListener("error",this.hideInterstitial)}}async onload(){let e=this.app.workspace.layoutReady;e||this.showInterstitial(),this.patchReleaseNotes(),this.settings=await this.loadSettings(),this.internalPlugins=this.app.internalPlugins.plugins,this.communityPlugins=this.app.plugins.plugins,this.homepage=this.getHomepage(),this.app.workspace.onLayoutReady(async()=>{let n=this.homepage.data.openOnStartup&&!e&&!await this.hasUrlParams();this.patchNewTabPage(),n&&await this.homepage.open(),this.loaded=!0,this.unpatchReleaseNotes(),this.hideInterstitial()}),(0,N.addIcon)("homepage",Et),this.addRibbonIcon("homepage","Open homepage",n=>this.homepage.open(n.button==1||n.button==2||N.Keymap.isModifier(n,"Mod"))).setAttribute("id","nv-homepage-icon"),this.registerEvent(this.app.workspace.on("layout-change",this.onLayoutChange)),this.addSettingTab(new G(this.app,this)),this.addCommand({id:"open-homepage",name:"Open homepage",callback:()=>this.homepage.open()}),this.addCommand({id:"set-to-active-file",name:"Set to active file",checkCallback:n=>{if(n)return this.homepage.canSetToFile();this.homepage.setToActiveFile()}})}async onunload(){this.app.workspace.off("layout-change",this.onLayoutChange),this.unpatchNewTabPage()}getHomepage(){return this.settings.separateMobile&&N.Platform.isMobile?(Y in this.settings.homepages||(this.settings.homepages[Y]={...this.settings.homepages?.[V]},this.settings.homepages[Y].commands=[...this.settings.homepages?.[V]?.commands]),new W(Y,this)):new W(V,this)}async loadSettings(){let e=await this.loadData();return e?.version!==4?e?this.upgradeSettings(e):Object.assign({},fe):e}async saveSettings(){await this.saveData(this.settings)}showInterstitial(){this.interstitial=createDiv({cls:"nv-homepage-interstitial"}),document.body.append(this.interstitial),window.addEventListener("error",this.hideInterstitial)}async hasUrlParams(){let e,n;if(N.Platform.isMobile){let i=await window.Capacitor.Plugins.App.getLaunchUrl();if(!i)return!1;let o=new URL(i.url);n=Array.from(o.searchParams.keys()),e=o.hostname}else if(window.OBS_ACT)n=Object.keys(window.OBS_ACT),e=window.OBS_ACT.action;else return!1;return["open","advanced-uri"].includes(e)&&["file","filepath","workspace"].some(i=>n.includes(i))}hasRequiredPlugin(e){switch(e){case"Workspace":return this.internalPlugins.workspaces?.enabled;case"Graph view":return this.internalPlugins.graph?.enabled;case"Journal":return this.communityPlugins.journals;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":return Ye(e,this);default:return!0}}patchNewTabPage(){let e=this.communityPlugins["new-tab-default-page"];e&&(e.nvOrig_checkForNewTab=e.checkForNewTab,e.checkForNewTab=async n=>{if(!(this&&this.executing))return await e.nvOrig_checkForNewTab(n)})}unpatchNewTabPage(){let e=this.communityPlugins["new-tab-default-page"];e&&(e.checkForNewTab=e._checkForNewTab)}patchReleaseNotes(){this.app.nvOrig_showReleaseNotes=this.app.showReleaseNotes,this.app.showReleaseNotes=()=>this.newRelease=!0}unpatchReleaseNotes(){this.newRelease&&!this.homepage.data.hideReleaseNotes&&this.app.nvOrig_showReleaseNotes(),this.app.showReleaseNotes=this.app.nvOrig_showReleaseNotes}upgradeSettings(e){if(e.version==3){let i=e,o=!1;for(let s of Object.values(i.homepages))s.commands=s.commands.map(c=>({id:c,period:"Both"})),s.kind==We&&(o=!0,s.kind="Daily Note");return o&&new N.Notice(de),i.version=4,this.saveData(i),i}let n=Object.assign({},fe);return e.workspaceEnabled?(e.value=e.workspace,e.kind="Workspace"):e.momentFormat?(e.kind="Daily Note",new N.Notice(de)):(e.value=e.defaultNote,e.kind="File"),e.commands=[],delete e.workspace,delete e.momentFormat,delete e.defaultNote,delete e.useMoment,delete e.workspaceEnabled,n.homepages[V]=e,this.saveData(n),n}}; +"use strict";var Qe=Object.create;var z=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var Ze=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty;var tt=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),at=(n,e)=>{for(var t in e)z(n,t,{get:e[t],enumerable:!0})},ve=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xe(e))!et.call(n,i)&&i!==t&&z(n,i,{get:()=>e[i],enumerable:!(a=$e(e,i))||a.enumerable});return n};var nt=(n,e,t)=>(t=n!=null?Qe(Ze(n)):{},ve(e||!n||!n.__esModule?z(t,"default",{value:n,enumerable:!0}):t,n)),it=n=>ve(z({},"__esModule",{value:!0}),n);var Ie=tt(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var m=require("obsidian"),ie="YYYY-MM-DD",oe="gggg-[W]ww",Te="YYYY-MM",Se="YYYY-[Q]Q",Me="YYYY";function H(n){let e=window.app.plugins.getPlugin("periodic-notes");return e&&e.settings?.[n]?.enabled}function W(){try{let{internalPlugins:n,plugins:e}=window.app;if(H("daily")){let{format:o,folder:s,template:c}=e.getPlugin("periodic-notes")?.settings?.daily||{};return{format:o||ie,folder:s?.trim()||"",template:c?.trim()||""}}let{folder:t,format:a,template:i}=n.getPluginById("daily-notes")?.instance?.options||{};return{format:a||ie,folder:t?.trim()||"",template:i?.trim()||""}}catch(n){console.info("No custom daily note settings found!",n)}}function I(){try{let n=window.app.plugins,e=n.getPlugin("calendar")?.options,t=n.getPlugin("periodic-notes")?.settings?.weekly;if(H("weekly"))return{format:t.format||oe,folder:t.folder?.trim()||"",template:t.template?.trim()||""};let a=e||{};return{format:a.weeklyNoteFormat||oe,folder:a.weeklyNoteFolder?.trim()||"",template:a.weeklyNoteTemplate?.trim()||""}}catch(n){console.info("No custom weekly note settings found!",n)}}function V(){let n=window.app.plugins;try{let e=H("monthly")&&n.getPlugin("periodic-notes")?.settings?.monthly||{};return{format:e.format||Te,folder:e.folder?.trim()||"",template:e.template?.trim()||""}}catch(e){console.info("No custom monthly note settings found!",e)}}function _(){let n=window.app.plugins;try{let e=H("quarterly")&&n.getPlugin("periodic-notes")?.settings?.quarterly||{};return{format:e.format||Se,folder:e.folder?.trim()||"",template:e.template?.trim()||""}}catch(e){console.info("No custom quarterly note settings found!",e)}}function U(){let n=window.app.plugins;try{let e=H("yearly")&&n.getPlugin("periodic-notes")?.settings?.yearly||{};return{format:e.format||Me,folder:e.folder?.trim()||"",template:e.template?.trim()||""}}catch(e){console.info("No custom yearly note settings found!",e)}}function Fe(...n){let e=[];for(let a=0,i=n.length;a{let ee=a(),te=n.clone().set({hour:ee.get("hour"),minute:ee.get("minute"),second:ee.get("second")});return M&&te.add(parseInt(D,10),v),y?te.format(y.substring(1).trim()):te.format(o)}).replace(/{{\s*yesterday\s*}}/gi,n.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,n.clone().add(1,"d").format(o)));return e.foldManager.save(f,d),f}catch(f){console.error(`Failed to create file: '${h}'`,f),new m.Notice("Unable to create new file.")}}function pt(n,e){return e[P(n,"day")]??null}function dt(){let{vault:n}=window.app,{folder:e}=W(),t=n.getAbstractFileByPath(m.normalizePath(e));if(!t)throw new se("Failed to find daily notes folder");let a={};return m.Vault.recurseChildren(t,i=>{if(i instanceof m.TFile){let o=L(i,"day");if(o){let s=P(o,"day");a[s]=i}}}),a}var re=class extends Error{};function ut(){let{moment:n}=window,e=n.localeData()._week.dow,t=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;e;)t.push(t.shift()),e--;return t}function gt(n){return ut().indexOf(n.toLowerCase())}async function Le(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=I(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*title\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(h,f,g)=>{let T=gt(f);return n.weekday(T).format(g.trim())}));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function mt(n,e){return e[P(n,"week")]??null}function ht(){let n={};if(!Re())return n;let{vault:e}=window.app,{folder:t}=I(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new re("Failed to find weekly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"week");if(o){let s=P(o,"week");n[s]=i}}}),n}var le=class extends Error{};async function Ce(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=V(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function ft(n,e){return e[P(n,"month")]??null}function wt(){let n={};if(!xe())return n;let{vault:e}=window.app,{folder:t}=V(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new le("Failed to find monthly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"month");if(o){let s=P(o,"month");n[s]=i}}}),n}var ce=class extends Error{};async function yt(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=_(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function vt(n,e){return e[P(n,"quarter")]??null}function bt(){let n={};if(!He())return n;let{vault:e}=window.app,{folder:t}=_(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new ce("Failed to find quarterly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"quarter");if(o){let s=P(o,"quarter");n[s]=i}}}),n}var pe=class extends Error{};async function Nt(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=U(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function Dt(n,e){return e[P(n,"year")]??null}function kt(){let n={};if(!We())return n;let{vault:e}=window.app,{folder:t}=U(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new pe("Failed to find yearly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"year");if(o){let s=P(o,"year");n[s]=i}}}),n}function Pt(){let{app:n}=window,e=n.internalPlugins.plugins["daily-notes"];if(e&&e.enabled)return!0;let t=n.plugins.getPlugin("periodic-notes");return t&&t.settings?.daily?.enabled}function Re(){let{app:n}=window;if(n.plugins.getPlugin("calendar"))return!0;let e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.weekly?.enabled}function xe(){let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.monthly?.enabled}function He(){let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.quarterly?.enabled}function We(){let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.yearly?.enabled}function Tt(n){let e={day:W,week:I,month:V,quarter:_,year:U}[n];return e()}function St(n,e){return{day:Ae,month:Ce,week:Le}[n](e)}l.DEFAULT_DAILY_NOTE_FORMAT=ie;l.DEFAULT_MONTHLY_NOTE_FORMAT=Te;l.DEFAULT_QUARTERLY_NOTE_FORMAT=Se;l.DEFAULT_WEEKLY_NOTE_FORMAT=oe;l.DEFAULT_YEARLY_NOTE_FORMAT=Me;l.appHasDailyNotesPluginLoaded=Pt;l.appHasMonthlyNotesPluginLoaded=xe;l.appHasQuarterlyNotesPluginLoaded=He;l.appHasWeeklyNotesPluginLoaded=Re;l.appHasYearlyNotesPluginLoaded=We;l.createDailyNote=Ae;l.createMonthlyNote=Ce;l.createPeriodicNote=St;l.createQuarterlyNote=yt;l.createWeeklyNote=Le;l.createYearlyNote=Nt;l.getAllDailyNotes=dt;l.getAllMonthlyNotes=wt;l.getAllQuarterlyNotes=bt;l.getAllWeeklyNotes=ht;l.getAllYearlyNotes=kt;l.getDailyNote=pt;l.getDailyNoteSettings=W;l.getDateFromFile=L;l.getDateFromPath=ct;l.getDateUID=P;l.getMonthlyNote=ft;l.getMonthlyNoteSettings=V;l.getPeriodicNoteSettings=Tt;l.getQuarterlyNote=vt;l.getQuarterlyNoteSettings=_;l.getTemplateInfo=A;l.getWeeklyNote=mt;l.getWeeklyNoteSettings=I;l.getYearlyNote=Dt;l.getYearlyNoteSettings=U});var At={};at(At,{default:()=>Z});module.exports=it(At);var S=require("obsidian");var N=require("obsidian");var F=require("obsidian");function k(n){return n?n.extension=="md"?n.path.slice(0,-3):n.path:""}function be(n){return n.split("/").slice(-1)[0].contains(".")?n:`${n}.md`}function ae(n,e=void 0){let t=n.vault.getFiles();if(e){let a=n.vault.getFolderByPath(e);if(!a)return;t=Ne(a)}if(t.filter(a=>["md","canvas","base"].contains(a.extension)),t.length){let a=Math.floor(Math.random()*t.length);return k(t[a])}}function Ne(n){let e=[];for(let t of n.children)t instanceof F.TFile?e.push(t):t instanceof F.TFolder&&e.push(...Ne(t));return e}function De(n){return n.workspace.getActiveViewOfType(F.View)?.getViewType()=="empty"}function ne(n,e){return n.localeCompare(e,void 0,{sensitivity:"accent"})===0}function q(n){return new Promise(e=>window.setTimeout(e,n))}async function ke(n){let e=n.workspace.getLayout();e.main={id:"5324373015726ba8",type:"split",children:[{id:"4509724f8bf84da7",type:"tabs",children:[{id:"e7a7b303c61786dc",type:"leaf",state:{type:"empty",state:{},icon:"lucide-file",title:"New tab"}}]}],direction:"vertical"},e.active="e7a7b303c61786dc",await n.workspace.changeLayout(e),F.Platform.isMobile&&(n.workspace.rightSplit?.updateInfo(),ot(n))}function ot(n){let e=n.internalPlugins.plugins.sync?.instance;e&&n.workspace.onLayoutReady(()=>{e.statusIconEl=n.workspace.rightSplit.addHeaderButton("sync-small",e.openStatusIconMenu.bind(e)),e.statusIconEl.addEventListener("contextmenu",e.openStatusIconMenu.bind(e)),e.statusIconEl.addClass("sync-status-icon")})}function Pe(n){let e=n.internalPlugins.plugins.sync,t=[new Promise(a=>{let i=async()=>{a(),n.workspace.off("layout-change",i)};n.workspace.on("layout-change",i)})];return e.enabled&&e.instance.syncing&&t.push(new Promise(a=>{let i=async()=>{a(),e.instance.off("status-change",i)};e.instance.on("status-change",i)})),Promise.race([Promise.all(t),new Promise(a=>window.setTimeout(a,1500))])}var u=nt(Ie()),Mt="custom-journal-locale",de={"Daily Note":{noun:"day",adjective:"daily",create:u.createDailyNote,get:u.getDailyNote,getAll:u.getAllDailyNotes},"Weekly Note":{noun:"week",adjective:"weekly",create:u.createWeeklyNote,get:u.getWeeklyNote,getAll:u.getAllWeeklyNotes},"Monthly Note":{noun:"month",adjective:"monthly",create:u.createMonthlyNote,get:u.getMonthlyNote,getAll:u.getAllMonthlyNotes},"Yearly Note":{noun:"year",adjective:"yearly",create:u.createYearlyNote,get:u.getYearlyNote,getAll:u.getAllYearlyNotes}},J=["Daily Note","Weekly Note","Monthly Note","Yearly Note"],Ve="Date-dependent file";async function _e(n,e){let t=e.communityPlugins["periodic-notes"],a=de[n],i=window.moment().startOf(a.noun),o;if(Ye(t)){let s=a.getAll();Object.keys(s).length?o=a.get(i,s)||await a.create(i):o=await a.create(i),o||(o=a.get(i,s))}else t.cache.initialize(),o=t.getPeriodicNote(a.noun,i)||await t.createPeriodicNote(a.noun,i);return k(o)}function Ue(n,e){if(n=="Daily Note"&&e.internalPlugins["daily-notes"]?.enabled)return!0;let t=e.communityPlugins["periodic-notes"];if(!t)return!1;if(Ye(t)){let a=de[n].adjective;return t.settings[a]?.enabled}else{let a=de[n].noun;return t?.calendarSetManager?.getActiveSet()[a]?.enabled}}function Ye(n){return(n?.manifest.version||"0").startsWith("0")}function Be(n){return!!n.plugin.communityPlugins.journals.getJournal(n.data.value)}async function Ke(n,e){let t=e.communityPlugins.journals,a=t.getJournal(n),i=a.config.value.autoCreate;t.reprocessNotes(),a.config.value.autoCreate=!0,await a.autoCreate(),a.config.value.autoCreate=i;let o=window.moment().locale(Mt).startOf("day");return a.getNotePath(a?.get(o)).replace(/\.md$/,"")}var ue={"Replace all open notes":"Replace all open notes","Replace last note":"Replace last note","Keep open notes":"Keep open notes","Default view":"Default view","Reading view":"Reading view","Editing view (Source)":"Editing view (Source)","Editing view (Live Preview)":"Editing view (Live Preview)",File:"File",Workspace:"Workspace","Random file":"Random file","Random in folder":"Random in folder","New note":"New note","Graph view":"Graph view",Nothing:"Nothing",Journal:"Journal","Daily Note":"Daily Note","Weekly Note":"Weekly Note","Monthly Note":"Monthly Note","Yearly Note":"Yearly Note",Both:"Both","Startup only":"Startup only","Manual only":"Manual only",openHomepage:"Open homepage",setToActiveFile:"Set to active file",copyDebugInfo:"Copy debug info",cliOpenHomepageDesc:"Open the homepage",cliOpenHomepageResult:"Opened the homepage",cliReadHomepageDesc:"Read homepage contents",cliReadHomepageIllegible:"The current homepage cannot be viewed, as it does not match an file",pluginUnavailable:"The active homepage cannot be opened due to plugin unavailablity.",journalUnavailable:'Cannot find the journal "?0" to use as the homepage.',workspaceUnavailable:'Cannot find the workspace "?0" to use as the homepage.',noteUnavailable:'Cannot find the file "?0" to use as the homepage.',homepageChanged:'The homepage has been changed to "?0".',momentUpgradeNotice:"Date-dependent notes in Homepage have been removed. Set your homepage as a Periodic or Daily Note instead.",openOnStartup:"Open on startup",openOnStartupDesc:"When launching Obsidian, open the homepage.",openOnStartupWarn:'This will override the built-in "Default file to open" setting.',openWhenEmpty:"Open when empty",openWhenEmptyDesc:"When there are no tabs open, open the homepage.",alwaysApply:"Use when opening normally",alwaysApplyDesc:"Use homepage settings when opening it normally, such as from a link or the file browser.",separateMobile:"Separate mobile homepage",separateMobileDesc:"For mobile devices, store the homepage and its settings separately.",separateMobileWarnPrefix:"Mobile settings are stored separately.",separateMobileWarnMobile:"Therefore, changes to other settings will not affect desktop devices. To edit desktop settings, use a desktop device.",separateMobileWarnDesktop:"Therefore, changes to other settings will not affect mobile devices. To edit mobile settings, use a mobile device.",commandsGroup:"Commands",commandsDesc:"Select commands that will be executed when opening the homepage.",commandsAddButton:"Add...",commandUnavailable:"This command can't be found, so it won't be executed. It may belong to a disabled plugin.",commandsReally:"Really?",vaultGroup:"Vault environment",openMode:"Opening method",openModeDesc:"Determine how extant tabs and views are affected on startup.",manualOpenMode:"Manual opening method",manualOpenModeDesc:"Determine how extant tabs and views are affected when opening with commands or the ribbon button.",pin:"Pin",pinDesc:"Pin the homepage when opening.",hideReleaseNotes:"Hide release notes",hideReleaseNotesDesc:"Never display release notes when Obsidian updates.",autoCreate:"Auto-create",autoCreateDesc:"When the homepage doesn't exist, create a note with its name.",autoCreateWarn:"If this vault is synced using unofficial services, this may lead to content being overwritten.",openingGroup:"Opened view",view:"Homepage view",viewDesc:"Choose what view to open the homepage in.",revertView:"Revert view on close",revertViewDesc:"When navigating away from the homepage, restore the default view.",autoScroll:"Auto-scroll",autoScrollDesc:"When opening the homepage, scroll to the bottom and focus on the last line",refreshDataview:"Refresh Dataview",refreshDataviewDesc:"Always attempt to reload Dataview views when opening the homepage",refreshDataviewWarn:"Requires Dataview auto-refresh to be enabled.",FileDesc:"Enter a note, base, or canvas to use.",WorkspaceDesc:"Enter an Obsidian workspace to use.","New noteDesc":"Enter a prefix to use. A note using that prefix will be created for each Obsidian session.","Graph viewDesc":"Your graph view will be used.",NothingDesc:"Nothing will occur by default. Any commands added will still take effect.","Random fileDesc":"A random note, base, or canvas from your Obsidian folder will be selected.","Random in folderDesc":"Enter a folder. A random note, base, or canvas from it will be selected.",JournalDesc:"Enter a Journal to use.","Daily noteDesc":"Your Daily Note or Periodic Daily Note will be used.","Weekly noteDesc":"Your Periodic Weekly Note will be used.","Monthly noteDesc":"Your Periodic Monthly Note will be used.","Yearly noteDesc":"Your Periodic Yearly Note will be used.",homepageSettingTitle:"Homepage",pluginUnavailableSettings:"The plugin required for this homepage type isn't available.",copyDebugInfoNotice:"Copied homepage debug information to clipboard"};var je={"Replace all open notes":"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438","Replace last note":"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044E\u044E \u0437\u0430\u043C\u0435\u0442\u043A\u0443","Keep open notes":"\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438","Default view":"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","Reading view":"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440","Editing view (Source)":"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430","Editing view (Live Preview)":"\u0414\u0438\u043D\u0430\u043C\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",File:"\u0424\u0430\u0439\u043B",Workspace:"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","Random file":"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B","Random in folder":"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u043F\u0430\u043F\u043A\u0438","New note":"\u041D\u043E\u0432\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Graph view":"\u0413\u0440\u0430\u0444",Nothing:"\u041D\u0438\u0447\u0435\u0433\u043E",Journal:"\u0416\u0443\u0440\u043D\u0430\u043B","Daily Note":"\u0415\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Weekly Note":"\u0415\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Monthly Note":"\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Yearly Note":"\u0415\u0436\u0435\u0433\u043E\u0434\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430",Both:"\u041E\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u0430","Startup only":"\u0422\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435","Manual only":"\u0422\u043E\u043B\u044C\u043A\u043E \u0432\u0440\u0443\u0447\u043D\u0443\u044E",openHomepage:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",setToActiveFile:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0444\u0430\u0439\u043B",copyDebugInfo:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u043B\u0430\u0434\u043E\u0447\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E",pluginUnavailable:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443: \u043F\u043B\u0430\u0433\u0438\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",journalUnavailable:'\u0416\u0443\u0440\u043D\u0430\u043B "?0" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.',workspaceUnavailable:'\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E "?0" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.',noteUnavailable:'\u0424\u0430\u0439\u043B "?0" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.',homepageChanged:'\u0414\u043E\u043C\u0430\u0448\u043D\u044F\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0430 \u043D\u0430 "?0".',momentUpgradeNotice:"\u0417\u0430\u043C\u0435\u0442\u043A\u0438, \u0437\u0430\u0432\u0438\u0441\u044F\u0449\u0438\u0435 \u043E\u0442 \u0434\u0430\u0442\u044B, \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0438\u0437 Homepage. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043F\u0435\u0440\u0438\u043E\u0434\u0438\u0447\u0435\u0441\u043A\u0443\u044E \u0438\u043B\u0438 \u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0443\u044E \u0437\u0430\u043C\u0435\u0442\u043A\u0443.",openOnStartup:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435",openOnStartupDesc:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435 Obsidian.",openOnStartupWarn:"\u042D\u0442\u043E \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u0444\u0430\u0439\u043B\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.",openWhenEmpty:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0432\u043A\u043B\u0430\u0434\u043E\u043A",openWhenEmptyDesc:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443, \u0435\u0441\u043B\u0438 \u043D\u0435\u0442 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0432\u043A\u043B\u0430\u0434\u043E\u043A.",alwaysApply:"\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C \u043F\u0440\u0438 \u043E\u0431\u044B\u0447\u043D\u043E\u043C \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438",alwaysApplyDesc:"\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0438\u0437 \u0441\u0441\u044B\u043B\u043E\u043A \u0438\u043B\u0438 \u0444\u0430\u0439\u043B\u043E\u0432\u043E\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.",separateMobile:"\u041E\u0442\u0434\u0435\u043B\u044C\u043D\u0430\u044F \u0434\u043E\u043C\u0430\u0448\u043D\u044F\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0434\u043B\u044F \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0445 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432",separateMobileDesc:"\u0425\u0440\u0430\u043D\u0438\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0445 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432 \u0438 \u0435\u0451 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E.",separateMobileWarnPrefix:"\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0445\u0440\u0430\u043D\u044F\u0442\u0441\u044F \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E.",separateMobileWarnMobile:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0432\u043B\u0438\u044F\u044E\u0442 \u043D\u0430 \u043D\u0430\u0441\u0442\u043E\u043B\u044C\u043D\u044B\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043D\u0430\u0441\u0442\u043E\u043B\u044C\u043D\u043E\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F.",separateMobileWarnDesktop:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0432\u043B\u0438\u044F\u044E\u0442 \u043D\u0430 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F.",commandsGroup:"\u041A\u043E\u043C\u0430\u043D\u0434\u044B",commandsDesc:"\u041A\u043E\u043C\u0430\u043D\u0434\u044B, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u044B\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",commandsAddButton:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C...",commandUnavailable:"\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0430. \u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439 \u043F\u043B\u0430\u0433\u0438\u043D \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D.",commandsReally:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?",vaultGroup:"\u0421\u0440\u0435\u0434\u0430 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430",openMode:"\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F",openModeDesc:"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u0430\u043A \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0432\u043A\u043B\u0430\u0434\u043A\u0438 \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435.",manualOpenMode:"\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E",manualOpenModeDesc:"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u0430\u043A \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0432\u043A\u043B\u0430\u0434\u043A\u0438 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u0438\u043B\u0438 \u043A\u043D\u043E\u043F\u043A\u0443.",pin:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C",pinDesc:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438.",hideReleaseNotes:"\u0421\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u044F \u043A \u0432\u044B\u043F\u0443\u0441\u043A\u0443",hideReleaseNotesDesc:"\u041D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u044F \u043A \u0432\u044B\u043F\u0443\u0441\u043A\u0443 \u043F\u0440\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0438 Obsidian.",autoCreate:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u0435",autoCreateDesc:"\u0415\u0441\u043B\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0441\u043E\u0437\u0434\u0430\u0435\u0442 \u0435\u0451.",autoCreateWarn:"\u041F\u0440\u0438 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043D\u0435\u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044B \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u044C \u0434\u0430\u043D\u043D\u044B\u0445.",openingGroup:"\u0420\u0435\u0436\u0438\u043C \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438",view:"\u0420\u0435\u0436\u0438\u043C \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",viewDesc:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043C \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",revertView:"\u0412\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u0440\u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0438",revertViewDesc:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043F\u0440\u0438 \u0443\u0445\u043E\u0434\u0435 \u0441 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",autoScroll:"\u0410\u0432\u0442\u043E-scroll",autoScrollDesc:"\u041F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044C \u0432\u043D\u0438\u0437 \u0438 \u0444\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438.",refreshDataview:"\u041E\u0431\u043D\u043E\u0432\u043B\u044F\u0442\u044C Dataview",refreshDataviewDesc:"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F Dataview \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",refreshDataviewWarn:"\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u043E\u0435 \u0430\u0432\u0442\u043E\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 Dataview.",FileDesc:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0443, \u0431\u0430\u0437\u0443 \u0438\u043B\u0438 canvas.",WorkspaceDesc:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E Obsidian.","New noteDesc":"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u0440\u0435\u0444\u0438\u043A\u0441. \u041F\u0440\u0438 \u043A\u0430\u0436\u0434\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A\u0435 Obsidian \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u043E\u0432\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430 \u0441 \u044D\u0442\u0438\u043C \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u043E\u043C.","Graph viewDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D \u0433\u0440\u0430\u0444.",NothingDesc:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043F\u0440\u043E\u0438\u0437\u043E\u0439\u0434\u0435\u0442. \u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u0431\u0443\u0434\u0443\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u044B.","Random fileDesc":"\u0411\u0443\u0434\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430 Obsidian.","Random in folderDesc":"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u0430\u043F\u043A\u0443. \u0411\u0443\u0434\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u043D\u0435\u0451.",JournalDesc:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0436\u0443\u0440\u043D\u0430\u043B.","Daily noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.","Weekly noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.","Monthly noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.","Yearly noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u0433\u043E\u0434\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.",homepageSettingTitle:"Homepage",pluginUnavailableSettings:"\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u0439 \u043F\u043B\u0430\u0433\u0438\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",copyDebugInfoNotice:"\u041E\u0442\u043B\u0430\u0434\u043E\u0447\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430"};var qe=require("obsidian"),Ft={en:ue,ru:je},Ge,ze=!1;function r(n,...e){if(!ze){let a=(0,qe.getLanguage)()?.toLowerCase()?.split("-")[0]||"en";Ge=Ft[a],ze=!0}n=Ge?.[n]||ue[n];let t=0;for(let a of e)n=n.replace("?"+t,a),t++;return n}var b=require("obsidian");var w=require("obsidian");var Q=class extends w.AbstractInputSuggest{getSuggestions(e){let t=this.app.vault.getAllLoadedFiles(),a=[],i=e.toLowerCase();return t.forEach(o=>{o instanceof w.TFile&&["md","canvas","base"].contains(o.extension)&&o.path.toLowerCase().contains(i)&&a.push(o)}),a}renderSuggestion(e,t){if(e.extension=="md")t.setText(k(e));else{t.setText(e.path.split(".").slice(0,-1).join("."));let a=createDiv();a.className="nav-file-tag nv-homepage-file-tag",a.textContent=e.extension,t.append(a)}}selectSuggestion(e){this.textInputEl.value=k(e),this.textInputEl.trigger("input"),this.close()}},ge=class extends w.AbstractInputSuggest{getSuggestions(e){let t=e.toLowerCase();return this.app.vault.getAllFolders().filter(a=>a.path.toLowerCase().contains(t))}renderSuggestion(e,t){t.setText(e.path)}selectSuggestion(e){this.textInputEl.value=e.path,this.textInputEl.trigger("input"),this.close()}},me=class extends w.AbstractInputSuggest{getSuggestions(e){let t=Object.keys(this.app.internalPlugins.plugins.workspaces?.instance.workspaces),a=e.toLowerCase();return t.filter(i=>i.toLowerCase().contains(a))}renderSuggestion(e,t){t.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},he=class extends w.AbstractInputSuggest{getSuggestions(e){let a=this.app.plugins.plugins.journals.journals.map(o=>o.name),i=e.toLowerCase();return a.filter(o=>o.toLowerCase().contains(i))}renderSuggestion(e,t){t.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},Je={File:Q,Workspace:me,"Random in folder":ge,"New note":Q,Journal:he},$=class{constructor(e,t){this.app=e.plugin.app,this.homepage=e.plugin.homepage,this.tab=e,t.addSetting(a=>{a.settingEl.addClass("nv-command-setting"),a.descEl.addClass("nv-command-desc"),a.descEl.innerText=r("commandsDesc"),this.container=a.settingEl.createDiv({cls:"nv-command-box"})}),this.dropzone=createDiv(),this.dropzone.className="nv-command-pill nv-dropzone",this.dropzone.addEventListener("dragenter",a=>a.preventDefault()),this.dropzone.addEventListener("dragover",a=>a.preventDefault()),this.dropzone.addEventListener("drop",()=>this.terminateDrag()),this.update()}update(){this.container.innerHTML="",this.activeDrag=null,this.activeCommand=null;for(let e of this.homepage.data.commands){let t=this.app.commands.findCommand(e.id),a=this.container.createDiv({cls:"nv-command-pill",attr:{draggable:!0}});a.addEventListener("dragstart",o=>{o.dataTransfer.effectAllowed="move",this.activeCommand=this.homepage.data.commands.splice(this.indexOf(a),1)[0],this.activeDrag=a,this.dropzone.style.width=`${a.clientWidth}px`,this.dropzone.style.height=`${a.clientHeight}px`}),a.addEventListener("dragover",o=>this.moveDropzone(a,o)),a.addEventListener("drop",o=>o.preventDefault()),a.addEventListener("dragend",()=>this.terminateDrag()),a.createSpan({cls:"nv-command-text",text:t?.name??e.id});let i=new w.ButtonComponent(a).setIcon("route").setClass("clickable-icon").setClass("nv-command-period").onClick(o=>this.showMenu(e,o,i));e.period!="Both"&&(i.setClass("nv-command-selected"),i.setIcon(""),i.buttonEl.createSpan({text:r(e.period)})),new w.ButtonComponent(a).setIcon("trash-2").setClass("clickable-icon").setClass("nv-command-delete").onClick(()=>this.delete(e)),t||(a.classList.add("nv-command-invalid"),a.prepend((0,w.getIcon)("ban")),(0,w.setTooltip)(a,r("commandUnavailable"),{delay:.001}))}new w.ButtonComponent(this.container).setClass("nv-command-add-button").setButtonText(r("commandsAddButton")).onClick(()=>{new fe(this.tab).open()})}delete(e){this.homepage.data.commands.remove(e),this.homepage.save(),this.update()}showMenu(e,t,a){let i=new w.Menu;for(let s of Object.values(R))i.addItem(c=>{c.setTitle(r(s)),c.setChecked(e.period==s),c.onClick(()=>{e.period=s,this.homepage.save(),this.update()})});let o=a.buttonEl.getBoundingClientRect();i.showAtPosition({x:o.x-22,y:o.y+o.height+8})}indexOf(e){return Array.from(this.container.children).indexOf(e)}moveDropzone(e,t){if(!this.activeDrag)return;this.activeDrag.hidden=!0;let a=e.getBoundingClientRect();t.xawait this.copyDebugInfo()})}sanitiseNote(t){return t===null||t.match(/^\s*$/)!==null?null:(0,b.normalizePath)(t)}display(){let t=this.plugin.homepage.data.kind,a=!1,i=Je[t];this.containerEl.empty(),new O(this).addSetting(d=>{d.setName(r("homepageSettingTitle")).addDropdown(async h=>{for(let f of Object.values(E)){if(!this.plugin.hasRequiredPlugin(f))if(f==this.plugin.homepage.data.kind)a=!0;else{h.selectEl.createEl("option",{text:r(f),attr:{disabled:!0}});continue}h.addOption(f,r(f))}h.setValue(this.plugin.homepage.data.kind),h.onChange(async f=>{this.plugin.homepage.data.kind=f,f=="Random file"&&(this.plugin.homepage.data.value=""),await this.plugin.homepage.save(),this.display()})}),d.settingEl.id="nv-main-setting";let p=d.settingEl.createEl("article",{text:r(t+"Desc"),attr:{id:"nv-desc"}});a&&p.createDiv({text:r("pluginUnavailableSettings"),cls:"mod-warning"}),ye.includes(t)?d.addText(h=>{h.setDisabled(!0)}):d.addText(h=>{new i(this.app,h.inputEl),h.setPlaceholder(x.value),h.setValue(x.value==this.plugin.homepage.data.value?"":this.plugin.homepage.data.value),h.onChange(async f=>{this.plugin.homepage.data.value=this.sanitiseNote(f)||x.value,await this.plugin.homepage.save()})})});let o=new O(this).addToggle("openOnStartup",d=>this.display()).addToggle("openWhenEmpty").addToggle("alwaysApply").addSetting(d=>{if(d.setName(r("separateMobile")).setDesc(r("separateMobileDesc")).addToggle(p=>p.setValue(this.plugin.settings.separateMobile).onChange(async h=>{this.plugin.settings.separateMobile=h,this.plugin.homepage=this.plugin.getHomepage(),await this.plugin.saveSettings(),this.display()})),this.plugin.settings.separateMobile){let p=createDiv();d.setClass("nv-mobile-setting"),p.className="mod-warning nv-mobile-info",p.createEl("b",{text:r("separateMobileWarnPrefix")}),p.append(" "+r(b.Platform.isMobile?"separateMobileWarnMobile":"separateMobileWarnDesktop")),d.settingEl.append(p)}});o.elements.openOnStartup.descEl.createDiv({text:r("openOnStartupWarn"),attr:{class:"mod-warning"}}),this.commandBox=new $(this,new O(this,"commandsGroup"));let s=new O(this,"vaultGroup").addDropdown("openMode",C).addDropdown("manualOpenMode",C).addToggle("pin").addToggle("hideReleaseNotes").addToggle("autoCreate");s.elements.autoCreate.descEl.createDiv({text:r("autoCreateWarn"),cls:"mod-warning"});let c=new O(this,"openingGroup").addDropdown("view",B).addToggle("revertView").addToggle("autoScroll");"dataview"in this.plugin.communityPlugins&&(c.addToggle("refreshDataview"),c.elements.refreshDataview.descEl.createDiv({text:r("refreshDataviewWarn"),attr:{class:"mod-warning"}})),b.Platform.isMobile||new b.ButtonComponent(this.containerEl).setButtonText(r("copyDebugInfo")).setClass("nv-debug-button").onClick(async()=>await this.copyDebugInfo()),["Workspace","Nothing"].includes(t)&&(o.disableSettings("openWhenEmpty","alwaysApply"),s.disableSettings("openMode","manualOpenMode","autoCreate","pin")),["Workspace","Nothing","Graph view"].includes(t)&&c.disableAll(),this.plugin.homepage.data.openOnStartup||s.disableSettings("openMode"),(J.includes(t)||t==="Journal")&&s.disableSettings("autoCreate")}async copyDebugInfo(){let t=this.app.vault.config,a={...this.plugin.settings,_defaultViewMode:t.defaultViewMode||"default",_livePreview:t.livePreview!==void 0?t.livePreview:"default",_focusNewTab:t.focusNewTab!==void 0?t.focusNewTab:"default",_plugins:Object.keys(this.plugin.communityPlugins),_internalPlugins:Object.values(this.plugin.internalPlugins).flatMap(i=>i.enabled?[i.instance.id]:[]),_obsidianVersion:b.apiVersion};await navigator.clipboard.writeText(JSON.stringify(a)),new b.Notice(r("copyDebugInfoNotice"))}},O=class extends b.SettingGroup{constructor(t,a){super(t.containerEl);this.elements={};a&&this.setHeading(r(a)),this.plugin=t.plugin}addDropdown(t,a,i){return this.addSetting(o=>{o.setName(r(t)).setDesc(r(t+"Desc")).addDropdown(async s=>{for(let c of Object.values(a))s.addOption(c,r(c));s.setValue(this.plugin.homepage.data[t]),s.onChange(async c=>{this.plugin.homepage.data[t]=c,await this.plugin.homepage.save(),i&&i(c)})}),this.elements[t]=o}),this}addToggle(t,a){return this.addSetting(i=>{i.setName(r(t)).setDesc(r(t+"Desc")).addToggle(o=>o.setValue(this.plugin.homepage.data[t]).onChange(async s=>{this.plugin.homepage.data[t]=s,await this.plugin.homepage.save(),a&&a(s)})),this.elements[t]=i}),this}disableAll(){this.disableSettings(...Object.keys(this.elements))}disableSettings(...t){t.forEach(a=>{this.elements[a]?.settingEl.setAttribute("nv-greyed","")})}};var Et=["markdown","canvas","kanban","bases"],j="Main Homepage",G="Mobile Homepage",C=(a=>(a.ReplaceAll="Replace all open notes",a.ReplaceLast="Replace last note",a.Retain="Keep open notes",a))(C||{}),B=(i=>(i.Default="Default view",i.Reading="Reading view",i.Source="Editing view (Source)",i.LivePreview="Editing view (Live Preview)",i))(B||{}),E=(g=>(g.File="File",g.Workspace="Workspace",g.Random="Random file",g.RandomFolder="Random in folder",g.NewNote="New note",g.Graph="Graph view",g.None="Nothing",g.Journal="Journal",g.DailyNote="Daily Note",g.WeeklyNote="Weekly Note",g.MonthlyNote="Monthly Note",g.YearlyNote="Yearly Note",g))(E||{}),R=(a=>(a.Both="Both",a.Startup="Startup only",a.Manual="Manual only",a))(R||{}),ye=["Random file","Graph view","Nothing",...J],Ot=["Nothing","Graph view","Workspace"],K=class{constructor(e,t){this.lastView=void 0;this.openedViews=new WeakMap;this.name=e,this.plugin=t,this.app=t.app;let a=this.plugin.settings.homepages[e];a?this.data=Object.assign({},x,a):(this.plugin.settings.homepages[e]={...x},this.data=this.plugin.settings.homepages[e])}async open(e=!1){if(this.plugin.hasRequiredPlugin(this.data.kind)){if(this.data.kind==="Journal"&&!Be(this)){new N.Notice(r("journalUnavailable",this.data.value));return}}else{new N.Notice(r("pluginUnavailable"));return}if(this.data.kind==="Workspace")await this.launchWorkspace();else if(this.data.kind!=="Nothing"){let a=this.plugin.loaded?this.data.manualOpenMode:this.data.openMode;e&&(a="Keep open notes"),await this.launchLeaf(a)}if(this.data.commands.length<1)return;let t=this.plugin.loaded?"Startup only":"Manual only";await Pe(this.app);for(let{id:a,period:i}of this.data.commands)i!==t&&this.app.commands.executeCommandById(a)}async launchWorkspace(){let e=this.plugin.internalPlugins.workspaces?.instance;if(!(this.data.value in e.workspaces)){new N.Notice(r("workspaceUnavailable",this.data.value));return}e.loadWorkspace(this.data.value),await q(100)}async launchLeaf(e){let t;if(this.computedValue=await this.computeValue(),this.plugin.executing=!0,e!=="Replace all open notes"){let a=this.getOpened();if(a.length>0){this.app.workspace.setActiveLeaf(a[0]),await this.configure(a[0]);return}else e=="Keep open notes"&&De(this.app)&&(e="Replace last note")}e!=="Keep open notes"&&this.app.workspace.getActiveViewOfType(N.View)?.leaf.setPinned(!1),e==="Replace all open notes"&&(this.app.workspace?.floatingSplit?.children&&(await q(0),this.app.workspace.floatingSplit.children.forEach(a=>a.win.close())),await ke(this.app),await q(0));try{this.data.kind==="Graph view"?t=await this.launchGraph(e):t=await this.launchNote(e),await this.configure(t)}catch{return}}async launchGraph(e){if(e==="Keep open notes"){let t=this.app.workspace.getLeaf("tab");this.app.workspace.setActiveLeaf(t)}return this.app.commands.executeCommandById("graph:open"),this.app.workspace.getActiveViewOfType(N.View).leaf}async launchNote(e){let t=this.app.metadataCache.getFirstLinkpathDest(this.computedValue,"/");if(!t){if(!this.data.autoCreate)throw new N.Notice(r("noteUnavailable",this.computedValue)),new Error(r("noteUnavailable",this.computedValue));t=await this.app.vault.create(be(this.computedValue),"")}let a=await this.app.vault.cachedRead(t),i=this.app.workspace.getLeaf(e=="Keep open notes");return await i.openFile(t),this.app.workspace.setActiveLeaf(i),a!==await this.app.vault.read(t)&&await this.app.vault.modify(t,a),i}async configure(e){this.plugin.executing=!1;let t=e.view,a=t.leaf.history;if(!(t instanceof N.MarkdownView)){this.data.pin&&t.leaf.setPinned(!0),this.configurePlugins();return}let i=t.getState();if(this.data.revertView&&(this.lastView=new WeakRef(t)),this.data.autoScroll){let o=t.editor.lineCount();i.mode=="preview"?t.previewMode.applyScroll(o-4):(t.editor.setCursor(o),t.editor.focus())}if(this.data.pin&&t.leaf.setPinned(!0),this.data.view!=="Default view"){switch(this.data.view){case"Editing view (Live Preview)":case"Editing view (Source)":i.mode="source",i.source=this.data.view!="Editing view (Live Preview)";break;case"Reading view":i.mode="preview";break}await t.leaf.setViewState({type:"markdown",state:i}),t.leaf.history=a}this.configurePlugins()}configurePlugins(){this.plugin.loaded&&this.data.refreshDataview&&this.plugin.communityPlugins.dataview?.index.touch(),this.plugin.communityPlugins["obsidian-file-color"]?.generateColorStyles()}getOpened(){return this.data.kind=="Graph view"?this.app.workspace.getLeavesOfType("graph"):Et.flatMap(t=>this.app.workspace.getLeavesOfType(t)).filter(t=>{let a=t.view.getState().file;return ne(a.endsWith("md")?a.slice(0,-3):a,this.computedValue)})}async computeValue(){let e=this.data.value,t;switch(this.data.kind){case"Random file":t=ae(this.app),t&&(e=t);break;case"Random in folder":t=ae(this.app,e),t&&(e=t);break;case"New note":this.cachedNewFile||(this.cachedNewFile=k(await this.app.fileManager.createNewFile("",e))),e=this.cachedNewFile;break;case"Journal":e=await Ke(e,this.plugin);break;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":e=await _e(this.data.kind,this.plugin);break}return e}async save(){this.plugin.settings.homepages[this.name]=this.data,await this.plugin.saveSettings()}async setToActiveFile(){let e=this.app.workspace.getActiveFile();e&&(this.data.value=k(e),await this.save(),new N.Notice(r("homepageChanged",this.data.value)))}canSetToFile(){return this.app.workspace.getActiveFile()!==null&&!ye.includes(this.data.kind)}async revertView(){if(this.lastView==null||this.data.view=="Default view")return;let e=this.lastView.deref();if(!e?.file||ne(k(e.file),this.computedValue))return;let t=e.getState(),a=this.app.vault.config,i=a.defaultViewMode||"source",o=a.livePreview!==void 0?!a.livePreview:!1;e.leaf.getViewState().type=="markdown"&&(i!=t.mode||o!=t.source)&&(t.mode=i,t.source=o,await e.leaf.setViewState({type:"markdown",state:t,active:!0})),this.lastView=void 0}async openWhenEmpty(){if(!this.plugin.loaded||this.plugin.executing)return;let e=this.app.workspace.getActiveViewOfType(N.View)?.leaf;e?.getViewState().type!=="empty"||e?.parentSplit?.children?.length!=1||await this.open(!0)}async apply(){let e=this.app.workspace.getActiveViewOfType(N.FileView);if(!e?.file)return;let t=k(e.file);this.openedViews.get(e)!==t&&(this.openedViews.set(e,t),t===await this.computeValue()&&this.plugin.loaded&&!this.plugin.executing&&await this.configure(e.leaf))}async read(){if(Ot.includes(this.data.kind))return;let e=this.app.metadataCache.getFirstLinkpathDest(await this.computeValue(),"/");if(e)return this.app.vault.cachedRead(e)}};var Z=class extends S.Plugin{constructor(){super(...arguments);this.newRelease=!1;this.loaded=!1;this.executing=!1;this.onLayoutChange=async()=>{this.homepage.data.revertView&&await this.homepage.revertView(),this.homepage.data.openWhenEmpty&&await this.homepage.openWhenEmpty(),this.homepage.data.alwaysApply&&await this.homepage.apply()}}async onload(){this.patchReleaseNotes(),this.patchOpeningBehaviour(),this.settings=await this.loadSettings(),this.internalPlugins=this.app.internalPlugins.plugins,this.communityPlugins=this.app.plugins.plugins,this.homepage=this.getHomepage(),this.addRibbonIcon("house","Open homepage",t=>this.homepage.open(t.button==1||t.button==2||S.Keymap.isModifier(t,"Mod"))).setAttribute("id","nv-homepage-icon"),this.registerEvent(this.app.workspace.on("layout-change",this.onLayoutChange)),this.addSettingTab(new X(this.app,this)),this.addCommand({id:"open-homepage",name:r("openHomepage"),callback:()=>this.homepage.open()}),this.addCommand({id:"set-to-active-file",name:r("setToActiveFile"),checkCallback:t=>{if(t)return this.homepage.canSetToFile();this.homepage.setToActiveFile()}}),this.registerCliHandler("homepage",r("cliOpenHomepageDesc"),null,async()=>(await this.homepage.open(),r("cliOpenHomepageResult"))),this.registerCliHandler("homepage:read",r("cliReadHomepageDesc"),null,async()=>{let t=await this.homepage.read();return t!==void 0?t:r("cliReadHomepageIllegible")})}onunload(){this.app.workspace.off("layout-change",this.onLayoutChange),this.unpatchNewTabPage(),this.unpatchOpeningBehaviour()}getHomepage(){return this.settings.separateMobile&&S.Platform.isMobile?(G in this.settings.homepages||(this.settings.homepages[G]={...this.settings.homepages?.[j]},this.settings.homepages[G].commands=[...this.settings.homepages?.[j]?.commands||[]]),new K(G,this)):new K(j,this)}async loadSettings(){let t=await this.loadData();return t?.version!==4?t?this.upgradeSettings(t):Object.assign({},we):t}async saveSettings(){await this.saveData(this.settings)}async hasUrlParams(){let t,a;if(S.Platform.isMobile){let i=await window.Capacitor.Plugins.App.getLaunchUrl();if(!i)return!1;let o=new URL(i.url);a=Array.from(o.searchParams.keys()),t=o.hostname}else if(window.OBS_ACT)a=Object.keys(window.OBS_ACT),t=window.OBS_ACT.action;else return!1;return["open","advanced-uri"].includes(t)&&["file","filepath","workspace"].some(i=>a.includes(i))}hasRequiredPlugin(t){switch(t){case"Workspace":return this.internalPlugins.workspaces?.enabled;case"Graph view":return this.internalPlugins.graph?.enabled;case"Journal":return"journals"in this.communityPlugins;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":return Ue(t,this);default:return!0}}patchNewTabPage(){let t=this.communityPlugins["new-tab-default-page"];t&&(t.nvOrig_checkForNewTab=t.checkForNewTab,t.checkForNewTab=async a=>{if(!(this&&this.executing))return await t.nvOrig_checkForNewTab(a)})}unpatchNewTabPage(){let t=this.communityPlugins["new-tab-default-page"];t&&(t.checkForNewTab=t.nvOrig_checkForNewTab)}patchReleaseNotes(){this.app.nvOrig_showReleaseNotes=this.app.showReleaseNotes,this.app.showReleaseNotes=()=>this.newRelease=!0}unpatchReleaseNotes(){this.newRelease&&!this.homepage.data.hideReleaseNotes&&this.app.nvOrig_showReleaseNotes(),this.app.showReleaseNotes=this.app.nvOrig_showReleaseNotes}patchOpeningBehaviour(){this.app.nvOrig_runOpeningBehavior=this.app.runOpeningBehavior,this.app.runOpeningBehavior=async t=>{let a=this.homepage.data.openOnStartup&&!await this.hasUrlParams();this.patchNewTabPage(),a?await this.homepage.open():this.app.nvOrig_runOpeningBehavior(t),this.loaded=!0,this.unpatchReleaseNotes()}}unpatchOpeningBehaviour(){this.app.runOpeningBehavior=this.app.nvOrig_runOpeningBehavior}upgradeSettings(t){if(t.version==3){let i=t,o=!1;for(let s of Object.values(i.homepages))s.commands=s.commands.map(c=>({id:c,period:"Both"})),s.kind==Ve&&(o=!0,s.kind="Daily Note");return o&&new S.Notice(r("momentUpgradeNotice")),i.version=4,this.saveData(i),i}let a=Object.assign({},we);return t.workspaceEnabled?(t.value=t.workspace||"",t.kind="Workspace"):t.momentFormat?(t.kind="Daily Note",new S.Notice(r("momentUpgradeNotice"))):(t.value=t.defaultNote||"Home",t.kind="File"),t.commands=[],delete t.workspace,delete t.momentFormat,delete t.defaultNote,delete t.useMoment,delete t.workspaceEnabled,a.homepages[j]=t,this.saveData(a),a}}; /* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/homepage/manifest.json b/.obsidian/plugins/homepage/manifest.json index 446ab20..2c05e2e 100644 --- a/.obsidian/plugins/homepage/manifest.json +++ b/.obsidian/plugins/homepage/manifest.json @@ -1,8 +1,8 @@ { "id": "homepage", "name": "Homepage", - "version": "4.2.2", - "minAppVersion": "1.4.10", + "version": "4.4.4", + "minAppVersion": "1.12.2", "description": "Open a specified note, canvas, base, or workspace on startup, or set it for quick access later.", "author": "novov", "authorUrl": "https://novov.me", diff --git a/.obsidian/plugins/homepage/styles.css b/.obsidian/plugins/homepage/styles.css index 7e71233..05c6f37 100644 --- a/.obsidian/plugins/homepage/styles.css +++ b/.obsidian/plugins/homepage/styles.css @@ -1,15 +1,3 @@ -.nv-homepage-interstitial { - position: absolute; - left: 0; - top: 0; - width: 100vw; - height: 100vh; - background: var(--background-primary); - z-index: 9999; - animation: 0.02s ease-in 0.5s forwards nv-interstitial-destroy; - pointer-events: none; -} - @keyframes nv-interstitial-destroy { from { opacity: 1; } to { opacity: 0; } @@ -17,16 +5,15 @@ .setting-item[nv-greyed] { opacity: .5; - pointer-events: none !important; + pointer-events: none; } #nv-main-setting { flex-wrap: wrap; - margin-bottom: 30px; } #nv-main-setting .setting-item-control { - padding-top: var(--size-4-2); + padding-top: var(--size-4-1); flex-basis: 100%; align-items: stretch; } @@ -86,7 +73,7 @@ margin-left: var(--size-2-2); } -.nv-mobile-setting { +.nv-mobile-setting, .nv-command-setting { flex-wrap: wrap; row-gap: var(--size-2-2); } @@ -98,21 +85,20 @@ } .nv-command-desc { - padding: 1.2em 0 0; - border-top: 1px solid var(--background-modifier-border); + padding: 0; } .nv-command-box { - margin: 1em 0 1.75em; + margin: 1em 0 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; + width: 100%; } .nv-command-pill { - background-color: var(--background-secondary); - border: 1px solid var(--background-modifier-border-hover); + background-color: var(--background-modifier-hover); border-radius: var(--radius-s); font-size: var(--font-ui-small); padding: var(--size-2-1) var(--size-2-2) var(--size-2-1) var(--size-2-3) ; @@ -150,6 +136,7 @@ .nv-command-pill > .svg-icon, .nv-command-pill button .svg-icon { height: 1em; width: 1em; + opacity: 1; } .nv-command-pill > .svg-icon { @@ -168,20 +155,15 @@ height: auto; } -#nv-main-setting + .setting-item, .nv-command-desc + .setting-item { - padding-top: 20px; - border-top: none !important; -} - -.nv-debug-button { +button.nv-debug-button { margin: 3em 0 -0.2em; font-size: var(--font-ui-smaller); padding: 0; height: auto; float: right; - box-shadow: none !important; - background: none !important; - color: var(--text-accent); + box-shadow: none; + background: none; + color: var(--text-color); font-weight: 600; cursor: pointer; } @@ -208,14 +190,6 @@ max-width: calc(100% - 100px); } -.is-phone .nv-mobile-setting { - row-gap: var(--size-4-2); -} - -.is-phone .nv-mobile-setting .setting-item-info { - max-width: calc(100% - 100px); -} - .is-phone .nv-command-pill { width: 100%; border: none; @@ -237,8 +211,12 @@ justify-content: space-between; } +.is-phone .nv-command-add-button { + padding: var(--size-2-3) var(--size-4-3); +} + .is-phone .nv-command-pill button { line-height: var(--font-ui-medium); height: 100%; - margin: 0 !important; + margin: 0; } diff --git a/.obsidian/plugins/obsidian-emoji-toolbar/main.js b/.obsidian/plugins/obsidian-emoji-toolbar/main.js index d91d9bb..29047f6 100644 --- a/.obsidian/plugins/obsidian-emoji-toolbar/main.js +++ b/.obsidian/plugins/obsidian-emoji-toolbar/main.js @@ -2,7 +2,248 @@ var obsidian = require('obsidian'); -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */ +var twemoji = function () { + + var twemoji = { + base: "https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/", + ext: ".png", + size: "72x72", + className: "emoji", + convert: { + fromCodePoint: fromCodePoint, + toCodePoint: toCodePoint + }, + onerror: function onerror() { + if (this.parentNode) { + this.parentNode.replaceChild(createText(this.alt, false), this); + } + }, + parse: parse, + replace: replace, + test: test + }, + escaper = { + "&": "&", + "<": "<", + ">": ">", + "'": "'", + '"': """ + }, + re = /(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u26d3\ufe0f\u200d\ud83d\udca5|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udf44\u200d\ud83d\udfeb|\ud83c\udf4b\u200d\ud83d\udfe9|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc26\u200d\ud83d\udd25|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83d\ude42\u200d\u2194\ufe0f|\ud83d\ude42\u200d\u2195\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|\ud83e\udef0|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c\udfc3|\ud83d\udeb6|\ud83e\uddce)(?:\ud83c[\udffb-\udfff])?(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udf85\udfc2\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4\udeb5\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd\uddcf\uddd1-\udddd\udec3-\udec5\udef1-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude89\ude8f-\udec2\udec6\udece-\udedc\udedf-\udee9]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g, + UFE0Fg = /\uFE0F/g, + U200D = String.fromCharCode(8205), + rescaper = /[&<>'"]/g, + shouldntBeParsed = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/, + fromCharCode = String.fromCharCode; + return twemoji; + + function createText(text, clean) { + return document.createTextNode(clean ? text.replace(UFE0Fg, "") : text); + } + + function escapeHTML(s) { + return s.replace(rescaper, replacer); + } + + function defaultImageSrcGenerator(icon, options) { + return "".concat(options.base, options.size, "/", icon, options.ext); + } + + function grabAllTextNodes(node, allText) { + var childNodes = node.childNodes, + length = childNodes.length, + subnode, + nodeType; + + while (length--) { + subnode = childNodes[length]; + nodeType = subnode.nodeType; + + if (nodeType === 3) { + allText.push(subnode); + } else if (nodeType === 1 && !("ownerSVGElement" in subnode) && !shouldntBeParsed.test(subnode.nodeName.toLowerCase())) { + grabAllTextNodes(subnode, allText); + } + } + + return allText; + } + + function grabTheRightIcon(rawText) { + return toCodePoint(rawText.indexOf(U200D) < 0 ? rawText.replace(UFE0Fg, "") : rawText); + } + + function parseNode(node, options) { + var allText = grabAllTextNodes(node, []), + length = allText.length, + attrib, + attrname, + modified, + fragment, + subnode, + text, + match, + i, + index, + img, + rawText, + iconId, + src; + + while (length--) { + modified = false; + fragment = document.createDocumentFragment(); + subnode = allText[length]; + text = subnode.nodeValue; + i = 0; + + while (match = re.exec(text)) { + index = match.index; + + if (index !== i) { + fragment.appendChild(createText(text.slice(i, index), true)); + } + + rawText = match[0]; + iconId = grabTheRightIcon(rawText); + i = index + rawText.length; + src = options.callback(iconId, options); + + if (iconId && src) { + img = new Image(); + img.onerror = options.onerror; + img.setAttribute("draggable", "false"); + attrib = options.attributes(rawText, iconId); + + for (attrname in attrib) { + if (attrib.hasOwnProperty(attrname) && attrname.indexOf("on") !== 0 && !img.hasAttribute(attrname)) { + img.setAttribute(attrname, attrib[attrname]); + } + } + + img.className = options.className; + img.alt = rawText; + img.src = src; + modified = true; + fragment.appendChild(img); + } + + if (!img) fragment.appendChild(createText(rawText, false)); + img = null; + } + + if (modified) { + if (i < text.length) { + fragment.appendChild(createText(text.slice(i), true)); + } + + subnode.parentNode.replaceChild(fragment, subnode); + } + } + + return node; + } + + function parseString(str, options) { + return replace(str, function (rawText) { + var ret = rawText, + iconId = grabTheRightIcon(rawText), + src = options.callback(iconId, options), + attrib, + attrname; + + if (iconId && src) { + ret = ""); + } + + return ret; + }); + } + + function replacer(m) { + return escaper[m]; + } + + function returnNull() { + return null; + } + + function toSizeSquaredAsset(value) { + return typeof value === "number" ? value + "x" + value : value; + } + + function fromCodePoint(codepoint) { + var code = typeof codepoint === "string" ? parseInt(codepoint, 16) : codepoint; + + if (code < 65536) { + return fromCharCode(code); + } + + code -= 65536; + return fromCharCode(55296 + (code >> 10), 56320 + (code & 1023)); + } + + function parse(what, how) { + if (!how || typeof how === "function") { + how = { + callback: how + }; + } + + return (typeof what === "string" ? parseString : parseNode)(what, { + callback: how.callback || defaultImageSrcGenerator, + attributes: typeof how.attributes === "function" ? how.attributes : returnNull, + base: typeof how.base === "string" ? how.base : twemoji.base, + ext: how.ext || twemoji.ext, + size: how.folder || toSizeSquaredAsset(how.size || twemoji.size), + className: how.className || twemoji.className, + onerror: how.onerror || twemoji.onerror + }); + } + + function replace(text, callback) { + return String(text).replace(re, callback); + } + + function test(text) { + re.lastIndex = 0; + var result = re.test(text); + re.lastIndex = 0; + return result; + } + + function toCodePoint(unicodeSurrogates, sep) { + var r = [], + c = 0, + p = 0, + i = 0; + + while (i < unicodeSurrogates.length) { + c = unicodeSurrogates.charCodeAt(i++); + + if (p) { + r.push((65536 + (p - 55296 << 10) + (c - 56320)).toString(16)); + p = 0; + } else if (55296 <= c && c <= 56319) { + p = c; + } else { + r.push(c.toString(16)); + } + } + + return r.join(sep || "-"); + } +}(); function createCommonjsModule(fn) { var module = { exports: {} }; @@ -9216,570 +9457,9 @@ var reactDom = createCommonjsModule(function (module) { } }); -var location = commonjsGlobal.location || {}; -/*jslint indent: 2, browser: true, bitwise: true, plusplus: true */ - -var twemoji = function - /*! Copyright Twitter Inc. and other contributors. Licensed under MIT */ - - /* - https://github.com/twitter/twemoji/blob/gh-pages/LICENSE - */ - // WARNING: this file is generated automatically via - // `node scripts/build.js` - // please update its `createTwemoji` function - // at the bottom of the same file instead. -() { - /*jshint maxparams:4 */ - - var // the exported module object - twemoji = { - ///////////////////////// - // properties // - ///////////////////////// - // default assets url, by default will be Twitter Inc. CDN - base: 'https://twemoji.maxcdn.com/v/13.1.0/', - // default assets file extensions, by default '.png' - ext: '.png', - // default assets/folder size, by default "72x72" - // available via Twitter CDN: 72 - size: '72x72', - // default class name, by default 'emoji' - className: 'emoji', - // basic utilities / helpers to convert code points - // to JavaScript surrogates and vice versa - convert: { - /** - * Given an HEX codepoint, returns UTF16 surrogate pairs. - * - * @param string generic codepoint, i.e. '1F4A9' - * @return string codepoint transformed into utf16 surrogates pair, - * i.e. \uD83D\uDCA9 - * - * @example - * twemoji.convert.fromCodePoint('1f1e8'); - * // "\ud83c\udde8" - * - * '1f1e8-1f1f3'.split('-').map(twemoji.convert.fromCodePoint).join('') - * // "\ud83c\udde8\ud83c\uddf3" - */ - fromCodePoint: fromCodePoint, - - /** - * Given UTF16 surrogate pairs, returns the equivalent HEX codepoint. - * - * @param string generic utf16 surrogates pair, i.e. \uD83D\uDCA9 - * @param string optional separator for double code points, default='-' - * @return string utf16 transformed into codepoint, i.e. '1F4A9' - * - * @example - * twemoji.convert.toCodePoint('\ud83c\udde8\ud83c\uddf3'); - * // "1f1e8-1f1f3" - * - * twemoji.convert.toCodePoint('\ud83c\udde8\ud83c\uddf3', '~'); - * // "1f1e8~1f1f3" - */ - toCodePoint: toCodePoint - }, - ///////////////////////// - // methods // - ///////////////////////// - - /** - * User first: used to remove missing images - * preserving the original text intent when - * a fallback for network problems is desired. - * Automatically added to Image nodes via DOM - * It could be recycled for string operations via: - * $('img.emoji').on('error', twemoji.onerror) - */ - onerror: function onerror() { - if (this.parentNode) { - this.parentNode.replaceChild(createText(this.alt, false), this); - } - }, - - /** - * Main method/logic to generate either tags or HTMLImage nodes. - * "emojify" a generic text or DOM Element. - * - * @overloads - * - * String replacement for `innerHTML` or server side operations - * twemoji.parse(string); - * twemoji.parse(string, Function); - * twemoji.parse(string, Object); - * - * HTMLElement tree parsing for safer operations over existing DOM - * twemoji.parse(HTMLElement); - * twemoji.parse(HTMLElement, Function); - * twemoji.parse(HTMLElement, Object); - * - * @param string|HTMLElement the source to parse and enrich with emoji. - * - * string replace emoji matches with tags. - * Mainly used to inject emoji via `innerHTML` - * It does **not** parse the string or validate it, - * it simply replaces found emoji with a tag. - * NOTE: be sure this won't affect security. - * - * HTMLElement walk through the DOM tree and find emoji - * that are inside **text node only** (nodeType === 3) - * Mainly used to put emoji in already generated DOM - * without compromising surrounding nodes and - * **avoiding** the usage of `innerHTML`. - * NOTE: Using DOM elements instead of strings should - * improve security without compromising too much - * performance compared with a less safe `innerHTML`. - * - * @param Function|Object [optional] - * either the callback that will be invoked or an object - * with all properties to use per each found emoji. - * - * Function if specified, this will be invoked per each emoji - * that has been found through the RegExp except - * those follwed by the invariant \uFE0E ("as text"). - * Once invoked, parameters will be: - * - * iconId:string the lower case HEX code point - * i.e. "1f4a9" - * - * options:Object all info for this parsing operation - * - * variant:char the optional \uFE0F ("as image") - * variant, in case this info - * is anyhow meaningful. - * By default this is ignored. - * - * If such callback will return a falsy value instead - * of a valid `src` to use for the image, nothing will - * actually change for that specific emoji. - * - * - * Object if specified, an object containing the following properties - * - * callback Function the callback to invoke per each found emoji. - * base string the base url, by default twemoji.base - * ext string the image extension, by default twemoji.ext - * size string the assets size, by default twemoji.size - * - * @example - * - * twemoji.parse("I \u2764\uFE0F emoji!"); - * // I ❤️ emoji! - * - * - * twemoji.parse("I \u2764\uFE0F emoji!", function(iconId, options) { - * return '/assets/' + iconId + '.gif'; - * }); - * // I ❤️ emoji! - * - * - * twemoji.parse("I \u2764\uFE0F emoji!", { - * size: 72, - * callback: function(iconId, options) { - * return '/assets/' + options.size + '/' + iconId + options.ext; - * } - * }); - * // I ❤️ emoji! - * - */ - parse: parse, - - /** - * Given a string, invokes the callback argument - * per each emoji found in such string. - * This is the most raw version used by - * the .parse(string) method itself. - * - * @param string generic string to parse - * @param Function a generic callback that will be - * invoked to replace the content. - * This callback will receive standard - * String.prototype.replace(str, callback) - * arguments such: - * callback( - * rawText, // the emoji match - * ); - * - * and others commonly received via replace. - */ - replace: replace, - - /** - * Simplify string tests against emoji. - * - * @param string some text that might contain emoji - * @return boolean true if any emoji was found, false otherwise. - * - * @example - * - * if (twemoji.test(someContent)) { - * console.log("emoji All The Things!"); - * } - */ - test: test - }, - // used to escape HTML special chars in attributes - escaper = { - '&': '&', - '<': '<', - '>': '>', - "'": ''', - '"': '"' - }, - // RegExp based on emoji's official Unicode standards - // http://www.unicode.org/Public/UNIDATA/EmojiSources.txt - re = /(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g, - // avoid runtime RegExp creation for not so smart, - // not JIT based, and old browsers / engines - UFE0Fg = /\uFE0F/g, - // avoid using a string literal like '\u200D' here because minifiers expand it inline - U200D = String.fromCharCode(0x200D), - // used to find HTML special chars in attributes - rescaper = /[&<>'"]/g, - // nodes with type 1 which should **not** be parsed - shouldntBeParsed = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/, - // just a private shortcut - fromCharCode = String.fromCharCode; - return twemoji; ///////////////////////// - // private functions // - // declaration // - ///////////////////////// - - /** - * Shortcut to create text nodes - * @param string text used to create DOM text node - * @return Node a DOM node with that text - */ - - function createText(text, clean) { - return document.createTextNode(clean ? text.replace(UFE0Fg, '') : text); - } - /** - * Utility function to escape html attribute text - * @param string text use in HTML attribute - * @return string text encoded to use in HTML attribute - */ - - - function escapeHTML(s) { - return s.replace(rescaper, replacer); - } - /** - * Default callback used to generate emoji src - * based on Twitter CDN - * @param string the emoji codepoint string - * @param string the default size to use, i.e. "36x36" - * @return string the image source to use - */ - - - function defaultImageSrcGenerator(icon, options) { - return ''.concat(options.base, options.size, '/', icon, options.ext); - } - /** - * Given a generic DOM nodeType 1, walk through all children - * and store every nodeType 3 (#text) found in the tree. - * @param Element a DOM Element with probably some text in it - * @param Array the list of previously discovered text nodes - * @return Array same list with new discovered nodes, if any - */ - - - function grabAllTextNodes(node, allText) { - var childNodes = node.childNodes, - length = childNodes.length, - subnode, - nodeType; - - while (length--) { - subnode = childNodes[length]; - nodeType = subnode.nodeType; // parse emoji only in text nodes - - if (nodeType === 3) { - // collect them to process emoji later - allText.push(subnode); - } // ignore all nodes that are not type 1, that are svg, or that - // should not be parsed as script, style, and others - else if (nodeType === 1 && !('ownerSVGElement' in subnode) && !shouldntBeParsed.test(subnode.nodeName.toLowerCase())) { - grabAllTextNodes(subnode, allText); - } - } - - return allText; - } - /** - * Used to both remove the possible variant - * and to convert utf16 into code points. - * If there is a zero-width-joiner (U+200D), leave the variants in. - * @param string the raw text of the emoji match - * @return string the code point - */ - - - function grabTheRightIcon(rawText) { - // if variant is present as \uFE0F - return toCodePoint(rawText.indexOf(U200D) < 0 ? rawText.replace(UFE0Fg, '') : rawText); - } - /** - * DOM version of the same logic / parser: - * emojify all found sub-text nodes placing images node instead. - * @param Element generic DOM node with some text in some child node - * @param Object options containing info about how to parse - * - * .callback Function the callback to invoke per each found emoji. - * .base string the base url, by default twemoji.base - * .ext string the image extension, by default twemoji.ext - * .size string the assets size, by default twemoji.size - * - * @return Element same generic node with emoji in place, if any. - */ - - - function parseNode(node, options) { - var allText = grabAllTextNodes(node, []), - length = allText.length, - attrib, - attrname, - modified, - fragment, - subnode, - text, - match, - i, - index, - img, - rawText, - iconId, - src; - - while (length--) { - modified = false; - fragment = document.createDocumentFragment(); - subnode = allText[length]; - text = subnode.nodeValue; - i = 0; - - while (match = re.exec(text)) { - index = match.index; - - if (index !== i) { - fragment.appendChild(createText(text.slice(i, index), true)); - } - - rawText = match[0]; - iconId = grabTheRightIcon(rawText); - i = index + rawText.length; - src = options.callback(iconId, options); - - if (iconId && src) { - img = new Image(); - img.onerror = options.onerror; - img.setAttribute('draggable', 'false'); - attrib = options.attributes(rawText, iconId); - - for (attrname in attrib) { - if (attrib.hasOwnProperty(attrname) && // don't allow any handlers to be set + don't allow overrides - attrname.indexOf('on') !== 0 && !img.hasAttribute(attrname)) { - img.setAttribute(attrname, attrib[attrname]); - } - } - - img.className = options.className; - img.alt = rawText; - img.src = src; - modified = true; - fragment.appendChild(img); - } - - if (!img) fragment.appendChild(createText(rawText, false)); - img = null; - } // is there actually anything to replace in here ? - - - if (modified) { - // any text left to be added ? - if (i < text.length) { - fragment.appendChild(createText(text.slice(i), true)); - } // replace the text node only, leave intact - // anything else surrounding such text - - - subnode.parentNode.replaceChild(fragment, subnode); - } - } - - return node; - } - /** - * String/HTML version of the same logic / parser: - * emojify a generic text placing images tags instead of surrogates pair. - * @param string generic string with possibly some emoji in it - * @param Object options containing info about how to parse - * - * .callback Function the callback to invoke per each found emoji. - * .base string the base url, by default twemoji.base - * .ext string the image extension, by default twemoji.ext - * .size string the assets size, by default twemoji.size - * - * @return the string with replacing all found and parsed emoji - */ - - - function parseString(str, options) { - return replace(str, function (rawText) { - var ret = rawText, - iconId = grabTheRightIcon(rawText), - src = options.callback(iconId, options), - attrib, - attrname; - - if (iconId && src) { - // recycle the match string replacing the emoji - // with its image counter part - ret = ''); - } - - return ret; - }); - } - /** - * Function used to actually replace HTML special chars - * @param string HTML special char - * @return string encoded HTML special char - */ - - - function replacer(m) { - return escaper[m]; - } - /** - * Default options.attribute callback - * @return null - */ - - - function returnNull() { - return null; - } - /** - * Given a generic value, creates its squared counterpart if it's a number. - * As example, number 36 will return '36x36'. - * @param any a generic value. - * @return any a string representing asset size, i.e. "36x36" - * only in case the value was a number. - * Returns initial value otherwise. - */ - - - function toSizeSquaredAsset(value) { - return typeof value === 'number' ? value + 'x' + value : value; - } ///////////////////////// - // exported functions // - // declaration // - ///////////////////////// - - - function fromCodePoint(codepoint) { - var code = typeof codepoint === 'string' ? parseInt(codepoint, 16) : codepoint; - - if (code < 0x10000) { - return fromCharCode(code); - } - - code -= 0x10000; - return fromCharCode(0xD800 + (code >> 10), 0xDC00 + (code & 0x3FF)); - } - - function parse(what, how) { - if (!how || typeof how === 'function') { - how = { - callback: how - }; - } // if first argument is string, inject html tags - // otherwise use the DOM tree and parse text nodes only - - - return (typeof what === 'string' ? parseString : parseNode)(what, { - callback: how.callback || defaultImageSrcGenerator, - attributes: typeof how.attributes === 'function' ? how.attributes : returnNull, - base: typeof how.base === 'string' ? how.base : twemoji.base, - ext: how.ext || twemoji.ext, - size: how.folder || toSizeSquaredAsset(how.size || twemoji.size), - className: how.className || twemoji.className, - onerror: how.onerror || twemoji.onerror - }); - } - - function replace(text, callback) { - return String(text).replace(re, callback); - } - - function test(text) { - // IE6 needs a reset before too - re.lastIndex = 0; - var result = re.test(text); - re.lastIndex = 0; - return result; - } - - function toCodePoint(unicodeSurrogates, sep) { - var r = [], - c = 0, - p = 0, - i = 0; - - while (i < unicodeSurrogates.length) { - c = unicodeSurrogates.charCodeAt(i++); - - if (p) { - r.push((0x10000 + (p - 0xD800 << 10) + (c - 0xDC00)).toString(16)); - p = 0; - } else if (0xD800 <= c && c <= 0xDBFF) { - p = c; - } else { - r.push(c.toString(16)); - } - } - - return r.join(sep || '-'); - } -}(); - -if (!location.protocol) { - twemoji.base = twemoji.base.replace(/^http:/, ""); -} - -var twemoji_npm = twemoji; - -var interopRequireDefault = createCommonjsModule(function (module) { -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; -} - -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var compressed$1 = true; var categories$1 = [ { id: "people", - name: "Smileys & People", emojis: [ "grinning", "smiley", @@ -9791,6 +9471,7 @@ var categories$1 = [ "joy", "slightly_smiling_face", "upside_down_face", + "melting_face", "wink", "blush", "innocent", @@ -9802,6 +9483,7 @@ var categories$1 = [ "relaxed", "kissing_closed_eyes", "kissing_smiling_eyes", + "smiling_face_with_tear", "yum", "stuck_out_tongue", "stuck_out_tongue_winking_eye", @@ -9810,17 +9492,23 @@ var categories$1 = [ "money_mouth_face", "hugging_face", "face_with_hand_over_mouth", + "face_with_open_eyes_and_hand_over_mouth", + "face_with_peeking_eye", "shushing_face", "thinking_face", + "saluting_face", "zipper_mouth_face", "face_with_raised_eyebrow", "neutral_face", "expressionless", "no_mouth", + "dotted_line_face", + "face_in_clouds", "smirk", "unamused", "face_with_rolling_eyes", "grimacing", + "face_exhaling", "lying_face", "relieved", "pensive", @@ -9837,13 +9525,16 @@ var categories$1 = [ "cold_face", "woozy_face", "dizzy_face", + "face_with_spiral_eyes", "exploding_head", "face_with_cowboy_hat", "partying_face", + "disguised_face", "sunglasses", "nerd_face", "face_with_monocle", "confused", + "face_with_diagonal_mouth", "worried", "slightly_frowning_face", "white_frowning_face", @@ -9852,6 +9543,7 @@ var categories$1 = [ "astonished", "flushed", "pleading_face", + "face_holding_back_tears", "frowning", "anguished", "fearful", @@ -9883,27 +9575,21 @@ var categories$1 = [ "alien", "space_invader", "robot_face", - "smiley_cat", - "smile_cat", - "joy_cat", - "heart_eyes_cat", - "smirk_cat", - "kissing_cat", - "scream_cat", - "crying_cat_face", - "pouting_cat", - "see_no_evil", - "hear_no_evil", - "speak_no_evil", "wave", "raised_back_of_hand", "raised_hand_with_fingers_splayed", "hand", "spock-hand", + "rightwards_hand", + "leftwards_hand", + "palm_down_hand", + "palm_up_hand", "ok_hand", + "pinched_fingers", "pinching_hand", "v", "crossed_fingers", + "hand_with_index_finger_and_thumb_crossed", "i_love_you_hand_sign", "the_horns", "call_me_hand", @@ -9913,6 +9599,7 @@ var categories$1 = [ "middle_finger", "point_down", "point_up", + "index_pointing_at_the_viewer", "+1", "-1", "fist", @@ -9921,6 +9608,7 @@ var categories$1 = [ "right-facing_fist", "clap", "raised_hands", + "heart_hands", "open_hands", "palms_up_together", "handshake", @@ -9937,12 +9625,15 @@ var categories$1 = [ "ear_with_hearing_aid", "nose", "brain", + "anatomical_heart", + "lungs", "tooth", "bone", "eyes", "eye", "tongue", "lips", + "biting_lip", "baby", "child", "boy", @@ -9951,6 +9642,8 @@ var categories$1 = [ "person_with_blond_hair", "man", "bearded_person", + "man_with_beard", + "woman_with_beard", "red_haired_man", "curly_haired_man", "white_haired_man", @@ -10056,9 +9749,11 @@ var categories$1 = [ "guardsman", "male-guard", "female-guard", + "ninja", "construction_worker", "male-construction-worker", "female-construction-worker", + "person_with_crown", "prince", "princess", "man_with_turban", @@ -10066,13 +9761,23 @@ var categories$1 = [ "woman-wearing-turban", "man_with_gua_pi_mao", "person_with_headscarf", + "person_in_tuxedo", "man_in_tuxedo", + "woman_in_tuxedo", "bride_with_veil", + "man_with_veil", + "woman_with_veil", "pregnant_woman", + "pregnant_man", + "pregnant_person", "breast-feeding", + "woman_feeding_baby", + "man_feeding_baby", + "person_feeding_baby", "angel", "santa", "mrs_claus", + "mx_claus", "superhero", "male_superhero", "female_superhero", @@ -10100,6 +9805,7 @@ var categories$1 = [ "zombie", "male_zombie", "female_zombie", + "troll", "massage", "man-getting-massage", "woman-getting-massage", @@ -10131,8 +9837,8 @@ var categories$1 = [ "man_dancing", "man_in_business_suit_levitating", "dancers", - "man-with-bunny-ears-partying", - "woman-with-bunny-ears-partying", + "men-with-bunny-ears-partying", + "women-with-bunny-ears-partying", "person_in_steamy_room", "man_in_steamy_room", "woman_in_steamy_room", @@ -10189,7 +9895,7 @@ var categories$1 = [ "sleeping_accommodation", "people_holding_hands", "two_women_holding_hands", - "couple", + "man_and_woman_holding_hands", "two_men_holding_hands", "couplekiss", "woman-kiss-man", @@ -10228,8 +9934,20 @@ var categories$1 = [ "speaking_head_in_silhouette", "bust_in_silhouette", "busts_in_silhouette", + "people_hugging", "footprints", - "kiss", + "smiley_cat", + "smile_cat", + "joy_cat", + "heart_eyes_cat", + "smirk_cat", + "kissing_cat", + "scream_cat", + "crying_cat_face", + "pouting_cat", + "see_no_evil", + "hear_no_evil", + "speak_no_evil", "love_letter", "cupid", "gift_heart", @@ -10241,6 +9959,8 @@ var categories$1 = [ "heart_decoration", "heavy_heart_exclamation_mark_ornament", "broken_heart", + "heart_on_fire", + "mending_heart", "heart", "orange_heart", "yellow_heart", @@ -10250,6 +9970,7 @@ var categories$1 = [ "brown_heart", "black_heart", "white_heart", + "kiss", "100", "anger", "boom", @@ -10257,7 +9978,6 @@ var categories$1 = [ "sweat_drops", "dash", "hole", - "bomb", "speech_balloon", "eye-in-speech-bubble", "left_speech_bubble", @@ -10268,7 +9988,6 @@ var categories$1 = [ }, { id: "nature", - name: "Animals & Nature", emojis: [ "monkey_face", "monkey", @@ -10284,6 +10003,7 @@ var categories$1 = [ "raccoon", "cat", "cat2", + "black_cat", "lion_face", "tiger", "tiger2", @@ -10293,6 +10013,7 @@ var categories$1 = [ "unicorn_face", "zebra_face", "deer", + "bison", "cow", "ox", "water_buffalo", @@ -10309,6 +10030,7 @@ var categories$1 = [ "llama", "giraffe_face", "elephant", + "mammoth", "rhinoceros", "hippopotamus", "mouse", @@ -10318,9 +10040,11 @@ var categories$1 = [ "rabbit", "rabbit2", "chipmunk", + "beaver", "hedgehog", "bat", "bear", + "polar_bear", "koala", "panda_face", "sloth", @@ -10342,6 +10066,8 @@ var categories$1 = [ "duck", "swan", "owl", + "dodo", + "feather", "flamingo", "peacock", "parrot", @@ -10357,27 +10083,34 @@ var categories$1 = [ "whale", "whale2", "dolphin", + "seal", "fish", "tropical_fish", "blowfish", "shark", "octopus", "shell", + "coral", "snail", "butterfly", "bug", "ant", "bee", "beetle", + "ladybug", "cricket", + "cockroach", "spider", "spider_web", "scorpion", "mosquito", + "fly", + "worm", "microbe", "bouquet", "cherry_blossom", "white_flower", + "lotus", "rosette", "rose", "wilted_flower", @@ -10386,6 +10119,7 @@ var categories$1 = [ "blossom", "tulip", "seedling", + "potted_plant", "evergreen_tree", "deciduous_tree", "palm_tree", @@ -10396,12 +10130,14 @@ var categories$1 = [ "four_leaf_clover", "maple_leaf", "fallen_leaf", - "leaves" + "leaves", + "empty_nest", + "nest_with_eggs", + "mushroom" ] }, { id: "foods", - name: "Food & Drink", emojis: [ "grapes", "melon", @@ -10417,8 +10153,10 @@ var categories$1 = [ "peach", "cherries", "strawberry", + "blueberries", "kiwifruit", "tomato", + "olive", "coconut", "avocado", "eggplant", @@ -10426,17 +10164,19 @@ var categories$1 = [ "carrot", "corn", "hot_pepper", + "bell_pepper", "cucumber", "leafy_green", "broccoli", "garlic", "onion", - "mushroom", "peanuts", + "beans", "chestnut", "bread", "croissant", "baguette_bread", + "flatbread", "pretzel", "bagel", "pancakes", @@ -10453,12 +10193,14 @@ var categories$1 = [ "sandwich", "taco", "burrito", + "tamale", "stuffed_flatbread", "falafel", "egg", "fried_egg", "shallow_pan_of_food", "stew", + "fondue", "bowl_with_spoon", "green_salad", "popcorn", @@ -10504,6 +10246,7 @@ var categories$1 = [ "baby_bottle", "glass_of_milk", "coffee", + "teapot", "tea", "sake", "champagne", @@ -10514,7 +10257,9 @@ var categories$1 = [ "beers", "clinking_glasses", "tumbler_glass", + "pouring_liquid", "cup_with_straw", + "bubble_tea", "beverage_box", "mate_drink", "ice_cube", @@ -10523,12 +10268,12 @@ var categories$1 = [ "fork_and_knife", "spoon", "hocho", + "jar", "amphora" ] }, { id: "activity", - name: "Activities", emojis: [ "jack_o_lantern", "christmas_tree", @@ -10587,15 +10332,19 @@ var categories$1 = [ "dart", "yo-yo", "kite", + "gun", "8ball", "crystal_ball", - "nazar_amulet", + "magic_wand", "video_game", "joystick", "slot_machine", "game_die", "jigsaw", "teddy_bear", + "pinata", + "mirror_ball", + "nesting_dolls", "spades", "hearts", "diamonds", @@ -10608,12 +10357,13 @@ var categories$1 = [ "frame_with_picture", "art", "thread", - "yarn" + "sewing_needle", + "yarn", + "knot" ] }, { id: "places", - name: "Travel & Places", emojis: [ "earth_africa", "earth_americas", @@ -10635,6 +10385,9 @@ var categories$1 = [ "classical_building", "building_construction", "bricks", + "rock", + "wood", + "hut", "house_buildings", "derelict_house_building", "house", @@ -10673,6 +10426,7 @@ var categories$1 = [ "bridge_at_night", "hotsprings", "carousel_horse", + "playground_slide", "ferris_wheel", "roller_coaster", "barber", @@ -10702,6 +10456,7 @@ var categories$1 = [ "car", "oncoming_automobile", "blue_car", + "pickup_truck", "truck", "articulated_lorry", "tractor", @@ -10714,17 +10469,20 @@ var categories$1 = [ "bike", "scooter", "skateboard", + "roller_skate", "busstop", "motorway", "railway_track", "oil_drum", "fuelpump", + "wheel", "rotating_light", "traffic_light", "vertical_traffic_light", "octagonal_sign", "construction", "anchor", + "ring_buoy", "boat", "canoe", "speedboat", @@ -10829,7 +10587,6 @@ var categories$1 = [ }, { id: "objects", - name: "Objects", emojis: [ "eyeglasses", "dark_sunglasses", @@ -10856,6 +10613,7 @@ var categories$1 = [ "pouch", "shopping_bags", "school_satchel", + "thong_sandal", "mans_shoe", "athletic_shoe", "hiking_boot", @@ -10869,6 +10627,7 @@ var categories$1 = [ "tophat", "mortar_board", "billed_cap", + "military_helmet", "helmet_with_white_cross", "prayer_beads", "lipstick", @@ -10893,12 +10652,14 @@ var categories$1 = [ "headphones", "radio", "saxophone", + "accordion", "guitar", "musical_keyboard", "trumpet", "violin", "banjo", "drum_with_drumsticks", + "long_drum", "iphone", "calling", "phone", @@ -10906,6 +10667,7 @@ var categories$1 = [ "pager", "fax", "battery", + "low_battery", "electric_plug", "computer", "desktop_computer", @@ -10952,6 +10714,7 @@ var categories$1 = [ "bookmark", "label", "moneybag", + "coin", "yen", "dollar", "euro", @@ -10960,8 +10723,6 @@ var categories$1 = [ "credit_card", "receipt", "chart", - "currency_exchange", - "heavy_dollar_sign", "email", "e-mail", "incoming_envelope", @@ -11018,10 +10779,13 @@ var categories$1 = [ "hammer_and_wrench", "dagger_knife", "crossed_swords", - "gun", + "bomb", + "boomerang", "bow_and_arrow", "shield", + "carpentry_saw", "wrench", + "screwdriver", "nut_and_bolt", "gear", "compression", @@ -11029,8 +10793,10 @@ var categories$1 = [ "probing_cane", "link", "chains", + "hook", "toolbox", "magnet", + "ladder", "alembic", "test_tube", "petri_dish", @@ -11042,33 +10808,47 @@ var categories$1 = [ "drop_of_blood", "pill", "adhesive_bandage", + "crutch", "stethoscope", + "x-ray", "door", + "elevator", + "mirror", + "window", "bed", "couch_and_lamp", "chair", "toilet", + "plunger", "shower", "bathtub", + "mouse_trap", "razor", "lotion_bottle", "safety_pin", "broom", "basket", "roll_of_paper", + "bucket", "soap", + "bubbles", + "toothbrush", "sponge", "fire_extinguisher", "shopping_trolley", "smoking", "coffin", + "headstone", "funeral_urn", - "moyai" + "nazar_amulet", + "hamsa", + "moyai", + "placard", + "identification_card" ] }, { id: "symbols", - name: "Symbols", emojis: [ "atm", "put_litter_in_its_place", @@ -11168,8 +10948,23 @@ var categories$1 = [ "mobile_phone_off", "female_sign", "male_sign", - "medical_symbol", + "transgender_symbol", + "heavy_multiplication_x", + "heavy_plus_sign", + "heavy_minus_sign", + "heavy_division_sign", + "heavy_equals_sign", "infinity", + "bangbang", + "interrobang", + "question", + "grey_question", + "grey_exclamation", + "exclamation", + "wavy_dash", + "currency_exchange", + "heavy_dollar_sign", + "medical_symbol", "recycle", "fleur_de_lis", "trident", @@ -11179,25 +10974,14 @@ var categories$1 = [ "white_check_mark", "ballot_box_with_check", "heavy_check_mark", - "heavy_multiplication_x", "x", "negative_squared_cross_mark", - "heavy_plus_sign", - "heavy_minus_sign", - "heavy_division_sign", "curly_loop", "loop", "part_alternation_mark", "eight_spoked_asterisk", "eight_pointed_black_star", "sparkle", - "bangbang", - "interrobang", - "question", - "grey_question", - "grey_exclamation", - "exclamation", - "wavy_dash", "copyright", "registered", "tm", @@ -11291,7 +11075,6 @@ var categories$1 = [ }, { id: "flags", - name: "Flags", emojis: [ "checkered_flag", "cn", @@ -11530,6 +11313,7 @@ var categories$1 = [ "flag-ua", "flag-ug", "flag-um", + "flag-un", "flag-uy", "flag-uz", "flag-va", @@ -11556,6 +11340,7 @@ var categories$1 = [ "pirate_flag", "rainbow-flag", "ru", + "transgender_flag", "triangular_flag_on_post", "us", "waving_black_flag", @@ -11565,13 +11350,10 @@ var categories$1 = [ ]; var emojis$1 = { "100": { - a: "Hundred Points Symbol", - b: "1F4AF", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "100", + name: "Hundred Points", + keywords: [ + "100", "score", "perfect", "numbers", @@ -11579,498 +11361,73 @@ var emojis$1 = { "exam", "quiz", "test", - "pass", - "hundred" + "pass" ], - k: [ - 26, - 5 + skins: [ + { + unified: "1f4af", + native: "💯", + x: 28, + y: 7 + } ], - o: 2 + version: 1 }, "1234": { - a: "Input Symbol for Numbers", - b: "1F522", - d: true, - e: true, - f: true, - h: true, - j: [ - "numbers", - "blue-square" + id: "1234", + name: "Input Numbers", + keywords: [ + "1234", + "blue", + "square", + "1", + "2", + "3", + "4" ], - k: [ - 28, - 5 + skins: [ + { + unified: "1f522", + native: "🔢", + x: 29, + y: 60 + } ], - o: 2 + version: 1 }, grinning: { - a: "Grinning Face", - b: "1F600", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "grinning", + name: "Grinning Face", + emoticons: [ + ":D" + ], + keywords: [ "smile", "happy", "joy", ":D", "grin" ], - k: [ - 30, - 35 - ], - m: ":D", - o: 2 - }, - monkey_face: { - a: "Monkey Face", - b: "1F435", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "circus" - ], - k: [ - 12, - 25 - ], - l: [ - ":o)" - ], - o: 2 - }, - grapes: { - a: "Grapes", - b: "1F347", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "food", - "wine" - ], - k: [ - 6, - 31 - ], - o: 2 - }, - eyeglasses: { - a: "Eyeglasses", - b: "1F453", - d: true, - e: true, - f: true, - h: true, - j: [ - "fashion", - "accessories", - "eyesight", - "nerdy", - "dork", - "geek" - ], - k: [ - 14, - 7 - ], - o: 2 - }, - checkered_flag: { - a: "Chequered Flag", - b: "1F3C1", - d: true, - e: true, - f: true, - h: true, - j: [ - "contest", - "finishline", - "race", - "gokart" - ], - k: [ - 8, - 39 - ], - o: 2 - }, - jack_o_lantern: { - a: "Jack-O-Lantern", - b: "1F383", - d: true, - e: true, - f: true, - h: true, - j: [ - "halloween", - "light", - "pumpkin", - "creepy", - "fall" - ], - k: [ - 7, - 34 - ], - o: 2 - }, - wave: { - skin_variations: { - "1F3FB": { - unified: "1F44B-1F3FB", - non_qualified: null, - image: "1f44b-1f3fb.png", - sheet_x: 13, - sheet_y: 27, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F44B-1F3FC", - non_qualified: null, - image: "1f44b-1f3fc.png", - sheet_x: 13, - sheet_y: 28, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F44B-1F3FD", - non_qualified: null, - image: "1f44b-1f3fd.png", - sheet_x: 13, - sheet_y: 29, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F44B-1F3FE", - non_qualified: null, - image: "1f44b-1f3fe.png", - sheet_x: 13, - sheet_y: 30, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F44B-1F3FF", - non_qualified: null, - image: "1f44b-1f3ff.png", - sheet_x: 13, - sheet_y: 31, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f600", + native: "😀", + x: 32, + y: 21 } - }, - a: "Waving Hand Sign", - b: "1F44B", - d: true, - e: true, - f: true, - h: true, - j: [ - "hands", - "gesture", - "goodbye", - "solong", - "farewell", - "hello", - "hi", - "palm" ], - k: [ - 13, - 26 - ], - o: 2 - }, - earth_africa: { - a: "Earth Globe Europe-Africa", - b: "1F30D", - d: true, - e: true, - f: true, - h: true, - j: [ - "globe", - "world", - "international" - ], - k: [ - 5, - 32 - ], - o: 2 - }, - atm: { - a: "Automated Teller Machine", - b: "1F3E7", - d: true, - e: true, - f: true, - h: true, - j: [ - "money", - "sales", - "cash", - "blue-square", - "payment", - "bank" - ], - k: [ - 11, - 1 - ], - o: 2 - }, - melon: { - a: "Melon", - b: "1F348", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 32 - ], - o: 2 - }, - triangular_flag_on_post: { - a: "Triangular Flag on Post", - b: "1F6A9", - d: true, - e: true, - f: true, - h: true, - j: [ - "mark", - "milestone", - "place" - ], - k: [ - 35, - 0 - ], - o: 2 - }, - put_litter_in_its_place: { - a: "Put Litter in Its Place Symbol", - b: "1F6AE", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "sign", - "human", - "info" - ], - k: [ - 35, - 5 - ], - o: 2 - }, - christmas_tree: { - a: "Christmas Tree", - b: "1F384", - d: true, - e: true, - f: true, - h: true, - j: [ - "festival", - "vacation", - "december", - "xmas", - "celebration" - ], - k: [ - 7, - 35 - ], - o: 2 - }, - monkey: { - a: "Monkey", - b: "1F412", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "banana", - "circus" - ], - k: [ - 11, - 46 - ], - o: 2 - }, - earth_americas: { - a: "Earth Globe Americas", - b: "1F30E", - d: true, - e: true, - f: true, - h: true, - j: [ - "globe", - "world", - "USA", - "international" - ], - k: [ - 5, - 33 - ], - o: 2 - }, - dark_sunglasses: { - a: "Dark Sunglasses", - b: "1F576-FE0F", - c: "1F576", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", - "cool", - "accessories" - ], - k: [ - 29, - 33 - ], - o: 2 - }, - raised_back_of_hand: { - skin_variations: { - "1F3FB": { - unified: "1F91A-1F3FB", - non_qualified: null, - image: "1f91a-1f3fb.png", - sheet_x: 37, - sheet_y: 44, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F91A-1F3FC", - non_qualified: null, - image: "1f91a-1f3fc.png", - sheet_x: 37, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F91A-1F3FD", - non_qualified: null, - image: "1f91a-1f3fd.png", - sheet_x: 37, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F91A-1F3FE", - non_qualified: null, - image: "1f91a-1f3fe.png", - sheet_x: 37, - sheet_y: 47, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F91A-1F3FF", - non_qualified: null, - image: "1f91a-1f3ff.png", - sheet_x: 37, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Raised Back of Hand", - b: "1F91A", - d: true, - e: true, - f: true, - h: true, - j: [ - "fingers", - "raised", - "backhand" - ], - k: [ - 37, - 43 - ], - o: 4 + version: 1 }, smiley: { - a: "Smiling Face with Open Mouth", - b: "1F603", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "smiley", + name: "Grinning Face with Big Eyes", + emoticons: [ + ":)", + "=)", + "=-)" + ], + keywords: [ + "smiley", "happy", "joy", "haha", @@ -12079,177 +11436,28 @@ var emojis$1 = { "smile", "funny" ], - k: [ - 30, - 38 - ], - l: [ - "=)", - "=-)" - ], - m: ":)", - o: 2 - }, - earth_asia: { - a: "Earth Globe Asia-Australia", - b: "1F30F", - d: true, - e: true, - f: true, - h: true, - j: [ - "globe", - "world", - "east", - "international" - ], - k: [ - 5, - 34 - ], - o: 2 - }, - crossed_flags: { - a: "Crossed Flags", - b: "1F38C", - d: true, - e: true, - f: true, - h: true, - j: [ - "japanese", - "nation", - "country", - "border" - ], - k: [ - 7, - 48 - ], - o: 2 - }, - watermelon: { - a: "Watermelon", - b: "1F349", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "food", - "picnic", - "summer" - ], - k: [ - 6, - 33 - ], - o: 2 - }, - goggles: { - a: "Goggles", - b: "1F97D", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 15 - ], - o: 11 - }, - raised_hand_with_fingers_splayed: { - skin_variations: { - "1F3FB": { - unified: "1F590-1F3FB", - non_qualified: null, - image: "1f590-1f3fb.png", - sheet_x: 29, - sheet_y: 49, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F590-1F3FC", - non_qualified: null, - image: "1f590-1f3fc.png", - sheet_x: 29, - sheet_y: 50, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F590-1F3FD", - non_qualified: null, - image: "1f590-1f3fd.png", - sheet_x: 29, - sheet_y: 51, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F590-1F3FE", - non_qualified: null, - image: "1f590-1f3fe.png", - sheet_x: 29, - sheet_y: 52, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F590-1F3FF", - non_qualified: null, - image: "1f590-1f3ff.png", - sheet_x: 29, - sheet_y: 53, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f603", + native: "😃", + x: 32, + y: 24 } - }, - a: "Raised Hand with Fingers Splayed", - b: "1F590-FE0F", - c: "1F590", - d: true, - e: true, - f: true, - h: true, - j: [ - "hand", - "fingers", - "palm" ], - k: [ - 29, - 48 - ], - o: 2 + version: 1 }, smile: { - a: "Smiling Face with Open Mouth and Smiling Eyes", - b: "1F604", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "smile", + name: "Grinning Face with Smiling Eyes", + emoticons: [ + ":)", + "C:", + "c:", + ":D", + ":-D" + ], + keywords: [ + "smile", "happy", "joy", "funny", @@ -12259,1643 +11467,190 @@ var emojis$1 = { ":D", ":)" ], - k: [ - 30, - 39 + skins: [ + { + unified: "1f604", + native: "😄", + x: 32, + y: 25 + } ], - l: [ - "C:", - "c:", - ":D", - ":-D" - ], - m: ":)", - o: 2 - }, - potable_water: { - a: "Potable Water Symbol", - b: "1F6B0", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "liquid", - "restroom", - "cleaning", - "faucet" - ], - k: [ - 35, - 7 - ], - o: 2 - }, - fireworks: { - a: "Fireworks", - b: "1F386", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "festival", - "carnival", - "congratulations" - ], - k: [ - 7, - 42 - ], - o: 2 - }, - gorilla: { - a: "Gorilla", - b: "1F98D", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "circus" - ], - k: [ - 42, - 31 - ], - o: 4 - }, - lab_coat: { - a: "Lab Coat", - b: "1F97C", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 14 - ], - o: 11 - }, - tangerine: { - a: "Tangerine", - b: "1F34A", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "fruit", - "nature", - "orange" - ], - k: [ - 6, - 34 - ], - o: 2 - }, - wheelchair: { - a: "Wheelchair Symbol", - b: "267F", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "disabled", - "a11y", - "accessibility" - ], - k: [ - 53, - 40 - ], - o: 2 - }, - waving_black_flag: { - a: "Waving Black Flag", - b: "1F3F4", - d: true, - e: true, - f: true, - h: true, - k: [ - 11, - 17 - ], - o: 2 - }, - orangutan: { - a: "Orangutan", - b: "1F9A7", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 55 - ], - o: 12 - }, - sparkler: { - a: "Firework Sparkler", - b: "1F387", - d: true, - e: true, - f: true, - h: true, - j: [ - "stars", - "night", - "shine" - ], - k: [ - 7, - 43 - ], - o: 2 - }, - globe_with_meridians: { - a: "Globe with Meridians", - b: "1F310", - d: true, - e: true, - f: true, - h: true, - j: [ - "earth", - "international", - "world", - "internet", - "interweb", - "i18n" - ], - k: [ - 5, - 35 - ], - o: 2 + version: 1 }, grin: { - a: "Grinning Face with Smiling Eyes", - b: "1F601", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "grin", + name: "Beaming Face with Smiling Eyes", + keywords: [ + "grin", "happy", "smile", "joy", "kawaii" ], - k: [ - 30, - 36 - ], - o: 2 - }, - hand: { - skin_variations: { - "1F3FB": { - unified: "270B-1F3FB", - non_qualified: null, - image: "270b-1f3fb.png", - sheet_x: 54, - sheet_y: 50, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "270B-1F3FC", - non_qualified: null, - image: "270b-1f3fc.png", - sheet_x: 54, - sheet_y: 51, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "270B-1F3FD", - non_qualified: null, - image: "270b-1f3fd.png", - sheet_x: 54, - sheet_y: 52, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "270B-1F3FE", - non_qualified: null, - image: "270b-1f3fe.png", - sheet_x: 54, - sheet_y: 53, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "270B-1F3FF", - non_qualified: null, - image: "270b-1f3ff.png", - sheet_x: 54, - sheet_y: 54, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f601", + native: "😁", + x: 32, + y: 22 } - }, - a: "Raised Hand", - b: "270B", - d: true, - e: true, - f: true, - h: true, - k: [ - 54, - 49 ], - n: [ - "raised_hand" - ], - o: 2 - }, - firecracker: { - a: "Firecracker", - b: "1F9E8", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 27 - ], - o: 11 - }, - lemon: { - a: "Lemon", - b: "1F34B", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "nature" - ], - k: [ - 6, - 35 - ], - o: 2 - }, - dog: { - a: "Dog Face", - b: "1F436", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "friend", - "nature", - "woof", - "puppy", - "pet", - "faithful" - ], - k: [ - 12, - 26 - ], - o: 2 - }, - mens: { - a: "Mens Symbol", - b: "1F6B9", - d: true, - e: true, - f: true, - h: true, - j: [ - "toilet", - "restroom", - "wc", - "blue-square", - "gender", - "male" - ], - k: [ - 36, - 10 - ], - o: 2 - }, - "spock-hand": { - skin_variations: { - "1F3FB": { - unified: "1F596-1F3FB", - non_qualified: null, - image: "1f596-1f3fb.png", - sheet_x: 30, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F596-1F3FC", - non_qualified: null, - image: "1f596-1f3fc.png", - sheet_x: 30, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F596-1F3FD", - non_qualified: null, - image: "1f596-1f3fd.png", - sheet_x: 30, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F596-1F3FE", - non_qualified: null, - image: "1f596-1f3fe.png", - sheet_x: 30, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F596-1F3FF", - non_qualified: null, - image: "1f596-1f3ff.png", - sheet_x: 30, - sheet_y: 8, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Raised Hand with Part Between Middle and Ring Fingers", - b: "1F596", - d: true, - e: true, - f: true, - h: true, - k: [ - 30, - 3 - ], - o: 2 - }, - world_map: { - a: "World Map", - b: "1F5FA-FE0F", - c: "1F5FA", - d: true, - e: true, - f: true, - h: true, - j: [ - "location", - "direction" - ], - k: [ - 30, - 29 - ], - o: 2 + version: 1 }, laughing: { - a: "Smiling Face with Open Mouth and Tightly-Closed Eyes", - b: "1F606", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "laughing", + name: "Grinning Squinting Face", + emoticons: [ + ":>", + ":->" + ], + keywords: [ + "laughing", + "satisfied", "happy", "joy", "lol", - "satisfied", "haha", - "face", "glad", "XD", "laugh" ], - k: [ - 30, - 41 + skins: [ + { + unified: "1f606", + native: "😆", + x: 32, + y: 27 + } ], - l: [ - ":>", - ":->" - ], - n: [ - "satisfied" - ], - o: 2 - }, - waving_white_flag: { - a: "Waving White Flag", - b: "1F3F3-FE0F", - c: "1F3F3", - d: true, - e: true, - f: true, - h: true, - k: [ - 11, - 12 - ], - o: 2 - }, - safety_vest: { - a: "Safety Vest", - b: "1F9BA", - d: true, - e: true, - f: true, - h: true, - k: [ - 43, - 54 - ], - o: 12 + version: 1 }, sweat_smile: { - a: "Smiling Face with Open Mouth and Cold Sweat", - b: "1F605", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "sweat_smile", + name: "Grinning Face with Sweat", + keywords: [ + "smile", "hot", "happy", "laugh", - "sweat", - "smile", "relief" ], - k: [ - 30, - 40 - ], - o: 2 - }, - sparkles: { - a: "Sparkles", - b: "2728", - d: true, - e: true, - f: true, - h: true, - j: [ - "stars", - "shine", - "shiny", - "cool", - "awesome", - "good", - "magic" - ], - k: [ - 55, - 16 - ], - o: 2 - }, - banana: { - a: "Banana", - b: "1F34C", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "food", - "monkey" - ], - k: [ - 6, - 36 - ], - o: 2 - }, - "rainbow-flag": { - a: "Rainbow Flag", - b: "1F3F3-FE0F-200D-1F308", - c: "1F3F3-200D-1F308", - d: true, - e: true, - f: true, - h: true, - k: [ - 11, - 11 - ], - o: 4 - }, - ok_hand: { - skin_variations: { - "1F3FB": { - unified: "1F44C-1F3FB", - non_qualified: null, - image: "1f44c-1f3fb.png", - sheet_x: 13, - sheet_y: 33, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F44C-1F3FC", - non_qualified: null, - image: "1f44c-1f3fc.png", - sheet_x: 13, - sheet_y: 34, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F44C-1F3FD", - non_qualified: null, - image: "1f44c-1f3fd.png", - sheet_x: 13, - sheet_y: 35, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F44C-1F3FE", - non_qualified: null, - image: "1f44c-1f3fe.png", - sheet_x: 13, - sheet_y: 36, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F44C-1F3FF", - non_qualified: null, - image: "1f44c-1f3ff.png", - sheet_x: 13, - sheet_y: 37, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f605", + native: "😅", + x: 32, + y: 26 } - }, - a: "Ok Hand Sign", - b: "1F44C", - d: true, - e: true, - f: true, - h: true, - j: [ - "fingers", - "limbs", - "perfect", - "ok", - "okay" ], - k: [ - 13, - 32 - ], - o: 2 - }, - japan: { - a: "Silhouette of Japan", - b: "1F5FE", - d: true, - e: true, - f: true, - h: true, - j: [ - "nation", - "country", - "japanese", - "asia" - ], - k: [ - 30, - 33 - ], - o: 2 - }, - dog2: { - a: "Dog", - b: "1F415", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "friend", - "doge", - "pet", - "faithful" - ], - k: [ - 11, - 50 - ], - o: 2 - }, - womens: { - a: "Womens Symbol", - b: "1F6BA", - d: true, - e: true, - f: true, - h: true, - j: [ - "purple-square", - "woman", - "female", - "toilet", - "loo", - "restroom", - "gender" - ], - k: [ - 36, - 11 - ], - o: 2 - }, - necktie: { - a: "Necktie", - b: "1F454", - d: true, - e: true, - f: true, - h: true, - j: [ - "shirt", - "suitup", - "formal", - "fashion", - "cloth", - "business" - ], - k: [ - 14, - 8 - ], - o: 2 - }, - pirate_flag: { - a: "Pirate Flag", - b: "1F3F4-200D-2620-FE0F", - c: "1F3F4-200D-2620", - d: true, - e: true, - f: true, - h: true, - k: [ - 11, - 13 - ], - o: 11 - }, - guide_dog: { - a: "Guide Dog", - b: "1F9AE", - d: true, - e: true, - f: true, - h: true, - k: [ - 43, - 2 - ], - o: 12 - }, - restroom: { - a: "Restroom", - b: "1F6BB", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "toilet", - "refresh", - "wc", - "gender" - ], - k: [ - 36, - 12 - ], - o: 2 - }, - compass: { - a: "Compass", - b: "1F9ED", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 32 - ], - o: 11 + version: 1 }, rolling_on_the_floor_laughing: { - a: "Rolling on the Floor Laughing", - b: "1F923", - d: true, - e: true, - f: true, - h: true, - k: [ - 38, - 20 + id: "rolling_on_the_floor_laughing", + name: "Rolling on the Floor Laughing", + keywords: [ + "face", + "lol", + "haha", + "rofl" ], - o: 4 - }, - balloon: { - a: "Balloon", - b: "1F388", - d: true, - e: true, - f: true, - h: true, - j: [ - "party", - "celebration", - "birthday", - "circus" - ], - k: [ - 7, - 44 - ], - o: 2 - }, - pinching_hand: { - skin_variations: { - "1F3FB": { - unified: "1F90F-1F3FB", - non_qualified: null, - image: "1f90f-1f3fb.png", - sheet_x: 37, - sheet_y: 18, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F90F-1F3FC", - non_qualified: null, - image: "1f90f-1f3fc.png", - sheet_x: 37, - sheet_y: 19, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F90F-1F3FD", - non_qualified: null, - image: "1f90f-1f3fd.png", - sheet_x: 37, - sheet_y: 20, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F90F-1F3FE", - non_qualified: null, - image: "1f90f-1f3fe.png", - sheet_x: 37, - sheet_y: 21, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F90F-1F3FF", - non_qualified: null, - image: "1f90f-1f3ff.png", - sheet_x: 37, - sheet_y: 22, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f923", + native: "🤣", + x: 40, + y: 17 } - }, - a: "Pinching Hand", - b: "1F90F", - d: true, - e: true, - f: true, - h: true, - k: [ - 37, - 17 ], - o: 12 - }, - pineapple: { - a: "Pineapple", - b: "1F34D", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 37 - ], - o: 2 - }, - shirt: { - a: "T-Shirt", - b: "1F455", - d: true, - e: true, - f: true, - h: true, - k: [ - 14, - 9 - ], - n: [ - "tshirt" - ], - o: 2 - }, - service_dog: { - a: "Service Dog", - b: "1F415-200D-1F9BA", - d: true, - e: true, - f: true, - h: true, - k: [ - 11, - 49 - ], - o: 12 - }, - baby_symbol: { - a: "Baby Symbol", - b: "1F6BC", - d: true, - e: true, - f: true, - h: true, - j: [ - "orange-square", - "child" - ], - k: [ - 36, - 13 - ], - o: 2 + version: 3 }, joy: { - a: "Face with Tears of Joy", - b: "1F602", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "joy", + name: "Face with Tears of Joy", + keywords: [ "cry", - "tears", "weep", "happy", "happytears", "haha" ], - k: [ - 30, - 37 - ], - o: 2 - }, - tada: { - a: "Party Popper", - b: "1F389", - d: true, - e: true, - f: true, - h: true, - j: [ - "party", - "congratulations", - "birthday", - "magic", - "circus", - "celebration" - ], - k: [ - 7, - 45 - ], - o: 2 - }, - mango: { - a: "Mango", - b: "1F96D", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 3 - ], - o: 11 - }, - v: { - skin_variations: { - "1F3FB": { - unified: "270C-1F3FB", - non_qualified: null, - image: "270c-1f3fb.png", - sheet_x: 54, - sheet_y: 56, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "270C-1F3FC", - non_qualified: null, - image: "270c-1f3fc.png", - sheet_x: 55, - sheet_y: 0, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "270C-1F3FD", - non_qualified: null, - image: "270c-1f3fd.png", - sheet_x: 55, - sheet_y: 1, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "270C-1F3FE", - non_qualified: null, - image: "270c-1f3fe.png", - sheet_x: 55, - sheet_y: 2, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "270C-1F3FF", - non_qualified: null, - image: "270c-1f3ff.png", - sheet_x: 55, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f602", + native: "😂", + x: 32, + y: 23 } - }, - a: "Victory Hand", - b: "270C-FE0F", - c: "270C", - d: true, - e: true, - f: true, - h: true, - j: [ - "fingers", - "ohyeah", - "hand", - "peace", - "victory", - "two" ], - k: [ - 54, - 55 - ], - o: 2 - }, - snow_capped_mountain: { - a: "Snow Capped Mountain", - b: "1F3D4-FE0F", - c: "1F3D4", - d: true, - e: true, - f: true, - h: true, - k: [ - 10, - 39 - ], - o: 2 - }, - "flag-ac": { - a: "Ascension Island Flag", - b: "1F1E6-1F1E8", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 31 - ], - o: 2 - }, - jeans: { - a: "Jeans", - b: "1F456", - d: true, - e: true, - f: true, - h: true, - j: [ - "fashion", - "shopping" - ], - k: [ - 14, - 10 - ], - o: 2 - }, - poodle: { - a: "Poodle", - b: "1F429", - d: true, - e: true, - f: true, - h: true, - j: [ - "dog", - "animal", - "101", - "nature", - "pet" - ], - k: [ - 12, - 13 - ], - o: 2 - }, - crossed_fingers: { - skin_variations: { - "1F3FB": { - unified: "1F91E-1F3FB", - non_qualified: null, - image: "1f91e-1f3fb.png", - sheet_x: 38, - sheet_y: 6, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F91E-1F3FC", - non_qualified: null, - image: "1f91e-1f3fc.png", - sheet_x: 38, - sheet_y: 7, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F91E-1F3FD", - non_qualified: null, - image: "1f91e-1f3fd.png", - sheet_x: 38, - sheet_y: 8, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F91E-1F3FE", - non_qualified: null, - image: "1f91e-1f3fe.png", - sheet_x: 38, - sheet_y: 9, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F91E-1F3FF", - non_qualified: null, - image: "1f91e-1f3ff.png", - sheet_x: 38, - sheet_y: 10, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Hand with Index and Middle Fingers Crossed", - b: "1F91E", - d: true, - e: true, - f: true, - h: true, - j: [ - "good", - "lucky" - ], - k: [ - 38, - 5 - ], - n: [ - "hand_with_index_and_middle_fingers_crossed" - ], - o: 4 - }, - "flag-ad": { - a: "Andorra Flag", - b: "1F1E6-1F1E9", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 32 - ], - o: 2 + version: 1 }, slightly_smiling_face: { - a: "Slightly Smiling Face", - b: "1F642", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", - "smile" - ], - k: [ - 31, - 44 - ], - l: [ + id: "slightly_smiling_face", + name: "Slightly Smiling Face", + emoticons: [ ":)", "(:", ":-)" ], - o: 2 - }, - apple: { - a: "Red Apple", - b: "1F34E", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "mac", - "school" + keywords: [ + "smile" ], - k: [ - 6, - 38 - ], - o: 2 - }, - wc: { - a: "Water Closet", - b: "1F6BE", - d: true, - e: true, - f: true, - h: true, - j: [ - "toilet", - "restroom", - "blue-square" - ], - k: [ - 36, - 15 - ], - o: 2 - }, - scarf: { - a: "Scarf", - b: "1F9E3", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 22 - ], - o: 5 - }, - mountain: { - a: "Mountain", - b: "26F0-FE0F", - c: "26F0", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "nature", - "environment" - ], - k: [ - 54, - 11 - ], - o: 2 - }, - confetti_ball: { - a: "Confetti Ball", - b: "1F38A", - d: true, - e: true, - f: true, - h: true, - j: [ - "festival", - "party", - "birthday", - "circus" - ], - k: [ - 7, - 46 - ], - o: 2 - }, - i_love_you_hand_sign: { - skin_variations: { - "1F3FB": { - unified: "1F91F-1F3FB", - non_qualified: null, - image: "1f91f-1f3fb.png", - sheet_x: 38, - sheet_y: 12, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F91F-1F3FC", - non_qualified: null, - image: "1f91f-1f3fc.png", - sheet_x: 38, - sheet_y: 13, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F91F-1F3FD", - non_qualified: null, - image: "1f91f-1f3fd.png", - sheet_x: 38, - sheet_y: 14, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F91F-1F3FE", - non_qualified: null, - image: "1f91f-1f3fe.png", - sheet_x: 38, - sheet_y: 15, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F91F-1F3FF", - non_qualified: null, - image: "1f91f-1f3ff.png", - sheet_x: 38, - sheet_y: 16, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f642", + native: "🙂", + x: 33, + y: 29 } - }, - a: "I Love You Hand Sign", - b: "1F91F", - d: true, - e: true, - f: true, - h: true, - k: [ - 38, - 11 ], - o: 5 - }, - wolf: { - a: "Wolf Face", - b: "1F43A", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "wild" - ], - k: [ - 12, - 30 - ], - o: 2 - }, - gloves: { - a: "Gloves", - b: "1F9E4", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 23 - ], - o: 5 - }, - "flag-ae": { - a: "United Arab Emirates Flag", - b: "1F1E6-1F1EA", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 33 - ], - o: 2 + version: 1 }, upside_down_face: { - a: "Upside-Down Face", - b: "1F643", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "upside_down_face", + name: "Upside-Down Face", + keywords: [ + "upside", + "down", "flipped", "silly", "smile" ], - k: [ - 31, - 45 + skins: [ + { + unified: "1f643", + native: "🙃", + x: 33, + y: 30 + } ], - o: 2 + version: 1 }, - green_apple: { - a: "Green Apple", - b: "1F34F", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "nature" + melting_face: { + id: "melting_face", + name: "Melting Face", + keywords: [ + "hot", + "heat" ], - k: [ - 6, - 39 + skins: [ + { + unified: "1fae0", + native: "🫠", + x: 55, + y: 30 + } ], - o: 2 - }, - passport_control: { - a: "Passport Control", - b: "1F6C2", - d: true, - e: true, - f: true, - h: true, - j: [ - "custom", - "blue-square" - ], - k: [ - 36, - 24 - ], - o: 2 - }, - volcano: { - a: "Volcano", - b: "1F30B", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "nature", - "disaster" - ], - k: [ - 5, - 30 - ], - o: 2 - }, - tanabata_tree: { - a: "Tanabata Tree", - b: "1F38B", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "nature", - "branch", - "summer" - ], - k: [ - 7, - 47 - ], - o: 2 - }, - customs: { - a: "Customs", - b: "1F6C3", - d: true, - e: true, - f: true, - h: true, - j: [ - "passport", - "border", - "blue-square" - ], - k: [ - 36, - 25 - ], - o: 2 - }, - coat: { - a: "Coat", - b: "1F9E5", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 24 - ], - o: 5 + version: 14 }, wink: { - a: "Winking Face", - b: "1F609", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "wink", + name: "Winking Face", + emoticons: [ + ";)", + ";-)" + ], + keywords: [ + "wink", "happy", "mischievous", "secret", @@ -13903,315 +11658,24 @@ var emojis$1 = { "smile", "eye" ], - k: [ - 30, - 44 - ], - l: [ - ";)", - ";-)" - ], - m: ";)", - o: 2 - }, - bamboo: { - a: "Pine Decoration", - b: "1F38D", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "nature", - "vegetable", - "panda", - "pine_decoration" - ], - k: [ - 7, - 49 - ], - o: 2 - }, - "flag-af": { - a: "Afghanistan Flag", - b: "1F1E6-1F1EB", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 34 - ], - o: 2 - }, - fox_face: { - a: "Fox Face", - b: "1F98A", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "face" - ], - k: [ - 42, - 28 - ], - o: 4 - }, - pear: { - a: "Pear", - b: "1F350", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 40 - ], - o: 2 - }, - mount_fuji: { - a: "Mount Fuji", - b: "1F5FB", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "mountain", - "nature", - "japanese" - ], - k: [ - 30, - 30 - ], - o: 2 - }, - the_horns: { - skin_variations: { - "1F3FB": { - unified: "1F918-1F3FB", - non_qualified: null, - image: "1f918-1f3fb.png", - sheet_x: 37, - sheet_y: 32, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F918-1F3FC", - non_qualified: null, - image: "1f918-1f3fc.png", - sheet_x: 37, - sheet_y: 33, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F918-1F3FD", - non_qualified: null, - image: "1f918-1f3fd.png", - sheet_x: 37, - sheet_y: 34, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F918-1F3FE", - non_qualified: null, - image: "1f918-1f3fe.png", - sheet_x: 37, - sheet_y: 35, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F918-1F3FF", - non_qualified: null, - image: "1f918-1f3ff.png", - sheet_x: 37, - sheet_y: 36, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f609", + native: "😉", + x: 32, + y: 30 } - }, - a: "Sign of the Horns", - b: "1F918", - d: true, - e: true, - f: true, - h: true, - k: [ - 37, - 31 ], - n: [ - "sign_of_the_horns" - ], - o: 2 - }, - call_me_hand: { - skin_variations: { - "1F3FB": { - unified: "1F919-1F3FB", - non_qualified: null, - image: "1f919-1f3fb.png", - sheet_x: 37, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F919-1F3FC", - non_qualified: null, - image: "1f919-1f3fc.png", - sheet_x: 37, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F919-1F3FD", - non_qualified: null, - image: "1f919-1f3fd.png", - sheet_x: 37, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F919-1F3FE", - non_qualified: null, - image: "1f919-1f3fe.png", - sheet_x: 37, - sheet_y: 41, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F919-1F3FF", - non_qualified: null, - image: "1f919-1f3ff.png", - sheet_x: 37, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Call Me Hand", - b: "1F919", - d: true, - e: true, - f: true, - h: true, - j: [ - "hands", - "gesture" - ], - k: [ - 37, - 37 - ], - o: 4 - }, - "flag-ag": { - a: "Antigua & Barbuda Flag", - b: "1F1E6-1F1EC", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 35 - ], - o: 2 - }, - raccoon: { - a: "Raccoon", - b: "1F99D", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 47 - ], - o: 11 - }, - dolls: { - a: "Japanese Dolls", - b: "1F38E", - d: true, - e: true, - f: true, - h: true, - j: [ - "japanese", - "toy", - "kimono" - ], - k: [ - 7, - 50 - ], - o: 2 + version: 1 }, blush: { - a: "Smiling Face with Smiling Eyes", - b: "1F60A", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "blush", + name: "Smiling Face with Smiling Eyes", + emoticons: [ + ":)" + ], + keywords: [ + "blush", "smile", "happy", "flushed", @@ -14220,1122 +11684,173 @@ var emojis$1 = { "shy", "joy" ], - k: [ - 30, - 45 - ], - m: ":)", - o: 2 - }, - peach: { - a: "Peach", - b: "1F351", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 41 - ], - o: 2 - }, - baggage_claim: { - a: "Baggage Claim", - b: "1F6C4", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "airport", - "transport" - ], - k: [ - 36, - 26 - ], - o: 2 - }, - socks: { - a: "Socks", - b: "1F9E6", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 25 - ], - o: 5 - }, - camping: { - a: "Camping", - b: "1F3D5-FE0F", - c: "1F3D5", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "outdoors", - "tent" - ], - k: [ - 10, - 40 - ], - o: 2 - }, - dress: { - a: "Dress", - b: "1F457", - d: true, - e: true, - f: true, - h: true, - j: [ - "clothes", - "fashion", - "shopping" - ], - k: [ - 14, - 11 - ], - o: 2 - }, - beach_with_umbrella: { - a: "Beach with Umbrella", - b: "1F3D6-FE0F", - c: "1F3D6", - d: true, - e: true, - f: true, - h: true, - k: [ - 10, - 41 - ], - o: 2 - }, - cherries: { - a: "Cherries", - b: "1F352", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "fruit" - ], - k: [ - 6, - 42 - ], - o: 2 - }, - cat: { - a: "Cat Face", - b: "1F431", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "meow", - "nature", - "pet", - "kitten" - ], - k: [ - 12, - 21 - ], - o: 2 - }, - point_left: { - skin_variations: { - "1F3FB": { - unified: "1F448-1F3FB", - non_qualified: null, - image: "1f448-1f3fb.png", - sheet_x: 13, - sheet_y: 9, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F448-1F3FC", - non_qualified: null, - image: "1f448-1f3fc.png", - sheet_x: 13, - sheet_y: 10, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F448-1F3FD", - non_qualified: null, - image: "1f448-1f3fd.png", - sheet_x: 13, - sheet_y: 11, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F448-1F3FE", - non_qualified: null, - image: "1f448-1f3fe.png", - sheet_x: 13, - sheet_y: 12, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F448-1F3FF", - non_qualified: null, - image: "1f448-1f3ff.png", - sheet_x: 13, - sheet_y: 13, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f60a", + native: "😊", + x: 32, + y: 31 } - }, - a: "White Left Pointing Backhand Index", - b: "1F448", - d: true, - e: true, - f: true, - h: true, - j: [ - "direction", - "fingers", - "hand", - "left" ], - k: [ - 13, - 8 - ], - o: 2 - }, - left_luggage: { - a: "Left Luggage", - b: "1F6C5", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "travel" - ], - k: [ - 36, - 27 - ], - o: 2 - }, - "flag-ai": { - a: "Anguilla Flag", - b: "1F1E6-1F1EE", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 36 - ], - o: 2 + version: 1 }, innocent: { - a: "Smiling Face with Halo", - b: "1F607", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "innocent", + name: "Smiling Face with Halo", + keywords: [ + "innocent", "angel", - "heaven", - "halo" + "heaven" ], - k: [ - 30, - 42 - ], - o: 2 - }, - flags: { - a: "Carp Streamer", - b: "1F38F", - d: true, - e: true, - f: true, - h: true, - j: [ - "fish", - "japanese", - "koinobori", - "carp", - "banner" - ], - k: [ - 7, - 51 - ], - o: 2 - }, - warning: { - a: "Warning Sign", - b: "26A0-FE0F", - c: "26A0", - d: true, - e: true, - f: true, - h: true, - j: [ - "exclamation", - "wip", - "alert", - "error", - "problem", - "issue" - ], - k: [ - 53, - 50 - ], - o: 2 - }, - strawberry: { - a: "Strawberry", - b: "1F353", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "food", - "nature" - ], - k: [ - 6, - 43 - ], - o: 2 - }, - point_right: { - skin_variations: { - "1F3FB": { - unified: "1F449-1F3FB", - non_qualified: null, - image: "1f449-1f3fb.png", - sheet_x: 13, - sheet_y: 15, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F449-1F3FC", - non_qualified: null, - image: "1f449-1f3fc.png", - sheet_x: 13, - sheet_y: 16, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F449-1F3FD", - non_qualified: null, - image: "1f449-1f3fd.png", - sheet_x: 13, - sheet_y: 17, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F449-1F3FE", - non_qualified: null, - image: "1f449-1f3fe.png", - sheet_x: 13, - sheet_y: 18, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F449-1F3FF", - non_qualified: null, - image: "1f449-1f3ff.png", - sheet_x: 13, - sheet_y: 19, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f607", + native: "😇", + x: 32, + y: 28 } - }, - a: "White Right Pointing Backhand Index", - b: "1F449", - d: true, - e: true, - f: true, - h: true, - j: [ - "fingers", - "hand", - "direction", - "right" ], - k: [ - 13, - 14 - ], - o: 2 - }, - desert: { - a: "Desert", - b: "1F3DC-FE0F", - c: "1F3DC", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "warm", - "saharah" - ], - k: [ - 10, - 47 - ], - o: 2 - }, - kimono: { - a: "Kimono", - b: "1F458", - d: true, - e: true, - f: true, - h: true, - j: [ - "dress", - "fashion", - "women", - "female", - "japanese" - ], - k: [ - 14, - 12 - ], - o: 2 - }, - "flag-al": { - a: "Albania Flag", - b: "1F1E6-1F1F1", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 37 - ], - o: 2 - }, - wind_chime: { - a: "Wind Chime", - b: "1F390", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "ding", - "spring", - "bell" - ], - k: [ - 7, - 52 - ], - o: 2 + version: 1 }, smiling_face_with_3_hearts: { - a: "Smiling Face with Smiling Eyes and Three Hearts", - b: "1F970", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 6 - ], - o: 11 - }, - cat2: { - a: "Cat", - b: "1F408", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "meow", - "pet", - "cats" - ], - k: [ - 11, - 36 - ], - o: 2 - }, - rice_scene: { - a: "Moon Viewing Ceremony", - b: "1F391", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "japan", - "asia", - "tsukimi" - ], - k: [ - 7, - 53 - ], - o: 2 - }, - heart_eyes: { - a: "Smiling Face with Heart-Shaped Eyes", - b: "1F60D", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "smiling_face_with_3_hearts", + name: "Smiling Face with Hearts", + keywords: [ + "3", "love", "like", "affection", "valentines", "infatuation", "crush", - "heart" + "adore" ], - k: [ - 30, - 48 - ], - o: 2 - }, - sari: { - a: "Sari", - b: "1F97B", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 13 - ], - o: 12 - }, - "flag-am": { - a: "Armenia Flag", - b: "1F1E6-1F1F2", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 38 - ], - o: 2 - }, - lion_face: { - a: "Lion Face", - b: "1F981", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 19 - ], - o: 2 - }, - desert_island: { - a: "Desert Island", - b: "1F3DD-FE0F", - c: "1F3DD", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "tropical", - "mojito" - ], - k: [ - 10, - 48 - ], - o: 2 - }, - point_up_2: { - skin_variations: { - "1F3FB": { - unified: "1F446-1F3FB", - non_qualified: null, - image: "1f446-1f3fb.png", - sheet_x: 12, - sheet_y: 54, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F446-1F3FC", - non_qualified: null, - image: "1f446-1f3fc.png", - sheet_x: 12, - sheet_y: 55, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F446-1F3FD", - non_qualified: null, - image: "1f446-1f3fd.png", - sheet_x: 12, - sheet_y: 56, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F446-1F3FE", - non_qualified: null, - image: "1f446-1f3fe.png", - sheet_x: 13, - sheet_y: 0, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F446-1F3FF", - non_qualified: null, - image: "1f446-1f3ff.png", - sheet_x: 13, - sheet_y: 1, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f970", + native: "🥰", + x: 43, + y: 60 } - }, - a: "White Up Pointing Backhand Index", - b: "1F446", - d: true, - e: true, - f: true, - h: true, - j: [ - "fingers", - "hand", - "direction", - "up" ], - k: [ - 12, - 53 - ], - o: 2 + version: 11 }, - kiwifruit: { - a: "Kiwifruit", - b: "1F95D", - d: true, - e: true, - f: true, - h: true, - k: [ - 41, - 44 + heart_eyes: { + id: "heart_eyes", + name: "Smiling Face with Heart-Eyes", + keywords: [ + "heart", + "eyes", + "love", + "like", + "affection", + "valentines", + "infatuation", + "crush" ], - o: 4 - }, - children_crossing: { - a: "Children Crossing", - b: "1F6B8", - d: true, - e: true, - f: true, - h: true, - j: [ - "school", - "warning", - "danger", - "sign", - "driving", - "yellow-diamond" + skins: [ + { + unified: "1f60d", + native: "😍", + x: 32, + y: 34 + } ], - k: [ - 36, - 9 - ], - o: 2 - }, - national_park: { - a: "National Park", - b: "1F3DE-FE0F", - c: "1F3DE", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "environment", - "nature" - ], - k: [ - 10, - 49 - ], - o: 2 - }, - no_entry: { - a: "No Entry", - b: "26D4", - d: true, - e: true, - f: true, - h: true, - j: [ - "limit", - "security", - "privacy", - "bad", - "denied", - "stop", - "circle" - ], - k: [ - 54, - 8 - ], - o: 2 - }, - "one-piece_swimsuit": { - a: "One-Piece Swimsuit", - b: "1FA71", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 52 - ], - o: 12 - }, - tiger: { - a: "Tiger Face", - b: "1F42F", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cat", - "danger", - "wild", - "nature", - "roar" - ], - k: [ - 12, - 19 - ], - o: 2 - }, - red_envelope: { - a: "Red Gift Envelope", - b: "1F9E7", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 26 - ], - o: 11 + version: 1 }, "star-struck": { - a: "Grinning Face with Star Eyes", - b: "1F929", - d: true, - e: true, - f: true, - h: true, - k: [ - 38, - 43 + id: "star-struck", + name: "Star-Struck", + keywords: [ + "star", + "struck", + "grinning", + "face", + "with", + "eyes", + "smile", + "starry" ], - n: [ - "grinning_face_with_star_eyes" - ], - o: 5 - }, - middle_finger: { - skin_variations: { - "1F3FB": { - unified: "1F595-1F3FB", - non_qualified: null, - image: "1f595-1f3fb.png", - sheet_x: 29, - sheet_y: 55, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F595-1F3FC", - non_qualified: null, - image: "1f595-1f3fc.png", - sheet_x: 29, - sheet_y: 56, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F595-1F3FD", - non_qualified: null, - image: "1f595-1f3fd.png", - sheet_x: 30, - sheet_y: 0, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F595-1F3FE", - non_qualified: null, - image: "1f595-1f3fe.png", - sheet_x: 30, - sheet_y: 1, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F595-1F3FF", - non_qualified: null, - image: "1f595-1f3ff.png", - sheet_x: 30, - sheet_y: 2, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f929", + native: "🤩", + x: 40, + y: 40 } - }, - a: "Reversed Hand with Middle Finger Extended", - b: "1F595", - d: true, - e: true, - f: true, - h: true, - k: [ - 29, - 54 ], - n: [ - "reversed_hand_with_middle_finger_extended" - ], - o: 2 - }, - "flag-ao": { - a: "Angola Flag", - b: "1F1E6-1F1F4", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 39 - ], - o: 2 - }, - tomato: { - a: "Tomato", - b: "1F345", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "vegetable", - "nature", - "food" - ], - k: [ - 6, - 29 - ], - o: 2 - }, - coconut: { - a: "Coconut", - b: "1F965", - d: true, - e: true, - f: true, - h: true, - k: [ - 41, - 52 - ], - o: 5 - }, - ribbon: { - a: "Ribbon", - b: "1F380", - d: true, - e: true, - f: true, - h: true, - j: [ - "decoration", - "pink", - "girl", - "bowtie" - ], - k: [ - 7, - 31 - ], - o: 2 - }, - no_entry_sign: { - a: "No Entry Sign", - b: "1F6AB", - d: true, - e: true, - f: true, - h: true, - j: [ - "forbid", - "stop", - "limit", - "denied", - "disallow", - "circle" - ], - k: [ - 35, - 2 - ], - o: 2 - }, - point_down: { - skin_variations: { - "1F3FB": { - unified: "1F447-1F3FB", - non_qualified: null, - image: "1f447-1f3fb.png", - sheet_x: 13, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F447-1F3FC", - non_qualified: null, - image: "1f447-1f3fc.png", - sheet_x: 13, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F447-1F3FD", - non_qualified: null, - image: "1f447-1f3fd.png", - sheet_x: 13, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F447-1F3FE", - non_qualified: null, - image: "1f447-1f3fe.png", - sheet_x: 13, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F447-1F3FF", - non_qualified: null, - image: "1f447-1f3ff.png", - sheet_x: 13, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "White Down Pointing Backhand Index", - b: "1F447", - d: true, - e: true, - f: true, - h: true, - j: [ - "fingers", - "hand", - "direction", - "down" - ], - k: [ - 13, - 2 - ], - o: 2 - }, - "flag-aq": { - a: "Antarctica Flag", - b: "1F1E6-1F1F6", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 40 - ], - o: 2 - }, - briefs: { - a: "Briefs", - b: "1FA72", - d: true, - e: true, - f: true, - h: true, - k: [ - 51, - 53 - ], - o: 12 + version: 5 }, kissing_heart: { - a: "Face Throwing a Kiss", - b: "1F618", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", + id: "kissing_heart", + name: "Face Blowing a Kiss", + emoticons: [ + ":*", + ":-*" + ], + keywords: [ + "kissing", + "heart", + "love", + "like", + "affection", + "valentines", + "infatuation" + ], + skins: [ + { + unified: "1f618", + native: "😘", + x: 32, + y: 45 + } + ], + version: 1 + }, + kissing: { + id: "kissing", + name: "Kissing Face", + keywords: [ + "love", + "like", + "3", + "valentines", + "infatuation", + "kiss" + ], + skins: [ + { + unified: "1f617", + native: "😗", + x: 32, + y: 44 + } + ], + version: 1 + }, + relaxed: { + id: "relaxed", + name: "Smiling Face", + keywords: [ + "relaxed", + "blush", + "massage", + "happiness" + ], + skins: [ + { + unified: "263a-fe0f", + native: "☺️", + x: 57, + y: 35 + } + ], + version: 1 + }, + kissing_closed_eyes: { + id: "kissing_closed_eyes", + name: "Kissing Face with Closed Eyes", + keywords: [ "love", "like", "affection", @@ -15343,345 +11858,4024 @@ var emojis$1 = { "infatuation", "kiss" ], - k: [ - 31, - 2 + skins: [ + { + unified: "1f61a", + native: "😚", + x: 32, + y: 47 + } ], - l: [ - ":*", - ":-*" - ], - o: 2 + version: 1 }, - tiger2: { - a: "Tiger", - b: "1F405", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature", - "roar" - ], - k: [ - 11, - 33 - ], - o: 2 - }, - stadium: { - a: "Stadium", - b: "1F3DF-FE0F", - c: "1F3DF", - d: true, - e: true, - f: true, - h: true, - j: [ - "photo", - "place", - "sports", - "concert", - "venue" - ], - k: [ - 10, - 50 - ], - o: 2 - }, - leopard: { - a: "Leopard", - b: "1F406", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "nature" - ], - k: [ - 11, - 34 - ], - o: 2 - }, - no_bicycles: { - a: "No Bicycles", - b: "1F6B3", - d: true, - e: true, - f: true, - h: true, - j: [ - "cyclist", - "prohibited", - "circle" - ], - k: [ - 35, - 10 - ], - o: 2 - }, - kissing: { - a: "Kissing Face", - b: "1F617", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "like", - "face", - "3", + kissing_smiling_eyes: { + id: "kissing_smiling_eyes", + name: "Kissing Face with Smiling Eyes", + keywords: [ + "affection", "valentines", "infatuation", "kiss" ], - k: [ - 31, - 1 - ], - o: 2 - }, - "flag-ar": { - a: "Argentina Flag", - b: "1F1E6-1F1F7", - d: true, - e: true, - f: true, - h: true, - k: [ - 0, - 41 - ], - o: 2 - }, - avocado: { - a: "Avocado", - b: "1F951", - d: true, - e: true, - f: true, - h: true, - j: [ - "fruit", - "food" - ], - k: [ - 41, - 32 - ], - o: 4 - }, - point_up: { - skin_variations: { - "1F3FB": { - unified: "261D-1F3FB", - non_qualified: null, - image: "261d-1f3fb.png", - sheet_x: 53, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "261D-1F3FC", - non_qualified: null, - image: "261d-1f3fc.png", - sheet_x: 53, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "261D-1F3FD", - non_qualified: null, - image: "261d-1f3fd.png", - sheet_x: 53, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "261D-1F3FE", - non_qualified: null, - image: "261d-1f3fe.png", - sheet_x: 53, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "261D-1F3FF", - non_qualified: null, - image: "261d-1f3ff.png", - sheet_x: 53, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f619", + native: "😙", + x: 32, + y: 46 } - }, - a: "White Up Pointing Index", - b: "261D-FE0F", - c: "261D", - d: true, - e: true, - f: true, - h: true, - j: [ + ], + version: 1 + }, + smiling_face_with_tear: { + id: "smiling_face_with_tear", + name: "Smiling Face with Tear", + keywords: [ + "sad", + "cry", + "pretend" + ], + skins: [ + { + unified: "1f972", + native: "🥲", + x: 44, + y: 1 + } + ], + version: 13 + }, + yum: { + id: "yum", + name: "Face Savoring Food", + keywords: [ + "yum", + "happy", + "joy", + "tongue", + "smile", + "silly", + "yummy", + "nom", + "delicious", + "savouring" + ], + skins: [ + { + unified: "1f60b", + native: "😋", + x: 32, + y: 32 + } + ], + version: 1 + }, + stuck_out_tongue: { + id: "stuck_out_tongue", + name: "Face with Tongue", + emoticons: [ + ":p", + ":-p", + ":P", + ":-P", + ":b", + ":-b" + ], + keywords: [ + "stuck", + "out", + "prank", + "childish", + "playful", + "mischievous", + "smile" + ], + skins: [ + { + unified: "1f61b", + native: "😛", + x: 32, + y: 48 + } + ], + version: 1 + }, + stuck_out_tongue_winking_eye: { + id: "stuck_out_tongue_winking_eye", + name: "Winking Face with Tongue", + emoticons: [ + ";p", + ";-p", + ";b", + ";-b", + ";P", + ";-P" + ], + keywords: [ + "stuck", + "out", + "eye", + "prank", + "childish", + "playful", + "mischievous", + "smile", + "wink" + ], + skins: [ + { + unified: "1f61c", + native: "😜", + x: 32, + y: 49 + } + ], + version: 1 + }, + zany_face: { + id: "zany_face", + name: "Zany Face", + keywords: [ + "grinning", + "with", + "one", + "large", + "and", + "small", + "eye", + "goofy", + "crazy" + ], + skins: [ + { + unified: "1f92a", + native: "🤪", + x: 40, + y: 41 + } + ], + version: 5 + }, + stuck_out_tongue_closed_eyes: { + id: "stuck_out_tongue_closed_eyes", + name: "Squinting Face with Tongue", + keywords: [ + "stuck", + "out", + "closed", + "eyes", + "prank", + "playful", + "mischievous", + "smile" + ], + skins: [ + { + unified: "1f61d", + native: "😝", + x: 32, + y: 50 + } + ], + version: 1 + }, + money_mouth_face: { + id: "money_mouth_face", + name: "Money-Mouth Face", + keywords: [ + "money", + "mouth", + "rich", + "dollar" + ], + skins: [ + { + unified: "1f911", + native: "🤑", + x: 39, + y: 0 + } + ], + version: 1 + }, + hugging_face: { + id: "hugging_face", + name: "Hugging Face", + keywords: [ + "smile", + "hug" + ], + skins: [ + { + unified: "1f917", + native: "🤗", + x: 39, + y: 6 + } + ], + version: 1 + }, + face_with_hand_over_mouth: { + id: "face_with_hand_over_mouth", + name: "Face with Hand over Mouth", + keywords: [ + "smiling", + "eyes", + "and", + "covering", + "whoops", + "shock", + "surprise" + ], + skins: [ + { + unified: "1f92d", + native: "🤭", + x: 40, + y: 44 + } + ], + version: 5 + }, + face_with_open_eyes_and_hand_over_mouth: { + id: "face_with_open_eyes_and_hand_over_mouth", + name: "Face with Open Eyes and Hand over Mouth", + keywords: [ + "silence", + "secret", + "shock", + "surprise" + ], + skins: [ + { + unified: "1fae2", + native: "🫢", + x: 55, + y: 32 + } + ], + version: 14 + }, + face_with_peeking_eye: { + id: "face_with_peeking_eye", + name: "Face with Peeking Eye", + keywords: [ + "scared", + "frightening", + "embarrassing", + "shy" + ], + skins: [ + { + unified: "1fae3", + native: "🫣", + x: 55, + y: 33 + } + ], + version: 14 + }, + shushing_face: { + id: "shushing_face", + name: "Shushing Face", + keywords: [ + "with", + "finger", + "covering", + "closed", + "lips", + "quiet", + "shhh" + ], + skins: [ + { + unified: "1f92b", + native: "🤫", + x: 40, + y: 42 + } + ], + version: 5 + }, + thinking_face: { + id: "thinking_face", + name: "Thinking Face", + keywords: [ + "hmmm", + "think", + "consider" + ], + skins: [ + { + unified: "1f914", + native: "🤔", + x: 39, + y: 3 + } + ], + version: 1 + }, + saluting_face: { + id: "saluting_face", + name: "Saluting Face", + keywords: [ + "respect", + "salute" + ], + skins: [ + { + unified: "1fae1", + native: "🫡", + x: 55, + y: 31 + } + ], + version: 14 + }, + zipper_mouth_face: { + id: "zipper_mouth_face", + name: "Zipper-Mouth Face", + keywords: [ + "zipper", + "mouth", + "sealed", + "secret" + ], + skins: [ + { + unified: "1f910", + native: "🤐", + x: 38, + y: 60 + } + ], + version: 1 + }, + face_with_raised_eyebrow: { + id: "face_with_raised_eyebrow", + name: "Face with Raised Eyebrow", + keywords: [ + "one", + "distrust", + "scepticism", + "disapproval", + "disbelief", + "surprise" + ], + skins: [ + { + unified: "1f928", + native: "🤨", + x: 40, + y: 39 + } + ], + version: 5 + }, + neutral_face: { + id: "neutral_face", + name: "Neutral Face", + emoticons: [ + ":|", + ":-|" + ], + keywords: [ + "indifference", + "meh", + ":", + "" + ], + skins: [ + { + unified: "1f610", + native: "😐", + x: 32, + y: 37 + } + ], + version: 1 + }, + expressionless: { + id: "expressionless", + name: "Expressionless Face", + emoticons: [ + "-_-" + ], + keywords: [ + "indifferent", + "-", + "", + "meh", + "deadpan" + ], + skins: [ + { + unified: "1f611", + native: "😑", + x: 32, + y: 38 + } + ], + version: 1 + }, + no_mouth: { + id: "no_mouth", + name: "Face Without Mouth", + keywords: [ + "no", + "hellokitty" + ], + skins: [ + { + unified: "1f636", + native: "😶", + x: 33, + y: 17 + } + ], + version: 1 + }, + dotted_line_face: { + id: "dotted_line_face", + name: "Dotted Line Face", + keywords: [ + "invisible", + "lonely", + "isolation", + "depression" + ], + skins: [ + { + unified: "1fae5", + native: "🫥", + x: 55, + y: 35 + } + ], + version: 14 + }, + face_in_clouds: { + id: "face_in_clouds", + name: "Face in Clouds", + keywords: [ + "shower", + "steam", + "dream" + ], + skins: [ + { + unified: "1f636-200d-1f32b-fe0f", + native: "😶‍🌫️", + x: 33, + y: 16 + } + ], + version: 13.1 + }, + smirk: { + id: "smirk", + name: "Smirking Face", + keywords: [ + "smirk", + "smile", + "mean", + "prank", + "smug", + "sarcasm" + ], + skins: [ + { + unified: "1f60f", + native: "😏", + x: 32, + y: 36 + } + ], + version: 1 + }, + unamused: { + id: "unamused", + name: "Unamused Face", + emoticons: [ + ":(" + ], + keywords: [ + "indifference", + "bored", + "straight", + "serious", + "sarcasm", + "unimpressed", + "skeptical", + "dubious", + "side", + "eye" + ], + skins: [ + { + unified: "1f612", + native: "😒", + x: 32, + y: 39 + } + ], + version: 1 + }, + face_with_rolling_eyes: { + id: "face_with_rolling_eyes", + name: "Face with Rolling Eyes", + keywords: [ + "eyeroll", + "frustrated" + ], + skins: [ + { + unified: "1f644", + native: "🙄", + x: 33, + y: 31 + } + ], + version: 1 + }, + grimacing: { + id: "grimacing", + name: "Grimacing Face", + keywords: [ + "grimace", + "teeth" + ], + skins: [ + { + unified: "1f62c", + native: "😬", + x: 33, + y: 4 + } + ], + version: 1 + }, + face_exhaling: { + id: "face_exhaling", + name: "Face Exhaling", + keywords: [ + "relieve", + "relief", + "tired", + "sigh" + ], + skins: [ + { + unified: "1f62e-200d-1f4a8", + native: "😮‍💨", + x: 33, + y: 6 + } + ], + version: 13.1 + }, + lying_face: { + id: "lying_face", + name: "Lying Face", + keywords: [ + "lie", + "pinocchio" + ], + skins: [ + { + unified: "1f925", + native: "🤥", + x: 40, + y: 19 + } + ], + version: 3 + }, + relieved: { + id: "relieved", + name: "Relieved Face", + keywords: [ + "relaxed", + "phew", + "massage", + "happiness" + ], + skins: [ + { + unified: "1f60c", + native: "😌", + x: 32, + y: 33 + } + ], + version: 1 + }, + pensive: { + id: "pensive", + name: "Pensive Face", + keywords: [ + "sad", + "depressed", + "upset" + ], + skins: [ + { + unified: "1f614", + native: "😔", + x: 32, + y: 41 + } + ], + version: 1 + }, + sleepy: { + id: "sleepy", + name: "Sleepy Face", + keywords: [ + "tired", + "rest", + "nap" + ], + skins: [ + { + unified: "1f62a", + native: "😪", + x: 33, + y: 2 + } + ], + version: 1 + }, + drooling_face: { + id: "drooling_face", + name: "Drooling Face", + keywords: [ + ], + skins: [ + { + unified: "1f924", + native: "🤤", + x: 40, + y: 18 + } + ], + version: 3 + }, + sleeping: { + id: "sleeping", + name: "Sleeping Face", + keywords: [ + "tired", + "sleepy", + "night", + "zzz" + ], + skins: [ + { + unified: "1f634", + native: "😴", + x: 33, + y: 13 + } + ], + version: 1 + }, + mask: { + id: "mask", + name: "Face with Medical Mask", + keywords: [ + "sick", + "ill", + "disease", + "covid" + ], + skins: [ + { + unified: "1f637", + native: "😷", + x: 33, + y: 18 + } + ], + version: 1 + }, + face_with_thermometer: { + id: "face_with_thermometer", + name: "Face with Thermometer", + keywords: [ + "sick", + "temperature", + "cold", + "fever", + "covid" + ], + skins: [ + { + unified: "1f912", + native: "🤒", + x: 39, + y: 1 + } + ], + version: 1 + }, + face_with_head_bandage: { + id: "face_with_head_bandage", + name: "Face with Head-Bandage", + keywords: [ + "head", + "bandage", + "injured", + "clumsy", + "hurt" + ], + skins: [ + { + unified: "1f915", + native: "🤕", + x: 39, + y: 4 + } + ], + version: 1 + }, + nauseated_face: { + id: "nauseated_face", + name: "Nauseated Face", + keywords: [ + "vomit", + "gross", + "green", + "sick", + "throw", + "up", + "ill" + ], + skins: [ + { + unified: "1f922", + native: "🤢", + x: 40, + y: 16 + } + ], + version: 3 + }, + face_vomiting: { + id: "face_vomiting", + name: "Face Vomiting", + keywords: [ + "with", + "open", + "mouth", + "sick" + ], + skins: [ + { + unified: "1f92e", + native: "🤮", + x: 40, + y: 45 + } + ], + version: 5 + }, + sneezing_face: { + id: "sneezing_face", + name: "Sneezing Face", + keywords: [ + "gesundheit", + "sneeze", + "sick", + "allergy" + ], + skins: [ + { + unified: "1f927", + native: "🤧", + x: 40, + y: 38 + } + ], + version: 3 + }, + hot_face: { + id: "hot_face", + name: "Hot Face", + keywords: [ + "feverish", + "heat", + "red", + "sweating" + ], + skins: [ + { + unified: "1f975", + native: "🥵", + x: 44, + y: 4 + } + ], + version: 11 + }, + cold_face: { + id: "cold_face", + name: "Cold Face", + keywords: [ + "blue", + "freezing", + "frozen", + "frostbite", + "icicles" + ], + skins: [ + { + unified: "1f976", + native: "🥶", + x: 44, + y: 5 + } + ], + version: 11 + }, + woozy_face: { + id: "woozy_face", + name: "Woozy Face", + keywords: [ + "dizzy", + "intoxicated", + "tipsy", + "wavy" + ], + skins: [ + { + unified: "1f974", + native: "🥴", + x: 44, + y: 3 + } + ], + version: 11 + }, + dizzy_face: { + id: "dizzy_face", + name: "Dizzy Face", + keywords: [ + "spent", + "unconscious", + "xox" + ], + skins: [ + { + unified: "1f635", + native: "😵", + x: 33, + y: 15 + } + ], + version: 1 + }, + face_with_spiral_eyes: { + id: "face_with_spiral_eyes", + name: "Face with Spiral Eyes", + keywords: [ + "sick", + "ill", + "confused", + "nauseous", + "nausea" + ], + skins: [ + { + unified: "1f635-200d-1f4ab", + native: "😵‍💫", + x: 33, + y: 14 + } + ], + version: 13.1 + }, + exploding_head: { + id: "exploding_head", + name: "Exploding Head", + keywords: [ + "shocked", + "face", + "with", + "mind", + "blown" + ], + skins: [ + { + unified: "1f92f", + native: "🤯", + x: 40, + y: 46 + } + ], + version: 5 + }, + face_with_cowboy_hat: { + id: "face_with_cowboy_hat", + name: "Cowboy Hat Face", + keywords: [ + "with", + "cowgirl" + ], + skins: [ + { + unified: "1f920", + native: "🤠", + x: 40, + y: 14 + } + ], + version: 3 + }, + partying_face: { + id: "partying_face", + name: "Partying Face", + keywords: [ + "celebration", + "woohoo" + ], + skins: [ + { + unified: "1f973", + native: "🥳", + x: 44, + y: 2 + } + ], + version: 11 + }, + disguised_face: { + id: "disguised_face", + name: "Disguised Face", + keywords: [ + "pretent", + "brows", + "glasses", + "moustache" + ], + skins: [ + { + unified: "1f978", + native: "🥸", + x: 44, + y: 12 + } + ], + version: 13 + }, + sunglasses: { + id: "sunglasses", + name: "Smiling Face with Sunglasses", + emoticons: [ + "8)" + ], + keywords: [ + "cool", + "smile", + "summer", + "beach", + "sunglass" + ], + skins: [ + { + unified: "1f60e", + native: "😎", + x: 32, + y: 35 + } + ], + version: 1 + }, + nerd_face: { + id: "nerd_face", + name: "Nerd Face", + keywords: [ + "nerdy", + "geek", + "dork" + ], + skins: [ + { + unified: "1f913", + native: "🤓", + x: 39, + y: 2 + } + ], + version: 1 + }, + face_with_monocle: { + id: "face_with_monocle", + name: "Face with Monocle", + keywords: [ + "stuffy", + "wealthy" + ], + skins: [ + { + unified: "1f9d0", + native: "🧐", + x: 47, + y: 13 + } + ], + version: 5 + }, + confused: { + id: "confused", + name: "Confused Face", + emoticons: [ + ":\\", + ":-\\", + ":/", + ":-/" + ], + keywords: [ + "indifference", + "huh", + "weird", + "hmmm", + ":/" + ], + skins: [ + { + unified: "1f615", + native: "😕", + x: 32, + y: 42 + } + ], + version: 1 + }, + face_with_diagonal_mouth: { + id: "face_with_diagonal_mouth", + name: "Face with Diagonal Mouth", + keywords: [ + "skeptic", + "confuse", + "frustrated", + "indifferent" + ], + skins: [ + { + unified: "1fae4", + native: "🫤", + x: 55, + y: 34 + } + ], + version: 14 + }, + worried: { + id: "worried", + name: "Worried Face", + keywords: [ + "concern", + "nervous", + ":(" + ], + skins: [ + { + unified: "1f61f", + native: "😟", + x: 32, + y: 52 + } + ], + version: 1 + }, + slightly_frowning_face: { + id: "slightly_frowning_face", + name: "Slightly Frowning Face", + keywords: [ + "disappointed", + "sad", + "upset" + ], + skins: [ + { + unified: "1f641", + native: "🙁", + x: 33, + y: 28 + } + ], + version: 1 + }, + white_frowning_face: { + id: "white_frowning_face", + name: "Frowning Face", + keywords: [ + "white", + "sad", + "upset", + "frown" + ], + skins: [ + { + unified: "2639-fe0f", + native: "☹️", + x: 57, + y: 34 + } + ], + version: 1 + }, + open_mouth: { + id: "open_mouth", + name: "Face with Open Mouth", + emoticons: [ + ":o", + ":-o", + ":O", + ":-O" + ], + keywords: [ + "surprise", + "impressed", + "wow", + "whoa", + ":O" + ], + skins: [ + { + unified: "1f62e", + native: "😮", + x: 33, + y: 7 + } + ], + version: 1 + }, + hushed: { + id: "hushed", + name: "Hushed Face", + keywords: [ + "woo", + "shh" + ], + skins: [ + { + unified: "1f62f", + native: "😯", + x: 33, + y: 8 + } + ], + version: 1 + }, + astonished: { + id: "astonished", + name: "Astonished Face", + keywords: [ + "xox", + "surprised", + "poisoned" + ], + skins: [ + { + unified: "1f632", + native: "😲", + x: 33, + y: 11 + } + ], + version: 1 + }, + flushed: { + id: "flushed", + name: "Flushed Face", + keywords: [ + "blush", + "shy", + "flattered" + ], + skins: [ + { + unified: "1f633", + native: "😳", + x: 33, + y: 12 + } + ], + version: 1 + }, + pleading_face: { + id: "pleading_face", + name: "Pleading Face", + keywords: [ + "begging", + "mercy", + "cry", + "tears", + "sad", + "grievance" + ], + skins: [ + { + unified: "1f97a", + native: "🥺", + x: 44, + y: 14 + } + ], + version: 11 + }, + face_holding_back_tears: { + id: "face_holding_back_tears", + name: "Face Holding Back Tears", + keywords: [ + "touched", + "gratitude", + "cry" + ], + skins: [ + { + unified: "1f979", + native: "🥹", + x: 44, + y: 13 + } + ], + version: 14 + }, + frowning: { + id: "frowning", + name: "Frowning Face with Open Mouth", + keywords: [ + "aw", + "what" + ], + skins: [ + { + unified: "1f626", + native: "😦", + x: 32, + y: 59 + } + ], + version: 1 + }, + anguished: { + id: "anguished", + name: "Anguished Face", + emoticons: [ + "D:" + ], + keywords: [ + "stunned", + "nervous" + ], + skins: [ + { + unified: "1f627", + native: "😧", + x: 32, + y: 60 + } + ], + version: 1 + }, + fearful: { + id: "fearful", + name: "Fearful Face", + keywords: [ + "scared", + "terrified", + "nervous" + ], + skins: [ + { + unified: "1f628", + native: "😨", + x: 33, + y: 0 + } + ], + version: 1 + }, + cold_sweat: { + id: "cold_sweat", + name: "Anxious Face with Sweat", + keywords: [ + "cold", + "nervous" + ], + skins: [ + { + unified: "1f630", + native: "😰", + x: 33, + y: 9 + } + ], + version: 1 + }, + disappointed_relieved: { + id: "disappointed_relieved", + name: "Sad but Relieved Face", + keywords: [ + "disappointed", + "phew", + "sweat", + "nervous" + ], + skins: [ + { + unified: "1f625", + native: "😥", + x: 32, + y: 58 + } + ], + version: 1 + }, + cry: { + id: "cry", + name: "Crying Face", + emoticons: [ + ":'(" + ], + keywords: [ + "cry", + "tears", + "sad", + "depressed", + "upset", + ":'(" + ], + skins: [ + { + unified: "1f622", + native: "😢", + x: 32, + y: 55 + } + ], + version: 1 + }, + sob: { + id: "sob", + name: "Loudly Crying Face", + emoticons: [ + ":'(" + ], + keywords: [ + "sob", + "cry", + "tears", + "sad", + "upset", + "depressed" + ], + skins: [ + { + unified: "1f62d", + native: "😭", + x: 33, + y: 5 + } + ], + version: 1 + }, + scream: { + id: "scream", + name: "Face Screaming in Fear", + keywords: [ + "scream", + "munch", + "scared", + "omg" + ], + skins: [ + { + unified: "1f631", + native: "😱", + x: 33, + y: 10 + } + ], + version: 1 + }, + confounded: { + id: "confounded", + name: "Confounded Face", + keywords: [ + "confused", + "sick", + "unwell", + "oops", + ":S" + ], + skins: [ + { + unified: "1f616", + native: "😖", + x: 32, + y: 43 + } + ], + version: 1 + }, + persevere: { + id: "persevere", + name: "Persevering Face", + keywords: [ + "persevere", + "sick", + "no", + "upset", + "oops" + ], + skins: [ + { + unified: "1f623", + native: "😣", + x: 32, + y: 56 + } + ], + version: 1 + }, + disappointed: { + id: "disappointed", + name: "Disappointed Face", + emoticons: [ + "):", + ":(", + ":-(" + ], + keywords: [ + "sad", + "upset", + "depressed", + ":(" + ], + skins: [ + { + unified: "1f61e", + native: "😞", + x: 32, + y: 51 + } + ], + version: 1 + }, + sweat: { + id: "sweat", + name: "Face with Cold Sweat", + keywords: [ + "downcast", + "hot", + "sad", + "tired", + "exercise" + ], + skins: [ + { + unified: "1f613", + native: "😓", + x: 32, + y: 40 + } + ], + version: 1 + }, + weary: { + id: "weary", + name: "Weary Face", + keywords: [ + "tired", + "sleepy", + "sad", + "frustrated", + "upset" + ], + skins: [ + { + unified: "1f629", + native: "😩", + x: 33, + y: 1 + } + ], + version: 1 + }, + tired_face: { + id: "tired_face", + name: "Tired Face", + keywords: [ + "sick", + "whine", + "upset", + "frustrated" + ], + skins: [ + { + unified: "1f62b", + native: "😫", + x: 33, + y: 3 + } + ], + version: 1 + }, + yawning_face: { + id: "yawning_face", + name: "Yawning Face", + keywords: [ + "tired", + "sleepy" + ], + skins: [ + { + unified: "1f971", + native: "🥱", + x: 44, + y: 0 + } + ], + version: 12 + }, + triumph: { + id: "triumph", + name: "Face with Look of Triumph", + keywords: [ + "steam", + "from", + "nose", + "gas", + "phew", + "proud", + "pride" + ], + skins: [ + { + unified: "1f624", + native: "😤", + x: 32, + y: 57 + } + ], + version: 1 + }, + rage: { + id: "rage", + name: "Pouting Face", + keywords: [ + "rage", + "angry", + "mad", + "hate", + "despise" + ], + skins: [ + { + unified: "1f621", + native: "😡", + x: 32, + y: 54 + } + ], + version: 1 + }, + angry: { + id: "angry", + name: "Angry Face", + emoticons: [ + ">:(", + ">:-(" + ], + keywords: [ + "mad", + "annoyed", + "frustrated" + ], + skins: [ + { + unified: "1f620", + native: "😠", + x: 32, + y: 53 + } + ], + version: 1 + }, + face_with_symbols_on_mouth: { + id: "face_with_symbols_on_mouth", + name: "Face with Symbols on Mouth", + keywords: [ + "serious", + "covering", + "swearing", + "cursing", + "cussing", + "profanity", + "expletive" + ], + skins: [ + { + unified: "1f92c", + native: "🤬", + x: 40, + y: 43 + } + ], + version: 5 + }, + smiling_imp: { + id: "smiling_imp", + name: "Smiling Face with Horns", + keywords: [ + "imp", + "devil" + ], + skins: [ + { + unified: "1f608", + native: "😈", + x: 32, + y: 29 + } + ], + version: 1 + }, + imp: { + id: "imp", + name: "Imp", + keywords: [ + "angry", + "face", + "with", + "horns", + "devil" + ], + skins: [ + { + unified: "1f47f", + native: "👿", + x: 25, + y: 9 + } + ], + version: 1 + }, + skull: { + id: "skull", + name: "Skull", + keywords: [ + "dead", + "skeleton", + "creepy", + "death" + ], + skins: [ + { + unified: "1f480", + native: "💀", + x: 25, + y: 10 + } + ], + version: 1 + }, + skull_and_crossbones: { + id: "skull_and_crossbones", + name: "Skull and Crossbones", + keywords: [ + "poison", + "danger", + "deadly", + "scary", + "death", + "pirate", + "evil" + ], + skins: [ + { + unified: "2620-fe0f", + native: "☠️", + x: 57, + y: 26 + } + ], + version: 1 + }, + hankey: { + id: "hankey", + name: "Pile of Poo", + keywords: [ + "hankey", + "poop", + "shit", + "shitface", + "fail", + "turd" + ], + skins: [ + { + unified: "1f4a9", + native: "💩", + x: 27, + y: 57 + } + ], + version: 1 + }, + clown_face: { + id: "clown_face", + name: "Clown Face", + keywords: [ + ], + skins: [ + { + unified: "1f921", + native: "🤡", + x: 40, + y: 15 + } + ], + version: 3 + }, + japanese_ogre: { + id: "japanese_ogre", + name: "Ogre", + keywords: [ + "japanese", + "monster", + "red", + "mask", + "halloween", + "scary", + "creepy", + "devil", + "demon" + ], + skins: [ + { + unified: "1f479", + native: "👹", + x: 24, + y: 59 + } + ], + version: 1 + }, + japanese_goblin: { + id: "japanese_goblin", + name: "Goblin", + keywords: [ + "japanese", + "red", + "evil", + "mask", + "monster", + "scary", + "creepy" + ], + skins: [ + { + unified: "1f47a", + native: "👺", + x: 24, + y: 60 + } + ], + version: 1 + }, + ghost: { + id: "ghost", + name: "Ghost", + keywords: [ + "halloween", + "spooky", + "scary" + ], + skins: [ + { + unified: "1f47b", + native: "👻", + x: 25, + y: 0 + } + ], + version: 1 + }, + alien: { + id: "alien", + name: "Alien", + keywords: [ + "UFO", + "paul", + "weird", + "outer", + "space" + ], + skins: [ + { + unified: "1f47d", + native: "👽", + x: 25, + y: 7 + } + ], + version: 1 + }, + space_invader: { + id: "space_invader", + name: "Alien Monster", + keywords: [ + "space", + "invader", + "game", + "arcade", + "play" + ], + skins: [ + { + unified: "1f47e", + native: "👾", + x: 25, + y: 8 + } + ], + version: 1 + }, + robot_face: { + id: "robot_face", + name: "Robot", + keywords: [ + "face", + "computer", + "machine", + "bot" + ], + skins: [ + { + unified: "1f916", + native: "🤖", + x: 39, + y: 5 + } + ], + version: 1 + }, + smiley_cat: { + id: "smiley_cat", + name: "Grinning Cat", + keywords: [ + "smiley", + "animal", + "cats", + "happy", + "smile" + ], + skins: [ + { + unified: "1f63a", + native: "😺", + x: 33, + y: 21 + } + ], + version: 1 + }, + smile_cat: { + id: "smile_cat", + name: "Grinning Cat with Smiling Eyes", + keywords: [ + "smile", + "animal", + "cats" + ], + skins: [ + { + unified: "1f638", + native: "😸", + x: 33, + y: 19 + } + ], + version: 1 + }, + joy_cat: { + id: "joy_cat", + name: "Cat with Tears of Joy", + keywords: [ + "animal", + "cats", + "haha", + "happy" + ], + skins: [ + { + unified: "1f639", + native: "😹", + x: 33, + y: 20 + } + ], + version: 1 + }, + heart_eyes_cat: { + id: "heart_eyes_cat", + name: "Smiling Cat with Heart-Eyes", + keywords: [ + "heart", + "eyes", + "animal", + "love", + "like", + "affection", + "cats", + "valentines" + ], + skins: [ + { + unified: "1f63b", + native: "😻", + x: 33, + y: 22 + } + ], + version: 1 + }, + smirk_cat: { + id: "smirk_cat", + name: "Cat with Wry Smile", + keywords: [ + "smirk", + "animal", + "cats" + ], + skins: [ + { + unified: "1f63c", + native: "😼", + x: 33, + y: 23 + } + ], + version: 1 + }, + kissing_cat: { + id: "kissing_cat", + name: "Kissing Cat", + keywords: [ + "animal", + "cats", + "kiss" + ], + skins: [ + { + unified: "1f63d", + native: "😽", + x: 33, + y: 24 + } + ], + version: 1 + }, + scream_cat: { + id: "scream_cat", + name: "Weary Cat", + keywords: [ + "scream", + "animal", + "cats", + "munch", + "scared" + ], + skins: [ + { + unified: "1f640", + native: "🙀", + x: 33, + y: 27 + } + ], + version: 1 + }, + crying_cat_face: { + id: "crying_cat_face", + name: "Crying Cat", + keywords: [ + "face", + "animal", + "tears", + "weep", + "sad", + "cats", + "upset", + "cry" + ], + skins: [ + { + unified: "1f63f", + native: "😿", + x: 33, + y: 26 + } + ], + version: 1 + }, + pouting_cat: { + id: "pouting_cat", + name: "Pouting Cat", + keywords: [ + "animal", + "cats" + ], + skins: [ + { + unified: "1f63e", + native: "😾", + x: 33, + y: 25 + } + ], + version: 1 + }, + see_no_evil: { + id: "see_no_evil", + name: "See-No-Evil Monkey", + keywords: [ + "see", + "no", + "evil", + "animal", + "nature", + "haha" + ], + skins: [ + { + unified: "1f648", + native: "🙈", + x: 34, + y: 25 + } + ], + version: 1 + }, + hear_no_evil: { + id: "hear_no_evil", + name: "Hear-No-Evil Monkey", + keywords: [ + "hear", + "no", + "evil", + "animal", + "nature" + ], + skins: [ + { + unified: "1f649", + native: "🙉", + x: 34, + y: 26 + } + ], + version: 1 + }, + speak_no_evil: { + id: "speak_no_evil", + name: "Speak-No-Evil Monkey", + keywords: [ + "speak", + "no", + "evil", + "animal", + "nature", + "omg" + ], + skins: [ + { + unified: "1f64a", + native: "🙊", + x: 34, + y: 27 + } + ], + version: 1 + }, + love_letter: { + id: "love_letter", + name: "Love Letter", + keywords: [ + "email", + "like", + "affection", + "envelope", + "valentines" + ], + skins: [ + { + unified: "1f48c", + native: "💌", + x: 26, + y: 39 + } + ], + version: 1 + }, + cupid: { + id: "cupid", + name: "Heart with Arrow", + keywords: [ + "cupid", + "love", + "like", + "affection", + "valentines" + ], + skins: [ + { + unified: "1f498", + native: "💘", + x: 27, + y: 40 + } + ], + version: 1 + }, + gift_heart: { + id: "gift_heart", + name: "Heart with Ribbon", + keywords: [ + "gift", + "love", + "valentines" + ], + skins: [ + { + unified: "1f49d", + native: "💝", + x: 27, + y: 45 + } + ], + version: 1 + }, + sparkling_heart: { + id: "sparkling_heart", + name: "Sparkling Heart", + keywords: [ + "love", + "like", + "affection", + "valentines" + ], + skins: [ + { + unified: "1f496", + native: "💖", + x: 27, + y: 38 + } + ], + version: 1 + }, + heartpulse: { + id: "heartpulse", + name: "Growing Heart", + keywords: [ + "heartpulse", + "like", + "love", + "affection", + "valentines", + "pink" + ], + skins: [ + { + unified: "1f497", + native: "💗", + x: 27, + y: 39 + } + ], + version: 1 + }, + heartbeat: { + id: "heartbeat", + name: "Beating Heart", + keywords: [ + "heartbeat", + "love", + "like", + "affection", + "valentines", + "pink" + ], + skins: [ + { + unified: "1f493", + native: "💓", + x: 27, + y: 35 + } + ], + version: 1 + }, + revolving_hearts: { + id: "revolving_hearts", + name: "Revolving Hearts", + keywords: [ + "love", + "like", + "affection", + "valentines" + ], + skins: [ + { + unified: "1f49e", + native: "💞", + x: 27, + y: 46 + } + ], + version: 1 + }, + two_hearts: { + id: "two_hearts", + name: "Two Hearts", + keywords: [ + "love", + "like", + "affection", + "valentines", + "heart" + ], + skins: [ + { + unified: "1f495", + native: "💕", + x: 27, + y: 37 + } + ], + version: 1 + }, + heart_decoration: { + id: "heart_decoration", + name: "Heart Decoration", + keywords: [ + "purple", + "square", + "love", + "like" + ], + skins: [ + { + unified: "1f49f", + native: "💟", + x: 27, + y: 47 + } + ], + version: 1 + }, + heavy_heart_exclamation_mark_ornament: { + id: "heavy_heart_exclamation_mark_ornament", + name: "Heart Exclamation", + keywords: [ + "heavy", + "mark", + "ornament", + "decoration", + "love" + ], + skins: [ + { + unified: "2763-fe0f", + native: "❣️", + x: 59, + y: 38 + } + ], + version: 1 + }, + broken_heart: { + id: "broken_heart", + name: "Broken Heart", + emoticons: [ + ":(", - ">:-(" - ], - o: 2 - }, - cookie: { - a: "Cookie", - b: "1F36A", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "snack", - "oreo", - "chocolate", - "sweet", - "dessert" - ], - k: [ - 7, - 9 - ], - o: 2 - }, - gb: { - a: "United Kingdom Flag", - b: "1F1EC-1F1E7", - d: true, - e: true, - f: true, - h: true, - k: [ - 1, - 55 - ], - n: [ - "uk", - "flag-gb" - ], - o: 2 + version: 1 }, tropical_fish: { - a: "Tropical Fish", - b: "1F420", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "tropical_fish", + name: "Tropical Fish", + keywords: [ "animal", "swim", "ocean", "beach", "nemo" ], - k: [ - 12, - 4 - ], - o: 2 - }, - "woman-tipping-hand": { - skin_variations: { - "1F3FB": { - unified: "1F481-1F3FB-200D-2640-FE0F", - non_qualified: "1F481-1F3FB-200D-2640", - image: "1f481-1f3fb-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F481-1F3FC-200D-2640-FE0F", - non_qualified: "1F481-1F3FC-200D-2640", - image: "1f481-1f3fc-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F481-1F3FD-200D-2640-FE0F", - non_qualified: "1F481-1F3FD-200D-2640", - image: "1f481-1f3fd-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 50, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F481-1F3FE-200D-2640-FE0F", - non_qualified: "1F481-1F3FE-200D-2640", - image: "1f481-1f3fe-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F481-1F3FF-200D-2640-FE0F", - non_qualified: "1F481-1F3FF-200D-2640", - image: "1f481-1f3ff-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f420", + native: "🐠", + x: 11, + y: 19 } - }, - obsoletes: "1F481", - a: "Woman Tipping Hand", - b: "1F481-200D-2640-FE0F", - c: "1F481-200D-2640", - d: true, - e: true, - f: true, - h: true, - k: [ - 23, - 47 ], - o: 4 - }, - black_circle_for_record: { - a: "Black Circle for Record", - b: "23FA-FE0F", - c: "23FA", - d: true, - e: true, - f: true, - h: true, - k: [ - 52, - 39 - ], - o: 2 - }, - film_frames: { - a: "Film Frames", - b: "1F39E-FE0F", - c: "1F39E", - d: true, - e: true, - f: true, - h: true, - k: [ - 8, - 4 - ], - o: 2 - }, - film_projector: { - a: "Film Projector", - b: "1F4FD-FE0F", - c: "1F4FD", - d: true, - e: true, - f: true, - h: true, - j: [ - "video", - "tape", - "record", - "movie" - ], - k: [ - 27, - 26 - ], - o: 2 - }, - "flag-gd": { - a: "Grenada Flag", - b: "1F1EC-1F1E9", - d: true, - e: true, - f: true, - h: true, - k: [ - 1, - 56 - ], - o: 2 + version: 1 }, blowfish: { - a: "Blowfish", - b: "1F421", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "blowfish", + name: "Blowfish", + keywords: [ "animal", "nature", "food", "sea", "ocean" ], - k: [ - 12, - 5 - ], - o: 2 - }, - face_with_symbols_on_mouth: { - a: "Serious Face with Symbols Covering Mouth", - b: "1F92C", - d: true, - e: true, - f: true, - h: true, - k: [ - 38, - 46 - ], - n: [ - "serious_face_with_symbols_covering_mouth" - ], - o: 5 - }, - birthday: { - a: "Birthday Cake", - b: "1F382", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "dessert", - "cake" - ], - k: [ - 7, - 33 - ], - o: 2 - }, - eject: { - a: "Eject", - b: "23CF-FE0F", - c: "23CF", - d: true, - e: true, - f: true, - h: true, - k: [ - 52, - 25 - ], - o: 2 - }, - raising_hand: { - skin_variations: { - "1F3FB": { - unified: "1F64B-1F3FB", - non_qualified: null, - image: "1f64b-1f3fb.png", - sheet_x: 33, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F64B-1F3FC", - non_qualified: null, - image: "1f64b-1f3fc.png", - sheet_x: 33, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F64B-1F3FD", - non_qualified: null, - image: "1f64b-1f3fd.png", - sheet_x: 33, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F64B-1F3FE", - non_qualified: null, - image: "1f64b-1f3fe.png", - sheet_x: 33, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F64B-1F3FF", - non_qualified: null, - image: "1f64b-1f3ff.png", - sheet_x: 33, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f421", + native: "🐡", + x: 11, + y: 20 } - }, - obsoleted_by: "1F64B-200D-2640-FE0F", - a: "Happy Person Raising One Hand", - b: "1F64B", - d: true, - e: true, - f: true, - h: false, - k: [ - 33, - 2 ], - o: 2 - }, - tractor: { - a: "Tractor", - b: "1F69C", - d: true, - e: true, - f: true, - h: true, - j: [ - "vehicle", - "car", - "farming", - "agriculture" - ], - k: [ - 34, - 27 - ], - o: 2 - }, - "flag-ge": { - a: "Georgia Flag", - b: "1F1EC-1F1EA", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 0 - ], - o: 2 - }, - smiling_imp: { - a: "Smiling Face with Horns", - b: "1F608", - d: true, - e: true, - f: true, - h: true, - j: [ - "devil", - "horns" - ], - k: [ - 30, - 43 - ], - o: 2 - }, - racing_car: { - a: "Racing Car", - b: "1F3CE-FE0F", - c: "1F3CE", - d: true, - e: true, - f: true, - h: true, - j: [ - "sports", - "race", - "fast", - "formula", - "f1" - ], - k: [ - 10, - 33 - ], - o: 2 - }, - cinema: { - a: "Cinema", - b: "1F3A6", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "record", - "film", - "movie", - "curtain", - "stage", - "theater" - ], - k: [ - 8, - 12 - ], - o: 2 - }, - clapper: { - a: "Clapper Board", - b: "1F3AC", - d: true, - e: true, - f: true, - h: true, - j: [ - "movie", - "film", - "record" - ], - k: [ - 8, - 18 - ], - o: 2 + version: 1 }, shark: { - a: "Shark", - b: "1F988", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "shark", + name: "Shark", + keywords: [ "animal", "nature", "fish", @@ -30425,113 +32420,20 @@ var emojis$1 = { "fins", "beach" ], - k: [ - 42, - 26 - ], - o: 4 - }, - cake: { - a: "Shortcake", - b: "1F370", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "dessert" - ], - k: [ - 7, - 15 - ], - o: 2 - }, - "man-raising-hand": { - skin_variations: { - "1F3FB": { - unified: "1F64B-1F3FB-200D-2642-FE0F", - non_qualified: "1F64B-1F3FB-200D-2642", - image: "1f64b-1f3fb-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F64B-1F3FC-200D-2642-FE0F", - non_qualified: "1F64B-1F3FC-200D-2642", - image: "1f64b-1f3fc-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F64B-1F3FD-200D-2642-FE0F", - non_qualified: "1F64B-1F3FD-200D-2642", - image: "1f64b-1f3fd-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 56, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F64B-1F3FE-200D-2642-FE0F", - non_qualified: "1F64B-1F3FE-200D-2642", - image: "1f64b-1f3fe-200d-2642-fe0f.png", - sheet_x: 33, - sheet_y: 0, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F64B-1F3FF-200D-2642-FE0F", - non_qualified: "1F64B-1F3FF-200D-2642", - image: "1f64b-1f3ff-200d-2642-fe0f.png", - sheet_x: 33, - sheet_y: 1, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f988", + native: "🦈", + x: 44, + y: 28 } - }, - a: "Man Raising Hand", - b: "1F64B-200D-2642-FE0F", - c: "1F64B-200D-2642", - d: true, - e: true, - f: true, - h: true, - k: [ - 32, - 53 ], - o: 4 + version: 3 }, octopus: { - a: "Octopus", - b: "1F419", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "octopus", + name: "Octopus", + keywords: [ "animal", "creature", "ocean", @@ -30539,2185 +32441,2867 @@ var emojis$1 = { "nature", "beach" ], - k: [ - 11, - 54 - ], - o: 2 - }, - "woman-raising-hand": { - skin_variations: { - "1F3FB": { - unified: "1F64B-1F3FB-200D-2640-FE0F", - non_qualified: "1F64B-1F3FB-200D-2640", - image: "1f64b-1f3fb-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F64B-1F3FC-200D-2640-FE0F", - non_qualified: "1F64B-1F3FC-200D-2640", - image: "1f64b-1f3fc-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F64B-1F3FD-200D-2640-FE0F", - non_qualified: "1F64B-1F3FD-200D-2640", - image: "1f64b-1f3fd-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 50, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F64B-1F3FE-200D-2640-FE0F", - non_qualified: "1F64B-1F3FE-200D-2640", - image: "1f64b-1f3fe-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F64B-1F3FF-200D-2640-FE0F", - non_qualified: "1F64B-1F3FF-200D-2640", - image: "1f64b-1f3ff-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f419", + native: "🐙", + x: 11, + y: 12 } - }, - obsoletes: "1F64B", - a: "Woman Raising Hand", - b: "1F64B-200D-2640-FE0F", - c: "1F64B-200D-2640", - d: true, - e: true, - f: true, - h: true, - k: [ - 32, - 47 ], - o: 4 - }, - "flag-gf": { - a: "French Guiana Flag", - b: "1F1EC-1F1EB", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 1 - ], - o: 2 - }, - tv: { - a: "Television", - b: "1F4FA", - d: true, - e: true, - f: true, - h: true, - j: [ - "technology", - "program", - "oldschool", - "show", - "television" - ], - k: [ - 27, - 23 - ], - o: 2 - }, - imp: { - a: "Imp", - b: "1F47F", - d: true, - e: true, - f: true, - h: true, - j: [ - "devil", - "angry", - "horns" - ], - k: [ - 23, - 45 - ], - o: 2 - }, - cupcake: { - a: "Cupcake", - b: "1F9C1", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 9 - ], - o: 11 - }, - racing_motorcycle: { - a: "Racing Motorcycle", - b: "1F3CD-FE0F", - c: "1F3CD", - d: true, - e: true, - f: true, - h: true, - k: [ - 10, - 32 - ], - o: 2 - }, - low_brightness: { - a: "Low Brightness Symbol", - b: "1F505", - d: true, - e: true, - f: true, - h: true, - j: [ - "sun", - "afternoon", - "warm", - "summer" - ], - k: [ - 27, - 33 - ], - o: 2 + version: 1 }, shell: { - a: "Spiral Shell", - b: "1F41A", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "shell", + name: "Spiral Shell", + keywords: [ "nature", "sea", "beach" ], - k: [ - 11, - 55 - ], - o: 2 - }, - "flag-gg": { - a: "Guernsey Flag", - b: "1F1EC-1F1EC", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 2 - ], - o: 2 - }, - high_brightness: { - a: "High Brightness Symbol", - b: "1F506", - d: true, - e: true, - f: true, - h: true, - j: [ - "sun", - "light" - ], - k: [ - 27, - 34 - ], - o: 2 - }, - deaf_person: { - skin_variations: { - "1F3FB": { - unified: "1F9CF-1F3FB", - non_qualified: null, - image: "1f9cf-1f3fb.png", - sheet_x: 45, - sheet_y: 11, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F9CF-1F3FC", - non_qualified: null, - image: "1f9cf-1f3fc.png", - sheet_x: 45, - sheet_y: 12, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F9CF-1F3FD", - non_qualified: null, - image: "1f9cf-1f3fd.png", - sheet_x: 45, - sheet_y: 13, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F9CF-1F3FE", - non_qualified: null, - image: "1f9cf-1f3fe.png", - sheet_x: 45, - sheet_y: 14, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F9CF-1F3FF", - non_qualified: null, - image: "1f9cf-1f3ff.png", - sheet_x: 45, - sheet_y: 15, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f41a", + native: "🐚", + x: 11, + y: 13 } - }, - a: "Deaf Person", - b: "1F9CF", - d: true, - e: true, - f: true, - h: true, - k: [ - 45, - 10 ], - o: 12 + version: 1 }, - skull: { - a: "Skull", - b: "1F480", - d: true, - e: true, - f: true, - h: true, - j: [ - "dead", - "skeleton", - "creepy", - "death" + coral: { + id: "coral", + name: "Coral", + keywords: [ + "ocean", + "sea", + "reef" ], - k: [ - 23, - 46 - ], - o: 2 - }, - motor_scooter: { - a: "Motor Scooter", - b: "1F6F5", - d: true, - e: true, - f: true, - h: true, - j: [ - "vehicle", - "vespa", - "sasha" - ], - k: [ - 36, - 54 - ], - o: 4 - }, - camera: { - a: "Camera", - b: "1F4F7", - d: true, - e: true, - f: true, - h: true, - j: [ - "gadgets", - "photography" - ], - k: [ - 27, - 20 - ], - o: 2 - }, - pie: { - a: "Pie", - b: "1F967", - d: true, - e: true, - f: true, - h: true, - k: [ - 41, - 54 - ], - o: 5 - }, - "flag-gh": { - a: "Ghana Flag", - b: "1F1EC-1F1ED", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 3 - ], - o: 2 - }, - deaf_man: { - skin_variations: { - "1F3FB": { - unified: "1F9CF-1F3FB-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FB-200D-2642", - image: "1f9cf-1f3fb-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 5, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F9CF-1F3FC-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FC-200D-2642", - image: "1f9cf-1f3fc-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 6, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F9CF-1F3FD-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FD-200D-2642", - image: "1f9cf-1f3fd-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 7, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F9CF-1F3FE-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FE-200D-2642", - image: "1f9cf-1f3fe-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 8, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F9CF-1F3FF-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FF-200D-2642", - image: "1f9cf-1f3ff-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 9, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1fab8", + native: "🪸", + x: 54, + y: 49 } - }, - a: "Deaf Man", - b: "1F9CF-200D-2642-FE0F", - c: "1F9CF-200D-2642", - d: true, - e: true, - f: true, - h: true, - k: [ - 45, - 4 ], - o: 12 - }, - skull_and_crossbones: { - a: "Skull and Crossbones", - b: "2620-FE0F", - c: "2620", - d: true, - e: true, - f: true, - h: true, - j: [ - "poison", - "danger", - "deadly", - "scary", - "death", - "pirate", - "evil" - ], - k: [ - 53, - 8 - ], - o: 2 - }, - camera_with_flash: { - a: "Camera with Flash", - b: "1F4F8", - d: true, - e: true, - f: true, - h: true, - k: [ - 27, - 21 - ], - o: 2 - }, - signal_strength: { - a: "Antenna with Bars", - b: "1F4F6", - d: true, - e: true, - f: true, - h: true, - j: [ - "blue-square", - "reception", - "phone", - "internet", - "connection", - "wifi", - "bluetooth", - "bars" - ], - k: [ - 27, - 19 - ], - o: 2 - }, - chocolate_bar: { - a: "Chocolate Bar", - b: "1F36B", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "snack", - "dessert", - "sweet" - ], - k: [ - 7, - 10 - ], - o: 2 - }, - manual_wheelchair: { - a: "Manual Wheelchair", - b: "1F9BD", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 5 - ], - o: 12 + version: 14 }, snail: { - a: "Snail", - b: "1F40C", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "snail", + name: "Snail", + keywords: [ "slow", "animal", "shell" ], - k: [ - 11, - 40 - ], - o: 2 - }, - motorized_wheelchair: { - a: "Motorized Wheelchair", - b: "1F9BC", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 4 - ], - o: 12 - }, - "flag-gi": { - a: "Gibraltar Flag", - b: "1F1EC-1F1EE", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 4 - ], - o: 2 - }, - hankey: { - a: "Pile of Poo", - b: "1F4A9", - d: true, - e: true, - f: true, - h: true, - k: [ - 25, - 51 - ], - n: [ - "poop", - "shit" - ], - o: 2 - }, - vibration_mode: { - a: "Vibration Mode", - b: "1F4F3", - d: true, - e: true, - f: true, - h: true, - j: [ - "orange-square", - "phone" - ], - k: [ - 27, - 16 - ], - o: 2 - }, - deaf_woman: { - skin_variations: { - "1F3FB": { - unified: "1F9CF-1F3FB-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FB-200D-2640", - image: "1f9cf-1f3fb-200d-2640-fe0f.png", - sheet_x: 44, - sheet_y: 56, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F9CF-1F3FC-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FC-200D-2640", - image: "1f9cf-1f3fc-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 0, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F9CF-1F3FD-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FD-200D-2640", - image: "1f9cf-1f3fd-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 1, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F9CF-1F3FE-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FE-200D-2640", - image: "1f9cf-1f3fe-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 2, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F9CF-1F3FF-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FF-200D-2640", - image: "1f9cf-1f3ff-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 3, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f40c", + native: "🐌", + x: 10, + y: 59 } - }, - a: "Deaf Woman", - b: "1F9CF-200D-2640-FE0F", - c: "1F9CF-200D-2640", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 55 ], - o: 12 + version: 1 }, butterfly: { - a: "Butterfly", - b: "1F98B", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "butterfly", + name: "Butterfly", + keywords: [ "animal", "insect", "nature", "caterpillar" ], - k: [ - 42, - 29 - ], - o: 4 - }, - video_camera: { - a: "Video Camera", - b: "1F4F9", - d: true, - e: true, - f: true, - h: true, - j: [ - "film", - "record" - ], - k: [ - 27, - 22 - ], - o: 2 - }, - candy: { - a: "Candy", - b: "1F36C", - d: true, - e: true, - f: true, - h: true, - j: [ - "snack", - "dessert", - "sweet", - "lolly" - ], - k: [ - 7, - 11 - ], - o: 2 - }, - auto_rickshaw: { - a: "Auto Rickshaw", - b: "1F6FA", - d: true, - e: true, - f: true, - h: true, - k: [ - 37, - 2 - ], - o: 12 - }, - bow: { - skin_variations: { - "1F3FB": { - unified: "1F647-1F3FB", - non_qualified: null, - image: "1f647-1f3fb.png", - sheet_x: 32, - sheet_y: 39, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F647-1F3FC", - non_qualified: null, - image: "1f647-1f3fc.png", - sheet_x: 32, - sheet_y: 40, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F647-1F3FD", - non_qualified: null, - image: "1f647-1f3fd.png", - sheet_x: 32, - sheet_y: 41, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F647-1F3FE", - non_qualified: null, - image: "1f647-1f3fe.png", - sheet_x: 32, - sheet_y: 42, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F647-1F3FF", - non_qualified: null, - image: "1f647-1f3ff.png", - sheet_x: 32, - sheet_y: 43, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f98b", + native: "🦋", + x: 44, + y: 31 } - }, - obsoleted_by: "1F647-200D-2642-FE0F", - a: "Person Bowing Deeply", - b: "1F647", - d: true, - e: true, - f: true, - h: false, - k: [ - 32, - 38 ], - o: 2 - }, - mobile_phone_off: { - a: "Mobile Phone off", - b: "1F4F4", - d: true, - e: true, - f: true, - h: true, - j: [ - "mute", - "orange-square", - "silence", - "quiet" - ], - k: [ - 27, - 17 - ], - o: 2 - }, - clown_face: { - a: "Clown Face", - b: "1F921", - d: true, - e: true, - f: true, - h: true, - j: [ - "face" - ], - k: [ - 38, - 18 - ], - o: 4 - }, - lollipop: { - a: "Lollipop", - b: "1F36D", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "snack", - "candy", - "sweet" - ], - k: [ - 7, - 12 - ], - o: 2 - }, - "flag-gl": { - a: "Greenland Flag", - b: "1F1EC-1F1F1", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 5 - ], - o: 2 - }, - vhs: { - a: "Videocassette", - b: "1F4FC", - d: true, - e: true, - f: true, - h: true, - j: [ - "record", - "video", - "oldschool", - "90s", - "80s" - ], - k: [ - 27, - 25 - ], - o: 2 + version: 3 }, bug: { - a: "Bug", - b: "1F41B", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "bug", + name: "Bug", + keywords: [ "animal", "insect", "nature", "worm" ], - k: [ - 11, - 56 - ], - o: 2 - }, - bike: { - a: "Bicycle", - b: "1F6B2", - d: true, - e: true, - f: true, - h: true, - j: [ - "sports", - "bicycle", - "exercise", - "hipster" - ], - k: [ - 35, - 9 - ], - o: 2 - }, - "man-bowing": { - skin_variations: { - "1F3FB": { - unified: "1F647-1F3FB-200D-2642-FE0F", - non_qualified: "1F647-1F3FB-200D-2642", - image: "1f647-1f3fb-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 33, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F647-1F3FC-200D-2642-FE0F", - non_qualified: "1F647-1F3FC-200D-2642", - image: "1f647-1f3fc-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 34, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F647-1F3FD-200D-2642-FE0F", - non_qualified: "1F647-1F3FD-200D-2642", - image: "1f647-1f3fd-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 35, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F647-1F3FE-200D-2642-FE0F", - non_qualified: "1F647-1F3FE-200D-2642", - image: "1f647-1f3fe-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F647-1F3FF-200D-2642-FE0F", - non_qualified: "1F647-1F3FF-200D-2642", - image: "1f647-1f3ff-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f41b", + native: "🐛", + x: 11, + y: 14 } - }, - obsoletes: "1F647", - a: "Man Bowing", - b: "1F647-200D-2642-FE0F", - c: "1F647-200D-2642", - d: true, - e: true, - f: true, - h: true, - k: [ - 32, - 32 ], - o: 4 - }, - female_sign: { - a: "Female Sign", - b: "2640-FE0F", - c: "2640", - d: false, - e: true, - f: true, - h: true, - k: [ - 53, - 18 - ], - o: 4 - }, - japanese_ogre: { - a: "Japanese Ogre", - b: "1F479", - d: true, - e: true, - f: true, - h: true, - j: [ - "monster", - "red", - "mask", - "halloween", - "scary", - "creepy", - "devil", - "demon", - "japanese", - "ogre" - ], - k: [ - 23, - 34 - ], - o: 2 - }, - custard: { - a: "Custard", - b: "1F36E", - d: true, - e: true, - f: true, - h: true, - j: [ - "dessert", - "food" - ], - k: [ - 7, - 13 - ], - o: 2 + version: 1 }, ant: { - a: "Ant", - b: "1F41C", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "ant", + name: "Ant", + keywords: [ "animal", "insect", "nature", "bug" ], - k: [ - 12, - 0 - ], - o: 2 - }, - mag: { - a: "Left-Pointing Magnifying Glass", - b: "1F50D", - d: true, - e: true, - f: true, - h: true, - j: [ - "search", - "zoom", - "find", - "detective" - ], - k: [ - 27, - 41 - ], - o: 2 - }, - "flag-gm": { - a: "Gambia Flag", - b: "1F1EC-1F1F2", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 6 - ], - o: 2 - }, - honey_pot: { - a: "Honey Pot", - b: "1F36F", - d: true, - e: true, - f: true, - h: true, - j: [ - "bees", - "sweet", - "kitchen" - ], - k: [ - 7, - 14 - ], - o: 2 - }, - "woman-bowing": { - skin_variations: { - "1F3FB": { - unified: "1F647-1F3FB-200D-2640-FE0F", - non_qualified: "1F647-1F3FB-200D-2640", - image: "1f647-1f3fb-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 27, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F647-1F3FC-200D-2640-FE0F", - non_qualified: "1F647-1F3FC-200D-2640", - image: "1f647-1f3fc-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 28, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F647-1F3FD-200D-2640-FE0F", - non_qualified: "1F647-1F3FD-200D-2640", - image: "1f647-1f3fd-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 29, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F647-1F3FE-200D-2640-FE0F", - non_qualified: "1F647-1F3FE-200D-2640", - image: "1f647-1f3fe-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 30, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F647-1F3FF-200D-2640-FE0F", - non_qualified: "1F647-1F3FF-200D-2640", - image: "1f647-1f3ff-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 31, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f41c", + native: "🐜", + x: 11, + y: 15 } - }, - a: "Woman Bowing", - b: "1F647-200D-2640-FE0F", - c: "1F647-200D-2640", - d: true, - e: true, - f: true, - h: true, - k: [ - 32, - 26 ], - o: 4 - }, - male_sign: { - a: "Male Sign", - b: "2642-FE0F", - c: "2642", - d: false, - e: true, - f: true, - h: true, - k: [ - 53, - 19 - ], - o: 4 - }, - mag_right: { - a: "Right-Pointing Magnifying Glass", - b: "1F50E", - d: true, - e: true, - f: true, - h: true, - j: [ - "search", - "zoom", - "find", - "detective" - ], - k: [ - 27, - 42 - ], - o: 2 - }, - japanese_goblin: { - a: "Japanese Goblin", - b: "1F47A", - d: true, - e: true, - f: true, - h: true, - j: [ - "red", - "evil", - "mask", - "monster", - "scary", - "creepy", - "japanese", - "goblin" - ], - k: [ - 23, - 35 - ], - o: 2 - }, - scooter: { - a: "Scooter", - b: "1F6F4", - d: true, - e: true, - f: true, - h: true, - k: [ - 36, - 53 - ], - o: 4 + version: 1 }, bee: { - a: "Honeybee", - b: "1F41D", - d: true, - e: true, - f: true, - h: true, - k: [ - 12, - 1 - ], - n: [ - "honeybee" - ], - o: 2 - }, - "flag-gn": { - a: "Guinea Flag", - b: "1F1EC-1F1F3", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 7 - ], - o: 2 - }, - candle: { - a: "Candle", - b: "1F56F-FE0F", - c: "1F56F", - d: true, - e: true, - f: true, - h: true, - j: [ - "fire", - "wax" - ], - k: [ - 29, - 6 - ], - o: 2 - }, - skateboard: { - a: "Skateboard", - b: "1F6F9", - d: true, - e: true, - f: true, - h: true, - k: [ - 37, - 1 - ], - o: 11 - }, - medical_symbol: { - a: "Medical Symbol", - b: "2695-FE0F", - c: "2695", - d: false, - e: true, - f: true, - h: true, - k: [ - 53, - 44 - ], - n: [ - "staff_of_aesculapius" - ], - o: 4 - }, - ghost: { - a: "Ghost", - b: "1F47B", - d: true, - e: true, - f: true, - h: true, - j: [ - "halloween", - "spooky", - "scary" - ], - k: [ - 23, - 36 - ], - o: 2 - }, - beetle: { - a: "Lady Beetle", - b: "1F41E", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "bee", + name: "Honeybee", + keywords: [ + "bee", "animal", "insect", "nature", - "ladybug" + "bug", + "spring", + "honey" ], - k: [ - 12, - 2 - ], - o: 2 - }, - face_palm: { - skin_variations: { - "1F3FB": { - unified: "1F926-1F3FB", - non_qualified: null, - image: "1f926-1f3fb.png", - sheet_x: 38, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F926-1F3FC", - non_qualified: null, - image: "1f926-1f3fc.png", - sheet_x: 38, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F926-1F3FD", - non_qualified: null, - image: "1f926-1f3fd.png", - sheet_x: 38, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F926-1F3FE", - non_qualified: null, - image: "1f926-1f3fe.png", - sheet_x: 38, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F926-1F3FF", - non_qualified: null, - image: "1f926-1f3ff.png", - sheet_x: 38, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f41d", + native: "🐝", + x: 11, + y: 16 } - }, - a: "Face Palm", - b: "1F926", - d: true, - e: true, - f: true, - h: false, - k: [ - 38, - 35 ], - o: 4 + version: 1 }, - "flag-gp": { - a: "Guadeloupe Flag", - b: "1F1EC-1F1F5", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 8 + beetle: { + id: "beetle", + name: "Beetle", + keywords: [ + "insect" ], - o: 2 - }, - baby_bottle: { - a: "Baby Bottle", - b: "1F37C", - d: true, - e: true, - f: true, - h: true, - j: [ - "food", - "container", - "milk" - ], - k: [ - 7, - 27 - ], - o: 2 - }, - infinity: { - a: "Infinity", - b: "267E-FE0F", - c: "267E", - d: true, - e: true, - f: true, - h: true, - k: [ - 53, - 39 - ], - o: 11 - }, - glass_of_milk: { - a: "Glass of Milk", - b: "1F95B", - d: true, - e: true, - f: true, - h: true, - k: [ - 41, - 42 - ], - o: 4 - }, - "man-facepalming": { - skin_variations: { - "1F3FB": { - unified: "1F926-1F3FB-200D-2642-FE0F", - non_qualified: "1F926-1F3FB-200D-2642", - image: "1f926-1f3fb-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 30, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F926-1F3FC-200D-2642-FE0F", - non_qualified: "1F926-1F3FC-200D-2642", - image: "1f926-1f3fc-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 31, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F926-1F3FD-200D-2642-FE0F", - non_qualified: "1F926-1F3FD-200D-2642", - image: "1f926-1f3fd-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 32, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F926-1F3FE-200D-2642-FE0F", - non_qualified: "1F926-1F3FE-200D-2642", - image: "1f926-1f3fe-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 33, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F926-1F3FF-200D-2642-FE0F", - non_qualified: "1F926-1F3FF-200D-2642", - image: "1f926-1f3ff-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 34, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1fab2", + native: "🪲", + x: 54, + y: 43 } - }, - a: "Man Facepalming", - b: "1F926-200D-2642-FE0F", - c: "1F926-200D-2642", - d: true, - e: true, - f: true, - h: true, - k: [ - 38, - 29 ], - o: 4 + version: 13 + }, + ladybug: { + id: "ladybug", + name: "Lady Beetle", + keywords: [ + "ladybug", + "animal", + "insect", + "nature" + ], + skins: [ + { + unified: "1f41e", + native: "🐞", + x: 11, + y: 17 + } + ], + version: 1 }, cricket: { - a: "Cricket", - b: "1F997", - d: true, - e: true, - f: true, - h: true, - j: [ - "sports" + id: "cricket", + name: "Cricket", + keywords: [ + "animal", + "chirp" ], - k: [ - 42, - 41 - ], - o: 5 - }, - busstop: { - a: "Bus Stop", - b: "1F68F", - d: true, - e: true, - f: true, - h: true, - j: [ - "transportation", - "wait" - ], - k: [ - 34, - 14 - ], - o: 2 - }, - "flag-gq": { - a: "Equatorial Guinea Flag", - b: "1F1EC-1F1F6", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 9 - ], - o: 2 - }, - alien: { - a: "Extraterrestrial Alien", - b: "1F47D", - d: true, - e: true, - f: true, - h: true, - j: [ - "UFO", - "paul", - "weird", - "outer_space" - ], - k: [ - 23, - 43 - ], - o: 2 - }, - bulb: { - a: "Electric Light Bulb", - b: "1F4A1", - d: true, - e: true, - f: true, - h: true, - j: [ - "light", - "electricity", - "idea" - ], - k: [ - 25, - 43 - ], - o: 2 - }, - "woman-facepalming": { - skin_variations: { - "1F3FB": { - unified: "1F926-1F3FB-200D-2640-FE0F", - non_qualified: "1F926-1F3FB-200D-2640", - image: "1f926-1f3fb-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 24, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F926-1F3FC-200D-2640-FE0F", - non_qualified: "1F926-1F3FC-200D-2640", - image: "1f926-1f3fc-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 25, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F926-1F3FD-200D-2640-FE0F", - non_qualified: "1F926-1F3FD-200D-2640", - image: "1f926-1f3fd-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 26, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F926-1F3FE-200D-2640-FE0F", - non_qualified: "1F926-1F3FE-200D-2640", - image: "1f926-1f3fe-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 27, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F926-1F3FF-200D-2640-FE0F", - non_qualified: "1F926-1F3FF-200D-2640", - image: "1f926-1f3ff-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 28, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f997", + native: "🦗", + x: 44, + y: 43 } - }, - a: "Woman Facepalming", - b: "1F926-200D-2640-FE0F", - c: "1F926-200D-2640", - d: true, - e: true, - f: true, - h: true, - k: [ - 38, - 23 ], - o: 4 + version: 5 + }, + cockroach: { + id: "cockroach", + name: "Cockroach", + keywords: [ + "insect", + "pests" + ], + skins: [ + { + unified: "1fab3", + native: "🪳", + x: 54, + y: 44 + } + ], + version: 13 }, spider: { - a: "Spider", - b: "1F577-FE0F", - c: "1F577", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "spider", + name: "Spider", + keywords: [ "animal", "arachnid" ], - k: [ - 29, - 34 + skins: [ + { + unified: "1f577-fe0f", + native: "🕷️", + x: 31, + y: 24 + } ], - o: 2 - }, - space_invader: { - a: "Alien Monster", - b: "1F47E", - d: true, - e: true, - f: true, - h: true, - j: [ - "game", - "arcade", - "play" - ], - k: [ - 23, - 44 - ], - o: 2 - }, - motorway: { - a: "Motorway", - b: "1F6E3-FE0F", - c: "1F6E3", - d: true, - e: true, - f: true, - h: true, - j: [ - "road", - "cupertino", - "interstate", - "highway" - ], - k: [ - 36, - 45 - ], - o: 2 - }, - "flag-gr": { - a: "Greece Flag", - b: "1F1EC-1F1F7", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 10 - ], - o: 2 - }, - recycle: { - a: "Black Universal Recycling Symbol", - b: "267B-FE0F", - c: "267B", - d: true, - e: true, - f: true, - h: true, - j: [ - "arrow", - "environment", - "garbage", - "trash" - ], - k: [ - 53, - 38 - ], - o: 2 - }, - coffee: { - a: "Hot Beverage", - b: "2615", - d: true, - e: true, - f: true, - h: true, - j: [ - "beverage", - "caffeine", - "latte", - "espresso" - ], - k: [ - 53, - 0 - ], - o: 2 - }, - flashlight: { - a: "Electric Torch", - b: "1F526", - d: true, - e: true, - f: true, - h: true, - j: [ - "dark", - "camping", - "sight", - "night" - ], - k: [ - 28, - 9 - ], - o: 2 + version: 1 }, spider_web: { - a: "Spider Web", - b: "1F578-FE0F", - c: "1F578", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "spider_web", + name: "Spider Web", + keywords: [ "animal", "insect", "arachnid", "silk" ], - k: [ - 29, - 35 - ], - o: 2 - }, - izakaya_lantern: { - a: "Izakaya Lantern", - b: "1F3EE", - d: true, - e: true, - f: true, - h: true, - j: [ - "light", - "paper", - "halloween", - "spooky" - ], - k: [ - 11, - 8 - ], - n: [ - "lantern" - ], - o: 2 - }, - "flag-gs": { - a: "South Georgia & South Sandwich Islands Flag", - b: "1F1EC-1F1F8", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 11 - ], - o: 2 - }, - shrug: { - skin_variations: { - "1F3FB": { - unified: "1F937-1F3FB", - non_qualified: null, - image: "1f937-1f3fb.png", - sheet_x: 39, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F937-1F3FC", - non_qualified: null, - image: "1f937-1f3fc.png", - sheet_x: 39, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F937-1F3FD", - non_qualified: null, - image: "1f937-1f3fd.png", - sheet_x: 39, - sheet_y: 50, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F937-1F3FE", - non_qualified: null, - image: "1f937-1f3fe.png", - sheet_x: 39, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F937-1F3FF", - non_qualified: null, - image: "1f937-1f3ff.png", - sheet_x: 39, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f578-fe0f", + native: "🕸️", + x: 31, + y: 25 } - }, - a: "Shrug", - b: "1F937", - d: true, - e: true, - f: true, - h: false, - k: [ - 39, - 47 ], - o: 4 + version: 1 }, - fleur_de_lis: { - a: "Fleur De Lis", - b: "269C-FE0F", - c: "269C", - d: true, - e: true, - f: true, - h: true, - j: [ - "decorative", - "scout" + scorpion: { + id: "scorpion", + name: "Scorpion", + keywords: [ + "animal", + "arachnid" ], - k: [ - 53, - 49 + skins: [ + { + unified: "1f982", + native: "🦂", + x: 44, + y: 22 + } ], - o: 2 + version: 1 }, - robot_face: { - a: "Robot Face", - b: "1F916", - d: true, - e: true, - f: true, - h: true, - k: [ - 37, - 29 + mosquito: { + id: "mosquito", + name: "Mosquito", + keywords: [ + "animal", + "nature", + "insect", + "malaria" ], - o: 2 + skins: [ + { + unified: "1f99f", + native: "🦟", + x: 44, + y: 51 + } + ], + version: 11 }, - railway_track: { - a: "Railway Track", - b: "1F6E4-FE0F", - c: "1F6E4", - d: true, - e: true, - f: true, - h: true, - j: [ - "train", - "transportation" + fly: { + id: "fly", + name: "Fly", + keywords: [ + "insect" ], - k: [ - 36, - 46 + skins: [ + { + unified: "1fab0", + native: "🪰", + x: 54, + y: 41 + } ], - o: 2 + version: 13 + }, + worm: { + id: "worm", + name: "Worm", + keywords: [ + "animal" + ], + skins: [ + { + unified: "1fab1", + native: "🪱", + x: 54, + y: 42 + } + ], + version: 13 + }, + microbe: { + id: "microbe", + name: "Microbe", + keywords: [ + "amoeba", + "bacteria", + "germs", + "virus", + "covid" + ], + skins: [ + { + unified: "1f9a0", + native: "🦠", + x: 44, + y: 52 + } + ], + version: 11 + }, + bouquet: { + id: "bouquet", + name: "Bouquet", + keywords: [ + "flowers", + "nature", + "spring" + ], + skins: [ + { + unified: "1f490", + native: "💐", + x: 27, + y: 7 + } + ], + version: 1 + }, + cherry_blossom: { + id: "cherry_blossom", + name: "Cherry Blossom", + keywords: [ + "nature", + "plant", + "spring", + "flower" + ], + skins: [ + { + unified: "1f338", + native: "🌸", + x: 5, + y: 53 + } + ], + version: 1 + }, + white_flower: { + id: "white_flower", + name: "White Flower", + keywords: [ + "japanese", + "spring" + ], + skins: [ + { + unified: "1f4ae", + native: "💮", + x: 28, + y: 6 + } + ], + version: 1 + }, + lotus: { + id: "lotus", + name: "Lotus", + keywords: [ + "flower", + "calm", + "meditation" + ], + skins: [ + { + unified: "1fab7", + native: "🪷", + x: 54, + y: 48 + } + ], + version: 14 + }, + rosette: { + id: "rosette", + name: "Rosette", + keywords: [ + "flower", + "decoration", + "military" + ], + skins: [ + { + unified: "1f3f5-fe0f", + native: "🏵️", + x: 10, + y: 36 + } + ], + version: 1 + }, + rose: { + id: "rose", + name: "Rose", + keywords: [ + "flowers", + "valentines", + "love", + "spring" + ], + skins: [ + { + unified: "1f339", + native: "🌹", + x: 5, + y: 54 + } + ], + version: 1 + }, + wilted_flower: { + id: "wilted_flower", + name: "Wilted Flower", + keywords: [ + "plant", + "nature", + "rose" + ], + skins: [ + { + unified: "1f940", + native: "🥀", + x: 43, + y: 13 + } + ], + version: 3 + }, + hibiscus: { + id: "hibiscus", + name: "Hibiscus", + keywords: [ + "plant", + "vegetable", + "flowers", + "beach" + ], + skins: [ + { + unified: "1f33a", + native: "🌺", + x: 5, + y: 55 + } + ], + version: 1 + }, + sunflower: { + id: "sunflower", + name: "Sunflower", + keywords: [ + "nature", + "plant", + "fall" + ], + skins: [ + { + unified: "1f33b", + native: "🌻", + x: 5, + y: 56 + } + ], + version: 1 + }, + blossom: { + id: "blossom", + name: "Blossom", + keywords: [ + "nature", + "flowers", + "yellow" + ], + skins: [ + { + unified: "1f33c", + native: "🌼", + x: 5, + y: 57 + } + ], + version: 1 + }, + tulip: { + id: "tulip", + name: "Tulip", + keywords: [ + "flowers", + "plant", + "nature", + "summer", + "spring" + ], + skins: [ + { + unified: "1f337", + native: "🌷", + x: 5, + y: 52 + } + ], + version: 1 + }, + seedling: { + id: "seedling", + name: "Seedling", + keywords: [ + "plant", + "nature", + "grass", + "lawn", + "spring" + ], + skins: [ + { + unified: "1f331", + native: "🌱", + x: 5, + y: 46 + } + ], + version: 1 + }, + potted_plant: { + id: "potted_plant", + name: "Potted Plant", + keywords: [ + "greenery", + "house" + ], + skins: [ + { + unified: "1fab4", + native: "🪴", + x: 54, + y: 45 + } + ], + version: 13 + }, + evergreen_tree: { + id: "evergreen_tree", + name: "Evergreen Tree", + keywords: [ + "plant", + "nature" + ], + skins: [ + { + unified: "1f332", + native: "🌲", + x: 5, + y: 47 + } + ], + version: 1 + }, + deciduous_tree: { + id: "deciduous_tree", + name: "Deciduous Tree", + keywords: [ + "plant", + "nature" + ], + skins: [ + { + unified: "1f333", + native: "🌳", + x: 5, + y: 48 + } + ], + version: 1 + }, + palm_tree: { + id: "palm_tree", + name: "Palm Tree", + keywords: [ + "plant", + "vegetable", + "nature", + "summer", + "beach", + "mojito", + "tropical" + ], + skins: [ + { + unified: "1f334", + native: "🌴", + x: 5, + y: 49 + } + ], + version: 1 + }, + cactus: { + id: "cactus", + name: "Cactus", + keywords: [ + "vegetable", + "plant", + "nature" + ], + skins: [ + { + unified: "1f335", + native: "🌵", + x: 5, + y: 50 + } + ], + version: 1 + }, + ear_of_rice: { + id: "ear_of_rice", + name: "Ear of Rice", + keywords: [ + "sheaf", + "nature", + "plant" + ], + skins: [ + { + unified: "1f33e", + native: "🌾", + x: 5, + y: 59 + } + ], + version: 1 + }, + herb: { + id: "herb", + name: "Herb", + keywords: [ + "vegetable", + "plant", + "medicine", + "weed", + "grass", + "lawn" + ], + skins: [ + { + unified: "1f33f", + native: "🌿", + x: 5, + y: 60 + } + ], + version: 1 + }, + shamrock: { + id: "shamrock", + name: "Shamrock", + keywords: [ + "vegetable", + "plant", + "nature", + "irish", + "clover" + ], + skins: [ + { + unified: "2618-fe0f", + native: "☘️", + x: 57, + y: 19 + } + ], + version: 1 + }, + four_leaf_clover: { + id: "four_leaf_clover", + name: "Four Leaf Clover", + keywords: [ + "vegetable", + "plant", + "nature", + "lucky", + "irish" + ], + skins: [ + { + unified: "1f340", + native: "🍀", + x: 6, + y: 0 + } + ], + version: 1 + }, + maple_leaf: { + id: "maple_leaf", + name: "Maple Leaf", + keywords: [ + "nature", + "plant", + "vegetable", + "ca", + "fall" + ], + skins: [ + { + unified: "1f341", + native: "🍁", + x: 6, + y: 1 + } + ], + version: 1 + }, + fallen_leaf: { + id: "fallen_leaf", + name: "Fallen Leaf", + keywords: [ + "nature", + "plant", + "vegetable", + "leaves" + ], + skins: [ + { + unified: "1f342", + native: "🍂", + x: 6, + y: 2 + } + ], + version: 1 + }, + leaves: { + id: "leaves", + name: "Leaf Fluttering in Wind", + keywords: [ + "leaves", + "nature", + "plant", + "tree", + "vegetable", + "grass", + "lawn", + "spring" + ], + skins: [ + { + unified: "1f343", + native: "🍃", + x: 6, + y: 3 + } + ], + version: 1 + }, + empty_nest: { + id: "empty_nest", + name: "Empty Nest", + keywords: [ + "bird" + ], + skins: [ + { + unified: "1fab9", + native: "🪹", + x: 54, + y: 50 + } + ], + version: 14 + }, + nest_with_eggs: { + id: "nest_with_eggs", + name: "Nest with Eggs", + keywords: [ + "bird" + ], + skins: [ + { + unified: "1faba", + native: "🪺", + x: 54, + y: 51 + } + ], + version: 14 + }, + mushroom: { + id: "mushroom", + name: "Mushroom", + keywords: [ + "plant", + "vegetable" + ], + skins: [ + { + unified: "1f344", + native: "🍄", + x: 6, + y: 4 + } + ], + version: 1 + }, + grapes: { + id: "grapes", + name: "Grapes", + keywords: [ + "fruit", + "food", + "wine" + ], + skins: [ + { + unified: "1f347", + native: "🍇", + x: 6, + y: 7 + } + ], + version: 1 + }, + melon: { + id: "melon", + name: "Melon", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f348", + native: "🍈", + x: 6, + y: 8 + } + ], + version: 1 + }, + watermelon: { + id: "watermelon", + name: "Watermelon", + keywords: [ + "fruit", + "food", + "picnic", + "summer" + ], + skins: [ + { + unified: "1f349", + native: "🍉", + x: 6, + y: 9 + } + ], + version: 1 + }, + tangerine: { + id: "tangerine", + name: "Tangerine", + keywords: [ + "food", + "fruit", + "nature", + "orange" + ], + skins: [ + { + unified: "1f34a", + native: "🍊", + x: 6, + y: 10 + } + ], + version: 1 + }, + lemon: { + id: "lemon", + name: "Lemon", + keywords: [ + "fruit", + "nature" + ], + skins: [ + { + unified: "1f34b", + native: "🍋", + x: 6, + y: 11 + } + ], + version: 1 + }, + banana: { + id: "banana", + name: "Banana", + keywords: [ + "fruit", + "food", + "monkey" + ], + skins: [ + { + unified: "1f34c", + native: "🍌", + x: 6, + y: 12 + } + ], + version: 1 + }, + pineapple: { + id: "pineapple", + name: "Pineapple", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f34d", + native: "🍍", + x: 6, + y: 13 + } + ], + version: 1 + }, + mango: { + id: "mango", + name: "Mango", + keywords: [ + "fruit", + "food", + "tropical" + ], + skins: [ + { + unified: "1f96d", + native: "🥭", + x: 43, + y: 57 + } + ], + version: 11 + }, + apple: { + id: "apple", + name: "Red Apple", + keywords: [ + "fruit", + "mac", + "school" + ], + skins: [ + { + unified: "1f34e", + native: "🍎", + x: 6, + y: 14 + } + ], + version: 1 + }, + green_apple: { + id: "green_apple", + name: "Green Apple", + keywords: [ + "fruit", + "nature" + ], + skins: [ + { + unified: "1f34f", + native: "🍏", + x: 6, + y: 15 + } + ], + version: 1 + }, + pear: { + id: "pear", + name: "Pear", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f350", + native: "🍐", + x: 6, + y: 16 + } + ], + version: 1 + }, + peach: { + id: "peach", + name: "Peach", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f351", + native: "🍑", + x: 6, + y: 17 + } + ], + version: 1 + }, + cherries: { + id: "cherries", + name: "Cherries", + keywords: [ + "food", + "fruit" + ], + skins: [ + { + unified: "1f352", + native: "🍒", + x: 6, + y: 18 + } + ], + version: 1 + }, + strawberry: { + id: "strawberry", + name: "Strawberry", + keywords: [ + "fruit", + "food", + "nature" + ], + skins: [ + { + unified: "1f353", + native: "🍓", + x: 6, + y: 19 + } + ], + version: 1 + }, + blueberries: { + id: "blueberries", + name: "Blueberries", + keywords: [ + "fruit" + ], + skins: [ + { + unified: "1fad0", + native: "🫐", + x: 55, + y: 18 + } + ], + version: 13 + }, + kiwifruit: { + id: "kiwifruit", + name: "Kiwifruit", + keywords: [ + "kiwi", + "fruit", + "food" + ], + skins: [ + { + unified: "1f95d", + native: "🥝", + x: 43, + y: 41 + } + ], + version: 3 + }, + tomato: { + id: "tomato", + name: "Tomato", + keywords: [ + "fruit", + "vegetable", + "nature", + "food" + ], + skins: [ + { + unified: "1f345", + native: "🍅", + x: 6, + y: 5 + } + ], + version: 1 + }, + olive: { + id: "olive", + name: "Olive", + keywords: [ + "fruit" + ], + skins: [ + { + unified: "1fad2", + native: "🫒", + x: 55, + y: 20 + } + ], + version: 13 + }, + coconut: { + id: "coconut", + name: "Coconut", + keywords: [ + "fruit", + "nature", + "food", + "palm" + ], + skins: [ + { + unified: "1f965", + native: "🥥", + x: 43, + y: 49 + } + ], + version: 5 + }, + avocado: { + id: "avocado", + name: "Avocado", + keywords: [ + "fruit", + "food" + ], + skins: [ + { + unified: "1f951", + native: "🥑", + x: 43, + y: 29 + } + ], + version: 3 + }, + eggplant: { + id: "eggplant", + name: "Eggplant", + keywords: [ + "vegetable", + "nature", + "food", + "aubergine" + ], + skins: [ + { + unified: "1f346", + native: "🍆", + x: 6, + y: 6 + } + ], + version: 1 + }, + potato: { + id: "potato", + name: "Potato", + keywords: [ + "food", + "tuber", + "vegatable", + "starch" + ], + skins: [ + { + unified: "1f954", + native: "🥔", + x: 43, + y: 32 + } + ], + version: 3 + }, + carrot: { + id: "carrot", + name: "Carrot", + keywords: [ + "vegetable", + "food", + "orange" + ], + skins: [ + { + unified: "1f955", + native: "🥕", + x: 43, + y: 33 + } + ], + version: 3 + }, + corn: { + id: "corn", + name: "Ear of Corn", + keywords: [ + "food", + "vegetable", + "plant" + ], + skins: [ + { + unified: "1f33d", + native: "🌽", + x: 5, + y: 58 + } + ], + version: 1 + }, + hot_pepper: { + id: "hot_pepper", + name: "Hot Pepper", + keywords: [ + "food", + "spicy", + "chilli", + "chili" + ], + skins: [ + { + unified: "1f336-fe0f", + native: "🌶️", + x: 5, + y: 51 + } + ], + version: 1 + }, + bell_pepper: { + id: "bell_pepper", + name: "Bell Pepper", + keywords: [ + "fruit", + "plant" + ], + skins: [ + { + unified: "1fad1", + native: "🫑", + x: 55, + y: 19 + } + ], + version: 13 + }, + cucumber: { + id: "cucumber", + name: "Cucumber", + keywords: [ + "fruit", + "food", + "pickle" + ], + skins: [ + { + unified: "1f952", + native: "🥒", + x: 43, + y: 30 + } + ], + version: 3 + }, + leafy_green: { + id: "leafy_green", + name: "Leafy Green", + keywords: [ + "food", + "vegetable", + "plant", + "bok", + "choy", + "cabbage", + "kale", + "lettuce" + ], + skins: [ + { + unified: "1f96c", + native: "🥬", + x: 43, + y: 56 + } + ], + version: 11 + }, + broccoli: { + id: "broccoli", + name: "Broccoli", + keywords: [ + "fruit", + "food", + "vegetable" + ], + skins: [ + { + unified: "1f966", + native: "🥦", + x: 43, + y: 50 + } + ], + version: 5 + }, + garlic: { + id: "garlic", + name: "Garlic", + keywords: [ + "food", + "spice", + "cook" + ], + skins: [ + { + unified: "1f9c4", + native: "🧄", + x: 46, + y: 11 + } + ], + version: 12 + }, + onion: { + id: "onion", + name: "Onion", + keywords: [ + "cook", + "food", + "spice" + ], + skins: [ + { + unified: "1f9c5", + native: "🧅", + x: 46, + y: 12 + } + ], + version: 12 + }, + peanuts: { + id: "peanuts", + name: "Peanuts", + keywords: [ + "food", + "nut" + ], + skins: [ + { + unified: "1f95c", + native: "🥜", + x: 43, + y: 40 + } + ], + version: 3 + }, + beans: { + id: "beans", + name: "Beans", + keywords: [ + "food" + ], + skins: [ + { + unified: "1fad8", + native: "🫘", + x: 55, + y: 26 + } + ], + version: 14 + }, + chestnut: { + id: "chestnut", + name: "Chestnut", + keywords: [ + "food", + "squirrel" + ], + skins: [ + { + unified: "1f330", + native: "🌰", + x: 5, + y: 45 + } + ], + version: 1 + }, + bread: { + id: "bread", + name: "Bread", + keywords: [ + "food", + "wheat", + "breakfast", + "toast" + ], + skins: [ + { + unified: "1f35e", + native: "🍞", + x: 6, + y: 30 + } + ], + version: 1 + }, + croissant: { + id: "croissant", + name: "Croissant", + keywords: [ + "food", + "bread", + "french" + ], + skins: [ + { + unified: "1f950", + native: "🥐", + x: 43, + y: 28 + } + ], + version: 3 + }, + baguette_bread: { + id: "baguette_bread", + name: "Baguette Bread", + keywords: [ + "food", + "french", + "france", + "bakery" + ], + skins: [ + { + unified: "1f956", + native: "🥖", + x: 43, + y: 34 + } + ], + version: 3 + }, + flatbread: { + id: "flatbread", + name: "Flatbread", + keywords: [ + "flour", + "food", + "bakery" + ], + skins: [ + { + unified: "1fad3", + native: "🫓", + x: 55, + y: 21 + } + ], + version: 13 + }, + pretzel: { + id: "pretzel", + name: "Pretzel", + keywords: [ + "food", + "bread", + "twisted", + "germany", + "bakery" + ], + skins: [ + { + unified: "1f968", + native: "🥨", + x: 43, + y: 52 + } + ], + version: 5 + }, + bagel: { + id: "bagel", + name: "Bagel", + keywords: [ + "food", + "bread", + "bakery", + "schmear", + "jewish" + ], + skins: [ + { + unified: "1f96f", + native: "🥯", + x: 43, + y: 59 + } + ], + version: 11 + }, + pancakes: { + id: "pancakes", + name: "Pancakes", + keywords: [ + "food", + "breakfast", + "flapjacks", + "hotcakes", + "brunch" + ], + skins: [ + { + unified: "1f95e", + native: "🥞", + x: 43, + y: 42 + } + ], + version: 3 + }, + waffle: { + id: "waffle", + name: "Waffle", + keywords: [ + "food", + "breakfast", + "brunch" + ], + skins: [ + { + unified: "1f9c7", + native: "🧇", + x: 46, + y: 14 + } + ], + version: 12 + }, + cheese_wedge: { + id: "cheese_wedge", + name: "Cheese Wedge", + keywords: [ + "food", + "chadder", + "swiss" + ], + skins: [ + { + unified: "1f9c0", + native: "🧀", + x: 46, + y: 7 + } + ], + version: 1 + }, + meat_on_bone: { + id: "meat_on_bone", + name: "Meat on Bone", + keywords: [ + "good", + "food", + "drumstick" + ], + skins: [ + { + unified: "1f356", + native: "🍖", + x: 6, + y: 22 + } + ], + version: 1 + }, + poultry_leg: { + id: "poultry_leg", + name: "Poultry Leg", + keywords: [ + "food", + "meat", + "drumstick", + "bird", + "chicken", + "turkey" + ], + skins: [ + { + unified: "1f357", + native: "🍗", + x: 6, + y: 23 + } + ], + version: 1 + }, + cut_of_meat: { + id: "cut_of_meat", + name: "Cut of Meat", + keywords: [ + "food", + "cow", + "chop", + "lambchop", + "porkchop" + ], + skins: [ + { + unified: "1f969", + native: "🥩", + x: 43, + y: 53 + } + ], + version: 5 + }, + bacon: { + id: "bacon", + name: "Bacon", + keywords: [ + "food", + "breakfast", + "pork", + "pig", + "meat", + "brunch" + ], + skins: [ + { + unified: "1f953", + native: "🥓", + x: 43, + y: 31 + } + ], + version: 3 + }, + hamburger: { + id: "hamburger", + name: "Hamburger", + keywords: [ + "meat", + "fast", + "food", + "beef", + "cheeseburger", + "mcdonalds", + "burger", + "king" + ], + skins: [ + { + unified: "1f354", + native: "🍔", + x: 6, + y: 20 + } + ], + version: 1 + }, + fries: { + id: "fries", + name: "French Fries", + keywords: [ + "chips", + "snack", + "fast", + "food", + "potato" + ], + skins: [ + { + unified: "1f35f", + native: "🍟", + x: 6, + y: 31 + } + ], + version: 1 + }, + pizza: { + id: "pizza", + name: "Pizza", + keywords: [ + "food", + "party", + "italy" + ], + skins: [ + { + unified: "1f355", + native: "🍕", + x: 6, + y: 21 + } + ], + version: 1 + }, + hotdog: { + id: "hotdog", + name: "Hot Dog", + keywords: [ + "hotdog", + "food", + "frankfurter", + "america" + ], + skins: [ + { + unified: "1f32d", + native: "🌭", + x: 5, + y: 42 + } + ], + version: 1 + }, + sandwich: { + id: "sandwich", + name: "Sandwich", + keywords: [ + "food", + "lunch", + "bread", + "toast", + "bakery" + ], + skins: [ + { + unified: "1f96a", + native: "🥪", + x: 43, + y: 54 + } + ], + version: 5 + }, + taco: { + id: "taco", + name: "Taco", + keywords: [ + "food", + "mexican" + ], + skins: [ + { + unified: "1f32e", + native: "🌮", + x: 5, + y: 43 + } + ], + version: 1 + }, + burrito: { + id: "burrito", + name: "Burrito", + keywords: [ + "food", + "mexican" + ], + skins: [ + { + unified: "1f32f", + native: "🌯", + x: 5, + y: 44 + } + ], + version: 1 + }, + tamale: { + id: "tamale", + name: "Tamale", + keywords: [ + "food", + "masa" + ], + skins: [ + { + unified: "1fad4", + native: "🫔", + x: 55, + y: 22 + } + ], + version: 13 + }, + stuffed_flatbread: { + id: "stuffed_flatbread", + name: "Stuffed Flatbread", + keywords: [ + "food", + "gyro", + "mediterranean" + ], + skins: [ + { + unified: "1f959", + native: "🥙", + x: 43, + y: 37 + } + ], + version: 3 + }, + falafel: { + id: "falafel", + name: "Falafel", + keywords: [ + "food", + "mediterranean" + ], + skins: [ + { + unified: "1f9c6", + native: "🧆", + x: 46, + y: 13 + } + ], + version: 12 + }, + egg: { + id: "egg", + name: "Egg", + keywords: [ + "food", + "chicken", + "breakfast" + ], + skins: [ + { + unified: "1f95a", + native: "🥚", + x: 43, + y: 38 + } + ], + version: 3 + }, + fried_egg: { + id: "fried_egg", + name: "Cooking", + keywords: [ + "fried", + "egg", + "food", + "breakfast", + "kitchen", + "skillet" + ], + skins: [ + { + unified: "1f373", + native: "🍳", + x: 6, + y: 51 + } + ], + version: 1 + }, + shallow_pan_of_food: { + id: "shallow_pan_of_food", + name: "Shallow Pan of Food", + keywords: [ + "cooking", + "casserole", + "paella", + "skillet" + ], + skins: [ + { + unified: "1f958", + native: "🥘", + x: 43, + y: 36 + } + ], + version: 3 + }, + stew: { + id: "stew", + name: "Pot of Food", + keywords: [ + "stew", + "meat", + "soup", + "hot" + ], + skins: [ + { + unified: "1f372", + native: "🍲", + x: 6, + y: 50 + } + ], + version: 1 + }, + fondue: { + id: "fondue", + name: "Fondue", + keywords: [ + "cheese", + "pot", + "food" + ], + skins: [ + { + unified: "1fad5", + native: "🫕", + x: 55, + y: 23 + } + ], + version: 13 + }, + bowl_with_spoon: { + id: "bowl_with_spoon", + name: "Bowl with Spoon", + keywords: [ + "food", + "breakfast", + "cereal", + "oatmeal", + "porridge" + ], + skins: [ + { + unified: "1f963", + native: "🥣", + x: 43, + y: 47 + } + ], + version: 5 + }, + green_salad: { + id: "green_salad", + name: "Green Salad", + keywords: [ + "food", + "healthy", + "lettuce", + "vegetable" + ], + skins: [ + { + unified: "1f957", + native: "🥗", + x: 43, + y: 35 + } + ], + version: 3 + }, + popcorn: { + id: "popcorn", + name: "Popcorn", + keywords: [ + "food", + "movie", + "theater", + "films", + "snack", + "drama" + ], + skins: [ + { + unified: "1f37f", + native: "🍿", + x: 7, + y: 2 + } + ], + version: 1 + }, + butter: { + id: "butter", + name: "Butter", + keywords: [ + "food", + "cook" + ], + skins: [ + { + unified: "1f9c8", + native: "🧈", + x: 46, + y: 15 + } + ], + version: 12 + }, + salt: { + id: "salt", + name: "Salt", + keywords: [ + "condiment", + "shaker" + ], + skins: [ + { + unified: "1f9c2", + native: "🧂", + x: 46, + y: 9 + } + ], + version: 11 + }, + canned_food: { + id: "canned_food", + name: "Canned Food", + keywords: [ + "soup", + "tomatoes" + ], + skins: [ + { + unified: "1f96b", + native: "🥫", + x: 43, + y: 55 + } + ], + version: 5 + }, + bento: { + id: "bento", + name: "Bento Box", + keywords: [ + "food", + "japanese", + "lunch" + ], + skins: [ + { + unified: "1f371", + native: "🍱", + x: 6, + y: 49 + } + ], + version: 1 + }, + rice_cracker: { + id: "rice_cracker", + name: "Rice Cracker", + keywords: [ + "food", + "japanese", + "snack" + ], + skins: [ + { + unified: "1f358", + native: "🍘", + x: 6, + y: 24 + } + ], + version: 1 + }, + rice_ball: { + id: "rice_ball", + name: "Rice Ball", + keywords: [ + "food", + "japanese" + ], + skins: [ + { + unified: "1f359", + native: "🍙", + x: 6, + y: 25 + } + ], + version: 1 + }, + rice: { + id: "rice", + name: "Cooked Rice", + keywords: [ + "food", + "asian" + ], + skins: [ + { + unified: "1f35a", + native: "🍚", + x: 6, + y: 26 + } + ], + version: 1 + }, + curry: { + id: "curry", + name: "Curry Rice", + keywords: [ + "food", + "spicy", + "hot", + "indian" + ], + skins: [ + { + unified: "1f35b", + native: "🍛", + x: 6, + y: 27 + } + ], + version: 1 + }, + ramen: { + id: "ramen", + name: "Steaming Bowl", + keywords: [ + "ramen", + "food", + "japanese", + "noodle", + "chopsticks" + ], + skins: [ + { + unified: "1f35c", + native: "🍜", + x: 6, + y: 28 + } + ], + version: 1 + }, + spaghetti: { + id: "spaghetti", + name: "Spaghetti", + keywords: [ + "food", + "italian", + "pasta", + "noodle" + ], + skins: [ + { + unified: "1f35d", + native: "🍝", + x: 6, + y: 29 + } + ], + version: 1 + }, + sweet_potato: { + id: "sweet_potato", + name: "Roasted Sweet Potato", + keywords: [ + "food", + "nature", + "plant" + ], + skins: [ + { + unified: "1f360", + native: "🍠", + x: 6, + y: 32 + } + ], + version: 1 + }, + oden: { + id: "oden", + name: "Oden", + keywords: [ + "food", + "japanese" + ], + skins: [ + { + unified: "1f362", + native: "🍢", + x: 6, + y: 34 + } + ], + version: 1 + }, + sushi: { + id: "sushi", + name: "Sushi", + keywords: [ + "food", + "fish", + "japanese", + "rice" + ], + skins: [ + { + unified: "1f363", + native: "🍣", + x: 6, + y: 35 + } + ], + version: 1 + }, + fried_shrimp: { + id: "fried_shrimp", + name: "Fried Shrimp", + keywords: [ + "food", + "animal", + "appetizer", + "summer" + ], + skins: [ + { + unified: "1f364", + native: "🍤", + x: 6, + y: 36 + } + ], + version: 1 + }, + fish_cake: { + id: "fish_cake", + name: "Fish Cake with Swirl", + keywords: [ + "food", + "japan", + "sea", + "beach", + "narutomaki", + "pink", + "kamaboko", + "surimi", + "ramen" + ], + skins: [ + { + unified: "1f365", + native: "🍥", + x: 6, + y: 37 + } + ], + version: 1 + }, + moon_cake: { + id: "moon_cake", + name: "Moon Cake", + keywords: [ + "food", + "autumn", + "dessert" + ], + skins: [ + { + unified: "1f96e", + native: "🥮", + x: 43, + y: 58 + } + ], + version: 11 + }, + dango: { + id: "dango", + name: "Dango", + keywords: [ + "food", + "dessert", + "sweet", + "japanese", + "barbecue", + "meat" + ], + skins: [ + { + unified: "1f361", + native: "🍡", + x: 6, + y: 33 + } + ], + version: 1 + }, + dumpling: { + id: "dumpling", + name: "Dumpling", + keywords: [ + "food", + "empanada", + "pierogi", + "potsticker", + "gyoza" + ], + skins: [ + { + unified: "1f95f", + native: "🥟", + x: 43, + y: 43 + } + ], + version: 5 + }, + fortune_cookie: { + id: "fortune_cookie", + name: "Fortune Cookie", + keywords: [ + "food", + "prophecy", + "dessert" + ], + skins: [ + { + unified: "1f960", + native: "🥠", + x: 43, + y: 44 + } + ], + version: 5 + }, + takeout_box: { + id: "takeout_box", + name: "Takeout Box", + keywords: [ + "food", + "leftovers" + ], + skins: [ + { + unified: "1f961", + native: "🥡", + x: 43, + y: 45 + } + ], + version: 5 + }, + crab: { + id: "crab", + name: "Crab", + keywords: [ + "animal", + "crustacean" + ], + skins: [ + { + unified: "1f980", + native: "🦀", + x: 44, + y: 20 + } + ], + version: 1 + }, + lobster: { + id: "lobster", + name: "Lobster", + keywords: [ + "animal", + "nature", + "bisque", + "claws", + "seafood" + ], + skins: [ + { + unified: "1f99e", + native: "🦞", + x: 44, + y: 50 + } + ], + version: 11 + }, + shrimp: { + id: "shrimp", + name: "Shrimp", + keywords: [ + "animal", + "ocean", + "nature", + "seafood" + ], + skins: [ + { + unified: "1f990", + native: "🦐", + x: 44, + y: 36 + } + ], + version: 3 + }, + squid: { + id: "squid", + name: "Squid", + keywords: [ + "animal", + "nature", + "ocean", + "sea" + ], + skins: [ + { + unified: "1f991", + native: "🦑", + x: 44, + y: 37 + } + ], + version: 3 + }, + oyster: { + id: "oyster", + name: "Oyster", + keywords: [ + "food" + ], + skins: [ + { + unified: "1f9aa", + native: "🦪", + x: 45, + y: 1 + } + ], + version: 12 + }, + icecream: { + id: "icecream", + name: "Soft Ice Cream", + keywords: [ + "icecream", + "food", + "hot", + "dessert", + "summer" + ], + skins: [ + { + unified: "1f366", + native: "🍦", + x: 6, + y: 38 + } + ], + version: 1 + }, + shaved_ice: { + id: "shaved_ice", + name: "Shaved Ice", + keywords: [ + "hot", + "dessert", + "summer" + ], + skins: [ + { + unified: "1f367", + native: "🍧", + x: 6, + y: 39 + } + ], + version: 1 + }, + ice_cream: { + id: "ice_cream", + name: "Ice Cream", + keywords: [ + "food", + "hot", + "dessert" + ], + skins: [ + { + unified: "1f368", + native: "🍨", + x: 6, + y: 40 + } + ], + version: 1 + }, + doughnut: { + id: "doughnut", + name: "Doughnut", + keywords: [ + "food", + "dessert", + "snack", + "sweet", + "donut" + ], + skins: [ + { + unified: "1f369", + native: "🍩", + x: 6, + y: 41 + } + ], + version: 1 + }, + cookie: { + id: "cookie", + name: "Cookie", + keywords: [ + "food", + "snack", + "oreo", + "chocolate", + "sweet", + "dessert" + ], + skins: [ + { + unified: "1f36a", + native: "🍪", + x: 6, + y: 42 + } + ], + version: 1 + }, + birthday: { + id: "birthday", + name: "Birthday Cake", + keywords: [ + "food", + "dessert" + ], + skins: [ + { + unified: "1f382", + native: "🎂", + x: 7, + y: 5 + } + ], + version: 1 + }, + cake: { + id: "cake", + name: "Shortcake", + keywords: [ + "cake", + "food", + "dessert" + ], + skins: [ + { + unified: "1f370", + native: "🍰", + x: 6, + y: 48 + } + ], + version: 1 + }, + cupcake: { + id: "cupcake", + name: "Cupcake", + keywords: [ + "food", + "dessert", + "bakery", + "sweet" + ], + skins: [ + { + unified: "1f9c1", + native: "🧁", + x: 46, + y: 8 + } + ], + version: 11 + }, + pie: { + id: "pie", + name: "Pie", + keywords: [ + "food", + "dessert", + "pastry" + ], + skins: [ + { + unified: "1f967", + native: "🥧", + x: 43, + y: 51 + } + ], + version: 5 + }, + chocolate_bar: { + id: "chocolate_bar", + name: "Chocolate Bar", + keywords: [ + "food", + "snack", + "dessert", + "sweet" + ], + skins: [ + { + unified: "1f36b", + native: "🍫", + x: 6, + y: 43 + } + ], + version: 1 + }, + candy: { + id: "candy", + name: "Candy", + keywords: [ + "snack", + "dessert", + "sweet", + "lolly" + ], + skins: [ + { + unified: "1f36c", + native: "🍬", + x: 6, + y: 44 + } + ], + version: 1 + }, + lollipop: { + id: "lollipop", + name: "Lollipop", + keywords: [ + "food", + "snack", + "candy", + "sweet" + ], + skins: [ + { + unified: "1f36d", + native: "🍭", + x: 6, + y: 45 + } + ], + version: 1 + }, + custard: { + id: "custard", + name: "Custard", + keywords: [ + "dessert", + "food" + ], + skins: [ + { + unified: "1f36e", + native: "🍮", + x: 6, + y: 46 + } + ], + version: 1 + }, + honey_pot: { + id: "honey_pot", + name: "Honey Pot", + keywords: [ + "bees", + "sweet", + "kitchen" + ], + skins: [ + { + unified: "1f36f", + native: "🍯", + x: 6, + y: 47 + } + ], + version: 1 + }, + baby_bottle: { + id: "baby_bottle", + name: "Baby Bottle", + keywords: [ + "food", + "container", + "milk" + ], + skins: [ + { + unified: "1f37c", + native: "🍼", + x: 6, + y: 60 + } + ], + version: 1 + }, + glass_of_milk: { + id: "glass_of_milk", + name: "Glass of Milk", + keywords: [ + "beverage", + "drink", + "cow" + ], + skins: [ + { + unified: "1f95b", + native: "🥛", + x: 43, + y: 39 + } + ], + version: 3 + }, + coffee: { + id: "coffee", + name: "Hot Beverage", + keywords: [ + "coffee", + "caffeine", + "latte", + "espresso", + "mug" + ], + skins: [ + { + unified: "2615", + native: "☕", + x: 57, + y: 18 + } + ], + version: 1 + }, + teapot: { + id: "teapot", + name: "Teapot", + keywords: [ + "drink", + "hot" + ], + skins: [ + { + unified: "1fad6", + native: "🫖", + x: 55, + y: 24 + } + ], + version: 13 }, tea: { - a: "Teacup Without Handle", - b: "1F375", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "tea", + name: "Teacup Without Handle", + keywords: [ + "tea", "drink", "bowl", "breakfast", "green", "british" ], - k: [ - 7, - 20 + skins: [ + { + unified: "1f375", + native: "🍵", + x: 6, + y: 53 + } ], - o: 2 - }, - "flag-gt": { - a: "Guatemala Flag", - b: "1F1EC-1F1F9", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 12 - ], - o: 2 - }, - oil_drum: { - a: "Oil Drum", - b: "1F6E2-FE0F", - c: "1F6E2", - d: true, - e: true, - f: true, - h: true, - j: [ - "barrell" - ], - k: [ - 36, - 44 - ], - o: 2 - }, - diya_lamp: { - a: "Diya Lamp", - b: "1FA94", - d: true, - e: true, - f: true, - h: true, - k: [ - 52, - 8 - ], - o: 12 + version: 1 }, sake: { - a: "Sake Bottle and Cup", - b: "1F376", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "sake", + name: "Sake", + keywords: [ "wine", "drink", "drunk", @@ -32726,694 +35310,59 @@ var emojis$1 = { "alcohol", "booze" ], - k: [ - 7, - 21 - ], - o: 2 - }, - trident: { - a: "Trident Emblem", - b: "1F531", - d: true, - e: true, - f: true, - h: true, - j: [ - "weapon", - "spear" - ], - k: [ - 28, - 20 - ], - o: 2 - }, - "man-shrugging": { - skin_variations: { - "1F3FB": { - unified: "1F937-1F3FB-200D-2642-FE0F", - non_qualified: "1F937-1F3FB-200D-2642", - image: "1f937-1f3fb-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F937-1F3FC-200D-2642-FE0F", - non_qualified: "1F937-1F3FC-200D-2642", - image: "1f937-1f3fc-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 43, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F937-1F3FD-200D-2642-FE0F", - non_qualified: "1F937-1F3FD-200D-2642", - image: "1f937-1f3fd-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 44, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F937-1F3FE-200D-2642-FE0F", - non_qualified: "1F937-1F3FE-200D-2642", - image: "1f937-1f3fe-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F937-1F3FF-200D-2642-FE0F", - non_qualified: "1F937-1F3FF-200D-2642", - image: "1f937-1f3ff-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f376", + native: "🍶", + x: 6, + y: 54 } - }, - a: "Man Shrugging", - b: "1F937-200D-2642-FE0F", - c: "1F937-200D-2642", - d: true, - e: true, - f: true, - h: true, - k: [ - 39, - 41 ], - o: 4 - }, - smiley_cat: { - a: "Smiling Cat Face with Open Mouth", - b: "1F63A", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats", - "happy", - "smile" - ], - k: [ - 31, - 36 - ], - o: 2 - }, - scorpion: { - a: "Scorpion", - b: "1F982", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "arachnid" - ], - k: [ - 42, - 20 - ], - o: 2 - }, - "woman-shrugging": { - skin_variations: { - "1F3FB": { - unified: "1F937-1F3FB-200D-2640-FE0F", - non_qualified: "1F937-1F3FB-200D-2640", - image: "1f937-1f3fb-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F937-1F3FC-200D-2640-FE0F", - non_qualified: "1F937-1F3FC-200D-2640", - image: "1f937-1f3fc-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F937-1F3FD-200D-2640-FE0F", - non_qualified: "1F937-1F3FD-200D-2640", - image: "1f937-1f3fd-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F937-1F3FE-200D-2640-FE0F", - non_qualified: "1F937-1F3FE-200D-2640", - image: "1f937-1f3fe-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F937-1F3FF-200D-2640-FE0F", - non_qualified: "1F937-1F3FF-200D-2640", - image: "1f937-1f3ff-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Woman Shrugging", - b: "1F937-200D-2640-FE0F", - c: "1F937-200D-2640", - d: true, - e: true, - f: true, - h: true, - k: [ - 39, - 35 - ], - o: 4 - }, - notebook_with_decorative_cover: { - a: "Notebook with Decorative Cover", - b: "1F4D4", - d: true, - e: true, - f: true, - h: true, - j: [ - "classroom", - "notes", - "record", - "paper", - "study" - ], - k: [ - 26, - 42 - ], - o: 2 - }, - fuelpump: { - a: "Fuel Pump", - b: "26FD", - d: true, - e: true, - f: true, - h: true, - j: [ - "gas station", - "petroleum" - ], - k: [ - 54, - 38 - ], - o: 2 - }, - name_badge: { - a: "Name Badge", - b: "1F4DB", - d: true, - e: true, - f: true, - h: true, - j: [ - "fire", - "forbid" - ], - k: [ - 26, - 49 - ], - o: 2 - }, - mosquito: { - a: "Mosquito", - b: "1F99F", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 49 - ], - o: 11 - }, - "flag-gu": { - a: "Guam Flag", - b: "1F1EC-1F1FA", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 13 - ], - o: 2 - }, - smile_cat: { - a: "Grinning Cat Face with Smiling Eyes", - b: "1F638", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats", - "smile" - ], - k: [ - 31, - 34 - ], - o: 2 + version: 1 }, champagne: { - a: "Bottle with Popping Cork", - b: "1F37E", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "champagne", + name: "Bottle with Popping Cork", + keywords: [ + "champagne", "drink", "wine", - "bottle", "celebration" ], - k: [ - 7, - 29 - ], - o: 2 - }, - joy_cat: { - a: "Cat Face with Tears of Joy", - b: "1F639", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats", - "haha", - "happy", - "tears" - ], - k: [ - 31, - 35 - ], - o: 2 - }, - closed_book: { - a: "Closed Book", - b: "1F4D5", - d: true, - e: true, - f: true, - h: true, - j: [ - "read", - "library", - "knowledge", - "textbook", - "learn" - ], - k: [ - 26, - 43 - ], - o: 2 - }, - health_worker: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-2695-FE0F", - non_qualified: "1F9D1-1F3FB-200D-2695", - image: "1f9d1-1f3fb-200d-2695-fe0f.png", - sheet_x: 47, - sheet_y: 50, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-2695-FE0F", - non_qualified: "1F9D1-1F3FC-200D-2695", - image: "1f9d1-1f3fc-200d-2695-fe0f.png", - sheet_x: 47, - sheet_y: 51, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-2695-FE0F", - non_qualified: "1F9D1-1F3FD-200D-2695", - image: "1f9d1-1f3fd-200d-2695-fe0f.png", - sheet_x: 47, - sheet_y: 52, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-2695-FE0F", - non_qualified: "1F9D1-1F3FE-200D-2695", - image: "1f9d1-1f3fe-200d-2695-fe0f.png", - sheet_x: 47, - sheet_y: 53, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-2695-FE0F", - non_qualified: "1F9D1-1F3FF-200D-2695", - image: "1f9d1-1f3ff-200d-2695-fe0f.png", - sheet_x: 47, - sheet_y: 54, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false + skins: [ + { + unified: "1f37e", + native: "🍾", + x: 7, + y: 1 } - }, - a: "Health Worker", - b: "1F9D1-200D-2695-FE0F", - c: "1F9D1-200D-2695", - d: true, - e: false, - f: false, - h: false, - k: [ - 47, - 49 ], - o: 12 - }, - rotating_light: { - a: "Police Cars Revolving Light", - b: "1F6A8", - d: true, - e: true, - f: true, - h: true, - j: [ - "police", - "ambulance", - "911", - "emergency", - "alert", - "error", - "pinged", - "law", - "legal" - ], - k: [ - 34, - 56 - ], - o: 2 - }, - microbe: { - a: "Microbe", - b: "1F9A0", - d: true, - e: true, - f: true, - h: true, - k: [ - 42, - 50 - ], - o: 11 - }, - "flag-gw": { - a: "Guinea-Bissau Flag", - b: "1F1EC-1F1FC", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 14 - ], - o: 2 + version: 1 }, wine_glass: { - a: "Wine Glass", - b: "1F377", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "wine_glass", + name: "Wine Glass", + keywords: [ "drink", "beverage", "drunk", "alcohol", "booze" ], - k: [ - 7, - 22 - ], - o: 2 - }, - beginner: { - a: "Japanese Symbol for Beginner", - b: "1F530", - d: true, - e: true, - f: true, - h: true, - j: [ - "badge", - "shield" - ], - k: [ - 28, - 19 - ], - o: 2 - }, - bouquet: { - a: "Bouquet", - b: "1F490", - d: true, - e: true, - f: true, - h: true, - j: [ - "flowers", - "nature", - "spring" - ], - k: [ - 25, - 26 - ], - o: 2 - }, - heart_eyes_cat: { - a: "Smiling Cat Face with Heart-Shaped Eyes", - b: "1F63B", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "love", - "like", - "affection", - "cats", - "valentines", - "heart" - ], - k: [ - 31, - 37 - ], - o: 2 - }, - "male-doctor": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-2695-FE0F", - non_qualified: "1F468-1F3FB-200D-2695", - image: "1f468-1f3fb-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 3, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-2695-FE0F", - non_qualified: "1F468-1F3FC-200D-2695", - image: "1f468-1f3fc-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 4, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-2695-FE0F", - non_qualified: "1F468-1F3FD-200D-2695", - image: "1f468-1f3fd-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 5, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-2695-FE0F", - non_qualified: "1F468-1F3FE-200D-2695", - image: "1f468-1f3fe-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 6, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-2695-FE0F", - non_qualified: "1F468-1F3FF-200D-2695", - image: "1f468-1f3ff-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 7, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f377", + native: "🍷", + x: 6, + y: 55 } - }, - a: "Male Doctor", - b: "1F468-200D-2695-FE0F", - c: "1F468-200D-2695", - d: true, - e: true, - f: true, - h: true, - k: [ - 17, - 2 ], - o: 4 - }, - book: { - a: "Open Book", - b: "1F4D6", - d: true, - e: true, - f: true, - h: true, - k: [ - 26, - 44 - ], - n: [ - "open_book" - ], - o: 2 - }, - traffic_light: { - a: "Horizontal Traffic Light", - b: "1F6A5", - d: true, - e: true, - f: true, - h: true, - j: [ - "transportation", - "signal" - ], - k: [ - 34, - 53 - ], - o: 2 + version: 1 }, cocktail: { - a: "Cocktail Glass", - b: "1F378", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "cocktail", + name: "Cocktail Glass", + keywords: [ "drink", "drunk", "alcohol", @@ -33421,234 +35370,20 @@ var emojis$1 = { "booze", "mojito" ], - k: [ - 7, - 23 - ], - o: 2 - }, - o: { - a: "Heavy Large Circle", - b: "2B55", - d: true, - e: true, - f: true, - h: true, - j: [ - "circle", - "round" - ], - k: [ - 55, - 43 - ], - o: 2 - }, - "flag-gy": { - a: "Guyana Flag", - b: "1F1EC-1F1FE", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 15 - ], - o: 2 - }, - "female-doctor": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-2695-FE0F", - non_qualified: "1F469-1F3FB-200D-2695", - image: "1f469-1f3fb-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-2695-FE0F", - non_qualified: "1F469-1F3FC-200D-2695", - image: "1f469-1f3fc-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-2695-FE0F", - non_qualified: "1F469-1F3FD-200D-2695", - image: "1f469-1f3fd-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 47, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-2695-FE0F", - non_qualified: "1F469-1F3FE-200D-2695", - image: "1f469-1f3fe-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-2695-FE0F", - non_qualified: "1F469-1F3FF-200D-2695", - image: "1f469-1f3ff-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f378", + native: "🍸", + x: 6, + y: 56 } - }, - a: "Female Doctor", - b: "1F469-200D-2695-FE0F", - c: "1F469-200D-2695", - d: true, - e: true, - f: true, - h: true, - k: [ - 19, - 44 ], - o: 4 - }, - smirk_cat: { - a: "Cat Face with Wry Smile", - b: "1F63C", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats", - "smirk" - ], - k: [ - 31, - 38 - ], - o: 2 - }, - green_book: { - a: "Green Book", - b: "1F4D7", - d: true, - e: true, - f: true, - h: true, - j: [ - "read", - "library", - "knowledge", - "study" - ], - k: [ - 26, - 45 - ], - o: 2 - }, - cherry_blossom: { - a: "Cherry Blossom", - b: "1F338", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "plant", - "spring", - "flower" - ], - k: [ - 6, - 16 - ], - o: 2 - }, - "flag-hk": { - a: "Hong Kong Sar China Flag", - b: "1F1ED-1F1F0", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 16 - ], - o: 2 - }, - vertical_traffic_light: { - a: "Vertical Traffic Light", - b: "1F6A6", - d: true, - e: true, - f: true, - h: true, - j: [ - "transportation", - "driving" - ], - k: [ - 34, - 54 - ], - o: 2 - }, - white_check_mark: { - a: "White Heavy Check Mark", - b: "2705", - d: true, - e: true, - f: true, - h: true, - j: [ - "green-square", - "ok", - "agree", - "vote", - "election", - "answer", - "tick" - ], - k: [ - 54, - 40 - ], - o: 2 + version: 1 }, tropical_drink: { - a: "Tropical Drink", - b: "1F379", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "tropical_drink", + name: "Tropical Drink", + keywords: [ "beverage", "cocktail", "summer", @@ -33657,200 +35392,20 @@ var emojis$1 = { "booze", "mojito" ], - k: [ - 7, - 24 - ], - o: 2 - }, - kissing_cat: { - a: "Kissing Cat Face with Closed Eyes", - b: "1F63D", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats", - "kiss" - ], - k: [ - 31, - 39 - ], - o: 2 - }, - "flag-hm": { - a: "Heard & Mcdonald Islands Flag", - b: "1F1ED-1F1F2", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 17 - ], - o: 2 - }, - octagonal_sign: { - a: "Octagonal Sign", - b: "1F6D1", - d: true, - e: true, - f: true, - h: true, - k: [ - 36, - 39 - ], - o: 4 - }, - white_flower: { - a: "White Flower", - b: "1F4AE", - d: true, - e: true, - f: true, - h: true, - j: [ - "japanese", - "spring" - ], - k: [ - 26, - 4 - ], - o: 2 - }, - ballot_box_with_check: { - a: "Ballot Box with Check", - b: "2611-FE0F", - c: "2611", - d: true, - e: true, - f: true, - h: true, - j: [ - "ok", - "agree", - "confirm", - "black-square", - "vote", - "election", - "yes", - "tick" - ], - k: [ - 52, - 55 - ], - o: 2 - }, - student: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-1F393", - non_qualified: null, - image: "1f9d1-1f3fb-200d-1f393.png", - sheet_x: 45, - sheet_y: 30, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-1F393", - non_qualified: null, - image: "1f9d1-1f3fc-200d-1f393.png", - sheet_x: 45, - sheet_y: 31, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-1F393", - non_qualified: null, - image: "1f9d1-1f3fd-200d-1f393.png", - sheet_x: 45, - sheet_y: 32, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-1F393", - non_qualified: null, - image: "1f9d1-1f3fe-200d-1f393.png", - sheet_x: 45, - sheet_y: 33, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-1F393", - non_qualified: null, - image: "1f9d1-1f3ff-200d-1f393.png", - sheet_x: 45, - sheet_y: 34, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false + skins: [ + { + unified: "1f379", + native: "🍹", + x: 6, + y: 57 } - }, - a: "Student", - b: "1F9D1-200D-1F393", - d: true, - e: false, - f: false, - h: false, - k: [ - 45, - 29 ], - o: 12 - }, - blue_book: { - a: "Blue Book", - b: "1F4D8", - d: true, - e: true, - f: true, - h: true, - j: [ - "read", - "library", - "knowledge", - "learn", - "study" - ], - k: [ - 26, - 46 - ], - o: 2 + version: 1 }, beer: { - a: "Beer Mug", - b: "1F37A", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "beer", + name: "Beer Mug", + keywords: [ "relax", "beverage", "drink", @@ -33861,119 +35416,21 @@ var emojis$1 = { "alcohol", "booze" ], - k: [ - 7, - 25 + skins: [ + { + unified: "1f37a", + native: "🍺", + x: 6, + y: 58 + } ], - o: 2 - }, - construction: { - a: "Construction Sign", - b: "1F6A7", - d: true, - e: true, - f: true, - h: true, - j: [ - "wip", - "progress", - "caution", - "warning" - ], - k: [ - 34, - 55 - ], - o: 2 - }, - rosette: { - a: "Rosette", - b: "1F3F5-FE0F", - c: "1F3F5", - d: true, - e: true, - f: true, - h: true, - j: [ - "flower", - "decoration", - "military" - ], - k: [ - 11, - 18 - ], - o: 2 - }, - heavy_check_mark: { - a: "Heavy Check Mark", - b: "2714-FE0F", - c: "2714", - d: true, - e: true, - f: true, - h: true, - j: [ - "ok", - "nike", - "answer", - "yes", - "tick" - ], - k: [ - 55, - 12 - ], - o: 2 - }, - scream_cat: { - a: "Weary Cat Face", - b: "1F640", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats", - "munch", - "scared", - "scream" - ], - k: [ - 31, - 42 - ], - o: 2 - }, - orange_book: { - a: "Orange Book", - b: "1F4D9", - d: true, - e: true, - f: true, - h: true, - j: [ - "read", - "library", - "knowledge", - "textbook", - "study" - ], - k: [ - 26, - 47 - ], - o: 2 + version: 1 }, beers: { - a: "Clinking Beer Mugs", - b: "1F37B", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "beers", + name: "Clinking Beer Mugs", + keywords: [ + "beers", "relax", "beverage", "drink", @@ -33984,471 +35441,44 @@ var emojis$1 = { "alcohol", "booze" ], - k: [ - 7, - 26 - ], - o: 2 - }, - "male-student": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F393", - non_qualified: null, - image: "1f468-1f3fb-200d-1f393.png", - sheet_x: 14, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F393", - non_qualified: null, - image: "1f468-1f3fc-200d-1f393.png", - sheet_x: 14, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F393", - non_qualified: null, - image: "1f468-1f3fd-200d-1f393.png", - sheet_x: 14, - sheet_y: 53, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F393", - non_qualified: null, - image: "1f468-1f3fe-200d-1f393.png", - sheet_x: 14, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F393", - non_qualified: null, - image: "1f468-1f3ff-200d-1f393.png", - sheet_x: 14, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f37b", + native: "🍻", + x: 6, + y: 59 } - }, - a: "Male Student", - b: "1F468-200D-1F393", - d: true, - e: true, - f: true, - h: true, - k: [ - 14, - 50 ], - o: 4 - }, - "flag-hn": { - a: "Honduras Flag", - b: "1F1ED-1F1F3", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 18 - ], - o: 2 - }, - crying_cat_face: { - a: "Crying Cat Face", - b: "1F63F", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "tears", - "weep", - "sad", - "cats", - "upset", - "cry" - ], - k: [ - 31, - 41 - ], - o: 2 - }, - anchor: { - a: "Anchor", - b: "2693", - d: true, - e: true, - f: true, - h: true, - j: [ - "ship", - "ferry", - "sea", - "boat" - ], - k: [ - 53, - 42 - ], - o: 2 - }, - "flag-hr": { - a: "Croatia Flag", - b: "1F1ED-1F1F7", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 19 - ], - o: 2 - }, - heavy_multiplication_x: { - a: "Heavy Multiplication X", - b: "2716-FE0F", - c: "2716", - d: true, - e: true, - f: true, - h: true, - j: [ - "math", - "calculation" - ], - k: [ - 55, - 13 - ], - o: 2 - }, - "female-student": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F393", - non_qualified: null, - image: "1f469-1f3fb-200d-1f393.png", - sheet_x: 17, - sheet_y: 41, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F393", - non_qualified: null, - image: "1f469-1f3fc-200d-1f393.png", - sheet_x: 17, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F393", - non_qualified: null, - image: "1f469-1f3fd-200d-1f393.png", - sheet_x: 17, - sheet_y: 43, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F393", - non_qualified: null, - image: "1f469-1f3fe-200d-1f393.png", - sheet_x: 17, - sheet_y: 44, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F393", - non_qualified: null, - image: "1f469-1f3ff-200d-1f393.png", - sheet_x: 17, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Female Student", - b: "1F469-200D-1F393", - d: true, - e: true, - f: true, - h: true, - k: [ - 17, - 40 - ], - o: 4 - }, - rose: { - a: "Rose", - b: "1F339", - d: true, - e: true, - f: true, - h: true, - j: [ - "flowers", - "valentines", - "love", - "spring" - ], - k: [ - 6, - 17 - ], - o: 2 - }, - books: { - a: "Books", - b: "1F4DA", - d: true, - e: true, - f: true, - h: true, - j: [ - "literature", - "library", - "study" - ], - k: [ - 26, - 48 - ], - o: 2 + version: 1 }, clinking_glasses: { - a: "Clinking Glasses", - b: "1F942", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "clinking_glasses", + name: "Clinking Glasses", + keywords: [ "beverage", "drink", "party", "alcohol", "celebrate", - "cheers" + "cheers", + "wine", + "champagne", + "toast" ], - k: [ - 41, - 18 - ], - o: 4 - }, - teacher: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-1F3EB", - non_qualified: null, - image: "1f9d1-1f3fb-200d-1f3eb.png", - sheet_x: 45, - sheet_y: 48, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-1F3EB", - non_qualified: null, - image: "1f9d1-1f3fc-200d-1f3eb.png", - sheet_x: 45, - sheet_y: 49, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-1F3EB", - non_qualified: null, - image: "1f9d1-1f3fd-200d-1f3eb.png", - sheet_x: 45, - sheet_y: 50, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-1F3EB", - non_qualified: null, - image: "1f9d1-1f3fe-200d-1f3eb.png", - sheet_x: 45, - sheet_y: 51, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-1F3EB", - non_qualified: null, - image: "1f9d1-1f3ff-200d-1f3eb.png", - sheet_x: 45, - sheet_y: 52, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false + skins: [ + { + unified: "1f942", + native: "🥂", + x: 43, + y: 15 } - }, - a: "Teacher", - b: "1F9D1-200D-1F3EB", - d: true, - e: false, - f: false, - h: false, - k: [ - 45, - 47 ], - o: 12 - }, - x: { - a: "Cross Mark", - b: "274C", - d: true, - e: true, - f: true, - h: true, - j: [ - "no", - "delete", - "remove", - "cancel" - ], - k: [ - 55, - 21 - ], - o: 2 - }, - pouting_cat: { - a: "Pouting Cat Face", - b: "1F63E", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "cats" - ], - k: [ - 31, - 40 - ], - o: 2 - }, - wilted_flower: { - a: "Wilted Flower", - b: "1F940", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "nature", - "flower" - ], - k: [ - 41, - 16 - ], - o: 4 - }, - boat: { - a: "Sailboat", - b: "26F5", - d: true, - e: true, - f: true, - h: true, - k: [ - 54, - 16 - ], - n: [ - "sailboat" - ], - o: 2 - }, - "flag-ht": { - a: "Haiti Flag", - b: "1F1ED-1F1F9", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 20 - ], - o: 2 + version: 3 }, tumbler_glass: { - a: "Tumbler Glass", - b: "1F943", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "tumbler_glass", + name: "Tumbler Glass", + keywords: [ "drink", "beverage", "drunk", @@ -34458,2281 +35488,2641 @@ var emojis$1 = { "bourbon", "scotch", "whisky", - "glass", "shot" ], - k: [ - 41, - 19 - ], - o: 4 - }, - notebook: { - a: "Notebook", - b: "1F4D3", - d: true, - e: true, - f: true, - h: true, - j: [ - "stationery", - "record", - "notes", - "paper", - "study" - ], - k: [ - 26, - 41 - ], - o: 2 - }, - "male-teacher": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fb-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 12, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fc-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 13, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fd-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 14, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fe-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 15, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3ff-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 16, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f943", + native: "🥃", + x: 43, + y: 16 } - }, - a: "Male Teacher", - b: "1F468-200D-1F3EB", - d: true, - e: true, - f: true, - h: true, - k: [ - 15, - 11 ], - o: 4 + version: 3 }, - ledger: { - a: "Ledger", - b: "1F4D2", - d: true, - e: true, - f: true, - h: true, - j: [ - "notes", - "paper" + pouring_liquid: { + id: "pouring_liquid", + name: "Pouring Liquid", + keywords: [ + "cup", + "water" ], - k: [ - 26, - 40 + skins: [ + { + unified: "1fad7", + native: "🫗", + x: 55, + y: 25 + } ], - o: 2 - }, - "flag-hu": { - a: "Hungary Flag", - b: "1F1ED-1F1FA", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 21 - ], - o: 2 + version: 14 }, cup_with_straw: { - a: "Cup with Straw", - b: "1F964", - d: true, - e: true, - f: true, - h: true, - k: [ - 41, - 51 + id: "cup_with_straw", + name: "Cup with Straw", + keywords: [ + "drink", + "soda" ], - o: 5 + skins: [ + { + unified: "1f964", + native: "🥤", + x: 43, + y: 48 + } + ], + version: 5 }, - hibiscus: { - a: "Hibiscus", - b: "1F33A", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "vegetable", - "flowers", - "beach" + bubble_tea: { + id: "bubble_tea", + name: "Bubble Tea", + keywords: [ + "taiwan", + "boba", + "milk", + "straw" ], - k: [ - 6, - 18 + skins: [ + { + unified: "1f9cb", + native: "🧋", + x: 46, + y: 18 + } ], - o: 2 + version: 13 }, - see_no_evil: { - a: "See-No-Evil Monkey", - b: "1F648", - d: true, - e: true, - f: true, - h: true, - j: [ - "monkey", - "animal", + beverage_box: { + id: "beverage_box", + name: "Beverage Box", + keywords: [ + "drink" + ], + skins: [ + { + unified: "1f9c3", + native: "🧃", + x: 46, + y: 10 + } + ], + version: 12 + }, + mate_drink: { + id: "mate_drink", + name: "Mate", + keywords: [ + "drink", + "tea", + "beverage" + ], + skins: [ + { + unified: "1f9c9", + native: "🧉", + x: 46, + y: 16 + } + ], + version: 12 + }, + ice_cube: { + id: "ice_cube", + name: "Ice", + keywords: [ + "cube", + "water", + "cold" + ], + skins: [ + { + unified: "1f9ca", + native: "🧊", + x: 46, + y: 17 + } + ], + version: 12 + }, + chopsticks: { + id: "chopsticks", + name: "Chopsticks", + keywords: [ + "food" + ], + skins: [ + { + unified: "1f962", + native: "🥢", + x: 43, + y: 46 + } + ], + version: 5 + }, + knife_fork_plate: { + id: "knife_fork_plate", + name: "Fork and Knife with Plate", + keywords: [ + "food", + "eat", + "meal", + "lunch", + "dinner", + "restaurant" + ], + skins: [ + { + unified: "1f37d-fe0f", + native: "🍽️", + x: 7, + y: 0 + } + ], + version: 1 + }, + fork_and_knife: { + id: "fork_and_knife", + name: "Fork and Knife", + keywords: [ + "cutlery", + "kitchen" + ], + skins: [ + { + unified: "1f374", + native: "🍴", + x: 6, + y: 52 + } + ], + version: 1 + }, + spoon: { + id: "spoon", + name: "Spoon", + keywords: [ + "cutlery", + "kitchen", + "tableware" + ], + skins: [ + { + unified: "1f944", + native: "🥄", + x: 43, + y: 17 + } + ], + version: 3 + }, + hocho: { + id: "hocho", + name: "Hocho", + keywords: [ + "knife", + "kitchen", + "blade", + "cutlery", + "weapon" + ], + skins: [ + { + unified: "1f52a", + native: "🔪", + x: 30, + y: 7 + } + ], + version: 1 + }, + jar: { + id: "jar", + name: "Jar", + keywords: [ + "container", + "sauce" + ], + skins: [ + { + unified: "1fad9", + native: "🫙", + x: 55, + y: 27 + } + ], + version: 14 + }, + amphora: { + id: "amphora", + name: "Amphora", + keywords: [ + "vase", + "jar" + ], + skins: [ + { + unified: "1f3fa", + native: "🏺", + x: 10, + y: 40 + } + ], + version: 1 + }, + earth_africa: { + id: "earth_africa", + name: "Earth Globe Europe-Africa", + keywords: [ + "africa", + "showing", + "europe", + "world", + "international" + ], + skins: [ + { + unified: "1f30d", + native: "🌍", + x: 5, + y: 12 + } + ], + version: 1 + }, + earth_americas: { + id: "earth_americas", + name: "Earth Globe Americas", + keywords: [ + "showing", + "world", + "USA", + "international" + ], + skins: [ + { + unified: "1f30e", + native: "🌎", + x: 5, + y: 13 + } + ], + version: 1 + }, + earth_asia: { + id: "earth_asia", + name: "Earth Globe Asia-Australia", + keywords: [ + "asia", + "showing", + "australia", + "world", + "east", + "international" + ], + skins: [ + { + unified: "1f30f", + native: "🌏", + x: 5, + y: 14 + } + ], + version: 1 + }, + globe_with_meridians: { + id: "globe_with_meridians", + name: "Globe with Meridians", + keywords: [ + "earth", + "international", + "world", + "internet", + "interweb", + "i18n" + ], + skins: [ + { + unified: "1f310", + native: "🌐", + x: 5, + y: 15 + } + ], + version: 1 + }, + world_map: { + id: "world_map", + name: "World Map", + keywords: [ + "location", + "direction" + ], + skins: [ + { + unified: "1f5fa-fe0f", + native: "🗺️", + x: 32, + y: 15 + } + ], + version: 1 + }, + japan: { + id: "japan", + name: "Map of Japan", + keywords: [ + "nation", + "country", + "japanese", + "asia" + ], + skins: [ + { + unified: "1f5fe", + native: "🗾", + x: 32, + y: 19 + } + ], + version: 1 + }, + compass: { + id: "compass", + name: "Compass", + keywords: [ + "magnetic", + "navigation", + "orienteering" + ], + skins: [ + { + unified: "1f9ed", + native: "🧭", + x: 53, + y: 29 + } + ], + version: 11 + }, + snow_capped_mountain: { + id: "snow_capped_mountain", + name: "Snow-Capped Mountain", + keywords: [ + "snow", + "capped", + "photo", "nature", - "haha" + "environment", + "winter", + "cold" ], - k: [ - 32, - 44 + skins: [ + { + unified: "1f3d4-fe0f", + native: "🏔️", + x: 9, + y: 60 + } ], - o: 2 + version: 1 + }, + mountain: { + id: "mountain", + name: "Mountain", + keywords: [ + "photo", + "nature", + "environment" + ], + skins: [ + { + unified: "26f0-fe0f", + native: "⛰️", + x: 58, + y: 26 + } + ], + version: 1 + }, + volcano: { + id: "volcano", + name: "Volcano", + keywords: [ + "photo", + "nature", + "disaster" + ], + skins: [ + { + unified: "1f30b", + native: "🌋", + x: 5, + y: 10 + } + ], + version: 1 + }, + mount_fuji: { + id: "mount_fuji", + name: "Mount Fuji", + keywords: [ + "photo", + "mountain", + "nature", + "japanese" + ], + skins: [ + { + unified: "1f5fb", + native: "🗻", + x: 32, + y: 16 + } + ], + version: 1 + }, + camping: { + id: "camping", + name: "Camping", + keywords: [ + "photo", + "outdoors", + "tent" + ], + skins: [ + { + unified: "1f3d5-fe0f", + native: "🏕️", + x: 10, + y: 0 + } + ], + version: 1 + }, + beach_with_umbrella: { + id: "beach_with_umbrella", + name: "Beach with Umbrella", + keywords: [ + "weather", + "summer", + "sunny", + "sand", + "mojito" + ], + skins: [ + { + unified: "1f3d6-fe0f", + native: "🏖️", + x: 10, + y: 1 + } + ], + version: 1 + }, + desert: { + id: "desert", + name: "Desert", + keywords: [ + "photo", + "warm", + "saharah" + ], + skins: [ + { + unified: "1f3dc-fe0f", + native: "🏜️", + x: 10, + y: 7 + } + ], + version: 1 + }, + desert_island: { + id: "desert_island", + name: "Desert Island", + keywords: [ + "photo", + "tropical", + "mojito" + ], + skins: [ + { + unified: "1f3dd-fe0f", + native: "🏝️", + x: 10, + y: 8 + } + ], + version: 1 + }, + national_park: { + id: "national_park", + name: "National Park", + keywords: [ + "photo", + "environment", + "nature" + ], + skins: [ + { + unified: "1f3de-fe0f", + native: "🏞️", + x: 10, + y: 9 + } + ], + version: 1 + }, + stadium: { + id: "stadium", + name: "Stadium", + keywords: [ + "photo", + "place", + "sports", + "concert", + "venue" + ], + skins: [ + { + unified: "1f3df-fe0f", + native: "🏟️", + x: 10, + y: 10 + } + ], + version: 1 + }, + classical_building: { + id: "classical_building", + name: "Classical Building", + keywords: [ + "art", + "culture", + "history" + ], + skins: [ + { + unified: "1f3db-fe0f", + native: "🏛️", + x: 10, + y: 6 + } + ], + version: 1 + }, + building_construction: { + id: "building_construction", + name: "Building Construction", + keywords: [ + "wip", + "working", + "progress" + ], + skins: [ + { + unified: "1f3d7-fe0f", + native: "🏗️", + x: 10, + y: 2 + } + ], + version: 1 + }, + bricks: { + id: "bricks", + name: "Brick", + keywords: [ + "bricks" + ], + skins: [ + { + unified: "1f9f1", + native: "🧱", + x: 53, + y: 33 + } + ], + version: 11 + }, + rock: { + id: "rock", + name: "Rock", + keywords: [ + "stone" + ], + skins: [ + { + unified: "1faa8", + native: "🪨", + x: 54, + y: 33 + } + ], + version: 13 + }, + wood: { + id: "wood", + name: "Wood", + keywords: [ + "nature", + "timber", + "trunk" + ], + skins: [ + { + unified: "1fab5", + native: "🪵", + x: 54, + y: 46 + } + ], + version: 13 + }, + hut: { + id: "hut", + name: "Hut", + keywords: [ + "house", + "structure" + ], + skins: [ + { + unified: "1f6d6", + native: "🛖", + x: 38, + y: 7 + } + ], + version: 13 + }, + house_buildings: { + id: "house_buildings", + name: "Houses", + keywords: [ + "house", + "buildings", + "photo" + ], + skins: [ + { + unified: "1f3d8-fe0f", + native: "🏘️", + x: 10, + y: 3 + } + ], + version: 1 + }, + derelict_house_building: { + id: "derelict_house_building", + name: "Derelict House", + keywords: [ + "building", + "abandon", + "evict", + "broken" + ], + skins: [ + { + unified: "1f3da-fe0f", + native: "🏚️", + x: 10, + y: 5 + } + ], + version: 1 + }, + house: { + id: "house", + name: "House", + keywords: [ + "building", + "home" + ], + skins: [ + { + unified: "1f3e0", + native: "🏠", + x: 10, + y: 11 + } + ], + version: 1 + }, + house_with_garden: { + id: "house_with_garden", + name: "House with Garden", + keywords: [ + "home", + "plant", + "nature" + ], + skins: [ + { + unified: "1f3e1", + native: "🏡", + x: 10, + y: 12 + } + ], + version: 1 + }, + office: { + id: "office", + name: "Office Building", + keywords: [ + "bureau", + "work" + ], + skins: [ + { + unified: "1f3e2", + native: "🏢", + x: 10, + y: 13 + } + ], + version: 1 + }, + post_office: { + id: "post_office", + name: "Japanese Post Office", + keywords: [ + "building", + "envelope", + "communication" + ], + skins: [ + { + unified: "1f3e3", + native: "🏣", + x: 10, + y: 14 + } + ], + version: 1 + }, + european_post_office: { + id: "european_post_office", + name: "Post Office", + keywords: [ + "european", + "building", + "email" + ], + skins: [ + { + unified: "1f3e4", + native: "🏤", + x: 10, + y: 15 + } + ], + version: 1 + }, + hospital: { + id: "hospital", + name: "Hospital", + keywords: [ + "building", + "health", + "surgery", + "doctor" + ], + skins: [ + { + unified: "1f3e5", + native: "🏥", + x: 10, + y: 16 + } + ], + version: 1 + }, + bank: { + id: "bank", + name: "Bank", + keywords: [ + "building", + "money", + "sales", + "cash", + "business", + "enterprise" + ], + skins: [ + { + unified: "1f3e6", + native: "🏦", + x: 10, + y: 17 + } + ], + version: 1 + }, + hotel: { + id: "hotel", + name: "Hotel", + keywords: [ + "building", + "accomodation", + "checkin" + ], + skins: [ + { + unified: "1f3e8", + native: "🏨", + x: 10, + y: 19 + } + ], + version: 1 + }, + love_hotel: { + id: "love_hotel", + name: "Love Hotel", + keywords: [ + "like", + "affection", + "dating" + ], + skins: [ + { + unified: "1f3e9", + native: "🏩", + x: 10, + y: 20 + } + ], + version: 1 + }, + convenience_store: { + id: "convenience_store", + name: "Convenience Store", + keywords: [ + "building", + "shopping", + "groceries" + ], + skins: [ + { + unified: "1f3ea", + native: "🏪", + x: 10, + y: 21 + } + ], + version: 1 + }, + school: { + id: "school", + name: "School", + keywords: [ + "building", + "student", + "education", + "learn", + "teach" + ], + skins: [ + { + unified: "1f3eb", + native: "🏫", + x: 10, + y: 22 + } + ], + version: 1 + }, + department_store: { + id: "department_store", + name: "Department Store", + keywords: [ + "building", + "shopping", + "mall" + ], + skins: [ + { + unified: "1f3ec", + native: "🏬", + x: 10, + y: 23 + } + ], + version: 1 + }, + factory: { + id: "factory", + name: "Factory", + keywords: [ + "building", + "industry", + "pollution", + "smoke" + ], + skins: [ + { + unified: "1f3ed", + native: "🏭", + x: 10, + y: 24 + } + ], + version: 1 + }, + japanese_castle: { + id: "japanese_castle", + name: "Japanese Castle", + keywords: [ + "photo", + "building" + ], + skins: [ + { + unified: "1f3ef", + native: "🏯", + x: 10, + y: 26 + } + ], + version: 1 + }, + european_castle: { + id: "european_castle", + name: "Castle", + keywords: [ + "european", + "building", + "royalty", + "history" + ], + skins: [ + { + unified: "1f3f0", + native: "🏰", + x: 10, + y: 27 + } + ], + version: 1 + }, + wedding: { + id: "wedding", + name: "Wedding", + keywords: [ + "love", + "like", + "affection", + "couple", + "marriage", + "bride", + "groom" + ], + skins: [ + { + unified: "1f492", + native: "💒", + x: 27, + y: 34 + } + ], + version: 1 + }, + tokyo_tower: { + id: "tokyo_tower", + name: "Tokyo Tower", + keywords: [ + "photo", + "japanese" + ], + skins: [ + { + unified: "1f5fc", + native: "🗼", + x: 32, + y: 17 + } + ], + version: 1 + }, + statue_of_liberty: { + id: "statue_of_liberty", + name: "Statue of Liberty", + keywords: [ + "american", + "newyork" + ], + skins: [ + { + unified: "1f5fd", + native: "🗽", + x: 32, + y: 18 + } + ], + version: 1 + }, + church: { + id: "church", + name: "Church", + keywords: [ + "building", + "religion", + "christ" + ], + skins: [ + { + unified: "26ea", + native: "⛪", + x: 58, + y: 25 + } + ], + version: 1 + }, + mosque: { + id: "mosque", + name: "Mosque", + keywords: [ + "islam", + "worship", + "minaret" + ], + skins: [ + { + unified: "1f54c", + native: "🕌", + x: 30, + y: 30 + } + ], + version: 1 + }, + hindu_temple: { + id: "hindu_temple", + name: "Hindu Temple", + keywords: [ + "religion" + ], + skins: [ + { + unified: "1f6d5", + native: "🛕", + x: 38, + y: 6 + } + ], + version: 12 + }, + synagogue: { + id: "synagogue", + name: "Synagogue", + keywords: [ + "judaism", + "worship", + "temple", + "jewish" + ], + skins: [ + { + unified: "1f54d", + native: "🕍", + x: 30, + y: 31 + } + ], + version: 1 + }, + shinto_shrine: { + id: "shinto_shrine", + name: "Shinto Shrine", + keywords: [ + "temple", + "japan", + "kyoto" + ], + skins: [ + { + unified: "26e9-fe0f", + native: "⛩️", + x: 58, + y: 24 + } + ], + version: 1 + }, + kaaba: { + id: "kaaba", + name: "Kaaba", + keywords: [ + "mecca", + "mosque", + "islam" + ], + skins: [ + { + unified: "1f54b", + native: "🕋", + x: 30, + y: 29 + } + ], + version: 1 + }, + fountain: { + id: "fountain", + name: "Fountain", + keywords: [ + "photo", + "summer", + "water", + "fresh" + ], + skins: [ + { + unified: "26f2", + native: "⛲", + x: 58, + y: 28 + } + ], + version: 1 + }, + tent: { + id: "tent", + name: "Tent", + keywords: [ + "photo", + "camping", + "outdoors" + ], + skins: [ + { + unified: "26fa", + native: "⛺", + x: 58, + y: 52 + } + ], + version: 1 + }, + foggy: { + id: "foggy", + name: "Foggy", + keywords: [ + "photo", + "mountain" + ], + skins: [ + { + unified: "1f301", + native: "🌁", + x: 5, + y: 0 + } + ], + version: 1 + }, + night_with_stars: { + id: "night_with_stars", + name: "Night with Stars", + keywords: [ + "evening", + "city", + "downtown" + ], + skins: [ + { + unified: "1f303", + native: "🌃", + x: 5, + y: 2 + } + ], + version: 1 + }, + cityscape: { + id: "cityscape", + name: "Cityscape", + keywords: [ + "photo", + "night", + "life", + "urban" + ], + skins: [ + { + unified: "1f3d9-fe0f", + native: "🏙️", + x: 10, + y: 4 + } + ], + version: 1 + }, + sunrise_over_mountains: { + id: "sunrise_over_mountains", + name: "Sunrise over Mountains", + keywords: [ + "view", + "vacation", + "photo" + ], + skins: [ + { + unified: "1f304", + native: "🌄", + x: 5, + y: 3 + } + ], + version: 1 + }, + sunrise: { + id: "sunrise", + name: "Sunrise", + keywords: [ + "morning", + "view", + "vacation", + "photo" + ], + skins: [ + { + unified: "1f305", + native: "🌅", + x: 5, + y: 4 + } + ], + version: 1 + }, + city_sunset: { + id: "city_sunset", + name: "Cityscape at Dusk", + keywords: [ + "city", + "sunset", + "photo", + "evening", + "sky", + "buildings" + ], + skins: [ + { + unified: "1f306", + native: "🌆", + x: 5, + y: 5 + } + ], + version: 1 + }, + city_sunrise: { + id: "city_sunrise", + name: "Sunset", + keywords: [ + "city", + "sunrise", + "photo", + "good", + "morning", + "dawn" + ], + skins: [ + { + unified: "1f307", + native: "🌇", + x: 5, + y: 6 + } + ], + version: 1 + }, + bridge_at_night: { + id: "bridge_at_night", + name: "Bridge at Night", + keywords: [ + "photo", + "sanfrancisco" + ], + skins: [ + { + unified: "1f309", + native: "🌉", + x: 5, + y: 8 + } + ], + version: 1 + }, + hotsprings: { + id: "hotsprings", + name: "Hot Springs", + keywords: [ + "hotsprings", + "bath", + "warm", + "relax" + ], + skins: [ + { + unified: "2668-fe0f", + native: "♨️", + x: 57, + y: 55 + } + ], + version: 1 + }, + carousel_horse: { + id: "carousel_horse", + name: "Carousel Horse", + keywords: [ + "photo", + "carnival" + ], + skins: [ + { + unified: "1f3a0", + native: "🎠", + x: 7, + y: 35 + } + ], + version: 1 + }, + playground_slide: { + id: "playground_slide", + name: "Playground Slide", + keywords: [ + "fun", + "park" + ], + skins: [ + { + unified: "1f6dd", + native: "🛝", + x: 38, + y: 10 + } + ], + version: 14 + }, + ferris_wheel: { + id: "ferris_wheel", + name: "Ferris Wheel", + keywords: [ + "photo", + "carnival", + "londoneye" + ], + skins: [ + { + unified: "1f3a1", + native: "🎡", + x: 7, + y: 36 + } + ], + version: 1 + }, + roller_coaster: { + id: "roller_coaster", + name: "Roller Coaster", + keywords: [ + "carnival", + "playground", + "photo", + "fun" + ], + skins: [ + { + unified: "1f3a2", + native: "🎢", + x: 7, + y: 37 + } + ], + version: 1 + }, + barber: { + id: "barber", + name: "Barber Pole", + keywords: [ + "hair", + "salon", + "style" + ], + skins: [ + { + unified: "1f488", + native: "💈", + x: 26, + y: 35 + } + ], + version: 1 + }, + circus_tent: { + id: "circus_tent", + name: "Circus Tent", + keywords: [ + "festival", + "carnival", + "party" + ], + skins: [ + { + unified: "1f3aa", + native: "🎪", + x: 7, + y: 45 + } + ], + version: 1 + }, + steam_locomotive: { + id: "steam_locomotive", + name: "Locomotive", + keywords: [ + "steam", + "transportation", + "vehicle", + "train" + ], + skins: [ + { + unified: "1f682", + native: "🚂", + x: 35, + y: 35 + } + ], + version: 1 + }, + railway_car: { + id: "railway_car", + name: "Railway Car", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f683", + native: "🚃", + x: 35, + y: 36 + } + ], + version: 1 + }, + bullettrain_side: { + id: "bullettrain_side", + name: "High-Speed Train", + keywords: [ + "bullettrain", + "side", + "high", + "speed", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f684", + native: "🚄", + x: 35, + y: 37 + } + ], + version: 1 + }, + bullettrain_front: { + id: "bullettrain_front", + name: "Bullet Train", + keywords: [ + "bullettrain", + "front", + "transportation", + "vehicle", + "speed", + "fast", + "public", + "travel" + ], + skins: [ + { + unified: "1f685", + native: "🚅", + x: 35, + y: 38 + } + ], + version: 1 + }, + train2: { + id: "train2", + name: "Train", + keywords: [ + "train2", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f686", + native: "🚆", + x: 35, + y: 39 + } + ], + version: 1 + }, + metro: { + id: "metro", + name: "Metro", + keywords: [ + "transportation", + "blue", + "square", + "mrt", + "underground", + "tube" + ], + skins: [ + { + unified: "1f687", + native: "🚇", + x: 35, + y: 40 + } + ], + version: 1 + }, + light_rail: { + id: "light_rail", + name: "Light Rail", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f688", + native: "🚈", + x: 35, + y: 41 + } + ], + version: 1 + }, + station: { + id: "station", + name: "Station", + keywords: [ + "transportation", + "vehicle", + "public" + ], + skins: [ + { + unified: "1f689", + native: "🚉", + x: 35, + y: 42 + } + ], + version: 1 + }, + tram: { + id: "tram", + name: "Tram", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f68a", + native: "🚊", + x: 35, + y: 43 + } + ], + version: 1 + }, + monorail: { + id: "monorail", + name: "Monorail", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f69d", + native: "🚝", + x: 36, + y: 1 + } + ], + version: 1 + }, + mountain_railway: { + id: "mountain_railway", + name: "Mountain Railway", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f69e", + native: "🚞", + x: 36, + y: 2 + } + ], + version: 1 + }, + train: { + id: "train", + name: "Tram Car", + keywords: [ + "train", + "transportation", + "vehicle", + "carriage", + "public", + "travel" + ], + skins: [ + { + unified: "1f68b", + native: "🚋", + x: 35, + y: 44 + } + ], + version: 1 + }, + bus: { + id: "bus", + name: "Bus", + keywords: [ + "car", + "vehicle", + "transportation" + ], + skins: [ + { + unified: "1f68c", + native: "🚌", + x: 35, + y: 45 + } + ], + version: 1 + }, + oncoming_bus: { + id: "oncoming_bus", + name: "Oncoming Bus", + keywords: [ + "vehicle", + "transportation" + ], + skins: [ + { + unified: "1f68d", + native: "🚍", + x: 35, + y: 46 + } + ], + version: 1 + }, + trolleybus: { + id: "trolleybus", + name: "Trolleybus", + keywords: [ + "bart", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f68e", + native: "🚎", + x: 35, + y: 47 + } + ], + version: 1 + }, + minibus: { + id: "minibus", + name: "Minibus", + keywords: [ + "vehicle", + "car", + "transportation" + ], + skins: [ + { + unified: "1f690", + native: "🚐", + x: 35, + y: 49 + } + ], + version: 1 + }, + ambulance: { + id: "ambulance", + name: "Ambulance", + keywords: [ + "health", + "911", + "hospital" + ], + skins: [ + { + unified: "1f691", + native: "🚑", + x: 35, + y: 50 + } + ], + version: 1 + }, + fire_engine: { + id: "fire_engine", + name: "Fire Engine", + keywords: [ + "transportation", + "cars", + "vehicle" + ], + skins: [ + { + unified: "1f692", + native: "🚒", + x: 35, + y: 51 + } + ], + version: 1 + }, + police_car: { + id: "police_car", + name: "Police Car", + keywords: [ + "vehicle", + "cars", + "transportation", + "law", + "legal", + "enforcement" + ], + skins: [ + { + unified: "1f693", + native: "🚓", + x: 35, + y: 52 + } + ], + version: 1 + }, + oncoming_police_car: { + id: "oncoming_police_car", + name: "Oncoming Police Car", + keywords: [ + "vehicle", + "law", + "legal", + "enforcement", + "911" + ], + skins: [ + { + unified: "1f694", + native: "🚔", + x: 35, + y: 53 + } + ], + version: 1 + }, + taxi: { + id: "taxi", + name: "Taxi", + keywords: [ + "uber", + "vehicle", + "cars", + "transportation" + ], + skins: [ + { + unified: "1f695", + native: "🚕", + x: 35, + y: 54 + } + ], + version: 1 + }, + oncoming_taxi: { + id: "oncoming_taxi", + name: "Oncoming Taxi", + keywords: [ + "vehicle", + "cars", + "uber" + ], + skins: [ + { + unified: "1f696", + native: "🚖", + x: 35, + y: 55 + } + ], + version: 1 + }, + car: { + id: "car", + name: "Automobile", + keywords: [ + "car", + "red", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f697", + native: "🚗", + x: 35, + y: 56 + } + ], + version: 1 + }, + oncoming_automobile: { + id: "oncoming_automobile", + name: "Oncoming Automobile", + keywords: [ + "car", + "vehicle", + "transportation" + ], + skins: [ + { + unified: "1f698", + native: "🚘", + x: 35, + y: 57 + } + ], + version: 1 + }, + blue_car: { + id: "blue_car", + name: "Recreational Vehicle", + keywords: [ + "blue", + "car", + "sport", + "utility", + "transportation" + ], + skins: [ + { + unified: "1f699", + native: "🚙", + x: 35, + y: 58 + } + ], + version: 1 + }, + pickup_truck: { + id: "pickup_truck", + name: "Pickup Truck", + keywords: [ + "car", + "transportation" + ], + skins: [ + { + unified: "1f6fb", + native: "🛻", + x: 38, + y: 31 + } + ], + version: 13 + }, + truck: { + id: "truck", + name: "Delivery Truck", + keywords: [ + "cars", + "transportation" + ], + skins: [ + { + unified: "1f69a", + native: "🚚", + x: 35, + y: 59 + } + ], + version: 1 + }, + articulated_lorry: { + id: "articulated_lorry", + name: "Articulated Lorry", + keywords: [ + "vehicle", + "cars", + "transportation", + "express" + ], + skins: [ + { + unified: "1f69b", + native: "🚛", + x: 35, + y: 60 + } + ], + version: 1 + }, + tractor: { + id: "tractor", + name: "Tractor", + keywords: [ + "vehicle", + "car", + "farming", + "agriculture" + ], + skins: [ + { + unified: "1f69c", + native: "🚜", + x: 36, + y: 0 + } + ], + version: 1 + }, + racing_car: { + id: "racing_car", + name: "Racing Car", + keywords: [ + "sports", + "race", + "fast", + "formula", + "f1" + ], + skins: [ + { + unified: "1f3ce-fe0f", + native: "🏎️", + x: 9, + y: 54 + } + ], + version: 1 + }, + racing_motorcycle: { + id: "racing_motorcycle", + name: "Motorcycle", + keywords: [ + "racing", + "race", + "sports", + "fast" + ], + skins: [ + { + unified: "1f3cd-fe0f", + native: "🏍️", + x: 9, + y: 53 + } + ], + version: 1 + }, + motor_scooter: { + id: "motor_scooter", + name: "Motor Scooter", + keywords: [ + "vehicle", + "vespa", + "sasha" + ], + skins: [ + { + unified: "1f6f5", + native: "🛵", + x: 38, + y: 25 + } + ], + version: 3 + }, + manual_wheelchair: { + id: "manual_wheelchair", + name: "Manual Wheelchair", + keywords: [ + "accessibility" + ], + skins: [ + { + unified: "1f9bd", + native: "🦽", + x: 46, + y: 4 + } + ], + version: 12 + }, + motorized_wheelchair: { + id: "motorized_wheelchair", + name: "Motorized Wheelchair", + keywords: [ + "accessibility" + ], + skins: [ + { + unified: "1f9bc", + native: "🦼", + x: 46, + y: 3 + } + ], + version: 12 + }, + auto_rickshaw: { + id: "auto_rickshaw", + name: "Auto Rickshaw", + keywords: [ + "move", + "transportation" + ], + skins: [ + { + unified: "1f6fa", + native: "🛺", + x: 38, + y: 30 + } + ], + version: 12 + }, + bike: { + id: "bike", + name: "Bicycle", + keywords: [ + "bike", + "sports", + "exercise", + "hipster" + ], + skins: [ + { + unified: "1f6b2", + native: "🚲", + x: 36, + y: 39 + } + ], + version: 1 + }, + scooter: { + id: "scooter", + name: "Scooter", + keywords: [ + "kick", + "vehicle", + "razor" + ], + skins: [ + { + unified: "1f6f4", + native: "🛴", + x: 38, + y: 24 + } + ], + version: 3 + }, + skateboard: { + id: "skateboard", + name: "Skateboard", + keywords: [ + "board" + ], + skins: [ + { + unified: "1f6f9", + native: "🛹", + x: 38, + y: 29 + } + ], + version: 11 + }, + roller_skate: { + id: "roller_skate", + name: "Roller Skate", + keywords: [ + "footwear", + "sports" + ], + skins: [ + { + unified: "1f6fc", + native: "🛼", + x: 38, + y: 32 + } + ], + version: 13 + }, + busstop: { + id: "busstop", + name: "Bus Stop", + keywords: [ + "busstop", + "transportation", + "wait" + ], + skins: [ + { + unified: "1f68f", + native: "🚏", + x: 35, + y: 48 + } + ], + version: 1 + }, + motorway: { + id: "motorway", + name: "Motorway", + keywords: [ + "road", + "cupertino", + "interstate", + "highway" + ], + skins: [ + { + unified: "1f6e3-fe0f", + native: "🛣️", + x: 38, + y: 16 + } + ], + version: 1 + }, + railway_track: { + id: "railway_track", + name: "Railway Track", + keywords: [ + "train", + "transportation" + ], + skins: [ + { + unified: "1f6e4-fe0f", + native: "🛤️", + x: 38, + y: 17 + } + ], + version: 1 + }, + oil_drum: { + id: "oil_drum", + name: "Oil Drum", + keywords: [ + "barrell" + ], + skins: [ + { + unified: "1f6e2-fe0f", + native: "🛢️", + x: 38, + y: 15 + } + ], + version: 1 + }, + fuelpump: { + id: "fuelpump", + name: "Fuel Pump", + keywords: [ + "fuelpump", + "gas", + "station", + "petroleum" + ], + skins: [ + { + unified: "26fd", + native: "⛽", + x: 58, + y: 53 + } + ], + version: 1 + }, + wheel: { + id: "wheel", + name: "Wheel", + keywords: [ + "car", + "transport" + ], + skins: [ + { + unified: "1f6de", + native: "🛞", + x: 38, + y: 11 + } + ], + version: 14 + }, + rotating_light: { + id: "rotating_light", + name: "Police Car Light", + keywords: [ + "rotating", + "ambulance", + "911", + "emergency", + "alert", + "error", + "pinged", + "law", + "legal" + ], + skins: [ + { + unified: "1f6a8", + native: "🚨", + x: 36, + y: 29 + } + ], + version: 1 + }, + traffic_light: { + id: "traffic_light", + name: "Horizontal Traffic Light", + keywords: [ + "transportation", + "signal" + ], + skins: [ + { + unified: "1f6a5", + native: "🚥", + x: 36, + y: 26 + } + ], + version: 1 + }, + vertical_traffic_light: { + id: "vertical_traffic_light", + name: "Vertical Traffic Light", + keywords: [ + "transportation", + "driving" + ], + skins: [ + { + unified: "1f6a6", + native: "🚦", + x: 36, + y: 27 + } + ], + version: 1 + }, + octagonal_sign: { + id: "octagonal_sign", + name: "Stop Sign", + keywords: [ + "octagonal" + ], + skins: [ + { + unified: "1f6d1", + native: "🛑", + x: 38, + y: 4 + } + ], + version: 3 + }, + construction: { + id: "construction", + name: "Construction", + keywords: [ + "wip", + "progress", + "caution", + "warning" + ], + skins: [ + { + unified: "1f6a7", + native: "🚧", + x: 36, + y: 28 + } + ], + version: 1 + }, + anchor: { + id: "anchor", + name: "Anchor", + keywords: [ + "ship", + "ferry", + "sea", + "boat" + ], + skins: [ + { + unified: "2693", + native: "⚓", + x: 57, + y: 60 + } + ], + version: 1 + }, + ring_buoy: { + id: "ring_buoy", + name: "Ring Buoy", + keywords: [ + "life", + "saver", + "preserver" + ], + skins: [ + { + unified: "1f6df", + native: "🛟", + x: 38, + y: 12 + } + ], + version: 14 + }, + boat: { + id: "boat", + name: "Sailboat", + keywords: [ + "boat", + "ship", + "summer", + "transportation", + "water", + "sailing" + ], + skins: [ + { + unified: "26f5", + native: "⛵", + x: 58, + y: 31 + } + ], + version: 1 }, canoe: { - a: "Canoe", - b: "1F6F6", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "canoe", + name: "Canoe", + keywords: [ "boat", "paddle", "water", "ship" ], - k: [ - 36, - 55 + skins: [ + { + unified: "1f6f6", + native: "🛶", + x: 38, + y: 26 + } ], - o: 4 - }, - negative_squared_cross_mark: { - a: "Negative Squared Cross Mark", - b: "274E", - d: true, - e: true, - f: true, - h: true, - j: [ - "x", - "green-square", - "no", - "deny" - ], - k: [ - 55, - 22 - ], - o: 2 - }, - "flag-ic": { - a: "Canary Islands Flag", - b: "1F1EE-1F1E8", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 22 - ], - o: 2 - }, - beverage_box: { - a: "Beverage Box", - b: "1F9C3", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 11 - ], - o: 12 + version: 3 }, speedboat: { - a: "Speedboat", - b: "1F6A4", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "speedboat", + name: "Speedboat", + keywords: [ "ship", "transportation", "vehicle", "summer" ], - k: [ - 34, - 52 - ], - o: 2 - }, - heavy_plus_sign: { - a: "Heavy Plus Sign", - b: "2795", - d: true, - e: true, - f: true, - h: true, - j: [ - "math", - "calculation", - "addition", - "more", - "increase" - ], - k: [ - 55, - 29 - ], - o: 2 - }, - sunflower: { - a: "Sunflower", - b: "1F33B", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "plant", - "fall" - ], - k: [ - 6, - 19 - ], - o: 2 - }, - page_with_curl: { - a: "Page with Curl", - b: "1F4C3", - d: true, - e: true, - f: true, - h: true, - j: [ - "documents", - "office", - "paper" - ], - k: [ - 26, - 25 - ], - o: 2 - }, - "female-teacher": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fb-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 2, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fc-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 3, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fd-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 4, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fe-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 5, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3ff-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 6, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f6a4", + native: "🚤", + x: 36, + y: 25 } - }, - a: "Female Teacher", - b: "1F469-200D-1F3EB", - d: true, - e: true, - f: true, - h: true, - k: [ - 18, - 1 ], - o: 4 - }, - hear_no_evil: { - a: "Hear-No-Evil Monkey", - b: "1F649", - d: true, - e: true, - f: true, - h: true, - j: [ - "animal", - "monkey", - "nature" - ], - k: [ - 32, - 45 - ], - o: 2 - }, - mate_drink: { - a: "Mate Drink", - b: "1F9C9", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 17 - ], - o: 12 + version: 1 }, passenger_ship: { - a: "Passenger Ship", - b: "1F6F3-FE0F", - c: "1F6F3", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "passenger_ship", + name: "Passenger Ship", + keywords: [ "yacht", "cruise", "ferry" ], - k: [ - 36, - 52 - ], - o: 2 - }, - judge: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-2696-FE0F", - non_qualified: "1F9D1-1F3FB-200D-2696", - image: "1f9d1-1f3fb-200d-2696-fe0f.png", - sheet_x: 47, - sheet_y: 56, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-2696-FE0F", - non_qualified: "1F9D1-1F3FC-200D-2696", - image: "1f9d1-1f3fc-200d-2696-fe0f.png", - sheet_x: 48, - sheet_y: 0, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-2696-FE0F", - non_qualified: "1F9D1-1F3FD-200D-2696", - image: "1f9d1-1f3fd-200d-2696-fe0f.png", - sheet_x: 48, - sheet_y: 1, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-2696-FE0F", - non_qualified: "1F9D1-1F3FE-200D-2696", - image: "1f9d1-1f3fe-200d-2696-fe0f.png", - sheet_x: 48, - sheet_y: 2, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-2696-FE0F", - non_qualified: "1F9D1-1F3FF-200D-2696", - image: "1f9d1-1f3ff-200d-2696-fe0f.png", - sheet_x: 48, - sheet_y: 3, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false + skins: [ + { + unified: "1f6f3-fe0f", + native: "🛳️", + x: 38, + y: 23 } - }, - a: "Judge", - b: "1F9D1-200D-2696-FE0F", - c: "1F9D1-200D-2696", - d: true, - e: false, - f: false, - h: false, - k: [ - 47, - 55 ], - o: 12 - }, - scroll: { - a: "Scroll", - b: "1F4DC", - d: true, - e: true, - f: true, - h: true, - j: [ - "documents", - "ancient", - "history", - "paper" - ], - k: [ - 26, - 50 - ], - o: 2 - }, - blossom: { - a: "Blossom", - b: "1F33C", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "flowers", - "yellow" - ], - k: [ - 6, - 20 - ], - o: 2 - }, - "flag-id": { - a: "Indonesia Flag", - b: "1F1EE-1F1E9", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 23 - ], - o: 2 - }, - speak_no_evil: { - a: "Speak-No-Evil Monkey", - b: "1F64A", - d: true, - e: true, - f: true, - h: true, - j: [ - "monkey", - "animal", - "nature", - "omg" - ], - k: [ - 32, - 46 - ], - o: 2 - }, - heavy_minus_sign: { - a: "Heavy Minus Sign", - b: "2796", - d: true, - e: true, - f: true, - h: true, - j: [ - "math", - "calculation", - "subtract", - "less" - ], - k: [ - 55, - 30 - ], - o: 2 - }, - "flag-ie": { - a: "Ireland Flag", - b: "1F1EE-1F1EA", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 24 - ], - o: 2 - }, - ice_cube: { - a: "Ice Cube", - b: "1F9CA", - d: true, - e: true, - f: true, - h: true, - k: [ - 44, - 18 - ], - o: 12 - }, - page_facing_up: { - a: "Page Facing Up", - b: "1F4C4", - d: true, - e: true, - f: true, - h: true, - j: [ - "documents", - "office", - "paper", - "information" - ], - k: [ - 26, - 26 - ], - o: 2 - }, - "male-judge": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-2696-FE0F", - non_qualified: "1F468-1F3FB-200D-2696", - image: "1f468-1f3fb-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 9, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-2696-FE0F", - non_qualified: "1F468-1F3FC-200D-2696", - image: "1f468-1f3fc-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 10, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-2696-FE0F", - non_qualified: "1F468-1F3FD-200D-2696", - image: "1f468-1f3fd-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 11, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-2696-FE0F", - non_qualified: "1F468-1F3FE-200D-2696", - image: "1f468-1f3fe-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 12, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-2696-FE0F", - non_qualified: "1F468-1F3FF-200D-2696", - image: "1f468-1f3ff-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 13, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Male Judge", - b: "1F468-200D-2696-FE0F", - c: "1F468-200D-2696", - d: true, - e: true, - f: true, - h: true, - k: [ - 17, - 8 - ], - o: 4 - }, - tulip: { - a: "Tulip", - b: "1F337", - d: true, - e: true, - f: true, - h: true, - j: [ - "flowers", - "plant", - "nature", - "summer", - "spring" - ], - k: [ - 6, - 15 - ], - o: 2 + version: 1 }, ferry: { - a: "Ferry", - b: "26F4-FE0F", - c: "26F4", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "ferry", + name: "Ferry", + keywords: [ "boat", "ship", "yacht" ], - k: [ - 54, - 15 - ], - o: 2 - }, - kiss: { - a: "Kiss Mark", - b: "1F48B", - d: true, - e: true, - f: true, - h: true, - j: [ - "face", - "lips", - "love", - "like", - "affection", - "valentines" - ], - k: [ - 25, - 21 - ], - o: 2 - }, - heavy_division_sign: { - a: "Heavy Division Sign", - b: "2797", - d: true, - e: true, - f: true, - h: true, - j: [ - "divide", - "math", - "calculation" - ], - k: [ - 55, - 31 - ], - o: 2 - }, - newspaper: { - a: "Newspaper", - b: "1F4F0", - d: true, - e: true, - f: true, - h: true, - j: [ - "press", - "headline" - ], - k: [ - 27, - 13 - ], - o: 2 - }, - "female-judge": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-2696-FE0F", - non_qualified: "1F469-1F3FB-200D-2696", - image: "1f469-1f3fb-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-2696-FE0F", - non_qualified: "1F469-1F3FC-200D-2696", - image: "1f469-1f3fc-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-2696-FE0F", - non_qualified: "1F469-1F3FD-200D-2696", - image: "1f469-1f3fd-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 53, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-2696-FE0F", - non_qualified: "1F469-1F3FE-200D-2696", - image: "1f469-1f3fe-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-2696-FE0F", - non_qualified: "1F469-1F3FF-200D-2696", - image: "1f469-1f3ff-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "26f4-fe0f", + native: "⛴️", + x: 58, + y: 30 } - }, - a: "Female Judge", - b: "1F469-200D-2696-FE0F", - c: "1F469-200D-2696", - d: true, - e: true, - f: true, - h: true, - k: [ - 19, - 50 ], - o: 4 - }, - seedling: { - a: "Seedling", - b: "1F331", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "nature", - "grass", - "lawn", - "spring" - ], - k: [ - 6, - 9 - ], - o: 2 - }, - love_letter: { - a: "Love Letter", - b: "1F48C", - d: true, - e: true, - f: true, - h: true, - j: [ - "email", - "like", - "affection", - "envelope", - "valentines" - ], - k: [ - 25, - 22 - ], - o: 2 - }, - chopsticks: { - a: "Chopsticks", - b: "1F962", - d: true, - e: true, - f: true, - h: true, - k: [ - 41, - 49 - ], - o: 5 + version: 1 }, motor_boat: { - a: "Motor Boat", - b: "1F6E5-FE0F", - c: "1F6E5", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "motor_boat", + name: "Motor Boat", + keywords: [ "ship" ], - k: [ - 36, - 47 + skins: [ + { + unified: "1f6e5-fe0f", + native: "🛥️", + x: 38, + y: 18 + } ], - o: 2 - }, - "flag-il": { - a: "Israel Flag", - b: "1F1EE-1F1F1", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 25 - ], - o: 2 - }, - curly_loop: { - a: "Curly Loop", - b: "27B0", - d: true, - e: true, - f: true, - h: true, - j: [ - "scribble", - "draw", - "shape", - "squiggle" - ], - k: [ - 55, - 33 - ], - o: 2 - }, - "flag-im": { - a: "Isle of Man Flag", - b: "1F1EE-1F1F2", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 26 - ], - o: 2 - }, - evergreen_tree: { - a: "Evergreen Tree", - b: "1F332", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "nature" - ], - k: [ - 6, - 10 - ], - o: 2 - }, - cupid: { - a: "Heart with Arrow", - b: "1F498", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "like", - "heart", - "affection", - "valentines" - ], - k: [ - 25, - 34 - ], - o: 2 - }, - loop: { - a: "Double Curly Loop", - b: "27BF", - d: true, - e: true, - f: true, - h: true, - j: [ - "tape", - "cassette" - ], - k: [ - 55, - 34 - ], - o: 2 + version: 1 }, ship: { - a: "Ship", - b: "1F6A2", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "ship", + name: "Ship", + keywords: [ "transportation", "titanic", "deploy" ], - k: [ - 34, - 33 - ], - o: 2 - }, - farmer: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-1F33E", - non_qualified: null, - image: "1f9d1-1f3fb-200d-1f33e.png", - sheet_x: 45, - sheet_y: 18, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-1F33E", - non_qualified: null, - image: "1f9d1-1f3fc-200d-1f33e.png", - sheet_x: 45, - sheet_y: 19, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-1F33E", - non_qualified: null, - image: "1f9d1-1f3fd-200d-1f33e.png", - sheet_x: 45, - sheet_y: 20, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-1F33E", - non_qualified: null, - image: "1f9d1-1f3fe-200d-1f33e.png", - sheet_x: 45, - sheet_y: 21, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-1F33E", - non_qualified: null, - image: "1f9d1-1f3ff-200d-1f33e.png", - sheet_x: 45, - sheet_y: 22, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false + skins: [ + { + unified: "1f6a2", + native: "🚢", + x: 36, + y: 6 } - }, - a: "Farmer", - b: "1F9D1-200D-1F33E", - d: true, - e: false, - f: false, - h: false, - k: [ - 45, - 17 ], - o: 12 - }, - rolled_up_newspaper: { - a: "Rolled Up Newspaper", - b: "1F5DE-FE0F", - c: "1F5DE", - d: true, - e: true, - f: true, - h: true, - k: [ - 30, - 23 - ], - o: 2 - }, - knife_fork_plate: { - a: "Knife Fork Plate", - b: "1F37D-FE0F", - c: "1F37D", - d: true, - e: true, - f: true, - h: true, - k: [ - 7, - 28 - ], - o: 2 - }, - fork_and_knife: { - a: "Fork and Knife", - b: "1F374", - d: true, - e: true, - f: true, - h: true, - j: [ - "cutlery", - "kitchen" - ], - k: [ - 7, - 19 - ], - o: 2 - }, - "male-farmer": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fb-200d-1f33e.png", - sheet_x: 14, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fc-200d-1f33e.png", - sheet_x: 14, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fd-200d-1f33e.png", - sheet_x: 14, - sheet_y: 41, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fe-200d-1f33e.png", - sheet_x: 14, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F33E", - non_qualified: null, - image: "1f468-1f3ff-200d-1f33e.png", - sheet_x: 14, - sheet_y: 43, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Male Farmer", - b: "1F468-200D-1F33E", - d: true, - e: true, - f: true, - h: true, - k: [ - 14, - 38 - ], - o: 4 - }, - bookmark_tabs: { - a: "Bookmark Tabs", - b: "1F4D1", - d: true, - e: true, - f: true, - h: true, - j: [ - "favorite", - "save", - "order", - "tidy" - ], - k: [ - 26, - 39 - ], - o: 2 - }, - part_alternation_mark: { - a: "Part Alternation Mark", - b: "303D-FE0F", - c: "303D", - d: true, - e: true, - f: true, - h: true, - j: [ - "graph", - "presentation", - "stats", - "business", - "economics", - "bad" - ], - k: [ - 55, - 45 - ], - o: 2 - }, - "flag-in": { - a: "India Flag", - b: "1F1EE-1F1F3", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 27 - ], - o: 2 - }, - gift_heart: { - a: "Heart with Ribbon", - b: "1F49D", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "valentines" - ], - k: [ - 25, - 39 - ], - o: 2 + version: 1 }, airplane: { - a: "Airplane", - b: "2708-FE0F", - c: "2708", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "airplane", + name: "Airplane", + keywords: [ "vehicle", "transportation", "flight", "fly" ], - k: [ - 54, - 41 - ], - o: 2 - }, - deciduous_tree: { - a: "Deciduous Tree", - b: "1F333", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "nature" - ], - k: [ - 6, - 11 - ], - o: 2 - }, - spoon: { - a: "Spoon", - b: "1F944", - d: true, - e: true, - f: true, - h: true, - j: [ - "cutlery", - "kitchen", - "tableware" - ], - k: [ - 41, - 20 - ], - o: 4 - }, - "flag-io": { - a: "British Indian Ocean Territory Flag", - b: "1F1EE-1F1F4", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 28 - ], - o: 2 - }, - palm_tree: { - a: "Palm Tree", - b: "1F334", - d: true, - e: true, - f: true, - h: true, - j: [ - "plant", - "vegetable", - "nature", - "summer", - "beach", - "mojito", - "tropical" - ], - k: [ - 6, - 12 - ], - o: 2 - }, - sparkling_heart: { - a: "Sparkling Heart", - b: "1F496", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "like", - "affection", - "valentines" - ], - k: [ - 25, - 32 - ], - o: 2 - }, - "female-farmer": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fb-200d-1f33e.png", - sheet_x: 17, - sheet_y: 29, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fc-200d-1f33e.png", - sheet_x: 17, - sheet_y: 30, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fd-200d-1f33e.png", - sheet_x: 17, - sheet_y: 31, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fe-200d-1f33e.png", - sheet_x: 17, - sheet_y: 32, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F33E", - non_qualified: null, - image: "1f469-1f3ff-200d-1f33e.png", - sheet_x: 17, - sheet_y: 33, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "2708-fe0f", + native: "✈️", + x: 58, + y: 56 } - }, - a: "Female Farmer", - b: "1F469-200D-1F33E", - d: true, - e: true, - f: true, - h: true, - k: [ - 17, - 28 ], - o: 4 - }, - eight_spoked_asterisk: { - a: "Eight Spoked Asterisk", - b: "2733-FE0F", - c: "2733", - d: true, - e: true, - f: true, - h: true, - j: [ - "star", - "sparkle", - "green-square" - ], - k: [ - 55, - 17 - ], - o: 2 + version: 1 }, small_airplane: { - a: "Small Airplane", - b: "1F6E9-FE0F", - c: "1F6E9", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "small_airplane", + name: "Small Airplane", + keywords: [ "flight", "transportation", "fly", "vehicle" ], - k: [ - 36, - 48 - ], - o: 2 - }, - bookmark: { - a: "Bookmark", - b: "1F516", - d: true, - e: true, - f: true, - h: true, - j: [ - "favorite", - "label", - "save" - ], - k: [ - 27, - 50 - ], - o: 2 - }, - cook: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-1F373", - non_qualified: null, - image: "1f9d1-1f3fb-200d-1f373.png", - sheet_x: 45, - sheet_y: 24, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-1F373", - non_qualified: null, - image: "1f9d1-1f3fc-200d-1f373.png", - sheet_x: 45, - sheet_y: 25, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-1F373", - non_qualified: null, - image: "1f9d1-1f3fd-200d-1f373.png", - sheet_x: 45, - sheet_y: 26, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-1F373", - non_qualified: null, - image: "1f9d1-1f3fe-200d-1f373.png", - sheet_x: 45, - sheet_y: 27, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-1F373", - non_qualified: null, - image: "1f9d1-1f3ff-200d-1f373.png", - sheet_x: 45, - sheet_y: 28, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false + skins: [ + { + unified: "1f6e9-fe0f", + native: "🛩️", + x: 38, + y: 19 } - }, - a: "Cook", - b: "1F9D1-200D-1F373", - d: true, - e: false, - f: false, - h: false, - k: [ - 45, - 23 ], - o: 12 - }, - eight_pointed_black_star: { - a: "Eight Pointed Black Star", - b: "2734-FE0F", - c: "2734", - d: true, - e: true, - f: true, - h: true, - j: [ - "orange-square", - "shape", - "polygon" - ], - k: [ - 55, - 18 - ], - o: 2 - }, - heartpulse: { - a: "Growing Heart", - b: "1F497", - d: true, - e: true, - f: true, - h: true, - j: [ - "like", - "love", - "affection", - "valentines", - "pink" - ], - k: [ - 25, - 33 - ], - o: 2 - }, - label: { - a: "Label", - b: "1F3F7-FE0F", - c: "1F3F7", - d: true, - e: true, - f: true, - h: true, - j: [ - "sale", - "tag" - ], - k: [ - 11, - 19 - ], - o: 2 - }, - "flag-iq": { - a: "Iraq Flag", - b: "1F1EE-1F1F6", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 29 - ], - o: 2 - }, - hocho: { - a: "Hocho", - b: "1F52A", - d: true, - e: true, - f: true, - h: true, - j: [ - "knife", - "blade", - "cutlery", - "kitchen", - "weapon" - ], - k: [ - 28, - 13 - ], - n: [ - "knife" - ], - o: 2 - }, - cactus: { - a: "Cactus", - b: "1F335", - d: true, - e: true, - f: true, - h: true, - j: [ - "vegetable", - "plant", - "nature" - ], - k: [ - 6, - 13 - ], - o: 2 + version: 1 }, airplane_departure: { - a: "Airplane Departure", - b: "1F6EB", - d: true, - e: true, - f: true, - h: true, - k: [ - 36, - 49 + id: "airplane_departure", + name: "Airplane Departure", + keywords: [ + "airport", + "flight", + "landing" ], - o: 2 + skins: [ + { + unified: "1f6eb", + native: "🛫", + x: 38, + y: 20 + } + ], + version: 1 }, airplane_arriving: { - a: "Airplane Arriving", - b: "1F6EC", - d: true, - e: true, - f: true, - h: true, - k: [ - 36, - 50 + id: "airplane_arriving", + name: "Airplane Arrival", + keywords: [ + "arriving", + "airport", + "flight", + "boarding" ], - o: 2 - }, - ear_of_rice: { - a: "Ear of Rice", - b: "1F33E", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "plant" - ], - k: [ - 6, - 22 - ], - o: 2 - }, - "flag-ir": { - a: "Iran Flag", - b: "1F1EE-1F1F7", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 30 - ], - o: 2 - }, - moneybag: { - a: "Money Bag", - b: "1F4B0", - d: true, - e: true, - f: true, - h: true, - j: [ - "dollar", - "payment", - "coins", - "sale" - ], - k: [ - 26, - 6 - ], - o: 2 - }, - "male-cook": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F373", - non_qualified: null, - image: "1f468-1f3fb-200d-1f373.png", - sheet_x: 14, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F373", - non_qualified: null, - image: "1f468-1f3fc-200d-1f373.png", - sheet_x: 14, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F373", - non_qualified: null, - image: "1f468-1f3fd-200d-1f373.png", - sheet_x: 14, - sheet_y: 47, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F373", - non_qualified: null, - image: "1f468-1f3fe-200d-1f373.png", - sheet_x: 14, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F373", - non_qualified: null, - image: "1f468-1f3ff-200d-1f373.png", - sheet_x: 14, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f6ec", + native: "🛬", + x: 38, + y: 21 } - }, - a: "Male Cook", - b: "1F468-200D-1F373", - d: true, - e: true, - f: true, - h: true, - k: [ - 14, - 44 ], - o: 4 - }, - heartbeat: { - a: "Beating Heart", - b: "1F493", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "like", - "affection", - "valentines", - "pink", - "heart" - ], - k: [ - 25, - 29 - ], - o: 2 - }, - sparkle: { - a: "Sparkle", - b: "2747-FE0F", - c: "2747", - d: true, - e: true, - f: true, - h: true, - j: [ - "stars", - "green-square", - "awesome", - "good", - "fireworks" - ], - k: [ - 55, - 20 - ], - o: 2 - }, - amphora: { - a: "Amphora", - b: "1F3FA", - d: true, - e: true, - f: true, - h: true, - j: [ - "vase", - "jar" - ], - k: [ - 11, - 22 - ], - o: 2 - }, - yen: { - a: "Banknote with Yen Sign", - b: "1F4B4", - d: true, - e: true, - f: true, - h: true, - j: [ - "money", - "sales", - "japanese", - "dollar", - "currency" - ], - k: [ - 26, - 10 - ], - o: 2 - }, - revolving_hearts: { - a: "Revolving Hearts", - b: "1F49E", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "like", - "affection", - "valentines" - ], - k: [ - 25, - 40 - ], - o: 2 - }, - bangbang: { - a: "Double Exclamation Mark", - b: "203C-FE0F", - c: "203C", - d: true, - e: true, - f: true, - h: true, - j: [ - "exclamation", - "surprise" - ], - k: [ - 52, - 10 - ], - o: 2 + version: 1 }, parachute: { - a: "Parachute", - b: "1FA82", - d: true, - e: true, - f: true, - h: true, - k: [ - 52, - 3 + id: "parachute", + name: "Parachute", + keywords: [ + "fly", + "glide" ], - o: 12 - }, - herb: { - a: "Herb", - b: "1F33F", - d: true, - e: true, - f: true, - h: true, - j: [ - "vegetable", - "plant", - "medicine", - "weed", - "grass", - "lawn" - ], - k: [ - 6, - 23 - ], - o: 2 - }, - "flag-is": { - a: "Iceland Flag", - b: "1F1EE-1F1F8", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 31 - ], - o: 2 - }, - "female-cook": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F373", - non_qualified: null, - image: "1f469-1f3fb-200d-1f373.png", - sheet_x: 17, - sheet_y: 35, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F373", - non_qualified: null, - image: "1f469-1f3fc-200d-1f373.png", - sheet_x: 17, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F373", - non_qualified: null, - image: "1f469-1f3fd-200d-1f373.png", - sheet_x: 17, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F373", - non_qualified: null, - image: "1f469-1f3fe-200d-1f373.png", - sheet_x: 17, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F373", - non_qualified: null, - image: "1f469-1f3ff-200d-1f373.png", - sheet_x: 17, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1fa82", + native: "🪂", + x: 54, + y: 2 } - }, - a: "Female Cook", - b: "1F469-200D-1F373", - d: true, - e: true, - f: true, - h: true, - k: [ - 17, - 34 ], - o: 4 - }, - mechanic: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-1F527", - non_qualified: null, - image: "1f9d1-1f3fb-200d-1f527.png", - sheet_x: 46, - sheet_y: 15, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-1F527", - non_qualified: null, - image: "1f9d1-1f3fc-200d-1f527.png", - sheet_x: 46, - sheet_y: 16, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-1F527", - non_qualified: null, - image: "1f9d1-1f3fd-200d-1f527.png", - sheet_x: 46, - sheet_y: 17, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-1F527", - non_qualified: null, - image: "1f9d1-1f3fe-200d-1f527.png", - sheet_x: 46, - sheet_y: 18, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-1F527", - non_qualified: null, - image: "1f9d1-1f3ff-200d-1f527.png", - sheet_x: 46, - sheet_y: 19, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - } - }, - a: "Mechanic", - b: "1F9D1-200D-1F527", - d: true, - e: false, - f: false, - h: false, - k: [ - 46, - 14 - ], - o: 12 - }, - interrobang: { - a: "Exclamation Question Mark", - b: "2049-FE0F", - c: "2049", - d: true, - e: true, - f: true, - h: true, - j: [ - "wat", - "punctuation", - "surprise" - ], - k: [ - 52, - 11 - ], - o: 2 + version: 12 }, seat: { - a: "Seat", - b: "1F4BA", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "seat", + name: "Seat", + keywords: [ "sit", "airplane", "transport", @@ -36740,1714 +38130,186 @@ var emojis$1 = { "flight", "fly" ], - k: [ - 26, - 16 + skins: [ + { + unified: "1f4ba", + native: "💺", + x: 28, + y: 18 + } ], - o: 2 - }, - dollar: { - a: "Banknote with Dollar Sign", - b: "1F4B5", - d: true, - e: true, - f: true, - h: true, - j: [ - "money", - "sales", - "bill", - "currency" - ], - k: [ - 26, - 11 - ], - o: 2 - }, - two_hearts: { - a: "Two Hearts", - b: "1F495", - d: true, - e: true, - f: true, - h: true, - j: [ - "love", - "like", - "affection", - "valentines", - "heart" - ], - k: [ - 25, - 31 - ], - o: 2 - }, - it: { - a: "Italy Flag", - b: "1F1EE-1F1F9", - d: true, - e: true, - f: true, - h: true, - j: [ - "italy", - "flag", - "nation", - "country", - "banner" - ], - k: [ - 2, - 32 - ], - n: [ - "flag-it" - ], - o: 2 - }, - shamrock: { - a: "Shamrock", - b: "2618-FE0F", - c: "2618", - d: true, - e: true, - f: true, - h: true, - j: [ - "vegetable", - "plant", - "nature", - "irish", - "clover" - ], - k: [ - 53, - 1 - ], - o: 2 - }, - four_leaf_clover: { - a: "Four Leaf Clover", - b: "1F340", - d: true, - e: true, - f: true, - h: true, - j: [ - "vegetable", - "plant", - "nature", - "lucky", - "irish" - ], - k: [ - 6, - 24 - ], - o: 2 - }, - euro: { - a: "Banknote with Euro Sign", - b: "1F4B6", - d: true, - e: true, - f: true, - h: true, - j: [ - "money", - "sales", - "dollar", - "currency" - ], - k: [ - 26, - 12 - ], - o: 2 - }, - question: { - a: "Black Question Mark Ornament", - b: "2753", - d: true, - e: true, - f: true, - h: true, - j: [ - "doubt", - "confused" - ], - k: [ - 55, - 23 - ], - o: 2 + version: 1 }, helicopter: { - a: "Helicopter", - b: "1F681", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "helicopter", + name: "Helicopter", + keywords: [ "transportation", "vehicle", "fly" ], - k: [ - 34, - 0 - ], - o: 2 - }, - heart_decoration: { - a: "Heart Decoration", - b: "1F49F", - d: true, - e: true, - f: true, - h: true, - j: [ - "purple-square", - "love", - "like" - ], - k: [ - 25, - 41 - ], - o: 2 - }, - "flag-je": { - a: "Jersey Flag", - b: "1F1EF-1F1EA", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 33 - ], - o: 2 - }, - "male-mechanic": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F527", - non_qualified: null, - image: "1f468-1f3fb-200d-1f527.png", - sheet_x: 15, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F527", - non_qualified: null, - image: "1f468-1f3fc-200d-1f527.png", - sheet_x: 15, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F527", - non_qualified: null, - image: "1f468-1f3fd-200d-1f527.png", - sheet_x: 15, - sheet_y: 53, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F527", - non_qualified: null, - image: "1f468-1f3fe-200d-1f527.png", - sheet_x: 15, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F527", - non_qualified: null, - image: "1f468-1f3ff-200d-1f527.png", - sheet_x: 15, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f681", + native: "🚁", + x: 35, + y: 34 } - }, - a: "Male Mechanic", - b: "1F468-200D-1F527", - d: true, - e: true, - f: true, - h: true, - k: [ - 15, - 50 ], - o: 4 + version: 1 }, suspension_railway: { - a: "Suspension Railway", - b: "1F69F", - d: true, - e: true, - f: true, - h: true, - j: [ + id: "suspension_railway", + name: "Suspension Railway", + keywords: [ "vehicle", "transportation" ], - k: [ - 34, - 30 - ], - o: 2 - }, - heavy_heart_exclamation_mark_ornament: { - a: "Heavy Heart Exclamation Mark Ornament", - b: "2763-FE0F", - c: "2763", - d: true, - e: true, - f: true, - h: true, - k: [ - 55, - 27 - ], - o: 2 - }, - "female-mechanic": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F527", - non_qualified: null, - image: "1f469-1f3fb-200d-1f527.png", - sheet_x: 18, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F527", - non_qualified: null, - image: "1f469-1f3fc-200d-1f527.png", - sheet_x: 18, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F527", - non_qualified: null, - image: "1f469-1f3fd-200d-1f527.png", - sheet_x: 18, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F527", - non_qualified: null, - image: "1f469-1f3fe-200d-1f527.png", - sheet_x: 18, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F527", - non_qualified: null, - image: "1f469-1f3ff-200d-1f527.png", - sheet_x: 18, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f69f", + native: "🚟", + x: 36, + y: 3 } - }, - a: "Female Mechanic", - b: "1F469-200D-1F527", - d: true, - e: true, - f: true, - h: true, - k: [ - 18, - 35 ], - o: 4 - }, - "flag-jm": { - a: "Jamaica Flag", - b: "1F1EF-1F1F2", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 34 - ], - o: 2 - }, - grey_question: { - a: "White Question Mark Ornament", - b: "2754", - d: true, - e: true, - f: true, - h: true, - j: [ - "doubts", - "gray", - "huh", - "confused" - ], - k: [ - 55, - 24 - ], - o: 2 - }, - maple_leaf: { - a: "Maple Leaf", - b: "1F341", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "plant", - "vegetable", - "ca", - "fall" - ], - k: [ - 6, - 25 - ], - o: 2 - }, - pound: { - a: "Banknote with Pound Sign", - b: "1F4B7", - d: true, - e: true, - f: true, - h: true, - j: [ - "british", - "sterling", - "money", - "sales", - "bills", - "uk", - "england", - "currency" - ], - k: [ - 26, - 13 - ], - o: 2 - }, - money_with_wings: { - a: "Money with Wings", - b: "1F4B8", - d: true, - e: true, - f: true, - h: true, - j: [ - "dollar", - "bills", - "payment", - "sale" - ], - k: [ - 26, - 14 - ], - o: 2 - }, - "flag-jo": { - a: "Jordan Flag", - b: "1F1EF-1F1F4", - d: true, - e: true, - f: true, - h: true, - k: [ - 2, - 35 - ], - o: 2 - }, - fallen_leaf: { - a: "Fallen Leaf", - b: "1F342", - d: true, - e: true, - f: true, - h: true, - j: [ - "nature", - "plant", - "vegetable", - "leaves" - ], - k: [ - 6, - 26 - ], - o: 2 - }, - factory_worker: { - skin_variations: { - "1F3FB": { - unified: "1F9D1-1F3FB-200D-1F3ED", - non_qualified: null, - image: "1f9d1-1f3fb-200d-1f3ed.png", - sheet_x: 45, - sheet_y: 54, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F9D1-1F3FC-200D-1F3ED", - non_qualified: null, - image: "1f9d1-1f3fc-200d-1f3ed.png", - sheet_x: 45, - sheet_y: 55, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F9D1-1F3FD-200D-1F3ED", - non_qualified: null, - image: "1f9d1-1f3fd-200d-1f3ed.png", - sheet_x: 45, - sheet_y: 56, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F9D1-1F3FE-200D-1F3ED", - non_qualified: null, - image: "1f9d1-1f3fe-200d-1f3ed.png", - sheet_x: 46, - sheet_y: 0, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F9D1-1F3FF-200D-1F3ED", - non_qualified: null, - image: "1f9d1-1f3ff-200d-1f3ed.png", - sheet_x: 46, - sheet_y: 1, - added_in: "12.1", - has_img_apple: true, - has_img_google: false, - has_img_twitter: false, - has_img_facebook: false - } - }, - a: "Factory Worker", - b: "1F9D1-200D-1F3ED", - d: true, - e: false, - f: false, - h: false, - k: [ - 45, - 53 - ], - o: 12 - }, - broken_heart: { - a: "Broken Heart", - b: "1F494", - d: true, - e: true, - f: true, - h: true, - j: [ - "sad", - "sorry", - "break", - "heart", - "heartbreak" - ], - k: [ - 25, - 30 - ], - l: [ - " 0x10ffff || // not a valid Unicode code point - Math.floor(codePoint) != codePoint // not an integer - ) { - throw RangeError('Invalid code point: ' + codePoint); - } - - if (codePoint <= 0xffff) { - // BMP code point - codeUnits.push(codePoint); - } else { - // Astral code point; split in surrogate halves - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint -= 0x10000; - highSurrogate = (codePoint >> 10) + 0xd800; - lowSurrogate = codePoint % 0x400 + 0xdc00; - codeUnits.push(highSurrogate, lowSurrogate); - } - - if (index + 1 === length || codeUnits.length > MAX_SIZE) { - result += String.fromCharCode.apply(null, codeUnits); - codeUnits.length = 0; - } - } - - return result; -}; - -exports["default"] = _default; -}); - -var deepMerge_1 = deepMerge; -var getData_1 = getData; -var getEmojiDataFromNative_1 = getEmojiDataFromNative; -var getSanitizedData_1 = getSanitizedData; -var intersect_1 = intersect; -var measureScrollbar_1 = measureScrollbar; -var throttleIdleTask_1 = throttleIdleTask; -var unifiedToNative_1 = unifiedToNative; -var uniq_1 = uniq; - -var _typeof2 = interopRequireDefault(_typeof_1); - - - -var _stringFromCodePoint = interopRequireDefault(stringFromCodePoint); - -var COLONS_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/; -var SKINS = ['1F3FA', '1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF']; - -function unifiedToNative(unified) { - var unicodes = unified.split('-'), - codePoints = unicodes.map(function (u) { - return "0x".concat(u); - }); - return _stringFromCodePoint["default"].apply(null, codePoints); -} - -function sanitize(emoji) { - var name = emoji.name, - short_names = emoji.short_names, - skin_tone = emoji.skin_tone, - skin_variations = emoji.skin_variations, - emoticons = emoji.emoticons, - unified = emoji.unified, - custom = emoji.custom, - customCategory = emoji.customCategory, - imageUrl = emoji.imageUrl, - id = emoji.id || short_names[0], - colons = ":".concat(id, ":"); - - if (custom) { - return { - id: id, - name: name, - short_names: short_names, - colons: colons, - emoticons: emoticons, - custom: custom, - customCategory: customCategory, - imageUrl: imageUrl - }; - } - - if (skin_tone) { - colons += ":skin-tone-".concat(skin_tone, ":"); - } - - return { - id: id, - name: name, - short_names: short_names, - colons: colons, - emoticons: emoticons, - unified: unified.toLowerCase(), - skin: skin_tone || (skin_variations ? 1 : null), - "native": unifiedToNative(unified) - }; -} - -function getSanitizedData() { - return sanitize(getData.apply(void 0, arguments)); -} - -function getData(emoji, skin, set, data$1) { - var emojiData = {}; - - if (typeof emoji == 'string') { - var matches = emoji.match(COLONS_REGEX); - - if (matches) { - emoji = matches[1]; - - if (matches[2]) { - skin = parseInt(matches[2], 10); - } - } - - if (data$1.aliases.hasOwnProperty(emoji)) { - emoji = data$1.aliases[emoji]; - } - - if (data$1.emojis.hasOwnProperty(emoji)) { - emojiData = data$1.emojis[emoji]; - } else { - return null; - } - } else if (emoji.id) { - if (data$1.aliases.hasOwnProperty(emoji.id)) { - emoji.id = data$1.aliases[emoji.id]; - } - - if (data$1.emojis.hasOwnProperty(emoji.id)) { - emojiData = data$1.emojis[emoji.id]; - skin || (skin = emoji.skin); - } - } - - if (!Object.keys(emojiData).length) { - emojiData = emoji; - emojiData.custom = true; - - if (!emojiData.search) { - emojiData.search = (0, data.buildSearch)(emoji); - } - } - - emojiData.emoticons || (emojiData.emoticons = []); - emojiData.variations || (emojiData.variations = []); - - if (emojiData.skin_variations && skin > 1) { - emojiData = JSON.parse(JSON.stringify(emojiData)); - var skinKey = SKINS[skin - 1], - variationData = emojiData.skin_variations[skinKey]; - - if (variationData) { - if (!variationData.variations && emojiData.variations) { - delete emojiData.variations; - } - - if (set && (variationData["has_img_".concat(set)] == undefined || variationData["has_img_".concat(set)]) || !set) { - emojiData.skin_tone = skin; - - for (var k in variationData) { - var v = variationData[k]; - emojiData[k] = v; - } - } - } - } - - if (emojiData.variations && emojiData.variations.length) { - emojiData = JSON.parse(JSON.stringify(emojiData)); - emojiData.unified = emojiData.variations.shift(); - } - - return emojiData; -} - -function getEmojiDataFromNative(nativeString, set, data$1) { - if (data$1.compressed) { - (0, data.uncompress)(data$1); - } - - var skinTones = ['🏻', '🏼', '🏽', '🏾', '🏿']; - var skinCodes = ['1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF']; - var skin; - var skinCode; - var baseNativeString = nativeString; - skinTones.forEach(function (skinTone, skinToneIndex) { - if (nativeString.indexOf(skinTone) > 0) { - skin = skinToneIndex + 2; - skinCode = skinCodes[skinToneIndex]; - } - }); - var emojiData; - - for (var id in data$1.emojis) { - var emoji = data$1.emojis[id]; - var emojiUnified = emoji.unified; - - if (emoji.variations && emoji.variations.length) { - emojiUnified = emoji.variations.shift(); - } - - if (skin && emoji.skin_variations && emoji.skin_variations[skinCode]) { - emojiUnified = emoji.skin_variations[skinCode].unified; - } - - if (unifiedToNative(emojiUnified) === baseNativeString) emojiData = emoji; - } - - if (!emojiData) { - return null; - } - - emojiData.id = emojiData.short_names[0]; - return getSanitizedData(emojiData, skin, set, data$1); -} - -function uniq(arr) { - return arr.reduce(function (acc, item) { - if (acc.indexOf(item) === -1) { - acc.push(item); - } - - return acc; - }, []); -} - -function intersect(a, b) { - var uniqA = uniq(a); - var uniqB = uniq(b); - return uniqA.filter(function (item) { - return uniqB.indexOf(item) >= 0; - }); -} - -function deepMerge(a, b) { - var o = {}; - - for (var key in a) { - var originalValue = a[key], - value = originalValue; - - if (b.hasOwnProperty(key)) { - value = b[key]; - } - - if ((0, _typeof2["default"])(value) === 'object') { - value = deepMerge(originalValue, value); - } - - o[key] = value; - } - - return o; -} // https://github.com/sonicdoe/measure-scrollbar - - -function measureScrollbar() { - if (typeof document == 'undefined') return 0; - var div = document.createElement('div'); - div.style.width = '100px'; - div.style.height = '100px'; - div.style.overflow = 'scroll'; - div.style.position = 'absolute'; - div.style.top = '-9999px'; - document.body.appendChild(div); - var scrollbarWidth = div.offsetWidth - div.clientWidth; - document.body.removeChild(div); - return scrollbarWidth; -} // Use requestIdleCallback() if available, else fall back to setTimeout(). -// Throttle so as not to run too frequently. - - -function throttleIdleTask(func) { - var doIdleTask = typeof requestIdleCallback === 'function' ? requestIdleCallback : setTimeout; - var running = false; - return function throttled() { - if (running) { - return; - } - - running = true; - doIdleTask(function () { - running = false; - func(); - }); - }; -} - -var utils = /*#__PURE__*/Object.defineProperty({ - deepMerge: deepMerge_1, - getData: getData_1, - getEmojiDataFromNative: getEmojiDataFromNative_1, - getSanitizedData: getSanitizedData_1, - intersect: intersect_1, - measureScrollbar: measureScrollbar_1, - throttleIdleTask: throttleIdleTask_1, - unifiedToNative: unifiedToNative_1, - uniq: uniq_1 -}, '__esModule', {value: true}); - -var store = createCommonjsModule(function (module, exports) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var NAMESPACE = 'emoji-mart'; -var isLocalStorageSupported = typeof window !== 'undefined' && 'localStorage' in window; -var getter; -var setter; - -function setHandlers(handlers) { - handlers || (handlers = {}); - getter = handlers.getter; - setter = handlers.setter; -} - -function setNamespace(namespace) { - NAMESPACE = namespace; -} - -function update(state) { - for (var key in state) { - var value = state[key]; - set(key, value); - } -} - -function set(key, value) { - if (setter) { - setter(key, value); - } else { - if (!isLocalStorageSupported) return; - - try { - window.localStorage["".concat(NAMESPACE, ".").concat(key)] = JSON.stringify(value); - } catch (e) {} - } -} - -function get(key) { - if (getter) { - return getter(key); - } else { - if (!isLocalStorageSupported) return; - - try { - var value = window.localStorage["".concat(NAMESPACE, ".").concat(key)]; - - if (value) { - return JSON.parse(value); - } - } catch (e) { - return; - } - } -} - -var _default = { - update: update, - set: set, - get: get, - setNamespace: setNamespace, - setHandlers: setHandlers -}; -exports["default"] = _default; -}); - -var nimbleEmojiIndex = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - - - - - -var _store = interopRequireDefault(store); - -var NimbleEmojiIndex = /*#__PURE__*/function () { - function NimbleEmojiIndex(data$1, set) { - (0, _classCallCheck2["default"])(this, NimbleEmojiIndex); - - if (data$1.compressed) { - (0, data.uncompress)(data$1); - } - - this.data = data$1 || {}; - this.set = set || null; - this.originalPool = {}; - this.index = {}; - this.emojis = {}; - this.emoticons = {}; - this.customEmojisList = []; - this.buildIndex(); - } - - (0, _createClass2["default"])(NimbleEmojiIndex, [{ - key: "buildIndex", - value: function buildIndex() { - var _this = this; - - var _loop = function _loop() { - var emojiData = _this.data.emojis[emoji], - short_names = emojiData.short_names, - emoticons = emojiData.emoticons, - skin_variations = emojiData.skin_variations, - id = short_names[0]; - - if (emoticons) { - emoticons.forEach(function (emoticon) { - if (_this.emoticons[emoticon]) { - return; - } - - _this.emoticons[emoticon] = id; - }); - } // If skin variations include them - - - if (skin_variations) { - _this.emojis[id] = {}; - - for (var skinTone = 1; skinTone <= 6; skinTone++) { - _this.emojis[id][skinTone] = (0, utils.getSanitizedData)({ - id: id, - skin: skinTone - }, skinTone, _this.set, _this.data); - } - } else { - _this.emojis[id] = (0, utils.getSanitizedData)(id, null, _this.set, _this.data); - } - - _this.originalPool[id] = emojiData; - }; - - for (var emoji in this.data.emojis) { - _loop(); - } - } - }, { - key: "clearCustomEmojis", - value: function clearCustomEmojis(pool) { - var _this2 = this; - - this.customEmojisList.forEach(function (emoji) { - var emojiId = emoji.id || emoji.short_names[0]; - delete pool[emojiId]; - delete _this2.emojis[emojiId]; - }); - } - }, { - key: "addCustomToPool", - value: function addCustomToPool(custom, pool) { - var _this3 = this; - - if (this.customEmojisList.length) this.clearCustomEmojis(pool); - custom.forEach(function (emoji) { - var emojiId = emoji.id || emoji.short_names[0]; - - if (emojiId && !pool[emojiId]) { - pool[emojiId] = (0, utils.getData)(emoji, null, null, _this3.data); - _this3.emojis[emojiId] = (0, utils.getSanitizedData)(emoji, null, null, _this3.data); - } - }); - this.customEmojisList = custom; - this.index = {}; - } - }, { - key: "search", - value: function search(value) { - var _this4 = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - emojisToShowFilter = _ref.emojisToShowFilter, - maxResults = _ref.maxResults, - include = _ref.include, - exclude = _ref.exclude, - _ref$custom = _ref.custom, - custom = _ref$custom === void 0 ? [] : _ref$custom; - - if (this.customEmojisList != custom) this.addCustomToPool(custom, this.originalPool); - var skinTone = _store["default"].get('skin') || 1; - maxResults || (maxResults = 75); - include || (include = []); - exclude || (exclude = []); - var results = null, - pool = this.originalPool; - - if (value.length) { - if (value == '-' || value == '-1') { - return [this.emojis['-1'][skinTone]]; - } - - var values = value.toLowerCase().split(/[\s|,|\-|_]+/), - allResults = []; - - if (values.length > 2) { - values = [values[0], values[1]]; - } - - if (include.length || exclude.length) { - pool = {}; - this.data.categories.forEach(function (category) { - var isIncluded = include && include.length ? include.indexOf(category.id) > -1 : true; - var isExcluded = exclude && exclude.length ? exclude.indexOf(category.id) > -1 : false; - - if (!isIncluded || isExcluded) { - return; - } - - category.emojis.forEach(function (emojiId) { - return pool[emojiId] = _this4.data.emojis[emojiId]; - }); - }); - - if (custom.length) { - var customIsIncluded = include && include.length ? include.indexOf('custom') > -1 : true; - var customIsExcluded = exclude && exclude.length ? exclude.indexOf('custom') > -1 : false; - - if (customIsIncluded && !customIsExcluded) { - this.addCustomToPool(custom, pool); - } - } - } - - allResults = values.map(function (value) { - var aPool = pool, - aIndex = _this4.index, - length = 0; - - var _loop2 = function _loop2() { - var _char = value[charIndex]; - length++; - aIndex[_char] || (aIndex[_char] = {}); - aIndex = aIndex[_char]; - - if (!aIndex.results) { - var scores = {}; - aIndex.results = []; - aIndex.pool = {}; - - for (var id in aPool) { - var emoji = aPool[id], - search = emoji.search, - sub = value.substr(0, length), - subIndex = search.indexOf(sub); - - if (subIndex != -1) { - var score = subIndex + 1; - if (sub == id) score = 0; - - if (_this4.emojis[id] && _this4.emojis[id][skinTone]) { - aIndex.results.push(_this4.emojis[id][skinTone]); - } else { - aIndex.results.push(_this4.emojis[id]); - } - - aIndex.pool[id] = emoji; - scores[id] = score; - } - } - - aIndex.results.sort(function (a, b) { - var aScore = scores[a.id], - bScore = scores[b.id]; - - if (aScore == bScore) { - return a.id.localeCompare(b.id); - } else { - return aScore - bScore; - } - }); - } - - aPool = aIndex.pool; - }; - - for (var charIndex = 0; charIndex < value.length; charIndex++) { - _loop2(); - } - - return aIndex.results; - }).filter(function (a) { - return a; - }); - - if (allResults.length > 1) { - results = utils.intersect.apply(null, allResults); - } else if (allResults.length) { - results = allResults[0]; - } else { - results = []; - } - } - - if (results) { - if (emojisToShowFilter) { - results = results.filter(function (result) { - return emojisToShowFilter(pool[result.id]); - }); - } - - if (results && results.length > maxResults) { - results = results.slice(0, maxResults); - } - } - - return results; - } - }]); - return NimbleEmojiIndex; -}(); - -exports["default"] = NimbleEmojiIndex; -}); - -var emojiIndex_1 = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _all = interopRequireDefault(require$$2); - -var _nimbleEmojiIndex = interopRequireDefault(nimbleEmojiIndex); - -var emojiIndex = new _nimbleEmojiIndex["default"](_all["default"]); -var emojis = emojiIndex.emojis, - emoticons = emojiIndex.emoticons; - -function search() { - return emojiIndex.search.apply(emojiIndex, arguments); -} - -var _default = { - search: search, - emojis: emojis, - emoticons: emoticons -}; -exports["default"] = _default; -}); - -var frequently_1 = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _store = interopRequireDefault(store); - -var DEFAULTS = ['+1', 'grinning', 'kissing_heart', 'heart_eyes', 'laughing', 'stuck_out_tongue_winking_eye', 'sweat_smile', 'joy', 'scream', 'disappointed', 'unamused', 'weary', 'sob', 'sunglasses', 'heart', 'poop']; -var frequently, initialized; -var defaults = {}; - -function init() { - initialized = true; - frequently = _store["default"].get('frequently'); -} - -function add(emoji) { - if (!initialized) init(); - var id = emoji.id; - frequently || (frequently = defaults); - frequently[id] || (frequently[id] = 0); - frequently[id] += 1; - - _store["default"].set('last', id); - - _store["default"].set('frequently', frequently); -} - -function get(perLine) { - if (!initialized) init(); - - if (!frequently) { - defaults = {}; - var result = []; - - for (var i = 0; i < perLine; i++) { - defaults[DEFAULTS[i]] = perLine - i; - result.push(DEFAULTS[i]); - } - - return result; - } - - var quantity = perLine * 4; - var frequentlyKeys = []; - - for (var key in frequently) { - if (frequently.hasOwnProperty(key)) { - frequentlyKeys.push(key); - } - } - - var sorted = frequentlyKeys.sort(function (a, b) { - return frequently[a] - frequently[b]; - }).reverse(); - var sliced = sorted.slice(0, quantity); - - var last = _store["default"].get('last'); - - if (last && sliced.indexOf(last) == -1) { - sliced.pop(); - sliced.push(last); - } - - return sliced; -} - -var _default = { - add: add, - get: get -}; -exports["default"] = _default; -}); - -var defineProperty = createCommonjsModule(function (module) { -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var _extends_1 = createCommonjsModule(function (module) { -function _extends() { - module.exports = _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - return _extends.apply(this, arguments); -} - -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var setPrototypeOf = createCommonjsModule(function (module) { -function _setPrototypeOf(o, p) { - module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - return _setPrototypeOf(o, p); -} - -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var inherits = createCommonjsModule(function (module) { -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - Object.defineProperty(subClass, "prototype", { - writable: false - }); - if (superClass) setPrototypeOf(subClass, superClass); -} - -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var assertThisInitialized = createCommonjsModule(function (module) { -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; -} - -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var possibleConstructorReturn = createCommonjsModule(function (module) { -var _typeof = _typeof_1["default"]; - - - -function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === "object" || typeof call === "function")) { - return call; - } else if (call !== void 0) { - throw new TypeError("Derived constructors may only return object or undefined"); - } - - return assertThisInitialized(self); -} - -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -var getPrototypeOf = createCommonjsModule(function (module) { -function _getPrototypeOf(o) { - module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - return _getPrototypeOf(o); -} - -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; -}); - -/** @license React v16.13.1 - * react-is.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var reactIs_development = createCommonjsModule(function (module, exports) { - -{ - (function () { - // nor polyfill, then a plain number is used for performance. - - var hasSymbol = typeof Symbol === 'function' && Symbol.for; - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary - // (unstable) APIs that have been removed. Can we remove the symbols? - - var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; - var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; - var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; - var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; - var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; - var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; - var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; - var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; - var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; - var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; - - function isValidElementType(type) { - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); - } - - function typeOf(object) { - if (typeof object === 'object' && object !== null) { - var $$typeof = object.$$typeof; - - switch ($$typeof) { - case REACT_ELEMENT_TYPE: - var type = object.type; - - switch (type) { - case REACT_ASYNC_MODE_TYPE: - case REACT_CONCURRENT_MODE_TYPE: - case REACT_FRAGMENT_TYPE: - case REACT_PROFILER_TYPE: - case REACT_STRICT_MODE_TYPE: - case REACT_SUSPENSE_TYPE: - return type; - - default: - var $$typeofType = type && type.$$typeof; - - switch ($$typeofType) { - case REACT_CONTEXT_TYPE: - case REACT_FORWARD_REF_TYPE: - case REACT_LAZY_TYPE: - case REACT_MEMO_TYPE: - case REACT_PROVIDER_TYPE: - return $$typeofType; - - default: - return $$typeof; - } - - } - - case REACT_PORTAL_TYPE: - return $$typeof; - } - } - - return undefined; - } // AsyncMode is deprecated along with isAsyncMode - - - var AsyncMode = REACT_ASYNC_MODE_TYPE; - var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; - var ContextConsumer = REACT_CONTEXT_TYPE; - var ContextProvider = REACT_PROVIDER_TYPE; - var Element = REACT_ELEMENT_TYPE; - var ForwardRef = REACT_FORWARD_REF_TYPE; - var Fragment = REACT_FRAGMENT_TYPE; - var Lazy = REACT_LAZY_TYPE; - var Memo = REACT_MEMO_TYPE; - var Portal = REACT_PORTAL_TYPE; - var Profiler = REACT_PROFILER_TYPE; - var StrictMode = REACT_STRICT_MODE_TYPE; - var Suspense = REACT_SUSPENSE_TYPE; - var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated - - function isAsyncMode(object) { - { - if (!hasWarnedAboutDeprecatedIsAsyncMode) { - hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint - - console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); - } - } - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; - } - - function isConcurrentMode(object) { - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; - } - - function isContextConsumer(object) { - return typeOf(object) === REACT_CONTEXT_TYPE; - } - - function isContextProvider(object) { - return typeOf(object) === REACT_PROVIDER_TYPE; - } - - function isElement(object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - - function isForwardRef(object) { - return typeOf(object) === REACT_FORWARD_REF_TYPE; - } - - function isFragment(object) { - return typeOf(object) === REACT_FRAGMENT_TYPE; - } - - function isLazy(object) { - return typeOf(object) === REACT_LAZY_TYPE; - } - - function isMemo(object) { - return typeOf(object) === REACT_MEMO_TYPE; - } - - function isPortal(object) { - return typeOf(object) === REACT_PORTAL_TYPE; - } - - function isProfiler(object) { - return typeOf(object) === REACT_PROFILER_TYPE; - } - - function isStrictMode(object) { - return typeOf(object) === REACT_STRICT_MODE_TYPE; - } - - function isSuspense(object) { - return typeOf(object) === REACT_SUSPENSE_TYPE; - } - - exports.AsyncMode = AsyncMode; - exports.ConcurrentMode = ConcurrentMode; - exports.ContextConsumer = ContextConsumer; - exports.ContextProvider = ContextProvider; - exports.Element = Element; - exports.ForwardRef = ForwardRef; - exports.Fragment = Fragment; - exports.Lazy = Lazy; - exports.Memo = Memo; - exports.Portal = Portal; - exports.Profiler = Profiler; - exports.StrictMode = StrictMode; - exports.Suspense = Suspense; - exports.isAsyncMode = isAsyncMode; - exports.isConcurrentMode = isConcurrentMode; - exports.isContextConsumer = isContextConsumer; - exports.isContextProvider = isContextProvider; - exports.isElement = isElement; - exports.isForwardRef = isForwardRef; - exports.isFragment = isFragment; - exports.isLazy = isLazy; - exports.isMemo = isMemo; - exports.isPortal = isPortal; - exports.isProfiler = isProfiler; - exports.isStrictMode = isStrictMode; - exports.isSuspense = isSuspense; - exports.isValidElementType = isValidElementType; - exports.typeOf = typeOf; - })(); -} -}); - -var reactIs = createCommonjsModule(function (module) { - -{ - module.exports = reactIs_development; -} -}); - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -var ReactPropTypesSecret_1 = ReactPropTypesSecret$1; - -var has$1 = Function.call.bind(Object.prototype.hasOwnProperty); - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var printWarning$1 = function () {}; - -{ - var ReactPropTypesSecret = ReactPropTypesSecret_1; - - var loggedTypeFailures = {}; - - var has = has$1; - - printWarning$1 = function (text) { - var message = 'Warning: ' + text; - - if (typeof console !== 'undefined') { - console.error(message); - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) { - /**/ - } - }; -} -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ - - -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - { - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); - err.name = 'Invariant Violation'; - throw err; - } - - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - - if (error && !(error instanceof Error)) { - printWarning$1((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).'); - } - - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; - var stack = getStack ? getStack() : ''; - printWarning$1('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); - } - } - } - } -} -/** - * Resets warning cache when testing. - * - * @private - */ - - -checkPropTypes.resetWarningCache = function () { - { - loggedTypeFailures = {}; - } -}; - -var checkPropTypes_1 = checkPropTypes; - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - - - - - - - - - -var printWarning = function () {}; - -{ - printWarning = function (text) { - var message = 'Warning: ' + text; - - if (typeof console !== 'undefined') { - console.error(message); - } - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; -} - -function emptyFunctionThatReturnsNull() { - return null; -} - -var factoryWithTypeCheckers = function (isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. - - /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ - - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); - * - * @internal - */ - - - var ANONYMOUS = '<>'; // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bigint: createPrimitiveTypeChecker('bigint'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - elementType: createElementTypeTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker, - exact: createStrictShapeTypeChecker - }; - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - - /*eslint-disable no-self-compare*/ - - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ - - /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. - */ - - - function PropTypeError(message, data) { - this.message = message; - this.data = data && typeof data === 'object' ? data : {}; - this.stack = ''; - } // Make `instanceof Error` still work for returned errors. - - - PropTypeError.prototype = Error.prototype; - - function createChainableTypeChecker(validate) { - { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - - if (secret !== ReactPropTypesSecret_1) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); - err.name = 'Invariant Violation'; - throw err; - } else if (typeof console !== 'undefined') { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - - if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3) { - printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } - } - } - - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } - - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - return chainedCheckType; - } - - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), { - expectedType: expectedType - }); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunctionThatReturnsNull); - } - - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - - var propValue = props[propName]; - - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1); - - if (error instanceof Error) { - return error; - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createElementTypeTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - - if (!reactIs.isValidElementType(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - { - if (arguments.length > 1) { - printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'); - } else { - printWarning('Invalid argument supplied to oneOf, expected an array.'); - } - } - - return emptyFunctionThatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } - - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { - var type = getPreciseType(value); - - if (type === 'symbol') { - return String(value); - } - - return value; - }); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - - return createChainableTypeChecker(validate); - } - - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - - for (var key in propValue) { - if (has$1(propValue, key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); - - if (error instanceof Error) { - return error; - } - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') ; - return emptyFunctionThatReturnsNull; - } - - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - - if (typeof checker !== 'function') { - printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'); - return emptyFunctionThatReturnsNull; - } - } - - function validate(props, propName, componentName, location, propFullName) { - var expectedTypes = []; - - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1); - - if (checkerResult == null) { - return null; - } - - if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) { - expectedTypes.push(checkerResult.data.expectedType); - } - } - - var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : ''; - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); - } - - return createChainableTypeChecker(validate); - } - - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function invalidValidatorError(componentName, location, propFullName, key, type) { - return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'); - } - - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - - if (typeof checker !== 'function') { - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); - } - - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); - - if (error) { - return error; - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function createStrictShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } // We need to check all keys in case some are required but missing from props. - - - var allKeys = objectAssign({}, props[propName], shapeTypes); - - for (var key in allKeys) { - var checker = shapeTypes[key]; - - if (has$1(shapeTypes, key) && typeof checker !== 'function') { - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); - } - - if (!checker) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')); - } - - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); - - if (error) { - return error; - } - } - - return null; - } - - return createChainableTypeChecker(validate); - } - - function isNode(propValue) { - switch (typeof propValue) { - case 'number': - case 'string': - case 'undefined': - return true; - - case 'boolean': - return !propValue; - - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - - if (propValue === null || isValidElement(propValue)) { - return true; - } - - var iteratorFn = getIteratorFn(propValue); - - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } - } - } else { - return false; - } - - return true; - - default: - return false; - } - } - - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } // falsy value can't be a Symbol - - - if (!propValue) { - return false; - } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - - - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } // Fallback for non-spec compliant Symbols which are polyfilled. - - - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; - } - - return false; - } // Equivalent of `typeof` but with special handling for array and regexp. - - - function getPropType(propValue) { - var propType = typeof propValue; - - if (Array.isArray(propValue)) { - return 'array'; - } - - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - - return propType; - } // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - - - function getPreciseType(propValue) { - if (typeof propValue === 'undefined' || propValue === null) { - return '' + propValue; - } - - var propType = getPropType(propValue); - - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - - return propType; - } // Returns a string that is postfixed to a warning about an invalid type. - // For example, "undefined" or "of type array" - - - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - - switch (type) { - case 'array': - case 'object': - return 'an ' + type; - - case 'boolean': - case 'date': - case 'regexp': - return 'a ' + type; - - default: - return type; - } - } // Returns class name of the object, if any. - - - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; - } - - return propValue.constructor.name; - } - - ReactPropTypes.checkPropTypes = checkPropTypes_1; - ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache; - ReactPropTypes.PropTypes = ReactPropTypes; - return ReactPropTypes; -}; - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var propTypes = createCommonjsModule(function (module) { -{ - var ReactIs = reactIs; // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - - - var throwOnDirectAccess = true; - module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess); -} -}); - -var svgs = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.search = exports.categories = void 0; - -var _react = interopRequireDefault(react); - -var categories = { - activity: function activity() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113" - })); - }, - custom: function custom() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("g", { - transform: "translate(2.000000, 1.000000)" - }, /*#__PURE__*/_react["default"].createElement("rect", { - id: "Rectangle", - x: "8", - y: "0", - width: "3", - height: "21", - rx: "1.5" - }), /*#__PURE__*/_react["default"].createElement("rect", { - id: "Rectangle", - transform: "translate(9.843, 10.549) rotate(60) translate(-9.843, -10.549) ", - x: "8.343", - y: "0.049", - width: "3", - height: "21", - rx: "1.5" - }), /*#__PURE__*/_react["default"].createElement("rect", { - id: "Rectangle", - transform: "translate(9.843, 10.549) rotate(-60) translate(-9.843, -10.549) ", - x: "8.343", - y: "0.049", - width: "3", - height: "21", - rx: "1.5" - }))); - }, - flags: function flags() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z" - })); - }, - foods: function foods() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9" - })); - }, - nature: function nature() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8" - }), /*#__PURE__*/_react["default"].createElement("path", { - d: "M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235" - })); - }, - objects: function objects() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z" - }), /*#__PURE__*/_react["default"].createElement("path", { - d: "M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789" - })); - }, - people: function people() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10" - }), /*#__PURE__*/_react["default"].createElement("path", { - d: "M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0" - })); - }, - places: function places() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5" - }), /*#__PURE__*/_react["default"].createElement("path", { - d: "M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z" - })); - }, - recent: function recent() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z" - }), /*#__PURE__*/_react["default"].createElement("path", { - d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10" - })); - }, - symbols: function symbols() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "24", - height: "24" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76" - })); - } -}; -exports.categories = categories; -var search = { - search: function search() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "13", - height: "13", - viewBox: "0 0 20 20", - opacity: "0.5" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z" - })); - }, - "delete": function _delete() { - return /*#__PURE__*/_react["default"].createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "13", - height: "13", - viewBox: "0 0 20 20", - opacity: "0.5" - }, /*#__PURE__*/_react["default"].createElement("path", { - d: "M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z" - })); - } -}; -exports.search = search; -}); - -var sharedProps = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PickerPropTypes = exports.EmojiPropTypes = void 0; - -var _propTypes = interopRequireDefault(propTypes); - -var EmojiPropTypes = { - data: _propTypes["default"].object.isRequired, - onOver: _propTypes["default"].func, - onLeave: _propTypes["default"].func, - onClick: _propTypes["default"].func, - fallback: _propTypes["default"].func, - backgroundImageFn: _propTypes["default"].func, - "native": _propTypes["default"].bool, - forceSize: _propTypes["default"].bool, - tooltip: _propTypes["default"].bool, - useButton: _propTypes["default"].bool, - skin: _propTypes["default"].oneOf([1, 2, 3, 4, 5, 6]), - sheetSize: _propTypes["default"].oneOf([16, 20, 32, 64]), - sheetColumns: _propTypes["default"].number, - sheetRows: _propTypes["default"].number, - set: _propTypes["default"].oneOf(['apple', 'google', 'twitter', 'facebook']), - size: _propTypes["default"].number.isRequired, - emoji: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object]).isRequired -}; -exports.EmojiPropTypes = EmojiPropTypes; -var PickerPropTypes = { - onClick: _propTypes["default"].func, - onSelect: _propTypes["default"].func, - onSkinChange: _propTypes["default"].func, - perLine: _propTypes["default"].number, - emojiSize: _propTypes["default"].number, - i18n: _propTypes["default"].object, - style: _propTypes["default"].object, - title: _propTypes["default"].string, - emoji: _propTypes["default"].string, - color: _propTypes["default"].string, - set: EmojiPropTypes.set, - skin: EmojiPropTypes.skin, - "native": _propTypes["default"].bool, - backgroundImageFn: EmojiPropTypes.backgroundImageFn, - sheetSize: EmojiPropTypes.sheetSize, - emojisToShowFilter: _propTypes["default"].func, - showPreview: _propTypes["default"].bool, - showSkinTones: _propTypes["default"].bool, - emojiTooltip: EmojiPropTypes.tooltip, - useButton: EmojiPropTypes.useButton, - theme: _propTypes["default"].oneOf(['auto', 'light', 'dark']), - include: _propTypes["default"].arrayOf(_propTypes["default"].string), - exclude: _propTypes["default"].arrayOf(_propTypes["default"].string), - recent: _propTypes["default"].arrayOf(_propTypes["default"].string), - autoFocus: _propTypes["default"].bool, - enableFrequentEmojiSort: _propTypes["default"].bool, - custom: _propTypes["default"].arrayOf(_propTypes["default"].shape({ - name: _propTypes["default"].string.isRequired, - short_names: _propTypes["default"].arrayOf(_propTypes["default"].string).isRequired, - emoticons: _propTypes["default"].arrayOf(_propTypes["default"].string), - keywords: _propTypes["default"].arrayOf(_propTypes["default"].string), - imageUrl: _propTypes["default"].string, - spriteUrl: _propTypes["default"].string, - sheet_x: _propTypes["default"].number, - sheet_y: _propTypes["default"].number, - size: _propTypes["default"].number, - sheetColumns: _propTypes["default"].number, - sheetRows: _propTypes["default"].number - })), - skinEmoji: _propTypes["default"].string, - notFound: _propTypes["default"].func, - notFoundEmoji: _propTypes["default"].string, - icons: _propTypes["default"].object -}; -exports.PickerPropTypes = PickerPropTypes; -}); - -var anchors = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _assertThisInitialized2 = interopRequireDefault(assertThisInitialized); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var Anchors = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(Anchors, _React$PureComponent); - - var _super = _createSuper(Anchors); - - function Anchors(props) { - var _this; - - (0, _classCallCheck2["default"])(this, Anchors); - _this = _super.call(this, props); - var defaultCategory = props.categories.filter(function (category) { - return category.first; - })[0]; - _this.state = { - selected: defaultCategory.name - }; - _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setButtonsRef = _this.setButtonsRef.bind((0, _assertThisInitialized2["default"])(_this)); - return _this; - } - - (0, _createClass2["default"])(Anchors, [{ - key: "handleClick", - value: function handleClick(e) { - var index = e.currentTarget.getAttribute('data-index'); - var _this$props = this.props, - categories = _this$props.categories, - onAnchorClick = _this$props.onAnchorClick; - onAnchorClick(categories[index], index); - } - }, { - key: "setButtonsRef", - value: function setButtonsRef(c) { - this.buttons = c; - } - }, { - key: "render", - value: function render() { - var _this2 = this; - - var _this$props2 = this.props, - categories = _this$props2.categories, - color = _this$props2.color, - i18n = _this$props2.i18n, - icons = _this$props2.icons, - selected = this.state.selected; - return /*#__PURE__*/_react["default"].createElement("nav", { - className: "emoji-mart-anchors", - "aria-label": i18n.categorieslabel, - ref: this.setButtonsRef - }, categories.map(function (category, i) { - var id = category.id, - name = category.name, - anchor = category.anchor, - isSelected = name == selected; - - if (anchor === false) { - return null; - } - - var iconId = id.startsWith('custom-') ? 'custom' : id; - return /*#__PURE__*/_react["default"].createElement("button", { - key: id, - "aria-label": i18n.categories[iconId], - title: i18n.categories[iconId], - "data-index": i, - type: 'button', - onClick: _this2.handleClick, - className: "emoji-mart-anchor ".concat(isSelected ? 'emoji-mart-anchor-selected' : ''), - style: { - color: isSelected ? color : null - } - }, /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-anchor-icon" - }, icons.categories[iconId]()), /*#__PURE__*/_react["default"].createElement("span", { - className: "emoji-mart-anchor-bar", - style: { - backgroundColor: color - } - })); - })); - } - }]); - return Anchors; -}(_react["default"].PureComponent); - -exports["default"] = Anchors; -Anchors.propTypes -/* remove-proptypes */ -= { - categories: _propTypes["default"].array, - onAnchorClick: _propTypes["default"].func, - icons: _propTypes["default"].object -}; -Anchors.defaultProps = { - categories: [], - onAnchorClick: function onAnchorClick() {}, - icons: {} -}; -}); - -var sharedDefaultProps = createCommonjsModule(function (module, exports) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PickerDefaultProps = exports.EmojiDefaultProps = void 0; -var EmojiDefaultProps = { - skin: 1, - set: 'apple', - sheetSize: 64, - sheetColumns: 57, - sheetRows: 57, - "native": false, - forceSize: false, - tooltip: false, - useButton: true, - backgroundImageFn: function backgroundImageFn(set, sheetSize) { - return "https://unpkg.com/emoji-datasource-".concat(set, "@").concat("5.0.1", "/img/").concat(set, "/sheets-256/").concat(sheetSize, ".png"); - } -}; -exports.EmojiDefaultProps = EmojiDefaultProps; -var PickerDefaultProps = { - onClick: function onClick() {}, - onSelect: function onSelect() {}, - onSkinChange: function onSkinChange() {}, - emojiSize: 24, - perLine: 9, - i18n: {}, - style: {}, - title: 'Emoji Mart™', - emoji: 'department_store', - color: '#ae65c5', - set: EmojiDefaultProps.set, - theme: 'light', - skin: null, - defaultSkin: EmojiDefaultProps.skin, - "native": EmojiDefaultProps["native"], - sheetSize: EmojiDefaultProps.sheetSize, - backgroundImageFn: EmojiDefaultProps.backgroundImageFn, - emojisToShowFilter: null, - showPreview: true, - showSkinTones: true, - emojiTooltip: EmojiDefaultProps.tooltip, - useButton: EmojiDefaultProps.useButton, - autoFocus: false, - enableFrequentEmojiSort: false, - custom: [], - skinEmoji: '', - notFound: function notFound() {}, - notFoundEmoji: 'sleuth_or_spy', - icons: {} -}; -exports.PickerDefaultProps = PickerDefaultProps; -}); - -var nimbleEmoji = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _extends2 = interopRequireDefault(_extends_1); - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - - - - - - - - - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -var _getData = function _getData(props) { - var emoji = props.emoji, - skin = props.skin, - set = props.set, - data = props.data; - return (0, utils.getData)(emoji, skin, set, data); -}; - -var _getPosition = function _getPosition(props) { - var _getData2 = _getData(props), - sheet_x = _getData2.sheet_x, - sheet_y = _getData2.sheet_y, - multiplyX = 100 / (props.sheetColumns - 1), - multiplyY = 100 / (props.sheetRows - 1); - - return "".concat(multiplyX * sheet_x, "% ").concat(multiplyY * sheet_y, "%"); -}; - -var _getSanitizedData = function _getSanitizedData(props) { - var emoji = props.emoji, - skin = props.skin, - set = props.set, - data = props.data; - return (0, utils.getSanitizedData)(emoji, skin, set, data); -}; - -var _handleClick = function _handleClick(e, props) { - if (!props.onClick) { - return; - } - - var onClick = props.onClick, - emoji = _getSanitizedData(props); - - onClick(emoji, e); -}; - -var _handleOver = function _handleOver(e, props) { - if (!props.onOver) { - return; - } - - var onOver = props.onOver, - emoji = _getSanitizedData(props); - - onOver(emoji, e); -}; - -var _handleLeave = function _handleLeave(e, props) { - if (!props.onLeave) { - return; - } - - var onLeave = props.onLeave, - emoji = _getSanitizedData(props); - - onLeave(emoji, e); -}; - -var _handleKeyDown = function _handleKeyDown(e, props) { - e.preventDefault(); - - if (!props.onKeyDown) { - return; - } - - var onKeyDown = props.onKeyDown, - emoji = _getSanitizedData(props); - - onKeyDown(e, emoji); -}; - -var _isNumeric = function _isNumeric(value) { - return !isNaN(value - parseFloat(value)); -}; - -var _convertStyleToCSS = function _convertStyleToCSS(style) { - var div = document.createElement('div'); - - for (var key in style) { - var value = style[key]; - - if (_isNumeric(value)) { - value += 'px'; - } - - div.style[key] = value; - } - - return div.getAttribute('style'); -}; - -var NimbleEmoji = function NimbleEmoji(props) { - if (props.data.compressed) { - (0, data.uncompress)(props.data); - } - - for (var k in NimbleEmoji.defaultProps) { - if (props[k] == undefined && NimbleEmoji.defaultProps[k] != undefined) { - props[k] = NimbleEmoji.defaultProps[k]; - } - } - - var data$1 = _getData(props); - - if (!data$1) { - if (props.fallback) { - return props.fallback(null, props); - } else { - return null; - } - } - - var unified = data$1.unified, - custom = data$1.custom, - short_names = data$1.short_names, - imageUrl = data$1.imageUrl, - style = {}, - children = props.children, - className = 'emoji-mart-emoji', - nativeEmoji = unified && (0, utils.unifiedToNative)(unified), - label = [nativeEmoji].concat(short_names).filter(Boolean).join(', '), - title = null; - - if (!unified && !custom) { - if (props.fallback) { - return props.fallback(data$1, props); - } else { - return null; - } - } - - if (props.tooltip) { - title = short_names[0]; - } - - if (props["native"] && unified) { - className += ' emoji-mart-emoji-native'; - style = { - fontSize: props.size - }; - children = nativeEmoji; - - if (props.forceSize) { - style.display = 'inline-block'; - style.width = props.size; - style.height = props.size; - style.wordBreak = 'keep-all'; - } - } else if (custom) { - className += ' emoji-mart-emoji-custom'; - style = { - width: props.size, - height: props.size, - display: 'inline-block' - }; - - if (data$1.spriteUrl) { - style = _objectSpread(_objectSpread({}, style), {}, { - backgroundImage: "url(".concat(data$1.spriteUrl, ")"), - backgroundSize: "".concat(100 * props.sheetColumns, "% ").concat(100 * props.sheetRows, "%"), - backgroundPosition: _getPosition(props) - }); - } else { - style = _objectSpread(_objectSpread({}, style), {}, { - backgroundImage: "url(".concat(imageUrl, ")"), - backgroundSize: 'contain', - backgroundRepeat: 'no-repeat', - backgroundPosition: 'center' - }); - } - } else { - var setHasEmoji = data$1["has_img_".concat(props.set)] == undefined || data$1["has_img_".concat(props.set)]; - - if (!setHasEmoji) { - if (props.fallback) { - return props.fallback(data$1, props); - } else { - return null; - } - } else { - style = { - width: props.size, - height: props.size, - display: 'inline-block', - backgroundImage: "url(".concat(props.backgroundImageFn(props.set, props.sheetSize), ")"), - backgroundSize: "".concat(100 * props.sheetColumns, "% ").concat(100 * props.sheetRows, "%"), - backgroundPosition: _getPosition(props) - }; - } - } - - var Tag = { - name: 'span', - props: {} - }; - - if (props.onClick && props.useButton) { - Tag.name = 'button'; - Tag.props = { - type: 'button', - tabIndex: '-1' - }; - } - - if (props.html) { - style = _convertStyleToCSS(style); - return "<".concat(Tag.name, " style='").concat(style, "' aria-label='").concat(label, "' ").concat(title ? "title='".concat(title, "'") : '', " class='").concat(className, "'>").concat(children || '', ""); - } else { - return /*#__PURE__*/_react["default"].createElement(Tag.name, (0, _extends2["default"])({ - id: "emoji-mart-".concat(props.emoji), - onKeyDown: function onKeyDown(e) { - return _handleKeyDown(e, props); - }, - onClick: function onClick(e) { - return _handleClick(e, props); - }, - onMouseEnter: function onMouseEnter(e) { - return _handleOver(e, props); - }, - onMouseLeave: function onMouseLeave(e) { - return _handleLeave(e, props); - }, - "aria-label": label, - title: title, - className: className - }, Tag.props), /*#__PURE__*/_react["default"].createElement("span", { - style: style - }, children)); - } -}; - -NimbleEmoji.propTypes -/* remove-proptypes */ -= _objectSpread(_objectSpread({}, sharedProps.EmojiPropTypes), {}, { - data: _propTypes["default"].object.isRequired -}); -NimbleEmoji.defaultProps = sharedDefaultProps.EmojiDefaultProps; -var _default = NimbleEmoji; -exports["default"] = _default; -}); - -var notFound = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -var _nimbleEmoji = interopRequireDefault(nimbleEmoji); - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var NotFound = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(NotFound, _React$PureComponent); - - var _super = _createSuper(NotFound); - - function NotFound() { - (0, _classCallCheck2["default"])(this, NotFound); - return _super.apply(this, arguments); - } - - (0, _createClass2["default"])(NotFound, [{ - key: "render", - value: function render() { - var _this$props = this.props, - data = _this$props.data, - emojiProps = _this$props.emojiProps, - i18n = _this$props.i18n, - notFound = _this$props.notFound, - notFoundEmoji = _this$props.notFoundEmoji; - - var component = notFound && notFound() || /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-no-results" - }, (0, _nimbleEmoji["default"])(_objectSpread(_objectSpread({ - data: data - }, emojiProps), {}, { - size: 38, - emoji: notFoundEmoji, - onOver: null, - onLeave: null, - onClick: null - })), /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-no-results-label" - }, i18n.notfound)); - - return component; - } - }]); - return NotFound; -}(_react["default"].PureComponent); - -exports["default"] = NotFound; -NotFound.propTypes -/* remove-proptypes */ -= { - notFound: _propTypes["default"].func.isRequired, - emojiProps: _propTypes["default"].object.isRequired -}; -}); - -var category = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _assertThisInitialized2 = interopRequireDefault(assertThisInitialized); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -var _frequently = interopRequireDefault(frequently_1); - - - -var _nimbleEmoji = interopRequireDefault(nimbleEmoji); - -var _notFound = interopRequireDefault(notFound); - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var Category = /*#__PURE__*/function (_React$Component) { - (0, _inherits2["default"])(Category, _React$Component); - - var _super = _createSuper(Category); - - function Category(props) { - var _this; - - (0, _classCallCheck2["default"])(this, Category); - _this = _super.call(this, props); - _this.data = props.data; - _this.setContainerRef = _this.setContainerRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setLabelRef = _this.setLabelRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setEmojiTableRef = _this.setEmojiTableRef.bind((0, _assertThisInitialized2["default"])(_this)); - return _this; - } - - (0, _createClass2["default"])(Category, [{ - key: "componentDidMount", - value: function componentDidMount() { - this.margin = 0; - this.minMargin = 0; - this.memoizeSize(); - } - }, { - key: "shouldComponentUpdate", - value: function shouldComponentUpdate(nextProps, nextState) { - var _this$props = this.props, - name = _this$props.name, - perLine = _this$props.perLine, - _native = _this$props["native"], - hasStickyPosition = _this$props.hasStickyPosition, - emojis = _this$props.emojis, - emojiProps = _this$props.emojiProps, - skin = emojiProps.skin, - size = emojiProps.size, - set = emojiProps.set, - nextPerLine = nextProps.perLine, - nextNative = nextProps["native"], - nextHasStickyPosition = nextProps.hasStickyPosition, - nextEmojis = nextProps.emojis, - nextEmojiProps = nextProps.emojiProps, - nextSkin = nextEmojiProps.skin, - nextSize = nextEmojiProps.size, - nextSet = nextEmojiProps.set, - shouldUpdate = false; - - if (name == 'Recent' && perLine != nextPerLine) { - shouldUpdate = true; - } - - if (name == 'Search') { - shouldUpdate = !(emojis == nextEmojis); - } - - if (skin != nextSkin || size != nextSize || _native != nextNative || set != nextSet || hasStickyPosition != nextHasStickyPosition) { - shouldUpdate = true; - } - - return shouldUpdate; - } - }, { - key: "memoizeSize", - value: function memoizeSize() { - if (!this.container) { - // probably this is a test environment, e.g. jest - this.top = 0; - this.maxMargin = 0; - return; - } - - var parent = this.container.parentElement; - - var _this$container$getBo = this.container.getBoundingClientRect(), - top = _this$container$getBo.top, - height = _this$container$getBo.height; - - var _parent$getBoundingCl = parent.getBoundingClientRect(), - parentTop = _parent$getBoundingCl.top; - - var _this$label$getBoundi = this.label.getBoundingClientRect(), - labelHeight = _this$label$getBoundi.height; - - this.top = top - parentTop + parent.scrollTop; - - if (height == 0) { - this.maxMargin = 0; - } else { - this.maxMargin = height - labelHeight; - } - } - }, { - key: "handleScroll", - value: function handleScroll(scrollTop) { - var margin = scrollTop - this.top; - margin = margin < this.minMargin ? this.minMargin : margin; - margin = margin > this.maxMargin ? this.maxMargin : margin; - if (margin == this.margin) return; - - if (!this.props.hasStickyPosition) { - this.label.style.top = "".concat(margin, "px"); - } - - this.margin = margin; - return true; - } - }, { - key: "getEmojis", - value: function getEmojis() { - var _this2 = this; - - var _this$props2 = this.props, - name = _this$props2.name, - emojis = _this$props2.emojis, - recent = _this$props2.recent, - perLine = _this$props2.perLine; - - if (name == 'Recent') { - var custom = this.props.custom; - - var frequentlyUsed = recent || _frequently["default"].get(perLine); - - if (frequentlyUsed.length) { - emojis = frequentlyUsed.map(function (id) { - var emoji = custom.filter(function (e) { - return e.id === id; - })[0]; - - if (emoji) { - return emoji; - } - - return id; - }).filter(function (id) { - return !!(0, utils.getData)(id, null, null, _this2.data); - }); - } - - if (emojis.length === 0 && frequentlyUsed.length > 0) { - return null; - } - } - - if (emojis) { - emojis = emojis.slice(0); - } - - return emojis; - } - }, { - key: "updateDisplay", - value: function updateDisplay(display) { - var emojis = this.getEmojis(); - - if (!emojis || !this.container) { - return; - } - - this.container.style.display = display; - } - }, { - key: "setContainerRef", - value: function setContainerRef(c) { - this.container = c; - } - }, { - key: "setEmojiTableRef", - value: function setEmojiTableRef(c) { - this.emojiTableRef = c; - } - }, { - key: "setLabelRef", - value: function setLabelRef(c) { - this.label = c; - } - }, { - key: "render", - value: function render() { - var _this3 = this; - - var _this$props3 = this.props, - id = _this$props3.id, - name = _this$props3.name, - hasStickyPosition = _this$props3.hasStickyPosition, - emojiProps = _this$props3.emojiProps, - i18n = _this$props3.i18n, - notFound = _this$props3.notFound, - notFoundEmoji = _this$props3.notFoundEmoji, - perLine = _this$props3.perLine, - emojis = this.getEmojis(), - labelStyles = {}, - labelSpanStyles = {}, - containerStyles = {}; - - if (!emojis) { - containerStyles = { - display: 'none' - }; - } - - if (!hasStickyPosition) { - labelStyles = { - height: 28 - }; - labelSpanStyles = { - position: 'absolute' - }; - } - - var label = i18n.categories[id] || name; - - var EmojiTable = function EmojiTable(_ref) { - var emojis = _ref.emojis; - var trs = []; - - var _loop = function _loop(i) { - trs.push( /*#__PURE__*/_react["default"].createElement("tr", { - role: "row", - key: "emoji-row-".concat(i) - }, emojis.slice(i, i + perLine).map(function (emoji, j) { - return /*#__PURE__*/_react["default"].createElement("td", { - role: "gridcell", - tabIndex: "-1", - key: emoji.short_names && emoji.short_names.join('_') || emoji - }, (0, _nimbleEmoji["default"])(_objectSpread(_objectSpread({ - emoji: emoji, - data: _this3.data - }, emojiProps), {}, { - onKeyDown: function onKeyDown(e, emoji) { - emojiProps.onKeyDown(e, emoji, { - category: id, - row: Math.floor(i / perLine), - column: j - }, _this3.emojiTableRef); - } - }))); - }))); - }; - - for (var i = 0; i < emojis.length; i += perLine) { - _loop(i); - } - - return /*#__PURE__*/_react["default"].createElement("table", { - ref: _this3.setEmojiTableRef, - className: "emoji-mart-category-list", - role: "grid" - }, /*#__PURE__*/_react["default"].createElement("tbody", null, trs)); - }; - - return /*#__PURE__*/_react["default"].createElement("section", { - ref: this.setContainerRef, - className: "emoji-mart-category", - "aria-label": label, - style: containerStyles - }, /*#__PURE__*/_react["default"].createElement("div", { - style: labelStyles, - "data-name": name, - className: "emoji-mart-category-label" - }, /*#__PURE__*/_react["default"].createElement("span", { - style: labelSpanStyles, - ref: this.setLabelRef, - "aria-hidden": true - /* already labeled by the section aria-label */ - - }, label)), emojis && /*#__PURE__*/_react["default"].createElement(EmojiTable, { - emojis: emojis - }), emojis && !emojis.length && /*#__PURE__*/_react["default"].createElement(_notFound["default"], { - i18n: i18n, - notFound: notFound, - notFoundEmoji: notFoundEmoji, - data: this.data, - emojiProps: emojiProps - })); - } - }]); - return Category; -}(_react["default"].Component); - -exports["default"] = Category; -Category.propTypes -/* remove-proptypes */ -= { - emojis: _propTypes["default"].array, - hasStickyPosition: _propTypes["default"].bool, - name: _propTypes["default"].string.isRequired, - "native": _propTypes["default"].bool.isRequired, - perLine: _propTypes["default"].number.isRequired, - emojiProps: _propTypes["default"].object.isRequired, - recent: _propTypes["default"].arrayOf(_propTypes["default"].string), - notFound: _propTypes["default"].func, - notFoundEmoji: _propTypes["default"].string.isRequired -}; -Category.defaultProps = { - emojis: [], - hasStickyPosition: true -}; -}); - -var skins = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var Skins = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(Skins, _React$PureComponent); - - var _super = _createSuper(Skins); - - function Skins(props) { - var _this; - - (0, _classCallCheck2["default"])(this, Skins); - _this = _super.call(this, props); - _this.state = { - opened: false - }; - return _this; - } - - (0, _createClass2["default"])(Skins, [{ - key: "handleClick", - value: function handleClick(e) { - var skin = parseInt(e.currentTarget.getAttribute('data-skin')); - var onChange = this.props.onChange; - - if (!this.state.opened) { - this.setState({ - opened: true - }); - } else { - this.setState({ - opened: false - }); - - if (skin != this.props.skin) { - onChange(skin); - } - } - } - }, { - key: "render", - value: function render() { - return null; - } - }]); - return Skins; -}(_react["default"].PureComponent); - -exports["default"] = Skins; -Skins.propTypes -/* remove-proptypes */ -= { - onChange: _propTypes["default"].func, - skin: _propTypes["default"].number.isRequired -}; -Skins.defaultProps = { - onChange: function onChange() {} -}; -}); - -var skinsEmoji = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _assertThisInitialized2 = interopRequireDefault(assertThisInitialized); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -var _nimbleEmoji = interopRequireDefault(nimbleEmoji); - -var _skins = interopRequireDefault(skins); - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var SkinsEmoji = /*#__PURE__*/function (_Skins) { - (0, _inherits2["default"])(SkinsEmoji, _Skins); - - var _super = _createSuper(SkinsEmoji); - - function SkinsEmoji(props) { - var _this; - - (0, _classCallCheck2["default"])(this, SkinsEmoji); - _this = _super.call(this, props); - _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); - return _this; - } - - (0, _createClass2["default"])(SkinsEmoji, [{ - key: "render", - value: function render() { - var _this$props = this.props, - skin = _this$props.skin, - emojiProps = _this$props.emojiProps, - data = _this$props.data, - skinEmoji = _this$props.skinEmoji, - i18n = _this$props.i18n; - var opened = this.state.opened; - var skinToneNodes = []; - - for (var skinTone = 1; skinTone <= 6; skinTone++) { - var selected = skinTone === skin; - skinToneNodes.push( /*#__PURE__*/_react["default"].createElement("span", { - key: "skin-tone-".concat(skinTone), - className: "emoji-mart-skin-swatch custom".concat(selected ? ' selected' : '') - }, /*#__PURE__*/_react["default"].createElement("span", { - onClick: this.handleClick, - "data-skin": skinTone, - className: "emoji-mart-skin-tone-".concat(skinTone) - }, (0, _nimbleEmoji["default"])({ - emoji: skinEmoji, - data: data, - skin: skinTone, - backgroundImageFn: emojiProps.backgroundImageFn, - "native": emojiProps["native"], - set: emojiProps.set, - sheetSize: emojiProps.sheetSize, - size: 23 - })))); - } - - return /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-skin-swatches custom".concat(opened ? ' opened' : '') - }, /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-skin-text".concat(opened ? ' opened' : '') - }, i18n.skintext), skinToneNodes); - } - }]); - return SkinsEmoji; -}(_skins["default"]); - -exports["default"] = SkinsEmoji; -SkinsEmoji.propTypes -/* remove-proptypes */ -= { - onChange: _propTypes["default"].func, - skin: _propTypes["default"].number.isRequired, - emojiProps: _propTypes["default"].object.isRequired, - skinTone: _propTypes["default"].number, - skinEmoji: _propTypes["default"].string.isRequired, - i18n: _propTypes["default"].object -}; -SkinsEmoji.defaultProps = { - onChange: function onChange() {}, - skinTone: null -}; -}); - -var skinsDot = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _extends2 = interopRequireDefault(_extends_1); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _assertThisInitialized2 = interopRequireDefault(assertThisInitialized); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -var _skins = interopRequireDefault(skins); - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var SkinsDot = /*#__PURE__*/function (_Skins) { - (0, _inherits2["default"])(SkinsDot, _Skins); - - var _super = _createSuper(SkinsDot); - - function SkinsDot(props) { - var _this; - - (0, _classCallCheck2["default"])(this, SkinsDot); - _this = _super.call(this, props); - _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2["default"])(_this)); - return _this; - } - - (0, _createClass2["default"])(SkinsDot, [{ - key: "handleKeyDown", - value: function handleKeyDown(event) { - // if either enter or space is pressed, then execute - if (event.keyCode === 13 || event.keyCode === 32) { - event.preventDefault(); - this.handleClick(event); - } - } - }, { - key: "render", - value: function render() { - var _this$props = this.props, - skin = _this$props.skin, - i18n = _this$props.i18n; - var opened = this.state.opened; - var skinToneNodes = []; - - for (var skinTone = 1; skinTone <= 6; skinTone++) { - var selected = skinTone === skin; - var visible = opened || selected; - skinToneNodes.push( /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({ - key: "skin-tone-".concat(skinTone), - className: "emoji-mart-skin-swatch".concat(selected ? ' selected' : ''), - "aria-label": i18n.skintones[skinTone], - "aria-hidden": !visible - }, opened ? { - role: 'menuitem' - } : {}), /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({ - onClick: this.handleClick, - onKeyDown: this.handleKeyDown, - role: "button" - }, selected ? { - 'aria-haspopup': true, - 'aria-expanded': !!opened - } : {}, opened ? { - 'aria-pressed': !!selected - } : {}, { - tabIndex: visible ? '0' : '', - "aria-label": i18n.skintones[skinTone], - title: i18n.skintones[skinTone], - "data-skin": skinTone, - className: "emoji-mart-skin emoji-mart-skin-tone-".concat(skinTone) - })))); - } - - return /*#__PURE__*/_react["default"].createElement("section", { - className: "emoji-mart-skin-swatches".concat(opened ? ' opened' : ''), - "aria-label": i18n.skintext - }, /*#__PURE__*/_react["default"].createElement("div", opened ? { - role: 'menubar' - } : {}, skinToneNodes)); - } - }]); - return SkinsDot; -}(_skins["default"]); - -exports["default"] = SkinsDot; -SkinsDot.propTypes -/* remove-proptypes */ -= { - onChange: _propTypes["default"].func, - skin: _propTypes["default"].number.isRequired, - i18n: _propTypes["default"].object -}; -SkinsDot.defaultProps = { - onChange: function onChange() {} -}; -}); - -var preview = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - - - -var _nimbleEmoji = interopRequireDefault(nimbleEmoji); - -var _skinsEmoji = interopRequireDefault(skinsEmoji); - -var _skinsDot = interopRequireDefault(skinsDot); - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var Preview = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(Preview, _React$PureComponent); - - var _super = _createSuper(Preview); - - function Preview(props) { - var _this; - - (0, _classCallCheck2["default"])(this, Preview); - _this = _super.call(this, props); - _this.data = props.data; - return _this; - } - - (0, _createClass2["default"])(Preview, [{ - key: "render", - value: function render() { - var _this$props = this.props, - emoji = _this$props.emoji, - emojiProps = _this$props.emojiProps, - idleEmoji = _this$props.idleEmoji, - skinsProps = _this$props.skinsProps, - showSkinTones = _this$props.showSkinTones, - title = _this$props.title, - i18n = _this$props.i18n, - showPreview = _this$props.showPreview; - - if (emoji && showPreview) { - var emojiData = (0, utils.getData)(emoji, null, null, this.data), - _emojiData$emoticons = emojiData.emoticons, - emoticons = _emojiData$emoticons === void 0 ? [] : _emojiData$emoticons, - knownEmoticons = [], - listedEmoticons = []; - emoticons.forEach(function (emoticon) { - if (knownEmoticons.indexOf(emoticon.toLowerCase()) >= 0) { - return; - } - - knownEmoticons.push(emoticon.toLowerCase()); - listedEmoticons.push(emoticon); - }); - return /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview" - }, /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-emoji", - "aria-hidden": "true" - }, (0, _nimbleEmoji["default"])(_objectSpread({ - key: emoji.id, - emoji: emoji, - data: this.data - }, emojiProps))), /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-data", - "aria-hidden": "true" - }, /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-name" - }, emoji.name), /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-shortnames" - }, emojiData.short_names.map(function (short_name) { - return /*#__PURE__*/_react["default"].createElement("span", { - key: short_name, - className: "emoji-mart-preview-shortname" - }, ":", short_name, ":"); - })), /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-emoticons" - }, listedEmoticons.map(function (emoticon) { - return /*#__PURE__*/_react["default"].createElement("span", { - key: emoticon, - className: "emoji-mart-preview-emoticon" - }, emoticon); - })))); - } else { - return /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview" - }, /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-emoji", - "aria-hidden": "true" - }, idleEmoji && idleEmoji.length && (0, _nimbleEmoji["default"])(_objectSpread({ - emoji: idleEmoji, - data: this.data - }, emojiProps))), /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-data", - "aria-hidden": "true" - }, /*#__PURE__*/_react["default"].createElement("span", { - className: "emoji-mart-title-label" - }, title)), showSkinTones && /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-preview-skins".concat(skinsProps.skinEmoji ? ' custom' : '') - }, skinsProps.skinEmoji ? /*#__PURE__*/_react["default"].createElement(_skinsEmoji["default"], { - skin: skinsProps.skin, - emojiProps: emojiProps, - data: this.data, - skinEmoji: skinsProps.skinEmoji, - i18n: i18n, - onChange: skinsProps.onChange - }) : /*#__PURE__*/_react["default"].createElement(_skinsDot["default"], { - skin: skinsProps.skin, - i18n: i18n, - onChange: skinsProps.onChange - }))); - } - } - }]); - return Preview; -}(_react["default"].PureComponent); - -exports["default"] = Preview; -Preview.propTypes -/* remove-proptypes */ -= { - showSkinTones: _propTypes["default"].bool, - title: _propTypes["default"].string.isRequired, - idleEmoji: _propTypes["default"].string.isRequired, - emoji: _propTypes["default"].object.isRequired, - emojiProps: _propTypes["default"].object.isRequired, - skinsProps: _propTypes["default"].object.isRequired -}; -Preview.defaultProps = { - showSkinTones: true, - onChange: function onChange() {} -}; -}); - -var search = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _assertThisInitialized2 = interopRequireDefault(assertThisInitialized); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - - - -var _nimbleEmojiIndex = interopRequireDefault(nimbleEmojiIndex); - - - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var id = 0; - -var Search = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(Search, _React$PureComponent); - - var _super = _createSuper(Search); - - function Search(props) { - var _this; - - (0, _classCallCheck2["default"])(this, Search); - _this = _super.call(this, props); - _this.state = { - icon: svgs.search.search, - isSearching: false, - id: ++id - }; - _this.data = props.data; - _this.emojiIndex = new _nimbleEmojiIndex["default"](_this.data); - _this.setRef = _this.setRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.clear = _this.clear.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleKeyUp = _this.handleKeyUp.bind((0, _assertThisInitialized2["default"])(_this)); // throttle keyboard input so that typing isn't delayed - - _this.handleChange = (0, utils.throttleIdleTask)(_this.handleChange.bind((0, _assertThisInitialized2["default"])(_this))); - return _this; - } - - (0, _createClass2["default"])(Search, [{ - key: "componentDidMount", - value: function componentDidMount() { - // in some cases (e.g. preact) the input may already be pre-populated - // this.input is undefined in Jest tests - if (this.input && this.input.value) { - this.search(this.input.value); - } - } - }, { - key: "search", - value: function search(value) { - if (value == '') this.setState({ - icon: svgs.search.search, - isSearching: false - });else this.setState({ - icon: svgs.search["delete"], - isSearching: true - }); - this.props.onSearch(this.emojiIndex.search(value, { - emojisToShowFilter: this.props.emojisToShowFilter, - maxResults: this.props.maxResults, - include: this.props.include, - exclude: this.props.exclude, - custom: this.props.custom - })); - } - }, { - key: "clear", - value: function clear() { - if (this.input.value == '') return; - this.input.value = ''; - this.input.focus(); - this.search(''); - } - }, { - key: "handleChange", - value: function handleChange() { - if (this.input) { - this.search(this.input.value); - } - } - }, { - key: "handleKeyUp", - value: function handleKeyUp(e) { - if (e.keyCode === 13) { - this.clear(); - } - } - }, { - key: "setRef", - value: function setRef(c) { - this.input = c; - } - }, { - key: "render", - value: function render() { - var _React$createElement; - - var _this$props = this.props, - i18n = _this$props.i18n, - autoFocus = _this$props.autoFocus, - emoji = _this$props.emoji, - pickerId = _this$props.pickerId; - var _this$state = this.state, - icon = _this$state.icon, - isSearching = _this$state.isSearching, - id = _this$state.id; - var inputId = "emoji-mart-search-".concat(id); - var descriptionId = 'emoji-mart-search-description'; - return /*#__PURE__*/_react["default"].createElement("section", { - className: "emoji-mart-search", - "aria-label": i18n.search - }, /*#__PURE__*/_react["default"].createElement("input", (_React$createElement = { - id: inputId, - ref: this.setRef, - onChange: this.handleChange, - placeholder: i18n.search, - autoFocus: autoFocus, - type: "text" - }, (0, _defineProperty2["default"])(_React$createElement, "placeholder", "Search"), (0, _defineProperty2["default"])(_React$createElement, "role", "textbox"), (0, _defineProperty2["default"])(_React$createElement, "aria-owns", pickerId), (0, _defineProperty2["default"])(_React$createElement, "aria-label", "Search for an emoji"), (0, _defineProperty2["default"])(_React$createElement, "aria-describedby", descriptionId), (0, _defineProperty2["default"])(_React$createElement, "aria-activedescendant", emoji ? "emoji-mart-".concat(emoji.id) : ''), _React$createElement)), /*#__PURE__*/_react["default"].createElement("label", { - className: "emoji-mart-sr-only", - htmlFor: inputId, - id: descriptionId - }, i18n.search, ": Use the left, right, up and down arrow keys to navigate the emoji search results. Use escape key to deselect an emoji and focus on search bar."), /*#__PURE__*/_react["default"].createElement("button", { - className: "emoji-mart-search-icon", - onClick: this.clear, - onKeyUp: this.handleKeyUp, - "aria-label": i18n.clear, - disabled: !isSearching - }, icon())); - } - }]); - return Search; -}(_react["default"].PureComponent); - -exports["default"] = Search; -Search.propTypes -/* remove-proptypes */ -= { - emoji: _propTypes["default"].object, - onSearch: _propTypes["default"].func, - maxResults: _propTypes["default"].number, - emojisToShowFilter: _propTypes["default"].func, - autoFocus: _propTypes["default"].bool -}; -Search.defaultProps = { - emoji: null, - onSearch: function onSearch() {}, - maxResults: 75, - emojisToShowFilter: null, - autoFocus: false -}; -}); - -var nimblePicker = createCommonjsModule(function (module, exports) { - - - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _assertThisInitialized2 = interopRequireDefault(assertThisInitialized); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _propTypes = interopRequireDefault(propTypes); - -var icons = _interopRequireWildcard(svgs); - -var _store = interopRequireDefault(store); - -var _frequently = interopRequireDefault(frequently_1); - - - - - - - -var _anchors = interopRequireDefault(anchors); - -var _category = interopRequireDefault(category); - -var _preview = interopRequireDefault(preview); - -var _search = interopRequireDefault(search); - - - -function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== "function") return null; - var cacheBabelInterop = new WeakMap(); - var cacheNodeInterop = new WeakMap(); - return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { - return nodeInterop ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); -} - -function _interopRequireWildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) { - return obj; - } - - if (obj === null || _typeof_1(obj) !== "object" && typeof obj !== "function") { - return { - "default": obj - }; - } - - var cache = _getRequireWildcardCache(nodeInterop); - - if (cache && cache.has(obj)) { - return cache.get(obj); - } - - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - - for (var key in obj) { - if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - - newObj["default"] = obj; - - if (cache) { - cache.set(obj, newObj); - } - - return newObj; -} - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var I18N = { - search: 'Search', - clear: 'Clear', - // Accessible label on "clear" button - notfound: 'No Emoji Found', - skintext: 'Choose your default skin tone', - categories: { - search: 'Search Results', - recent: 'Frequently Used', - people: 'Smileys & People', - nature: 'Animals & Nature', - foods: 'Food & Drink', - activity: 'Activity', - places: 'Travel & Places', - objects: 'Objects', - symbols: 'Symbols', - flags: 'Flags', - custom: 'Custom' - }, - categorieslabel: 'Emoji categories', - // Accessible title for the list of categories - skintones: { - 1: 'Default Skin Tone', - 2: 'Light Skin Tone', - 3: 'Medium-Light Skin Tone', - 4: 'Medium Skin Tone', - 5: 'Medium-Dark Skin Tone', - 6: 'Dark Skin Tone' - } -}; - -var NimblePicker = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(NimblePicker, _React$PureComponent); - - var _super = _createSuper(NimblePicker); - - function NimblePicker(props) { - var _this; - - (0, _classCallCheck2["default"])(this, NimblePicker); - _this = _super.call(this, props); - _this.CUSTOM = []; - _this.RECENT_CATEGORY = { - id: 'recent', - name: 'Recent', - emojis: null - }; - _this.SEARCH_CATEGORY = { - id: 'search', - name: 'Search', - emojis: null, - anchor: false - }; - - if (props.data.compressed) { - (0, data.uncompress)(props.data); - } - - _this.data = props.data; - _this.i18n = (0, utils.deepMerge)(I18N, props.i18n); - _this.icons = (0, utils.deepMerge)(icons, props.icons); - _this.state = { - firstRender: true, - emoji: null - }; - _this.categories = []; - var allCategories = [].concat(_this.data.categories); - - if (props.custom.length > 0) { - var customCategories = {}; - var customCategoriesCreated = 0; - props.custom.forEach(function (emoji) { - if (!customCategories[emoji.customCategory]) { - customCategories[emoji.customCategory] = { - id: emoji.customCategory ? "custom-".concat(emoji.customCategory) : 'custom', - name: emoji.customCategory || 'Custom', - emojis: [], - anchor: customCategoriesCreated === 0 - }; - customCategoriesCreated++; - } - - var category = customCategories[emoji.customCategory]; - - var customEmoji = _objectSpread(_objectSpread({}, emoji), {}, { - // `` expects emoji to have an `id`. - id: emoji.short_names[0], - custom: true - }); - - category.emojis.push(customEmoji); - - _this.CUSTOM.push(customEmoji); - }); - allCategories = allCategories.concat(Object.keys(customCategories).map(function (key) { - return customCategories[key]; - })); - } - - _this.hideRecent = true; - - if (props.include != undefined) { - allCategories.sort(function (a, b) { - if (props.include.indexOf(a.id) > props.include.indexOf(b.id)) { - return 1; - } - - return -1; - }); - } - - for (var categoryIndex = 0; categoryIndex < allCategories.length; categoryIndex++) { - var category = allCategories[categoryIndex]; - var isIncluded = props.include && props.include.length ? props.include.indexOf(category.id) > -1 : true; - var isExcluded = props.exclude && props.exclude.length ? props.exclude.indexOf(category.id) > -1 : false; - - if (!isIncluded || isExcluded) { - continue; - } - - if (props.emojisToShowFilter) { - var newEmojis = []; - var emojis = category.emojis; - - for (var emojiIndex = 0; emojiIndex < emojis.length; emojiIndex++) { - var emoji = emojis[emojiIndex]; - - if (props.emojisToShowFilter(_this.data.emojis[emoji] || emoji)) { - newEmojis.push(emoji); - } - } - - if (newEmojis.length) { - var newCategory = { - emojis: newEmojis, - name: category.name, - id: category.id - }; - - _this.categories.push(newCategory); - } - } else { - _this.categories.push(category); - } - } - - var includeRecent = props.include && props.include.length ? props.include.indexOf(_this.RECENT_CATEGORY.id) > -1 : true; - var excludeRecent = props.exclude && props.exclude.length ? props.exclude.indexOf(_this.RECENT_CATEGORY.id) > -1 : false; - - if (includeRecent && !excludeRecent) { - _this.hideRecent = false; - - _this.categories.unshift(_this.RECENT_CATEGORY); - } - - if (_this.categories[0]) { - _this.categories[0].first = true; - } - - _this.categories.unshift(_this.SEARCH_CATEGORY); - - _this.getEmojiIndex = _this.getEmojiIndex.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setAnchorsRef = _this.setAnchorsRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleAnchorClick = _this.handleAnchorClick.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setSearchRef = _this.setSearchRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleSearch = _this.handleSearch.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setScrollRef = _this.setScrollRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleScroll = _this.handleScroll.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleScrollPaint = _this.handleScrollPaint.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleEmojiOver = _this.handleEmojiOver.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleEmojiLeave = _this.handleEmojiLeave.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleEmojiClick = _this.handleEmojiClick.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleEmojiSelect = _this.handleEmojiSelect.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleEmojiKeyDown = _this.handleEmojiKeyDown.bind((0, _assertThisInitialized2["default"])(_this)); - _this.setPreviewRef = _this.setPreviewRef.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleSkinChange = _this.handleSkinChange.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2["default"])(_this)); - _this.handleDarkMatchMediaChange = _this.handleDarkMatchMediaChange.bind((0, _assertThisInitialized2["default"])(_this)); - return _this; - } - - (0, _createClass2["default"])(NimblePicker, [{ - key: "componentDidMount", - value: function componentDidMount() { - var _this2 = this; - - if (this.state.firstRender) { - this.testStickyPosition(); - this.firstRenderTimeout = setTimeout(function () { - _this2.setState({ - firstRender: false - }); - }, 60); - } - } - }, { - key: "componentDidUpdate", - value: function componentDidUpdate() { - this.updateCategoriesSize(); - this.handleScroll(); - } - }, { - key: "componentWillUnmount", - value: function componentWillUnmount() { - this.SEARCH_CATEGORY.emojis = null; - clearTimeout(this.leaveTimeout); - clearTimeout(this.firstRenderTimeout); - - if (this.darkMatchMedia) { - this.darkMatchMedia.removeListener(this.handleDarkMatchMediaChange); - } - } - }, { - key: "testStickyPosition", - value: function testStickyPosition() { - var stickyTestElement = document.createElement('div'); - var prefixes = ['', '-webkit-', '-ms-', '-moz-', '-o-']; - prefixes.forEach(function (prefix) { - return stickyTestElement.style.position = "".concat(prefix, "sticky"); - }); - this.hasStickyPosition = !!stickyTestElement.style.position.length; - } - }, { - key: "getPreferredTheme", - value: function getPreferredTheme() { - if (this.props.theme != 'auto') return this.props.theme; - if (this.state.theme) return this.state.theme; - if (typeof matchMedia !== 'function') return sharedDefaultProps.PickerDefaultProps.theme; - - if (!this.darkMatchMedia) { - this.darkMatchMedia = matchMedia('(prefers-color-scheme: dark)'); - this.darkMatchMedia.addListener(this.handleDarkMatchMediaChange); - } - - if (this.darkMatchMedia.media.match(/^not/)) return sharedDefaultProps.PickerDefaultProps.theme; - return this.darkMatchMedia.matches ? 'dark' : 'light'; - } - }, { - key: "getEmojiIndex", - value: function getEmojiIndex(row, column) { - var perLine = this.props.perLine; - return row * perLine + column; - } - }, { - key: "handleDarkMatchMediaChange", - value: function handleDarkMatchMediaChange() { - this.setState({ - theme: this.darkMatchMedia.matches ? 'dark' : 'light' - }); - } - }, { - key: "handleEmojiOver", - value: function handleEmojiOver(emoji) { - var preview = this.preview; - - if (!preview) { - return; - } // Use Array.prototype.find() when it is more widely supported. - - - var emojiData = this.CUSTOM.filter(function (customEmoji) { - return customEmoji.id === emoji.id; - })[0]; - - for (var key in emojiData) { - if (emojiData.hasOwnProperty(key)) { - emoji[key] = emojiData[key]; - } - } - - this.setState({ - emoji: emoji - }); - clearTimeout(this.leaveTimeout); - } - }, { - key: "handleEmojiLeave", - value: function handleEmojiLeave(emoji) { - var _this3 = this; - - var preview = this.preview; - - if (!preview) { - return; - } - - this.leaveTimeout = setTimeout(function () { - _this3.setState({ - emoji: null - }); - }, 16); - } - }, { - key: "handleEmojiKeyDown", - value: function handleEmojiKeyDown(e, _, _ref) { - var _this4 = this; - - var category = _ref.category, - row = _ref.row, - column = _ref.column; - var perLine = this.props.perLine; - var categoryIndex = this.categories.findIndex(function (_ref2) { - var id = _ref2.id; - return id === category; - }); - - var getEmojiInCategory = function getEmojiInCategory(categoryIndex) { - var emojisInCategory = categoryIndex === 1 ? _frequently["default"].get(perLine) : _this4.categories[categoryIndex].emojis; - return emojisInCategory; - }; - - var getLastEmojiIndex = function getLastEmojiIndex(categoryIndex) { - var emojisInCategory = getEmojiInCategory(categoryIndex); - var lastEmojiIndex = emojisInCategory.length - 1; - return lastEmojiIndex; - }; - - var newRow; - var newColumn; - var newCategoryIndex = categoryIndex; - var emojiIndex; - var lastEmojiIndex = getLastEmojiIndex(categoryIndex); - - switch (e.key) { - case 'Tab': - // Focus on first category anchor - this.anchors.buttons.firstChild.focus(); - return; - - case 'ArrowLeft': - newRow = row; - newColumn = column - 1; // Get Emoji at (row, column - 1) or (row - 1, lastColumn) - - emojiIndex = this.getEmojiIndex(newRow, newColumn); - - if (emojiIndex < 0) { - newCategoryIndex = categoryIndex - 1; - - if (newCategoryIndex < 1) { - return; - } // Get last Emoji in previous category - - - emojiIndex = getLastEmojiIndex(newCategoryIndex); - } - - break; - - case 'ArrowUp': - newRow = row - 1; - newColumn = column; // Get Emoji at (row - 1, column) - - emojiIndex = this.getEmojiIndex(newRow, newColumn); - - if (emojiIndex < 0) { - newCategoryIndex = categoryIndex - 1; - - if (newCategoryIndex < 1) { - return; - } - - var numOfItemsOnLastRow = getEmojiInCategory(newCategoryIndex).length % perLine; - - if (numOfItemsOnLastRow === 0) { - // If last row of previous category is full - // Get Emoji in previous category at (lastRow, column) - newRow = Math.floor(getEmojiInCategory(newCategoryIndex).length / perLine) - 1; - emojiIndex = this.getEmojiIndex(newRow, newColumn); - } else if (newColumn >= numOfItemsOnLastRow) { - // If last row of previous category doesn't have items above current item - // Get last Emoji in previous category - emojiIndex = getLastEmojiIndex(newCategoryIndex); - } else { - // If last row of previous category has items above current item - // Get Emoji in previous category at (lastRow, column) - newRow = Math.floor(getEmojiInCategory(newCategoryIndex).length / perLine); - emojiIndex = this.getEmojiIndex(newRow, newColumn); - } - } - - break; - - case 'ArrowRight': - newRow = row; - newColumn = column + 1; // Get Emoji at (row, column + 1) or on (row + 1, 0) - - emojiIndex = this.getEmojiIndex(newRow, newColumn); - - if (emojiIndex > lastEmojiIndex) { - newCategoryIndex = categoryIndex + 1; - - if (newCategoryIndex >= this.categories.length) { - return; - } // Get first Emoji in next category - - - emojiIndex = 0; - } - - break; - - case 'ArrowDown': - newRow = row + 1; - newColumn = column; // Get Emoji at (row + 1, column) - - emojiIndex = this.getEmojiIndex(newRow, newColumn); - - if (emojiIndex > lastEmojiIndex) { - newCategoryIndex = categoryIndex + 1; - - if (newCategoryIndex >= this.categories.length) { - return; - } // Get Emoji in next category at (0, column) - - - emojiIndex = this.getEmojiIndex(0, newColumn); - } - - break; - - default: - return; - } - - e.preventDefault(); - e.stopPropagation(); - var emojis = getEmojiInCategory(newCategoryIndex); - var categoryRef = this.categoryRefs["category-".concat(newCategoryIndex)]; - var cells = categoryRef.emojiTableRef.querySelectorAll('button'); - var emojiEl = cells[emojiIndex]; - var emoji = emojis[emojiIndex]; - emojiEl.focus(); - var emojiToPreview = (0, utils.getSanitizedData)(emoji, this.state.skin, this.props.set, this.props.data); - var preview = this.preview; - - if (!preview) { - return; - } - - var emojiData = this.CUSTOM.filter(function (customEmoji) { - return customEmoji.id === emojiToPreview.id; - })[0]; - - for (var key in emojiData) { - if (emojiData.hasOwnProperty(key)) { - emoji[key] = emojiData[key]; - } - } - - this.setState({ - emoji: emojiToPreview - }); - clearTimeout(this.leaveTimeout); - } - }, { - key: "handleEmojiClick", - value: function handleEmojiClick(emoji, e) { - this.props.onClick(emoji, e); - this.handleEmojiSelect(emoji); - this.search.clear(); - this.anchors.setState({ - selected: 'Recent' - }); - } - }, { - key: "handleEmojiSelect", - value: function handleEmojiSelect(emoji) { - var _this5 = this; - - this.props.onSelect(emoji); - if (!this.hideRecent && !this.props.recent) _frequently["default"].add(emoji); - var component = this.categoryRefs['category-1']; - - if (component) { - var maxMargin = component.maxMargin; - - if (this.props.enableFrequentEmojiSort) { - component.forceUpdate(); - } - - requestAnimationFrame(function () { - if (!_this5.scroll) return; - component.memoizeSize(); - if (maxMargin == component.maxMargin) return; - - _this5.updateCategoriesSize(); - - _this5.handleScrollPaint(); - - if (_this5.SEARCH_CATEGORY.emojis) { - component.updateDisplay('none'); - } - }); - } - } - }, { - key: "handleScroll", - value: function handleScroll() { - if (!this.waitingForPaint) { - this.waitingForPaint = true; - requestAnimationFrame(this.handleScrollPaint); - } - } - }, { - key: "handleScrollPaint", - value: function handleScrollPaint() { - this.waitingForPaint = false; - - if (!this.scroll) { - return; - } - - var activeCategory = null; - - if (this.SEARCH_CATEGORY.emojis) { - activeCategory = this.SEARCH_CATEGORY; - } else { - var target = this.scroll, - scrollTop = target.scrollTop, - scrollingDown = scrollTop > (this.scrollTop || 0), - minTop = 0; - - for (var i = 0, l = this.categories.length; i < l; i++) { - var ii = scrollingDown ? this.categories.length - 1 - i : i, - category = this.categories[ii], - component = this.categoryRefs["category-".concat(ii)]; - - if (component) { - var active = component.handleScroll(scrollTop); - - if (!minTop || component.top < minTop) { - if (component.top > 0) { - minTop = component.top; - } - } - - if (active && !activeCategory) { - activeCategory = category; - } - } - } - - if (scrollTop < minTop) { - activeCategory = this.categories.filter(function (category) { - return !(category.anchor === false); - })[0]; - } else if (scrollTop + this.clientHeight >= this.scrollHeight) { - activeCategory = this.categories[this.categories.length - 1]; - } - } - - if (activeCategory) { - var anchors = this.anchors, - _activeCategory = activeCategory, - categoryName = _activeCategory.name; - - if (anchors.state.selected != categoryName) { - anchors.setState({ - selected: categoryName - }); - } - } - - this.scrollTop = scrollTop; - } - }, { - key: "handleSearch", - value: function handleSearch(emojis) { - this.SEARCH_CATEGORY.emojis = emojis; - - for (var i = 0, l = this.categories.length; i < l; i++) { - var component = this.categoryRefs["category-".concat(i)]; - - if (component && component.props.name != 'Search') { - var display = emojis ? 'none' : 'inherit'; - component.updateDisplay(display); - } - } - - if (emojis) { - var emojiIndex = 0; - var emoji = emojis[emojiIndex]; - var emojiToPreview = (0, utils.getSanitizedData)(emoji, this.state.skin, this.props.set, this.props.data); - var preview = this.preview; - - if (!preview) { - return; - } - - var emojiData = this.CUSTOM.filter(function (customEmoji) { - return customEmoji.id === emojiToPreview.id; - })[0]; - - for (var key in emojiData) { - if (emojiData.hasOwnProperty(key)) { - emoji[key] = emojiData[key]; - } - } - - this.setState({ - emoji: emojiToPreview - }); - } - - this.forceUpdate(); - - if (this.scroll) { - this.scroll.scrollTop = 0; - } - - this.handleScroll(); - } - }, { - key: "handleAnchorClick", - value: function handleAnchorClick(category, i) { - var component = this.categoryRefs["category-".concat(i)], - scroll = this.scroll; - this.anchors; - var scrollToComponent = null; - - scrollToComponent = function scrollToComponent() { - if (component) { - var top = component.top; - - if (category.first) { - top = 0; - } else { - top += 1; - } - - scroll.scrollTop = top; - } - }; - - if (this.SEARCH_CATEGORY.emojis) { - this.handleSearch(null); - this.search.clear(); - requestAnimationFrame(scrollToComponent); - } else { - scrollToComponent(); - } - } - }, { - key: "handleSkinChange", - value: function handleSkinChange(skin) { - var newState = { - skin: skin - }, - onSkinChange = this.props.onSkinChange; - this.setState(newState); - - _store["default"].update(newState); - - onSkinChange(skin); - } - }, { - key: "handleKeyDown", - value: function handleKeyDown(e) { - var _this6 = this; - - var handled = false; - var perLine = this.props.perLine; - - var getEmojiInCategory = function getEmojiInCategory(categoryIndex) { - var emojisInCategory = categoryIndex === 1 ? _frequently["default"].get(perLine) : _this6.categories[categoryIndex].emojis; - return emojisInCategory; - }; - - switch (e.key) { - case 'Enter': - this.handleEmojiSelect(this.state.emoji); - this.search.clear(); - this.anchors.setState({ - selected: 'Recent' - }); - handled = true; - break; - - case 'Escape': - // Jump to search text input - this.search.input.focus(); - handled = true; - break; - - case 'ArrowDown': - var activeCategory = this.anchors.state.selected; - var activeCategoryIndex = this.categories.findIndex(function (_ref3) { - var name = _ref3.name; - return name === activeCategory; - }); - var emojis = getEmojiInCategory(activeCategoryIndex); - var categoryRef = this.categoryRefs["category-".concat(activeCategoryIndex)]; - var cells = categoryRef.emojiTableRef.querySelectorAll('button'); - var emojiEl = cells[0]; - var firstEmoji = emojis[0]; - emojiEl.focus(); - var emojiToPreview = (0, utils.getSanitizedData)(firstEmoji, this.state.skin, this.props.set, this.props.data); - this.setState({ - emoji: emojiToPreview - }); - handled = true; - break; - } - - if (handled) { - e.preventDefault(); - } - } - }, { - key: "updateCategoriesSize", - value: function updateCategoriesSize() { - for (var i = 0, l = this.categories.length; i < l; i++) { - var component = this.categoryRefs["category-".concat(i)]; - if (component) component.memoizeSize(); - } - - if (this.scroll) { - var target = this.scroll; - this.scrollHeight = target.scrollHeight; - this.clientHeight = target.clientHeight; - } - } - }, { - key: "getCategories", - value: function getCategories() { - return this.state.firstRender ? this.categories.slice(0, 3) : this.categories; - } - }, { - key: "setAnchorsRef", - value: function setAnchorsRef(c) { - this.anchors = c; - } - }, { - key: "setSearchRef", - value: function setSearchRef(c) { - this.search = c; - } - }, { - key: "setPreviewRef", - value: function setPreviewRef(c) { - this.preview = c; - } - }, { - key: "setScrollRef", - value: function setScrollRef(c) { - this.scroll = c; - } - }, { - key: "setCategoryRef", - value: function setCategoryRef(name, c) { - if (!this.categoryRefs) { - this.categoryRefs = {}; - } - - this.categoryRefs[name] = c; - } - }, { - key: "render", - value: function render() { - var _this7 = this; - - var _this$props = this.props, - perLine = _this$props.perLine, - emojiSize = _this$props.emojiSize, - set = _this$props.set, - sheetSize = _this$props.sheetSize, - sheetColumns = _this$props.sheetColumns, - sheetRows = _this$props.sheetRows, - style = _this$props.style, - title = _this$props.title, - idleEmoji = _this$props.emoji, - color = _this$props.color, - _native = _this$props["native"], - backgroundImageFn = _this$props.backgroundImageFn, - emojisToShowFilter = _this$props.emojisToShowFilter, - showPreview = _this$props.showPreview, - showSkinTones = _this$props.showSkinTones, - emojiTooltip = _this$props.emojiTooltip, - useButton = _this$props.useButton, - include = _this$props.include, - exclude = _this$props.exclude, - recent = _this$props.recent, - autoFocus = _this$props.autoFocus, - skinEmoji = _this$props.skinEmoji, - notFound = _this$props.notFound, - notFoundEmoji = _this$props.notFoundEmoji; - var emoji = this.state.emoji; - var pickerId = 'emoji-mart-picker'; - var width = perLine * (emojiSize + 12) + 12 + 2 + (0, utils.measureScrollbar)(); - var theme = this.getPreferredTheme(); - var skin = this.props.skin || this.state.skin || _store["default"].get('skin') || this.props.defaultSkin; - return /*#__PURE__*/_react["default"].createElement("section", { - style: _objectSpread({ - width: width - }, style), - className: "emoji-mart emoji-mart-".concat(theme), - "aria-label": title, - onKeyDown: this.handleKeyDown - }, /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-bar" - }, /*#__PURE__*/_react["default"].createElement(_anchors["default"], { - ref: this.setAnchorsRef, - data: this.data, - i18n: this.i18n, - color: color, - categories: this.categories, - onAnchorClick: this.handleAnchorClick, - icons: this.icons - })), /*#__PURE__*/_react["default"].createElement(_search["default"], { - ref: this.setSearchRef, - onSearch: this.handleSearch, - data: this.data, - i18n: this.i18n, - emojisToShowFilter: emojisToShowFilter, - emoji: emoji, - include: include, - exclude: exclude, - custom: this.CUSTOM, - autoFocus: autoFocus, - pickerId: pickerId - }), /*#__PURE__*/_react["default"].createElement("div", { - id: pickerId, - ref: this.setScrollRef, - className: "emoji-mart-scroll", - onScroll: this.handleScroll - }, this.getCategories().map(function (category, i) { - return /*#__PURE__*/_react["default"].createElement(_category["default"], { - ref: _this7.setCategoryRef.bind(_this7, "category-".concat(i)), - key: category.name, - id: category.id, - name: category.name, - emojis: category.emojis, - perLine: perLine, - "native": _native, - hasStickyPosition: _this7.hasStickyPosition, - data: _this7.data, - i18n: _this7.i18n, - recent: category.id == _this7.RECENT_CATEGORY.id ? recent : undefined, - custom: category.id == _this7.RECENT_CATEGORY.id ? _this7.CUSTOM : undefined, - emojiProps: { - "native": _native, - skin: skin, - size: emojiSize, - set: set, - sheetSize: sheetSize, - sheetColumns: sheetColumns, - sheetRows: sheetRows, - forceSize: _native, - tooltip: emojiTooltip, - backgroundImageFn: backgroundImageFn, - useButton: useButton, - onOver: _this7.handleEmojiOver, - onLeave: _this7.handleEmojiLeave, - onClick: _this7.handleEmojiClick, - onKeyDown: _this7.handleEmojiKeyDown - }, - notFound: notFound, - notFoundEmoji: notFoundEmoji - }); - })), (showPreview || showSkinTones) && /*#__PURE__*/_react["default"].createElement("div", { - className: "emoji-mart-bar" - }, /*#__PURE__*/_react["default"].createElement(_preview["default"], { - ref: this.setPreviewRef, - data: this.data, - title: title, - emoji: emoji, - idleEmoji: idleEmoji, - showSkinTones: showSkinTones, - showPreview: showPreview, - emojiProps: { - "native": _native, - size: 38, - skin: skin, - set: set, - sheetSize: sheetSize, - sheetColumns: sheetColumns, - sheetRows: sheetRows, - backgroundImageFn: backgroundImageFn - }, - skinsProps: { - skin: skin, - onChange: this.handleSkinChange, - skinEmoji: skinEmoji - }, - i18n: this.i18n - }))); - } - }]); - return NimblePicker; -}(_react["default"].PureComponent); - -exports["default"] = NimblePicker; -NimblePicker.propTypes -/* remove-proptypes */ -= _objectSpread(_objectSpread({}, sharedProps.PickerPropTypes), {}, { - data: _propTypes["default"].object.isRequired -}); -NimblePicker.defaultProps = _objectSpread({}, sharedDefaultProps.PickerDefaultProps); -}); - -var picker = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -var _extends2 = interopRequireDefault(_extends_1); - -var _classCallCheck2 = interopRequireDefault(classCallCheck); - -var _createClass2 = interopRequireDefault(createClass); - -var _inherits2 = interopRequireDefault(inherits); - -var _possibleConstructorReturn2 = interopRequireDefault(possibleConstructorReturn); - -var _getPrototypeOf2 = interopRequireDefault(getPrototypeOf); - -var _react = interopRequireDefault(react); - -var _all = interopRequireDefault(require$$2); - -var _nimblePicker = interopRequireDefault(nimblePicker); - - - - - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = (0, _getPrototypeOf2["default"])(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return (0, _possibleConstructorReturn2["default"])(this, result); - }; -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -var Picker = /*#__PURE__*/function (_React$PureComponent) { - (0, _inherits2["default"])(Picker, _React$PureComponent); - - var _super = _createSuper(Picker); - - function Picker() { - (0, _classCallCheck2["default"])(this, Picker); - return _super.apply(this, arguments); - } - - (0, _createClass2["default"])(Picker, [{ - key: "render", - value: function render() { - return /*#__PURE__*/_react["default"].createElement(_nimblePicker["default"], (0, _extends2["default"])({}, this.props, this.state)); - } - }]); - return Picker; -}(_react["default"].PureComponent); - -exports["default"] = Picker; -Picker.propTypes -/* remove-proptypes */ -= sharedProps.PickerPropTypes; -Picker.defaultProps = _objectSpread(_objectSpread({}, sharedDefaultProps.PickerDefaultProps), {}, { - data: _all["default"] -}); -}); - -var emoji = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _defineProperty2 = interopRequireDefault(defineProperty); - -interopRequireDefault(react); - -var _all = interopRequireDefault(require$$2); - -var _nimbleEmoji = interopRequireDefault(nimbleEmoji); - - - - - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - (0, _defineProperty2["default"])(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -var Emoji = function Emoji(props) { - for (var k in Emoji.defaultProps) { - if (props[k] == undefined && Emoji.defaultProps[k] != undefined) { - props[k] = Emoji.defaultProps[k]; - } - } - - return (0, _nimbleEmoji["default"])(_objectSpread({}, props)); -}; - -Emoji.propTypes -/* remove-proptypes */ -= sharedProps.EmojiPropTypes; -Emoji.defaultProps = _objectSpread(_objectSpread({}, sharedDefaultProps.EmojiDefaultProps), {}, { - data: _all["default"] -}); -var _default = Emoji; -exports["default"] = _default; -}); - -var dist = createCommonjsModule(function (module, exports) { - - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "Category", { - enumerable: true, - get: function get() { - return _category["default"]; - } -}); -Object.defineProperty(exports, "Emoji", { - enumerable: true, - get: function get() { - return _emoji["default"]; - } -}); -Object.defineProperty(exports, "NimbleEmoji", { - enumerable: true, - get: function get() { - return _nimbleEmoji["default"]; - } -}); -Object.defineProperty(exports, "NimbleEmojiIndex", { - enumerable: true, - get: function get() { - return _nimbleEmojiIndex["default"]; - } -}); -Object.defineProperty(exports, "NimblePicker", { - enumerable: true, - get: function get() { - return _nimblePicker["default"]; - } -}); -Object.defineProperty(exports, "Picker", { - enumerable: true, - get: function get() { - return _picker["default"]; - } -}); -Object.defineProperty(exports, "emojiIndex", { - enumerable: true, - get: function get() { - return _emojiIndex["default"]; - } -}); -Object.defineProperty(exports, "frequently", { - enumerable: true, - get: function get() { - return _frequently["default"]; - } -}); -Object.defineProperty(exports, "getEmojiDataFromNative", { - enumerable: true, - get: function get() { - return utils.getEmojiDataFromNative; - } -}); -Object.defineProperty(exports, "store", { - enumerable: true, - get: function get() { - return _store["default"]; - } -}); - -var _emojiIndex = interopRequireDefault(emojiIndex_1); - -var _nimbleEmojiIndex = interopRequireDefault(nimbleEmojiIndex); - -var _store = interopRequireDefault(store); - -var _frequently = interopRequireDefault(frequently_1); - - - -var _picker = interopRequireDefault(picker); - -var _nimblePicker = interopRequireDefault(nimblePicker); - -var _emoji = interopRequireDefault(emoji); - -var _nimbleEmoji = interopRequireDefault(nimbleEmoji); - -var _category = interopRequireDefault(category); -}); - -var compressed = true; var categories = [ { id: "people", - name: "Smileys & People", emojis: [ "grinning", "smiley", @@ -64018,6 +55945,7 @@ var categories = [ "joy", "slightly_smiling_face", "upside_down_face", + "melting_face", "wink", "blush", "innocent", @@ -64029,6 +55957,7 @@ var categories = [ "relaxed", "kissing_closed_eyes", "kissing_smiling_eyes", + "smiling_face_with_tear", "yum", "stuck_out_tongue", "stuck_out_tongue_winking_eye", @@ -64037,18 +55966,25 @@ var categories = [ "money_mouth_face", "hugging_face", "face_with_hand_over_mouth", + "face_with_open_eyes_and_hand_over_mouth", + "face_with_peeking_eye", "shushing_face", "thinking_face", + "saluting_face", "zipper_mouth_face", "face_with_raised_eyebrow", "neutral_face", "expressionless", "no_mouth", + "dotted_line_face", + "face_in_clouds", "smirk", "unamused", "face_with_rolling_eyes", "grimacing", + "face_exhaling", "lying_face", + "shaking_face", "relieved", "pensive", "sleepy", @@ -64064,13 +56000,16 @@ var categories = [ "cold_face", "woozy_face", "dizzy_face", + "face_with_spiral_eyes", "exploding_head", "face_with_cowboy_hat", "partying_face", + "disguised_face", "sunglasses", "nerd_face", "face_with_monocle", "confused", + "face_with_diagonal_mouth", "worried", "slightly_frowning_face", "white_frowning_face", @@ -64079,6 +56018,7 @@ var categories = [ "astonished", "flushed", "pleading_face", + "face_holding_back_tears", "frowning", "anguished", "fearful", @@ -64109,28 +56049,23 @@ var categories = [ "ghost", "alien", "space_invader", - "robot_face", - "smiley_cat", - "smile_cat", - "joy_cat", - "heart_eyes_cat", - "smirk_cat", - "kissing_cat", - "scream_cat", - "crying_cat_face", - "pouting_cat", - "see_no_evil", - "hear_no_evil", - "speak_no_evil", "wave", "raised_back_of_hand", "raised_hand_with_fingers_splayed", "hand", "spock-hand", + "rightwards_hand", + "leftwards_hand", + "palm_down_hand", + "palm_up_hand", + "leftwards_pushing_hand", + "rightwards_pushing_hand", "ok_hand", + "pinched_fingers", "pinching_hand", "v", "crossed_fingers", + "hand_with_index_finger_and_thumb_crossed", "i_love_you_hand_sign", "the_horns", "call_me_hand", @@ -64140,6 +56075,7 @@ var categories = [ "middle_finger", "point_down", "point_up", + "index_pointing_at_the_viewer", "+1", "-1", "fist", @@ -64148,6 +56084,7 @@ var categories = [ "right-facing_fist", "clap", "raised_hands", + "heart_hands", "open_hands", "palms_up_together", "handshake", @@ -64164,12 +56101,15 @@ var categories = [ "ear_with_hearing_aid", "nose", "brain", + "anatomical_heart", + "lungs", "tooth", "bone", "eyes", "eye", "tongue", "lips", + "biting_lip", "baby", "child", "boy", @@ -64178,15 +56118,21 @@ var categories = [ "person_with_blond_hair", "man", "bearded_person", + "man_with_beard", + "woman_with_beard", "red_haired_man", "curly_haired_man", "white_haired_man", "bald_man", "woman", "red_haired_woman", + "red_haired_person", "curly_haired_woman", + "curly_haired_person", "white_haired_woman", + "white_haired_person", "bald_woman", + "bald_person", "blond-haired-woman", "blond-haired-man", "older_adult", @@ -64222,36 +56168,52 @@ var categories = [ "shrug", "man-shrugging", "woman-shrugging", + "health_worker", "male-doctor", "female-doctor", + "student", "male-student", "female-student", + "teacher", "male-teacher", "female-teacher", + "judge", "male-judge", "female-judge", + "farmer", "male-farmer", "female-farmer", + "cook", "male-cook", "female-cook", + "mechanic", "male-mechanic", "female-mechanic", + "factory_worker", "male-factory-worker", "female-factory-worker", + "office_worker", "male-office-worker", "female-office-worker", + "scientist", "male-scientist", "female-scientist", + "technologist", "male-technologist", "female-technologist", + "singer", "male-singer", "female-singer", + "artist", "male-artist", "female-artist", + "pilot", "male-pilot", "female-pilot", + "astronaut", "male-astronaut", "female-astronaut", + "firefighter", "male-firefighter", "female-firefighter", "cop", @@ -64263,9 +56225,11 @@ var categories = [ "guardsman", "male-guard", "female-guard", + "ninja", "construction_worker", "male-construction-worker", "female-construction-worker", + "person_with_crown", "prince", "princess", "man_with_turban", @@ -64273,13 +56237,23 @@ var categories = [ "woman-wearing-turban", "man_with_gua_pi_mao", "person_with_headscarf", + "person_in_tuxedo", "man_in_tuxedo", + "woman_in_tuxedo", "bride_with_veil", + "man_with_veil", + "woman_with_veil", "pregnant_woman", + "pregnant_man", + "pregnant_person", "breast-feeding", + "woman_feeding_baby", + "man_feeding_baby", + "person_feeding_baby", "angel", "santa", "mrs_claus", + "mx_claus", "superhero", "male_superhero", "female_superhero", @@ -64307,6 +56281,7 @@ var categories = [ "zombie", "male_zombie", "female_zombie", + "troll", "massage", "man-getting-massage", "woman-getting-massage", @@ -64322,10 +56297,13 @@ var categories = [ "kneeling_person", "man_kneeling", "woman_kneeling", + "person_with_probing_cane", "man_with_probing_cane", "woman_with_probing_cane", + "person_in_motorized_wheelchair", "man_in_motorized_wheelchair", "woman_in_motorized_wheelchair", + "person_in_manual_wheelchair", "man_in_manual_wheelchair", "woman_in_manual_wheelchair", "runner", @@ -64335,8 +56313,8 @@ var categories = [ "man_dancing", "man_in_business_suit_levitating", "dancers", - "man-with-bunny-ears-partying", - "woman-with-bunny-ears-partying", + "men-with-bunny-ears-partying", + "women-with-bunny-ears-partying", "person_in_steamy_room", "man_in_steamy_room", "woman_in_steamy_room", @@ -64393,7 +56371,7 @@ var categories = [ "sleeping_accommodation", "people_holding_hands", "two_women_holding_hands", - "couple", + "man_and_woman_holding_hands", "two_men_holding_hands", "couplekiss", "woman-kiss-man", @@ -64432,8 +56410,21 @@ var categories = [ "speaking_head_in_silhouette", "bust_in_silhouette", "busts_in_silhouette", + "people_hugging", "footprints", - "kiss", + "robot_face", + "smiley_cat", + "smile_cat", + "joy_cat", + "heart_eyes_cat", + "smirk_cat", + "kissing_cat", + "scream_cat", + "crying_cat_face", + "pouting_cat", + "see_no_evil", + "hear_no_evil", + "speak_no_evil", "love_letter", "cupid", "gift_heart", @@ -64445,15 +56436,21 @@ var categories = [ "heart_decoration", "heavy_heart_exclamation_mark_ornament", "broken_heart", + "heart_on_fire", + "mending_heart", "heart", + "pink_heart", "orange_heart", "yellow_heart", "green_heart", "blue_heart", + "light_blue_heart", "purple_heart", "brown_heart", "black_heart", + "grey_heart", "white_heart", + "kiss", "100", "anger", "boom", @@ -64461,8 +56458,8 @@ var categories = [ "sweat_drops", "dash", "hole", - "bomb", "speech_balloon", + "eye-in-speech-bubble", "left_speech_bubble", "right_anger_bubble", "thought_balloon", @@ -64471,7 +56468,6 @@ var categories = [ }, { id: "nature", - name: "Animals & Nature", emojis: [ "monkey_face", "monkey", @@ -64487,15 +56483,19 @@ var categories = [ "raccoon", "cat", "cat2", + "black_cat", "lion_face", "tiger", "tiger2", "leopard", "horse", + "moose", + "donkey", "racehorse", "unicorn_face", "zebra_face", "deer", + "bison", "cow", "ox", "water_buffalo", @@ -64512,6 +56512,7 @@ var categories = [ "llama", "giraffe_face", "elephant", + "mammoth", "rhinoceros", "hippopotamus", "mouse", @@ -64521,9 +56522,11 @@ var categories = [ "rabbit", "rabbit2", "chipmunk", + "beaver", "hedgehog", "bat", "bear", + "polar_bear", "koala", "panda_face", "sloth", @@ -64545,9 +56548,14 @@ var categories = [ "duck", "swan", "owl", + "dodo", + "feather", "flamingo", "peacock", "parrot", + "wing", + "black_bird", + "goose", "frog", "crocodile", "turtle", @@ -64560,27 +56568,35 @@ var categories = [ "whale", "whale2", "dolphin", + "seal", "fish", "tropical_fish", "blowfish", "shark", "octopus", "shell", + "coral", + "jellyfish", "snail", "butterfly", "bug", "ant", "bee", "beetle", + "ladybug", "cricket", + "cockroach", "spider", "spider_web", "scorpion", "mosquito", + "fly", + "worm", "microbe", "bouquet", "cherry_blossom", "white_flower", + "lotus", "rosette", "rose", "wilted_flower", @@ -64588,7 +56604,9 @@ var categories = [ "sunflower", "blossom", "tulip", + "hyacinth", "seedling", + "potted_plant", "evergreen_tree", "deciduous_tree", "palm_tree", @@ -64599,12 +56617,14 @@ var categories = [ "four_leaf_clover", "maple_leaf", "fallen_leaf", - "leaves" + "leaves", + "empty_nest", + "nest_with_eggs", + "mushroom" ] }, { id: "foods", - name: "Food & Drink", emojis: [ "grapes", "melon", @@ -64620,8 +56640,10 @@ var categories = [ "peach", "cherries", "strawberry", + "blueberries", "kiwifruit", "tomato", + "olive", "coconut", "avocado", "eggplant", @@ -64629,17 +56651,21 @@ var categories = [ "carrot", "corn", "hot_pepper", + "bell_pepper", "cucumber", "leafy_green", "broccoli", "garlic", "onion", - "mushroom", "peanuts", + "beans", "chestnut", + "ginger_root", + "pea_pod", "bread", "croissant", "baguette_bread", + "flatbread", "pretzel", "bagel", "pancakes", @@ -64656,12 +56682,14 @@ var categories = [ "sandwich", "taco", "burrito", + "tamale", "stuffed_flatbread", "falafel", "egg", "fried_egg", "shallow_pan_of_food", "stew", + "fondue", "bowl_with_spoon", "green_salad", "popcorn", @@ -64707,6 +56735,7 @@ var categories = [ "baby_bottle", "glass_of_milk", "coffee", + "teapot", "tea", "sake", "champagne", @@ -64717,7 +56746,9 @@ var categories = [ "beers", "clinking_glasses", "tumbler_glass", + "pouring_liquid", "cup_with_straw", + "bubble_tea", "beverage_box", "mate_drink", "ice_cube", @@ -64726,12 +56757,12 @@ var categories = [ "fork_and_knife", "spoon", "hocho", + "jar", "amphora" ] }, { id: "activity", - name: "Activities", emojis: [ "jack_o_lantern", "christmas_tree", @@ -64790,15 +56821,19 @@ var categories = [ "dart", "yo-yo", "kite", + "gun", "8ball", "crystal_ball", - "nazar_amulet", + "magic_wand", "video_game", "joystick", "slot_machine", "game_die", "jigsaw", "teddy_bear", + "pinata", + "mirror_ball", + "nesting_dolls", "spades", "hearts", "diamonds", @@ -64811,12 +56846,13 @@ var categories = [ "frame_with_picture", "art", "thread", - "yarn" + "sewing_needle", + "yarn", + "knot" ] }, { id: "places", - name: "Travel & Places", emojis: [ "earth_africa", "earth_americas", @@ -64838,6 +56874,9 @@ var categories = [ "classical_building", "building_construction", "bricks", + "rock", + "wood", + "hut", "house_buildings", "derelict_house_building", "house", @@ -64876,6 +56915,7 @@ var categories = [ "bridge_at_night", "hotsprings", "carousel_horse", + "playground_slide", "ferris_wheel", "roller_coaster", "barber", @@ -64905,6 +56945,7 @@ var categories = [ "car", "oncoming_automobile", "blue_car", + "pickup_truck", "truck", "articulated_lorry", "tractor", @@ -64917,17 +56958,20 @@ var categories = [ "bike", "scooter", "skateboard", + "roller_skate", "busstop", "motorway", "railway_track", "oil_drum", "fuelpump", + "wheel", "rotating_light", "traffic_light", "vertical_traffic_light", "octagonal_sign", "construction", "anchor", + "ring_buoy", "boat", "canoe", "speedboat", @@ -65032,7 +57076,6 @@ var categories = [ }, { id: "objects", - name: "Objects", emojis: [ "eyeglasses", "dark_sunglasses", @@ -65054,11 +57097,13 @@ var categories = [ "shorts", "bikini", "womans_clothes", + "folding_hand_fan", "purse", "handbag", "pouch", "shopping_bags", "school_satchel", + "thong_sandal", "mans_shoe", "athletic_shoe", "hiking_boot", @@ -65067,11 +57112,13 @@ var categories = [ "sandal", "ballet_shoes", "boot", + "hair_pick", "crown", "womans_hat", "tophat", "mortar_board", "billed_cap", + "military_helmet", "helmet_with_white_cross", "prayer_beads", "lipstick", @@ -65096,12 +57143,16 @@ var categories = [ "headphones", "radio", "saxophone", + "accordion", "guitar", "musical_keyboard", "trumpet", "violin", "banjo", "drum_with_drumsticks", + "long_drum", + "maracas", + "flute", "iphone", "calling", "phone", @@ -65109,6 +57160,7 @@ var categories = [ "pager", "fax", "battery", + "low_battery", "electric_plug", "computer", "desktop_computer", @@ -65155,6 +57207,7 @@ var categories = [ "bookmark", "label", "moneybag", + "coin", "yen", "dollar", "euro", @@ -65163,8 +57216,6 @@ var categories = [ "credit_card", "receipt", "chart", - "currency_exchange", - "heavy_dollar_sign", "email", "e-mail", "incoming_envelope", @@ -65221,10 +57272,13 @@ var categories = [ "hammer_and_wrench", "dagger_knife", "crossed_swords", - "gun", + "bomb", + "boomerang", "bow_and_arrow", "shield", + "carpentry_saw", "wrench", + "screwdriver", "nut_and_bolt", "gear", "compression", @@ -65232,8 +57286,10 @@ var categories = [ "probing_cane", "link", "chains", + "hook", "toolbox", "magnet", + "ladder", "alembic", "test_tube", "petri_dish", @@ -65245,33 +57301,47 @@ var categories = [ "drop_of_blood", "pill", "adhesive_bandage", + "crutch", "stethoscope", + "x-ray", "door", + "elevator", + "mirror", + "window", "bed", "couch_and_lamp", "chair", "toilet", + "plunger", "shower", "bathtub", + "mouse_trap", "razor", "lotion_bottle", "safety_pin", "broom", "basket", "roll_of_paper", + "bucket", "soap", + "bubbles", + "toothbrush", "sponge", "fire_extinguisher", "shopping_trolley", "smoking", "coffin", + "headstone", "funeral_urn", - "moyai" + "nazar_amulet", + "hamsa", + "moyai", + "placard", + "identification_card" ] }, { id: "symbols", - name: "Symbols", emojis: [ "atm", "put_litter_in_its_place", @@ -65332,6 +57402,7 @@ var categories = [ "peace_symbol", "menorah_with_nine_branches", "six_pointed_star", + "khanda", "aries", "taurus", "gemini", @@ -65367,12 +57438,28 @@ var categories = [ "low_brightness", "high_brightness", "signal_strength", + "wireless", "vibration_mode", "mobile_phone_off", "female_sign", "male_sign", - "medical_symbol", + "transgender_symbol", + "heavy_multiplication_x", + "heavy_plus_sign", + "heavy_minus_sign", + "heavy_division_sign", + "heavy_equals_sign", "infinity", + "bangbang", + "interrobang", + "question", + "grey_question", + "grey_exclamation", + "exclamation", + "wavy_dash", + "currency_exchange", + "heavy_dollar_sign", + "medical_symbol", "recycle", "fleur_de_lis", "trident", @@ -65382,25 +57469,14 @@ var categories = [ "white_check_mark", "ballot_box_with_check", "heavy_check_mark", - "heavy_multiplication_x", "x", "negative_squared_cross_mark", - "heavy_plus_sign", - "heavy_minus_sign", - "heavy_division_sign", "curly_loop", "loop", "part_alternation_mark", "eight_spoked_asterisk", "eight_pointed_black_star", "sparkle", - "bangbang", - "interrobang", - "question", - "grey_question", - "grey_exclamation", - "exclamation", - "wavy_dash", "copyright", "registered", "tm", @@ -65494,7 +57570,6 @@ var categories = [ }, { id: "flags", - name: "Flags", emojis: [ "checkered_flag", "cn", @@ -65733,6 +57808,7 @@ var categories = [ "flag-ua", "flag-ug", "flag-um", + "flag-un", "flag-uy", "flag-uz", "flag-va", @@ -65759,6 +57835,7 @@ var categories = [ "pirate_flag", "rainbow-flag", "ru", + "transgender_flag", "triangular_flag_on_post", "us", "waving_black_flag", @@ -65768,9 +57845,10 @@ var categories = [ ]; var emojis = { "100": { - a: "Hundred Points Symbol", - b: "1F4AF", - j: [ + id: "100", + name: "Hundred Points", + keywords: [ + "100", "score", "perfect", "numbers", @@ -65778,422 +57856,67 @@ var emojis = { "exam", "quiz", "test", - "pass", - "hundred" + "pass" ], - k: [ - 26, - 5 + skins: [ + { + unified: "1f4af", + native: "💯" + } ], - o: 2 + version: 1 }, "1234": { - a: "Input Symbol for Numbers", - b: "1F522", - j: [ - "numbers", - "blue-square" + id: "1234", + name: "Input Numbers", + keywords: [ + "1234", + "blue", + "square", + "1", + "2", + "3", + "4" ], - k: [ - 28, - 5 + skins: [ + { + unified: "1f522", + native: "🔢" + } ], - o: 2 + version: 1 }, grinning: { - a: "Grinning Face", - b: "1F600", - j: [ - "face", + id: "grinning", + name: "Grinning Face", + emoticons: [ + ":D" + ], + keywords: [ "smile", "happy", "joy", ":D", "grin" ], - k: [ - 30, - 35 - ], - m: ":D", - o: 2 - }, - monkey_face: { - a: "Monkey Face", - b: "1F435", - j: [ - "animal", - "nature", - "circus" - ], - k: [ - 12, - 25 - ], - l: [ - ":o)" - ], - o: 2 - }, - grapes: { - a: "Grapes", - b: "1F347", - j: [ - "fruit", - "food", - "wine" - ], - k: [ - 6, - 31 - ], - o: 2 - }, - eyeglasses: { - a: "Eyeglasses", - b: "1F453", - j: [ - "fashion", - "accessories", - "eyesight", - "nerdy", - "dork", - "geek" - ], - k: [ - 14, - 7 - ], - o: 2 - }, - checkered_flag: { - a: "Chequered Flag", - b: "1F3C1", - j: [ - "contest", - "finishline", - "race", - "gokart" - ], - k: [ - 8, - 39 - ], - o: 2 - }, - jack_o_lantern: { - a: "Jack-O-Lantern", - b: "1F383", - j: [ - "halloween", - "light", - "pumpkin", - "creepy", - "fall" - ], - k: [ - 7, - 34 - ], - o: 2 - }, - wave: { - skin_variations: { - "1F3FB": { - unified: "1F44B-1F3FB", - non_qualified: null, - image: "1f44b-1f3fb.png", - sheet_x: 13, - sheet_y: 27, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F44B-1F3FC", - non_qualified: null, - image: "1f44b-1f3fc.png", - sheet_x: 13, - sheet_y: 28, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F44B-1F3FD", - non_qualified: null, - image: "1f44b-1f3fd.png", - sheet_x: 13, - sheet_y: 29, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F44B-1F3FE", - non_qualified: null, - image: "1f44b-1f3fe.png", - sheet_x: 13, - sheet_y: 30, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F44B-1F3FF", - non_qualified: null, - image: "1f44b-1f3ff.png", - sheet_x: 13, - sheet_y: 31, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f600", + native: "😀" } - }, - a: "Waving Hand Sign", - b: "1F44B", - j: [ - "hands", - "gesture", - "goodbye", - "solong", - "farewell", - "hello", - "hi", - "palm" ], - k: [ - 13, - 26 - ], - o: 2 - }, - earth_africa: { - a: "Earth Globe Europe-Africa", - b: "1F30D", - j: [ - "globe", - "world", - "international" - ], - k: [ - 5, - 32 - ], - o: 2 - }, - atm: { - a: "Automated Teller Machine", - b: "1F3E7", - j: [ - "money", - "sales", - "cash", - "blue-square", - "payment", - "bank" - ], - k: [ - 11, - 1 - ], - o: 2 - }, - melon: { - a: "Melon", - b: "1F348", - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 32 - ], - o: 2 - }, - triangular_flag_on_post: { - a: "Triangular Flag on Post", - b: "1F6A9", - j: [ - "mark", - "milestone", - "place" - ], - k: [ - 35, - 0 - ], - o: 2 - }, - put_litter_in_its_place: { - a: "Put Litter in Its Place Symbol", - b: "1F6AE", - j: [ - "blue-square", - "sign", - "human", - "info" - ], - k: [ - 35, - 5 - ], - o: 2 - }, - christmas_tree: { - a: "Christmas Tree", - b: "1F384", - j: [ - "festival", - "vacation", - "december", - "xmas", - "celebration" - ], - k: [ - 7, - 35 - ], - o: 2 - }, - monkey: { - a: "Monkey", - b: "1F412", - j: [ - "animal", - "nature", - "banana", - "circus" - ], - k: [ - 11, - 46 - ], - o: 2 - }, - earth_americas: { - a: "Earth Globe Americas", - b: "1F30E", - j: [ - "globe", - "world", - "USA", - "international" - ], - k: [ - 5, - 33 - ], - o: 2 - }, - dark_sunglasses: { - a: "Dark Sunglasses", - b: "1F576-FE0F", - c: "1F576", - j: [ - "face", - "cool", - "accessories" - ], - k: [ - 29, - 33 - ], - o: 2 - }, - raised_back_of_hand: { - skin_variations: { - "1F3FB": { - unified: "1F91A-1F3FB", - non_qualified: null, - image: "1f91a-1f3fb.png", - sheet_x: 37, - sheet_y: 44, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F91A-1F3FC", - non_qualified: null, - image: "1f91a-1f3fc.png", - sheet_x: 37, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F91A-1F3FD", - non_qualified: null, - image: "1f91a-1f3fd.png", - sheet_x: 37, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F91A-1F3FE", - non_qualified: null, - image: "1f91a-1f3fe.png", - sheet_x: 37, - sheet_y: 47, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F91A-1F3FF", - non_qualified: null, - image: "1f91a-1f3ff.png", - sheet_x: 37, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Raised Back of Hand", - b: "1F91A", - j: [ - "fingers", - "raised", - "backhand" - ], - k: [ - 37, - 43 - ], - o: 4 + version: 1 }, smiley: { - a: "Smiling Face with Open Mouth", - b: "1F603", - j: [ - "face", + id: "smiley", + name: "Grinning Face with Big Eyes", + emoticons: [ + ":)", + "=)", + "=-)" + ], + keywords: [ + "smiley", "happy", "joy", "haha", @@ -66202,153 +57925,26 @@ var emojis = { "smile", "funny" ], - k: [ - 30, - 38 - ], - l: [ - "=)", - "=-)" - ], - m: ":)", - o: 2 - }, - earth_asia: { - a: "Earth Globe Asia-Australia", - b: "1F30F", - j: [ - "globe", - "world", - "east", - "international" - ], - k: [ - 5, - 34 - ], - o: 2 - }, - crossed_flags: { - a: "Crossed Flags", - b: "1F38C", - j: [ - "japanese", - "nation", - "country", - "border" - ], - k: [ - 7, - 48 - ], - o: 2 - }, - watermelon: { - a: "Watermelon", - b: "1F349", - j: [ - "fruit", - "food", - "picnic", - "summer" - ], - k: [ - 6, - 33 - ], - o: 2 - }, - goggles: { - a: "Goggles", - b: "1F97D", - k: [ - 42, - 15 - ], - o: 11 - }, - raised_hand_with_fingers_splayed: { - skin_variations: { - "1F3FB": { - unified: "1F590-1F3FB", - non_qualified: null, - image: "1f590-1f3fb.png", - sheet_x: 29, - sheet_y: 49, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F590-1F3FC", - non_qualified: null, - image: "1f590-1f3fc.png", - sheet_x: 29, - sheet_y: 50, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F590-1F3FD", - non_qualified: null, - image: "1f590-1f3fd.png", - sheet_x: 29, - sheet_y: 51, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F590-1F3FE", - non_qualified: null, - image: "1f590-1f3fe.png", - sheet_x: 29, - sheet_y: 52, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F590-1F3FF", - non_qualified: null, - image: "1f590-1f3ff.png", - sheet_x: 29, - sheet_y: 53, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f603", + native: "😃" } - }, - a: "Raised Hand with Fingers Splayed", - b: "1F590-FE0F", - c: "1F590", - j: [ - "hand", - "fingers", - "palm" ], - k: [ - 29, - 48 - ], - o: 2 + version: 1 }, smile: { - a: "Smiling Face with Open Mouth and Smiling Eyes", - b: "1F604", - j: [ - "face", + id: "smile", + name: "Grinning Face with Smiling Eyes", + emoticons: [ + ":)", + "C:", + "c:", + ":D", + ":-D" + ], + keywords: [ + "smile", "happy", "joy", "funny", @@ -66358,1367 +57954,172 @@ var emojis = { ":D", ":)" ], - k: [ - 30, - 39 + skins: [ + { + unified: "1f604", + native: "😄" + } ], - l: [ - "C:", - "c:", - ":D", - ":-D" - ], - m: ":)", - o: 2 - }, - potable_water: { - a: "Potable Water Symbol", - b: "1F6B0", - j: [ - "blue-square", - "liquid", - "restroom", - "cleaning", - "faucet" - ], - k: [ - 35, - 7 - ], - o: 2 - }, - fireworks: { - a: "Fireworks", - b: "1F386", - j: [ - "photo", - "festival", - "carnival", - "congratulations" - ], - k: [ - 7, - 42 - ], - o: 2 - }, - gorilla: { - a: "Gorilla", - b: "1F98D", - j: [ - "animal", - "nature", - "circus" - ], - k: [ - 42, - 31 - ], - o: 4 - }, - lab_coat: { - a: "Lab Coat", - b: "1F97C", - k: [ - 42, - 14 - ], - o: 11 - }, - tangerine: { - a: "Tangerine", - b: "1F34A", - j: [ - "food", - "fruit", - "nature", - "orange" - ], - k: [ - 6, - 34 - ], - o: 2 - }, - wheelchair: { - a: "Wheelchair Symbol", - b: "267F", - j: [ - "blue-square", - "disabled", - "a11y", - "accessibility" - ], - k: [ - 53, - 40 - ], - o: 2 - }, - waving_black_flag: { - a: "Waving Black Flag", - b: "1F3F4", - k: [ - 11, - 17 - ], - o: 2 - }, - orangutan: { - a: "Orangutan", - b: "1F9A7", - k: [ - 42, - 55 - ], - o: 12 - }, - sparkler: { - a: "Firework Sparkler", - b: "1F387", - j: [ - "stars", - "night", - "shine" - ], - k: [ - 7, - 43 - ], - o: 2 - }, - globe_with_meridians: { - a: "Globe with Meridians", - b: "1F310", - j: [ - "earth", - "international", - "world", - "internet", - "interweb", - "i18n" - ], - k: [ - 5, - 35 - ], - o: 2 + version: 1 }, grin: { - a: "Grinning Face with Smiling Eyes", - b: "1F601", - j: [ - "face", + id: "grin", + name: "Beaming Face with Smiling Eyes", + keywords: [ + "grin", "happy", "smile", "joy", "kawaii" ], - k: [ - 30, - 36 - ], - o: 2 - }, - hand: { - skin_variations: { - "1F3FB": { - unified: "270B-1F3FB", - non_qualified: null, - image: "270b-1f3fb.png", - sheet_x: 54, - sheet_y: 50, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "270B-1F3FC", - non_qualified: null, - image: "270b-1f3fc.png", - sheet_x: 54, - sheet_y: 51, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "270B-1F3FD", - non_qualified: null, - image: "270b-1f3fd.png", - sheet_x: 54, - sheet_y: 52, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "270B-1F3FE", - non_qualified: null, - image: "270b-1f3fe.png", - sheet_x: 54, - sheet_y: 53, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "270B-1F3FF", - non_qualified: null, - image: "270b-1f3ff.png", - sheet_x: 54, - sheet_y: 54, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f601", + native: "😁" } - }, - a: "Raised Hand", - b: "270B", - k: [ - 54, - 49 ], - n: [ - "raised_hand" - ], - o: 2 - }, - firecracker: { - a: "Firecracker", - b: "1F9E8", - k: [ - 51, - 27 - ], - o: 11 - }, - lemon: { - a: "Lemon", - b: "1F34B", - j: [ - "fruit", - "nature" - ], - k: [ - 6, - 35 - ], - o: 2 - }, - dog: { - a: "Dog Face", - b: "1F436", - j: [ - "animal", - "friend", - "nature", - "woof", - "puppy", - "pet", - "faithful" - ], - k: [ - 12, - 26 - ], - o: 2 - }, - mens: { - a: "Mens Symbol", - b: "1F6B9", - j: [ - "toilet", - "restroom", - "wc", - "blue-square", - "gender", - "male" - ], - k: [ - 36, - 10 - ], - o: 2 - }, - "spock-hand": { - skin_variations: { - "1F3FB": { - unified: "1F596-1F3FB", - non_qualified: null, - image: "1f596-1f3fb.png", - sheet_x: 30, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F596-1F3FC", - non_qualified: null, - image: "1f596-1f3fc.png", - sheet_x: 30, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F596-1F3FD", - non_qualified: null, - image: "1f596-1f3fd.png", - sheet_x: 30, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F596-1F3FE", - non_qualified: null, - image: "1f596-1f3fe.png", - sheet_x: 30, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F596-1F3FF", - non_qualified: null, - image: "1f596-1f3ff.png", - sheet_x: 30, - sheet_y: 8, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Raised Hand with Part Between Middle and Ring Fingers", - b: "1F596", - k: [ - 30, - 3 - ], - o: 2 - }, - world_map: { - a: "World Map", - b: "1F5FA-FE0F", - c: "1F5FA", - j: [ - "location", - "direction" - ], - k: [ - 30, - 29 - ], - o: 2 + version: 1 }, laughing: { - a: "Smiling Face with Open Mouth and Tightly-Closed Eyes", - b: "1F606", - j: [ + id: "laughing", + name: "Grinning Squinting Face", + emoticons: [ + ":>", + ":->" + ], + keywords: [ + "laughing", + "satisfied", "happy", "joy", "lol", - "satisfied", "haha", - "face", "glad", "XD", "laugh" ], - k: [ - 30, - 41 + skins: [ + { + unified: "1f606", + native: "😆" + } ], - l: [ - ":>", - ":->" - ], - n: [ - "satisfied" - ], - o: 2 - }, - waving_white_flag: { - a: "Waving White Flag", - b: "1F3F3-FE0F", - c: "1F3F3", - k: [ - 11, - 12 - ], - o: 2 - }, - safety_vest: { - a: "Safety Vest", - b: "1F9BA", - k: [ - 43, - 54 - ], - o: 12 + version: 1 }, sweat_smile: { - a: "Smiling Face with Open Mouth and Cold Sweat", - b: "1F605", - j: [ - "face", + id: "sweat_smile", + name: "Grinning Face with Sweat", + keywords: [ + "smile", "hot", "happy", "laugh", - "sweat", - "smile", "relief" ], - k: [ - 30, - 40 - ], - o: 2 - }, - sparkles: { - a: "Sparkles", - b: "2728", - j: [ - "stars", - "shine", - "shiny", - "cool", - "awesome", - "good", - "magic" - ], - k: [ - 55, - 16 - ], - o: 2 - }, - banana: { - a: "Banana", - b: "1F34C", - j: [ - "fruit", - "food", - "monkey" - ], - k: [ - 6, - 36 - ], - o: 2 - }, - "rainbow-flag": { - a: "Rainbow Flag", - b: "1F3F3-FE0F-200D-1F308", - c: "1F3F3-200D-1F308", - k: [ - 11, - 11 - ], - o: 4 - }, - ok_hand: { - skin_variations: { - "1F3FB": { - unified: "1F44C-1F3FB", - non_qualified: null, - image: "1f44c-1f3fb.png", - sheet_x: 13, - sheet_y: 33, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F44C-1F3FC", - non_qualified: null, - image: "1f44c-1f3fc.png", - sheet_x: 13, - sheet_y: 34, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F44C-1F3FD", - non_qualified: null, - image: "1f44c-1f3fd.png", - sheet_x: 13, - sheet_y: 35, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F44C-1F3FE", - non_qualified: null, - image: "1f44c-1f3fe.png", - sheet_x: 13, - sheet_y: 36, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F44C-1F3FF", - non_qualified: null, - image: "1f44c-1f3ff.png", - sheet_x: 13, - sheet_y: 37, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f605", + native: "😅" } - }, - a: "Ok Hand Sign", - b: "1F44C", - j: [ - "fingers", - "limbs", - "perfect", - "ok", - "okay" ], - k: [ - 13, - 32 - ], - o: 2 - }, - japan: { - a: "Silhouette of Japan", - b: "1F5FE", - j: [ - "nation", - "country", - "japanese", - "asia" - ], - k: [ - 30, - 33 - ], - o: 2 - }, - dog2: { - a: "Dog", - b: "1F415", - j: [ - "animal", - "nature", - "friend", - "doge", - "pet", - "faithful" - ], - k: [ - 11, - 50 - ], - o: 2 - }, - womens: { - a: "Womens Symbol", - b: "1F6BA", - j: [ - "purple-square", - "woman", - "female", - "toilet", - "loo", - "restroom", - "gender" - ], - k: [ - 36, - 11 - ], - o: 2 - }, - necktie: { - a: "Necktie", - b: "1F454", - j: [ - "shirt", - "suitup", - "formal", - "fashion", - "cloth", - "business" - ], - k: [ - 14, - 8 - ], - o: 2 - }, - pirate_flag: { - a: "Pirate Flag", - b: "1F3F4-200D-2620-FE0F", - c: "1F3F4-200D-2620", - k: [ - 11, - 13 - ], - o: 11 - }, - guide_dog: { - a: "Guide Dog", - b: "1F9AE", - k: [ - 43, - 2 - ], - o: 12 - }, - restroom: { - a: "Restroom", - b: "1F6BB", - j: [ - "blue-square", - "toilet", - "refresh", - "wc", - "gender" - ], - k: [ - 36, - 12 - ], - o: 2 - }, - compass: { - a: "Compass", - b: "1F9ED", - k: [ - 51, - 32 - ], - o: 11 + version: 1 }, rolling_on_the_floor_laughing: { - a: "Rolling on the Floor Laughing", - b: "1F923", - k: [ - 38, - 20 + id: "rolling_on_the_floor_laughing", + name: "Rolling on the Floor Laughing", + keywords: [ + "face", + "lol", + "haha", + "rofl" ], - o: 4 - }, - balloon: { - a: "Balloon", - b: "1F388", - j: [ - "party", - "celebration", - "birthday", - "circus" - ], - k: [ - 7, - 44 - ], - o: 2 - }, - pinching_hand: { - skin_variations: { - "1F3FB": { - unified: "1F90F-1F3FB", - non_qualified: null, - image: "1f90f-1f3fb.png", - sheet_x: 37, - sheet_y: 18, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F90F-1F3FC", - non_qualified: null, - image: "1f90f-1f3fc.png", - sheet_x: 37, - sheet_y: 19, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F90F-1F3FD", - non_qualified: null, - image: "1f90f-1f3fd.png", - sheet_x: 37, - sheet_y: 20, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F90F-1F3FE", - non_qualified: null, - image: "1f90f-1f3fe.png", - sheet_x: 37, - sheet_y: 21, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F90F-1F3FF", - non_qualified: null, - image: "1f90f-1f3ff.png", - sheet_x: 37, - sheet_y: 22, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f923", + native: "🤣" } - }, - a: "Pinching Hand", - b: "1F90F", - k: [ - 37, - 17 ], - o: 12 - }, - pineapple: { - a: "Pineapple", - b: "1F34D", - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 37 - ], - o: 2 - }, - shirt: { - a: "T-Shirt", - b: "1F455", - k: [ - 14, - 9 - ], - n: [ - "tshirt" - ], - o: 2 - }, - service_dog: { - a: "Service Dog", - b: "1F415-200D-1F9BA", - k: [ - 11, - 49 - ], - o: 12 - }, - baby_symbol: { - a: "Baby Symbol", - b: "1F6BC", - j: [ - "orange-square", - "child" - ], - k: [ - 36, - 13 - ], - o: 2 + version: 3 }, joy: { - a: "Face with Tears of Joy", - b: "1F602", - j: [ - "face", + id: "joy", + name: "Face with Tears of Joy", + keywords: [ "cry", - "tears", "weep", "happy", "happytears", "haha" ], - k: [ - 30, - 37 - ], - o: 2 - }, - tada: { - a: "Party Popper", - b: "1F389", - j: [ - "party", - "congratulations", - "birthday", - "magic", - "circus", - "celebration" - ], - k: [ - 7, - 45 - ], - o: 2 - }, - mango: { - a: "Mango", - b: "1F96D", - k: [ - 42, - 3 - ], - o: 11 - }, - v: { - skin_variations: { - "1F3FB": { - unified: "270C-1F3FB", - non_qualified: null, - image: "270c-1f3fb.png", - sheet_x: 54, - sheet_y: 56, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "270C-1F3FC", - non_qualified: null, - image: "270c-1f3fc.png", - sheet_x: 55, - sheet_y: 0, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "270C-1F3FD", - non_qualified: null, - image: "270c-1f3fd.png", - sheet_x: 55, - sheet_y: 1, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "270C-1F3FE", - non_qualified: null, - image: "270c-1f3fe.png", - sheet_x: 55, - sheet_y: 2, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "270C-1F3FF", - non_qualified: null, - image: "270c-1f3ff.png", - sheet_x: 55, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f602", + native: "😂" } - }, - a: "Victory Hand", - b: "270C-FE0F", - c: "270C", - j: [ - "fingers", - "ohyeah", - "hand", - "peace", - "victory", - "two" ], - k: [ - 54, - 55 - ], - o: 2 - }, - snow_capped_mountain: { - a: "Snow Capped Mountain", - b: "1F3D4-FE0F", - c: "1F3D4", - k: [ - 10, - 39 - ], - o: 2 - }, - "flag-ac": { - a: "Ascension Island Flag", - b: "1F1E6-1F1E8", - k: [ - 0, - 31 - ], - o: 2 - }, - jeans: { - a: "Jeans", - b: "1F456", - j: [ - "fashion", - "shopping" - ], - k: [ - 14, - 10 - ], - o: 2 - }, - poodle: { - a: "Poodle", - b: "1F429", - j: [ - "dog", - "animal", - "101", - "nature", - "pet" - ], - k: [ - 12, - 13 - ], - o: 2 - }, - crossed_fingers: { - skin_variations: { - "1F3FB": { - unified: "1F91E-1F3FB", - non_qualified: null, - image: "1f91e-1f3fb.png", - sheet_x: 38, - sheet_y: 6, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F91E-1F3FC", - non_qualified: null, - image: "1f91e-1f3fc.png", - sheet_x: 38, - sheet_y: 7, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F91E-1F3FD", - non_qualified: null, - image: "1f91e-1f3fd.png", - sheet_x: 38, - sheet_y: 8, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F91E-1F3FE", - non_qualified: null, - image: "1f91e-1f3fe.png", - sheet_x: 38, - sheet_y: 9, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F91E-1F3FF", - non_qualified: null, - image: "1f91e-1f3ff.png", - sheet_x: 38, - sheet_y: 10, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Hand with Index and Middle Fingers Crossed", - b: "1F91E", - j: [ - "good", - "lucky" - ], - k: [ - 38, - 5 - ], - n: [ - "hand_with_index_and_middle_fingers_crossed" - ], - o: 4 - }, - "flag-ad": { - a: "Andorra Flag", - b: "1F1E6-1F1E9", - k: [ - 0, - 32 - ], - o: 2 + version: 1 }, slightly_smiling_face: { - a: "Slightly Smiling Face", - b: "1F642", - j: [ - "face", - "smile" - ], - k: [ - 31, - 44 - ], - l: [ + id: "slightly_smiling_face", + name: "Slightly Smiling Face", + emoticons: [ ":)", "(:", ":-)" ], - o: 2 - }, - apple: { - a: "Red Apple", - b: "1F34E", - j: [ - "fruit", - "mac", - "school" + keywords: [ + "smile" ], - k: [ - 6, - 38 - ], - o: 2 - }, - wc: { - a: "Water Closet", - b: "1F6BE", - j: [ - "toilet", - "restroom", - "blue-square" - ], - k: [ - 36, - 15 - ], - o: 2 - }, - scarf: { - a: "Scarf", - b: "1F9E3", - k: [ - 51, - 22 - ], - o: 5 - }, - mountain: { - a: "Mountain", - b: "26F0-FE0F", - c: "26F0", - j: [ - "photo", - "nature", - "environment" - ], - k: [ - 54, - 11 - ], - o: 2 - }, - confetti_ball: { - a: "Confetti Ball", - b: "1F38A", - j: [ - "festival", - "party", - "birthday", - "circus" - ], - k: [ - 7, - 46 - ], - o: 2 - }, - i_love_you_hand_sign: { - skin_variations: { - "1F3FB": { - unified: "1F91F-1F3FB", - non_qualified: null, - image: "1f91f-1f3fb.png", - sheet_x: 38, - sheet_y: 12, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F91F-1F3FC", - non_qualified: null, - image: "1f91f-1f3fc.png", - sheet_x: 38, - sheet_y: 13, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F91F-1F3FD", - non_qualified: null, - image: "1f91f-1f3fd.png", - sheet_x: 38, - sheet_y: 14, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F91F-1F3FE", - non_qualified: null, - image: "1f91f-1f3fe.png", - sheet_x: 38, - sheet_y: 15, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F91F-1F3FF", - non_qualified: null, - image: "1f91f-1f3ff.png", - sheet_x: 38, - sheet_y: 16, - added_in: "5.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f642", + native: "🙂" } - }, - a: "I Love You Hand Sign", - b: "1F91F", - k: [ - 38, - 11 ], - o: 5 - }, - wolf: { - a: "Wolf Face", - b: "1F43A", - j: [ - "animal", - "nature", - "wild" - ], - k: [ - 12, - 30 - ], - o: 2 - }, - gloves: { - a: "Gloves", - b: "1F9E4", - k: [ - 51, - 23 - ], - o: 5 - }, - "flag-ae": { - a: "United Arab Emirates Flag", - b: "1F1E6-1F1EA", - k: [ - 0, - 33 - ], - o: 2 + version: 1 }, upside_down_face: { - a: "Upside-Down Face", - b: "1F643", - j: [ - "face", + id: "upside_down_face", + name: "Upside-Down Face", + keywords: [ + "upside", + "down", "flipped", "silly", "smile" ], - k: [ - 31, - 45 + skins: [ + { + unified: "1f643", + native: "🙃" + } ], - o: 2 + version: 1 }, - green_apple: { - a: "Green Apple", - b: "1F34F", - j: [ - "fruit", - "nature" + melting_face: { + id: "melting_face", + name: "Melting Face", + keywords: [ + "hot", + "heat" ], - k: [ - 6, - 39 + skins: [ + { + unified: "1fae0", + native: "🫠" + } ], - o: 2 - }, - passport_control: { - a: "Passport Control", - b: "1F6C2", - j: [ - "custom", - "blue-square" - ], - k: [ - 36, - 24 - ], - o: 2 - }, - volcano: { - a: "Volcano", - b: "1F30B", - j: [ - "photo", - "nature", - "disaster" - ], - k: [ - 5, - 30 - ], - o: 2 - }, - tanabata_tree: { - a: "Tanabata Tree", - b: "1F38B", - j: [ - "plant", - "nature", - "branch", - "summer" - ], - k: [ - 7, - 47 - ], - o: 2 - }, - customs: { - a: "Customs", - b: "1F6C3", - j: [ - "passport", - "border", - "blue-square" - ], - k: [ - 36, - 25 - ], - o: 2 - }, - coat: { - a: "Coat", - b: "1F9E5", - k: [ - 51, - 24 - ], - o: 5 + version: 14 }, wink: { - a: "Winking Face", - b: "1F609", - j: [ - "face", + id: "wink", + name: "Winking Face", + emoticons: [ + ";)", + ";-)" + ], + keywords: [ + "wink", "happy", "mischievous", "secret", @@ -67726,271 +58127,22 @@ var emojis = { "smile", "eye" ], - k: [ - 30, - 44 - ], - l: [ - ";)", - ";-)" - ], - m: ";)", - o: 2 - }, - bamboo: { - a: "Pine Decoration", - b: "1F38D", - j: [ - "plant", - "nature", - "vegetable", - "panda", - "pine_decoration" - ], - k: [ - 7, - 49 - ], - o: 2 - }, - "flag-af": { - a: "Afghanistan Flag", - b: "1F1E6-1F1EB", - k: [ - 0, - 34 - ], - o: 2 - }, - fox_face: { - a: "Fox Face", - b: "1F98A", - j: [ - "animal", - "nature", - "face" - ], - k: [ - 42, - 28 - ], - o: 4 - }, - pear: { - a: "Pear", - b: "1F350", - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 40 - ], - o: 2 - }, - mount_fuji: { - a: "Mount Fuji", - b: "1F5FB", - j: [ - "photo", - "mountain", - "nature", - "japanese" - ], - k: [ - 30, - 30 - ], - o: 2 - }, - the_horns: { - skin_variations: { - "1F3FB": { - unified: "1F918-1F3FB", - non_qualified: null, - image: "1f918-1f3fb.png", - sheet_x: 37, - sheet_y: 32, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F918-1F3FC", - non_qualified: null, - image: "1f918-1f3fc.png", - sheet_x: 37, - sheet_y: 33, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F918-1F3FD", - non_qualified: null, - image: "1f918-1f3fd.png", - sheet_x: 37, - sheet_y: 34, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F918-1F3FE", - non_qualified: null, - image: "1f918-1f3fe.png", - sheet_x: 37, - sheet_y: 35, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F918-1F3FF", - non_qualified: null, - image: "1f918-1f3ff.png", - sheet_x: 37, - sheet_y: 36, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f609", + native: "😉" } - }, - a: "Sign of the Horns", - b: "1F918", - k: [ - 37, - 31 ], - n: [ - "sign_of_the_horns" - ], - o: 2 - }, - call_me_hand: { - skin_variations: { - "1F3FB": { - unified: "1F919-1F3FB", - non_qualified: null, - image: "1f919-1f3fb.png", - sheet_x: 37, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F919-1F3FC", - non_qualified: null, - image: "1f919-1f3fc.png", - sheet_x: 37, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F919-1F3FD", - non_qualified: null, - image: "1f919-1f3fd.png", - sheet_x: 37, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F919-1F3FE", - non_qualified: null, - image: "1f919-1f3fe.png", - sheet_x: 37, - sheet_y: 41, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F919-1F3FF", - non_qualified: null, - image: "1f919-1f3ff.png", - sheet_x: 37, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Call Me Hand", - b: "1F919", - j: [ - "hands", - "gesture" - ], - k: [ - 37, - 37 - ], - o: 4 - }, - "flag-ag": { - a: "Antigua & Barbuda Flag", - b: "1F1E6-1F1EC", - k: [ - 0, - 35 - ], - o: 2 - }, - raccoon: { - a: "Raccoon", - b: "1F99D", - k: [ - 42, - 47 - ], - o: 11 - }, - dolls: { - a: "Japanese Dolls", - b: "1F38E", - j: [ - "japanese", - "toy", - "kimono" - ], - k: [ - 7, - 50 - ], - o: 2 + version: 1 }, blush: { - a: "Smiling Face with Smiling Eyes", - b: "1F60A", - j: [ - "face", + id: "blush", + name: "Smiling Face with Smiling Eyes", + emoticons: [ + ":)" + ], + keywords: [ + "blush", "smile", "happy", "flushed", @@ -67999,934 +58151,157 @@ var emojis = { "shy", "joy" ], - k: [ - 30, - 45 - ], - m: ":)", - o: 2 - }, - peach: { - a: "Peach", - b: "1F351", - j: [ - "fruit", - "nature", - "food" - ], - k: [ - 6, - 41 - ], - o: 2 - }, - baggage_claim: { - a: "Baggage Claim", - b: "1F6C4", - j: [ - "blue-square", - "airport", - "transport" - ], - k: [ - 36, - 26 - ], - o: 2 - }, - socks: { - a: "Socks", - b: "1F9E6", - k: [ - 51, - 25 - ], - o: 5 - }, - camping: { - a: "Camping", - b: "1F3D5-FE0F", - c: "1F3D5", - j: [ - "photo", - "outdoors", - "tent" - ], - k: [ - 10, - 40 - ], - o: 2 - }, - dress: { - a: "Dress", - b: "1F457", - j: [ - "clothes", - "fashion", - "shopping" - ], - k: [ - 14, - 11 - ], - o: 2 - }, - beach_with_umbrella: { - a: "Beach with Umbrella", - b: "1F3D6-FE0F", - c: "1F3D6", - k: [ - 10, - 41 - ], - o: 2 - }, - cherries: { - a: "Cherries", - b: "1F352", - j: [ - "food", - "fruit" - ], - k: [ - 6, - 42 - ], - o: 2 - }, - cat: { - a: "Cat Face", - b: "1F431", - j: [ - "animal", - "meow", - "nature", - "pet", - "kitten" - ], - k: [ - 12, - 21 - ], - o: 2 - }, - point_left: { - skin_variations: { - "1F3FB": { - unified: "1F448-1F3FB", - non_qualified: null, - image: "1f448-1f3fb.png", - sheet_x: 13, - sheet_y: 9, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F448-1F3FC", - non_qualified: null, - image: "1f448-1f3fc.png", - sheet_x: 13, - sheet_y: 10, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F448-1F3FD", - non_qualified: null, - image: "1f448-1f3fd.png", - sheet_x: 13, - sheet_y: 11, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F448-1F3FE", - non_qualified: null, - image: "1f448-1f3fe.png", - sheet_x: 13, - sheet_y: 12, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F448-1F3FF", - non_qualified: null, - image: "1f448-1f3ff.png", - sheet_x: 13, - sheet_y: 13, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f60a", + native: "😊" } - }, - a: "White Left Pointing Backhand Index", - b: "1F448", - j: [ - "direction", - "fingers", - "hand", - "left" ], - k: [ - 13, - 8 - ], - o: 2 - }, - left_luggage: { - a: "Left Luggage", - b: "1F6C5", - j: [ - "blue-square", - "travel" - ], - k: [ - 36, - 27 - ], - o: 2 - }, - "flag-ai": { - a: "Anguilla Flag", - b: "1F1E6-1F1EE", - k: [ - 0, - 36 - ], - o: 2 + version: 1 }, innocent: { - a: "Smiling Face with Halo", - b: "1F607", - j: [ - "face", + id: "innocent", + name: "Smiling Face with Halo", + keywords: [ + "innocent", "angel", - "heaven", - "halo" + "heaven" ], - k: [ - 30, - 42 - ], - o: 2 - }, - flags: { - a: "Carp Streamer", - b: "1F38F", - j: [ - "fish", - "japanese", - "koinobori", - "carp", - "banner" - ], - k: [ - 7, - 51 - ], - o: 2 - }, - warning: { - a: "Warning Sign", - b: "26A0-FE0F", - c: "26A0", - j: [ - "exclamation", - "wip", - "alert", - "error", - "problem", - "issue" - ], - k: [ - 53, - 50 - ], - o: 2 - }, - strawberry: { - a: "Strawberry", - b: "1F353", - j: [ - "fruit", - "food", - "nature" - ], - k: [ - 6, - 43 - ], - o: 2 - }, - point_right: { - skin_variations: { - "1F3FB": { - unified: "1F449-1F3FB", - non_qualified: null, - image: "1f449-1f3fb.png", - sheet_x: 13, - sheet_y: 15, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F449-1F3FC", - non_qualified: null, - image: "1f449-1f3fc.png", - sheet_x: 13, - sheet_y: 16, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F449-1F3FD", - non_qualified: null, - image: "1f449-1f3fd.png", - sheet_x: 13, - sheet_y: 17, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F449-1F3FE", - non_qualified: null, - image: "1f449-1f3fe.png", - sheet_x: 13, - sheet_y: 18, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F449-1F3FF", - non_qualified: null, - image: "1f449-1f3ff.png", - sheet_x: 13, - sheet_y: 19, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f607", + native: "😇" } - }, - a: "White Right Pointing Backhand Index", - b: "1F449", - j: [ - "fingers", - "hand", - "direction", - "right" ], - k: [ - 13, - 14 - ], - o: 2 - }, - desert: { - a: "Desert", - b: "1F3DC-FE0F", - c: "1F3DC", - j: [ - "photo", - "warm", - "saharah" - ], - k: [ - 10, - 47 - ], - o: 2 - }, - kimono: { - a: "Kimono", - b: "1F458", - j: [ - "dress", - "fashion", - "women", - "female", - "japanese" - ], - k: [ - 14, - 12 - ], - o: 2 - }, - "flag-al": { - a: "Albania Flag", - b: "1F1E6-1F1F1", - k: [ - 0, - 37 - ], - o: 2 - }, - wind_chime: { - a: "Wind Chime", - b: "1F390", - j: [ - "nature", - "ding", - "spring", - "bell" - ], - k: [ - 7, - 52 - ], - o: 2 + version: 1 }, smiling_face_with_3_hearts: { - a: "Smiling Face with Smiling Eyes and Three Hearts", - b: "1F970", - k: [ - 42, - 6 - ], - o: 11 - }, - cat2: { - a: "Cat", - b: "1F408", - j: [ - "animal", - "meow", - "pet", - "cats" - ], - k: [ - 11, - 36 - ], - o: 2 - }, - rice_scene: { - a: "Moon Viewing Ceremony", - b: "1F391", - j: [ - "photo", - "japan", - "asia", - "tsukimi" - ], - k: [ - 7, - 53 - ], - o: 2 - }, - heart_eyes: { - a: "Smiling Face with Heart-Shaped Eyes", - b: "1F60D", - j: [ - "face", + id: "smiling_face_with_3_hearts", + name: "Smiling Face with Hearts", + keywords: [ + "3", "love", "like", "affection", "valentines", "infatuation", "crush", - "heart" + "adore" ], - k: [ - 30, - 48 - ], - o: 2 - }, - sari: { - a: "Sari", - b: "1F97B", - k: [ - 42, - 13 - ], - o: 12 - }, - "flag-am": { - a: "Armenia Flag", - b: "1F1E6-1F1F2", - k: [ - 0, - 38 - ], - o: 2 - }, - lion_face: { - a: "Lion Face", - b: "1F981", - k: [ - 42, - 19 - ], - o: 2 - }, - desert_island: { - a: "Desert Island", - b: "1F3DD-FE0F", - c: "1F3DD", - j: [ - "photo", - "tropical", - "mojito" - ], - k: [ - 10, - 48 - ], - o: 2 - }, - point_up_2: { - skin_variations: { - "1F3FB": { - unified: "1F446-1F3FB", - non_qualified: null, - image: "1f446-1f3fb.png", - sheet_x: 12, - sheet_y: 54, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F446-1F3FC", - non_qualified: null, - image: "1f446-1f3fc.png", - sheet_x: 12, - sheet_y: 55, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F446-1F3FD", - non_qualified: null, - image: "1f446-1f3fd.png", - sheet_x: 12, - sheet_y: 56, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F446-1F3FE", - non_qualified: null, - image: "1f446-1f3fe.png", - sheet_x: 13, - sheet_y: 0, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F446-1F3FF", - non_qualified: null, - image: "1f446-1f3ff.png", - sheet_x: 13, - sheet_y: 1, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f970", + native: "🥰" } - }, - a: "White Up Pointing Backhand Index", - b: "1F446", - j: [ - "fingers", - "hand", - "direction", - "up" ], - k: [ - 12, - 53 - ], - o: 2 + version: 11 }, - kiwifruit: { - a: "Kiwifruit", - b: "1F95D", - k: [ - 41, - 44 + heart_eyes: { + id: "heart_eyes", + name: "Smiling Face with Heart-Eyes", + keywords: [ + "heart", + "eyes", + "love", + "like", + "affection", + "valentines", + "infatuation", + "crush" ], - o: 4 - }, - children_crossing: { - a: "Children Crossing", - b: "1F6B8", - j: [ - "school", - "warning", - "danger", - "sign", - "driving", - "yellow-diamond" + skins: [ + { + unified: "1f60d", + native: "😍" + } ], - k: [ - 36, - 9 - ], - o: 2 - }, - national_park: { - a: "National Park", - b: "1F3DE-FE0F", - c: "1F3DE", - j: [ - "photo", - "environment", - "nature" - ], - k: [ - 10, - 49 - ], - o: 2 - }, - no_entry: { - a: "No Entry", - b: "26D4", - j: [ - "limit", - "security", - "privacy", - "bad", - "denied", - "stop", - "circle" - ], - k: [ - 54, - 8 - ], - o: 2 - }, - "one-piece_swimsuit": { - a: "One-Piece Swimsuit", - b: "1FA71", - k: [ - 51, - 52 - ], - o: 12 - }, - tiger: { - a: "Tiger Face", - b: "1F42F", - j: [ - "animal", - "cat", - "danger", - "wild", - "nature", - "roar" - ], - k: [ - 12, - 19 - ], - o: 2 - }, - red_envelope: { - a: "Red Gift Envelope", - b: "1F9E7", - k: [ - 51, - 26 - ], - o: 11 + version: 1 }, "star-struck": { - a: "Grinning Face with Star Eyes", - b: "1F929", - k: [ - 38, - 43 + id: "star-struck", + name: "Star-Struck", + keywords: [ + "star", + "struck", + "grinning", + "face", + "with", + "eyes", + "smile", + "starry" ], - n: [ - "grinning_face_with_star_eyes" - ], - o: 5 - }, - middle_finger: { - skin_variations: { - "1F3FB": { - unified: "1F595-1F3FB", - non_qualified: null, - image: "1f595-1f3fb.png", - sheet_x: 29, - sheet_y: 55, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F595-1F3FC", - non_qualified: null, - image: "1f595-1f3fc.png", - sheet_x: 29, - sheet_y: 56, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F595-1F3FD", - non_qualified: null, - image: "1f595-1f3fd.png", - sheet_x: 30, - sheet_y: 0, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F595-1F3FE", - non_qualified: null, - image: "1f595-1f3fe.png", - sheet_x: 30, - sheet_y: 1, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F595-1F3FF", - non_qualified: null, - image: "1f595-1f3ff.png", - sheet_x: 30, - sheet_y: 2, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f929", + native: "🤩" } - }, - a: "Reversed Hand with Middle Finger Extended", - b: "1F595", - k: [ - 29, - 54 ], - n: [ - "reversed_hand_with_middle_finger_extended" - ], - o: 2 - }, - "flag-ao": { - a: "Angola Flag", - b: "1F1E6-1F1F4", - k: [ - 0, - 39 - ], - o: 2 - }, - tomato: { - a: "Tomato", - b: "1F345", - j: [ - "fruit", - "vegetable", - "nature", - "food" - ], - k: [ - 6, - 29 - ], - o: 2 - }, - coconut: { - a: "Coconut", - b: "1F965", - k: [ - 41, - 52 - ], - o: 5 - }, - ribbon: { - a: "Ribbon", - b: "1F380", - j: [ - "decoration", - "pink", - "girl", - "bowtie" - ], - k: [ - 7, - 31 - ], - o: 2 - }, - no_entry_sign: { - a: "No Entry Sign", - b: "1F6AB", - j: [ - "forbid", - "stop", - "limit", - "denied", - "disallow", - "circle" - ], - k: [ - 35, - 2 - ], - o: 2 - }, - point_down: { - skin_variations: { - "1F3FB": { - unified: "1F447-1F3FB", - non_qualified: null, - image: "1f447-1f3fb.png", - sheet_x: 13, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F447-1F3FC", - non_qualified: null, - image: "1f447-1f3fc.png", - sheet_x: 13, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F447-1F3FD", - non_qualified: null, - image: "1f447-1f3fd.png", - sheet_x: 13, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F447-1F3FE", - non_qualified: null, - image: "1f447-1f3fe.png", - sheet_x: 13, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F447-1F3FF", - non_qualified: null, - image: "1f447-1f3ff.png", - sheet_x: 13, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "White Down Pointing Backhand Index", - b: "1F447", - j: [ - "fingers", - "hand", - "direction", - "down" - ], - k: [ - 13, - 2 - ], - o: 2 - }, - "flag-aq": { - a: "Antarctica Flag", - b: "1F1E6-1F1F6", - k: [ - 0, - 40 - ], - o: 2 - }, - briefs: { - a: "Briefs", - b: "1FA72", - k: [ - 51, - 53 - ], - o: 12 + version: 5 }, kissing_heart: { - a: "Face Throwing a Kiss", - b: "1F618", - j: [ - "face", + id: "kissing_heart", + name: "Face Blowing a Kiss", + emoticons: [ + ":*", + ":-*" + ], + keywords: [ + "kissing", + "heart", + "love", + "like", + "affection", + "valentines", + "infatuation" + ], + skins: [ + { + unified: "1f618", + native: "😘" + } + ], + version: 1 + }, + kissing: { + id: "kissing", + name: "Kissing Face", + keywords: [ + "love", + "like", + "3", + "valentines", + "infatuation", + "kiss" + ], + skins: [ + { + unified: "1f617", + native: "😗" + } + ], + version: 1 + }, + relaxed: { + id: "relaxed", + name: "Smiling Face", + keywords: [ + "relaxed", + "blush", + "massage", + "happiness" + ], + skins: [ + { + unified: "263a-fe0f", + native: "☺️" + } + ], + version: 1 + }, + kissing_closed_eyes: { + id: "kissing_closed_eyes", + name: "Kissing Face with Closed Eyes", + keywords: [ "love", "like", "affection", @@ -68934,297 +58309,3579 @@ var emojis = { "infatuation", "kiss" ], - k: [ - 31, - 2 + skins: [ + { + unified: "1f61a", + native: "😚" + } ], - l: [ - ":*", - ":-*" - ], - o: 2 + version: 1 }, - tiger2: { - a: "Tiger", - b: "1F405", - j: [ - "animal", - "nature", - "roar" - ], - k: [ - 11, - 33 - ], - o: 2 - }, - stadium: { - a: "Stadium", - b: "1F3DF-FE0F", - c: "1F3DF", - j: [ - "photo", - "place", - "sports", - "concert", - "venue" - ], - k: [ - 10, - 50 - ], - o: 2 - }, - leopard: { - a: "Leopard", - b: "1F406", - j: [ - "animal", - "nature" - ], - k: [ - 11, - 34 - ], - o: 2 - }, - no_bicycles: { - a: "No Bicycles", - b: "1F6B3", - j: [ - "cyclist", - "prohibited", - "circle" - ], - k: [ - 35, - 10 - ], - o: 2 - }, - kissing: { - a: "Kissing Face", - b: "1F617", - j: [ - "love", - "like", - "face", - "3", + kissing_smiling_eyes: { + id: "kissing_smiling_eyes", + name: "Kissing Face with Smiling Eyes", + keywords: [ + "affection", "valentines", "infatuation", "kiss" ], - k: [ - 31, - 1 - ], - o: 2 - }, - "flag-ar": { - a: "Argentina Flag", - b: "1F1E6-1F1F7", - k: [ - 0, - 41 - ], - o: 2 - }, - avocado: { - a: "Avocado", - b: "1F951", - j: [ - "fruit", - "food" - ], - k: [ - 41, - 32 - ], - o: 4 - }, - point_up: { - skin_variations: { - "1F3FB": { - unified: "261D-1F3FB", - non_qualified: null, - image: "261d-1f3fb.png", - sheet_x: 53, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "261D-1F3FC", - non_qualified: null, - image: "261d-1f3fc.png", - sheet_x: 53, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "261D-1F3FD", - non_qualified: null, - image: "261d-1f3fd.png", - sheet_x: 53, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "261D-1F3FE", - non_qualified: null, - image: "261d-1f3fe.png", - sheet_x: 53, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "261D-1F3FF", - non_qualified: null, - image: "261d-1f3ff.png", - sheet_x: 53, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f619", + native: "😙" } - }, - a: "White Up Pointing Index", - b: "261D-FE0F", - c: "261D", - j: [ + ], + version: 1 + }, + smiling_face_with_tear: { + id: "smiling_face_with_tear", + name: "Smiling Face with Tear", + keywords: [ + "sad", + "cry", + "pretend" + ], + skins: [ + { + unified: "1f972", + native: "🥲" + } + ], + version: 13 + }, + yum: { + id: "yum", + name: "Face Savoring Food", + keywords: [ + "yum", + "happy", + "joy", + "tongue", + "smile", + "silly", + "yummy", + "nom", + "delicious", + "savouring" + ], + skins: [ + { + unified: "1f60b", + native: "😋" + } + ], + version: 1 + }, + stuck_out_tongue: { + id: "stuck_out_tongue", + name: "Face with Tongue", + emoticons: [ + ":p", + ":-p", + ":P", + ":-P", + ":b", + ":-b" + ], + keywords: [ + "stuck", + "out", + "prank", + "childish", + "playful", + "mischievous", + "smile" + ], + skins: [ + { + unified: "1f61b", + native: "😛" + } + ], + version: 1 + }, + stuck_out_tongue_winking_eye: { + id: "stuck_out_tongue_winking_eye", + name: "Winking Face with Tongue", + emoticons: [ + ";p", + ";-p", + ";b", + ";-b", + ";P", + ";-P" + ], + keywords: [ + "stuck", + "out", + "eye", + "prank", + "childish", + "playful", + "mischievous", + "smile", + "wink" + ], + skins: [ + { + unified: "1f61c", + native: "😜" + } + ], + version: 1 + }, + zany_face: { + id: "zany_face", + name: "Zany Face", + keywords: [ + "grinning", + "with", + "one", + "large", + "and", + "small", + "eye", + "goofy", + "crazy" + ], + skins: [ + { + unified: "1f92a", + native: "🤪" + } + ], + version: 5 + }, + stuck_out_tongue_closed_eyes: { + id: "stuck_out_tongue_closed_eyes", + name: "Squinting Face with Tongue", + keywords: [ + "stuck", + "out", + "closed", + "eyes", + "prank", + "playful", + "mischievous", + "smile" + ], + skins: [ + { + unified: "1f61d", + native: "😝" + } + ], + version: 1 + }, + money_mouth_face: { + id: "money_mouth_face", + name: "Money-Mouth Face", + keywords: [ + "money", + "mouth", + "rich", + "dollar" + ], + skins: [ + { + unified: "1f911", + native: "🤑" + } + ], + version: 1 + }, + hugging_face: { + id: "hugging_face", + name: "Hugging Face", + keywords: [ + "smile", + "hug" + ], + skins: [ + { + unified: "1f917", + native: "🤗" + } + ], + version: 1 + }, + face_with_hand_over_mouth: { + id: "face_with_hand_over_mouth", + name: "Face with Hand over Mouth", + keywords: [ + "smiling", + "eyes", + "and", + "covering", + "whoops", + "shock", + "surprise" + ], + skins: [ + { + unified: "1f92d", + native: "🤭" + } + ], + version: 5 + }, + face_with_open_eyes_and_hand_over_mouth: { + id: "face_with_open_eyes_and_hand_over_mouth", + name: "Face with Open Eyes and Hand over Mouth", + keywords: [ + "silence", + "secret", + "shock", + "surprise" + ], + skins: [ + { + unified: "1fae2", + native: "🫢" + } + ], + version: 14 + }, + face_with_peeking_eye: { + id: "face_with_peeking_eye", + name: "Face with Peeking Eye", + keywords: [ + "scared", + "frightening", + "embarrassing", + "shy" + ], + skins: [ + { + unified: "1fae3", + native: "🫣" + } + ], + version: 14 + }, + shushing_face: { + id: "shushing_face", + name: "Shushing Face", + keywords: [ + "with", + "finger", + "covering", + "closed", + "lips", + "quiet", + "shhh" + ], + skins: [ + { + unified: "1f92b", + native: "🤫" + } + ], + version: 5 + }, + thinking_face: { + id: "thinking_face", + name: "Thinking Face", + keywords: [ + "hmmm", + "think", + "consider" + ], + skins: [ + { + unified: "1f914", + native: "🤔" + } + ], + version: 1 + }, + saluting_face: { + id: "saluting_face", + name: "Saluting Face", + keywords: [ + "respect", + "salute" + ], + skins: [ + { + unified: "1fae1", + native: "🫡" + } + ], + version: 14 + }, + zipper_mouth_face: { + id: "zipper_mouth_face", + name: "Zipper-Mouth Face", + keywords: [ + "zipper", + "mouth", + "sealed", + "secret" + ], + skins: [ + { + unified: "1f910", + native: "🤐" + } + ], + version: 1 + }, + face_with_raised_eyebrow: { + id: "face_with_raised_eyebrow", + name: "Face with Raised Eyebrow", + keywords: [ + "one", + "distrust", + "scepticism", + "disapproval", + "disbelief", + "surprise" + ], + skins: [ + { + unified: "1f928", + native: "🤨" + } + ], + version: 5 + }, + neutral_face: { + id: "neutral_face", + name: "Neutral Face", + emoticons: [ + ":|", + ":-|" + ], + keywords: [ + "indifference", + "meh", + ":", + "" + ], + skins: [ + { + unified: "1f610", + native: "😐" + } + ], + version: 1 + }, + expressionless: { + id: "expressionless", + name: "Expressionless Face", + emoticons: [ + "-_-" + ], + keywords: [ + "indifferent", + "-", + "", + "meh", + "deadpan" + ], + skins: [ + { + unified: "1f611", + native: "😑" + } + ], + version: 1 + }, + no_mouth: { + id: "no_mouth", + name: "Face Without Mouth", + keywords: [ + "no", + "hellokitty" + ], + skins: [ + { + unified: "1f636", + native: "😶" + } + ], + version: 1 + }, + dotted_line_face: { + id: "dotted_line_face", + name: "Dotted Line Face", + keywords: [ + "invisible", + "lonely", + "isolation", + "depression" + ], + skins: [ + { + unified: "1fae5", + native: "🫥" + } + ], + version: 14 + }, + face_in_clouds: { + id: "face_in_clouds", + name: "Face in Clouds", + keywords: [ + "shower", + "steam", + "dream" + ], + skins: [ + { + unified: "1f636-200d-1f32b-fe0f", + native: "😶‍🌫️" + } + ], + version: 13.1 + }, + smirk: { + id: "smirk", + name: "Smirking Face", + keywords: [ + "smirk", + "smile", + "mean", + "prank", + "smug", + "sarcasm" + ], + skins: [ + { + unified: "1f60f", + native: "😏" + } + ], + version: 1 + }, + unamused: { + id: "unamused", + name: "Unamused Face", + emoticons: [ + ":(" + ], + keywords: [ + "indifference", + "bored", + "straight", + "serious", + "sarcasm", + "unimpressed", + "skeptical", + "dubious", + "side", + "eye" + ], + skins: [ + { + unified: "1f612", + native: "😒" + } + ], + version: 1 + }, + face_with_rolling_eyes: { + id: "face_with_rolling_eyes", + name: "Face with Rolling Eyes", + keywords: [ + "eyeroll", + "frustrated" + ], + skins: [ + { + unified: "1f644", + native: "🙄" + } + ], + version: 1 + }, + grimacing: { + id: "grimacing", + name: "Grimacing Face", + keywords: [ + "grimace", + "teeth" + ], + skins: [ + { + unified: "1f62c", + native: "😬" + } + ], + version: 1 + }, + face_exhaling: { + id: "face_exhaling", + name: "Face Exhaling", + keywords: [ + "relieve", + "relief", + "tired", + "sigh" + ], + skins: [ + { + unified: "1f62e-200d-1f4a8", + native: "😮‍💨" + } + ], + version: 13.1 + }, + lying_face: { + id: "lying_face", + name: "Lying Face", + keywords: [ + "lie", + "pinocchio" + ], + skins: [ + { + unified: "1f925", + native: "🤥" + } + ], + version: 3 + }, + shaking_face: { + id: "shaking_face", + name: "Shaking Face", + keywords: [ + "dizzy", + "shock", + "blurry", + "earthquake" + ], + skins: [ + { + unified: "1fae8", + native: "🫨" + } + ], + version: 15 + }, + relieved: { + id: "relieved", + name: "Relieved Face", + keywords: [ + "relaxed", + "phew", + "massage", + "happiness" + ], + skins: [ + { + unified: "1f60c", + native: "😌" + } + ], + version: 1 + }, + pensive: { + id: "pensive", + name: "Pensive Face", + keywords: [ + "sad", + "depressed", + "upset" + ], + skins: [ + { + unified: "1f614", + native: "😔" + } + ], + version: 1 + }, + sleepy: { + id: "sleepy", + name: "Sleepy Face", + keywords: [ + "tired", + "rest", + "nap" + ], + skins: [ + { + unified: "1f62a", + native: "😪" + } + ], + version: 1 + }, + drooling_face: { + id: "drooling_face", + name: "Drooling Face", + keywords: [ + ], + skins: [ + { + unified: "1f924", + native: "🤤" + } + ], + version: 3 + }, + sleeping: { + id: "sleeping", + name: "Sleeping Face", + keywords: [ + "tired", + "sleepy", + "night", + "zzz" + ], + skins: [ + { + unified: "1f634", + native: "😴" + } + ], + version: 1 + }, + mask: { + id: "mask", + name: "Face with Medical Mask", + keywords: [ + "sick", + "ill", + "disease", + "covid" + ], + skins: [ + { + unified: "1f637", + native: "😷" + } + ], + version: 1 + }, + face_with_thermometer: { + id: "face_with_thermometer", + name: "Face with Thermometer", + keywords: [ + "sick", + "temperature", + "cold", + "fever", + "covid" + ], + skins: [ + { + unified: "1f912", + native: "🤒" + } + ], + version: 1 + }, + face_with_head_bandage: { + id: "face_with_head_bandage", + name: "Face with Head-Bandage", + keywords: [ + "head", + "bandage", + "injured", + "clumsy", + "hurt" + ], + skins: [ + { + unified: "1f915", + native: "🤕" + } + ], + version: 1 + }, + nauseated_face: { + id: "nauseated_face", + name: "Nauseated Face", + keywords: [ + "vomit", + "gross", + "green", + "sick", + "throw", + "up", + "ill" + ], + skins: [ + { + unified: "1f922", + native: "🤢" + } + ], + version: 3 + }, + face_vomiting: { + id: "face_vomiting", + name: "Face Vomiting", + keywords: [ + "with", + "open", + "mouth", + "sick" + ], + skins: [ + { + unified: "1f92e", + native: "🤮" + } + ], + version: 5 + }, + sneezing_face: { + id: "sneezing_face", + name: "Sneezing Face", + keywords: [ + "gesundheit", + "sneeze", + "sick", + "allergy" + ], + skins: [ + { + unified: "1f927", + native: "🤧" + } + ], + version: 3 + }, + hot_face: { + id: "hot_face", + name: "Hot Face", + keywords: [ + "feverish", + "heat", + "red", + "sweating" + ], + skins: [ + { + unified: "1f975", + native: "🥵" + } + ], + version: 11 + }, + cold_face: { + id: "cold_face", + name: "Cold Face", + keywords: [ + "blue", + "freezing", + "frozen", + "frostbite", + "icicles" + ], + skins: [ + { + unified: "1f976", + native: "🥶" + } + ], + version: 11 + }, + woozy_face: { + id: "woozy_face", + name: "Woozy Face", + keywords: [ + "dizzy", + "intoxicated", + "tipsy", + "wavy" + ], + skins: [ + { + unified: "1f974", + native: "🥴" + } + ], + version: 11 + }, + dizzy_face: { + id: "dizzy_face", + name: "Dizzy Face", + keywords: [ + "spent", + "unconscious", + "xox" + ], + skins: [ + { + unified: "1f635", + native: "😵" + } + ], + version: 1 + }, + face_with_spiral_eyes: { + id: "face_with_spiral_eyes", + name: "Face with Spiral Eyes", + keywords: [ + "sick", + "ill", + "confused", + "nauseous", + "nausea" + ], + skins: [ + { + unified: "1f635-200d-1f4ab", + native: "😵‍💫" + } + ], + version: 13.1 + }, + exploding_head: { + id: "exploding_head", + name: "Exploding Head", + keywords: [ + "shocked", + "face", + "with", + "mind", + "blown" + ], + skins: [ + { + unified: "1f92f", + native: "🤯" + } + ], + version: 5 + }, + face_with_cowboy_hat: { + id: "face_with_cowboy_hat", + name: "Cowboy Hat Face", + keywords: [ + "with", + "cowgirl" + ], + skins: [ + { + unified: "1f920", + native: "🤠" + } + ], + version: 3 + }, + partying_face: { + id: "partying_face", + name: "Partying Face", + keywords: [ + "celebration", + "woohoo" + ], + skins: [ + { + unified: "1f973", + native: "🥳" + } + ], + version: 11 + }, + disguised_face: { + id: "disguised_face", + name: "Disguised Face", + keywords: [ + "pretent", + "brows", + "glasses", + "moustache" + ], + skins: [ + { + unified: "1f978", + native: "🥸" + } + ], + version: 13 + }, + sunglasses: { + id: "sunglasses", + name: "Smiling Face with Sunglasses", + emoticons: [ + "8)" + ], + keywords: [ + "cool", + "smile", + "summer", + "beach", + "sunglass" + ], + skins: [ + { + unified: "1f60e", + native: "😎" + } + ], + version: 1 + }, + nerd_face: { + id: "nerd_face", + name: "Nerd Face", + keywords: [ + "nerdy", + "geek", + "dork" + ], + skins: [ + { + unified: "1f913", + native: "🤓" + } + ], + version: 1 + }, + face_with_monocle: { + id: "face_with_monocle", + name: "Face with Monocle", + keywords: [ + "stuffy", + "wealthy" + ], + skins: [ + { + unified: "1f9d0", + native: "🧐" + } + ], + version: 5 + }, + confused: { + id: "confused", + name: "Confused Face", + emoticons: [ + ":\\", + ":-\\", + ":/", + ":-/" + ], + keywords: [ + "indifference", + "huh", + "weird", + "hmmm", + ":/" + ], + skins: [ + { + unified: "1f615", + native: "😕" + } + ], + version: 1 + }, + face_with_diagonal_mouth: { + id: "face_with_diagonal_mouth", + name: "Face with Diagonal Mouth", + keywords: [ + "skeptic", + "confuse", + "frustrated", + "indifferent" + ], + skins: [ + { + unified: "1fae4", + native: "🫤" + } + ], + version: 14 + }, + worried: { + id: "worried", + name: "Worried Face", + keywords: [ + "concern", + "nervous", + ":(" + ], + skins: [ + { + unified: "1f61f", + native: "😟" + } + ], + version: 1 + }, + slightly_frowning_face: { + id: "slightly_frowning_face", + name: "Slightly Frowning Face", + keywords: [ + "disappointed", + "sad", + "upset" + ], + skins: [ + { + unified: "1f641", + native: "🙁" + } + ], + version: 1 + }, + white_frowning_face: { + id: "white_frowning_face", + name: "Frowning Face", + keywords: [ + "white", + "sad", + "upset", + "frown" + ], + skins: [ + { + unified: "2639-fe0f", + native: "☹️" + } + ], + version: 1 + }, + open_mouth: { + id: "open_mouth", + name: "Face with Open Mouth", + emoticons: [ + ":o", + ":-o", + ":O", + ":-O" + ], + keywords: [ + "surprise", + "impressed", + "wow", + "whoa", + ":O" + ], + skins: [ + { + unified: "1f62e", + native: "😮" + } + ], + version: 1 + }, + hushed: { + id: "hushed", + name: "Hushed Face", + keywords: [ + "woo", + "shh" + ], + skins: [ + { + unified: "1f62f", + native: "😯" + } + ], + version: 1 + }, + astonished: { + id: "astonished", + name: "Astonished Face", + keywords: [ + "xox", + "surprised", + "poisoned" + ], + skins: [ + { + unified: "1f632", + native: "😲" + } + ], + version: 1 + }, + flushed: { + id: "flushed", + name: "Flushed Face", + keywords: [ + "blush", + "shy", + "flattered" + ], + skins: [ + { + unified: "1f633", + native: "😳" + } + ], + version: 1 + }, + pleading_face: { + id: "pleading_face", + name: "Pleading Face", + keywords: [ + "begging", + "mercy", + "cry", + "tears", + "sad", + "grievance" + ], + skins: [ + { + unified: "1f97a", + native: "🥺" + } + ], + version: 11 + }, + face_holding_back_tears: { + id: "face_holding_back_tears", + name: "Face Holding Back Tears", + keywords: [ + "touched", + "gratitude", + "cry" + ], + skins: [ + { + unified: "1f979", + native: "🥹" + } + ], + version: 14 + }, + frowning: { + id: "frowning", + name: "Frowning Face with Open Mouth", + keywords: [ + "aw", + "what" + ], + skins: [ + { + unified: "1f626", + native: "😦" + } + ], + version: 1 + }, + anguished: { + id: "anguished", + name: "Anguished Face", + emoticons: [ + "D:" + ], + keywords: [ + "stunned", + "nervous" + ], + skins: [ + { + unified: "1f627", + native: "😧" + } + ], + version: 1 + }, + fearful: { + id: "fearful", + name: "Fearful Face", + keywords: [ + "scared", + "terrified", + "nervous" + ], + skins: [ + { + unified: "1f628", + native: "😨" + } + ], + version: 1 + }, + cold_sweat: { + id: "cold_sweat", + name: "Anxious Face with Sweat", + keywords: [ + "cold", + "nervous" + ], + skins: [ + { + unified: "1f630", + native: "😰" + } + ], + version: 1 + }, + disappointed_relieved: { + id: "disappointed_relieved", + name: "Sad but Relieved Face", + keywords: [ + "disappointed", + "phew", + "sweat", + "nervous" + ], + skins: [ + { + unified: "1f625", + native: "😥" + } + ], + version: 1 + }, + cry: { + id: "cry", + name: "Crying Face", + emoticons: [ + ":'(" + ], + keywords: [ + "cry", + "tears", + "sad", + "depressed", + "upset", + ":'(" + ], + skins: [ + { + unified: "1f622", + native: "😢" + } + ], + version: 1 + }, + sob: { + id: "sob", + name: "Loudly Crying Face", + emoticons: [ + ":'(" + ], + keywords: [ + "sob", + "cry", + "tears", + "sad", + "upset", + "depressed" + ], + skins: [ + { + unified: "1f62d", + native: "😭" + } + ], + version: 1 + }, + scream: { + id: "scream", + name: "Face Screaming in Fear", + keywords: [ + "scream", + "munch", + "scared", + "omg" + ], + skins: [ + { + unified: "1f631", + native: "😱" + } + ], + version: 1 + }, + confounded: { + id: "confounded", + name: "Confounded Face", + keywords: [ + "confused", + "sick", + "unwell", + "oops", + ":S" + ], + skins: [ + { + unified: "1f616", + native: "😖" + } + ], + version: 1 + }, + persevere: { + id: "persevere", + name: "Persevering Face", + keywords: [ + "persevere", + "sick", + "no", + "upset", + "oops" + ], + skins: [ + { + unified: "1f623", + native: "😣" + } + ], + version: 1 + }, + disappointed: { + id: "disappointed", + name: "Disappointed Face", + emoticons: [ + "):", + ":(", + ":-(" + ], + keywords: [ + "sad", + "upset", + "depressed", + ":(" + ], + skins: [ + { + unified: "1f61e", + native: "😞" + } + ], + version: 1 + }, + sweat: { + id: "sweat", + name: "Face with Cold Sweat", + keywords: [ + "downcast", + "hot", + "sad", + "tired", + "exercise" + ], + skins: [ + { + unified: "1f613", + native: "😓" + } + ], + version: 1 + }, + weary: { + id: "weary", + name: "Weary Face", + keywords: [ + "tired", + "sleepy", + "sad", + "frustrated", + "upset" + ], + skins: [ + { + unified: "1f629", + native: "😩" + } + ], + version: 1 + }, + tired_face: { + id: "tired_face", + name: "Tired Face", + keywords: [ + "sick", + "whine", + "upset", + "frustrated" + ], + skins: [ + { + unified: "1f62b", + native: "😫" + } + ], + version: 1 + }, + yawning_face: { + id: "yawning_face", + name: "Yawning Face", + keywords: [ + "tired", + "sleepy" + ], + skins: [ + { + unified: "1f971", + native: "🥱" + } + ], + version: 12 + }, + triumph: { + id: "triumph", + name: "Face with Look of Triumph", + keywords: [ + "steam", + "from", + "nose", + "gas", + "phew", + "proud", + "pride" + ], + skins: [ + { + unified: "1f624", + native: "😤" + } + ], + version: 1 + }, + rage: { + id: "rage", + name: "Pouting Face", + keywords: [ + "rage", + "angry", + "mad", + "hate", + "despise" + ], + skins: [ + { + unified: "1f621", + native: "😡" + } + ], + version: 1 + }, + angry: { + id: "angry", + name: "Angry Face", + emoticons: [ + ">:(", + ">:-(" + ], + keywords: [ + "mad", + "annoyed", + "frustrated" + ], + skins: [ + { + unified: "1f620", + native: "😠" + } + ], + version: 1 + }, + face_with_symbols_on_mouth: { + id: "face_with_symbols_on_mouth", + name: "Face with Symbols on Mouth", + keywords: [ + "serious", + "covering", + "swearing", + "cursing", + "cussing", + "profanity", + "expletive" + ], + skins: [ + { + unified: "1f92c", + native: "🤬" + } + ], + version: 5 + }, + smiling_imp: { + id: "smiling_imp", + name: "Smiling Face with Horns", + keywords: [ + "imp", + "devil" + ], + skins: [ + { + unified: "1f608", + native: "😈" + } + ], + version: 1 + }, + imp: { + id: "imp", + name: "Imp", + keywords: [ + "angry", + "face", + "with", + "horns", + "devil" + ], + skins: [ + { + unified: "1f47f", + native: "👿" + } + ], + version: 1 + }, + skull: { + id: "skull", + name: "Skull", + keywords: [ + "dead", + "skeleton", + "creepy", + "death" + ], + skins: [ + { + unified: "1f480", + native: "💀" + } + ], + version: 1 + }, + skull_and_crossbones: { + id: "skull_and_crossbones", + name: "Skull and Crossbones", + keywords: [ + "poison", + "danger", + "deadly", + "scary", + "death", + "pirate", + "evil" + ], + skins: [ + { + unified: "2620-fe0f", + native: "☠️" + } + ], + version: 1 + }, + hankey: { + id: "hankey", + name: "Pile of Poo", + keywords: [ + "hankey", + "poop", + "shit", + "shitface", + "fail", + "turd" + ], + skins: [ + { + unified: "1f4a9", + native: "💩" + } + ], + version: 1 + }, + clown_face: { + id: "clown_face", + name: "Clown Face", + keywords: [ + ], + skins: [ + { + unified: "1f921", + native: "🤡" + } + ], + version: 3 + }, + japanese_ogre: { + id: "japanese_ogre", + name: "Ogre", + keywords: [ + "japanese", + "monster", + "red", + "mask", + "halloween", + "scary", + "creepy", + "devil", + "demon" + ], + skins: [ + { + unified: "1f479", + native: "👹" + } + ], + version: 1 + }, + japanese_goblin: { + id: "japanese_goblin", + name: "Goblin", + keywords: [ + "japanese", + "red", + "evil", + "mask", + "monster", + "scary", + "creepy" + ], + skins: [ + { + unified: "1f47a", + native: "👺" + } + ], + version: 1 + }, + ghost: { + id: "ghost", + name: "Ghost", + keywords: [ + "halloween", + "spooky", + "scary" + ], + skins: [ + { + unified: "1f47b", + native: "👻" + } + ], + version: 1 + }, + alien: { + id: "alien", + name: "Alien", + keywords: [ + "UFO", + "paul", + "weird", + "outer", + "space" + ], + skins: [ + { + unified: "1f47d", + native: "👽" + } + ], + version: 1 + }, + space_invader: { + id: "space_invader", + name: "Alien Monster", + keywords: [ + "space", + "invader", + "game", + "arcade", + "play" + ], + skins: [ + { + unified: "1f47e", + native: "👾" + } + ], + version: 1 + }, + robot_face: { + id: "robot_face", + name: "Robot", + keywords: [ + "face", + "computer", + "machine", + "bot" + ], + skins: [ + { + unified: "1f916", + native: "🤖" + } + ], + version: 1 + }, + smiley_cat: { + id: "smiley_cat", + name: "Grinning Cat", + keywords: [ + "smiley", + "animal", + "cats", + "happy", + "smile" + ], + skins: [ + { + unified: "1f63a", + native: "😺" + } + ], + version: 1 + }, + smile_cat: { + id: "smile_cat", + name: "Grinning Cat with Smiling Eyes", + keywords: [ + "smile", + "animal", + "cats" + ], + skins: [ + { + unified: "1f638", + native: "😸" + } + ], + version: 1 + }, + joy_cat: { + id: "joy_cat", + name: "Cat with Tears of Joy", + keywords: [ + "animal", + "cats", + "haha", + "happy" + ], + skins: [ + { + unified: "1f639", + native: "😹" + } + ], + version: 1 + }, + heart_eyes_cat: { + id: "heart_eyes_cat", + name: "Smiling Cat with Heart-Eyes", + keywords: [ + "heart", + "eyes", + "animal", + "love", + "like", + "affection", + "cats", + "valentines" + ], + skins: [ + { + unified: "1f63b", + native: "😻" + } + ], + version: 1 + }, + smirk_cat: { + id: "smirk_cat", + name: "Cat with Wry Smile", + keywords: [ + "smirk", + "animal", + "cats" + ], + skins: [ + { + unified: "1f63c", + native: "😼" + } + ], + version: 1 + }, + kissing_cat: { + id: "kissing_cat", + name: "Kissing Cat", + keywords: [ + "animal", + "cats", + "kiss" + ], + skins: [ + { + unified: "1f63d", + native: "😽" + } + ], + version: 1 + }, + scream_cat: { + id: "scream_cat", + name: "Weary Cat", + keywords: [ + "scream", + "animal", + "cats", + "munch", + "scared" + ], + skins: [ + { + unified: "1f640", + native: "🙀" + } + ], + version: 1 + }, + crying_cat_face: { + id: "crying_cat_face", + name: "Crying Cat", + keywords: [ + "face", + "animal", + "tears", + "weep", + "sad", + "cats", + "upset", + "cry" + ], + skins: [ + { + unified: "1f63f", + native: "😿" + } + ], + version: 1 + }, + pouting_cat: { + id: "pouting_cat", + name: "Pouting Cat", + keywords: [ + "animal", + "cats" + ], + skins: [ + { + unified: "1f63e", + native: "😾" + } + ], + version: 1 + }, + see_no_evil: { + id: "see_no_evil", + name: "See-No-Evil Monkey", + keywords: [ + "see", + "no", + "evil", + "animal", + "nature", + "haha" + ], + skins: [ + { + unified: "1f648", + native: "🙈" + } + ], + version: 1 + }, + hear_no_evil: { + id: "hear_no_evil", + name: "Hear-No-Evil Monkey", + keywords: [ + "hear", + "no", + "evil", + "animal", + "nature" + ], + skins: [ + { + unified: "1f649", + native: "🙉" + } + ], + version: 1 + }, + speak_no_evil: { + id: "speak_no_evil", + name: "Speak-No-Evil Monkey", + keywords: [ + "speak", + "no", + "evil", + "animal", + "nature", + "omg" + ], + skins: [ + { + unified: "1f64a", + native: "🙊" + } + ], + version: 1 + }, + love_letter: { + id: "love_letter", + name: "Love Letter", + keywords: [ + "email", + "like", + "affection", + "envelope", + "valentines" + ], + skins: [ + { + unified: "1f48c", + native: "💌" + } + ], + version: 1 + }, + cupid: { + id: "cupid", + name: "Heart with Arrow", + keywords: [ + "cupid", + "love", + "like", + "affection", + "valentines" + ], + skins: [ + { + unified: "1f498", + native: "💘" + } + ], + version: 1 + }, + gift_heart: { + id: "gift_heart", + name: "Heart with Ribbon", + keywords: [ + "gift", + "love", + "valentines" + ], + skins: [ + { + unified: "1f49d", + native: "💝" + } + ], + version: 1 + }, + sparkling_heart: { + id: "sparkling_heart", + name: "Sparkling Heart", + keywords: [ + "love", + "like", + "affection", + "valentines" + ], + skins: [ + { + unified: "1f496", + native: "💖" + } + ], + version: 1 + }, + heartpulse: { + id: "heartpulse", + name: "Growing Heart", + keywords: [ + "heartpulse", + "like", + "love", + "affection", + "valentines", + "pink" + ], + skins: [ + { + unified: "1f497", + native: "💗" + } + ], + version: 1 + }, + heartbeat: { + id: "heartbeat", + name: "Beating Heart", + keywords: [ + "heartbeat", + "love", + "like", + "affection", + "valentines", + "pink" + ], + skins: [ + { + unified: "1f493", + native: "💓" + } + ], + version: 1 + }, + revolving_hearts: { + id: "revolving_hearts", + name: "Revolving Hearts", + keywords: [ + "love", + "like", + "affection", + "valentines" + ], + skins: [ + { + unified: "1f49e", + native: "💞" + } + ], + version: 1 + }, + two_hearts: { + id: "two_hearts", + name: "Two Hearts", + keywords: [ + "love", + "like", + "affection", + "valentines", + "heart" + ], + skins: [ + { + unified: "1f495", + native: "💕" + } + ], + version: 1 + }, + heart_decoration: { + id: "heart_decoration", + name: "Heart Decoration", + keywords: [ + "purple", + "square", + "love", + "like" + ], + skins: [ + { + unified: "1f49f", + native: "💟" + } + ], + version: 1 + }, + heavy_heart_exclamation_mark_ornament: { + id: "heavy_heart_exclamation_mark_ornament", + name: "Heart Exclamation", + keywords: [ + "heavy", + "mark", + "ornament", + "decoration", + "love" + ], + skins: [ + { + unified: "2763-fe0f", + native: "❣️" + } + ], + version: 1 + }, + broken_heart: { + id: "broken_heart", + name: "Broken Heart", + emoticons: [ + ":(", - ">:-(" - ], - o: 2 - }, - cookie: { - a: "Cookie", - b: "1F36A", - j: [ - "food", - "snack", - "oreo", - "chocolate", - "sweet", - "dessert" - ], - k: [ - 7, - 9 - ], - o: 2 - }, - gb: { - a: "United Kingdom Flag", - b: "1F1EC-1F1E7", - k: [ - 1, - 55 - ], - n: [ - "uk", - "flag-gb" - ], - o: 2 + version: 1 }, tropical_fish: { - a: "Tropical Fish", - b: "1F420", - j: [ + id: "tropical_fish", + name: "Tropical Fish", + keywords: [ "animal", "swim", "ocean", "beach", "nemo" ], - k: [ - 12, - 4 - ], - o: 2 - }, - "woman-tipping-hand": { - skin_variations: { - "1F3FB": { - unified: "1F481-1F3FB-200D-2640-FE0F", - non_qualified: "1F481-1F3FB-200D-2640", - image: "1f481-1f3fb-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F481-1F3FC-200D-2640-FE0F", - non_qualified: "1F481-1F3FC-200D-2640", - image: "1f481-1f3fc-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F481-1F3FD-200D-2640-FE0F", - non_qualified: "1F481-1F3FD-200D-2640", - image: "1f481-1f3fd-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 50, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F481-1F3FE-200D-2640-FE0F", - non_qualified: "1F481-1F3FE-200D-2640", - image: "1f481-1f3fe-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F481-1F3FF-200D-2640-FE0F", - non_qualified: "1F481-1F3FF-200D-2640", - image: "1f481-1f3ff-200d-2640-fe0f.png", - sheet_x: 23, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f420", + native: "🐠" } - }, - obsoletes: "1F481", - a: "Woman Tipping Hand", - b: "1F481-200D-2640-FE0F", - c: "1F481-200D-2640", - k: [ - 23, - 47 ], - o: 4 - }, - black_circle_for_record: { - a: "Black Circle for Record", - b: "23FA-FE0F", - c: "23FA", - k: [ - 52, - 39 - ], - o: 2 - }, - film_frames: { - a: "Film Frames", - b: "1F39E-FE0F", - c: "1F39E", - k: [ - 8, - 4 - ], - o: 2 - }, - film_projector: { - a: "Film Projector", - b: "1F4FD-FE0F", - c: "1F4FD", - j: [ - "video", - "tape", - "record", - "movie" - ], - k: [ - 27, - 26 - ], - o: 2 - }, - "flag-gd": { - a: "Grenada Flag", - b: "1F1EC-1F1E9", - k: [ - 1, - 56 - ], - o: 2 + version: 1 }, blowfish: { - a: "Blowfish", - b: "1F421", - j: [ + id: "blowfish", + name: "Blowfish", + keywords: [ "animal", "nature", "food", "sea", "ocean" ], - k: [ - 12, - 5 - ], - o: 2 - }, - face_with_symbols_on_mouth: { - a: "Serious Face with Symbols Covering Mouth", - b: "1F92C", - k: [ - 38, - 46 - ], - n: [ - "serious_face_with_symbols_covering_mouth" - ], - o: 5 - }, - birthday: { - a: "Birthday Cake", - b: "1F382", - j: [ - "food", - "dessert", - "cake" - ], - k: [ - 7, - 33 - ], - o: 2 - }, - eject: { - a: "Eject", - b: "23CF-FE0F", - c: "23CF", - k: [ - 52, - 25 - ], - o: 2 - }, - raising_hand: { - skin_variations: { - "1F3FB": { - unified: "1F64B-1F3FB", - non_qualified: null, - image: "1f64b-1f3fb.png", - sheet_x: 33, - sheet_y: 3, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F64B-1F3FC", - non_qualified: null, - image: "1f64b-1f3fc.png", - sheet_x: 33, - sheet_y: 4, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F64B-1F3FD", - non_qualified: null, - image: "1f64b-1f3fd.png", - sheet_x: 33, - sheet_y: 5, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F64B-1F3FE", - non_qualified: null, - image: "1f64b-1f3fe.png", - sheet_x: 33, - sheet_y: 6, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F64B-1F3FF", - non_qualified: null, - image: "1f64b-1f3ff.png", - sheet_x: 33, - sheet_y: 7, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f421", + native: "🐡" } - }, - obsoleted_by: "1F64B-200D-2640-FE0F", - a: "Happy Person Raising One Hand", - b: "1F64B", - k: [ - 33, - 2 ], - o: 2 - }, - tractor: { - a: "Tractor", - b: "1F69C", - j: [ - "vehicle", - "car", - "farming", - "agriculture" - ], - k: [ - 34, - 27 - ], - o: 2 - }, - "flag-ge": { - a: "Georgia Flag", - b: "1F1EC-1F1EA", - k: [ - 2, - 0 - ], - o: 2 - }, - smiling_imp: { - a: "Smiling Face with Horns", - b: "1F608", - j: [ - "devil", - "horns" - ], - k: [ - 30, - 43 - ], - o: 2 - }, - racing_car: { - a: "Racing Car", - b: "1F3CE-FE0F", - c: "1F3CE", - j: [ - "sports", - "race", - "fast", - "formula", - "f1" - ], - k: [ - 10, - 33 - ], - o: 2 - }, - cinema: { - a: "Cinema", - b: "1F3A6", - j: [ - "blue-square", - "record", - "film", - "movie", - "curtain", - "stage", - "theater" - ], - k: [ - 8, - 12 - ], - o: 2 - }, - clapper: { - a: "Clapper Board", - b: "1F3AC", - j: [ - "movie", - "film", - "record" - ], - k: [ - 8, - 18 - ], - o: 2 + version: 1 }, shark: { - a: "Shark", - b: "1F988", - j: [ + id: "shark", + name: "Shark", + keywords: [ "animal", "nature", "fish", @@ -81116,101 +74857,18 @@ var emojis = { "fins", "beach" ], - k: [ - 42, - 26 - ], - o: 4 - }, - cake: { - a: "Shortcake", - b: "1F370", - j: [ - "food", - "dessert" - ], - k: [ - 7, - 15 - ], - o: 2 - }, - "man-raising-hand": { - skin_variations: { - "1F3FB": { - unified: "1F64B-1F3FB-200D-2642-FE0F", - non_qualified: "1F64B-1F3FB-200D-2642", - image: "1f64b-1f3fb-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F64B-1F3FC-200D-2642-FE0F", - non_qualified: "1F64B-1F3FC-200D-2642", - image: "1f64b-1f3fc-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F64B-1F3FD-200D-2642-FE0F", - non_qualified: "1F64B-1F3FD-200D-2642", - image: "1f64b-1f3fd-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 56, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F64B-1F3FE-200D-2642-FE0F", - non_qualified: "1F64B-1F3FE-200D-2642", - image: "1f64b-1f3fe-200d-2642-fe0f.png", - sheet_x: 33, - sheet_y: 0, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F64B-1F3FF-200D-2642-FE0F", - non_qualified: "1F64B-1F3FF-200D-2642", - image: "1f64b-1f3ff-200d-2642-fe0f.png", - sheet_x: 33, - sheet_y: 1, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f988", + native: "🦈" } - }, - a: "Man Raising Hand", - b: "1F64B-200D-2642-FE0F", - c: "1F64B-200D-2642", - k: [ - 32, - 53 ], - o: 4 + version: 3 }, octopus: { - a: "Octopus", - b: "1F419", - j: [ + id: "octopus", + name: "Octopus", + keywords: [ "animal", "creature", "ocean", @@ -81218,1821 +74876,2619 @@ var emojis = { "nature", "beach" ], - k: [ - 11, - 54 - ], - o: 2 - }, - "woman-raising-hand": { - skin_variations: { - "1F3FB": { - unified: "1F64B-1F3FB-200D-2640-FE0F", - non_qualified: "1F64B-1F3FB-200D-2640", - image: "1f64b-1f3fb-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F64B-1F3FC-200D-2640-FE0F", - non_qualified: "1F64B-1F3FC-200D-2640", - image: "1f64b-1f3fc-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F64B-1F3FD-200D-2640-FE0F", - non_qualified: "1F64B-1F3FD-200D-2640", - image: "1f64b-1f3fd-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 50, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F64B-1F3FE-200D-2640-FE0F", - non_qualified: "1F64B-1F3FE-200D-2640", - image: "1f64b-1f3fe-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F64B-1F3FF-200D-2640-FE0F", - non_qualified: "1F64B-1F3FF-200D-2640", - image: "1f64b-1f3ff-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f419", + native: "🐙" } - }, - obsoletes: "1F64B", - a: "Woman Raising Hand", - b: "1F64B-200D-2640-FE0F", - c: "1F64B-200D-2640", - k: [ - 32, - 47 ], - o: 4 - }, - "flag-gf": { - a: "French Guiana Flag", - b: "1F1EC-1F1EB", - k: [ - 2, - 1 - ], - o: 2 - }, - tv: { - a: "Television", - b: "1F4FA", - j: [ - "technology", - "program", - "oldschool", - "show", - "television" - ], - k: [ - 27, - 23 - ], - o: 2 - }, - imp: { - a: "Imp", - b: "1F47F", - j: [ - "devil", - "angry", - "horns" - ], - k: [ - 23, - 45 - ], - o: 2 - }, - cupcake: { - a: "Cupcake", - b: "1F9C1", - k: [ - 44, - 9 - ], - o: 11 - }, - racing_motorcycle: { - a: "Racing Motorcycle", - b: "1F3CD-FE0F", - c: "1F3CD", - k: [ - 10, - 32 - ], - o: 2 - }, - low_brightness: { - a: "Low Brightness Symbol", - b: "1F505", - j: [ - "sun", - "afternoon", - "warm", - "summer" - ], - k: [ - 27, - 33 - ], - o: 2 + version: 1 }, shell: { - a: "Spiral Shell", - b: "1F41A", - j: [ + id: "shell", + name: "Spiral Shell", + keywords: [ "nature", "sea", "beach" ], - k: [ - 11, - 55 - ], - o: 2 - }, - "flag-gg": { - a: "Guernsey Flag", - b: "1F1EC-1F1EC", - k: [ - 2, - 2 - ], - o: 2 - }, - high_brightness: { - a: "High Brightness Symbol", - b: "1F506", - j: [ - "sun", - "light" - ], - k: [ - 27, - 34 - ], - o: 2 - }, - deaf_person: { - skin_variations: { - "1F3FB": { - unified: "1F9CF-1F3FB", - non_qualified: null, - image: "1f9cf-1f3fb.png", - sheet_x: 45, - sheet_y: 11, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F9CF-1F3FC", - non_qualified: null, - image: "1f9cf-1f3fc.png", - sheet_x: 45, - sheet_y: 12, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F9CF-1F3FD", - non_qualified: null, - image: "1f9cf-1f3fd.png", - sheet_x: 45, - sheet_y: 13, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F9CF-1F3FE", - non_qualified: null, - image: "1f9cf-1f3fe.png", - sheet_x: 45, - sheet_y: 14, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F9CF-1F3FF", - non_qualified: null, - image: "1f9cf-1f3ff.png", - sheet_x: 45, - sheet_y: 15, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f41a", + native: "🐚" } - }, - a: "Deaf Person", - b: "1F9CF", - k: [ - 45, - 10 ], - o: 12 + version: 1 }, - skull: { - a: "Skull", - b: "1F480", - j: [ - "dead", - "skeleton", - "creepy", - "death" + coral: { + id: "coral", + name: "Coral", + keywords: [ + "ocean", + "sea", + "reef" ], - k: [ - 23, - 46 - ], - o: 2 - }, - motor_scooter: { - a: "Motor Scooter", - b: "1F6F5", - j: [ - "vehicle", - "vespa", - "sasha" - ], - k: [ - 36, - 54 - ], - o: 4 - }, - camera: { - a: "Camera", - b: "1F4F7", - j: [ - "gadgets", - "photography" - ], - k: [ - 27, - 20 - ], - o: 2 - }, - pie: { - a: "Pie", - b: "1F967", - k: [ - 41, - 54 - ], - o: 5 - }, - "flag-gh": { - a: "Ghana Flag", - b: "1F1EC-1F1ED", - k: [ - 2, - 3 - ], - o: 2 - }, - deaf_man: { - skin_variations: { - "1F3FB": { - unified: "1F9CF-1F3FB-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FB-200D-2642", - image: "1f9cf-1f3fb-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 5, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F9CF-1F3FC-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FC-200D-2642", - image: "1f9cf-1f3fc-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 6, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F9CF-1F3FD-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FD-200D-2642", - image: "1f9cf-1f3fd-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 7, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F9CF-1F3FE-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FE-200D-2642", - image: "1f9cf-1f3fe-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 8, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F9CF-1F3FF-200D-2642-FE0F", - non_qualified: "1F9CF-1F3FF-200D-2642", - image: "1f9cf-1f3ff-200d-2642-fe0f.png", - sheet_x: 45, - sheet_y: 9, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1fab8", + native: "🪸" } - }, - a: "Deaf Man", - b: "1F9CF-200D-2642-FE0F", - c: "1F9CF-200D-2642", - k: [ - 45, - 4 ], - o: 12 + version: 14 }, - skull_and_crossbones: { - a: "Skull and Crossbones", - b: "2620-FE0F", - c: "2620", - j: [ - "poison", - "danger", - "deadly", - "scary", - "death", - "pirate", - "evil" + jellyfish: { + id: "jellyfish", + name: "Jellyfish", + keywords: [ + "sting", + "tentacles" ], - k: [ - 53, - 8 + skins: [ + { + unified: "1fabc", + native: "🪼" + } ], - o: 2 - }, - camera_with_flash: { - a: "Camera with Flash", - b: "1F4F8", - k: [ - 27, - 21 - ], - o: 2 - }, - signal_strength: { - a: "Antenna with Bars", - b: "1F4F6", - j: [ - "blue-square", - "reception", - "phone", - "internet", - "connection", - "wifi", - "bluetooth", - "bars" - ], - k: [ - 27, - 19 - ], - o: 2 - }, - chocolate_bar: { - a: "Chocolate Bar", - b: "1F36B", - j: [ - "food", - "snack", - "dessert", - "sweet" - ], - k: [ - 7, - 10 - ], - o: 2 - }, - manual_wheelchair: { - a: "Manual Wheelchair", - b: "1F9BD", - k: [ - 44, - 5 - ], - o: 12 + version: 15 }, snail: { - a: "Snail", - b: "1F40C", - j: [ + id: "snail", + name: "Snail", + keywords: [ "slow", "animal", "shell" ], - k: [ - 11, - 40 - ], - o: 2 - }, - motorized_wheelchair: { - a: "Motorized Wheelchair", - b: "1F9BC", - k: [ - 44, - 4 - ], - o: 12 - }, - "flag-gi": { - a: "Gibraltar Flag", - b: "1F1EC-1F1EE", - k: [ - 2, - 4 - ], - o: 2 - }, - hankey: { - a: "Pile of Poo", - b: "1F4A9", - k: [ - 25, - 51 - ], - n: [ - "poop", - "shit" - ], - o: 2 - }, - vibration_mode: { - a: "Vibration Mode", - b: "1F4F3", - j: [ - "orange-square", - "phone" - ], - k: [ - 27, - 16 - ], - o: 2 - }, - deaf_woman: { - skin_variations: { - "1F3FB": { - unified: "1F9CF-1F3FB-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FB-200D-2640", - image: "1f9cf-1f3fb-200d-2640-fe0f.png", - sheet_x: 44, - sheet_y: 56, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F9CF-1F3FC-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FC-200D-2640", - image: "1f9cf-1f3fc-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 0, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F9CF-1F3FD-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FD-200D-2640", - image: "1f9cf-1f3fd-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 1, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F9CF-1F3FE-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FE-200D-2640", - image: "1f9cf-1f3fe-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 2, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F9CF-1F3FF-200D-2640-FE0F", - non_qualified: "1F9CF-1F3FF-200D-2640", - image: "1f9cf-1f3ff-200d-2640-fe0f.png", - sheet_x: 45, - sheet_y: 3, - added_in: "12.1", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f40c", + native: "🐌" } - }, - a: "Deaf Woman", - b: "1F9CF-200D-2640-FE0F", - c: "1F9CF-200D-2640", - k: [ - 44, - 55 ], - o: 12 + version: 1 }, butterfly: { - a: "Butterfly", - b: "1F98B", - j: [ + id: "butterfly", + name: "Butterfly", + keywords: [ "animal", "insect", "nature", "caterpillar" ], - k: [ - 42, - 29 - ], - o: 4 - }, - video_camera: { - a: "Video Camera", - b: "1F4F9", - j: [ - "film", - "record" - ], - k: [ - 27, - 22 - ], - o: 2 - }, - candy: { - a: "Candy", - b: "1F36C", - j: [ - "snack", - "dessert", - "sweet", - "lolly" - ], - k: [ - 7, - 11 - ], - o: 2 - }, - auto_rickshaw: { - a: "Auto Rickshaw", - b: "1F6FA", - k: [ - 37, - 2 - ], - o: 12 - }, - bow: { - skin_variations: { - "1F3FB": { - unified: "1F647-1F3FB", - non_qualified: null, - image: "1f647-1f3fb.png", - sheet_x: 32, - sheet_y: 39, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F647-1F3FC", - non_qualified: null, - image: "1f647-1f3fc.png", - sheet_x: 32, - sheet_y: 40, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F647-1F3FD", - non_qualified: null, - image: "1f647-1f3fd.png", - sheet_x: 32, - sheet_y: 41, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F647-1F3FE", - non_qualified: null, - image: "1f647-1f3fe.png", - sheet_x: 32, - sheet_y: 42, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F647-1F3FF", - non_qualified: null, - image: "1f647-1f3ff.png", - sheet_x: 32, - sheet_y: 43, - added_in: "2.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f98b", + native: "🦋" } - }, - obsoleted_by: "1F647-200D-2642-FE0F", - a: "Person Bowing Deeply", - b: "1F647", - k: [ - 32, - 38 ], - o: 2 - }, - mobile_phone_off: { - a: "Mobile Phone off", - b: "1F4F4", - j: [ - "mute", - "orange-square", - "silence", - "quiet" - ], - k: [ - 27, - 17 - ], - o: 2 - }, - clown_face: { - a: "Clown Face", - b: "1F921", - j: [ - "face" - ], - k: [ - 38, - 18 - ], - o: 4 - }, - lollipop: { - a: "Lollipop", - b: "1F36D", - j: [ - "food", - "snack", - "candy", - "sweet" - ], - k: [ - 7, - 12 - ], - o: 2 - }, - "flag-gl": { - a: "Greenland Flag", - b: "1F1EC-1F1F1", - k: [ - 2, - 5 - ], - o: 2 - }, - vhs: { - a: "Videocassette", - b: "1F4FC", - j: [ - "record", - "video", - "oldschool", - "90s", - "80s" - ], - k: [ - 27, - 25 - ], - o: 2 + version: 3 }, bug: { - a: "Bug", - b: "1F41B", - j: [ + id: "bug", + name: "Bug", + keywords: [ "animal", "insect", "nature", "worm" ], - k: [ - 11, - 56 - ], - o: 2 - }, - bike: { - a: "Bicycle", - b: "1F6B2", - j: [ - "sports", - "bicycle", - "exercise", - "hipster" - ], - k: [ - 35, - 9 - ], - o: 2 - }, - "man-bowing": { - skin_variations: { - "1F3FB": { - unified: "1F647-1F3FB-200D-2642-FE0F", - non_qualified: "1F647-1F3FB-200D-2642", - image: "1f647-1f3fb-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 33, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F647-1F3FC-200D-2642-FE0F", - non_qualified: "1F647-1F3FC-200D-2642", - image: "1f647-1f3fc-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 34, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F647-1F3FD-200D-2642-FE0F", - non_qualified: "1F647-1F3FD-200D-2642", - image: "1f647-1f3fd-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 35, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F647-1F3FE-200D-2642-FE0F", - non_qualified: "1F647-1F3FE-200D-2642", - image: "1f647-1f3fe-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F647-1F3FF-200D-2642-FE0F", - non_qualified: "1F647-1F3FF-200D-2642", - image: "1f647-1f3ff-200d-2642-fe0f.png", - sheet_x: 32, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f41b", + native: "🐛" } - }, - obsoletes: "1F647", - a: "Man Bowing", - b: "1F647-200D-2642-FE0F", - c: "1F647-200D-2642", - k: [ - 32, - 32 ], - o: 4 - }, - female_sign: { - a: "Female Sign", - b: "2640-FE0F", - c: "2640", - k: [ - 53, - 18 - ], - o: 4 - }, - japanese_ogre: { - a: "Japanese Ogre", - b: "1F479", - j: [ - "monster", - "red", - "mask", - "halloween", - "scary", - "creepy", - "devil", - "demon", - "japanese", - "ogre" - ], - k: [ - 23, - 34 - ], - o: 2 - }, - custard: { - a: "Custard", - b: "1F36E", - j: [ - "dessert", - "food" - ], - k: [ - 7, - 13 - ], - o: 2 + version: 1 }, ant: { - a: "Ant", - b: "1F41C", - j: [ + id: "ant", + name: "Ant", + keywords: [ "animal", "insect", "nature", "bug" ], - k: [ - 12, - 0 - ], - o: 2 - }, - mag: { - a: "Left-Pointing Magnifying Glass", - b: "1F50D", - j: [ - "search", - "zoom", - "find", - "detective" - ], - k: [ - 27, - 41 - ], - o: 2 - }, - "flag-gm": { - a: "Gambia Flag", - b: "1F1EC-1F1F2", - k: [ - 2, - 6 - ], - o: 2 - }, - honey_pot: { - a: "Honey Pot", - b: "1F36F", - j: [ - "bees", - "sweet", - "kitchen" - ], - k: [ - 7, - 14 - ], - o: 2 - }, - "woman-bowing": { - skin_variations: { - "1F3FB": { - unified: "1F647-1F3FB-200D-2640-FE0F", - non_qualified: "1F647-1F3FB-200D-2640", - image: "1f647-1f3fb-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 27, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F647-1F3FC-200D-2640-FE0F", - non_qualified: "1F647-1F3FC-200D-2640", - image: "1f647-1f3fc-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 28, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F647-1F3FD-200D-2640-FE0F", - non_qualified: "1F647-1F3FD-200D-2640", - image: "1f647-1f3fd-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 29, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F647-1F3FE-200D-2640-FE0F", - non_qualified: "1F647-1F3FE-200D-2640", - image: "1f647-1f3fe-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 30, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F647-1F3FF-200D-2640-FE0F", - non_qualified: "1F647-1F3FF-200D-2640", - image: "1f647-1f3ff-200d-2640-fe0f.png", - sheet_x: 32, - sheet_y: 31, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f41c", + native: "🐜" } - }, - a: "Woman Bowing", - b: "1F647-200D-2640-FE0F", - c: "1F647-200D-2640", - k: [ - 32, - 26 ], - o: 4 - }, - male_sign: { - a: "Male Sign", - b: "2642-FE0F", - c: "2642", - k: [ - 53, - 19 - ], - o: 4 - }, - mag_right: { - a: "Right-Pointing Magnifying Glass", - b: "1F50E", - j: [ - "search", - "zoom", - "find", - "detective" - ], - k: [ - 27, - 42 - ], - o: 2 - }, - japanese_goblin: { - a: "Japanese Goblin", - b: "1F47A", - j: [ - "red", - "evil", - "mask", - "monster", - "scary", - "creepy", - "japanese", - "goblin" - ], - k: [ - 23, - 35 - ], - o: 2 - }, - scooter: { - a: "Scooter", - b: "1F6F4", - k: [ - 36, - 53 - ], - o: 4 + version: 1 }, bee: { - a: "Honeybee", - b: "1F41D", - k: [ - 12, - 1 - ], - n: [ - "honeybee" - ], - o: 2 - }, - "flag-gn": { - a: "Guinea Flag", - b: "1F1EC-1F1F3", - k: [ - 2, - 7 - ], - o: 2 - }, - candle: { - a: "Candle", - b: "1F56F-FE0F", - c: "1F56F", - j: [ - "fire", - "wax" - ], - k: [ - 29, - 6 - ], - o: 2 - }, - skateboard: { - a: "Skateboard", - b: "1F6F9", - k: [ - 37, - 1 - ], - o: 11 - }, - medical_symbol: { - a: "Medical Symbol", - b: "2695-FE0F", - c: "2695", - k: [ - 53, - 44 - ], - n: [ - "staff_of_aesculapius" - ], - o: 4 - }, - ghost: { - a: "Ghost", - b: "1F47B", - j: [ - "halloween", - "spooky", - "scary" - ], - k: [ - 23, - 36 - ], - o: 2 - }, - beetle: { - a: "Lady Beetle", - b: "1F41E", - j: [ + id: "bee", + name: "Honeybee", + keywords: [ + "bee", "animal", "insect", "nature", - "ladybug" + "bug", + "spring", + "honey" ], - k: [ - 12, - 2 - ], - o: 2 - }, - face_palm: { - skin_variations: { - "1F3FB": { - unified: "1F926-1F3FB", - non_qualified: null, - image: "1f926-1f3fb.png", - sheet_x: 38, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F926-1F3FC", - non_qualified: null, - image: "1f926-1f3fc.png", - sheet_x: 38, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F926-1F3FD", - non_qualified: null, - image: "1f926-1f3fd.png", - sheet_x: 38, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F926-1F3FE", - non_qualified: null, - image: "1f926-1f3fe.png", - sheet_x: 38, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F926-1F3FF", - non_qualified: null, - image: "1f926-1f3ff.png", - sheet_x: 38, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f41d", + native: "🐝" } - }, - a: "Face Palm", - b: "1F926", - k: [ - 38, - 35 ], - o: 4 + version: 1 }, - "flag-gp": { - a: "Guadeloupe Flag", - b: "1F1EC-1F1F5", - k: [ - 2, - 8 + beetle: { + id: "beetle", + name: "Beetle", + keywords: [ + "insect" ], - o: 2 - }, - baby_bottle: { - a: "Baby Bottle", - b: "1F37C", - j: [ - "food", - "container", - "milk" - ], - k: [ - 7, - 27 - ], - o: 2 - }, - infinity: { - a: "Infinity", - b: "267E-FE0F", - c: "267E", - k: [ - 53, - 39 - ], - o: 11 - }, - glass_of_milk: { - a: "Glass of Milk", - b: "1F95B", - k: [ - 41, - 42 - ], - o: 4 - }, - "man-facepalming": { - skin_variations: { - "1F3FB": { - unified: "1F926-1F3FB-200D-2642-FE0F", - non_qualified: "1F926-1F3FB-200D-2642", - image: "1f926-1f3fb-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 30, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F926-1F3FC-200D-2642-FE0F", - non_qualified: "1F926-1F3FC-200D-2642", - image: "1f926-1f3fc-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 31, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F926-1F3FD-200D-2642-FE0F", - non_qualified: "1F926-1F3FD-200D-2642", - image: "1f926-1f3fd-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 32, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F926-1F3FE-200D-2642-FE0F", - non_qualified: "1F926-1F3FE-200D-2642", - image: "1f926-1f3fe-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 33, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F926-1F3FF-200D-2642-FE0F", - non_qualified: "1F926-1F3FF-200D-2642", - image: "1f926-1f3ff-200d-2642-fe0f.png", - sheet_x: 38, - sheet_y: 34, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1fab2", + native: "🪲" } - }, - a: "Man Facepalming", - b: "1F926-200D-2642-FE0F", - c: "1F926-200D-2642", - k: [ - 38, - 29 ], - o: 4 + version: 13 + }, + ladybug: { + id: "ladybug", + name: "Lady Beetle", + keywords: [ + "ladybug", + "animal", + "insect", + "nature" + ], + skins: [ + { + unified: "1f41e", + native: "🐞" + } + ], + version: 1 }, cricket: { - a: "Cricket", - b: "1F997", - j: [ - "sports" + id: "cricket", + name: "Cricket", + keywords: [ + "animal", + "chirp" ], - k: [ - 42, - 41 - ], - o: 5 - }, - busstop: { - a: "Bus Stop", - b: "1F68F", - j: [ - "transportation", - "wait" - ], - k: [ - 34, - 14 - ], - o: 2 - }, - "flag-gq": { - a: "Equatorial Guinea Flag", - b: "1F1EC-1F1F6", - k: [ - 2, - 9 - ], - o: 2 - }, - alien: { - a: "Extraterrestrial Alien", - b: "1F47D", - j: [ - "UFO", - "paul", - "weird", - "outer_space" - ], - k: [ - 23, - 43 - ], - o: 2 - }, - bulb: { - a: "Electric Light Bulb", - b: "1F4A1", - j: [ - "light", - "electricity", - "idea" - ], - k: [ - 25, - 43 - ], - o: 2 - }, - "woman-facepalming": { - skin_variations: { - "1F3FB": { - unified: "1F926-1F3FB-200D-2640-FE0F", - non_qualified: "1F926-1F3FB-200D-2640", - image: "1f926-1f3fb-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 24, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F926-1F3FC-200D-2640-FE0F", - non_qualified: "1F926-1F3FC-200D-2640", - image: "1f926-1f3fc-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 25, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F926-1F3FD-200D-2640-FE0F", - non_qualified: "1F926-1F3FD-200D-2640", - image: "1f926-1f3fd-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 26, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F926-1F3FE-200D-2640-FE0F", - non_qualified: "1F926-1F3FE-200D-2640", - image: "1f926-1f3fe-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 27, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F926-1F3FF-200D-2640-FE0F", - non_qualified: "1F926-1F3FF-200D-2640", - image: "1f926-1f3ff-200d-2640-fe0f.png", - sheet_x: 38, - sheet_y: 28, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f997", + native: "🦗" } - }, - a: "Woman Facepalming", - b: "1F926-200D-2640-FE0F", - c: "1F926-200D-2640", - k: [ - 38, - 23 ], - o: 4 + version: 5 + }, + cockroach: { + id: "cockroach", + name: "Cockroach", + keywords: [ + "insect", + "pests" + ], + skins: [ + { + unified: "1fab3", + native: "🪳" + } + ], + version: 13 }, spider: { - a: "Spider", - b: "1F577-FE0F", - c: "1F577", - j: [ + id: "spider", + name: "Spider", + keywords: [ "animal", "arachnid" ], - k: [ - 29, - 34 + skins: [ + { + unified: "1f577-fe0f", + native: "🕷️" + } ], - o: 2 - }, - space_invader: { - a: "Alien Monster", - b: "1F47E", - j: [ - "game", - "arcade", - "play" - ], - k: [ - 23, - 44 - ], - o: 2 - }, - motorway: { - a: "Motorway", - b: "1F6E3-FE0F", - c: "1F6E3", - j: [ - "road", - "cupertino", - "interstate", - "highway" - ], - k: [ - 36, - 45 - ], - o: 2 - }, - "flag-gr": { - a: "Greece Flag", - b: "1F1EC-1F1F7", - k: [ - 2, - 10 - ], - o: 2 - }, - recycle: { - a: "Black Universal Recycling Symbol", - b: "267B-FE0F", - c: "267B", - j: [ - "arrow", - "environment", - "garbage", - "trash" - ], - k: [ - 53, - 38 - ], - o: 2 - }, - coffee: { - a: "Hot Beverage", - b: "2615", - j: [ - "beverage", - "caffeine", - "latte", - "espresso" - ], - k: [ - 53, - 0 - ], - o: 2 - }, - flashlight: { - a: "Electric Torch", - b: "1F526", - j: [ - "dark", - "camping", - "sight", - "night" - ], - k: [ - 28, - 9 - ], - o: 2 + version: 1 }, spider_web: { - a: "Spider Web", - b: "1F578-FE0F", - c: "1F578", - j: [ + id: "spider_web", + name: "Spider Web", + keywords: [ "animal", "insect", "arachnid", "silk" ], - k: [ - 29, - 35 - ], - o: 2 - }, - izakaya_lantern: { - a: "Izakaya Lantern", - b: "1F3EE", - j: [ - "light", - "paper", - "halloween", - "spooky" - ], - k: [ - 11, - 8 - ], - n: [ - "lantern" - ], - o: 2 - }, - "flag-gs": { - a: "South Georgia & South Sandwich Islands Flag", - b: "1F1EC-1F1F8", - k: [ - 2, - 11 - ], - o: 2 - }, - shrug: { - skin_variations: { - "1F3FB": { - unified: "1F937-1F3FB", - non_qualified: null, - image: "1f937-1f3fb.png", - sheet_x: 39, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FC": { - unified: "1F937-1F3FC", - non_qualified: null, - image: "1f937-1f3fc.png", - sheet_x: 39, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FD": { - unified: "1F937-1F3FD", - non_qualified: null, - image: "1f937-1f3fd.png", - sheet_x: 39, - sheet_y: 50, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FE": { - unified: "1F937-1F3FE", - non_qualified: null, - image: "1f937-1f3fe.png", - sheet_x: 39, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false - }, - "1F3FF": { - unified: "1F937-1F3FF", - non_qualified: null, - image: "1f937-1f3ff.png", - sheet_x: 39, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: false + skins: [ + { + unified: "1f578-fe0f", + native: "🕸️" } - }, - a: "Shrug", - b: "1F937", - k: [ - 39, - 47 ], - o: 4 + version: 1 }, - fleur_de_lis: { - a: "Fleur De Lis", - b: "269C-FE0F", - c: "269C", - j: [ - "decorative", - "scout" + scorpion: { + id: "scorpion", + name: "Scorpion", + keywords: [ + "animal", + "arachnid" ], - k: [ - 53, - 49 + skins: [ + { + unified: "1f982", + native: "🦂" + } ], - o: 2 + version: 1 }, - robot_face: { - a: "Robot Face", - b: "1F916", - k: [ - 37, - 29 + mosquito: { + id: "mosquito", + name: "Mosquito", + keywords: [ + "animal", + "nature", + "insect", + "malaria" ], - o: 2 + skins: [ + { + unified: "1f99f", + native: "🦟" + } + ], + version: 11 }, - railway_track: { - a: "Railway Track", - b: "1F6E4-FE0F", - c: "1F6E4", - j: [ - "train", - "transportation" + fly: { + id: "fly", + name: "Fly", + keywords: [ + "insect" ], - k: [ - 36, - 46 + skins: [ + { + unified: "1fab0", + native: "🪰" + } ], - o: 2 + version: 13 + }, + worm: { + id: "worm", + name: "Worm", + keywords: [ + "animal" + ], + skins: [ + { + unified: "1fab1", + native: "🪱" + } + ], + version: 13 + }, + microbe: { + id: "microbe", + name: "Microbe", + keywords: [ + "amoeba", + "bacteria", + "germs", + "virus", + "covid" + ], + skins: [ + { + unified: "1f9a0", + native: "🦠" + } + ], + version: 11 + }, + bouquet: { + id: "bouquet", + name: "Bouquet", + keywords: [ + "flowers", + "nature", + "spring" + ], + skins: [ + { + unified: "1f490", + native: "💐" + } + ], + version: 1 + }, + cherry_blossom: { + id: "cherry_blossom", + name: "Cherry Blossom", + keywords: [ + "nature", + "plant", + "spring", + "flower" + ], + skins: [ + { + unified: "1f338", + native: "🌸" + } + ], + version: 1 + }, + white_flower: { + id: "white_flower", + name: "White Flower", + keywords: [ + "japanese", + "spring" + ], + skins: [ + { + unified: "1f4ae", + native: "💮" + } + ], + version: 1 + }, + lotus: { + id: "lotus", + name: "Lotus", + keywords: [ + "flower", + "calm", + "meditation" + ], + skins: [ + { + unified: "1fab7", + native: "🪷" + } + ], + version: 14 + }, + rosette: { + id: "rosette", + name: "Rosette", + keywords: [ + "flower", + "decoration", + "military" + ], + skins: [ + { + unified: "1f3f5-fe0f", + native: "🏵️" + } + ], + version: 1 + }, + rose: { + id: "rose", + name: "Rose", + keywords: [ + "flowers", + "valentines", + "love", + "spring" + ], + skins: [ + { + unified: "1f339", + native: "🌹" + } + ], + version: 1 + }, + wilted_flower: { + id: "wilted_flower", + name: "Wilted Flower", + keywords: [ + "plant", + "nature", + "rose" + ], + skins: [ + { + unified: "1f940", + native: "🥀" + } + ], + version: 3 + }, + hibiscus: { + id: "hibiscus", + name: "Hibiscus", + keywords: [ + "plant", + "vegetable", + "flowers", + "beach" + ], + skins: [ + { + unified: "1f33a", + native: "🌺" + } + ], + version: 1 + }, + sunflower: { + id: "sunflower", + name: "Sunflower", + keywords: [ + "nature", + "plant", + "fall" + ], + skins: [ + { + unified: "1f33b", + native: "🌻" + } + ], + version: 1 + }, + blossom: { + id: "blossom", + name: "Blossom", + keywords: [ + "nature", + "flowers", + "yellow" + ], + skins: [ + { + unified: "1f33c", + native: "🌼" + } + ], + version: 1 + }, + tulip: { + id: "tulip", + name: "Tulip", + keywords: [ + "flowers", + "plant", + "nature", + "summer", + "spring" + ], + skins: [ + { + unified: "1f337", + native: "🌷" + } + ], + version: 1 + }, + hyacinth: { + id: "hyacinth", + name: "Hyacinth", + keywords: [ + "flower", + "lavender" + ], + skins: [ + { + unified: "1fabb", + native: "🪻" + } + ], + version: 15 + }, + seedling: { + id: "seedling", + name: "Seedling", + keywords: [ + "plant", + "nature", + "grass", + "lawn", + "spring" + ], + skins: [ + { + unified: "1f331", + native: "🌱" + } + ], + version: 1 + }, + potted_plant: { + id: "potted_plant", + name: "Potted Plant", + keywords: [ + "greenery", + "house" + ], + skins: [ + { + unified: "1fab4", + native: "🪴" + } + ], + version: 13 + }, + evergreen_tree: { + id: "evergreen_tree", + name: "Evergreen Tree", + keywords: [ + "plant", + "nature" + ], + skins: [ + { + unified: "1f332", + native: "🌲" + } + ], + version: 1 + }, + deciduous_tree: { + id: "deciduous_tree", + name: "Deciduous Tree", + keywords: [ + "plant", + "nature" + ], + skins: [ + { + unified: "1f333", + native: "🌳" + } + ], + version: 1 + }, + palm_tree: { + id: "palm_tree", + name: "Palm Tree", + keywords: [ + "plant", + "vegetable", + "nature", + "summer", + "beach", + "mojito", + "tropical" + ], + skins: [ + { + unified: "1f334", + native: "🌴" + } + ], + version: 1 + }, + cactus: { + id: "cactus", + name: "Cactus", + keywords: [ + "vegetable", + "plant", + "nature" + ], + skins: [ + { + unified: "1f335", + native: "🌵" + } + ], + version: 1 + }, + ear_of_rice: { + id: "ear_of_rice", + name: "Ear of Rice", + keywords: [ + "sheaf", + "nature", + "plant" + ], + skins: [ + { + unified: "1f33e", + native: "🌾" + } + ], + version: 1 + }, + herb: { + id: "herb", + name: "Herb", + keywords: [ + "vegetable", + "plant", + "medicine", + "weed", + "grass", + "lawn" + ], + skins: [ + { + unified: "1f33f", + native: "🌿" + } + ], + version: 1 + }, + shamrock: { + id: "shamrock", + name: "Shamrock", + keywords: [ + "vegetable", + "plant", + "nature", + "irish", + "clover" + ], + skins: [ + { + unified: "2618-fe0f", + native: "☘️" + } + ], + version: 1 + }, + four_leaf_clover: { + id: "four_leaf_clover", + name: "Four Leaf Clover", + keywords: [ + "vegetable", + "plant", + "nature", + "lucky", + "irish" + ], + skins: [ + { + unified: "1f340", + native: "🍀" + } + ], + version: 1 + }, + maple_leaf: { + id: "maple_leaf", + name: "Maple Leaf", + keywords: [ + "nature", + "plant", + "vegetable", + "ca", + "fall" + ], + skins: [ + { + unified: "1f341", + native: "🍁" + } + ], + version: 1 + }, + fallen_leaf: { + id: "fallen_leaf", + name: "Fallen Leaf", + keywords: [ + "nature", + "plant", + "vegetable", + "leaves" + ], + skins: [ + { + unified: "1f342", + native: "🍂" + } + ], + version: 1 + }, + leaves: { + id: "leaves", + name: "Leaf Fluttering in Wind", + keywords: [ + "leaves", + "nature", + "plant", + "tree", + "vegetable", + "grass", + "lawn", + "spring" + ], + skins: [ + { + unified: "1f343", + native: "🍃" + } + ], + version: 1 + }, + empty_nest: { + id: "empty_nest", + name: "Empty Nest", + keywords: [ + "bird" + ], + skins: [ + { + unified: "1fab9", + native: "🪹" + } + ], + version: 14 + }, + nest_with_eggs: { + id: "nest_with_eggs", + name: "Nest with Eggs", + keywords: [ + "bird" + ], + skins: [ + { + unified: "1faba", + native: "🪺" + } + ], + version: 14 + }, + mushroom: { + id: "mushroom", + name: "Mushroom", + keywords: [ + "plant", + "vegetable" + ], + skins: [ + { + unified: "1f344", + native: "🍄" + } + ], + version: 1 + }, + grapes: { + id: "grapes", + name: "Grapes", + keywords: [ + "fruit", + "food", + "wine" + ], + skins: [ + { + unified: "1f347", + native: "🍇" + } + ], + version: 1 + }, + melon: { + id: "melon", + name: "Melon", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f348", + native: "🍈" + } + ], + version: 1 + }, + watermelon: { + id: "watermelon", + name: "Watermelon", + keywords: [ + "fruit", + "food", + "picnic", + "summer" + ], + skins: [ + { + unified: "1f349", + native: "🍉" + } + ], + version: 1 + }, + tangerine: { + id: "tangerine", + name: "Tangerine", + keywords: [ + "food", + "fruit", + "nature", + "orange" + ], + skins: [ + { + unified: "1f34a", + native: "🍊" + } + ], + version: 1 + }, + lemon: { + id: "lemon", + name: "Lemon", + keywords: [ + "fruit", + "nature" + ], + skins: [ + { + unified: "1f34b", + native: "🍋" + } + ], + version: 1 + }, + banana: { + id: "banana", + name: "Banana", + keywords: [ + "fruit", + "food", + "monkey" + ], + skins: [ + { + unified: "1f34c", + native: "🍌" + } + ], + version: 1 + }, + pineapple: { + id: "pineapple", + name: "Pineapple", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f34d", + native: "🍍" + } + ], + version: 1 + }, + mango: { + id: "mango", + name: "Mango", + keywords: [ + "fruit", + "food", + "tropical" + ], + skins: [ + { + unified: "1f96d", + native: "🥭" + } + ], + version: 11 + }, + apple: { + id: "apple", + name: "Red Apple", + keywords: [ + "fruit", + "mac", + "school" + ], + skins: [ + { + unified: "1f34e", + native: "🍎" + } + ], + version: 1 + }, + green_apple: { + id: "green_apple", + name: "Green Apple", + keywords: [ + "fruit", + "nature" + ], + skins: [ + { + unified: "1f34f", + native: "🍏" + } + ], + version: 1 + }, + pear: { + id: "pear", + name: "Pear", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f350", + native: "🍐" + } + ], + version: 1 + }, + peach: { + id: "peach", + name: "Peach", + keywords: [ + "fruit", + "nature", + "food" + ], + skins: [ + { + unified: "1f351", + native: "🍑" + } + ], + version: 1 + }, + cherries: { + id: "cherries", + name: "Cherries", + keywords: [ + "food", + "fruit" + ], + skins: [ + { + unified: "1f352", + native: "🍒" + } + ], + version: 1 + }, + strawberry: { + id: "strawberry", + name: "Strawberry", + keywords: [ + "fruit", + "food", + "nature" + ], + skins: [ + { + unified: "1f353", + native: "🍓" + } + ], + version: 1 + }, + blueberries: { + id: "blueberries", + name: "Blueberries", + keywords: [ + "fruit" + ], + skins: [ + { + unified: "1fad0", + native: "🫐" + } + ], + version: 13 + }, + kiwifruit: { + id: "kiwifruit", + name: "Kiwifruit", + keywords: [ + "kiwi", + "fruit", + "food" + ], + skins: [ + { + unified: "1f95d", + native: "🥝" + } + ], + version: 3 + }, + tomato: { + id: "tomato", + name: "Tomato", + keywords: [ + "fruit", + "vegetable", + "nature", + "food" + ], + skins: [ + { + unified: "1f345", + native: "🍅" + } + ], + version: 1 + }, + olive: { + id: "olive", + name: "Olive", + keywords: [ + "fruit" + ], + skins: [ + { + unified: "1fad2", + native: "🫒" + } + ], + version: 13 + }, + coconut: { + id: "coconut", + name: "Coconut", + keywords: [ + "fruit", + "nature", + "food", + "palm" + ], + skins: [ + { + unified: "1f965", + native: "🥥" + } + ], + version: 5 + }, + avocado: { + id: "avocado", + name: "Avocado", + keywords: [ + "fruit", + "food" + ], + skins: [ + { + unified: "1f951", + native: "🥑" + } + ], + version: 3 + }, + eggplant: { + id: "eggplant", + name: "Eggplant", + keywords: [ + "vegetable", + "nature", + "food", + "aubergine" + ], + skins: [ + { + unified: "1f346", + native: "🍆" + } + ], + version: 1 + }, + potato: { + id: "potato", + name: "Potato", + keywords: [ + "food", + "tuber", + "vegatable", + "starch" + ], + skins: [ + { + unified: "1f954", + native: "🥔" + } + ], + version: 3 + }, + carrot: { + id: "carrot", + name: "Carrot", + keywords: [ + "vegetable", + "food", + "orange" + ], + skins: [ + { + unified: "1f955", + native: "🥕" + } + ], + version: 3 + }, + corn: { + id: "corn", + name: "Ear of Corn", + keywords: [ + "food", + "vegetable", + "plant" + ], + skins: [ + { + unified: "1f33d", + native: "🌽" + } + ], + version: 1 + }, + hot_pepper: { + id: "hot_pepper", + name: "Hot Pepper", + keywords: [ + "food", + "spicy", + "chilli", + "chili" + ], + skins: [ + { + unified: "1f336-fe0f", + native: "🌶️" + } + ], + version: 1 + }, + bell_pepper: { + id: "bell_pepper", + name: "Bell Pepper", + keywords: [ + "fruit", + "plant" + ], + skins: [ + { + unified: "1fad1", + native: "🫑" + } + ], + version: 13 + }, + cucumber: { + id: "cucumber", + name: "Cucumber", + keywords: [ + "fruit", + "food", + "pickle" + ], + skins: [ + { + unified: "1f952", + native: "🥒" + } + ], + version: 3 + }, + leafy_green: { + id: "leafy_green", + name: "Leafy Green", + keywords: [ + "food", + "vegetable", + "plant", + "bok", + "choy", + "cabbage", + "kale", + "lettuce" + ], + skins: [ + { + unified: "1f96c", + native: "🥬" + } + ], + version: 11 + }, + broccoli: { + id: "broccoli", + name: "Broccoli", + keywords: [ + "fruit", + "food", + "vegetable" + ], + skins: [ + { + unified: "1f966", + native: "🥦" + } + ], + version: 5 + }, + garlic: { + id: "garlic", + name: "Garlic", + keywords: [ + "food", + "spice", + "cook" + ], + skins: [ + { + unified: "1f9c4", + native: "🧄" + } + ], + version: 12 + }, + onion: { + id: "onion", + name: "Onion", + keywords: [ + "cook", + "food", + "spice" + ], + skins: [ + { + unified: "1f9c5", + native: "🧅" + } + ], + version: 12 + }, + peanuts: { + id: "peanuts", + name: "Peanuts", + keywords: [ + "food", + "nut" + ], + skins: [ + { + unified: "1f95c", + native: "🥜" + } + ], + version: 3 + }, + beans: { + id: "beans", + name: "Beans", + keywords: [ + "food" + ], + skins: [ + { + unified: "1fad8", + native: "🫘" + } + ], + version: 14 + }, + chestnut: { + id: "chestnut", + name: "Chestnut", + keywords: [ + "food", + "squirrel" + ], + skins: [ + { + unified: "1f330", + native: "🌰" + } + ], + version: 1 + }, + ginger_root: { + id: "ginger_root", + name: "Ginger Root", + keywords: [ + "spice", + "yellow", + "cooking", + "gingerbread" + ], + skins: [ + { + unified: "1fada", + native: "🫚" + } + ], + version: 15 + }, + pea_pod: { + id: "pea_pod", + name: "Pea Pod", + keywords: [ + "cozy", + "green" + ], + skins: [ + { + unified: "1fadb", + native: "🫛" + } + ], + version: 15 + }, + bread: { + id: "bread", + name: "Bread", + keywords: [ + "food", + "wheat", + "breakfast", + "toast" + ], + skins: [ + { + unified: "1f35e", + native: "🍞" + } + ], + version: 1 + }, + croissant: { + id: "croissant", + name: "Croissant", + keywords: [ + "food", + "bread", + "french" + ], + skins: [ + { + unified: "1f950", + native: "🥐" + } + ], + version: 3 + }, + baguette_bread: { + id: "baguette_bread", + name: "Baguette Bread", + keywords: [ + "food", + "french", + "france", + "bakery" + ], + skins: [ + { + unified: "1f956", + native: "🥖" + } + ], + version: 3 + }, + flatbread: { + id: "flatbread", + name: "Flatbread", + keywords: [ + "flour", + "food", + "bakery" + ], + skins: [ + { + unified: "1fad3", + native: "🫓" + } + ], + version: 13 + }, + pretzel: { + id: "pretzel", + name: "Pretzel", + keywords: [ + "food", + "bread", + "twisted", + "germany", + "bakery" + ], + skins: [ + { + unified: "1f968", + native: "🥨" + } + ], + version: 5 + }, + bagel: { + id: "bagel", + name: "Bagel", + keywords: [ + "food", + "bread", + "bakery", + "schmear", + "jewish" + ], + skins: [ + { + unified: "1f96f", + native: "🥯" + } + ], + version: 11 + }, + pancakes: { + id: "pancakes", + name: "Pancakes", + keywords: [ + "food", + "breakfast", + "flapjacks", + "hotcakes", + "brunch" + ], + skins: [ + { + unified: "1f95e", + native: "🥞" + } + ], + version: 3 + }, + waffle: { + id: "waffle", + name: "Waffle", + keywords: [ + "food", + "breakfast", + "brunch" + ], + skins: [ + { + unified: "1f9c7", + native: "🧇" + } + ], + version: 12 + }, + cheese_wedge: { + id: "cheese_wedge", + name: "Cheese Wedge", + keywords: [ + "food", + "chadder", + "swiss" + ], + skins: [ + { + unified: "1f9c0", + native: "🧀" + } + ], + version: 1 + }, + meat_on_bone: { + id: "meat_on_bone", + name: "Meat on Bone", + keywords: [ + "good", + "food", + "drumstick" + ], + skins: [ + { + unified: "1f356", + native: "🍖" + } + ], + version: 1 + }, + poultry_leg: { + id: "poultry_leg", + name: "Poultry Leg", + keywords: [ + "food", + "meat", + "drumstick", + "bird", + "chicken", + "turkey" + ], + skins: [ + { + unified: "1f357", + native: "🍗" + } + ], + version: 1 + }, + cut_of_meat: { + id: "cut_of_meat", + name: "Cut of Meat", + keywords: [ + "food", + "cow", + "chop", + "lambchop", + "porkchop" + ], + skins: [ + { + unified: "1f969", + native: "🥩" + } + ], + version: 5 + }, + bacon: { + id: "bacon", + name: "Bacon", + keywords: [ + "food", + "breakfast", + "pork", + "pig", + "meat", + "brunch" + ], + skins: [ + { + unified: "1f953", + native: "🥓" + } + ], + version: 3 + }, + hamburger: { + id: "hamburger", + name: "Hamburger", + keywords: [ + "meat", + "fast", + "food", + "beef", + "cheeseburger", + "mcdonalds", + "burger", + "king" + ], + skins: [ + { + unified: "1f354", + native: "🍔" + } + ], + version: 1 + }, + fries: { + id: "fries", + name: "French Fries", + keywords: [ + "chips", + "snack", + "fast", + "food", + "potato" + ], + skins: [ + { + unified: "1f35f", + native: "🍟" + } + ], + version: 1 + }, + pizza: { + id: "pizza", + name: "Pizza", + keywords: [ + "food", + "party", + "italy" + ], + skins: [ + { + unified: "1f355", + native: "🍕" + } + ], + version: 1 + }, + hotdog: { + id: "hotdog", + name: "Hot Dog", + keywords: [ + "hotdog", + "food", + "frankfurter", + "america" + ], + skins: [ + { + unified: "1f32d", + native: "🌭" + } + ], + version: 1 + }, + sandwich: { + id: "sandwich", + name: "Sandwich", + keywords: [ + "food", + "lunch", + "bread", + "toast", + "bakery" + ], + skins: [ + { + unified: "1f96a", + native: "🥪" + } + ], + version: 5 + }, + taco: { + id: "taco", + name: "Taco", + keywords: [ + "food", + "mexican" + ], + skins: [ + { + unified: "1f32e", + native: "🌮" + } + ], + version: 1 + }, + burrito: { + id: "burrito", + name: "Burrito", + keywords: [ + "food", + "mexican" + ], + skins: [ + { + unified: "1f32f", + native: "🌯" + } + ], + version: 1 + }, + tamale: { + id: "tamale", + name: "Tamale", + keywords: [ + "food", + "masa" + ], + skins: [ + { + unified: "1fad4", + native: "🫔" + } + ], + version: 13 + }, + stuffed_flatbread: { + id: "stuffed_flatbread", + name: "Stuffed Flatbread", + keywords: [ + "food", + "gyro", + "mediterranean" + ], + skins: [ + { + unified: "1f959", + native: "🥙" + } + ], + version: 3 + }, + falafel: { + id: "falafel", + name: "Falafel", + keywords: [ + "food", + "mediterranean" + ], + skins: [ + { + unified: "1f9c6", + native: "🧆" + } + ], + version: 12 + }, + egg: { + id: "egg", + name: "Egg", + keywords: [ + "food", + "chicken", + "breakfast" + ], + skins: [ + { + unified: "1f95a", + native: "🥚" + } + ], + version: 3 + }, + fried_egg: { + id: "fried_egg", + name: "Cooking", + keywords: [ + "fried", + "egg", + "food", + "breakfast", + "kitchen", + "skillet" + ], + skins: [ + { + unified: "1f373", + native: "🍳" + } + ], + version: 1 + }, + shallow_pan_of_food: { + id: "shallow_pan_of_food", + name: "Shallow Pan of Food", + keywords: [ + "cooking", + "casserole", + "paella", + "skillet" + ], + skins: [ + { + unified: "1f958", + native: "🥘" + } + ], + version: 3 + }, + stew: { + id: "stew", + name: "Pot of Food", + keywords: [ + "stew", + "meat", + "soup", + "hot" + ], + skins: [ + { + unified: "1f372", + native: "🍲" + } + ], + version: 1 + }, + fondue: { + id: "fondue", + name: "Fondue", + keywords: [ + "cheese", + "pot", + "food" + ], + skins: [ + { + unified: "1fad5", + native: "🫕" + } + ], + version: 13 + }, + bowl_with_spoon: { + id: "bowl_with_spoon", + name: "Bowl with Spoon", + keywords: [ + "food", + "breakfast", + "cereal", + "oatmeal", + "porridge" + ], + skins: [ + { + unified: "1f963", + native: "🥣" + } + ], + version: 5 + }, + green_salad: { + id: "green_salad", + name: "Green Salad", + keywords: [ + "food", + "healthy", + "lettuce", + "vegetable" + ], + skins: [ + { + unified: "1f957", + native: "🥗" + } + ], + version: 3 + }, + popcorn: { + id: "popcorn", + name: "Popcorn", + keywords: [ + "food", + "movie", + "theater", + "films", + "snack", + "drama" + ], + skins: [ + { + unified: "1f37f", + native: "🍿" + } + ], + version: 1 + }, + butter: { + id: "butter", + name: "Butter", + keywords: [ + "food", + "cook" + ], + skins: [ + { + unified: "1f9c8", + native: "🧈" + } + ], + version: 12 + }, + salt: { + id: "salt", + name: "Salt", + keywords: [ + "condiment", + "shaker" + ], + skins: [ + { + unified: "1f9c2", + native: "🧂" + } + ], + version: 11 + }, + canned_food: { + id: "canned_food", + name: "Canned Food", + keywords: [ + "soup", + "tomatoes" + ], + skins: [ + { + unified: "1f96b", + native: "🥫" + } + ], + version: 5 + }, + bento: { + id: "bento", + name: "Bento Box", + keywords: [ + "food", + "japanese", + "lunch" + ], + skins: [ + { + unified: "1f371", + native: "🍱" + } + ], + version: 1 + }, + rice_cracker: { + id: "rice_cracker", + name: "Rice Cracker", + keywords: [ + "food", + "japanese", + "snack" + ], + skins: [ + { + unified: "1f358", + native: "🍘" + } + ], + version: 1 + }, + rice_ball: { + id: "rice_ball", + name: "Rice Ball", + keywords: [ + "food", + "japanese" + ], + skins: [ + { + unified: "1f359", + native: "🍙" + } + ], + version: 1 + }, + rice: { + id: "rice", + name: "Cooked Rice", + keywords: [ + "food", + "asian" + ], + skins: [ + { + unified: "1f35a", + native: "🍚" + } + ], + version: 1 + }, + curry: { + id: "curry", + name: "Curry Rice", + keywords: [ + "food", + "spicy", + "hot", + "indian" + ], + skins: [ + { + unified: "1f35b", + native: "🍛" + } + ], + version: 1 + }, + ramen: { + id: "ramen", + name: "Steaming Bowl", + keywords: [ + "ramen", + "food", + "japanese", + "noodle", + "chopsticks" + ], + skins: [ + { + unified: "1f35c", + native: "🍜" + } + ], + version: 1 + }, + spaghetti: { + id: "spaghetti", + name: "Spaghetti", + keywords: [ + "food", + "italian", + "pasta", + "noodle" + ], + skins: [ + { + unified: "1f35d", + native: "🍝" + } + ], + version: 1 + }, + sweet_potato: { + id: "sweet_potato", + name: "Roasted Sweet Potato", + keywords: [ + "food", + "nature", + "plant" + ], + skins: [ + { + unified: "1f360", + native: "🍠" + } + ], + version: 1 + }, + oden: { + id: "oden", + name: "Oden", + keywords: [ + "food", + "japanese" + ], + skins: [ + { + unified: "1f362", + native: "🍢" + } + ], + version: 1 + }, + sushi: { + id: "sushi", + name: "Sushi", + keywords: [ + "food", + "fish", + "japanese", + "rice" + ], + skins: [ + { + unified: "1f363", + native: "🍣" + } + ], + version: 1 + }, + fried_shrimp: { + id: "fried_shrimp", + name: "Fried Shrimp", + keywords: [ + "food", + "animal", + "appetizer", + "summer" + ], + skins: [ + { + unified: "1f364", + native: "🍤" + } + ], + version: 1 + }, + fish_cake: { + id: "fish_cake", + name: "Fish Cake with Swirl", + keywords: [ + "food", + "japan", + "sea", + "beach", + "narutomaki", + "pink", + "kamaboko", + "surimi", + "ramen" + ], + skins: [ + { + unified: "1f365", + native: "🍥" + } + ], + version: 1 + }, + moon_cake: { + id: "moon_cake", + name: "Moon Cake", + keywords: [ + "food", + "autumn", + "dessert" + ], + skins: [ + { + unified: "1f96e", + native: "🥮" + } + ], + version: 11 + }, + dango: { + id: "dango", + name: "Dango", + keywords: [ + "food", + "dessert", + "sweet", + "japanese", + "barbecue", + "meat" + ], + skins: [ + { + unified: "1f361", + native: "🍡" + } + ], + version: 1 + }, + dumpling: { + id: "dumpling", + name: "Dumpling", + keywords: [ + "food", + "empanada", + "pierogi", + "potsticker", + "gyoza" + ], + skins: [ + { + unified: "1f95f", + native: "🥟" + } + ], + version: 5 + }, + fortune_cookie: { + id: "fortune_cookie", + name: "Fortune Cookie", + keywords: [ + "food", + "prophecy", + "dessert" + ], + skins: [ + { + unified: "1f960", + native: "🥠" + } + ], + version: 5 + }, + takeout_box: { + id: "takeout_box", + name: "Takeout Box", + keywords: [ + "food", + "leftovers" + ], + skins: [ + { + unified: "1f961", + native: "🥡" + } + ], + version: 5 + }, + crab: { + id: "crab", + name: "Crab", + keywords: [ + "animal", + "crustacean" + ], + skins: [ + { + unified: "1f980", + native: "🦀" + } + ], + version: 1 + }, + lobster: { + id: "lobster", + name: "Lobster", + keywords: [ + "animal", + "nature", + "bisque", + "claws", + "seafood" + ], + skins: [ + { + unified: "1f99e", + native: "🦞" + } + ], + version: 11 + }, + shrimp: { + id: "shrimp", + name: "Shrimp", + keywords: [ + "animal", + "ocean", + "nature", + "seafood" + ], + skins: [ + { + unified: "1f990", + native: "🦐" + } + ], + version: 3 + }, + squid: { + id: "squid", + name: "Squid", + keywords: [ + "animal", + "nature", + "ocean", + "sea" + ], + skins: [ + { + unified: "1f991", + native: "🦑" + } + ], + version: 3 + }, + oyster: { + id: "oyster", + name: "Oyster", + keywords: [ + "food" + ], + skins: [ + { + unified: "1f9aa", + native: "🦪" + } + ], + version: 12 + }, + icecream: { + id: "icecream", + name: "Soft Ice Cream", + keywords: [ + "icecream", + "food", + "hot", + "dessert", + "summer" + ], + skins: [ + { + unified: "1f366", + native: "🍦" + } + ], + version: 1 + }, + shaved_ice: { + id: "shaved_ice", + name: "Shaved Ice", + keywords: [ + "hot", + "dessert", + "summer" + ], + skins: [ + { + unified: "1f367", + native: "🍧" + } + ], + version: 1 + }, + ice_cream: { + id: "ice_cream", + name: "Ice Cream", + keywords: [ + "food", + "hot", + "dessert" + ], + skins: [ + { + unified: "1f368", + native: "🍨" + } + ], + version: 1 + }, + doughnut: { + id: "doughnut", + name: "Doughnut", + keywords: [ + "food", + "dessert", + "snack", + "sweet", + "donut" + ], + skins: [ + { + unified: "1f369", + native: "🍩" + } + ], + version: 1 + }, + cookie: { + id: "cookie", + name: "Cookie", + keywords: [ + "food", + "snack", + "oreo", + "chocolate", + "sweet", + "dessert" + ], + skins: [ + { + unified: "1f36a", + native: "🍪" + } + ], + version: 1 + }, + birthday: { + id: "birthday", + name: "Birthday Cake", + keywords: [ + "food", + "dessert" + ], + skins: [ + { + unified: "1f382", + native: "🎂" + } + ], + version: 1 + }, + cake: { + id: "cake", + name: "Shortcake", + keywords: [ + "cake", + "food", + "dessert" + ], + skins: [ + { + unified: "1f370", + native: "🍰" + } + ], + version: 1 + }, + cupcake: { + id: "cupcake", + name: "Cupcake", + keywords: [ + "food", + "dessert", + "bakery", + "sweet" + ], + skins: [ + { + unified: "1f9c1", + native: "🧁" + } + ], + version: 11 + }, + pie: { + id: "pie", + name: "Pie", + keywords: [ + "food", + "dessert", + "pastry" + ], + skins: [ + { + unified: "1f967", + native: "🥧" + } + ], + version: 5 + }, + chocolate_bar: { + id: "chocolate_bar", + name: "Chocolate Bar", + keywords: [ + "food", + "snack", + "dessert", + "sweet" + ], + skins: [ + { + unified: "1f36b", + native: "🍫" + } + ], + version: 1 + }, + candy: { + id: "candy", + name: "Candy", + keywords: [ + "snack", + "dessert", + "sweet", + "lolly" + ], + skins: [ + { + unified: "1f36c", + native: "🍬" + } + ], + version: 1 + }, + lollipop: { + id: "lollipop", + name: "Lollipop", + keywords: [ + "food", + "snack", + "candy", + "sweet" + ], + skins: [ + { + unified: "1f36d", + native: "🍭" + } + ], + version: 1 + }, + custard: { + id: "custard", + name: "Custard", + keywords: [ + "dessert", + "food" + ], + skins: [ + { + unified: "1f36e", + native: "🍮" + } + ], + version: 1 + }, + honey_pot: { + id: "honey_pot", + name: "Honey Pot", + keywords: [ + "bees", + "sweet", + "kitchen" + ], + skins: [ + { + unified: "1f36f", + native: "🍯" + } + ], + version: 1 + }, + baby_bottle: { + id: "baby_bottle", + name: "Baby Bottle", + keywords: [ + "food", + "container", + "milk" + ], + skins: [ + { + unified: "1f37c", + native: "🍼" + } + ], + version: 1 + }, + glass_of_milk: { + id: "glass_of_milk", + name: "Glass of Milk", + keywords: [ + "beverage", + "drink", + "cow" + ], + skins: [ + { + unified: "1f95b", + native: "🥛" + } + ], + version: 3 + }, + coffee: { + id: "coffee", + name: "Hot Beverage", + keywords: [ + "coffee", + "caffeine", + "latte", + "espresso", + "mug" + ], + skins: [ + { + unified: "2615", + native: "☕" + } + ], + version: 1 + }, + teapot: { + id: "teapot", + name: "Teapot", + keywords: [ + "drink", + "hot" + ], + skins: [ + { + unified: "1fad6", + native: "🫖" + } + ], + version: 13 }, tea: { - a: "Teacup Without Handle", - b: "1F375", - j: [ + id: "tea", + name: "Teacup Without Handle", + keywords: [ + "tea", "drink", "bowl", "breakfast", "green", "british" ], - k: [ - 7, - 20 + skins: [ + { + unified: "1f375", + native: "🍵" + } ], - o: 2 - }, - "flag-gt": { - a: "Guatemala Flag", - b: "1F1EC-1F1F9", - k: [ - 2, - 12 - ], - o: 2 - }, - oil_drum: { - a: "Oil Drum", - b: "1F6E2-FE0F", - c: "1F6E2", - j: [ - "barrell" - ], - k: [ - 36, - 44 - ], - o: 2 - }, - diya_lamp: { - a: "Diya Lamp", - b: "1FA94", - k: [ - 52, - 8 - ], - o: 12 + version: 1 }, sake: { - a: "Sake Bottle and Cup", - b: "1F376", - j: [ + id: "sake", + name: "Sake", + keywords: [ "wine", "drink", "drunk", @@ -83041,518 +77497,53 @@ var emojis = { "alcohol", "booze" ], - k: [ - 7, - 21 - ], - o: 2 - }, - trident: { - a: "Trident Emblem", - b: "1F531", - j: [ - "weapon", - "spear" - ], - k: [ - 28, - 20 - ], - o: 2 - }, - "man-shrugging": { - skin_variations: { - "1F3FB": { - unified: "1F937-1F3FB-200D-2642-FE0F", - non_qualified: "1F937-1F3FB-200D-2642", - image: "1f937-1f3fb-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F937-1F3FC-200D-2642-FE0F", - non_qualified: "1F937-1F3FC-200D-2642", - image: "1f937-1f3fc-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 43, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F937-1F3FD-200D-2642-FE0F", - non_qualified: "1F937-1F3FD-200D-2642", - image: "1f937-1f3fd-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 44, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F937-1F3FE-200D-2642-FE0F", - non_qualified: "1F937-1F3FE-200D-2642", - image: "1f937-1f3fe-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F937-1F3FF-200D-2642-FE0F", - non_qualified: "1F937-1F3FF-200D-2642", - image: "1f937-1f3ff-200d-2642-fe0f.png", - sheet_x: 39, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f376", + native: "🍶" } - }, - a: "Man Shrugging", - b: "1F937-200D-2642-FE0F", - c: "1F937-200D-2642", - k: [ - 39, - 41 ], - o: 4 - }, - smiley_cat: { - a: "Smiling Cat Face with Open Mouth", - b: "1F63A", - j: [ - "animal", - "cats", - "happy", - "smile" - ], - k: [ - 31, - 36 - ], - o: 2 - }, - scorpion: { - a: "Scorpion", - b: "1F982", - j: [ - "animal", - "arachnid" - ], - k: [ - 42, - 20 - ], - o: 2 - }, - "woman-shrugging": { - skin_variations: { - "1F3FB": { - unified: "1F937-1F3FB-200D-2640-FE0F", - non_qualified: "1F937-1F3FB-200D-2640", - image: "1f937-1f3fb-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F937-1F3FC-200D-2640-FE0F", - non_qualified: "1F937-1F3FC-200D-2640", - image: "1f937-1f3fc-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F937-1F3FD-200D-2640-FE0F", - non_qualified: "1F937-1F3FD-200D-2640", - image: "1f937-1f3fd-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F937-1F3FE-200D-2640-FE0F", - non_qualified: "1F937-1F3FE-200D-2640", - image: "1f937-1f3fe-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F937-1F3FF-200D-2640-FE0F", - non_qualified: "1F937-1F3FF-200D-2640", - image: "1f937-1f3ff-200d-2640-fe0f.png", - sheet_x: 39, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Woman Shrugging", - b: "1F937-200D-2640-FE0F", - c: "1F937-200D-2640", - k: [ - 39, - 35 - ], - o: 4 - }, - notebook_with_decorative_cover: { - a: "Notebook with Decorative Cover", - b: "1F4D4", - j: [ - "classroom", - "notes", - "record", - "paper", - "study" - ], - k: [ - 26, - 42 - ], - o: 2 - }, - fuelpump: { - a: "Fuel Pump", - b: "26FD", - j: [ - "gas station", - "petroleum" - ], - k: [ - 54, - 38 - ], - o: 2 - }, - name_badge: { - a: "Name Badge", - b: "1F4DB", - j: [ - "fire", - "forbid" - ], - k: [ - 26, - 49 - ], - o: 2 - }, - mosquito: { - a: "Mosquito", - b: "1F99F", - k: [ - 42, - 49 - ], - o: 11 - }, - "flag-gu": { - a: "Guam Flag", - b: "1F1EC-1F1FA", - k: [ - 2, - 13 - ], - o: 2 - }, - smile_cat: { - a: "Grinning Cat Face with Smiling Eyes", - b: "1F638", - j: [ - "animal", - "cats", - "smile" - ], - k: [ - 31, - 34 - ], - o: 2 + version: 1 }, champagne: { - a: "Bottle with Popping Cork", - b: "1F37E", - j: [ + id: "champagne", + name: "Bottle with Popping Cork", + keywords: [ + "champagne", "drink", "wine", - "bottle", "celebration" ], - k: [ - 7, - 29 + skins: [ + { + unified: "1f37e", + native: "🍾" + } ], - o: 2 - }, - joy_cat: { - a: "Cat Face with Tears of Joy", - b: "1F639", - j: [ - "animal", - "cats", - "haha", - "happy", - "tears" - ], - k: [ - 31, - 35 - ], - o: 2 - }, - closed_book: { - a: "Closed Book", - b: "1F4D5", - j: [ - "read", - "library", - "knowledge", - "textbook", - "learn" - ], - k: [ - 26, - 43 - ], - o: 2 - }, - rotating_light: { - a: "Police Cars Revolving Light", - b: "1F6A8", - j: [ - "police", - "ambulance", - "911", - "emergency", - "alert", - "error", - "pinged", - "law", - "legal" - ], - k: [ - 34, - 56 - ], - o: 2 - }, - microbe: { - a: "Microbe", - b: "1F9A0", - k: [ - 42, - 50 - ], - o: 11 - }, - "flag-gw": { - a: "Guinea-Bissau Flag", - b: "1F1EC-1F1FC", - k: [ - 2, - 14 - ], - o: 2 + version: 1 }, wine_glass: { - a: "Wine Glass", - b: "1F377", - j: [ + id: "wine_glass", + name: "Wine Glass", + keywords: [ "drink", "beverage", "drunk", "alcohol", "booze" ], - k: [ - 7, - 22 - ], - o: 2 - }, - beginner: { - a: "Japanese Symbol for Beginner", - b: "1F530", - j: [ - "badge", - "shield" - ], - k: [ - 28, - 19 - ], - o: 2 - }, - bouquet: { - a: "Bouquet", - b: "1F490", - j: [ - "flowers", - "nature", - "spring" - ], - k: [ - 25, - 26 - ], - o: 2 - }, - heart_eyes_cat: { - a: "Smiling Cat Face with Heart-Shaped Eyes", - b: "1F63B", - j: [ - "animal", - "love", - "like", - "affection", - "cats", - "valentines", - "heart" - ], - k: [ - 31, - 37 - ], - o: 2 - }, - "male-doctor": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-2695-FE0F", - non_qualified: "1F468-1F3FB-200D-2695", - image: "1f468-1f3fb-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 3, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-2695-FE0F", - non_qualified: "1F468-1F3FC-200D-2695", - image: "1f468-1f3fc-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 4, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-2695-FE0F", - non_qualified: "1F468-1F3FD-200D-2695", - image: "1f468-1f3fd-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 5, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-2695-FE0F", - non_qualified: "1F468-1F3FE-200D-2695", - image: "1f468-1f3fe-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 6, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-2695-FE0F", - non_qualified: "1F468-1F3FF-200D-2695", - image: "1f468-1f3ff-200d-2695-fe0f.png", - sheet_x: 17, - sheet_y: 7, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f377", + native: "🍷" } - }, - a: "Male Doctor", - b: "1F468-200D-2695-FE0F", - c: "1F468-200D-2695", - k: [ - 17, - 2 ], - o: 4 - }, - book: { - a: "Open Book", - b: "1F4D6", - k: [ - 26, - 44 - ], - n: [ - "open_book" - ], - o: 2 - }, - traffic_light: { - a: "Horizontal Traffic Light", - b: "1F6A5", - j: [ - "transportation", - "signal" - ], - k: [ - 34, - 53 - ], - o: 2 + version: 1 }, cocktail: { - a: "Cocktail Glass", - b: "1F378", - j: [ + id: "cocktail", + name: "Cocktail Glass", + keywords: [ "drink", "drunk", "alcohol", @@ -83560,194 +77551,18 @@ var emojis = { "booze", "mojito" ], - k: [ - 7, - 23 - ], - o: 2 - }, - o: { - a: "Heavy Large Circle", - b: "2B55", - j: [ - "circle", - "round" - ], - k: [ - 55, - 43 - ], - o: 2 - }, - "flag-gy": { - a: "Guyana Flag", - b: "1F1EC-1F1FE", - k: [ - 2, - 15 - ], - o: 2 - }, - "female-doctor": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-2695-FE0F", - non_qualified: "1F469-1F3FB-200D-2695", - image: "1f469-1f3fb-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-2695-FE0F", - non_qualified: "1F469-1F3FC-200D-2695", - image: "1f469-1f3fc-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-2695-FE0F", - non_qualified: "1F469-1F3FD-200D-2695", - image: "1f469-1f3fd-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 47, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-2695-FE0F", - non_qualified: "1F469-1F3FE-200D-2695", - image: "1f469-1f3fe-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-2695-FE0F", - non_qualified: "1F469-1F3FF-200D-2695", - image: "1f469-1f3ff-200d-2695-fe0f.png", - sheet_x: 19, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f378", + native: "🍸" } - }, - a: "Female Doctor", - b: "1F469-200D-2695-FE0F", - c: "1F469-200D-2695", - k: [ - 19, - 44 ], - o: 4 - }, - smirk_cat: { - a: "Cat Face with Wry Smile", - b: "1F63C", - j: [ - "animal", - "cats", - "smirk" - ], - k: [ - 31, - 38 - ], - o: 2 - }, - green_book: { - a: "Green Book", - b: "1F4D7", - j: [ - "read", - "library", - "knowledge", - "study" - ], - k: [ - 26, - 45 - ], - o: 2 - }, - cherry_blossom: { - a: "Cherry Blossom", - b: "1F338", - j: [ - "nature", - "plant", - "spring", - "flower" - ], - k: [ - 6, - 16 - ], - o: 2 - }, - "flag-hk": { - a: "Hong Kong Sar China Flag", - b: "1F1ED-1F1F0", - k: [ - 2, - 16 - ], - o: 2 - }, - vertical_traffic_light: { - a: "Vertical Traffic Light", - b: "1F6A6", - j: [ - "transportation", - "driving" - ], - k: [ - 34, - 54 - ], - o: 2 - }, - white_check_mark: { - a: "White Heavy Check Mark", - b: "2705", - j: [ - "green-square", - "ok", - "agree", - "vote", - "election", - "answer", - "tick" - ], - k: [ - 54, - 40 - ], - o: 2 + version: 1 }, tropical_drink: { - a: "Tropical Drink", - b: "1F379", - j: [ + id: "tropical_drink", + name: "Tropical Drink", + keywords: [ "beverage", "cocktail", "summer", @@ -83756,97 +77571,18 @@ var emojis = { "booze", "mojito" ], - k: [ - 7, - 24 + skins: [ + { + unified: "1f379", + native: "🍹" + } ], - o: 2 - }, - kissing_cat: { - a: "Kissing Cat Face with Closed Eyes", - b: "1F63D", - j: [ - "animal", - "cats", - "kiss" - ], - k: [ - 31, - 39 - ], - o: 2 - }, - "flag-hm": { - a: "Heard & Mcdonald Islands Flag", - b: "1F1ED-1F1F2", - k: [ - 2, - 17 - ], - o: 2 - }, - octagonal_sign: { - a: "Octagonal Sign", - b: "1F6D1", - k: [ - 36, - 39 - ], - o: 4 - }, - white_flower: { - a: "White Flower", - b: "1F4AE", - j: [ - "japanese", - "spring" - ], - k: [ - 26, - 4 - ], - o: 2 - }, - ballot_box_with_check: { - a: "Ballot Box with Check", - b: "2611-FE0F", - c: "2611", - j: [ - "ok", - "agree", - "confirm", - "black-square", - "vote", - "election", - "yes", - "tick" - ], - k: [ - 52, - 55 - ], - o: 2 - }, - blue_book: { - a: "Blue Book", - b: "1F4D8", - j: [ - "read", - "library", - "knowledge", - "learn", - "study" - ], - k: [ - 26, - 46 - ], - o: 2 + version: 1 }, beer: { - a: "Beer Mug", - b: "1F37A", - j: [ + id: "beer", + name: "Beer Mug", + keywords: [ "relax", "beverage", "drink", @@ -83857,95 +77593,19 @@ var emojis = { "alcohol", "booze" ], - k: [ - 7, - 25 + skins: [ + { + unified: "1f37a", + native: "🍺" + } ], - o: 2 - }, - construction: { - a: "Construction Sign", - b: "1F6A7", - j: [ - "wip", - "progress", - "caution", - "warning" - ], - k: [ - 34, - 55 - ], - o: 2 - }, - rosette: { - a: "Rosette", - b: "1F3F5-FE0F", - c: "1F3F5", - j: [ - "flower", - "decoration", - "military" - ], - k: [ - 11, - 18 - ], - o: 2 - }, - heavy_check_mark: { - a: "Heavy Check Mark", - b: "2714-FE0F", - c: "2714", - j: [ - "ok", - "nike", - "answer", - "yes", - "tick" - ], - k: [ - 55, - 12 - ], - o: 2 - }, - scream_cat: { - a: "Weary Cat Face", - b: "1F640", - j: [ - "animal", - "cats", - "munch", - "scared", - "scream" - ], - k: [ - 31, - 42 - ], - o: 2 - }, - orange_book: { - a: "Orange Book", - b: "1F4D9", - j: [ - "read", - "library", - "knowledge", - "textbook", - "study" - ], - k: [ - 26, - 47 - ], - o: 2 + version: 1 }, beers: { - a: "Clinking Beer Mugs", - b: "1F37B", - j: [ + id: "beers", + name: "Clinking Beer Mugs", + keywords: [ + "beers", "relax", "beverage", "drink", @@ -83956,332 +77616,40 @@ var emojis = { "alcohol", "booze" ], - k: [ - 7, - 26 - ], - o: 2 - }, - "male-student": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F393", - non_qualified: null, - image: "1f468-1f3fb-200d-1f393.png", - sheet_x: 14, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F393", - non_qualified: null, - image: "1f468-1f3fc-200d-1f393.png", - sheet_x: 14, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F393", - non_qualified: null, - image: "1f468-1f3fd-200d-1f393.png", - sheet_x: 14, - sheet_y: 53, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F393", - non_qualified: null, - image: "1f468-1f3fe-200d-1f393.png", - sheet_x: 14, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F393", - non_qualified: null, - image: "1f468-1f3ff-200d-1f393.png", - sheet_x: 14, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f37b", + native: "🍻" } - }, - a: "Male Student", - b: "1F468-200D-1F393", - k: [ - 14, - 50 ], - o: 4 - }, - "flag-hn": { - a: "Honduras Flag", - b: "1F1ED-1F1F3", - k: [ - 2, - 18 - ], - o: 2 - }, - crying_cat_face: { - a: "Crying Cat Face", - b: "1F63F", - j: [ - "animal", - "tears", - "weep", - "sad", - "cats", - "upset", - "cry" - ], - k: [ - 31, - 41 - ], - o: 2 - }, - anchor: { - a: "Anchor", - b: "2693", - j: [ - "ship", - "ferry", - "sea", - "boat" - ], - k: [ - 53, - 42 - ], - o: 2 - }, - "flag-hr": { - a: "Croatia Flag", - b: "1F1ED-1F1F7", - k: [ - 2, - 19 - ], - o: 2 - }, - heavy_multiplication_x: { - a: "Heavy Multiplication X", - b: "2716-FE0F", - c: "2716", - j: [ - "math", - "calculation" - ], - k: [ - 55, - 13 - ], - o: 2 - }, - "female-student": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F393", - non_qualified: null, - image: "1f469-1f3fb-200d-1f393.png", - sheet_x: 17, - sheet_y: 41, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F393", - non_qualified: null, - image: "1f469-1f3fc-200d-1f393.png", - sheet_x: 17, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F393", - non_qualified: null, - image: "1f469-1f3fd-200d-1f393.png", - sheet_x: 17, - sheet_y: 43, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F393", - non_qualified: null, - image: "1f469-1f3fe-200d-1f393.png", - sheet_x: 17, - sheet_y: 44, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F393", - non_qualified: null, - image: "1f469-1f3ff-200d-1f393.png", - sheet_x: 17, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - } - }, - a: "Female Student", - b: "1F469-200D-1F393", - k: [ - 17, - 40 - ], - o: 4 - }, - rose: { - a: "Rose", - b: "1F339", - j: [ - "flowers", - "valentines", - "love", - "spring" - ], - k: [ - 6, - 17 - ], - o: 2 - }, - books: { - a: "Books", - b: "1F4DA", - j: [ - "literature", - "library", - "study" - ], - k: [ - 26, - 48 - ], - o: 2 + version: 1 }, clinking_glasses: { - a: "Clinking Glasses", - b: "1F942", - j: [ + id: "clinking_glasses", + name: "Clinking Glasses", + keywords: [ "beverage", "drink", "party", "alcohol", "celebrate", - "cheers" + "cheers", + "wine", + "champagne", + "toast" ], - k: [ - 41, - 18 + skins: [ + { + unified: "1f942", + native: "🥂" + } ], - o: 4 - }, - x: { - a: "Cross Mark", - b: "274C", - j: [ - "no", - "delete", - "remove", - "cancel" - ], - k: [ - 55, - 21 - ], - o: 2 - }, - pouting_cat: { - a: "Pouting Cat Face", - b: "1F63E", - j: [ - "animal", - "cats" - ], - k: [ - 31, - 40 - ], - o: 2 - }, - wilted_flower: { - a: "Wilted Flower", - b: "1F940", - j: [ - "plant", - "nature", - "flower" - ], - k: [ - 41, - 16 - ], - o: 4 - }, - boat: { - a: "Sailboat", - b: "26F5", - k: [ - 54, - 16 - ], - n: [ - "sailboat" - ], - o: 2 - }, - "flag-ht": { - a: "Haiti Flag", - b: "1F1ED-1F1F9", - k: [ - 2, - 20 - ], - o: 2 + version: 3 }, tumbler_glass: { - a: "Tumbler Glass", - b: "1F943", - j: [ + id: "tumbler_glass", + name: "Tumbler Glass", + keywords: [ "drink", "beverage", "drunk", @@ -84291,1632 +77659,2353 @@ var emojis = { "bourbon", "scotch", "whisky", - "glass", "shot" ], - k: [ - 41, - 19 - ], - o: 4 - }, - notebook: { - a: "Notebook", - b: "1F4D3", - j: [ - "stationery", - "record", - "notes", - "paper", - "study" - ], - k: [ - 26, - 41 - ], - o: 2 - }, - "male-teacher": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fb-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 12, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fc-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 13, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fd-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 14, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3fe-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 15, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F3EB", - non_qualified: null, - image: "1f468-1f3ff-200d-1f3eb.png", - sheet_x: 15, - sheet_y: 16, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f943", + native: "🥃" } - }, - a: "Male Teacher", - b: "1F468-200D-1F3EB", - k: [ - 15, - 11 ], - o: 4 + version: 3 }, - ledger: { - a: "Ledger", - b: "1F4D2", - j: [ - "notes", - "paper" + pouring_liquid: { + id: "pouring_liquid", + name: "Pouring Liquid", + keywords: [ + "cup", + "water" ], - k: [ - 26, - 40 + skins: [ + { + unified: "1fad7", + native: "🫗" + } ], - o: 2 - }, - "flag-hu": { - a: "Hungary Flag", - b: "1F1ED-1F1FA", - k: [ - 2, - 21 - ], - o: 2 + version: 14 }, cup_with_straw: { - a: "Cup with Straw", - b: "1F964", - k: [ - 41, - 51 + id: "cup_with_straw", + name: "Cup with Straw", + keywords: [ + "drink", + "soda" ], - o: 5 + skins: [ + { + unified: "1f964", + native: "🥤" + } + ], + version: 5 }, - hibiscus: { - a: "Hibiscus", - b: "1F33A", - j: [ - "plant", - "vegetable", - "flowers", - "beach" + bubble_tea: { + id: "bubble_tea", + name: "Bubble Tea", + keywords: [ + "taiwan", + "boba", + "milk", + "straw" ], - k: [ - 6, - 18 + skins: [ + { + unified: "1f9cb", + native: "🧋" + } ], - o: 2 + version: 13 }, - see_no_evil: { - a: "See-No-Evil Monkey", - b: "1F648", - j: [ - "monkey", - "animal", + beverage_box: { + id: "beverage_box", + name: "Beverage Box", + keywords: [ + "drink" + ], + skins: [ + { + unified: "1f9c3", + native: "🧃" + } + ], + version: 12 + }, + mate_drink: { + id: "mate_drink", + name: "Mate", + keywords: [ + "drink", + "tea", + "beverage" + ], + skins: [ + { + unified: "1f9c9", + native: "🧉" + } + ], + version: 12 + }, + ice_cube: { + id: "ice_cube", + name: "Ice", + keywords: [ + "cube", + "water", + "cold" + ], + skins: [ + { + unified: "1f9ca", + native: "🧊" + } + ], + version: 12 + }, + chopsticks: { + id: "chopsticks", + name: "Chopsticks", + keywords: [ + "food" + ], + skins: [ + { + unified: "1f962", + native: "🥢" + } + ], + version: 5 + }, + knife_fork_plate: { + id: "knife_fork_plate", + name: "Fork and Knife with Plate", + keywords: [ + "food", + "eat", + "meal", + "lunch", + "dinner", + "restaurant" + ], + skins: [ + { + unified: "1f37d-fe0f", + native: "🍽️" + } + ], + version: 1 + }, + fork_and_knife: { + id: "fork_and_knife", + name: "Fork and Knife", + keywords: [ + "cutlery", + "kitchen" + ], + skins: [ + { + unified: "1f374", + native: "🍴" + } + ], + version: 1 + }, + spoon: { + id: "spoon", + name: "Spoon", + keywords: [ + "cutlery", + "kitchen", + "tableware" + ], + skins: [ + { + unified: "1f944", + native: "🥄" + } + ], + version: 3 + }, + hocho: { + id: "hocho", + name: "Hocho", + keywords: [ + "knife", + "kitchen", + "blade", + "cutlery", + "weapon" + ], + skins: [ + { + unified: "1f52a", + native: "🔪" + } + ], + version: 1 + }, + jar: { + id: "jar", + name: "Jar", + keywords: [ + "container", + "sauce" + ], + skins: [ + { + unified: "1fad9", + native: "🫙" + } + ], + version: 14 + }, + amphora: { + id: "amphora", + name: "Amphora", + keywords: [ + "vase", + "jar" + ], + skins: [ + { + unified: "1f3fa", + native: "🏺" + } + ], + version: 1 + }, + earth_africa: { + id: "earth_africa", + name: "Earth Globe Europe-Africa", + keywords: [ + "africa", + "showing", + "europe", + "world", + "international" + ], + skins: [ + { + unified: "1f30d", + native: "🌍" + } + ], + version: 1 + }, + earth_americas: { + id: "earth_americas", + name: "Earth Globe Americas", + keywords: [ + "showing", + "world", + "USA", + "international" + ], + skins: [ + { + unified: "1f30e", + native: "🌎" + } + ], + version: 1 + }, + earth_asia: { + id: "earth_asia", + name: "Earth Globe Asia-Australia", + keywords: [ + "asia", + "showing", + "australia", + "world", + "east", + "international" + ], + skins: [ + { + unified: "1f30f", + native: "🌏" + } + ], + version: 1 + }, + globe_with_meridians: { + id: "globe_with_meridians", + name: "Globe with Meridians", + keywords: [ + "earth", + "international", + "world", + "internet", + "interweb", + "i18n" + ], + skins: [ + { + unified: "1f310", + native: "🌐" + } + ], + version: 1 + }, + world_map: { + id: "world_map", + name: "World Map", + keywords: [ + "location", + "direction" + ], + skins: [ + { + unified: "1f5fa-fe0f", + native: "🗺️" + } + ], + version: 1 + }, + japan: { + id: "japan", + name: "Map of Japan", + keywords: [ + "nation", + "country", + "japanese", + "asia" + ], + skins: [ + { + unified: "1f5fe", + native: "🗾" + } + ], + version: 1 + }, + compass: { + id: "compass", + name: "Compass", + keywords: [ + "magnetic", + "navigation", + "orienteering" + ], + skins: [ + { + unified: "1f9ed", + native: "🧭" + } + ], + version: 11 + }, + snow_capped_mountain: { + id: "snow_capped_mountain", + name: "Snow-Capped Mountain", + keywords: [ + "snow", + "capped", + "photo", "nature", - "haha" + "environment", + "winter", + "cold" ], - k: [ - 32, - 44 + skins: [ + { + unified: "1f3d4-fe0f", + native: "🏔️" + } ], - o: 2 + version: 1 + }, + mountain: { + id: "mountain", + name: "Mountain", + keywords: [ + "photo", + "nature", + "environment" + ], + skins: [ + { + unified: "26f0-fe0f", + native: "⛰️" + } + ], + version: 1 + }, + volcano: { + id: "volcano", + name: "Volcano", + keywords: [ + "photo", + "nature", + "disaster" + ], + skins: [ + { + unified: "1f30b", + native: "🌋" + } + ], + version: 1 + }, + mount_fuji: { + id: "mount_fuji", + name: "Mount Fuji", + keywords: [ + "photo", + "mountain", + "nature", + "japanese" + ], + skins: [ + { + unified: "1f5fb", + native: "🗻" + } + ], + version: 1 + }, + camping: { + id: "camping", + name: "Camping", + keywords: [ + "photo", + "outdoors", + "tent" + ], + skins: [ + { + unified: "1f3d5-fe0f", + native: "🏕️" + } + ], + version: 1 + }, + beach_with_umbrella: { + id: "beach_with_umbrella", + name: "Beach with Umbrella", + keywords: [ + "weather", + "summer", + "sunny", + "sand", + "mojito" + ], + skins: [ + { + unified: "1f3d6-fe0f", + native: "🏖️" + } + ], + version: 1 + }, + desert: { + id: "desert", + name: "Desert", + keywords: [ + "photo", + "warm", + "saharah" + ], + skins: [ + { + unified: "1f3dc-fe0f", + native: "🏜️" + } + ], + version: 1 + }, + desert_island: { + id: "desert_island", + name: "Desert Island", + keywords: [ + "photo", + "tropical", + "mojito" + ], + skins: [ + { + unified: "1f3dd-fe0f", + native: "🏝️" + } + ], + version: 1 + }, + national_park: { + id: "national_park", + name: "National Park", + keywords: [ + "photo", + "environment", + "nature" + ], + skins: [ + { + unified: "1f3de-fe0f", + native: "🏞️" + } + ], + version: 1 + }, + stadium: { + id: "stadium", + name: "Stadium", + keywords: [ + "photo", + "place", + "sports", + "concert", + "venue" + ], + skins: [ + { + unified: "1f3df-fe0f", + native: "🏟️" + } + ], + version: 1 + }, + classical_building: { + id: "classical_building", + name: "Classical Building", + keywords: [ + "art", + "culture", + "history" + ], + skins: [ + { + unified: "1f3db-fe0f", + native: "🏛️" + } + ], + version: 1 + }, + building_construction: { + id: "building_construction", + name: "Building Construction", + keywords: [ + "wip", + "working", + "progress" + ], + skins: [ + { + unified: "1f3d7-fe0f", + native: "🏗️" + } + ], + version: 1 + }, + bricks: { + id: "bricks", + name: "Brick", + keywords: [ + "bricks" + ], + skins: [ + { + unified: "1f9f1", + native: "🧱" + } + ], + version: 11 + }, + rock: { + id: "rock", + name: "Rock", + keywords: [ + "stone" + ], + skins: [ + { + unified: "1faa8", + native: "🪨" + } + ], + version: 13 + }, + wood: { + id: "wood", + name: "Wood", + keywords: [ + "nature", + "timber", + "trunk" + ], + skins: [ + { + unified: "1fab5", + native: "🪵" + } + ], + version: 13 + }, + hut: { + id: "hut", + name: "Hut", + keywords: [ + "house", + "structure" + ], + skins: [ + { + unified: "1f6d6", + native: "🛖" + } + ], + version: 13 + }, + house_buildings: { + id: "house_buildings", + name: "Houses", + keywords: [ + "house", + "buildings", + "photo" + ], + skins: [ + { + unified: "1f3d8-fe0f", + native: "🏘️" + } + ], + version: 1 + }, + derelict_house_building: { + id: "derelict_house_building", + name: "Derelict House", + keywords: [ + "building", + "abandon", + "evict", + "broken" + ], + skins: [ + { + unified: "1f3da-fe0f", + native: "🏚️" + } + ], + version: 1 + }, + house: { + id: "house", + name: "House", + keywords: [ + "building", + "home" + ], + skins: [ + { + unified: "1f3e0", + native: "🏠" + } + ], + version: 1 + }, + house_with_garden: { + id: "house_with_garden", + name: "House with Garden", + keywords: [ + "home", + "plant", + "nature" + ], + skins: [ + { + unified: "1f3e1", + native: "🏡" + } + ], + version: 1 + }, + office: { + id: "office", + name: "Office Building", + keywords: [ + "bureau", + "work" + ], + skins: [ + { + unified: "1f3e2", + native: "🏢" + } + ], + version: 1 + }, + post_office: { + id: "post_office", + name: "Japanese Post Office", + keywords: [ + "building", + "envelope", + "communication" + ], + skins: [ + { + unified: "1f3e3", + native: "🏣" + } + ], + version: 1 + }, + european_post_office: { + id: "european_post_office", + name: "Post Office", + keywords: [ + "european", + "building", + "email" + ], + skins: [ + { + unified: "1f3e4", + native: "🏤" + } + ], + version: 1 + }, + hospital: { + id: "hospital", + name: "Hospital", + keywords: [ + "building", + "health", + "surgery", + "doctor" + ], + skins: [ + { + unified: "1f3e5", + native: "🏥" + } + ], + version: 1 + }, + bank: { + id: "bank", + name: "Bank", + keywords: [ + "building", + "money", + "sales", + "cash", + "business", + "enterprise" + ], + skins: [ + { + unified: "1f3e6", + native: "🏦" + } + ], + version: 1 + }, + hotel: { + id: "hotel", + name: "Hotel", + keywords: [ + "building", + "accomodation", + "checkin" + ], + skins: [ + { + unified: "1f3e8", + native: "🏨" + } + ], + version: 1 + }, + love_hotel: { + id: "love_hotel", + name: "Love Hotel", + keywords: [ + "like", + "affection", + "dating" + ], + skins: [ + { + unified: "1f3e9", + native: "🏩" + } + ], + version: 1 + }, + convenience_store: { + id: "convenience_store", + name: "Convenience Store", + keywords: [ + "building", + "shopping", + "groceries" + ], + skins: [ + { + unified: "1f3ea", + native: "🏪" + } + ], + version: 1 + }, + school: { + id: "school", + name: "School", + keywords: [ + "building", + "student", + "education", + "learn", + "teach" + ], + skins: [ + { + unified: "1f3eb", + native: "🏫" + } + ], + version: 1 + }, + department_store: { + id: "department_store", + name: "Department Store", + keywords: [ + "building", + "shopping", + "mall" + ], + skins: [ + { + unified: "1f3ec", + native: "🏬" + } + ], + version: 1 + }, + factory: { + id: "factory", + name: "Factory", + keywords: [ + "building", + "industry", + "pollution", + "smoke" + ], + skins: [ + { + unified: "1f3ed", + native: "🏭" + } + ], + version: 1 + }, + japanese_castle: { + id: "japanese_castle", + name: "Japanese Castle", + keywords: [ + "photo", + "building" + ], + skins: [ + { + unified: "1f3ef", + native: "🏯" + } + ], + version: 1 + }, + european_castle: { + id: "european_castle", + name: "Castle", + keywords: [ + "european", + "building", + "royalty", + "history" + ], + skins: [ + { + unified: "1f3f0", + native: "🏰" + } + ], + version: 1 + }, + wedding: { + id: "wedding", + name: "Wedding", + keywords: [ + "love", + "like", + "affection", + "couple", + "marriage", + "bride", + "groom" + ], + skins: [ + { + unified: "1f492", + native: "💒" + } + ], + version: 1 + }, + tokyo_tower: { + id: "tokyo_tower", + name: "Tokyo Tower", + keywords: [ + "photo", + "japanese" + ], + skins: [ + { + unified: "1f5fc", + native: "🗼" + } + ], + version: 1 + }, + statue_of_liberty: { + id: "statue_of_liberty", + name: "Statue of Liberty", + keywords: [ + "american", + "newyork" + ], + skins: [ + { + unified: "1f5fd", + native: "🗽" + } + ], + version: 1 + }, + church: { + id: "church", + name: "Church", + keywords: [ + "building", + "religion", + "christ" + ], + skins: [ + { + unified: "26ea", + native: "⛪" + } + ], + version: 1 + }, + mosque: { + id: "mosque", + name: "Mosque", + keywords: [ + "islam", + "worship", + "minaret" + ], + skins: [ + { + unified: "1f54c", + native: "🕌" + } + ], + version: 1 + }, + hindu_temple: { + id: "hindu_temple", + name: "Hindu Temple", + keywords: [ + "religion" + ], + skins: [ + { + unified: "1f6d5", + native: "🛕" + } + ], + version: 12 + }, + synagogue: { + id: "synagogue", + name: "Synagogue", + keywords: [ + "judaism", + "worship", + "temple", + "jewish" + ], + skins: [ + { + unified: "1f54d", + native: "🕍" + } + ], + version: 1 + }, + shinto_shrine: { + id: "shinto_shrine", + name: "Shinto Shrine", + keywords: [ + "temple", + "japan", + "kyoto" + ], + skins: [ + { + unified: "26e9-fe0f", + native: "⛩️" + } + ], + version: 1 + }, + kaaba: { + id: "kaaba", + name: "Kaaba", + keywords: [ + "mecca", + "mosque", + "islam" + ], + skins: [ + { + unified: "1f54b", + native: "🕋" + } + ], + version: 1 + }, + fountain: { + id: "fountain", + name: "Fountain", + keywords: [ + "photo", + "summer", + "water", + "fresh" + ], + skins: [ + { + unified: "26f2", + native: "⛲" + } + ], + version: 1 + }, + tent: { + id: "tent", + name: "Tent", + keywords: [ + "photo", + "camping", + "outdoors" + ], + skins: [ + { + unified: "26fa", + native: "⛺" + } + ], + version: 1 + }, + foggy: { + id: "foggy", + name: "Foggy", + keywords: [ + "photo", + "mountain" + ], + skins: [ + { + unified: "1f301", + native: "🌁" + } + ], + version: 1 + }, + night_with_stars: { + id: "night_with_stars", + name: "Night with Stars", + keywords: [ + "evening", + "city", + "downtown" + ], + skins: [ + { + unified: "1f303", + native: "🌃" + } + ], + version: 1 + }, + cityscape: { + id: "cityscape", + name: "Cityscape", + keywords: [ + "photo", + "night", + "life", + "urban" + ], + skins: [ + { + unified: "1f3d9-fe0f", + native: "🏙️" + } + ], + version: 1 + }, + sunrise_over_mountains: { + id: "sunrise_over_mountains", + name: "Sunrise over Mountains", + keywords: [ + "view", + "vacation", + "photo" + ], + skins: [ + { + unified: "1f304", + native: "🌄" + } + ], + version: 1 + }, + sunrise: { + id: "sunrise", + name: "Sunrise", + keywords: [ + "morning", + "view", + "vacation", + "photo" + ], + skins: [ + { + unified: "1f305", + native: "🌅" + } + ], + version: 1 + }, + city_sunset: { + id: "city_sunset", + name: "Cityscape at Dusk", + keywords: [ + "city", + "sunset", + "photo", + "evening", + "sky", + "buildings" + ], + skins: [ + { + unified: "1f306", + native: "🌆" + } + ], + version: 1 + }, + city_sunrise: { + id: "city_sunrise", + name: "Sunset", + keywords: [ + "city", + "sunrise", + "photo", + "good", + "morning", + "dawn" + ], + skins: [ + { + unified: "1f307", + native: "🌇" + } + ], + version: 1 + }, + bridge_at_night: { + id: "bridge_at_night", + name: "Bridge at Night", + keywords: [ + "photo", + "sanfrancisco" + ], + skins: [ + { + unified: "1f309", + native: "🌉" + } + ], + version: 1 + }, + hotsprings: { + id: "hotsprings", + name: "Hot Springs", + keywords: [ + "hotsprings", + "bath", + "warm", + "relax" + ], + skins: [ + { + unified: "2668-fe0f", + native: "♨️" + } + ], + version: 1 + }, + carousel_horse: { + id: "carousel_horse", + name: "Carousel Horse", + keywords: [ + "photo", + "carnival" + ], + skins: [ + { + unified: "1f3a0", + native: "🎠" + } + ], + version: 1 + }, + playground_slide: { + id: "playground_slide", + name: "Playground Slide", + keywords: [ + "fun", + "park" + ], + skins: [ + { + unified: "1f6dd", + native: "🛝" + } + ], + version: 14 + }, + ferris_wheel: { + id: "ferris_wheel", + name: "Ferris Wheel", + keywords: [ + "photo", + "carnival", + "londoneye" + ], + skins: [ + { + unified: "1f3a1", + native: "🎡" + } + ], + version: 1 + }, + roller_coaster: { + id: "roller_coaster", + name: "Roller Coaster", + keywords: [ + "carnival", + "playground", + "photo", + "fun" + ], + skins: [ + { + unified: "1f3a2", + native: "🎢" + } + ], + version: 1 + }, + barber: { + id: "barber", + name: "Barber Pole", + keywords: [ + "hair", + "salon", + "style" + ], + skins: [ + { + unified: "1f488", + native: "💈" + } + ], + version: 1 + }, + circus_tent: { + id: "circus_tent", + name: "Circus Tent", + keywords: [ + "festival", + "carnival", + "party" + ], + skins: [ + { + unified: "1f3aa", + native: "🎪" + } + ], + version: 1 + }, + steam_locomotive: { + id: "steam_locomotive", + name: "Locomotive", + keywords: [ + "steam", + "transportation", + "vehicle", + "train" + ], + skins: [ + { + unified: "1f682", + native: "🚂" + } + ], + version: 1 + }, + railway_car: { + id: "railway_car", + name: "Railway Car", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f683", + native: "🚃" + } + ], + version: 1 + }, + bullettrain_side: { + id: "bullettrain_side", + name: "High-Speed Train", + keywords: [ + "bullettrain", + "side", + "high", + "speed", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f684", + native: "🚄" + } + ], + version: 1 + }, + bullettrain_front: { + id: "bullettrain_front", + name: "Bullet Train", + keywords: [ + "bullettrain", + "front", + "transportation", + "vehicle", + "speed", + "fast", + "public", + "travel" + ], + skins: [ + { + unified: "1f685", + native: "🚅" + } + ], + version: 1 + }, + train2: { + id: "train2", + name: "Train", + keywords: [ + "train2", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f686", + native: "🚆" + } + ], + version: 1 + }, + metro: { + id: "metro", + name: "Metro", + keywords: [ + "transportation", + "blue", + "square", + "mrt", + "underground", + "tube" + ], + skins: [ + { + unified: "1f687", + native: "🚇" + } + ], + version: 1 + }, + light_rail: { + id: "light_rail", + name: "Light Rail", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f688", + native: "🚈" + } + ], + version: 1 + }, + station: { + id: "station", + name: "Station", + keywords: [ + "transportation", + "vehicle", + "public" + ], + skins: [ + { + unified: "1f689", + native: "🚉" + } + ], + version: 1 + }, + tram: { + id: "tram", + name: "Tram", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f68a", + native: "🚊" + } + ], + version: 1 + }, + monorail: { + id: "monorail", + name: "Monorail", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f69d", + native: "🚝" + } + ], + version: 1 + }, + mountain_railway: { + id: "mountain_railway", + name: "Mountain Railway", + keywords: [ + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f69e", + native: "🚞" + } + ], + version: 1 + }, + train: { + id: "train", + name: "Tram Car", + keywords: [ + "train", + "transportation", + "vehicle", + "carriage", + "public", + "travel" + ], + skins: [ + { + unified: "1f68b", + native: "🚋" + } + ], + version: 1 + }, + bus: { + id: "bus", + name: "Bus", + keywords: [ + "car", + "vehicle", + "transportation" + ], + skins: [ + { + unified: "1f68c", + native: "🚌" + } + ], + version: 1 + }, + oncoming_bus: { + id: "oncoming_bus", + name: "Oncoming Bus", + keywords: [ + "vehicle", + "transportation" + ], + skins: [ + { + unified: "1f68d", + native: "🚍" + } + ], + version: 1 + }, + trolleybus: { + id: "trolleybus", + name: "Trolleybus", + keywords: [ + "bart", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f68e", + native: "🚎" + } + ], + version: 1 + }, + minibus: { + id: "minibus", + name: "Minibus", + keywords: [ + "vehicle", + "car", + "transportation" + ], + skins: [ + { + unified: "1f690", + native: "🚐" + } + ], + version: 1 + }, + ambulance: { + id: "ambulance", + name: "Ambulance", + keywords: [ + "health", + "911", + "hospital" + ], + skins: [ + { + unified: "1f691", + native: "🚑" + } + ], + version: 1 + }, + fire_engine: { + id: "fire_engine", + name: "Fire Engine", + keywords: [ + "transportation", + "cars", + "vehicle" + ], + skins: [ + { + unified: "1f692", + native: "🚒" + } + ], + version: 1 + }, + police_car: { + id: "police_car", + name: "Police Car", + keywords: [ + "vehicle", + "cars", + "transportation", + "law", + "legal", + "enforcement" + ], + skins: [ + { + unified: "1f693", + native: "🚓" + } + ], + version: 1 + }, + oncoming_police_car: { + id: "oncoming_police_car", + name: "Oncoming Police Car", + keywords: [ + "vehicle", + "law", + "legal", + "enforcement", + "911" + ], + skins: [ + { + unified: "1f694", + native: "🚔" + } + ], + version: 1 + }, + taxi: { + id: "taxi", + name: "Taxi", + keywords: [ + "uber", + "vehicle", + "cars", + "transportation" + ], + skins: [ + { + unified: "1f695", + native: "🚕" + } + ], + version: 1 + }, + oncoming_taxi: { + id: "oncoming_taxi", + name: "Oncoming Taxi", + keywords: [ + "vehicle", + "cars", + "uber" + ], + skins: [ + { + unified: "1f696", + native: "🚖" + } + ], + version: 1 + }, + car: { + id: "car", + name: "Automobile", + keywords: [ + "car", + "red", + "transportation", + "vehicle" + ], + skins: [ + { + unified: "1f697", + native: "🚗" + } + ], + version: 1 + }, + oncoming_automobile: { + id: "oncoming_automobile", + name: "Oncoming Automobile", + keywords: [ + "car", + "vehicle", + "transportation" + ], + skins: [ + { + unified: "1f698", + native: "🚘" + } + ], + version: 1 + }, + blue_car: { + id: "blue_car", + name: "Recreational Vehicle", + keywords: [ + "blue", + "car", + "sport", + "utility", + "transportation" + ], + skins: [ + { + unified: "1f699", + native: "🚙" + } + ], + version: 1 + }, + pickup_truck: { + id: "pickup_truck", + name: "Pickup Truck", + keywords: [ + "car", + "transportation" + ], + skins: [ + { + unified: "1f6fb", + native: "🛻" + } + ], + version: 13 + }, + truck: { + id: "truck", + name: "Delivery Truck", + keywords: [ + "cars", + "transportation" + ], + skins: [ + { + unified: "1f69a", + native: "🚚" + } + ], + version: 1 + }, + articulated_lorry: { + id: "articulated_lorry", + name: "Articulated Lorry", + keywords: [ + "vehicle", + "cars", + "transportation", + "express" + ], + skins: [ + { + unified: "1f69b", + native: "🚛" + } + ], + version: 1 + }, + tractor: { + id: "tractor", + name: "Tractor", + keywords: [ + "vehicle", + "car", + "farming", + "agriculture" + ], + skins: [ + { + unified: "1f69c", + native: "🚜" + } + ], + version: 1 + }, + racing_car: { + id: "racing_car", + name: "Racing Car", + keywords: [ + "sports", + "race", + "fast", + "formula", + "f1" + ], + skins: [ + { + unified: "1f3ce-fe0f", + native: "🏎️" + } + ], + version: 1 + }, + racing_motorcycle: { + id: "racing_motorcycle", + name: "Motorcycle", + keywords: [ + "racing", + "race", + "sports", + "fast" + ], + skins: [ + { + unified: "1f3cd-fe0f", + native: "🏍️" + } + ], + version: 1 + }, + motor_scooter: { + id: "motor_scooter", + name: "Motor Scooter", + keywords: [ + "vehicle", + "vespa", + "sasha" + ], + skins: [ + { + unified: "1f6f5", + native: "🛵" + } + ], + version: 3 + }, + manual_wheelchair: { + id: "manual_wheelchair", + name: "Manual Wheelchair", + keywords: [ + "accessibility" + ], + skins: [ + { + unified: "1f9bd", + native: "🦽" + } + ], + version: 12 + }, + motorized_wheelchair: { + id: "motorized_wheelchair", + name: "Motorized Wheelchair", + keywords: [ + "accessibility" + ], + skins: [ + { + unified: "1f9bc", + native: "🦼" + } + ], + version: 12 + }, + auto_rickshaw: { + id: "auto_rickshaw", + name: "Auto Rickshaw", + keywords: [ + "move", + "transportation" + ], + skins: [ + { + unified: "1f6fa", + native: "🛺" + } + ], + version: 12 + }, + bike: { + id: "bike", + name: "Bicycle", + keywords: [ + "bike", + "sports", + "exercise", + "hipster" + ], + skins: [ + { + unified: "1f6b2", + native: "🚲" + } + ], + version: 1 + }, + scooter: { + id: "scooter", + name: "Scooter", + keywords: [ + "kick", + "vehicle", + "razor" + ], + skins: [ + { + unified: "1f6f4", + native: "🛴" + } + ], + version: 3 + }, + skateboard: { + id: "skateboard", + name: "Skateboard", + keywords: [ + "board" + ], + skins: [ + { + unified: "1f6f9", + native: "🛹" + } + ], + version: 11 + }, + roller_skate: { + id: "roller_skate", + name: "Roller Skate", + keywords: [ + "footwear", + "sports" + ], + skins: [ + { + unified: "1f6fc", + native: "🛼" + } + ], + version: 13 + }, + busstop: { + id: "busstop", + name: "Bus Stop", + keywords: [ + "busstop", + "transportation", + "wait" + ], + skins: [ + { + unified: "1f68f", + native: "🚏" + } + ], + version: 1 + }, + motorway: { + id: "motorway", + name: "Motorway", + keywords: [ + "road", + "cupertino", + "interstate", + "highway" + ], + skins: [ + { + unified: "1f6e3-fe0f", + native: "🛣️" + } + ], + version: 1 + }, + railway_track: { + id: "railway_track", + name: "Railway Track", + keywords: [ + "train", + "transportation" + ], + skins: [ + { + unified: "1f6e4-fe0f", + native: "🛤️" + } + ], + version: 1 + }, + oil_drum: { + id: "oil_drum", + name: "Oil Drum", + keywords: [ + "barrell" + ], + skins: [ + { + unified: "1f6e2-fe0f", + native: "🛢️" + } + ], + version: 1 + }, + fuelpump: { + id: "fuelpump", + name: "Fuel Pump", + keywords: [ + "fuelpump", + "gas", + "station", + "petroleum" + ], + skins: [ + { + unified: "26fd", + native: "⛽" + } + ], + version: 1 + }, + wheel: { + id: "wheel", + name: "Wheel", + keywords: [ + "car", + "transport" + ], + skins: [ + { + unified: "1f6de", + native: "🛞" + } + ], + version: 14 + }, + rotating_light: { + id: "rotating_light", + name: "Police Car Light", + keywords: [ + "rotating", + "ambulance", + "911", + "emergency", + "alert", + "error", + "pinged", + "law", + "legal" + ], + skins: [ + { + unified: "1f6a8", + native: "🚨" + } + ], + version: 1 + }, + traffic_light: { + id: "traffic_light", + name: "Horizontal Traffic Light", + keywords: [ + "transportation", + "signal" + ], + skins: [ + { + unified: "1f6a5", + native: "🚥" + } + ], + version: 1 + }, + vertical_traffic_light: { + id: "vertical_traffic_light", + name: "Vertical Traffic Light", + keywords: [ + "transportation", + "driving" + ], + skins: [ + { + unified: "1f6a6", + native: "🚦" + } + ], + version: 1 + }, + octagonal_sign: { + id: "octagonal_sign", + name: "Stop Sign", + keywords: [ + "octagonal" + ], + skins: [ + { + unified: "1f6d1", + native: "🛑" + } + ], + version: 3 + }, + construction: { + id: "construction", + name: "Construction", + keywords: [ + "wip", + "progress", + "caution", + "warning" + ], + skins: [ + { + unified: "1f6a7", + native: "🚧" + } + ], + version: 1 + }, + anchor: { + id: "anchor", + name: "Anchor", + keywords: [ + "ship", + "ferry", + "sea", + "boat" + ], + skins: [ + { + unified: "2693", + native: "⚓" + } + ], + version: 1 + }, + ring_buoy: { + id: "ring_buoy", + name: "Ring Buoy", + keywords: [ + "life", + "saver", + "preserver" + ], + skins: [ + { + unified: "1f6df", + native: "🛟" + } + ], + version: 14 + }, + boat: { + id: "boat", + name: "Sailboat", + keywords: [ + "boat", + "ship", + "summer", + "transportation", + "water", + "sailing" + ], + skins: [ + { + unified: "26f5", + native: "⛵" + } + ], + version: 1 }, canoe: { - a: "Canoe", - b: "1F6F6", - j: [ + id: "canoe", + name: "Canoe", + keywords: [ "boat", "paddle", "water", "ship" ], - k: [ - 36, - 55 + skins: [ + { + unified: "1f6f6", + native: "🛶" + } ], - o: 4 - }, - negative_squared_cross_mark: { - a: "Negative Squared Cross Mark", - b: "274E", - j: [ - "x", - "green-square", - "no", - "deny" - ], - k: [ - 55, - 22 - ], - o: 2 - }, - "flag-ic": { - a: "Canary Islands Flag", - b: "1F1EE-1F1E8", - k: [ - 2, - 22 - ], - o: 2 - }, - beverage_box: { - a: "Beverage Box", - b: "1F9C3", - k: [ - 44, - 11 - ], - o: 12 + version: 3 }, speedboat: { - a: "Speedboat", - b: "1F6A4", - j: [ + id: "speedboat", + name: "Speedboat", + keywords: [ "ship", "transportation", "vehicle", "summer" ], - k: [ - 34, - 52 - ], - o: 2 - }, - heavy_plus_sign: { - a: "Heavy Plus Sign", - b: "2795", - j: [ - "math", - "calculation", - "addition", - "more", - "increase" - ], - k: [ - 55, - 29 - ], - o: 2 - }, - sunflower: { - a: "Sunflower", - b: "1F33B", - j: [ - "nature", - "plant", - "fall" - ], - k: [ - 6, - 19 - ], - o: 2 - }, - page_with_curl: { - a: "Page with Curl", - b: "1F4C3", - j: [ - "documents", - "office", - "paper" - ], - k: [ - 26, - 25 - ], - o: 2 - }, - "female-teacher": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fb-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 2, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fc-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 3, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fd-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 4, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3fe-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 5, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F3EB", - non_qualified: null, - image: "1f469-1f3ff-200d-1f3eb.png", - sheet_x: 18, - sheet_y: 6, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f6a4", + native: "🚤" } - }, - a: "Female Teacher", - b: "1F469-200D-1F3EB", - k: [ - 18, - 1 ], - o: 4 - }, - hear_no_evil: { - a: "Hear-No-Evil Monkey", - b: "1F649", - j: [ - "animal", - "monkey", - "nature" - ], - k: [ - 32, - 45 - ], - o: 2 - }, - mate_drink: { - a: "Mate Drink", - b: "1F9C9", - k: [ - 44, - 17 - ], - o: 12 + version: 1 }, passenger_ship: { - a: "Passenger Ship", - b: "1F6F3-FE0F", - c: "1F6F3", - j: [ + id: "passenger_ship", + name: "Passenger Ship", + keywords: [ "yacht", "cruise", "ferry" ], - k: [ - 36, - 52 - ], - o: 2 - }, - scroll: { - a: "Scroll", - b: "1F4DC", - j: [ - "documents", - "ancient", - "history", - "paper" - ], - k: [ - 26, - 50 - ], - o: 2 - }, - blossom: { - a: "Blossom", - b: "1F33C", - j: [ - "nature", - "flowers", - "yellow" - ], - k: [ - 6, - 20 - ], - o: 2 - }, - "flag-id": { - a: "Indonesia Flag", - b: "1F1EE-1F1E9", - k: [ - 2, - 23 - ], - o: 2 - }, - speak_no_evil: { - a: "Speak-No-Evil Monkey", - b: "1F64A", - j: [ - "monkey", - "animal", - "nature", - "omg" - ], - k: [ - 32, - 46 - ], - o: 2 - }, - heavy_minus_sign: { - a: "Heavy Minus Sign", - b: "2796", - j: [ - "math", - "calculation", - "subtract", - "less" - ], - k: [ - 55, - 30 - ], - o: 2 - }, - "flag-ie": { - a: "Ireland Flag", - b: "1F1EE-1F1EA", - k: [ - 2, - 24 - ], - o: 2 - }, - ice_cube: { - a: "Ice Cube", - b: "1F9CA", - k: [ - 44, - 18 - ], - o: 12 - }, - page_facing_up: { - a: "Page Facing Up", - b: "1F4C4", - j: [ - "documents", - "office", - "paper", - "information" - ], - k: [ - 26, - 26 - ], - o: 2 - }, - "male-judge": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-2696-FE0F", - non_qualified: "1F468-1F3FB-200D-2696", - image: "1f468-1f3fb-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 9, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-2696-FE0F", - non_qualified: "1F468-1F3FC-200D-2696", - image: "1f468-1f3fc-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 10, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-2696-FE0F", - non_qualified: "1F468-1F3FD-200D-2696", - image: "1f468-1f3fd-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 11, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-2696-FE0F", - non_qualified: "1F468-1F3FE-200D-2696", - image: "1f468-1f3fe-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 12, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-2696-FE0F", - non_qualified: "1F468-1F3FF-200D-2696", - image: "1f468-1f3ff-200d-2696-fe0f.png", - sheet_x: 17, - sheet_y: 13, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f6f3-fe0f", + native: "🛳️" } - }, - a: "Male Judge", - b: "1F468-200D-2696-FE0F", - c: "1F468-200D-2696", - k: [ - 17, - 8 ], - o: 4 - }, - tulip: { - a: "Tulip", - b: "1F337", - j: [ - "flowers", - "plant", - "nature", - "summer", - "spring" - ], - k: [ - 6, - 15 - ], - o: 2 + version: 1 }, ferry: { - a: "Ferry", - b: "26F4-FE0F", - c: "26F4", - j: [ + id: "ferry", + name: "Ferry", + keywords: [ "boat", "ship", "yacht" ], - k: [ - 54, - 15 - ], - o: 2 - }, - kiss: { - a: "Kiss Mark", - b: "1F48B", - j: [ - "face", - "lips", - "love", - "like", - "affection", - "valentines" - ], - k: [ - 25, - 21 - ], - o: 2 - }, - heavy_division_sign: { - a: "Heavy Division Sign", - b: "2797", - j: [ - "divide", - "math", - "calculation" - ], - k: [ - 55, - 31 - ], - o: 2 - }, - newspaper: { - a: "Newspaper", - b: "1F4F0", - j: [ - "press", - "headline" - ], - k: [ - 27, - 13 - ], - o: 2 - }, - "female-judge": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-2696-FE0F", - non_qualified: "1F469-1F3FB-200D-2696", - image: "1f469-1f3fb-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-2696-FE0F", - non_qualified: "1F469-1F3FC-200D-2696", - image: "1f469-1f3fc-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-2696-FE0F", - non_qualified: "1F469-1F3FD-200D-2696", - image: "1f469-1f3fd-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 53, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-2696-FE0F", - non_qualified: "1F469-1F3FE-200D-2696", - image: "1f469-1f3fe-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-2696-FE0F", - non_qualified: "1F469-1F3FF-200D-2696", - image: "1f469-1f3ff-200d-2696-fe0f.png", - sheet_x: 19, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "26f4-fe0f", + native: "⛴️" } - }, - a: "Female Judge", - b: "1F469-200D-2696-FE0F", - c: "1F469-200D-2696", - k: [ - 19, - 50 ], - o: 4 - }, - seedling: { - a: "Seedling", - b: "1F331", - j: [ - "plant", - "nature", - "grass", - "lawn", - "spring" - ], - k: [ - 6, - 9 - ], - o: 2 - }, - love_letter: { - a: "Love Letter", - b: "1F48C", - j: [ - "email", - "like", - "affection", - "envelope", - "valentines" - ], - k: [ - 25, - 22 - ], - o: 2 - }, - chopsticks: { - a: "Chopsticks", - b: "1F962", - k: [ - 41, - 49 - ], - o: 5 + version: 1 }, motor_boat: { - a: "Motor Boat", - b: "1F6E5-FE0F", - c: "1F6E5", - j: [ + id: "motor_boat", + name: "Motor Boat", + keywords: [ "ship" ], - k: [ - 36, - 47 + skins: [ + { + unified: "1f6e5-fe0f", + native: "🛥️" + } ], - o: 2 - }, - "flag-il": { - a: "Israel Flag", - b: "1F1EE-1F1F1", - k: [ - 2, - 25 - ], - o: 2 - }, - curly_loop: { - a: "Curly Loop", - b: "27B0", - j: [ - "scribble", - "draw", - "shape", - "squiggle" - ], - k: [ - 55, - 33 - ], - o: 2 - }, - "flag-im": { - a: "Isle of Man Flag", - b: "1F1EE-1F1F2", - k: [ - 2, - 26 - ], - o: 2 - }, - evergreen_tree: { - a: "Evergreen Tree", - b: "1F332", - j: [ - "plant", - "nature" - ], - k: [ - 6, - 10 - ], - o: 2 - }, - cupid: { - a: "Heart with Arrow", - b: "1F498", - j: [ - "love", - "like", - "heart", - "affection", - "valentines" - ], - k: [ - 25, - 34 - ], - o: 2 - }, - loop: { - a: "Double Curly Loop", - b: "27BF", - j: [ - "tape", - "cassette" - ], - k: [ - 55, - 34 - ], - o: 2 + version: 1 }, ship: { - a: "Ship", - b: "1F6A2", - j: [ + id: "ship", + name: "Ship", + keywords: [ "transportation", "titanic", "deploy" ], - k: [ - 34, - 33 - ], - o: 2 - }, - rolled_up_newspaper: { - a: "Rolled Up Newspaper", - b: "1F5DE-FE0F", - c: "1F5DE", - k: [ - 30, - 23 - ], - o: 2 - }, - knife_fork_plate: { - a: "Knife Fork Plate", - b: "1F37D-FE0F", - c: "1F37D", - k: [ - 7, - 28 - ], - o: 2 - }, - fork_and_knife: { - a: "Fork and Knife", - b: "1F374", - j: [ - "cutlery", - "kitchen" - ], - k: [ - 7, - 19 - ], - o: 2 - }, - "male-farmer": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fb-200d-1f33e.png", - sheet_x: 14, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fc-200d-1f33e.png", - sheet_x: 14, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fd-200d-1f33e.png", - sheet_x: 14, - sheet_y: 41, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F33E", - non_qualified: null, - image: "1f468-1f3fe-200d-1f33e.png", - sheet_x: 14, - sheet_y: 42, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F33E", - non_qualified: null, - image: "1f468-1f3ff-200d-1f33e.png", - sheet_x: 14, - sheet_y: 43, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f6a2", + native: "🚢" } - }, - a: "Male Farmer", - b: "1F468-200D-1F33E", - k: [ - 14, - 38 ], - o: 4 - }, - bookmark_tabs: { - a: "Bookmark Tabs", - b: "1F4D1", - j: [ - "favorite", - "save", - "order", - "tidy" - ], - k: [ - 26, - 39 - ], - o: 2 - }, - part_alternation_mark: { - a: "Part Alternation Mark", - b: "303D-FE0F", - c: "303D", - j: [ - "graph", - "presentation", - "stats", - "business", - "economics", - "bad" - ], - k: [ - 55, - 45 - ], - o: 2 - }, - "flag-in": { - a: "India Flag", - b: "1F1EE-1F1F3", - k: [ - 2, - 27 - ], - o: 2 - }, - gift_heart: { - a: "Heart with Ribbon", - b: "1F49D", - j: [ - "love", - "valentines" - ], - k: [ - 25, - 39 - ], - o: 2 + version: 1 }, airplane: { - a: "Airplane", - b: "2708-FE0F", - c: "2708", - j: [ + id: "airplane", + name: "Airplane", + keywords: [ "vehicle", "transportation", "flight", "fly" ], - k: [ - 54, - 41 - ], - o: 2 - }, - deciduous_tree: { - a: "Deciduous Tree", - b: "1F333", - j: [ - "plant", - "nature" - ], - k: [ - 6, - 11 - ], - o: 2 - }, - spoon: { - a: "Spoon", - b: "1F944", - j: [ - "cutlery", - "kitchen", - "tableware" - ], - k: [ - 41, - 20 - ], - o: 4 - }, - "flag-io": { - a: "British Indian Ocean Territory Flag", - b: "1F1EE-1F1F4", - k: [ - 2, - 28 - ], - o: 2 - }, - palm_tree: { - a: "Palm Tree", - b: "1F334", - j: [ - "plant", - "vegetable", - "nature", - "summer", - "beach", - "mojito", - "tropical" - ], - k: [ - 6, - 12 - ], - o: 2 - }, - sparkling_heart: { - a: "Sparkling Heart", - b: "1F496", - j: [ - "love", - "like", - "affection", - "valentines" - ], - k: [ - 25, - 32 - ], - o: 2 - }, - "female-farmer": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fb-200d-1f33e.png", - sheet_x: 17, - sheet_y: 29, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fc-200d-1f33e.png", - sheet_x: 17, - sheet_y: 30, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fd-200d-1f33e.png", - sheet_x: 17, - sheet_y: 31, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F33E", - non_qualified: null, - image: "1f469-1f3fe-200d-1f33e.png", - sheet_x: 17, - sheet_y: 32, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F33E", - non_qualified: null, - image: "1f469-1f3ff-200d-1f33e.png", - sheet_x: 17, - sheet_y: 33, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "2708-fe0f", + native: "✈️" } - }, - a: "Female Farmer", - b: "1F469-200D-1F33E", - k: [ - 17, - 28 ], - o: 4 - }, - eight_spoked_asterisk: { - a: "Eight Spoked Asterisk", - b: "2733-FE0F", - c: "2733", - j: [ - "star", - "sparkle", - "green-square" - ], - k: [ - 55, - 17 - ], - o: 2 + version: 1 }, small_airplane: { - a: "Small Airplane", - b: "1F6E9-FE0F", - c: "1F6E9", - j: [ + id: "small_airplane", + name: "Small Airplane", + keywords: [ "flight", "transportation", "fly", "vehicle" ], - k: [ - 36, - 48 + skins: [ + { + unified: "1f6e9-fe0f", + native: "🛩️" + } ], - o: 2 - }, - bookmark: { - a: "Bookmark", - b: "1F516", - j: [ - "favorite", - "label", - "save" - ], - k: [ - 27, - 50 - ], - o: 2 - }, - eight_pointed_black_star: { - a: "Eight Pointed Black Star", - b: "2734-FE0F", - c: "2734", - j: [ - "orange-square", - "shape", - "polygon" - ], - k: [ - 55, - 18 - ], - o: 2 - }, - heartpulse: { - a: "Growing Heart", - b: "1F497", - j: [ - "like", - "love", - "affection", - "valentines", - "pink" - ], - k: [ - 25, - 33 - ], - o: 2 - }, - label: { - a: "Label", - b: "1F3F7-FE0F", - c: "1F3F7", - j: [ - "sale", - "tag" - ], - k: [ - 11, - 19 - ], - o: 2 - }, - "flag-iq": { - a: "Iraq Flag", - b: "1F1EE-1F1F6", - k: [ - 2, - 29 - ], - o: 2 - }, - hocho: { - a: "Hocho", - b: "1F52A", - j: [ - "knife", - "blade", - "cutlery", - "kitchen", - "weapon" - ], - k: [ - 28, - 13 - ], - n: [ - "knife" - ], - o: 2 - }, - cactus: { - a: "Cactus", - b: "1F335", - j: [ - "vegetable", - "plant", - "nature" - ], - k: [ - 6, - 13 - ], - o: 2 + version: 1 }, airplane_departure: { - a: "Airplane Departure", - b: "1F6EB", - k: [ - 36, - 49 + id: "airplane_departure", + name: "Airplane Departure", + keywords: [ + "airport", + "flight", + "landing" ], - o: 2 + skins: [ + { + unified: "1f6eb", + native: "🛫" + } + ], + version: 1 }, airplane_arriving: { - a: "Airplane Arriving", - b: "1F6EC", - k: [ - 36, - 50 + id: "airplane_arriving", + name: "Airplane Arrival", + keywords: [ + "arriving", + "airport", + "flight", + "boarding" ], - o: 2 - }, - ear_of_rice: { - a: "Ear of Rice", - b: "1F33E", - j: [ - "nature", - "plant" - ], - k: [ - 6, - 22 - ], - o: 2 - }, - "flag-ir": { - a: "Iran Flag", - b: "1F1EE-1F1F7", - k: [ - 2, - 30 - ], - o: 2 - }, - moneybag: { - a: "Money Bag", - b: "1F4B0", - j: [ - "dollar", - "payment", - "coins", - "sale" - ], - k: [ - 26, - 6 - ], - o: 2 - }, - "male-cook": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F373", - non_qualified: null, - image: "1f468-1f3fb-200d-1f373.png", - sheet_x: 14, - sheet_y: 45, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F373", - non_qualified: null, - image: "1f468-1f3fc-200d-1f373.png", - sheet_x: 14, - sheet_y: 46, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F373", - non_qualified: null, - image: "1f468-1f3fd-200d-1f373.png", - sheet_x: 14, - sheet_y: 47, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F373", - non_qualified: null, - image: "1f468-1f3fe-200d-1f373.png", - sheet_x: 14, - sheet_y: 48, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F373", - non_qualified: null, - image: "1f468-1f3ff-200d-1f373.png", - sheet_x: 14, - sheet_y: 49, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f6ec", + native: "🛬" } - }, - a: "Male Cook", - b: "1F468-200D-1F373", - k: [ - 14, - 44 ], - o: 4 - }, - heartbeat: { - a: "Beating Heart", - b: "1F493", - j: [ - "love", - "like", - "affection", - "valentines", - "pink", - "heart" - ], - k: [ - 25, - 29 - ], - o: 2 - }, - sparkle: { - a: "Sparkle", - b: "2747-FE0F", - c: "2747", - j: [ - "stars", - "green-square", - "awesome", - "good", - "fireworks" - ], - k: [ - 55, - 20 - ], - o: 2 - }, - amphora: { - a: "Amphora", - b: "1F3FA", - j: [ - "vase", - "jar" - ], - k: [ - 11, - 22 - ], - o: 2 - }, - yen: { - a: "Banknote with Yen Sign", - b: "1F4B4", - j: [ - "money", - "sales", - "japanese", - "dollar", - "currency" - ], - k: [ - 26, - 10 - ], - o: 2 - }, - revolving_hearts: { - a: "Revolving Hearts", - b: "1F49E", - j: [ - "love", - "like", - "affection", - "valentines" - ], - k: [ - 25, - 40 - ], - o: 2 - }, - bangbang: { - a: "Double Exclamation Mark", - b: "203C-FE0F", - c: "203C", - j: [ - "exclamation", - "surprise" - ], - k: [ - 52, - 10 - ], - o: 2 + version: 1 }, parachute: { - a: "Parachute", - b: "1FA82", - k: [ - 52, - 3 + id: "parachute", + name: "Parachute", + keywords: [ + "fly", + "glide" ], - o: 12 - }, - herb: { - a: "Herb", - b: "1F33F", - j: [ - "vegetable", - "plant", - "medicine", - "weed", - "grass", - "lawn" - ], - k: [ - 6, - 23 - ], - o: 2 - }, - "flag-is": { - a: "Iceland Flag", - b: "1F1EE-1F1F8", - k: [ - 2, - 31 - ], - o: 2 - }, - "female-cook": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F373", - non_qualified: null, - image: "1f469-1f3fb-200d-1f373.png", - sheet_x: 17, - sheet_y: 35, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F373", - non_qualified: null, - image: "1f469-1f3fc-200d-1f373.png", - sheet_x: 17, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F373", - non_qualified: null, - image: "1f469-1f3fd-200d-1f373.png", - sheet_x: 17, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F373", - non_qualified: null, - image: "1f469-1f3fe-200d-1f373.png", - sheet_x: 17, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F373", - non_qualified: null, - image: "1f469-1f3ff-200d-1f373.png", - sheet_x: 17, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1fa82", + native: "🪂" } - }, - a: "Female Cook", - b: "1F469-200D-1F373", - k: [ - 17, - 34 ], - o: 4 - }, - interrobang: { - a: "Exclamation Question Mark", - b: "2049-FE0F", - c: "2049", - j: [ - "wat", - "punctuation", - "surprise" - ], - k: [ - 52, - 11 - ], - o: 2 + version: 12 }, seat: { - a: "Seat", - b: "1F4BA", - j: [ + id: "seat", + name: "Seat", + keywords: [ "sit", "airplane", "transport", @@ -85924,1237 +80013,166 @@ var emojis = { "flight", "fly" ], - k: [ - 26, - 16 + skins: [ + { + unified: "1f4ba", + native: "💺" + } ], - o: 2 - }, - dollar: { - a: "Banknote with Dollar Sign", - b: "1F4B5", - j: [ - "money", - "sales", - "bill", - "currency" - ], - k: [ - 26, - 11 - ], - o: 2 - }, - two_hearts: { - a: "Two Hearts", - b: "1F495", - j: [ - "love", - "like", - "affection", - "valentines", - "heart" - ], - k: [ - 25, - 31 - ], - o: 2 - }, - it: { - a: "Italy Flag", - b: "1F1EE-1F1F9", - j: [ - "italy", - "flag", - "nation", - "country", - "banner" - ], - k: [ - 2, - 32 - ], - n: [ - "flag-it" - ], - o: 2 - }, - shamrock: { - a: "Shamrock", - b: "2618-FE0F", - c: "2618", - j: [ - "vegetable", - "plant", - "nature", - "irish", - "clover" - ], - k: [ - 53, - 1 - ], - o: 2 - }, - four_leaf_clover: { - a: "Four Leaf Clover", - b: "1F340", - j: [ - "vegetable", - "plant", - "nature", - "lucky", - "irish" - ], - k: [ - 6, - 24 - ], - o: 2 - }, - euro: { - a: "Banknote with Euro Sign", - b: "1F4B6", - j: [ - "money", - "sales", - "dollar", - "currency" - ], - k: [ - 26, - 12 - ], - o: 2 - }, - question: { - a: "Black Question Mark Ornament", - b: "2753", - j: [ - "doubt", - "confused" - ], - k: [ - 55, - 23 - ], - o: 2 + version: 1 }, helicopter: { - a: "Helicopter", - b: "1F681", - j: [ + id: "helicopter", + name: "Helicopter", + keywords: [ "transportation", "vehicle", "fly" ], - k: [ - 34, - 0 - ], - o: 2 - }, - heart_decoration: { - a: "Heart Decoration", - b: "1F49F", - j: [ - "purple-square", - "love", - "like" - ], - k: [ - 25, - 41 - ], - o: 2 - }, - "flag-je": { - a: "Jersey Flag", - b: "1F1EF-1F1EA", - k: [ - 2, - 33 - ], - o: 2 - }, - "male-mechanic": { - skin_variations: { - "1F3FB": { - unified: "1F468-1F3FB-200D-1F527", - non_qualified: null, - image: "1f468-1f3fb-200d-1f527.png", - sheet_x: 15, - sheet_y: 51, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F468-1F3FC-200D-1F527", - non_qualified: null, - image: "1f468-1f3fc-200d-1f527.png", - sheet_x: 15, - sheet_y: 52, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F468-1F3FD-200D-1F527", - non_qualified: null, - image: "1f468-1f3fd-200d-1f527.png", - sheet_x: 15, - sheet_y: 53, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F468-1F3FE-200D-1F527", - non_qualified: null, - image: "1f468-1f3fe-200d-1f527.png", - sheet_x: 15, - sheet_y: 54, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F468-1F3FF-200D-1F527", - non_qualified: null, - image: "1f468-1f3ff-200d-1f527.png", - sheet_x: 15, - sheet_y: 55, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f681", + native: "🚁" } - }, - a: "Male Mechanic", - b: "1F468-200D-1F527", - k: [ - 15, - 50 ], - o: 4 + version: 1 }, suspension_railway: { - a: "Suspension Railway", - b: "1F69F", - j: [ + id: "suspension_railway", + name: "Suspension Railway", + keywords: [ "vehicle", "transportation" ], - k: [ - 34, - 30 - ], - o: 2 - }, - heavy_heart_exclamation_mark_ornament: { - a: "Heavy Heart Exclamation Mark Ornament", - b: "2763-FE0F", - c: "2763", - k: [ - 55, - 27 - ], - o: 2 - }, - "female-mechanic": { - skin_variations: { - "1F3FB": { - unified: "1F469-1F3FB-200D-1F527", - non_qualified: null, - image: "1f469-1f3fb-200d-1f527.png", - sheet_x: 18, - sheet_y: 36, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FC": { - unified: "1F469-1F3FC-200D-1F527", - non_qualified: null, - image: "1f469-1f3fc-200d-1f527.png", - sheet_x: 18, - sheet_y: 37, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FD": { - unified: "1F469-1F3FD-200D-1F527", - non_qualified: null, - image: "1f469-1f3fd-200d-1f527.png", - sheet_x: 18, - sheet_y: 38, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FE": { - unified: "1F469-1F3FE-200D-1F527", - non_qualified: null, - image: "1f469-1f3fe-200d-1f527.png", - sheet_x: 18, - sheet_y: 39, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true - }, - "1F3FF": { - unified: "1F469-1F3FF-200D-1F527", - non_qualified: null, - image: "1f469-1f3ff-200d-1f527.png", - sheet_x: 18, - sheet_y: 40, - added_in: "4.0", - has_img_apple: true, - has_img_google: true, - has_img_twitter: true, - has_img_facebook: true + skins: [ + { + unified: "1f69f", + native: "🚟" } - }, - a: "Female Mechanic", - b: "1F469-200D-1F527", - k: [ - 18, - 35 ], - o: 4 - }, - "flag-jm": { - a: "Jamaica Flag", - b: "1F1EF-1F1F2", - k: [ - 2, - 34 - ], - o: 2 - }, - grey_question: { - a: "White Question Mark Ornament", - b: "2754", - j: [ - "doubts", - "gray", - "huh", - "confused" - ], - k: [ - 55, - 24 - ], - o: 2 - }, - maple_leaf: { - a: "Maple Leaf", - b: "1F341", - j: [ - "nature", - "plant", - "vegetable", - "ca", - "fall" - ], - k: [ - 6, - 25 - ], - o: 2 - }, - pound: { - a: "Banknote with Pound Sign", - b: "1F4B7", - j: [ - "british", - "sterling", - "money", - "sales", - "bills", - "uk", - "england", - "currency" - ], - k: [ - 26, - 13 - ], - o: 2 - }, - money_with_wings: { - a: "Money with Wings", - b: "1F4B8", - j: [ - "dollar", - "bills", - "payment", - "sale" - ], - k: [ - 26, - 14 - ], - o: 2 - }, - "flag-jo": { - a: "Jordan Flag", - b: "1F1EF-1F1F4", - k: [ - 2, - 35 - ], - o: 2 - }, - fallen_leaf: { - a: "Fallen Leaf", - b: "1F342", - j: [ - "nature", - "plant", - "vegetable", - "leaves" - ], - k: [ - 6, - 26 - ], - o: 2 - }, - broken_heart: { - a: "Broken Heart", - b: "1F494", - j: [ - "sad", - "sorry", - "break", - "heart", - "heartbreak" - ], - k: [ - 25, - 30 - ], - l: [ - " 2 && (f1.children = arguments.length > 3 ? $fb96b826c0c5f37a$var$n.call(arguments, 2) : i1), "function" == typeof l3 && null != l3.defaultProps) for (o1 in l3.defaultProps) void 0 === f1[o1] && (f1[o1] = l3.defaultProps[o1]); + return $fb96b826c0c5f37a$var$y(l3, f1, t1, r1, null); +} + +function $fb96b826c0c5f37a$var$y(n3, i2, t2, r2, o2) { + var f2 = { + type: n3, + props: i2, + key: t2, + ref: r2, + __k: null, + __: null, + __b: 0, + __e: null, + __d: void 0, + __c: null, + __h: null, + constructor: void 0, + __v: null == o2 ? ++$fb96b826c0c5f37a$var$u : o2 + }; + return null == o2 && null != $fb96b826c0c5f37a$export$41c562ebe57d11e2.vnode && $fb96b826c0c5f37a$export$41c562ebe57d11e2.vnode(f2), f2; +} + +function $fb96b826c0c5f37a$export$7d1e3a5e95ceca43() { + return { + current: null + }; +} + +function $fb96b826c0c5f37a$export$ffb0004e005737fa(n4) { + return n4.children; +} + +function $fb96b826c0c5f37a$export$16fa2f45be04daa8(n5, l4) { + this.props = n5, this.context = l4; +} + +function $fb96b826c0c5f37a$var$k(n6, l5) { + if (null == l5) return n6.__ ? $fb96b826c0c5f37a$var$k(n6.__, n6.__.__k.indexOf(n6) + 1) : null; + + for (var u3; l5 < n6.__k.length; l5++) if (null != (u3 = n6.__k[l5]) && null != u3.__e) return u3.__e; + + return "function" == typeof n6.type ? $fb96b826c0c5f37a$var$k(n6) : null; +} + +function $fb96b826c0c5f37a$var$b(n7) { + var l6, u4; + + if (null != (n7 = n7.__) && null != n7.__c) { + for (n7.__e = n7.__c.base = null, l6 = 0; l6 < n7.__k.length; l6++) if (null != (u4 = n7.__k[l6]) && null != u4.__e) { + n7.__e = n7.__c.base = u4.__e; + break; + } + + return $fb96b826c0c5f37a$var$b(n7); + } +} + +function $fb96b826c0c5f37a$var$m(n8) { + (!n8.__d && (n8.__d = !0) && $fb96b826c0c5f37a$var$t.push(n8) && !$fb96b826c0c5f37a$var$g.__r++ || $fb96b826c0c5f37a$var$o !== $fb96b826c0c5f37a$export$41c562ebe57d11e2.debounceRendering) && (($fb96b826c0c5f37a$var$o = $fb96b826c0c5f37a$export$41c562ebe57d11e2.debounceRendering) || $fb96b826c0c5f37a$var$r)($fb96b826c0c5f37a$var$g); +} + +function $fb96b826c0c5f37a$var$g() { + for (var n9; $fb96b826c0c5f37a$var$g.__r = $fb96b826c0c5f37a$var$t.length;) n9 = $fb96b826c0c5f37a$var$t.sort(function (n10, l7) { + return n10.__v.__b - l7.__v.__b; + }), $fb96b826c0c5f37a$var$t = [], n9.some(function (n11) { + var l8, u5, i3, t3, r3, o3; + n11.__d && (r3 = (t3 = (l8 = n11).__v).__e, (o3 = l8.__P) && (u5 = [], (i3 = $fb96b826c0c5f37a$var$a({}, t3)).__v = t3.__v + 1, $fb96b826c0c5f37a$var$j(o3, t3, i3, l8.__n, void 0 !== o3.ownerSVGElement, null != t3.__h ? [r3] : null, u5, null == r3 ? $fb96b826c0c5f37a$var$k(t3) : r3, t3.__h), $fb96b826c0c5f37a$var$z(u5, t3), t3.__e != r3 && $fb96b826c0c5f37a$var$b(t3))); + }); +} + +function $fb96b826c0c5f37a$var$w(n12, l9, u6, i4, t4, r4, o4, f3, s1, a1) { + var h1, + v1, + p1, + _1, + b1, + m1, + g1, + w1 = i4 && i4.__k || $fb96b826c0c5f37a$var$c, + A1 = w1.length; + + for (u6.__k = [], h1 = 0; h1 < l9.length; h1++) if (null != (_1 = u6.__k[h1] = null == (_1 = l9[h1]) || "boolean" == typeof _1 ? null : "string" == typeof _1 || "number" == typeof _1 || "bigint" == typeof _1 ? $fb96b826c0c5f37a$var$y(null, _1, null, null, _1) : Array.isArray(_1) ? $fb96b826c0c5f37a$var$y($fb96b826c0c5f37a$export$ffb0004e005737fa, { + children: _1 + }, null, null, null) : _1.__b > 0 ? $fb96b826c0c5f37a$var$y(_1.type, _1.props, _1.key, null, _1.__v) : _1)) { + if (_1.__ = u6, _1.__b = u6.__b + 1, null === (p1 = w1[h1]) || p1 && _1.key == p1.key && _1.type === p1.type) w1[h1] = void 0;else for (v1 = 0; v1 < A1; v1++) { + if ((p1 = w1[v1]) && _1.key == p1.key && _1.type === p1.type) { + w1[v1] = void 0; + break; + } + + p1 = null; + } + $fb96b826c0c5f37a$var$j(n12, _1, p1 = p1 || $fb96b826c0c5f37a$var$e, t4, r4, o4, f3, s1, a1), b1 = _1.__e, (v1 = _1.ref) && p1.ref != v1 && (g1 || (g1 = []), p1.ref && g1.push(p1.ref, null, _1), g1.push(v1, _1.__c || b1, _1)), null != b1 ? (null == m1 && (m1 = b1), "function" == typeof _1.type && _1.__k === p1.__k ? _1.__d = s1 = $fb96b826c0c5f37a$var$x(_1, s1, n12) : s1 = $fb96b826c0c5f37a$var$P(n12, _1, p1, w1, b1, s1), "function" == typeof u6.type && (u6.__d = s1)) : s1 && p1.__e == s1 && s1.parentNode != n12 && (s1 = $fb96b826c0c5f37a$var$k(p1)); + } + + for (u6.__e = m1, h1 = A1; h1--;) null != w1[h1] && ("function" == typeof u6.type && null != w1[h1].__e && w1[h1].__e == u6.__d && (u6.__d = $fb96b826c0c5f37a$var$k(i4, h1 + 1)), $fb96b826c0c5f37a$var$N(w1[h1], w1[h1])); + + if (g1) for (h1 = 0; h1 < g1.length; h1++) $fb96b826c0c5f37a$var$M(g1[h1], g1[++h1], g1[++h1]); +} + +function $fb96b826c0c5f37a$var$x(n13, l10, u7) { + for (var i5, t5 = n13.__k, r5 = 0; t5 && r5 < t5.length; r5++) (i5 = t5[r5]) && (i5.__ = n13, l10 = "function" == typeof i5.type ? $fb96b826c0c5f37a$var$x(i5, l10, u7) : $fb96b826c0c5f37a$var$P(u7, i5, i5, t5, i5.__e, l10)); + + return l10; +} + +function $fb96b826c0c5f37a$export$47e4c5b300681277(n14, l11) { + return l11 = l11 || [], null == n14 || "boolean" == typeof n14 || (Array.isArray(n14) ? n14.some(function (n15) { + $fb96b826c0c5f37a$export$47e4c5b300681277(n15, l11); + }) : l11.push(n14)), l11; +} + +function $fb96b826c0c5f37a$var$P(n16, l12, u8, i6, t6, r6) { + var o5, f4, e1; + if (void 0 !== l12.__d) o5 = l12.__d, l12.__d = void 0;else if (null == u8 || t6 != r6 || null == t6.parentNode) n: if (null == r6 || r6.parentNode !== n16) n16.appendChild(t6), o5 = null;else { + for (f4 = r6, e1 = 0; (f4 = f4.nextSibling) && e1 < i6.length; e1 += 2) if (f4 == t6) break n; + + n16.insertBefore(t6, r6), o5 = r6; + } + return void 0 !== o5 ? o5 : t6.nextSibling; +} + +function $fb96b826c0c5f37a$var$C(n17, l13, u9, i7, t7) { + var r7; + + for (r7 in u9) "children" === r7 || "key" === r7 || r7 in l13 || $fb96b826c0c5f37a$var$H(n17, r7, null, u9[r7], i7); + + for (r7 in l13) t7 && "function" != typeof l13[r7] || "children" === r7 || "key" === r7 || "value" === r7 || "checked" === r7 || u9[r7] === l13[r7] || $fb96b826c0c5f37a$var$H(n17, r7, l13[r7], u9[r7], i7); +} + +function $fb96b826c0c5f37a$var$$(n18, l14, u10) { + "-" === l14[0] ? n18.setProperty(l14, u10) : n18[l14] = null == u10 ? "" : "number" != typeof u10 || $fb96b826c0c5f37a$var$s.test(l14) ? u10 : u10 + "px"; +} + +function $fb96b826c0c5f37a$var$H(n19, l15, u11, i8, t8) { + var r8; + + n: if ("style" === l15) { + if ("string" == typeof u11) n19.style.cssText = u11;else { + if ("string" == typeof i8 && (n19.style.cssText = i8 = ""), i8) for (l15 in i8) u11 && l15 in u11 || $fb96b826c0c5f37a$var$$(n19.style, l15, ""); + if (u11) for (l15 in u11) i8 && u11[l15] === i8[l15] || $fb96b826c0c5f37a$var$$(n19.style, l15, u11[l15]); + } + } else if ("o" === l15[0] && "n" === l15[1]) r8 = l15 !== (l15 = l15.replace(/Capture$/, "")), l15 = l15.toLowerCase() in n19 ? l15.toLowerCase().slice(2) : l15.slice(2), n19.l || (n19.l = {}), n19.l[l15 + r8] = u11, u11 ? i8 || n19.addEventListener(l15, r8 ? $fb96b826c0c5f37a$var$T : $fb96b826c0c5f37a$var$I, r8) : n19.removeEventListener(l15, r8 ? $fb96b826c0c5f37a$var$T : $fb96b826c0c5f37a$var$I, r8);else if ("dangerouslySetInnerHTML" !== l15) { + if (t8) l15 = l15.replace(/xlink[H:h]/, "h").replace(/sName$/, "s");else if ("href" !== l15 && "list" !== l15 && "form" !== l15 && "tabIndex" !== l15 && "download" !== l15 && l15 in n19) try { + n19[l15] = null == u11 ? "" : u11; + break n; + } catch (n) {} + "function" == typeof u11 || (null != u11 && (!1 !== u11 || "a" === l15[0] && "r" === l15[1]) ? n19.setAttribute(l15, u11) : n19.removeAttribute(l15)); + } +} + +function $fb96b826c0c5f37a$var$I(n20) { + this.l[n20.type + !1]($fb96b826c0c5f37a$export$41c562ebe57d11e2.event ? $fb96b826c0c5f37a$export$41c562ebe57d11e2.event(n20) : n20); +} + +function $fb96b826c0c5f37a$var$T(n21) { + this.l[n21.type + !0]($fb96b826c0c5f37a$export$41c562ebe57d11e2.event ? $fb96b826c0c5f37a$export$41c562ebe57d11e2.event(n21) : n21); +} + +function $fb96b826c0c5f37a$var$j(n22, u12, i9, t9, r9, o6, f5, e2, c1) { + var s2, + h2, + v2, + y1, + p2, + k1, + b2, + m2, + g2, + x1, + A2, + P1 = u12.type; + if (void 0 !== u12.constructor) return null; + null != i9.__h && (c1 = i9.__h, e2 = u12.__e = i9.__e, u12.__h = null, o6 = [e2]), (s2 = $fb96b826c0c5f37a$export$41c562ebe57d11e2.__b) && s2(u12); + + try { + n: if ("function" == typeof P1) { + if (m2 = u12.props, g2 = (s2 = P1.contextType) && t9[s2.__c], x1 = s2 ? g2 ? g2.props.value : s2.__ : t9, i9.__c ? b2 = (h2 = u12.__c = i9.__c).__ = h2.__E : ("prototype" in P1 && P1.prototype.render ? u12.__c = h2 = new P1(m2, x1) : (u12.__c = h2 = new $fb96b826c0c5f37a$export$16fa2f45be04daa8(m2, x1), h2.constructor = P1, h2.render = $fb96b826c0c5f37a$var$O), g2 && g2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = x1, h2.__n = t9, v2 = h2.__d = !0, h2.__h = []), null == h2.__s && (h2.__s = h2.state), null != P1.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = $fb96b826c0c5f37a$var$a({}, h2.__s)), $fb96b826c0c5f37a$var$a(h2.__s, P1.getDerivedStateFromProps(m2, h2.__s))), y1 = h2.props, p2 = h2.state, v2) null == P1.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);else { + if (null == P1.getDerivedStateFromProps && m2 !== y1 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(m2, x1), !h2.__e && null != h2.shouldComponentUpdate && !1 === h2.shouldComponentUpdate(m2, h2.__s, x1) || u12.__v === i9.__v) { + h2.props = m2, h2.state = h2.__s, u12.__v !== i9.__v && (h2.__d = !1), h2.__v = u12, u12.__e = i9.__e, u12.__k = i9.__k, u12.__k.forEach(function (n23) { + n23 && (n23.__ = u12); + }), h2.__h.length && f5.push(h2); + break n; + } + + null != h2.componentWillUpdate && h2.componentWillUpdate(m2, h2.__s, x1), null != h2.componentDidUpdate && h2.__h.push(function () { + h2.componentDidUpdate(y1, p2, k1); + }); + } + h2.context = x1, h2.props = m2, h2.state = h2.__s, (s2 = $fb96b826c0c5f37a$export$41c562ebe57d11e2.__r) && s2(u12), h2.__d = !1, h2.__v = u12, h2.__P = n22, s2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s, null != h2.getChildContext && (t9 = $fb96b826c0c5f37a$var$a($fb96b826c0c5f37a$var$a({}, t9), h2.getChildContext())), v2 || null == h2.getSnapshotBeforeUpdate || (k1 = h2.getSnapshotBeforeUpdate(y1, p2)), A2 = null != s2 && s2.type === $fb96b826c0c5f37a$export$ffb0004e005737fa && null == s2.key ? s2.props.children : s2, $fb96b826c0c5f37a$var$w(n22, Array.isArray(A2) ? A2 : [A2], u12, i9, t9, r9, o6, f5, e2, c1), h2.base = u12.__e, u12.__h = null, h2.__h.length && f5.push(h2), b2 && (h2.__E = h2.__ = null), h2.__e = !1; + } else null == o6 && u12.__v === i9.__v ? (u12.__k = i9.__k, u12.__e = i9.__e) : u12.__e = $fb96b826c0c5f37a$var$L(i9.__e, u12, i9, t9, r9, o6, f5, c1); + + (s2 = $fb96b826c0c5f37a$export$41c562ebe57d11e2.diffed) && s2(u12); + } catch (n24) { + u12.__v = null, (c1 || null != o6) && (u12.__e = e2, u12.__h = !!c1, o6[o6.indexOf(e2)] = null), $fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n24, u12, i9); + } +} + +function $fb96b826c0c5f37a$var$z(n25, u13) { + $fb96b826c0c5f37a$export$41c562ebe57d11e2.__c && $fb96b826c0c5f37a$export$41c562ebe57d11e2.__c(u13, n25), n25.some(function (u14) { + try { + n25 = u14.__h, u14.__h = [], n25.some(function (n26) { + n26.call(u14); + }); + } catch (n27) { + $fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n27, u14.__v); + } + }); +} + +function $fb96b826c0c5f37a$var$L(l16, u15, i10, t10, r10, o7, f6, c2) { + var s3, + a2, + v3, + y2 = i10.props, + p3 = u15.props, + d1 = u15.type, + _2 = 0; + + if ("svg" === d1 && (r10 = !0), null != o7) { + for (; _2 < o7.length; _2++) if ((s3 = o7[_2]) && "setAttribute" in s3 == !!d1 && (d1 ? s3.localName === d1 : 3 === s3.nodeType)) { + l16 = s3, o7[_2] = null; + break; + } + } + + if (null == l16) { + if (null === d1) return document.createTextNode(p3); + l16 = r10 ? document.createElementNS("http://www.w3.org/2000/svg", d1) : document.createElement(d1, p3.is && p3), o7 = null, c2 = !1; + } + + if (null === d1) y2 === p3 || c2 && l16.data === p3 || (l16.data = p3);else { + if (o7 = o7 && $fb96b826c0c5f37a$var$n.call(l16.childNodes), a2 = (y2 = i10.props || $fb96b826c0c5f37a$var$e).dangerouslySetInnerHTML, v3 = p3.dangerouslySetInnerHTML, !c2) { + if (null != o7) for (y2 = {}, _2 = 0; _2 < l16.attributes.length; _2++) y2[l16.attributes[_2].name] = l16.attributes[_2].value; + (v3 || a2) && (v3 && (a2 && v3.__html == a2.__html || v3.__html === l16.innerHTML) || (l16.innerHTML = v3 && v3.__html || "")); + } + + if ($fb96b826c0c5f37a$var$C(l16, p3, y2, r10, c2), v3) u15.__k = [];else if (_2 = u15.props.children, $fb96b826c0c5f37a$var$w(l16, Array.isArray(_2) ? _2 : [_2], u15, i10, t10, r10 && "foreignObject" !== d1, o7, f6, o7 ? o7[0] : i10.__k && $fb96b826c0c5f37a$var$k(i10, 0), c2), null != o7) for (_2 = o7.length; _2--;) null != o7[_2] && $fb96b826c0c5f37a$var$h(o7[_2]); + c2 || ("value" in p3 && void 0 !== (_2 = p3.value) && (_2 !== y2.value || _2 !== l16.value || "progress" === d1 && !_2) && $fb96b826c0c5f37a$var$H(l16, "value", _2, y2.value, !1), "checked" in p3 && void 0 !== (_2 = p3.checked) && _2 !== l16.checked && $fb96b826c0c5f37a$var$H(l16, "checked", _2, y2.checked, !1)); + } + return l16; +} + +function $fb96b826c0c5f37a$var$M(n28, u16, i11) { + try { + "function" == typeof n28 ? n28(u16) : n28.current = u16; + } catch (n29) { + $fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n29, i11); + } +} + +function $fb96b826c0c5f37a$var$N(n30, u17, i12) { + var t11, r11; + + if ($fb96b826c0c5f37a$export$41c562ebe57d11e2.unmount && $fb96b826c0c5f37a$export$41c562ebe57d11e2.unmount(n30), (t11 = n30.ref) && (t11.current && t11.current !== n30.__e || $fb96b826c0c5f37a$var$M(t11, null, u17)), null != (t11 = n30.__c)) { + if (t11.componentWillUnmount) try { + t11.componentWillUnmount(); + } catch (n31) { + $fb96b826c0c5f37a$export$41c562ebe57d11e2.__e(n31, u17); + } + t11.base = t11.__P = null; + } + + if (t11 = n30.__k) for (r11 = 0; r11 < t11.length; r11++) t11[r11] && $fb96b826c0c5f37a$var$N(t11[r11], u17, "function" != typeof n30.type); + i12 || null == n30.__e || $fb96b826c0c5f37a$var$h(n30.__e), n30.__e = n30.__d = void 0; +} + +function $fb96b826c0c5f37a$var$O(n32, l, u18) { + return this.constructor(n32, u18); +} + +function $fb96b826c0c5f37a$export$b3890eb0ae9dca99(u19, i13, t12) { + var r12, o8, f7; + $fb96b826c0c5f37a$export$41c562ebe57d11e2.__ && $fb96b826c0c5f37a$export$41c562ebe57d11e2.__(u19, i13), o8 = (r12 = "function" == typeof t12) ? null : t12 && t12.__k || i13.__k, f7 = [], $fb96b826c0c5f37a$var$j(i13, u19 = (!r12 && t12 || i13).__k = $fb96b826c0c5f37a$export$c8a8987d4410bf2d($fb96b826c0c5f37a$export$ffb0004e005737fa, null, [u19]), o8 || $fb96b826c0c5f37a$var$e, $fb96b826c0c5f37a$var$e, void 0 !== i13.ownerSVGElement, !r12 && t12 ? [t12] : o8 ? null : i13.firstChild ? $fb96b826c0c5f37a$var$n.call(i13.childNodes) : null, f7, !r12 && t12 ? t12 : o8 ? o8.__e : i13.firstChild, r12), $fb96b826c0c5f37a$var$z(f7, u19); +} + +$fb96b826c0c5f37a$var$n = $fb96b826c0c5f37a$var$c.slice, $fb96b826c0c5f37a$export$41c562ebe57d11e2 = { + __e: function (n39, l22) { + for (var u23, i16, t14; l22 = l22.__;) if ((u23 = l22.__c) && !u23.__) try { + if ((i16 = u23.constructor) && null != i16.getDerivedStateFromError && (u23.setState(i16.getDerivedStateFromError(n39)), t14 = u23.__d), null != u23.componentDidCatch && (u23.componentDidCatch(n39), t14 = u23.__d), t14) return u23.__E = u23; + } catch (l23) { + n39 = l23; + } + + throw n39; + } +}, $fb96b826c0c5f37a$var$u = 0, $fb96b826c0c5f37a$export$16fa2f45be04daa8.prototype.setState = function (n41, l24) { + var u24; + u24 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = $fb96b826c0c5f37a$var$a({}, this.state), "function" == typeof n41 && (n41 = n41($fb96b826c0c5f37a$var$a({}, u24), this.props)), n41 && $fb96b826c0c5f37a$var$a(u24, n41), null != n41 && this.__v && (l24 && this.__h.push(l24), $fb96b826c0c5f37a$var$m(this)); +}, $fb96b826c0c5f37a$export$16fa2f45be04daa8.prototype.forceUpdate = function (n42) { + this.__v && (this.__e = !0, n42 && this.__h.push(n42), $fb96b826c0c5f37a$var$m(this)); +}, $fb96b826c0c5f37a$export$16fa2f45be04daa8.prototype.render = $fb96b826c0c5f37a$export$ffb0004e005737fa, $fb96b826c0c5f37a$var$t = [], $fb96b826c0c5f37a$var$r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, $fb96b826c0c5f37a$var$g.__r = 0, 0; +var $bd9dd35321b03dd4$var$o = 0; + +function $bd9dd35321b03dd4$export$34b9dba7ce09269b(_1, e1, n, t, f) { + var l, + s, + u = {}; + + for (s in e1) "ref" == s ? l = e1[s] : u[s] = e1[s]; + + var a = { + type: _1, + props: u, + key: n, + ref: l, + __k: null, + __: null, + __b: 0, + __e: null, + __d: void 0, + __c: null, + __h: null, + constructor: void 0, + __v: --$bd9dd35321b03dd4$var$o, + __source: t, + __self: f + }; + if ("function" == typeof _1 && (l = _1.defaultProps)) for (s in l) void 0 === u[s] && (u[s] = l[s]); + return ($fb96b826c0c5f37a$export$41c562ebe57d11e2).vnode && ($fb96b826c0c5f37a$export$41c562ebe57d11e2).vnode(a), a; +} + +function $f72b75cf796873c7$var$set(key, value) { + try { + window.localStorage[`emoji-mart.${key}`] = JSON.stringify(value); + } catch (error) {} +} + +function $f72b75cf796873c7$var$get(key) { + try { + const value = window.localStorage[`emoji-mart.${key}`]; + if (value) return JSON.parse(value); + } catch (error) {} +} + +var $f72b75cf796873c7$export$2e2bcd8739ae039 = { + set: $f72b75cf796873c7$var$set, + get: $f72b75cf796873c7$var$get +}; +const $c84d045dcc34faf5$var$CACHE = new Map(); +const $c84d045dcc34faf5$var$VERSIONS = [{ + v: 15, + emoji: "\uD83E\uDEE8" +}, { + v: 14, + emoji: "\uD83E\uDEE0" +}, { + v: 13.1, + emoji: "\uD83D\uDE36\u200D\uD83C\uDF2B\uFE0F" +}, { + v: 13, + emoji: "\uD83E\uDD78" +}, { + v: 12.1, + emoji: "\uD83E\uDDD1\u200D\uD83E\uDDB0" +}, { + v: 12, + emoji: "\uD83E\uDD71" +}, { + v: 11, + emoji: "\uD83E\uDD70" +}, { + v: 5, + emoji: "\uD83E\uDD29" +}, { + v: 4, + emoji: "\uD83D\uDC71\u200D\u2640\uFE0F" +}, { + v: 3, + emoji: "\uD83E\uDD23" +}, { + v: 2, + emoji: "\uD83D\uDC4B\uD83C\uDFFB" +}, { + v: 1, + emoji: "\uD83D\uDE43" +}]; + +function $c84d045dcc34faf5$var$latestVersion() { + for (const { + v: v, + emoji: emoji + } of $c84d045dcc34faf5$var$VERSIONS) { + if ($c84d045dcc34faf5$var$isSupported(emoji)) return v; + } +} + +function $c84d045dcc34faf5$var$noCountryFlags() { + if ($c84d045dcc34faf5$var$isSupported("\uD83C\uDDE8\uD83C\uDDE6")) return false; + return true; +} + +function $c84d045dcc34faf5$var$isSupported(emoji) { + if ($c84d045dcc34faf5$var$CACHE.has(emoji)) return $c84d045dcc34faf5$var$CACHE.get(emoji); + const supported = $c84d045dcc34faf5$var$isEmojiSupported(emoji); + $c84d045dcc34faf5$var$CACHE.set(emoji, supported); + return supported; +} // https://github.com/koala-interactive/is-emoji-supported + + +const $c84d045dcc34faf5$var$isEmojiSupported = (() => { + let ctx = null; + + try { + if (!navigator.userAgent.includes("jsdom")) ctx = document.createElement("canvas").getContext("2d", { + willReadFrequently: true + }); + } catch {} // Not in browser env + + + if (!ctx) return () => false; + const CANVAS_HEIGHT = 25; + const CANVAS_WIDTH = 20; + const textSize = Math.floor(CANVAS_HEIGHT / 2); // Initialize convas context + + ctx.font = textSize + "px Arial, Sans-Serif"; + ctx.textBaseline = "top"; + ctx.canvas.width = CANVAS_WIDTH * 2; + ctx.canvas.height = CANVAS_HEIGHT; + return unicode => { + ctx.clearRect(0, 0, CANVAS_WIDTH * 2, CANVAS_HEIGHT); // Draw in red on the left + + ctx.fillStyle = "#FF0000"; + ctx.fillText(unicode, 0, 22); // Draw in blue on right + + ctx.fillStyle = "#0000FF"; + ctx.fillText(unicode, CANVAS_WIDTH, 22); + const a = ctx.getImageData(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT).data; + const count = a.length; + let i = 0; // Search the first visible pixel + + for (; i < count && !a[i + 3]; i += 4); // No visible pixel + + + if (i >= count) return false; // Emoji has immutable color, so we check the color of the emoji in two different colors + // the result show be the same. + + const x = CANVAS_WIDTH + i / 4 % CANVAS_WIDTH; + const y = Math.floor(i / 4 / CANVAS_WIDTH); + const b = ctx.getImageData(x, y, 1, 1).data; + if (a[i] !== b[0] || a[i + 2] !== b[2]) return false; // Some emojis are a contraction of different ones, so if it's not + // supported, it will show multiple characters + + if (ctx.measureText(unicode).width >= CANVAS_WIDTH) return false; // Supported + + return true; + }; +})(); + +var $c84d045dcc34faf5$export$2e2bcd8739ae039 = { + latestVersion: $c84d045dcc34faf5$var$latestVersion, + noCountryFlags: $c84d045dcc34faf5$var$noCountryFlags +}; +const $b22cfd0a55410b4f$var$DEFAULTS = ["+1", "grinning", "kissing_heart", "heart_eyes", "laughing", "stuck_out_tongue_winking_eye", "sweat_smile", "joy", "scream", "disappointed", "unamused", "weary", "sob", "sunglasses", "heart"]; +let $b22cfd0a55410b4f$var$Index = null; + +function $b22cfd0a55410b4f$var$add(emoji) { + $b22cfd0a55410b4f$var$Index || ($b22cfd0a55410b4f$var$Index = ($f72b75cf796873c7$export$2e2bcd8739ae039).get("frequently") || {}); + const emojiId = emoji.id || emoji; + if (!emojiId) return; + $b22cfd0a55410b4f$var$Index[emojiId] || ($b22cfd0a55410b4f$var$Index[emojiId] = 0); + $b22cfd0a55410b4f$var$Index[emojiId] += 1; + ($f72b75cf796873c7$export$2e2bcd8739ae039).set("last", emojiId); + ($f72b75cf796873c7$export$2e2bcd8739ae039).set("frequently", $b22cfd0a55410b4f$var$Index); +} + +function $b22cfd0a55410b4f$var$get({ + maxFrequentRows: maxFrequentRows, + perLine: perLine +}) { + if (!maxFrequentRows) return []; + $b22cfd0a55410b4f$var$Index || ($b22cfd0a55410b4f$var$Index = ($f72b75cf796873c7$export$2e2bcd8739ae039).get("frequently")); + let emojiIds = []; + + if (!$b22cfd0a55410b4f$var$Index) { + $b22cfd0a55410b4f$var$Index = {}; + + for (let i in $b22cfd0a55410b4f$var$DEFAULTS.slice(0, perLine)) { + const emojiId = $b22cfd0a55410b4f$var$DEFAULTS[i]; + $b22cfd0a55410b4f$var$Index[emojiId] = perLine - i; + emojiIds.push(emojiId); + } + + return emojiIds; + } + + const max = maxFrequentRows * perLine; + const last = ($f72b75cf796873c7$export$2e2bcd8739ae039).get("last"); + + for (let emojiId in $b22cfd0a55410b4f$var$Index) emojiIds.push(emojiId); + + emojiIds.sort((a, b) => { + const aScore = $b22cfd0a55410b4f$var$Index[b]; + const bScore = $b22cfd0a55410b4f$var$Index[a]; + if (aScore == bScore) return a.localeCompare(b); + return aScore - bScore; + }); + + if (emojiIds.length > max) { + const removedIds = emojiIds.slice(max); + emojiIds = emojiIds.slice(0, max); + + for (let removedId of removedIds) { + if (removedId == last) continue; + delete $b22cfd0a55410b4f$var$Index[removedId]; + } + + if (last && emojiIds.indexOf(last) == -1) { + delete $b22cfd0a55410b4f$var$Index[emojiIds[emojiIds.length - 1]]; + emojiIds.splice(-1, 1, last); + } + + ($f72b75cf796873c7$export$2e2bcd8739ae039).set("frequently", $b22cfd0a55410b4f$var$Index); + } + + return emojiIds; +} + +var $b22cfd0a55410b4f$export$2e2bcd8739ae039 = { + add: $b22cfd0a55410b4f$var$add, + get: $b22cfd0a55410b4f$var$get, + DEFAULTS: $b22cfd0a55410b4f$var$DEFAULTS +}; +var $8d50d93417ef682a$exports = {}; +$8d50d93417ef682a$exports = JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn\u2019t be found","pick":"Pick an emoji\u2026","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}'); +var $b247ea80b67298d5$export$2e2bcd8739ae039 = { + autoFocus: { + value: false + }, + dynamicWidth: { + value: false + }, + emojiButtonColors: { + value: null + }, + emojiButtonRadius: { + value: "100%" + }, + emojiButtonSize: { + value: 36 + }, + emojiSize: { + value: 24 + }, + emojiVersion: { + value: 15, + choices: [1, 2, 3, 4, 5, 11, 12, 12.1, 13, 13.1, 14, 15] + }, + exceptEmojis: { + value: [] + }, + icons: { + value: "auto", + choices: ["auto", "outline", "solid"] + }, + locale: { + value: "en", + choices: ["en", "ar", "be", "cs", "de", "es", "fa", "fi", "fr", "hi", "it", "ja", "ko", "nl", "pl", "pt", "ru", "sa", "tr", "uk", "vi", "zh"] + }, + maxFrequentRows: { + value: 4 + }, + navPosition: { + value: "top", + choices: ["top", "bottom", "none"] + }, + noCountryFlags: { + value: false + }, + noResultsEmoji: { + value: null + }, + perLine: { + value: 9 + }, + previewEmoji: { + value: null + }, + previewPosition: { + value: "bottom", + choices: ["top", "bottom", "none"] + }, + searchPosition: { + value: "sticky", + choices: ["sticky", "static", "none"] + }, + set: { + value: "native", + choices: ["native", "apple", "facebook", "google", "twitter"] + }, + skin: { + value: 1, + choices: [1, 2, 3, 4, 5, 6] + }, + skinTonePosition: { + value: "preview", + choices: ["preview", "search", "none"] + }, + theme: { + value: "auto", + choices: ["auto", "light", "dark"] + }, + // Data + categories: null, + categoryIcons: null, + custom: null, + data: null, + i18n: null, + // Callbacks + getImageURL: null, + getSpritesheetURL: null, + onAddCustomEmoji: null, + onClickOutside: null, + onEmojiSelect: null, + // Deprecated + stickySearch: { + deprecated: true, + value: true + } +}; +let $7adb23b0109cc36a$export$dbe3113d60765c1a = null; +let $7adb23b0109cc36a$export$2d0294657ab35f1b = null; +const $7adb23b0109cc36a$var$fetchCache = {}; + +async function $7adb23b0109cc36a$var$fetchJSON(src) { + if ($7adb23b0109cc36a$var$fetchCache[src]) return $7adb23b0109cc36a$var$fetchCache[src]; + const response = await fetch(src); + const json = await response.json(); + $7adb23b0109cc36a$var$fetchCache[src] = json; + return json; +} + +let $7adb23b0109cc36a$var$promise = null; +let $7adb23b0109cc36a$var$initCallback = null; +let $7adb23b0109cc36a$var$initialized = false; + +function $7adb23b0109cc36a$export$2cd8252107eb640b(options, { + caller: caller +} = {}) { + $7adb23b0109cc36a$var$promise || ($7adb23b0109cc36a$var$promise = new Promise(resolve => { + $7adb23b0109cc36a$var$initCallback = resolve; + })); + if (options) $7adb23b0109cc36a$var$_init(options);else if (caller && !$7adb23b0109cc36a$var$initialized) console.warn(`\`${caller}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`); + return $7adb23b0109cc36a$var$promise; +} + +async function $7adb23b0109cc36a$var$_init(props) { + $7adb23b0109cc36a$var$initialized = true; + let { + emojiVersion: emojiVersion, + set: set, + locale: locale + } = props; + emojiVersion || (emojiVersion = ($b247ea80b67298d5$export$2e2bcd8739ae039).emojiVersion.value); + set || (set = ($b247ea80b67298d5$export$2e2bcd8739ae039).set.value); + locale || (locale = ($b247ea80b67298d5$export$2e2bcd8739ae039).locale.value); + + if (!$7adb23b0109cc36a$export$2d0294657ab35f1b) { + $7adb23b0109cc36a$export$2d0294657ab35f1b = (typeof props.data === "function" ? await props.data() : props.data) || (await $7adb23b0109cc36a$var$fetchJSON(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${emojiVersion}/${set}.json`)); + $7adb23b0109cc36a$export$2d0294657ab35f1b.emoticons = {}; + $7adb23b0109cc36a$export$2d0294657ab35f1b.natives = {}; + $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.unshift({ + id: "frequent", + emojis: [] + }); + + for (const alias in $7adb23b0109cc36a$export$2d0294657ab35f1b.aliases) { + const emojiId = $7adb23b0109cc36a$export$2d0294657ab35f1b.aliases[alias]; + const emoji = $7adb23b0109cc36a$export$2d0294657ab35f1b.emojis[emojiId]; + if (!emoji) continue; + emoji.aliases || (emoji.aliases = []); + emoji.aliases.push(alias); + } + + $7adb23b0109cc36a$export$2d0294657ab35f1b.originalCategories = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories; + } else $7adb23b0109cc36a$export$2d0294657ab35f1b.categories = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.filter(c => { + const isCustom = !!c.name; + if (!isCustom) return true; + return false; + }); + + $7adb23b0109cc36a$export$dbe3113d60765c1a = (typeof props.i18n === "function" ? await props.i18n() : props.i18n) || (locale == "en" ? (/*@__PURE__*/$parcel$interopDefault($8d50d93417ef682a$exports)) : await $7adb23b0109cc36a$var$fetchJSON(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${locale}.json`)); + if (props.custom) for (let i in props.custom) { + i = parseInt(i); + const category = props.custom[i]; + const prevCategory = props.custom[i - 1]; + if (!category.emojis || !category.emojis.length) continue; + category.id || (category.id = `custom_${i + 1}`); + category.name || (category.name = $7adb23b0109cc36a$export$dbe3113d60765c1a.categories.custom); + if (prevCategory && !category.icon) category.target = prevCategory.target || prevCategory; + $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.push(category); + + for (const emoji of category.emojis) $7adb23b0109cc36a$export$2d0294657ab35f1b.emojis[emoji.id] = emoji; + } + if (props.categories) $7adb23b0109cc36a$export$2d0294657ab35f1b.categories = $7adb23b0109cc36a$export$2d0294657ab35f1b.originalCategories.filter(c => { + return props.categories.indexOf(c.id) != -1; + }).sort((c1, c2) => { + const i1 = props.categories.indexOf(c1.id); + const i2 = props.categories.indexOf(c2.id); + return i1 - i2; + }); + let latestVersionSupport = null; + let noCountryFlags = null; + + if (set == "native") { + latestVersionSupport = ($c84d045dcc34faf5$export$2e2bcd8739ae039).latestVersion(); + noCountryFlags = props.noCountryFlags || ($c84d045dcc34faf5$export$2e2bcd8739ae039).noCountryFlags(); + } + + let categoryIndex = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.length; + let resetSearchIndex = false; + + while (categoryIndex--) { + const category = $7adb23b0109cc36a$export$2d0294657ab35f1b.categories[categoryIndex]; + + if (category.id == "frequent") { + let { + maxFrequentRows: maxFrequentRows, + perLine: perLine + } = props; + maxFrequentRows = maxFrequentRows >= 0 ? maxFrequentRows : ($b247ea80b67298d5$export$2e2bcd8739ae039).maxFrequentRows.value; + perLine || (perLine = ($b247ea80b67298d5$export$2e2bcd8739ae039).perLine.value); + category.emojis = ($b22cfd0a55410b4f$export$2e2bcd8739ae039).get({ + maxFrequentRows: maxFrequentRows, + perLine: perLine + }); + } + + if (!category.emojis || !category.emojis.length) { + $7adb23b0109cc36a$export$2d0294657ab35f1b.categories.splice(categoryIndex, 1); + continue; + } + + const { + categoryIcons: categoryIcons + } = props; + + if (categoryIcons) { + const icon = categoryIcons[category.id]; + if (icon && !category.icon) category.icon = icon; + } + + let emojiIndex = category.emojis.length; + + while (emojiIndex--) { + const emojiId = category.emojis[emojiIndex]; + const emoji = emojiId.id ? emojiId : $7adb23b0109cc36a$export$2d0294657ab35f1b.emojis[emojiId]; + + const ignore = () => { + category.emojis.splice(emojiIndex, 1); + }; + + if (!emoji || props.exceptEmojis && props.exceptEmojis.includes(emoji.id)) { + ignore(); + continue; + } + + if (latestVersionSupport && emoji.version > latestVersionSupport) { + ignore(); + continue; + } + + if (noCountryFlags && category.id == "flags") { + if (!($e6eae5155b87f591$export$bcb25aa587e9cb13).includes(emoji.id)) { + ignore(); + continue; + } + } + + if (!emoji.search) { + resetSearchIndex = true; + emoji.search = "," + [[emoji.id, false], [emoji.name, true], [emoji.keywords, false], [emoji.emoticons, false]].map(([strings, split]) => { + if (!strings) return; + return (Array.isArray(strings) ? strings : [strings]).map(string => { + return (split ? string.split(/[-|_|\s]+/) : [string]).map(s => s.toLowerCase()); + }).flat(); + }).flat().filter(a => a && a.trim()).join(","); + if (emoji.emoticons) for (const emoticon of emoji.emoticons) { + if ($7adb23b0109cc36a$export$2d0294657ab35f1b.emoticons[emoticon]) continue; + $7adb23b0109cc36a$export$2d0294657ab35f1b.emoticons[emoticon] = emoji.id; + } + let skinIndex = 0; + + for (const skin of emoji.skins) { + if (!skin) continue; + skinIndex++; + const { + native: native + } = skin; + + if (native) { + $7adb23b0109cc36a$export$2d0294657ab35f1b.natives[native] = emoji.id; + emoji.search += `,${native}`; + } + + const skinShortcodes = skinIndex == 1 ? "" : `:skin-tone-${skinIndex}:`; + skin.shortcodes = `:${emoji.id}:${skinShortcodes}`; + } + } + } + } + + if (resetSearchIndex) ($c4d155af13ad4d4b$export$2e2bcd8739ae039).reset(); + $7adb23b0109cc36a$var$initCallback(); +} + +function $7adb23b0109cc36a$export$75fe5f91d452f94b(props, defaultProps, element) { + props || (props = {}); + const _props = {}; + + for (let k in defaultProps) _props[k] = $7adb23b0109cc36a$export$88c9ddb45cea7241(k, props, defaultProps, element); + + return _props; +} + +function $7adb23b0109cc36a$export$88c9ddb45cea7241(propName, props, defaultProps, element) { + const defaults = defaultProps[propName]; + let value = element && element.getAttribute(propName) || (props[propName] != null && props[propName] != undefined ? props[propName] : null); + if (!defaults) return value; + + if (value != null && defaults.value && typeof defaults.value != typeof value) { + if (typeof defaults.value == "boolean") value = value == "false" ? false : true;else value = defaults.value.constructor(value); + } + + if (defaults.transform && value) value = defaults.transform(value); + if (value == null || defaults.choices && defaults.choices.indexOf(value) == -1) value = defaults.value; + return value; +} + +const $c4d155af13ad4d4b$var$SHORTCODES_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/; +let $c4d155af13ad4d4b$var$Pool = null; + +function $c4d155af13ad4d4b$var$get(emojiId) { + if (emojiId.id) return emojiId; + return ($7adb23b0109cc36a$export$2d0294657ab35f1b).emojis[emojiId] || ($7adb23b0109cc36a$export$2d0294657ab35f1b).emojis[($7adb23b0109cc36a$export$2d0294657ab35f1b).aliases[emojiId]] || ($7adb23b0109cc36a$export$2d0294657ab35f1b).emojis[($7adb23b0109cc36a$export$2d0294657ab35f1b).natives[emojiId]]; +} + +function $c4d155af13ad4d4b$var$reset() { + $c4d155af13ad4d4b$var$Pool = null; +} + +async function $c4d155af13ad4d4b$var$search(value, { + maxResults: maxResults, + caller: caller +} = {}) { + if (!value || !value.trim().length) return null; + maxResults || (maxResults = 90); + await ($7adb23b0109cc36a$export$2cd8252107eb640b)(null, { + caller: caller || "SearchIndex.search" + }); + const values = value.toLowerCase().replace(/(\w)-/, "$1 ").split(/[\s|,]+/).filter((word, i, words) => { + return word.trim() && words.indexOf(word) == i; + }); + if (!values.length) return; + let pool = $c4d155af13ad4d4b$var$Pool || ($c4d155af13ad4d4b$var$Pool = Object.values(($7adb23b0109cc36a$export$2d0294657ab35f1b).emojis)); + let results, scores; + + for (const value1 of values) { + if (!pool.length) break; + results = []; + scores = {}; + + for (const emoji of pool) { + if (!emoji.search) continue; + const score = emoji.search.indexOf(`,${value1}`); + if (score == -1) continue; + results.push(emoji); + scores[emoji.id] || (scores[emoji.id] = 0); + scores[emoji.id] += emoji.id == value1 ? 0 : score + 1; + } + + pool = results; + } + + if (results.length < 2) return results; + results.sort((a, b) => { + const aScore = scores[a.id]; + const bScore = scores[b.id]; + if (aScore == bScore) return a.id.localeCompare(b.id); + return aScore - bScore; + }); + if (results.length > maxResults) results = results.slice(0, maxResults); + return results; +} + +var $c4d155af13ad4d4b$export$2e2bcd8739ae039 = { + search: $c4d155af13ad4d4b$var$search, + get: $c4d155af13ad4d4b$var$get, + reset: $c4d155af13ad4d4b$var$reset, + SHORTCODES_REGEX: $c4d155af13ad4d4b$var$SHORTCODES_REGEX +}; +const $e6eae5155b87f591$export$bcb25aa587e9cb13 = ["checkered_flag", "crossed_flags", "pirate_flag", "rainbow-flag", "transgender_flag", "triangular_flag_on_post", "waving_black_flag", "waving_white_flag"]; + +function $693b183b0a78708f$export$9cb4719e2e525b7a(a, b) { + return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((val, index) => val == b[index]); +} + +async function $693b183b0a78708f$export$e772c8ff12451969(frames = 1) { + for (let _ in [...Array(frames).keys()]) await new Promise(requestAnimationFrame); +} + +function $693b183b0a78708f$export$d10ac59fbe52a745(emoji, { + skinIndex = 0 +} = {}) { + const skin = emoji.skins[skinIndex] || (() => { + skinIndex = 0; + return emoji.skins[skinIndex]; + })(); + + const emojiData = { + id: emoji.id, + name: emoji.name, + native: skin.native, + unified: skin.unified, + keywords: emoji.keywords, + shortcodes: skin.shortcodes || emoji.shortcodes + }; + if (emoji.skins.length > 1) emojiData.skin = skinIndex + 1; + if (skin.src) emojiData.src = skin.src; + if (emoji.aliases && emoji.aliases.length) emojiData.aliases = emoji.aliases; + if (emoji.emoticons && emoji.emoticons.length) emojiData.emoticons = emoji.emoticons; + return emojiData; +} + +const $fcccfb36ed0cde68$var$categories = { + activity: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113" + }) + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z" + }) + }) + }, + custom: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 448 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z" + }) + }), + flags: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z" + }) + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z" + }) + }) + }, + foods: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9" + }) + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z" + }) + }) + }, + frequent: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10" + })] + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z" + }) + }) + }, + nature: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235" + })] + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 576 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z" + }) + }) + }, + objects: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789" + })] + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 384 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z" + }) + }) + }, + people: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0" + })] + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z" + }) + }) + }, + places: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z" + })] + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z" + }) + }) + }, + symbols: { + outline: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76" + }) + }), + solid: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 512 512", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z" + }) + }) + } +}; +const $fcccfb36ed0cde68$var$search = { + loupe: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z" + }) + }), + delete: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("path", { + d: "M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z" + }) + }) +}; +var $fcccfb36ed0cde68$export$2e2bcd8739ae039 = { + categories: $fcccfb36ed0cde68$var$categories, + search: $fcccfb36ed0cde68$var$search +}; + +function $254755d3f438722f$export$2e2bcd8739ae039(props) { + let { + id: id, + skin: skin, + emoji: emoji + } = props; + + if (props.shortcodes) { + const matches = props.shortcodes.match(($c4d155af13ad4d4b$export$2e2bcd8739ae039).SHORTCODES_REGEX); + + if (matches) { + id = matches[1]; + if (matches[2]) skin = matches[2]; + } + } + + emoji || (emoji = ($c4d155af13ad4d4b$export$2e2bcd8739ae039).get(id || props.native)); + if (!emoji) return props.fallback; + const emojiSkin = emoji.skins[skin - 1] || emoji.skins[0]; + const imageSrc = emojiSkin.src || (props.set != "native" && !props.spritesheet ? typeof props.getImageURL === "function" ? props.getImageURL(props.set, emojiSkin.unified) : `https://cdn.jsdelivr.net/npm/emoji-datasource-${props.set}@15.0.1/img/${props.set}/64/${emojiSkin.unified}.png` : undefined); + const spritesheetSrc = typeof props.getSpritesheetURL === "function" ? props.getSpritesheetURL(props.set) : `https://cdn.jsdelivr.net/npm/emoji-datasource-${props.set}@15.0.1/img/${props.set}/sheets-256/64.png`; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + class: "emoji-mart-emoji", + "data-emoji-set": props.set, + children: imageSrc ? /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("img", { + style: { + maxWidth: props.size || "1em", + maxHeight: props.size || "1em", + display: "inline-block" + }, + alt: emojiSkin.native || emojiSkin.shortcodes, + src: imageSrc + }) : props.set == "native" ? /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + style: { + fontSize: props.size, + fontFamily: '"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"' + }, + children: emojiSkin.native + }) : /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + style: { + display: "block", + width: props.size, + height: props.size, + backgroundImage: `url(${spritesheetSrc})`, + backgroundSize: `${100 * ($7adb23b0109cc36a$export$2d0294657ab35f1b).sheet.cols}% ${100 * ($7adb23b0109cc36a$export$2d0294657ab35f1b).sheet.rows}%`, + backgroundPosition: `${100 / (($7adb23b0109cc36a$export$2d0294657ab35f1b).sheet.cols - 1) * emojiSkin.x}% ${100 / (($7adb23b0109cc36a$export$2d0294657ab35f1b).sheet.rows - 1) * emojiSkin.y}%` + } + }) + }); +} + +const $6f57cc9cd54c5aaa$var$WindowHTMLElement = typeof window !== "undefined" && window.HTMLElement ? window.HTMLElement : Object; + +class $6f57cc9cd54c5aaa$export$2e2bcd8739ae039 extends $6f57cc9cd54c5aaa$var$WindowHTMLElement { + static get observedAttributes() { + return Object.keys(this.Props); + } + + update(props = {}) { + for (let k in props) this.attributeChangedCallback(k, null, props[k]); + } + + attributeChangedCallback(attr, _, newValue) { + if (!this.component) return; + const value = ($7adb23b0109cc36a$export$88c9ddb45cea7241)(attr, { + [attr]: newValue + }, this.constructor.Props, this); + if (this.component.componentWillReceiveProps) this.component.componentWillReceiveProps({ + [attr]: value + });else { + this.component.props[attr] = value; + this.component.forceUpdate(); + } + } + + disconnectedCallback() { + this.disconnected = true; + if (this.component && this.component.unregister) this.component.unregister(); + } + + constructor(props = {}) { + super(); + this.props = props; + + if (props.parent || props.ref) { + let ref = null; + const parent = props.parent || (ref = props.ref && props.ref.current); + if (ref) ref.innerHTML = ""; + if (parent) parent.appendChild(this); + } + } + +} + +class $26f27c338a96b1a6$export$2e2bcd8739ae039 extends ($6f57cc9cd54c5aaa$export$2e2bcd8739ae039) { + setShadow() { + this.attachShadow({ + mode: "open" + }); + } + + injectStyles(styles) { + if (!styles) return; + const style = document.createElement("style"); + style.textContent = styles; + this.shadowRoot.insertBefore(style, this.shadowRoot.firstChild); + } + + constructor(props, { + styles: styles + } = {}) { + super(props); + this.setShadow(); + this.injectStyles(styles); + } + +} + +var $3d90f6e46fb2dd47$export$2e2bcd8739ae039 = { + fallback: "", + id: "", + native: "", + shortcodes: "", + size: { + value: "", + transform: value => { + // If the value is a number, then we assume it’s a pixel value. + if (!/\D/.test(value)) return `${value}px`; + return value; + } + }, + // Shared + set: ($b247ea80b67298d5$export$2e2bcd8739ae039).set, + skin: ($b247ea80b67298d5$export$2e2bcd8739ae039).skin +}; + +class $331b4160623139bf$export$2e2bcd8739ae039 extends ($6f57cc9cd54c5aaa$export$2e2bcd8739ae039) { + async connectedCallback() { + const props = ($7adb23b0109cc36a$export$75fe5f91d452f94b)(this.props, ($3d90f6e46fb2dd47$export$2e2bcd8739ae039), this); + props.element = this; + + props.ref = component => { + this.component = component; + }; + + await ($7adb23b0109cc36a$export$2cd8252107eb640b)(); + if (this.disconnected) return; + ($fb96b826c0c5f37a$export$b3890eb0ae9dca99)( /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)(($254755d3f438722f$export$2e2bcd8739ae039), { ...props + }), this); + } + + constructor(props) { + super(props); + } + +} + +($c770c458706daa72$export$2e2bcd8739ae039)($331b4160623139bf$export$2e2bcd8739ae039, "Props", ($3d90f6e46fb2dd47$export$2e2bcd8739ae039)); +if (typeof customElements !== "undefined" && !customElements.get("em-emoji")) customElements.define("em-emoji", $331b4160623139bf$export$2e2bcd8739ae039); +var $1a9a8ef576b7773d$var$u, + $1a9a8ef576b7773d$var$r, + $1a9a8ef576b7773d$var$i = [], + $1a9a8ef576b7773d$var$c = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__b, + $1a9a8ef576b7773d$var$f = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__r, + $1a9a8ef576b7773d$var$e = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).diffed, + $1a9a8ef576b7773d$var$a = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__c, + $1a9a8ef576b7773d$var$v = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).unmount; + +function $1a9a8ef576b7773d$var$x() { + var t6; + + for ($1a9a8ef576b7773d$var$i.sort(function (n11, t7) { + return n11.__v.__b - t7.__v.__b; + }); t6 = $1a9a8ef576b7773d$var$i.pop();) if (t6.__P) try { + t6.__H.__h.forEach($1a9a8ef576b7773d$var$g), t6.__H.__h.forEach($1a9a8ef576b7773d$var$j), t6.__H.__h = []; + } catch (u4) { + t6.__H.__h = [], ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__e(u4, t6.__v); + } +} + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).__b = function (n12) { + $1a9a8ef576b7773d$var$u = null, $1a9a8ef576b7773d$var$c && $1a9a8ef576b7773d$var$c(n12); +}, ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__r = function (n13) { + $1a9a8ef576b7773d$var$f && $1a9a8ef576b7773d$var$f(n13), 0; + var r8 = ($1a9a8ef576b7773d$var$u = n13.__c).__H; + r8 && (r8.__h.forEach($1a9a8ef576b7773d$var$g), r8.__h.forEach($1a9a8ef576b7773d$var$j), r8.__h = []); +}, ($fb96b826c0c5f37a$export$41c562ebe57d11e2).diffed = function (t8) { + $1a9a8ef576b7773d$var$e && $1a9a8ef576b7773d$var$e(t8); + var o6 = t8.__c; + o6 && o6.__H && o6.__H.__h.length && (1 !== $1a9a8ef576b7773d$var$i.push(o6) && $1a9a8ef576b7773d$var$r === ($fb96b826c0c5f37a$export$41c562ebe57d11e2).requestAnimationFrame || (($1a9a8ef576b7773d$var$r = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).requestAnimationFrame) || function (n14) { + var t9, + u5 = function () { + clearTimeout(r9), $1a9a8ef576b7773d$var$b && cancelAnimationFrame(t9), setTimeout(n14); + }, + r9 = setTimeout(u5, 100); + + $1a9a8ef576b7773d$var$b && (t9 = requestAnimationFrame(u5)); + })($1a9a8ef576b7773d$var$x)), $1a9a8ef576b7773d$var$u = null; +}, ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__c = function (t10, u6) { + u6.some(function (t11) { + try { + t11.__h.forEach($1a9a8ef576b7773d$var$g), t11.__h = t11.__h.filter(function (n15) { + return !n15.__ || $1a9a8ef576b7773d$var$j(n15); + }); + } catch (r10) { + u6.some(function (n16) { + n16.__h && (n16.__h = []); + }), u6 = [], ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__e(r10, t11.__v); + } + }), $1a9a8ef576b7773d$var$a && $1a9a8ef576b7773d$var$a(t10, u6); +}, ($fb96b826c0c5f37a$export$41c562ebe57d11e2).unmount = function (t12) { + $1a9a8ef576b7773d$var$v && $1a9a8ef576b7773d$var$v(t12); + var u7, + r11 = t12.__c; + r11 && r11.__H && (r11.__H.__.forEach(function (n17) { + try { + $1a9a8ef576b7773d$var$g(n17); + } catch (n18) { + u7 = n18; + } + }), u7 && ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__e(u7, r11.__v)); +}; +var $1a9a8ef576b7773d$var$b = "function" == typeof requestAnimationFrame; + +function $1a9a8ef576b7773d$var$g(n19) { + var t13 = $1a9a8ef576b7773d$var$u, + r12 = n19.__c; + "function" == typeof r12 && (n19.__c = void 0, r12()), $1a9a8ef576b7773d$var$u = t13; +} + +function $1a9a8ef576b7773d$var$j(n20) { + var t14 = $1a9a8ef576b7773d$var$u; + n20.__c = n20.__(), $1a9a8ef576b7773d$var$u = t14; +} + +function $dc040a17866866fa$var$S(n1, t1) { + for (var e1 in t1) n1[e1] = t1[e1]; + + return n1; +} + +function $dc040a17866866fa$var$C(n2, t2) { + for (var e2 in n2) if ("__source" !== e2 && !(e2 in t2)) return !0; + + for (var r1 in t2) if ("__source" !== r1 && n2[r1] !== t2[r1]) return !0; + + return !1; +} + +function $dc040a17866866fa$export$221d75b3f55bb0bd(n3) { + this.props = n3; +} + +($dc040a17866866fa$export$221d75b3f55bb0bd.prototype = new ($fb96b826c0c5f37a$export$16fa2f45be04daa8)()).isPureReactComponent = !0, $dc040a17866866fa$export$221d75b3f55bb0bd.prototype.shouldComponentUpdate = function (n6, t5) { + return $dc040a17866866fa$var$C(this.props, n6) || $dc040a17866866fa$var$C(this.state, t5); +}; +var $dc040a17866866fa$var$w = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__b; + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).__b = function (n7) { + n7.type && n7.type.__f && n7.ref && (n7.props.ref = n7.ref, n7.ref = null), $dc040a17866866fa$var$w && $dc040a17866866fa$var$w(n7); +}; + +var $dc040a17866866fa$var$A = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__e; + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).__e = function (n12, t10, e6) { + if (n12.then) { + for (var r5, u1 = t10; u1 = u1.__;) if ((r5 = u1.__c) && r5.__c) return null == t10.__e && (t10.__e = e6.__e, t10.__k = e6.__k), r5.__c(n12, t10); + } + + $dc040a17866866fa$var$A(n12, t10, e6); +}; + +var $dc040a17866866fa$var$O = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).unmount; + +function $dc040a17866866fa$export$74bf444e3cd11ea5() { + this.__u = 0, this.t = null, this.__b = null; +} + +function $dc040a17866866fa$var$U(n13) { + var t11 = n13.__.__c; + return t11 && t11.__e && t11.__e(n13); +} + +function $dc040a17866866fa$export$998bcd577473dd93() { + this.u = null, this.o = null; +} + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).unmount = function (n17) { + var t13 = n17.__c; + t13 && t13.__R && t13.__R(), t13 && !0 === n17.__h && (n17.type = null), $dc040a17866866fa$var$O && $dc040a17866866fa$var$O(n17); +}, ($dc040a17866866fa$export$74bf444e3cd11ea5.prototype = new ($fb96b826c0c5f37a$export$16fa2f45be04daa8)()).__c = function (n18, t14) { + var e8 = t14.__c, + r7 = this; + null == r7.t && (r7.t = []), r7.t.push(e8); + + var u4 = $dc040a17866866fa$var$U(r7.__v), + o1 = !1, + i1 = function () { + o1 || (o1 = !0, e8.__R = null, u4 ? u4(l1) : l1()); + }; + + e8.__R = i1; + + var l1 = function () { + if (! --r7.__u) { + if (r7.state.__e) { + var n19 = r7.state.__e; + + r7.__v.__k[0] = function n22(t17, e9, r8) { + return t17 && (t17.__v = null, t17.__k = t17.__k && t17.__k.map(function (t18) { + return n22(t18, e9, r8); + }), t17.__c && t17.__c.__P === e9 && (t17.__e && r8.insertBefore(t17.__e, t17.__d), t17.__c.__e = !0, t17.__c.__P = r8)), t17; + }(n19, n19.__c.__P, n19.__c.__O); + } + + var t15; + + for (r7.setState({ + __e: r7.__b = null + }); t15 = r7.t.pop();) t15.forceUpdate(); + } + }, + c1 = !0 === t14.__h; + + r7.__u++ || c1 || r7.setState({ + __e: r7.__b = r7.__v.__k[0] + }), n18.then(i1, i1); +}, $dc040a17866866fa$export$74bf444e3cd11ea5.prototype.componentWillUnmount = function () { + this.t = []; +}, $dc040a17866866fa$export$74bf444e3cd11ea5.prototype.render = function (n23, t19) { + if (this.__b) { + if (this.__v.__k) { + var e10 = document.createElement("div"), + r9 = this.__v.__k[0].__c; + + this.__v.__k[0] = function n24(t20, e13, r12) { + return t20 && (t20.__c && t20.__c.__H && (t20.__c.__H.__.forEach(function (n25) { + "function" == typeof n25.__c && n25.__c(); + }), t20.__c.__H = null), null != (t20 = $dc040a17866866fa$var$S({}, t20)).__c && (t20.__c.__P === r12 && (t20.__c.__P = e13), t20.__c = null), t20.__k = t20.__k && t20.__k.map(function (t21) { + return n24(t21, e13, r12); + })), t20; + }(this.__b, e10, r9.__O = r9.__P); + } + + this.__b = null; + } + + var u5 = t19.__e && ($fb96b826c0c5f37a$export$c8a8987d4410bf2d)(($fb96b826c0c5f37a$export$ffb0004e005737fa), null, n23.fallback); + return u5 && (u5.__h = null), [($fb96b826c0c5f37a$export$c8a8987d4410bf2d)(($fb96b826c0c5f37a$export$ffb0004e005737fa), null, t19.__e ? null : n23.children), u5]; +}; + +var $dc040a17866866fa$var$T = function (n26, t22, e14) { + if (++e14[1] === e14[0] && n26.o.delete(t22), n26.props.revealOrder && ("t" !== n26.props.revealOrder[0] || !n26.o.size)) for (e14 = n26.u; e14;) { + for (; e14.length > 3;) e14.pop()(); + + if (e14[1] < e14[0]) break; + n26.u = e14 = e14[2]; + } +}; + +($dc040a17866866fa$export$998bcd577473dd93.prototype = new ($fb96b826c0c5f37a$export$16fa2f45be04daa8)()).__e = function (n33) { + var t25 = this, + e16 = $dc040a17866866fa$var$U(t25.__v), + r13 = t25.o.get(n33); + return r13[0]++, function (u6) { + var o2 = function () { + t25.props.revealOrder ? (r13.push(u6), $dc040a17866866fa$var$T(t25, n33, r13)) : u6(); + }; + + e16 ? e16(o2) : o2(); + }; +}, $dc040a17866866fa$export$998bcd577473dd93.prototype.render = function (n34) { + this.u = null, this.o = new Map(); + var t26 = ($fb96b826c0c5f37a$export$47e4c5b300681277)(n34.children); + n34.revealOrder && "b" === n34.revealOrder[0] && t26.reverse(); + + for (var e17 = t26.length; e17--;) this.o.set(t26[e17], this.u = [1, 0, this.u]); + + return n34.children; +}, $dc040a17866866fa$export$998bcd577473dd93.prototype.componentDidUpdate = $dc040a17866866fa$export$998bcd577473dd93.prototype.componentDidMount = function () { + var n35 = this; + this.o.forEach(function (t27, e18) { + $dc040a17866866fa$var$T(n35, e18, t27); + }); +}; + +var $dc040a17866866fa$var$j = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, + $dc040a17866866fa$var$P = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, + $dc040a17866866fa$var$V = "undefined" != typeof document, + $dc040a17866866fa$var$z = function (n36) { + return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/i : /fil|che|ra/i).test(n36); +}; + +($fb96b826c0c5f37a$export$16fa2f45be04daa8).prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function (n39) { + Object.defineProperty(($fb96b826c0c5f37a$export$16fa2f45be04daa8).prototype, n39, { + configurable: !0, + get: function () { + return this["UNSAFE_" + n39]; + }, + set: function (t30) { + Object.defineProperty(this, n39, { + configurable: !0, + writable: !0, + value: t30 + }); + } + }); +}); +var $dc040a17866866fa$var$H = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).event; + +function $dc040a17866866fa$var$Z() {} + +function $dc040a17866866fa$var$Y() { + return this.cancelBubble; +} + +function $dc040a17866866fa$var$q() { + return this.defaultPrevented; +} + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).event = function (n40) { + return $dc040a17866866fa$var$H && (n40 = $dc040a17866866fa$var$H(n40)), n40.persist = $dc040a17866866fa$var$Z, n40.isPropagationStopped = $dc040a17866866fa$var$Y, n40.isDefaultPrevented = $dc040a17866866fa$var$q, n40.nativeEvent = n40; +}; + +var $dc040a17866866fa$var$J = { + configurable: !0, + get: function () { + return this.class; + } +}, + $dc040a17866866fa$var$K = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).vnode; + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).vnode = function (n41) { + var t31 = n41.type, + e21 = n41.props, + r14 = e21; + + if ("string" == typeof t31) { + var u7 = -1 === t31.indexOf("-"); + + for (var o3 in r14 = {}, e21) { + var i2 = e21[o3]; + $dc040a17866866fa$var$V && "children" === o3 && "noscript" === t31 || "value" === o3 && "defaultValue" in e21 && null == i2 || ("defaultValue" === o3 && "value" in e21 && null == e21.value ? o3 = "value" : "download" === o3 && !0 === i2 ? i2 = "" : /ondoubleclick/i.test(o3) ? o3 = "ondblclick" : /^onchange(textarea|input)/i.test(o3 + t31) && !$dc040a17866866fa$var$z(e21.type) ? o3 = "oninput" : /^onfocus$/i.test(o3) ? o3 = "onfocusin" : /^onblur$/i.test(o3) ? o3 = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp)/.test(o3) ? o3 = o3.toLowerCase() : u7 && $dc040a17866866fa$var$P.test(o3) ? o3 = o3.replace(/[A-Z0-9]/, "-$&").toLowerCase() : null === i2 && (i2 = void 0), r14[o3] = i2); + } + + "select" == t31 && r14.multiple && Array.isArray(r14.value) && (r14.value = ($fb96b826c0c5f37a$export$47e4c5b300681277)(e21.children).forEach(function (n42) { + n42.props.selected = -1 != r14.value.indexOf(n42.props.value); + })), "select" == t31 && null != r14.defaultValue && (r14.value = ($fb96b826c0c5f37a$export$47e4c5b300681277)(e21.children).forEach(function (n43) { + n43.props.selected = r14.multiple ? -1 != r14.defaultValue.indexOf(n43.props.value) : r14.defaultValue == n43.props.value; + })), n41.props = r14, e21.class != e21.className && ($dc040a17866866fa$var$J.enumerable = "className" in e21, null != e21.className && (r14.class = e21.className), Object.defineProperty(r14, "className", $dc040a17866866fa$var$J)); + } + + n41.$$typeof = $dc040a17866866fa$var$j, $dc040a17866866fa$var$K && $dc040a17866866fa$var$K(n41); +}; + +var $dc040a17866866fa$var$Q = ($fb96b826c0c5f37a$export$41c562ebe57d11e2).__r; + +($fb96b826c0c5f37a$export$41c562ebe57d11e2).__r = function (n44) { + $dc040a17866866fa$var$Q && $dc040a17866866fa$var$Q(n44), n44.__c; +}; +const $ec8c39fdad15601a$var$THEME_ICONS = { + light: "outline", + dark: "solid" +}; + +class $ec8c39fdad15601a$export$2e2bcd8739ae039 extends ($dc040a17866866fa$export$221d75b3f55bb0bd) { + renderIcon(category) { + const { + icon: icon + } = category; + + if (icon) { + if (icon.svg) return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + class: "flex", + dangerouslySetInnerHTML: { + __html: icon.svg + } + }); + if (icon.src) return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("img", { + src: icon.src + }); + } + + const categoryIcons = ($fcccfb36ed0cde68$export$2e2bcd8739ae039).categories[category.id] || ($fcccfb36ed0cde68$export$2e2bcd8739ae039).categories.custom; + const style = this.props.icons == "auto" ? $ec8c39fdad15601a$var$THEME_ICONS[this.props.theme] : this.props.icons; + return categoryIcons[style] || categoryIcons; + } + + render() { + let selectedCategoryIndex = null; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("nav", { + id: "nav", + class: "padding", + "data-position": this.props.position, + dir: this.props.dir, + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "flex relative", + children: [this.categories.map((category, i) => { + const title = category.name || ($7adb23b0109cc36a$export$dbe3113d60765c1a).categories[category.id]; + const selected = !this.props.unfocused && category.id == this.state.categoryId; + if (selected) selectedCategoryIndex = i; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("button", { + "aria-label": title, + "aria-selected": selected || undefined, + title: title, + type: "button", + class: "flex flex-grow flex-center", + onMouseDown: e => e.preventDefault(), + onClick: () => { + this.props.onClick({ + category: category, + i: i + }); + }, + children: this.renderIcon(category) + }); + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "bar", + style: { + width: `${100 / this.categories.length}%`, + opacity: selectedCategoryIndex == null ? 0 : 1, + transform: this.props.dir === "rtl" ? `scaleX(-1) translateX(${selectedCategoryIndex * 100}%)` : `translateX(${selectedCategoryIndex * 100}%)` + } + })] + }) + }); + } + + constructor() { + super(); + this.categories = ($7adb23b0109cc36a$export$2d0294657ab35f1b).categories.filter(category => { + return !category.target; + }); + this.state = { + categoryId: this.categories[0].id + }; + } + +} + +class $e0d4dda61265ff1e$export$2e2bcd8739ae039 extends ($dc040a17866866fa$export$221d75b3f55bb0bd) { + shouldComponentUpdate(nextProps) { + for (let k in nextProps) { + if (k == "children") continue; + if (nextProps[k] != this.props[k]) return true; + } + + return false; + } + + render() { + return this.props.children; + } + +} + +const $89bd6bb200cc8fef$var$Performance = { + rowsPerRender: 10 +}; + +class $89bd6bb200cc8fef$export$2e2bcd8739ae039 extends ($fb96b826c0c5f37a$export$16fa2f45be04daa8) { + getInitialState(props = this.props) { + return { + skin: ($f72b75cf796873c7$export$2e2bcd8739ae039).get("skin") || props.skin, + theme: this.initTheme(props.theme) + }; + } + + componentWillMount() { + this.dir = ($7adb23b0109cc36a$export$dbe3113d60765c1a).rtl ? "rtl" : "ltr"; + this.refs = { + menu: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + navigation: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + scroll: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + search: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + searchInput: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + skinToneButton: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + skinToneRadio: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)() + }; + this.initGrid(); + + if (this.props.stickySearch == false && this.props.searchPosition == "sticky") { + console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."); + this.props.searchPosition = "static"; + } + } + + componentDidMount() { + this.register(); + this.shadowRoot = this.base.parentNode; + + if (this.props.autoFocus) { + const { + searchInput: searchInput + } = this.refs; + if (searchInput.current) searchInput.current.focus(); + } + } + + componentWillReceiveProps(nextProps) { + this.nextState || (this.nextState = {}); + + for (const k1 in nextProps) this.nextState[k1] = nextProps[k1]; + + clearTimeout(this.nextStateTimer); + this.nextStateTimer = setTimeout(() => { + let requiresGridReset = false; + + for (const k in this.nextState) { + this.props[k] = this.nextState[k]; + if (k === "custom" || k === "categories") requiresGridReset = true; + } + + delete this.nextState; + const nextState = this.getInitialState(); + if (requiresGridReset) return this.reset(nextState); + this.setState(nextState); + }); + } + + componentWillUnmount() { + this.unregister(); + } + + async reset(nextState = {}) { + await ($7adb23b0109cc36a$export$2cd8252107eb640b)(this.props); + this.initGrid(); + this.unobserve(); + this.setState(nextState, () => { + this.observeCategories(); + this.observeRows(); + }); + } + + register() { + document.addEventListener("click", this.handleClickOutside); + this.observe(); + } + + unregister() { + document.removeEventListener("click", this.handleClickOutside); + this.darkMedia?.removeEventListener("change", this.darkMediaCallback); + this.unobserve(); + } + + observe() { + this.observeCategories(); + this.observeRows(); + } + + unobserve({ + except = [] + } = {}) { + if (!Array.isArray(except)) except = [except]; + + for (const observer of this.observers) { + if (except.includes(observer)) continue; + observer.disconnect(); + } + + this.observers = [].concat(except); + } + + initGrid() { + const { + categories: categories + } = ($7adb23b0109cc36a$export$2d0294657ab35f1b); + this.refs.categories = new Map(); + const navKey = ($7adb23b0109cc36a$export$2d0294657ab35f1b).categories.map(category => category.id).join(","); + if (this.navKey && this.navKey != navKey) this.refs.scroll.current && (this.refs.scroll.current.scrollTop = 0); + this.navKey = navKey; + this.grid = []; + this.grid.setsize = 0; + + const addRow = (rows, category) => { + const row = []; + row.__categoryId = category.id; + row.__index = rows.length; + this.grid.push(row); + const rowIndex = this.grid.length - 1; + const rowRef = rowIndex % $89bd6bb200cc8fef$var$Performance.rowsPerRender ? {} : ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(); + rowRef.index = rowIndex; + rowRef.posinset = this.grid.setsize + 1; + rows.push(rowRef); + return row; + }; + + for (let category1 of categories) { + const rows = []; + let row = addRow(rows, category1); + + for (let emoji of category1.emojis) { + if (row.length == this.getPerLine()) row = addRow(rows, category1); + this.grid.setsize += 1; + row.push(emoji); + } + + this.refs.categories.set(category1.id, { + root: ($fb96b826c0c5f37a$export$7d1e3a5e95ceca43)(), + rows: rows + }); + } + } + + initTheme(theme) { + if (theme != "auto") return theme; + + if (!this.darkMedia) { + this.darkMedia = matchMedia("(prefers-color-scheme: dark)"); + if (this.darkMedia.media.match(/^not/)) return "light"; + this.darkMedia.addEventListener("change", this.darkMediaCallback); + } + + return this.darkMedia.matches ? "dark" : "light"; + } + + initDynamicPerLine(props = this.props) { + if (!props.dynamicWidth) return; + const { + element: element, + emojiButtonSize: emojiButtonSize + } = props; + + const calculatePerLine = () => { + const { + width: width + } = element.getBoundingClientRect(); + return Math.floor(width / emojiButtonSize); + }; + + const observer = new ResizeObserver(() => { + this.unobserve({ + except: observer + }); + this.setState({ + perLine: calculatePerLine() + }, () => { + this.initGrid(); + this.forceUpdate(() => { + this.observeCategories(); + this.observeRows(); + }); + }); + }); + observer.observe(element); + this.observers.push(observer); + return calculatePerLine(); + } + + getPerLine() { + return this.state.perLine || this.props.perLine; + } + + getEmojiByPos([p1, p2]) { + const grid = this.state.searchResults || this.grid; + const emoji = grid[p1] && grid[p1][p2]; + if (!emoji) return; + return ($c4d155af13ad4d4b$export$2e2bcd8739ae039).get(emoji); + } + + observeCategories() { + const navigation = this.refs.navigation.current; + if (!navigation) return; + const visibleCategories = new Map(); + + const setFocusedCategory = categoryId => { + if (categoryId != navigation.state.categoryId) navigation.setState({ + categoryId: categoryId + }); + }; + + const observerOptions = { + root: this.refs.scroll.current, + threshold: [0.0, 1.0] + }; + const observer = new IntersectionObserver(entries => { + for (const entry of entries) { + const id = entry.target.dataset.id; + visibleCategories.set(id, entry.intersectionRatio); + } + + const ratios = [...visibleCategories]; + + for (const [id, ratio] of ratios) if (ratio) { + setFocusedCategory(id); + break; + } + }, observerOptions); + + for (const { + root: root + } of this.refs.categories.values()) observer.observe(root.current); + + this.observers.push(observer); + } + + observeRows() { + const visibleRows = { ...this.state.visibleRows + }; + const observer = new IntersectionObserver(entries => { + for (const entry of entries) { + const index = parseInt(entry.target.dataset.index); + if (entry.isIntersecting) visibleRows[index] = true;else delete visibleRows[index]; + } + + this.setState({ + visibleRows: visibleRows + }); + }, { + root: this.refs.scroll.current, + rootMargin: `${this.props.emojiButtonSize * ($89bd6bb200cc8fef$var$Performance.rowsPerRender + 5)}px 0px ${this.props.emojiButtonSize * $89bd6bb200cc8fef$var$Performance.rowsPerRender}px` + }); + + for (const { + rows: rows + } of this.refs.categories.values()) { + for (const row of rows) if (row.current) observer.observe(row.current); + } + + this.observers.push(observer); + } + + preventDefault(e) { + e.preventDefault(); + } + + unfocusSearch() { + const input = this.refs.searchInput.current; + if (!input) return; + input.blur(); + } + + navigate({ + e: e, + input: input, + left: left, + right: right, + up: up, + down: down + }) { + const grid = this.state.searchResults || this.grid; + if (!grid.length) return; + let [p1, p2] = this.state.pos; + + const pos = (() => { + if (p1 == 0) { + if (p2 == 0 && !e.repeat && (left || up)) return null; + } + + if (p1 == -1) { + if (!e.repeat && (right || down) && input.selectionStart == input.value.length) return [0, 0]; + return null; + } + + if (left || right) { + let row = grid[p1]; + const increment = left ? -1 : 1; + p2 += increment; + + if (!row[p2]) { + p1 += increment; + row = grid[p1]; + + if (!row) { + p1 = left ? 0 : grid.length - 1; + p2 = left ? 0 : grid[p1].length - 1; + return [p1, p2]; + } + + p2 = left ? row.length - 1 : 0; + } + + return [p1, p2]; + } + + if (up || down) { + p1 += up ? -1 : 1; + const row = grid[p1]; + + if (!row) { + p1 = up ? 0 : grid.length - 1; + p2 = up ? 0 : grid[p1].length - 1; + return [p1, p2]; + } + + if (!row[p2]) p2 = row.length - 1; + return [p1, p2]; + } + })(); + + if (pos) e.preventDefault();else { + if (this.state.pos[0] > -1) this.setState({ + pos: [-1, -1] + }); + return; + } + this.setState({ + pos: pos, + keyboard: true + }, () => { + this.scrollTo({ + row: pos[0] + }); + }); + } + + scrollTo({ + categoryId: categoryId, + row: row + }) { + const grid = this.state.searchResults || this.grid; + if (!grid.length) return; + const scroll = this.refs.scroll.current; + const scrollRect = scroll.getBoundingClientRect(); + let scrollTop = 0; + if (row >= 0) categoryId = grid[row].__categoryId; + + if (categoryId) { + const ref = this.refs[categoryId] || this.refs.categories.get(categoryId).root; + const categoryRect = ref.current.getBoundingClientRect(); + scrollTop = categoryRect.top - (scrollRect.top - scroll.scrollTop) + 1; + } + + if (row >= 0) { + if (!row) scrollTop = 0;else { + const rowIndex = grid[row].__index; + const rowTop = scrollTop + rowIndex * this.props.emojiButtonSize; + const rowBot = rowTop + this.props.emojiButtonSize + this.props.emojiButtonSize * 0.88; + if (rowTop < scroll.scrollTop) scrollTop = rowTop;else if (rowBot > scroll.scrollTop + scrollRect.height) scrollTop = rowBot - scrollRect.height;else return; + } + } + + this.ignoreMouse(); + scroll.scrollTop = scrollTop; + } + + ignoreMouse() { + this.mouseIsIgnored = true; + clearTimeout(this.ignoreMouseTimer); + this.ignoreMouseTimer = setTimeout(() => { + delete this.mouseIsIgnored; + }, 100); + } + + handleEmojiOver(pos) { + if (this.mouseIsIgnored || this.state.showSkins) return; + this.setState({ + pos: pos || [-1, -1], + keyboard: false + }); + } + + handleEmojiClick({ + e: e, + emoji: emoji, + pos: pos + }) { + if (!this.props.onEmojiSelect) return; + if (!emoji && pos) emoji = this.getEmojiByPos(pos); + + if (emoji) { + const emojiData = ($693b183b0a78708f$export$d10ac59fbe52a745)(emoji, { + skinIndex: this.state.skin - 1 + }); + if (this.props.maxFrequentRows) ($b22cfd0a55410b4f$export$2e2bcd8739ae039).add(emojiData, this.props); + this.props.onEmojiSelect(emojiData, e); + } + } + + closeSkins() { + if (!this.state.showSkins) return; + this.setState({ + showSkins: null, + tempSkin: null + }); + this.base.removeEventListener("click", this.handleBaseClick); + this.base.removeEventListener("keydown", this.handleBaseKeydown); + } + + handleSkinMouseOver(tempSkin) { + this.setState({ + tempSkin: tempSkin + }); + } + + handleSkinClick(skin) { + this.ignoreMouse(); + this.closeSkins(); + this.setState({ + skin: skin, + tempSkin: null + }); + ($f72b75cf796873c7$export$2e2bcd8739ae039).set("skin", skin); + } + + renderNav() { + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)(($ec8c39fdad15601a$export$2e2bcd8739ae039), { + ref: this.refs.navigation, + icons: this.props.icons, + theme: this.state.theme, + dir: this.dir, + unfocused: !!this.state.searchResults, + position: this.props.navPosition, + onClick: this.handleCategoryClick + }, this.navKey); + } + + renderPreview() { + const emoji = this.getEmojiByPos(this.state.pos); + const noSearchResults = this.state.searchResults && !this.state.searchResults.length; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + id: "preview", + class: "flex flex-middle", + dir: this.dir, + "data-position": this.props.previewPosition, + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "flex flex-middle flex-grow", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "flex flex-auto flex-middle flex-center", + style: { + height: this.props.emojiButtonSize, + fontSize: this.props.emojiButtonSize + }, + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)(($254755d3f438722f$export$2e2bcd8739ae039), { + emoji: emoji, + id: noSearchResults ? this.props.noResultsEmoji || "cry" : this.props.previewEmoji || (this.props.previewPosition == "top" ? "point_down" : "point_up"), + set: this.props.set, + size: this.props.emojiButtonSize, + skin: this.state.tempSkin || this.state.skin, + spritesheet: true, + getSpritesheetURL: this.props.getSpritesheetURL + }) + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: `margin-${this.dir[0]}`, + children: emoji || noSearchResults ? /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: `padding-${this.dir[2]} align-${this.dir[0]}`, + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "preview-title ellipsis", + children: emoji ? emoji.name : ($7adb23b0109cc36a$export$dbe3113d60765c1a).search_no_results_1 + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "preview-subtitle ellipsis color-c", + children: emoji ? emoji.skins[0].shortcodes : ($7adb23b0109cc36a$export$dbe3113d60765c1a).search_no_results_2 + })] + }) : /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "preview-placeholder color-c", + children: ($7adb23b0109cc36a$export$dbe3113d60765c1a).pick + }) + })] + }), !emoji && this.props.skinTonePosition == "preview" && this.renderSkinToneButton()] + }); + } + + renderEmojiButton(emoji, { + pos: pos, + posinset: posinset, + grid: grid + }) { + const size = this.props.emojiButtonSize; + const skin = this.state.tempSkin || this.state.skin; + const emojiSkin = emoji.skins[skin - 1] || emoji.skins[0]; + const native = emojiSkin.native; + const selected = ($693b183b0a78708f$export$9cb4719e2e525b7a)(this.state.pos, pos); + const key = pos.concat(emoji.id).join(""); + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)(($e0d4dda61265ff1e$export$2e2bcd8739ae039), { + selected: selected, + skin: skin, + size: size, + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("button", { + "aria-label": native, + "aria-selected": selected || undefined, + "aria-posinset": posinset, + "aria-setsize": grid.setsize, + "data-keyboard": this.state.keyboard, + title: this.props.previewPosition == "none" ? emoji.name : undefined, + type: "button", + class: "flex flex-center flex-middle", + tabindex: "-1", + onClick: e => this.handleEmojiClick({ + e: e, + emoji: emoji + }), + onMouseEnter: () => this.handleEmojiOver(pos), + onMouseLeave: () => this.handleEmojiOver(), + style: { + width: this.props.emojiButtonSize, + height: this.props.emojiButtonSize, + fontSize: this.props.emojiSize, + lineHeight: 0 + }, + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + "aria-hidden": "true", + class: "background", + style: { + borderRadius: this.props.emojiButtonRadius, + backgroundColor: this.props.emojiButtonColors ? this.props.emojiButtonColors[(posinset - 1) % this.props.emojiButtonColors.length] : undefined + } + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)(($254755d3f438722f$export$2e2bcd8739ae039), { + emoji: emoji, + set: this.props.set, + size: this.props.emojiSize, + skin: skin, + spritesheet: true, + getSpritesheetURL: this.props.getSpritesheetURL + })] + }) + }, key); + } + + renderSearch() { + const renderSkinTone = this.props.previewPosition == "none" || this.props.skinTonePosition == "search"; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "spacer" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "flex flex-middle", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "search relative flex-grow", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("input", { + type: "search", + ref: this.refs.searchInput, + placeholder: ($7adb23b0109cc36a$export$dbe3113d60765c1a).search, + onClick: this.handleSearchClick, + onInput: this.handleSearchInput, + onKeyDown: this.handleSearchKeyDown, + autoComplete: "off" + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + class: "icon loupe flex", + children: ($fcccfb36ed0cde68$export$2e2bcd8739ae039).search.loupe + }), this.state.searchResults && /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("button", { + title: "Clear", + "aria-label": "Clear", + type: "button", + class: "icon delete flex", + onClick: this.clearSearch, + onMouseDown: this.preventDefault, + children: ($fcccfb36ed0cde68$export$2e2bcd8739ae039).search.delete + })] + }), renderSkinTone && this.renderSkinToneButton()] + })] + }); + } + + renderSearchResults() { + const { + searchResults: searchResults + } = this.state; + if (!searchResults) return null; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "category", + ref: this.refs.search, + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: `sticky padding-small align-${this.dir[0]}`, + children: ($7adb23b0109cc36a$export$dbe3113d60765c1a).categories.search + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + children: !searchResults.length ? /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: `padding-small align-${this.dir[0]}`, + children: this.props.onAddCustomEmoji && /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("a", { + onClick: this.props.onAddCustomEmoji, + children: ($7adb23b0109cc36a$export$dbe3113d60765c1a).add_custom + }) + }) : searchResults.map((row, i) => { + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "flex", + children: row.map((emoji, ii) => { + return this.renderEmojiButton(emoji, { + pos: [i, ii], + posinset: i * this.props.perLine + ii + 1, + grid: searchResults + }); + }) + }); + }) + })] + }); + } + + renderCategories() { + const { + categories: categories + } = ($7adb23b0109cc36a$export$2d0294657ab35f1b); + const hidden = !!this.state.searchResults; + const perLine = this.getPerLine(); + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + style: { + visibility: hidden ? "hidden" : undefined, + display: hidden ? "none" : undefined, + height: "100%" + }, + children: categories.map(category => { + const { + root: root, + rows: rows + } = this.refs.categories.get(category.id); + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + "data-id": category.target ? category.target.id : category.id, + class: "category", + ref: root, + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: `sticky padding-small align-${this.dir[0]}`, + children: category.name || ($7adb23b0109cc36a$export$dbe3113d60765c1a).categories[category.id] + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "relative", + style: { + height: rows.length * this.props.emojiButtonSize + }, + children: rows.map((row, i) => { + const targetRow = row.index - row.index % $89bd6bb200cc8fef$var$Performance.rowsPerRender; + const visible = this.state.visibleRows[targetRow]; + const ref = "current" in row ? row : undefined; + if (!visible && !ref) return null; + const start = i * perLine; + const end = start + perLine; + const emojiIds = category.emojis.slice(start, end); + if (emojiIds.length < perLine) emojiIds.push(...new Array(perLine - emojiIds.length)); + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + "data-index": row.index, + ref: ref, + class: "flex row", + style: { + top: i * this.props.emojiButtonSize + }, + children: visible && emojiIds.map((emojiId, ii) => { + if (!emojiId) return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + style: { + width: this.props.emojiButtonSize, + height: this.props.emojiButtonSize + } + }); + const emoji = ($c4d155af13ad4d4b$export$2e2bcd8739ae039).get(emojiId); + return this.renderEmojiButton(emoji, { + pos: [row.index, ii], + posinset: row.posinset + ii, + grid: this.grid + }); + }) + }, row.index); + }) + })] + }); + }) + }); + } + + renderSkinToneButton() { + if (this.props.skinTonePosition == "none") return null; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "flex flex-auto flex-center flex-middle", + style: { + position: "relative", + width: this.props.emojiButtonSize, + height: this.props.emojiButtonSize + }, + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("button", { + type: "button", + ref: this.refs.skinToneButton, + class: "skin-tone-button flex flex-auto flex-center flex-middle", + "aria-selected": this.state.showSkins ? "" : undefined, + "aria-label": ($7adb23b0109cc36a$export$dbe3113d60765c1a).skins.choose, + title: ($7adb23b0109cc36a$export$dbe3113d60765c1a).skins.choose, + onClick: this.openSkins, + style: { + width: this.props.emojiSize, + height: this.props.emojiSize + }, + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + class: `skin-tone skin-tone-${this.state.skin}` + }) + }) + }); + } + + renderLiveRegion() { + const emoji = this.getEmojiByPos(this.state.pos); + const contents = emoji ? emoji.name : ""; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + "aria-live": "polite", + class: "sr-only", + children: contents + }); + } + + renderSkins() { + const skinToneButton = this.refs.skinToneButton.current; + const skinToneButtonRect = skinToneButton.getBoundingClientRect(); + const baseRect = this.base.getBoundingClientRect(); + const position = {}; + if (this.dir == "ltr") position.right = baseRect.right - skinToneButtonRect.right - 3;else position.left = skinToneButtonRect.left - baseRect.left - 3; + if (this.props.previewPosition == "bottom" && this.props.skinTonePosition == "preview") position.bottom = baseRect.bottom - skinToneButtonRect.top + 6;else { + position.top = skinToneButtonRect.bottom - baseRect.top + 3; + position.bottom = "auto"; + } + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + ref: this.refs.menu, + role: "radiogroup", + dir: this.dir, + "aria-label": ($7adb23b0109cc36a$export$dbe3113d60765c1a).skins.choose, + class: "menu hidden", + "data-position": position.top ? "top" : "bottom", + style: position, + children: [...Array(6).keys()].map(i => { + const skin = i + 1; + const checked = this.state.skin == skin; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("input", { + type: "radio", + name: "skin-tone", + value: skin, + "aria-label": ($7adb23b0109cc36a$export$dbe3113d60765c1a).skins[skin], + ref: checked ? this.refs.skinToneRadio : null, + defaultChecked: checked, + onChange: () => this.handleSkinMouseOver(skin), + onKeyDown: e => { + if (e.code == "Enter" || e.code == "Space" || e.code == "Tab") { + e.preventDefault(); + this.handleSkinClick(skin); + } + } + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("button", { + "aria-hidden": "true", + tabindex: "-1", + onClick: () => this.handleSkinClick(skin), + onMouseEnter: () => this.handleSkinMouseOver(skin), + onMouseLeave: () => this.handleSkinMouseOver(), + class: "option flex flex-grow flex-middle", + children: [/*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + class: `skin-tone skin-tone-${skin}` + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("span", { + class: "margin-small-lr", + children: ($7adb23b0109cc36a$export$dbe3113d60765c1a).skins[skin] + })] + })] + }); + }) + }); + } + + render() { + const lineWidth = this.props.perLine * this.props.emojiButtonSize; + return /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("section", { + id: "root", + class: "flex flex-column", + dir: this.dir, + style: { + width: this.props.dynamicWidth ? "100%" : `calc(${lineWidth}px + (var(--padding) + var(--sidebar-width)))` + }, + "data-emoji-set": this.props.set, + "data-theme": this.state.theme, + "data-menu": this.state.showSkins ? "" : undefined, + children: [this.props.previewPosition == "top" && this.renderPreview(), this.props.navPosition == "top" && this.renderNav(), this.props.searchPosition == "sticky" && /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + class: "padding-lr", + children: this.renderSearch() + }), /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + ref: this.refs.scroll, + class: "scroll flex-grow padding-lr", + children: /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)("div", { + style: { + width: this.props.dynamicWidth ? "100%" : lineWidth, + height: "100%" + }, + children: [this.props.searchPosition == "static" && this.renderSearch(), this.renderSearchResults(), this.renderCategories()] + }) + }), this.props.navPosition == "bottom" && this.renderNav(), this.props.previewPosition == "bottom" && this.renderPreview(), this.state.showSkins && this.renderSkins(), this.renderLiveRegion()] + }); + } + + constructor(props) { + super(); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "darkMediaCallback", () => { + if (this.props.theme != "auto") return; + this.setState({ + theme: this.darkMedia.matches ? "dark" : "light" + }); + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleClickOutside", e => { + const { + element: element + } = this.props; + + if (e.target != element) { + if (this.state.showSkins) this.closeSkins(); + if (this.props.onClickOutside) this.props.onClickOutside(e); + } + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleBaseClick", e => { + if (!this.state.showSkins) return; + + if (!e.target.closest(".menu")) { + e.preventDefault(); + e.stopImmediatePropagation(); + this.closeSkins(); + } + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleBaseKeydown", e => { + if (!this.state.showSkins) return; + + if (e.key == "Escape") { + e.preventDefault(); + e.stopImmediatePropagation(); + this.closeSkins(); + } + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleSearchClick", () => { + const emoji = this.getEmojiByPos(this.state.pos); + if (!emoji) return; + this.setState({ + pos: [-1, -1] + }); + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleSearchInput", async () => { + const input = this.refs.searchInput.current; + if (!input) return; + const { + value: value + } = input; + const searchResults = await ($c4d155af13ad4d4b$export$2e2bcd8739ae039).search(value); + + const afterRender = () => { + if (!this.refs.scroll.current) return; + this.refs.scroll.current.scrollTop = 0; + }; + + if (!searchResults) return this.setState({ + searchResults: searchResults, + pos: [-1, -1] + }, afterRender); + const pos = input.selectionStart == input.value.length ? [0, 0] : [-1, -1]; + const grid = []; + grid.setsize = searchResults.length; + let row = null; + + for (let emoji of searchResults) { + if (!grid.length || row.length == this.getPerLine()) { + row = []; + row.__categoryId = "search"; + row.__index = grid.length; + grid.push(row); + } + + row.push(emoji); + } + + this.ignoreMouse(); + this.setState({ + searchResults: grid, + pos: pos + }, afterRender); + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleSearchKeyDown", e => { + // const specialKey = e.altKey || e.ctrlKey || e.metaKey + const input = e.currentTarget; + e.stopImmediatePropagation(); + + switch (e.key) { + case "ArrowLeft": + // if (specialKey) return + // e.preventDefault() + this.navigate({ + e: e, + input: input, + left: true + }); + break; + + case "ArrowRight": + // if (specialKey) return + // e.preventDefault() + this.navigate({ + e: e, + input: input, + right: true + }); + break; + + case "ArrowUp": + // if (specialKey) return + // e.preventDefault() + this.navigate({ + e: e, + input: input, + up: true + }); + break; + + case "ArrowDown": + // if (specialKey) return + // e.preventDefault() + this.navigate({ + e: e, + input: input, + down: true + }); + break; + + case "Enter": + e.preventDefault(); + this.handleEmojiClick({ + e: e, + pos: this.state.pos + }); + break; + + case "Escape": + e.preventDefault(); + if (this.state.searchResults) this.clearSearch();else this.unfocusSearch(); + break; + } + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "clearSearch", () => { + const input = this.refs.searchInput.current; + if (!input) return; + input.value = ""; + input.focus(); + this.handleSearchInput(); + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "handleCategoryClick", ({ + category: category, + i: i + }) => { + this.scrollTo(i == 0 ? { + row: -1 + } : { + categoryId: category.id + }); + }); + ($c770c458706daa72$export$2e2bcd8739ae039)(this, "openSkins", e => { + const { + currentTarget: currentTarget + } = e; + const rect = currentTarget.getBoundingClientRect(); + this.setState({ + showSkins: rect + }, async () => { + // Firefox requires 2 frames for the transition to consistenly work + await ($693b183b0a78708f$export$e772c8ff12451969)(2); + const menu = this.refs.menu.current; + if (!menu) return; + menu.classList.remove("hidden"); + this.refs.skinToneRadio.current.focus(); + this.base.addEventListener("click", this.handleBaseClick, true); + this.base.addEventListener("keydown", this.handleBaseKeydown, true); + }); + }); + this.observers = []; + this.state = { + pos: [-1, -1], + perLine: this.initDynamicPerLine(props), + visibleRows: { + 0: true + }, + ...this.getInitialState(props) + }; + } + +} + +class $efa000751917694d$export$2e2bcd8739ae039 extends ($26f27c338a96b1a6$export$2e2bcd8739ae039) { + async connectedCallback() { + const props = ($7adb23b0109cc36a$export$75fe5f91d452f94b)(this.props, ($b247ea80b67298d5$export$2e2bcd8739ae039), this); + props.element = this; + + props.ref = component => { + this.component = component; + }; + + await ($7adb23b0109cc36a$export$2cd8252107eb640b)(props); + if (this.disconnected) return; + ($fb96b826c0c5f37a$export$b3890eb0ae9dca99)( /*#__PURE__*/($bd9dd35321b03dd4$export$34b9dba7ce09269b)(($89bd6bb200cc8fef$export$2e2bcd8739ae039), { ...props + }), this.shadowRoot); + } + + constructor(props) { + super(props, { + styles: (/*@__PURE__*/$parcel$interopDefault($329d53ba9fd7125f$exports)) + }); + } + +} + +($c770c458706daa72$export$2e2bcd8739ae039)($efa000751917694d$export$2e2bcd8739ae039, "Props", ($b247ea80b67298d5$export$2e2bcd8739ae039)); +if (typeof customElements !== "undefined" && !customElements.get("em-emoji-picker")) customElements.define("em-emoji-picker", $efa000751917694d$export$2e2bcd8739ae039); +var $329d53ba9fd7125f$exports = {}; +$329d53ba9fd7125f$exports = ":host {\n width: min-content;\n height: 435px;\n min-height: 230px;\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n --border-radius: 10px;\n --category-icon-size: 18px;\n --font-family: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", sans-serif;\n --font-size: 15px;\n --preview-placeholder-size: 21px;\n --preview-title-size: 1.1em;\n --preview-subtitle-size: .9em;\n --shadow-color: 0deg 0% 0%;\n --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14);\n display: flex;\n}\n\n[data-theme=\"light\"] {\n --em-rgb-color: var(--rgb-color, 34, 36, 39);\n --em-rgb-accent: var(--rgb-accent, 34, 102, 237);\n --em-rgb-background: var(--rgb-background, 255, 255, 255);\n --em-rgb-input: var(--rgb-input, 255, 255, 255);\n --em-color-border: var(--color-border, rgba(0, 0, 0, .05));\n --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));\n}\n\n[data-theme=\"dark\"] {\n --em-rgb-color: var(--rgb-color, 222, 222, 221);\n --em-rgb-accent: var(--rgb-accent, 58, 130, 247);\n --em-rgb-background: var(--rgb-background, 21, 22, 23);\n --em-rgb-input: var(--rgb-input, 0, 0, 0);\n --em-color-border: var(--color-border, rgba(255, 255, 255, .1));\n --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));\n}\n\n#root {\n --color-a: rgb(var(--em-rgb-color));\n --color-b: rgba(var(--em-rgb-color), .65);\n --color-c: rgba(var(--em-rgb-color), .45);\n --padding: 12px;\n --padding-small: calc(var(--padding) / 2);\n --sidebar-width: 16px;\n --duration: 225ms;\n --duration-fast: 125ms;\n --duration-instant: 50ms;\n --easing: cubic-bezier(.4, 0, .2, 1);\n width: 100%;\n text-align: left;\n border-radius: var(--border-radius);\n background-color: rgb(var(--em-rgb-background));\n position: relative;\n}\n\n@media (prefers-reduced-motion) {\n #root {\n --duration: 0;\n --duration-fast: 0;\n --duration-instant: 0;\n }\n}\n\n#root[data-menu] button {\n cursor: auto;\n}\n\n#root[data-menu] .menu button {\n cursor: pointer;\n}\n\n:host, #root, input, button {\n color: rgb(var(--em-rgb-color));\n font-family: var(--font-family);\n font-size: var(--font-size);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: normal;\n}\n\n*, :before, :after {\n box-sizing: border-box;\n min-width: 0;\n margin: 0;\n padding: 0;\n}\n\n.relative {\n position: relative;\n}\n\n.flex {\n display: flex;\n}\n\n.flex-auto {\n flex: none;\n}\n\n.flex-center {\n justify-content: center;\n}\n\n.flex-column {\n flex-direction: column;\n}\n\n.flex-grow {\n flex: auto;\n}\n\n.flex-middle {\n align-items: center;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.padding {\n padding: var(--padding);\n}\n\n.padding-t {\n padding-top: var(--padding);\n}\n\n.padding-lr {\n padding-left: var(--padding);\n padding-right: var(--padding);\n}\n\n.padding-r {\n padding-right: var(--padding);\n}\n\n.padding-small {\n padding: var(--padding-small);\n}\n\n.padding-small-b {\n padding-bottom: var(--padding-small);\n}\n\n.padding-small-lr {\n padding-left: var(--padding-small);\n padding-right: var(--padding-small);\n}\n\n.margin {\n margin: var(--padding);\n}\n\n.margin-r {\n margin-right: var(--padding);\n}\n\n.margin-l {\n margin-left: var(--padding);\n}\n\n.margin-small-l {\n margin-left: var(--padding-small);\n}\n\n.margin-small-lr {\n margin-left: var(--padding-small);\n margin-right: var(--padding-small);\n}\n\n.align-l {\n text-align: left;\n}\n\n.align-r {\n text-align: right;\n}\n\n.color-a {\n color: var(--color-a);\n}\n\n.color-b {\n color: var(--color-b);\n}\n\n.color-c {\n color: var(--color-c);\n}\n\n.ellipsis {\n white-space: nowrap;\n max-width: 100%;\n width: auto;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.sr-only {\n width: 1px;\n height: 1px;\n position: absolute;\n top: auto;\n left: -10000px;\n overflow: hidden;\n}\n\na {\n cursor: pointer;\n color: rgb(var(--em-rgb-accent));\n}\n\na:hover {\n text-decoration: underline;\n}\n\n.spacer {\n height: 10px;\n}\n\n[dir=\"rtl\"] .scroll {\n padding-left: 0;\n padding-right: var(--padding);\n}\n\n.scroll {\n padding-right: 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.scroll::-webkit-scrollbar {\n width: var(--sidebar-width);\n height: var(--sidebar-width);\n}\n\n.scroll::-webkit-scrollbar-track {\n border: 0;\n}\n\n.scroll::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n}\n\n.scroll::-webkit-scrollbar-corner {\n background-color: rgba(0, 0, 0, 0);\n}\n\n.scroll::-webkit-scrollbar-thumb {\n min-height: 20%;\n min-height: 65px;\n border: 4px solid rgb(var(--em-rgb-background));\n border-radius: 8px;\n}\n\n.scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--em-color-border-over) !important;\n}\n\n.scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--em-color-border);\n}\n\n.sticky {\n z-index: 1;\n background-color: rgba(var(--em-rgb-background), .9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n font-weight: 500;\n position: sticky;\n top: -1px;\n}\n\n[dir=\"rtl\"] .search input[type=\"search\"] {\n padding: 10px 2.2em 10px 2em;\n}\n\n[dir=\"rtl\"] .search .loupe {\n left: auto;\n right: .7em;\n}\n\n[dir=\"rtl\"] .search .delete {\n left: .7em;\n right: auto;\n}\n\n.search {\n z-index: 2;\n position: relative;\n}\n\n.search input, .search button {\n font-size: calc(var(--font-size) - 1px);\n}\n\n.search input[type=\"search\"] {\n width: 100%;\n background-color: var(--em-color-border);\n transition-duration: var(--duration);\n transition-property: background-color, box-shadow;\n transition-timing-function: var(--easing);\n border: 0;\n border-radius: 10px;\n outline: 0;\n padding: 10px 2em 10px 2.2em;\n display: block;\n}\n\n.search input[type=\"search\"]::-ms-input-placeholder {\n color: inherit;\n opacity: .6;\n}\n\n.search input[type=\"search\"]::placeholder {\n color: inherit;\n opacity: .6;\n}\n\n.search input[type=\"search\"], .search input[type=\"search\"]::-webkit-search-decoration, .search input[type=\"search\"]::-webkit-search-cancel-button, .search input[type=\"search\"]::-webkit-search-results-button, .search input[type=\"search\"]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n -ms-appearance: none;\n appearance: none;\n}\n\n.search input[type=\"search\"]:focus {\n background-color: rgb(var(--em-rgb-input));\n box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2);\n}\n\n.search .icon {\n z-index: 1;\n color: rgba(var(--em-rgb-color), .7);\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.search .loupe {\n pointer-events: none;\n left: .7em;\n}\n\n.search .delete {\n right: .7em;\n}\n\nsvg {\n fill: currentColor;\n width: 1em;\n height: 1em;\n}\n\nbutton {\n -webkit-appearance: none;\n -ms-appearance: none;\n appearance: none;\n cursor: pointer;\n color: currentColor;\n background-color: rgba(0, 0, 0, 0);\n border: 0;\n}\n\n#nav {\n z-index: 2;\n padding-top: 12px;\n padding-bottom: 12px;\n padding-right: var(--sidebar-width);\n position: relative;\n}\n\n#nav button {\n color: var(--color-b);\n transition: color var(--duration) var(--easing);\n}\n\n#nav button:hover {\n color: var(--color-a);\n}\n\n#nav svg, #nav img {\n width: var(--category-icon-size);\n height: var(--category-icon-size);\n}\n\n#nav[dir=\"rtl\"] .bar {\n left: auto;\n right: 0;\n}\n\n#nav .bar {\n width: 100%;\n height: 3px;\n background-color: rgb(var(--em-rgb-accent));\n transition: transform var(--duration) var(--easing);\n border-radius: 3px 3px 0 0;\n position: absolute;\n bottom: -12px;\n left: 0;\n}\n\n#nav button[aria-selected] {\n color: rgb(var(--em-rgb-accent));\n}\n\n#preview {\n z-index: 2;\n padding: calc(var(--padding) + 4px) var(--padding);\n padding-right: var(--sidebar-width);\n position: relative;\n}\n\n#preview .preview-placeholder {\n font-size: var(--preview-placeholder-size);\n}\n\n#preview .preview-title {\n font-size: var(--preview-title-size);\n}\n\n#preview .preview-subtitle {\n font-size: var(--preview-subtitle-size);\n}\n\n#nav:before, #preview:before {\n content: \"\";\n height: 2px;\n position: absolute;\n left: 0;\n right: 0;\n}\n\n#nav[data-position=\"top\"]:before, #preview[data-position=\"top\"]:before {\n background: linear-gradient(to bottom, var(--em-color-border), transparent);\n top: 100%;\n}\n\n#nav[data-position=\"bottom\"]:before, #preview[data-position=\"bottom\"]:before {\n background: linear-gradient(to top, var(--em-color-border), transparent);\n bottom: 100%;\n}\n\n.category:last-child {\n min-height: calc(100% + 1px);\n}\n\n.category button {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;\n position: relative;\n}\n\n.category button > * {\n position: relative;\n}\n\n.category button .background {\n opacity: 0;\n background-color: var(--em-color-border);\n transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.category button:hover .background {\n transition-duration: var(--duration-instant);\n transition-delay: 0s;\n}\n\n.category button[aria-selected] .background {\n opacity: 1;\n}\n\n.category button[data-keyboard] .background {\n transition: none;\n}\n\n.row {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.skin-tone-button {\n border: 1px solid rgba(0, 0, 0, 0);\n border-radius: 100%;\n}\n\n.skin-tone-button:hover {\n border-color: var(--em-color-border);\n}\n\n.skin-tone-button:active .skin-tone {\n transform: scale(.85) !important;\n}\n\n.skin-tone-button .skin-tone {\n transition: transform var(--duration) var(--easing);\n}\n\n.skin-tone-button[aria-selected] {\n background-color: var(--em-color-border);\n border-top-color: rgba(0, 0, 0, .05);\n border-bottom-color: rgba(0, 0, 0, 0);\n border-left-width: 0;\n border-right-width: 0;\n}\n\n.skin-tone-button[aria-selected] .skin-tone {\n transform: scale(.9);\n}\n\n.menu {\n z-index: 2;\n white-space: nowrap;\n border: 1px solid var(--em-color-border);\n background-color: rgba(var(--em-rgb-background), .9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n transition-property: opacity, transform;\n transition-duration: var(--duration);\n transition-timing-function: var(--easing);\n border-radius: 10px;\n padding: 4px;\n position: absolute;\n box-shadow: 1px 1px 5px rgba(0, 0, 0, .05);\n}\n\n.menu.hidden {\n opacity: 0;\n}\n\n.menu[data-position=\"bottom\"] {\n transform-origin: 100% 100%;\n}\n\n.menu[data-position=\"bottom\"].hidden {\n transform: scale(.9)rotate(-3deg)translateY(5%);\n}\n\n.menu[data-position=\"top\"] {\n transform-origin: 100% 0;\n}\n\n.menu[data-position=\"top\"].hidden {\n transform: scale(.9)rotate(3deg)translateY(-5%);\n}\n\n.menu input[type=\"radio\"] {\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n border: 0;\n margin: 0;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.menu input[type=\"radio\"]:checked + .option {\n box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));\n}\n\n.option {\n width: 100%;\n border-radius: 6px;\n padding: 4px 6px;\n}\n\n.option:hover {\n color: #fff;\n background-color: rgb(var(--em-rgb-accent));\n}\n\n.skin-tone {\n width: 16px;\n height: 16px;\n border-radius: 100%;\n display: inline-block;\n position: relative;\n overflow: hidden;\n}\n\n.skin-tone:after {\n content: \"\";\n mix-blend-mode: overlay;\n background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0));\n border: 1px solid rgba(0, 0, 0, .8);\n border-radius: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;\n}\n\n.skin-tone-1 {\n background-color: #ffc93a;\n}\n\n.skin-tone-2 {\n background-color: #ffdab7;\n}\n\n.skin-tone-3 {\n background-color: #e7b98f;\n}\n\n.skin-tone-4 {\n background-color: #c88c61;\n}\n\n.skin-tone-5 {\n background-color: #a46134;\n}\n\n.skin-tone-6 {\n background-color: #5d4437;\n}\n\n[data-index] {\n justify-content: space-between;\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone:after {\n box-shadow: none;\n border-color: rgba(0, 0, 0, .5);\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone-1 {\n background-color: #fade72;\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone-2 {\n background-color: #f3dfd0;\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone-3 {\n background-color: #eed3a8;\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone-4 {\n background-color: #cfad8d;\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone-5 {\n background-color: #a8805d;\n}\n\n[data-emoji-set=\"twitter\"] .skin-tone-6 {\n background-color: #765542;\n}\n\n[data-emoji-set=\"google\"] .skin-tone:after {\n box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4);\n}\n\n[data-emoji-set=\"google\"] .skin-tone-1 {\n background-color: #f5c748;\n}\n\n[data-emoji-set=\"google\"] .skin-tone-2 {\n background-color: #f1d5aa;\n}\n\n[data-emoji-set=\"google\"] .skin-tone-3 {\n background-color: #d4b48d;\n}\n\n[data-emoji-set=\"google\"] .skin-tone-4 {\n background-color: #aa876b;\n}\n\n[data-emoji-set=\"google\"] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=\"google\"] .skin-tone-6 {\n background-color: #61493f;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone:after {\n border-color: rgba(0, 0, 0, .4);\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone-1 {\n background-color: #f5c748;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone-2 {\n background-color: #f1d5aa;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone-3 {\n background-color: #d4b48d;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone-4 {\n background-color: #aa876b;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=\"facebook\"] .skin-tone-6 {\n background-color: #61493f;\n}\n\n"; + +function $e5534fc185f7111e$export$2e2bcd8739ae039(props) { + const ref = (react.useRef)(null); + const instance = (react.useRef)(null); + if (instance.current) instance.current.update(props); + (react.useEffect)(() => { + instance.current = new ($efa000751917694d$export$2e2bcd8739ae039)({ ...props, + ref: ref + }); + return () => { + instance.current = null; + }; + }, []); + return /*#__PURE__*/(react).createElement("div", { + ref: ref + }); +} + class EmojiToolbar extends react.Component { constructor(props) { super(props); - this.handleClickOutside = evt => { + this.handleClickOutside = _evt => { this.onClose(); }; this.onClose = props.onClose; @@ -104177,7 +98835,7 @@ class EmojiToolbar extends react.Component { } render() { return (react.createElement("div", null, - react.createElement(dist.NimblePicker, { onSelect: this.props.onSelect, autoFocus: true, native: this.props.isNative, set: 'twitter', data: twitterData, theme: this.props.theme }))); + react.createElement($e5534fc185f7111e$export$2e2bcd8739ae039, { onEmojiSelect: this.props.onSelect, autoFocus: true, data: this.props.isNative ? nativeData : twitterData, theme: this.props.theme, set: this.props.isNative ? 'native' : 'twitter' }))); } } @@ -104190,23 +98848,32 @@ function insertText(editor, text) { return; const cursor = editor.getCursor('from'); editor.replaceRange(text, cursor, cursor); - app.commands.executeCommandById("editor:focus"); - app.workspace.activeLeaf.view.editor.exec("goRight"); + editor.setCursor({ line: cursor.line, ch: cursor.ch + text.length }); +} +function getActiveView(workspace) { + const markdownView = workspace.getActiveViewOfType(obsidian.MarkdownView); + if (markdownView) { + return markdownView; + } + const itemView = workspace.getActiveViewOfType(obsidian.ItemView); + if (itemView?.getViewType() === 'canvas') { + return itemView.canvas; + } } class EmojiModal extends obsidian.Modal { constructor(app, theme, isNative, editor) { super(app); this.reactComponent = react.createElement(EmojiToolbar, { - "onSelect": async (emoji) => { + onSelect: async (emoji) => { this.close(); await sleep(10); insertText(editor, emoji.native); }, - "onClose": () => { + onClose: () => { this.close(); }, - "theme": theme, - "isNative": isNative, + theme: theme, + isNative: isNative, }); } async onOpen() { @@ -104221,7 +98888,7 @@ class EmojiModal extends obsidian.Modal { } } const DEFAULT_SETTINGS = { - twitterEmojiActive: false + twitterEmojiActive: false, }; class EmojiPickerPlugin extends obsidian.Plugin { async onload() { @@ -104234,30 +98901,24 @@ class EmojiPickerPlugin extends obsidian.Plugin { id: 'emoji-picker:open-picker', name: 'Open emoji picker', hotkeys: [], - checkCallback: async (checking) => { - const leaf = this.app.workspace.activeLeaf; - if (leaf) { - if (!checking) { - try { - const theme = this.app.getTheme() === 'moonstone' ? 'light' : 'dark'; - const isNative = !this.settings.twitterEmojiActive; - const view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); - if (!view) { - return; - } - const myModal = new EmojiModal(this.app, theme, isNative, view.editor); - myModal.open(); - document.getElementsByClassName("emoji-mart-search")[0].getElementsByTagName('input')[0].focus(); - document.getElementsByClassName("emoji-mart-search")[0].getElementsByTagName('input')[0].select(); - } - catch (e) { - new obsidian.Notice(e.message); + editorCheckCallback: (checking, editor) => { + if (!checking) { + try { + const activeView = getActiveView(this.app.workspace); + const theme = this.app.isDarkMode() ? 'dark' : 'light'; + const isNative = !this.settings.twitterEmojiActive; + if (!activeView) { + return; } + const myModal = new EmojiModal(this.app, theme, isNative, editor); + myModal.open(); + } + catch (e) { + new obsidian.Notice(`Error opening emoji picker: ${e.message}`); } - return true; } - return false; - } + return true; + }, }); } async loadSettings() { @@ -104268,7 +98929,7 @@ class EmojiPickerPlugin extends obsidian.Plugin { } } EmojiPickerPlugin.postprocessor = (el) => { - twemoji_npm.parse(el); + twemoji.parse(el); }; class SettingsTab extends obsidian.PluginSettingTab { constructor(app, plugin) { @@ -104282,11 +98943,9 @@ class SettingsTab extends obsidian.PluginSettingTab { containerEl.createEl('a', { text: 'Created by oliveryh', href: 'https://github.com/oliveryh/' }); containerEl.createEl('h2', { text: 'Settings' }); new obsidian.Setting(containerEl) - .setName('Twitter Emoji (v13)') + .setName('Twitter Emoji (v16)') .setDesc('Improved emoji support, but may cause unexpected behavior.') - .addToggle(toggle => toggle - .setValue(this.plugin.settings.twitterEmojiActive) - .onChange(async (value) => { + .addToggle(toggle => toggle.setValue(this.plugin.settings.twitterEmojiActive).onChange(async (value) => { this.plugin.settings.twitterEmojiActive = value; await this.plugin.saveSettings(); if (value) { diff --git a/.obsidian/plugins/obsidian-emoji-toolbar/manifest.json b/.obsidian/plugins/obsidian-emoji-toolbar/manifest.json index 558fddf..cee4b41 100644 --- a/.obsidian/plugins/obsidian-emoji-toolbar/manifest.json +++ b/.obsidian/plugins/obsidian-emoji-toolbar/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-emoji-toolbar", "name": "Emoji Toolbar", - "version": "0.4.1", + "version": "1.0.0", "description": "Quickly search for and insert emojis into your notes.", "author": "oliveryh", "authorUrl": "https://github.com/oliveryh/obsidian-emoji-toolbar", diff --git a/.obsidian/plugins/obsidian-emoji-toolbar/styles.css b/.obsidian/plugins/obsidian-emoji-toolbar/styles.css index 9b0eb33..55f083f 100644 --- a/.obsidian/plugins/obsidian-emoji-toolbar/styles.css +++ b/.obsidian/plugins/obsidian-emoji-toolbar/styles.css @@ -6,500 +6,26 @@ img.emoji { display: inline-block; } -.emoji-mart, -.emoji-mart * { - box-sizing: border-box; - line-height: 1.15; -} - -.emoji-mart { - font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; - font-size: 16px; - display: inline-block; - color: #222427; - border: 1px solid #d9d9d9; - border-radius: 5px; - background: #fff; -} - -.emoji-mart .emoji-mart-emoji { - padding: 6px !important; -} - -.emoji-mart-bar { - border: 0 solid #d9d9d9; -} -.emoji-mart-bar:first-child { - border-bottom-width: 1px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} -.emoji-mart-bar:last-child { - border-top-width: 1px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} - -.emoji-mart-anchors { - display: flex; - flex-direction: row; - justify-content: space-between; - padding: 0 6px; - line-height: 0; -} - -.emoji-mart-anchor { - position: relative; - display: block; - flex: 1 1 auto; - color: #858585; - text-align: center; - padding: 12px 4px !important; - overflow: hidden; - transition: color .1s ease-out; - margin: 0 !important; - box-shadow: none !important; - background: none !important; - border: none !important; -} -.emoji-mart-anchor:focus { outline: 0 } -.emoji-mart-anchor:hover, -.emoji-mart-anchor:focus, -.emoji-mart-anchor-selected { - color: #464646; -} - -.emoji-mart-anchor-selected .emoji-mart-anchor-bar { - bottom: 0; -} - -.emoji-mart-anchor-bar { - position: absolute; - bottom: -3px; left: 0; - width: 100%; height: 3px; - background-color: #464646; -} - -.emoji-mart-anchors i { - display: inline-block; - width: 100%; - max-width: 22px; -} - -.emoji-mart-anchors svg, -.emoji-mart-anchors img { - fill: currentColor; - height: 18px; - width: 18px; -} - -.emoji-mart-scroll { - overflow-y: scroll; - overflow-x: hidden; - height: 270px; - padding: 0 6px 6px 6px; - will-change: transform; /* avoids "repaints on scroll" in mobile Chrome */ -} - -.emoji-mart-search { - margin-top: 6px; - padding: 0 6px; - position: relative; -} - -.emoji-mart-search input { - font-size: 16px; - display: block; - width: 100%; - padding: 5px 25px 6px 10px; - border-radius: 5px; - border: 1px solid #d9d9d9; - outline: 0; -} - -.emoji-mart-search input, -.emoji-mart-search input::-webkit-search-decoration, -.emoji-mart-search input::-webkit-search-cancel-button, -.emoji-mart-search input::-webkit-search-results-button, -.emoji-mart-search input::-webkit-search-results-decoration { - /* remove webkit/blink styles for - * via https://stackoverflow.com/a/9422689 */ - -webkit-appearance: none; -} - -.emoji-mart-search-icon { - position: absolute; - top: 7px; - right: 11px; - z-index: 2; - padding: 2px 5px 1px; - border: none !important; - box-shadow: none !important; - background: none !important; -} - -.emoji-mart-category .emoji-mart-emoji span { - z-index: 1; - position: relative; - text-align: center; - cursor: default; -} - -.emoji-mart-category .emoji-mart-emoji:focus { outline: 0 } - -.emoji-mart-category .emoji-mart-emoji:hover:before, -.emoji-mart-category .emoji-mart-emoji:focus:before { - z-index: 0; - content: ""; - position: absolute; - top: 0; left: 0; - width: 100%; height: 100%; - background-color: #c5c5c5; - border-radius: 100%; -} - -.emoji-mart-category-label { - z-index: 2; - position: relative; - position: -webkit-sticky; - position: sticky; - top: 0; -} - -.emoji-mart-category-label span { - display: block; - width: 100%; - font-weight: 500; - padding: 5px 6px; - background-color: #fff; - background-color: rgba(255, 255, 255, .95); -} - -.emoji-mart-category-list { - border-spacing: 0; - margin: 0; - padding: 0; -} - -.emoji-mart-category-list td { - margin: 0; - padding: 0; -} - -.emoji-mart-emoji { - position: relative; - display: inline-block; - font-size: 0; - margin: 0 !important; - padding: 0 !important; - border: none !important; - background: none !important; - box-shadow: none !important; -} - -.emoji-mart-emoji-native { - font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"; -} - -.emoji-mart-no-results { - font-size: 14px; - text-align: center; - padding-top: 70px; - color: #858585; -} -.emoji-mart-no-results-img { - display: block; - margin-left: auto; - margin-right: auto; - width: 50%; -} -.emoji-mart-no-results .emoji-mart-category-label { - display: none; -} -.emoji-mart-no-results .emoji-mart-no-results-label { - margin-top: .2em; -} -.emoji-mart-no-results .emoji-mart-emoji:hover:before { - content: none; -} - -.emoji-mart-preview { - position: relative; - height: 70px; -} - -.emoji-mart-preview-emoji, -.emoji-mart-preview-data, -.emoji-mart-preview-skins { - position: absolute; - top: 50%; - transform: translateY(-50%); -} - -.emoji-mart-preview-emoji { - left: 12px; -} - -.emoji-mart-preview-data { - left: 68px; right: 12px; - word-break: break-all; -} - -.emoji-mart-preview-skins { - right: 30px; - text-align: right; -} - -.emoji-mart-preview-skins.custom { - right: 10px; - text-align: right; -} - -.emoji-mart-preview-name { - font-size: 14px; -} - -.emoji-mart-preview-shortname { - font-size: 12px; - color: #888; -} -.emoji-mart-preview-shortname + .emoji-mart-preview-shortname, -.emoji-mart-preview-shortname + .emoji-mart-preview-emoticon, -.emoji-mart-preview-emoticon + .emoji-mart-preview-emoticon { - margin-left: .5em; -} - -.emoji-mart-preview-emoticon { - font-size: 11px; - color: #bbb; -} - -.emoji-mart-title span { - display: inline-block; - vertical-align: middle; -} - -.emoji-mart-title .emoji-mart-emoji { - padding: 0; -} - -.emoji-mart-title-label { - color: #999A9C; - font-size: 26px; - font-weight: 300; -} - -.emoji-mart-skin-swatches { - font-size: 0; - padding: 2px 0; - border: 1px solid #d9d9d9; - border-radius: 12px; - background-color: #fff; -} - -.emoji-mart-skin-swatches.custom { - font-size: 0; - border: none; - background-color: #fff; -} - -.emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch { - width: 16px; - padding: 0 2px; -} - -.emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected:after { - opacity: .75; -} - -.emoji-mart-skin-swatch { - display: inline-block; - width: 0; - vertical-align: middle; - transition-property: width, padding; - transition-duration: .125s; - transition-timing-function: ease-out; -} - -.emoji-mart-skin-swatch:nth-child(1) { transition-delay: 0s } -.emoji-mart-skin-swatch:nth-child(2) { transition-delay: .03s } -.emoji-mart-skin-swatch:nth-child(3) { transition-delay: .06s } -.emoji-mart-skin-swatch:nth-child(4) { transition-delay: .09s } -.emoji-mart-skin-swatch:nth-child(5) { transition-delay: .12s } -.emoji-mart-skin-swatch:nth-child(6) { transition-delay: .15s } - -.emoji-mart-skin-swatch.selected { - position: relative; - width: 16px; - padding: 0 2px; -} - -.emoji-mart-skin-swatch.selected:after { - content: ""; - position: absolute; - top: 50%; left: 50%; - width: 4px; height: 4px; - margin: -2px 0 0 -2px; - background-color: #fff; - border-radius: 100%; - pointer-events: none; - opacity: 0; - transition: opacity .2s ease-out; -} - -.emoji-mart-skin-swatch.custom { - display: inline-block; - width: 0; - height: 38px; - overflow: hidden; - vertical-align: middle; - transition-property: width, height; - transition-duration: .125s; - transition-timing-function: ease-out; - cursor: default; -} - -.emoji-mart-skin-swatch.custom.selected { - position: relative; - width: 36px; - height: 38px; - padding: 0 2px 0 0; -} - -.emoji-mart-skin-swatch.custom.selected:after { - content: ""; - width: 0; - height: 0; -} - -.emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover { - background-color: #f4f4f4; - border-radius: 10%; -} - -.emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom { - width: 36px; - height: 38px; - padding: 0 2px 0 0; -} - -.emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected:after { - opacity: .75; -} - -.emoji-mart-skin-text.opened { - display: inline-block; - vertical-align: middle; - text-align: left; - color: #888; - font-size: 11px; - padding: 5px 2px; - width: 95px; - height: 40px; - border-radius: 10%; - background-color: #fff; -} - -.emoji-mart-skin { - display: inline-block; - width: 100%; - padding-top: 100%; - max-width: 12px; - border-radius: 100%; -} - -.emoji-mart-skin-tone-1 { background-color: #ffc93a } -.emoji-mart-skin-tone-2 { background-color: #fadcbc } -.emoji-mart-skin-tone-3 { background-color: #e0bb95 } -.emoji-mart-skin-tone-4 { background-color: #bf8f68 } -.emoji-mart-skin-tone-5 { background-color: #9b643d } -.emoji-mart-skin-tone-6 { background-color: #594539 } - -/* For screenreaders only, via https://stackoverflow.com/a/19758620 */ -.emoji-mart-sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} - -/* - * Dark mode styles - */ - -.emoji-mart-dark { - color: #fff; - border-color: #555453; - background-color: #222; -} - -.emoji-mart-dark .emoji-mart-bar { - border-color: #555453; -} - -.emoji-mart-dark .emoji-mart-search input { - color: #fff; - border-color: #555453; - background-color: #2f2f2f; -} - -.emoji-mart-dark .emoji-mart-search-icon svg { - fill: #fff; -} - -.emoji-mart-category .emoji-mart-emoji { - background-color: unset !important; -} - -.emoji-mart-anchor { - background-color: unset !important; -} - -.emoji-mart-search-icon { - background-color: unset !important; -} - -.emoji-mart-dark .emoji-mart-category .emoji-mart-emoji:hover:before, -.emoji-mart-dark .emoji-mart-category .emoji-mart-emoji:focus:before { - background-color: #888; -} - -.emoji-mart-dark .emoji-mart-category-label span { - background-color: #222; - color: #fff; -} - -.emoji-mart-dark .emoji-mart-skin-swatches { - border-color: #555453; - background-color: #222; -} - -.emoji-mart-dark .emoji-mart-anchor:hover, -.emoji-mart-dark .emoji-mart-anchor:focus, -.emoji-mart-dark .emoji-mart-anchor-selected { - color: #bfbfbf; -} - #emoji-modal { padding: 0px; min-width: unset; width: unset !important; -} -#emoji-modal > .modal-content { - margin-top: 0px; -} + .modal-header { + display: none; + } -#emoji-modal > button { - background-color: unset; - border: 0px !important; - box-shadow: 0px !important; -} + .modal-content { + margin-top: 0px; + } -#emoji-modal > .modal-close-button { - visibility: hidden; -} \ No newline at end of file + .button { + background-color: unset; + border: 0px !important; + box-shadow: 0px !important; + } + + .modal-close-button { + visibility: hidden; + } +} diff --git a/.obsidian/plugins/obsidian-excalidraw-plugin/data.json b/.obsidian/plugins/obsidian-excalidraw-plugin/data.json deleted file mode 100644 index 2d7ea5c..0000000 --- a/.obsidian/plugins/obsidian-excalidraw-plugin/data.json +++ /dev/null @@ -1,4664 +0,0 @@ -{ - "disableDoubleClickTextEditing": false, - "folder": "Documents/Drawings", - "cropFolder": "", - "annotateFolder": "", - "embedUseExcalidrawFolder": false, - "templateFilePath": "Templates/Excalidraw", - "scriptFolderPath": "Templates/Excalidraw/Scripts", - "fontAssetsPath": "Excalidraw/CJK Fonts", - "loadChineseFonts": false, - "loadJapaneseFonts": false, - "loadKoreanFonts": false, - "compress": true, - "decompressForMDView": false, - "onceOffCompressFlagReset": true, - "onceOffGPTVersionReset": true, - "autosave": true, - "autosaveIntervalDesktop": 60000, - "autosaveIntervalMobile": 30000, - "drawingFilenamePrefix": "Drawing ", - "drawingEmbedPrefixWithFilename": true, - "drawingFilnameEmbedPostfix": " ", - "drawingFilenameDateTime": "YYYY-MM-DD HH.mm.ss", - "useExcalidrawExtension": true, - "cropSuffix": "", - "cropPrefix": "cropped_", - "annotateSuffix": "", - "annotatePrefix": "annotated_", - "annotatePreserveSize": false, - "previewImageType": "SVGIMG", - "renderingConcurrency": 3, - "allowImageCache": true, - "allowImageCacheInScene": true, - "displayExportedImageIfAvailable": false, - "previewMatchObsidianTheme": false, - "width": "400", - "height": "", - "overrideObsidianFontSize": false, - "dynamicStyling": "colorful", - "isLeftHanded": false, - "iframeMatchExcalidrawTheme": true, - "matchTheme": false, - "matchThemeAlways": false, - "matchThemeTrigger": false, - "defaultMode": "normal", - "defaultPenMode": "never", - "penModeDoubleTapEraser": true, - "penModeSingleFingerPanning": true, - "penModeCrosshairVisible": true, - "panWithRightMouseButton": false, - "renderImageInMarkdownReadingMode": false, - "renderImageInHoverPreviewForMDNotes": false, - "renderImageInMarkdownToPDF": false, - "allowPinchZoom": false, - "allowWheelZoom": false, - "zoomToFitOnOpen": true, - "zoomToFitOnResize": false, - "zoomToFitMaxLevel": 2, - "zoomStep": 0.05, - "zoomMin": 0.1, - "zoomMax": 30, - "linkPrefix": "📍", - "urlPrefix": "🌐", - "parseTODO": false, - "todo": "☐", - "done": "🗹", - "hoverPreviewWithoutCTRL": false, - "linkOpacity": 1, - "openInAdjacentPane": true, - "showSecondOrderLinks": true, - "focusOnFileTab": true, - "openInMainWorkspace": true, - "showLinkBrackets": true, - "allowCtrlClick": true, - "forceWrap": false, - "pageTransclusionCharLimit": 200, - "wordWrappingDefault": 0, - "removeTransclusionQuoteSigns": true, - "iframelyAllowed": true, - "pngExportScale": 1, - "exportWithTheme": true, - "exportWithBackground": true, - "exportPaddingSVG": 10, - "exportEmbedScene": false, - "keepInSync": false, - "autoexportSVG": false, - "autoexportPNG": false, - "autoExportLightAndDark": false, - "autoexportExcalidraw": false, - "embedType": "excalidraw", - "embedMarkdownCommentLinks": true, - "embedWikiLink": true, - "syncExcalidraw": false, - "experimentalFileType": false, - "experimentalFileTag": "✏️", - "experimentalLivePreview": true, - "fadeOutExcalidrawMarkup": false, - "loadPropertySuggestions": false, - "experimentalEnableFourthFont": false, - "experimantalFourthFont": "Virgil", - "addDummyTextElement": false, - "zoteroCompatibility": false, - "fieldSuggester": true, - "compatibilityMode": false, - "drawingOpenCount": 0, - "library": "deprecated", - "library2": { - "type": "excalidrawlib", - "version": 2, - "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.16.1", - "libraryItems": [ - { - "id": "he-s7yNp1I7DIxUPGw9zL", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 2188, - "versionNonce": 82407408, - "isDeleted": false, - "id": "KG2a5_KeLMkS-E196REYo", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -123.06225179505904, - "y": 166.5003996442319, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 55.62921974281601, - "height": 51.201385977351684, - "seed": 1070470404, - "groupIds": [ - "Rg_2S3K3IF5nvOvF_Uee9" - ], - "boundElements": [], - "updated": 1761685666828, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 2252, - "versionNonce": 748275472, - "isDeleted": false, - "id": "wjTElwUhJWM8jl3CsUoM1", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -98.41240309855979, - "y": 217.41800887259404, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.7296292860039104, - "height": 62.07302017561529, - "seed": 2072816956, - "groupIds": [ - "Rg_2S3K3IF5nvOvF_Uee9" - ], - "boundElements": [], - "updated": 1761685666828, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.7296292860039104, - 62.07302017561529 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2205, - "versionNonce": 1477833200, - "isDeleted": false, - "id": "OU2ZzWFNje_FxXQhxSrz1", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -100.89856271256699, - "y": 281.0807750137107, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 24.57187279022971, - "height": 37.855374086622675, - "seed": 1389155460, - "groupIds": [ - "Rg_2S3K3IF5nvOvF_Uee9" - ], - "boundElements": [], - "updated": 1761685666828, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 24.57187279022971, - 37.855374086622675 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2224, - "versionNonce": 1374577936, - "isDeleted": false, - "id": "STrIysfcP3DF1sgcF8Pl_", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -102.15397352109048, - "y": 279.78627669393023, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 23.26521467347229, - "height": 34.011101841242805, - "seed": 746300860, - "groupIds": [ - "Rg_2S3K3IF5nvOvF_Uee9" - ], - "boundElements": [], - "updated": 1761685666828, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -23.26521467347229, - 34.011101841242805 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2243, - "versionNonce": 1449276400, - "isDeleted": false, - "id": "TkFTCSyiI9dqb9CsLtfZ1", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -132.346610851176, - "y": 252.69051397573497, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 32.48711994829731, - "height": 20.807832195149214, - "seed": 650617860, - "groupIds": [ - "Rg_2S3K3IF5nvOvF_Uee9" - ], - "boundElements": [], - "updated": 1761685666828, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 32.48711994829731, - -20.807832195149214 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2319, - "versionNonce": 1593787152, - "isDeleted": false, - "id": "455UedYy4BGpvC_F4AA1H", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -98.02649804461123, - "y": 232.4866977205792, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 20.636027957067586, - "height": 25.894951885267858, - "seed": 1173851708, - "groupIds": [ - "Rg_2S3K3IF5nvOvF_Uee9" - ], - "boundElements": [], - "updated": 1761685666828, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 20.636027957067586, - 25.894951885267858 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - } - ], - "created": 1659863337886, - "name": "Stick man" - }, - { - "id": "9zrtazACY1Qygk5P6SV1q", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 1658, - "versionNonce": 97924592, - "isDeleted": false, - "id": "nyRenfYMWt3La2jhQx7AZ", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 22.083452870714815, - "y": 201.53656875638427, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 44.169759425803804, - "height": 40.6540467643249, - "seed": 987881404, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 1722, - "versionNonce": 306471184, - "isDeleted": false, - "id": "6nUD0W6_P_RwyHcMs0zH-", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 42.34999714253193, - "y": 241.96445101722395, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.167333452488185, - "height": 49.28615538139134, - "seed": 1148848644, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.167333452488185, - 49.28615538139134 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1676, - "versionNonce": 1803155440, - "isDeleted": false, - "id": "3urM7_GpFRhi6RU06eEfR", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 39.76582736074327, - "y": 293.2283049345407, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 19.510137204936473, - "height": 30.057275189373165, - "seed": 1602652220, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 19.510137204936473, - 30.057275189373165 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1680, - "versionNonce": 456507152, - "isDeleted": false, - "id": "L5L_cXFeBtmhgHkNi0jwm", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 39.15825005471304, - "y": 292.36657384171957, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 18.783346090897325, - "height": 25.733119709460734, - "seed": 674376068, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -18.783346090897325, - 25.733119709460734 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1629, - "versionNonce": 727022064, - "isDeleted": false, - "id": "ObfJaCtbBtoPiEN8YHgse", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 22.817407016393396, - "y": 251.65269322317852, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 18.951759311642757, - "height": 18.19071092374616, - "seed": 1250042044, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 18.951759311642757, - 18.19071092374616 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1649, - "versionNonce": 2051759376, - "isDeleted": false, - "id": "RCTAPVhvnBrzSvCYpHC-7", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 43.318031179378735, - "y": 269.97631048360097, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 27.310883180876726, - "height": 15.402957589820515, - "seed": 783964420, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 27.310883180876726, - -15.402957589820515 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1669, - "versionNonce": 678476784, - "isDeleted": false, - "id": "xXhYr6hU-4lbhS6d63ci7", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 15.002544491964933, - "y": 205.39261439120475, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 63.46164769486781, - "height": 12.911229185001785, - "seed": 1937156412, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 63.46164769486781, - 12.911229185001785 - ] - ], - "index": "a6", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "rectangle", - "version": 2101, - "versionNonce": 1627208464, - "isDeleted": false, - "id": "CCnysmYYO2hXkcEGjY9sQ", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0.1875122815022081, - "x": 35.2005800824829, - "y": 164.14574962562648, - "strokeColor": "#000000", - "backgroundColor": "#fff", - "width": 32.71500022666033, - "height": 45.980903261711745, - "seed": 596678788, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a7", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 1358, - "versionNonce": 617856496, - "isDeleted": false, - "id": "U1Fe_TaHlddqt9h4dT7TK", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 44.37527214095665, - "y": 230.7226422632981, - "strokeColor": "#000000", - "backgroundColor": "#000", - "width": 53.20883302704749, - "height": 12.438499241734943, - "seed": 231088572, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 16.057917597112322, - 6.049076792861201 - ], - [ - 22.482826275609803, - 5.465194911879904 - ], - [ - 27.39425009598468, - 2.016358930953765 - ], - [ - 23.850013402912772, - 10.166502906931791 - ], - [ - 15.774030333735844, - 10.636936235909024 - ], - [ - -0.1619724876934452, - 6.53463659543896 - ], - [ - -16.495069149918784, - 8.744614388479818 - ], - [ - -25.81458293106281, - -1.8015630058259184 - ], - [ - -16.48461931200311, - 3.816409289419604 - ], - [ - 0, - 0 - ] - ], - "index": "a8", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "ellipse", - "version": 719, - "versionNonce": 298014992, - "isDeleted": false, - "id": "H1noqF55M0rHxJNVbRVOg", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 26.875170247896882, - "y": 214.05611266492684, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 14.47032432846386, - "height": 11.522877502139076, - "seed": 846391300, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a9", - "frameId": null, - "roundness": null - }, - { - "type": "ellipse", - "version": 559, - "versionNonce": 1636204528, - "isDeleted": false, - "id": "RNDm8R9eOE5KAVL-QwbcE", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 33.4414564453966, - "y": 218.60074775336176, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 0.7549734432242013, - "height": 0.9913792688802648, - "seed": 278039100, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "aA", - "frameId": null, - "roundness": null - }, - { - "type": "ellipse", - "version": 560, - "versionNonce": 1075164944, - "isDeleted": false, - "id": "5g1FM-2-P6Bf3pmG3qyBH", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 53.30335879770267, - "y": 220.31278349077417, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 0.7625994376002037, - "height": 1.2964190439203462, - "seed": 1600079748, - "groupIds": [ - "q5vR3527Argdc9bxBrUQR" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "aB", - "frameId": null, - "roundness": null - } - ], - "created": 1659863333942, - "name": "Moustache man" - }, - { - "id": "htqTttEg3EGJTiMbMxDaW", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 1412, - "versionNonce": 1049690608, - "isDeleted": false, - "id": "f3ExTb0HOj1Nl5__n_tpJ", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 205.28284435227738, - "y": 166.14356907873884, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 48.05529909659412, - "height": 52.730902963267106, - "seed": 1052631740, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 1382, - "versionNonce": 1886147856, - "isDeleted": false, - "id": "Wk2OIP3ibhUO8ajT_JJvQ", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 226.84974708870845, - "y": 219.03322848540023, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.7078761127437083, - "height": 61.57834305239284, - "seed": 2123609860, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.7078761127437083, - 61.57834305239284 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1335, - "versionNonce": 1526416368, - "isDeleted": false, - "id": "DTW7aLPUzFSY5eQxU1Yuh", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 224.25636249021386, - "y": 282.3197593009819, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 24.376052717198476, - "height": 37.55369410555039, - "seed": 787098428, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 24.376052717198476, - 37.55369410555039 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1311, - "versionNonce": 1480536848, - "isDeleted": false, - "id": "UVRc5-RAXx9hiGotXwaHd", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 220.89321864322824, - "y": 279.79743362808983, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 20.856847311132707, - "height": 34.887159612848606, - "seed": 747517572, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -20.856847311132707, - 34.887159612848606 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1288, - "versionNonce": 885868016, - "isDeleted": false, - "id": "PkY1A6JErE9CrdZ-XtDvv", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 203.51782379802876, - "y": 231.04173951378573, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 23.678412878991605, - "height": 22.727555618028187, - "seed": 1400464316, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 23.678412878991605, - 22.727555618028187 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1308, - "versionNonce": 1040601360, - "isDeleted": false, - "id": "sUQBSFB_LQ7Xu6Ypl4vRa", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 228.70161712863387, - "y": 253.30218728807552, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 34.12233964207367, - "height": 19.244524129499055, - "seed": 1175242244, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 34.12233964207367, - -19.244524129499055 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1539, - "versionNonce": 1225721840, - "isDeleted": false, - "id": "cdKc-kdSnuv1893-ebAeN", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 249.01274631875253, - "y": 180.06516526177455, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 40.267115590408615, - "height": 19.656485851742378, - "seed": 42830908, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -12.409465305563225, - 9.291617897339462 - ], - [ - -33.011397185814445, - 3.8364242371273978 - ], - [ - -40.267115590408615, - 19.656485851742378 - ] - ], - "index": "a6", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1810, - "versionNonce": 1496952592, - "isDeleted": false, - "id": "n9z6xbZ3w6aeaJC0crAJv", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 208.49371231809323, - "y": 180.230236625288, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 16.221138648124743, - "height": 46.280297095961245, - "seed": 1611490692, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -1.597253039270119, - -7.202137263877104 - ], - [ - -8.23487345177416, - -8.7917478547018 - ], - [ - -16.221138648124743, - 3.7128163008893207 - ], - [ - -11.812192242205574, - 37.48854924125944 - ], - [ - -6.290008869522399, - 20.871670868279992 - ], - [ - 0, - 0 - ] - ], - "index": "a7", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "rectangle", - "version": 777, - "versionNonce": 868780528, - "isDeleted": false, - "id": "5bzIH_rXyftQKTB57BYZa", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0.32340402082123276, - "x": 193.43675860164853, - "y": 217.455545199828, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 13.51063521853309, - "height": 28.09316498014444, - "seed": 2114495676, - "groupIds": [ - "fzxxIEt8xy-wkGIaUQIqQ" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a8", - "frameId": null, - "roundness": null - } - ], - "created": 1659863331552, - "name": "Girl" - }, - { - "id": "duwdHQLjqD0sRCc7QNxr-", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 1702, - "versionNonce": 844188944, - "isDeleted": false, - "id": "r5ZRwIEnUhghoAKMrZlL0", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 382.05138463482194, - "y": 179.6541261680506, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 57.323583882636484, - "height": 52.76088641094056, - "seed": 1639744388, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 1766, - "versionNonce": 1342295024, - "isDeleted": false, - "id": "FEHUh3tXhwiVmWiJcH6_d", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 407.52434510579747, - "y": 232.4297517432422, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.8127687943161055, - "height": 63.96365067379871, - "seed": 149055164, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.8127687943161055, - 63.96365067379871 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1719, - "versionNonce": 46476048, - "isDeleted": false, - "id": "sPmUo-fhxLyPyhXaBlnvO", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 405.10644735063374, - "y": 297.793760980095, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 25.320287028223284, - "height": 39.00837944331107, - "seed": 971600644, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 25.320287028223284, - 39.00837944331107 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1733, - "versionNonce": 1472384496, - "isDeleted": false, - "id": "dy8GbW1jMkW5bSVOlngEs", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 404.9543646210531, - "y": 296.05918449729955, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 25.23461623236952, - "height": 35.02587564704395, - "seed": 1239297852, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -25.23461623236952, - 35.02587564704395 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1706, - "versionNonce": 353192208, - "isDeleted": false, - "id": "-7OVTXBq7NxMQJzE2lggd", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 383.0358858004254, - "y": 244.55154354689097, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 21.530293221656166, - "height": 22.395255469513813, - "seed": 1842115204, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 21.530293221656166, - 22.395255469513813 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1718, - "versionNonce": 68390896, - "isDeleted": false, - "id": "U3A0bgv_z_yehAJo5B9ZV", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 406.46004399259107, - "y": 267.11661494553056, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 38.47943884445988, - "height": 19.337282032879873, - "seed": 2035083196, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 38.47943884445988, - -19.337282032879873 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 1713, - "versionNonce": 614573840, - "isDeleted": false, - "id": "CCwfN7uCCXJTCvtsa8Dop", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 372.6947134109648, - "y": 184.2804755941052, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 82.36062709551143, - "height": 16.75621372712345, - "seed": 1008960004, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 82.36062709551143, - 16.75621372712345 - ] - ], - "index": "a6", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "rectangle", - "version": 2020, - "versionNonce": 754717168, - "isDeleted": false, - "id": "uHRKxDnmXCAJiwR5d01Rf", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0.1875122815022081, - "x": 391.1109970279392, - "y": 173.31610064690636, - "strokeColor": "#000000", - "backgroundColor": "#fff", - "width": 49.294791600141856, - "height": 17.004485774650487, - "seed": 726700092, - "groupIds": [ - "Vd0gRs9KmeZCaDcbNHIa3" - ], - "boundElements": [], - "updated": 1761685666830, - "link": null, - "locked": false, - "index": "a7", - "frameId": null, - "roundness": null - } - ], - "created": 1659863329739, - "name": "Guy" - }, - { - "id": "szVDRHk9owsDtBk457AgQ", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 2844, - "versionNonce": 1039811856, - "isDeleted": false, - "id": "_CN3enmKi9anaEqoqGotY", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 3.539098529970085, - "x": 547.802272387177, - "y": 169.91489066375237, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 55.91828172573701, - "height": 51.46743993653606, - "seed": 463121852, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 2547, - "versionNonce": 1770279920, - "isDeleted": false, - "id": "DTNTzWrLd9ZhY84OWPaSQ", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 573.7173790485947, - "y": 223.42295238353842, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.74381305593093, - "height": 62.39556560013866, - "seed": 50142212, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.74381305593093, - 62.39556560013866 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2500, - "versionNonce": 512697104, - "isDeleted": false, - "id": "UEhEq6L8qGkGedNOArfZx", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 571.3549756837353, - "y": 287.5035617883091, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 24.699553787836084, - "height": 38.05207915543875, - "seed": 200644156, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 24.699553787836084, - 38.05207915543875 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2514, - "versionNonce": 800347632, - "isDeleted": false, - "id": "RW-JHYcY-UVBp4f-HTLGk", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 570.4668631875624, - "y": 284.39527145847813, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 23.985346472319296, - "height": 35.11380233498009, - "seed": 142801796, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -23.985346472319296, - 35.11380233498009 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3282, - "versionNonce": 349716752, - "isDeleted": false, - "id": "2-kzG26695w19TGb3he9p", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 548.6359209861737, - "y": 260.62012328703753, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 22.393273493714723, - "height": 17.081977002497215, - "seed": 1910468284, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 22.393273493714723, - -17.081977002497215 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2843, - "versionNonce": 1955862512, - "isDeleted": false, - "id": "urcKoKDMEgWMZyop9LaqL", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 573.3926753897401, - "y": 243.89727800680174, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 23.08555557461648, - "height": 16.502404602149724, - "seed": 824240900, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 23.08555557461648, - 16.502404602149724 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 4378, - "versionNonce": 1615699728, - "isDeleted": false, - "id": "qtC1rW0afdS_DWTSYyBG-", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 591.3070928463173, - "y": 175.1809098423841, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 46.116094783540476, - "height": 34.8406076038362, - "seed": 502937404, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -9.658271027239188, - 15.006985291236031 - ], - [ - -24.702343008741458, - 22.002480581675115 - ], - [ - -38.91374634322448, - 22.62978935240579 - ], - [ - -46.116094783540476, - 34.8406076038362 - ] - ], - "index": "a6", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3554, - "versionNonce": 1277925872, - "isDeleted": false, - "id": "8qUzdt4LIrr2TFm-e1WjT", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 588.3411763647716, - "y": 174.5604854911556, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 40.814436438350356, - "height": 22.039791368375006, - "seed": 2136271492, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -12.607527042982472, - 13.459547850379979 - ], - [ - -28.88669898172316, - 20.18264228865132 - ], - [ - -40.814436438350356, - 22.039791368375006 - ] - ], - "index": "a7", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3588, - "versionNonce": 291978512, - "isDeleted": false, - "id": "p6BiQmBZO3QawfZ7uWfiM", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 586.0455840894726, - "y": 171.79781472664985, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 36.1580403640453, - "height": 17.920748908184656, - "seed": 2091380668, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -20.789643793622766, - 7.275852798314532 - ], - [ - -36.1580403640453, - 17.920748908184656 - ] - ], - "index": "a8", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3508, - "versionNonce": 159570928, - "isDeleted": false, - "id": "BQ-o5mKlARgCQ5KX8ZTpj", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 588.0210189843899, - "y": 174.02102393325328, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 38.22546632744009, - "height": 19.441525134983937, - "seed": 1977416196, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -14.522405956631342, - 10.10756179163657 - ], - [ - -29.53975158600127, - 16.341019673449665 - ], - [ - -38.22546632744009, - 19.441525134983937 - ] - ], - "index": "a9", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3540, - "versionNonce": 1771903760, - "isDeleted": false, - "id": "WtinT6atSLM2YDQ0i8qRf", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 586.1421556174653, - "y": 173.1079254774573, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 36.88666833898909, - "height": 17.583424984258823, - "seed": 504010812, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -17.33299646979043, - 9.369528879923744 - ], - [ - -36.88666833898909, - 17.583424984258823 - ] - ], - "index": "aA", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3579, - "versionNonce": 1587666416, - "isDeleted": false, - "id": "EaslwlZR2jtrDcm5rPACu", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 582.5153416413712, - "y": 171.17511463032707, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 31.247363663548615, - "height": 15.121454026145708, - "seed": 263657860, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -19.754288152320722, - 5.669947639751712 - ], - [ - -31.247363663548615, - 15.121454026145708 - ] - ], - "index": "aB", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2102, - "versionNonce": 996620560, - "isDeleted": false, - "id": "xVHgk4qqdS6_8gedaYXPC", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 70, - "angle": 0, - "x": 548.0305208254401, - "y": 196.7590807552769, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 14.97140525537147, - "height": 13.41198070921278, - "seed": 1040462012, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -8.418800921698711, - -0.8517572223057535 - ], - [ - -13.04594588653023, - -6.525877981540368 - ], - [ - -10.67194860798909, - -13.163309432850678 - ], - [ - -2.016096563029299, - -13.41198070921278 - ], - [ - 1.9254593688412402, - -6.16100517416793 - ] - ], - "index": "aC", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - }, - { - "type": "line", - "version": 1081, - "versionNonce": 2089852912, - "isDeleted": false, - "id": "clK1nVHeusZJ9kuu_2CLB", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 70, - "angle": 0, - "x": 533.2938805098827, - "y": 187.09243854518178, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 14.231201502835647, - "height": 7.46362433679377, - "seed": 941705476, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 6.380626067777453, - 5.381292901088579 - ], - [ - 14.231201502835647, - 7.46362433679377 - ] - ], - "index": "aD", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - }, - { - "type": "line", - "version": 1278, - "versionNonce": 1245550352, - "isDeleted": false, - "id": "eh89yCmAtI7im4izoEYRs", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 70, - "angle": 0, - "x": 534.8437646472964, - "y": 185.4497301814011, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 11.429582590176492, - "height": 6.836136069337963, - "seed": 1278654780, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 7.8459273738177755, - 0.951690538974638 - ], - [ - 11.429582590176492, - 6.836136069337963 - ] - ], - "index": "aE", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - }, - { - "type": "line", - "version": 1381, - "versionNonce": 861348336, - "isDeleted": false, - "id": "2cmfJIff-FHYGdwyn3TAx", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 70, - "angle": 0, - "x": 535.0280329423992, - "y": 187.32866210332708, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 11.429582590176492, - "height": 6.836136069337963, - "seed": 1117358212, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 5.12681154817596, - 3.266425036700495 - ], - [ - 11.429582590176492, - 6.836136069337963 - ] - ], - "index": "aF", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - }, - { - "type": "line", - "version": 875, - "versionNonce": 714618128, - "isDeleted": false, - "id": "ut5uQk8G8d_JA0r9BKBb7", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 602.4296580997805, - "y": 327.6547717993448, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 12.77201525487288, - "height": 75.28826386888024, - "seed": 1946431932, - "groupIds": [ - "pOhS4C6c65K4Jt6cXWixW" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 1.3796581026158488, - -58.82425913384206 - ], - [ - -2.4471968311977497, - -75.28826386888024 - ], - [ - -9.558090396155869, - -73.17767532973113 - ], - [ - -11.39235715225703, - -54.81520150671389 - ] - ], - "index": "aG", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - } - ], - "created": 1659863327528, - "name": "Grandma" - }, - { - "id": "eVAGO6D992SmONnbt4qHr", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 2921, - "versionNonce": 301818864, - "isDeleted": false, - "id": "mvaO4r62mrBAAY7R36lI5", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -104.90780659896593, - "y": 484.5029628332511, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 22.962090852177305, - "height": 25.196217843240962, - "seed": 1596078908, - "groupIds": [ - "6rnIgp79WkCz73qEhocT2", - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 2896, - "versionNonce": 569316112, - "isDeleted": false, - "id": "WiKLdd4l2A7X0yfmoO1_O", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -96.77519660692275, - "y": 509.892975142051, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 1.2938947105974545, - "height": 29.423758342517576, - "seed": 1201612420, - "groupIds": [ - "6rnIgp79WkCz73qEhocT2", - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -1.2938947105974545, - 29.423758342517576 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2903, - "versionNonce": 109798896, - "isDeleted": false, - "id": "pvvQ6_5xSY_reyxDhGZJE", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -98.27329685478054, - "y": 538.9597992793541, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 8.027782545968531, - "height": 16.381077520120563, - "seed": 1647276988, - "groupIds": [ - "6rnIgp79WkCz73qEhocT2", - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 8.027782545968531, - 16.381077520120563 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2876, - "versionNonce": 112865552, - "isDeleted": false, - "id": "6SGq8aWKK-h5-1IsDOX6S", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -98.67261773771412, - "y": 538.3573674472466, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 12.934412685499442, - "height": 14.81557535082132, - "seed": 830453252, - "groupIds": [ - "6rnIgp79WkCz73qEhocT2", - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -12.934412685499442, - 14.81557535082132 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2800, - "versionNonce": 2114529264, - "isDeleted": false, - "id": "jH4mrXy1jmP_oKmRnAOCZ", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -108.77463248083752, - "y": 513.768761375284, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 11.314170923583024, - "height": 10.859826216044992, - "seed": 1879153724, - "groupIds": [ - "6rnIgp79WkCz73qEhocT2", - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 11.314170923583024, - 10.859826216044992 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2828, - "versionNonce": 544313104, - "isDeleted": false, - "id": "w4cEWbQ2CnPn1rylv-tto", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -98.31019265859283, - "y": 523.9008850658176, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 16.30455491235678, - "height": 9.195541798215446, - "seed": 1067603332, - "groupIds": [ - "6rnIgp79WkCz73qEhocT2", - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 16.30455491235678, - -9.195541798215446 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3002, - "versionNonce": 75409904, - "isDeleted": false, - "id": "9mXJ_58WZD8Jvq-v3IjAN", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": -102.44113046304649, - "y": 486.93890802033457, - "strokeColor": "#000000", - "backgroundColor": "#4c6ef5", - "width": 35.92743759704585, - "height": 13.376796241548695, - "seed": 649247108, - "groupIds": [ - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 10.51338912439717, - -10.252968819400877 - ], - [ - 20.38646225315211, - -0.03190277899463023 - ], - [ - 19.236014855963816, - 1.7057555141289393 - ], - [ - 18.35006207196114, - 3.1238274221478175 - ], - [ - -15.36725231771717, - 1.387934706783133 - ], - [ - -15.54097534389374, - -0.6670467447534376 - ], - [ - 0.3688959711043456, - -0.17438609570499786 - ] - ], - "index": "a6", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - }, - { - "type": "line", - "version": 2173, - "versionNonce": 126692624, - "isDeleted": false, - "id": "AyOSR4VbL4wFxZKH5Nfc8", - "fillStyle": "hachure", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": -91.52774018484317, - "y": 477.891059073721, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 24.65967091745729, - "height": 10.637051196030885, - "seed": 1061487876, - "groupIds": [ - "7umYKo1rBPATGYSMBDV0Z" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "startBinding": null, - "endBinding": null, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -0.26390072608214954, - -5.266439928393932 - ], - [ - -6.997999078476703, - -5.274542143668375 - ], - [ - -10.575705851809737, - -10.637051196030885 - ], - [ - 7.209814134937449, - -2.4179325297615386 - ], - [ - 14.083965065647554, - -6.184305173056867 - ], - [ - 0.7060501882022683, - -4.784936849226437 - ] - ], - "index": "a7", - "frameId": null, - "roundness": { - "type": 2 - }, - "polygon": false - } - ], - "created": 1659863325658, - "name": "Child" - }, - { - "id": "FcoNdUTK11fekgKQ77V3y", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 2906, - "versionNonce": 1693707248, - "isDeleted": false, - "id": "67vreXgjNrjdysIdwN0_N", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": 31.71308515973277, - "y": 411.7537727247872, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 55.5018958676587, - "height": 51.08419650559211, - "seed": 1542234500, - "groupIds": [ - "2p9zjNkt9eVnuoxpnBka1" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 2970, - "versionNonce": 92605200, - "isDeleted": false, - "id": "fAFJAXT-Ho4b-ab96NNQi", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": 58.84389442579476, - "y": 465.1193397387766, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.723381724379938, - "height": 61.930947762807584, - "seed": 533407932, - "groupIds": [ - "2p9zjNkt9eVnuoxpnBka1" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.723381724379938, - 61.930947762807584 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2926, - "versionNonce": 1232137712, - "isDeleted": false, - "id": "aeqKhiA1Goc7rRLi-ji3w", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": 57.34794316087272, - "y": 528.5885242706205, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 24.515632812786453, - "height": 37.76873089898643, - "seed": 1952829700, - "groupIds": [ - "2p9zjNkt9eVnuoxpnBka1" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 24.515632812786453, - 37.76873089898643 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2903, - "versionNonce": 1959864592, - "isDeleted": false, - "id": "cPki6owtoosFrUnlAG_JG", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": 52.71771807722024, - "y": 524.374074311064, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 20.97627602976596, - "height": 35.086927521543586, - "seed": 1247719740, - "groupIds": [ - "2p9zjNkt9eVnuoxpnBka1" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -20.97627602976596, - 35.086927521543586 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 3701, - "versionNonce": 1526575088, - "isDeleted": false, - "id": "X0_gXeXFwLKwbhHiY4-kf", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": 58.33614049830493, - "y": 478.99655469521565, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 40.47473533519768, - "height": 20.865892343741145, - "seed": 353177732, - "groupIds": [ - "2p9zjNkt9eVnuoxpnBka1" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 18.60673419716477, - 13.683914799148056 - ], - [ - 33.21064628236198, - -6.883032608842589 - ], - [ - 40.47473533519768, - -7.181977544593087 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 4119, - "versionNonce": 552175376, - "isDeleted": false, - "id": "KKfXW35v42O6bWBUoV-fq", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 0, - "opacity": 100, - "angle": 0, - "x": 18.585213085960902, - "y": 471.19583905091633, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 37.772869676107796, - "height": 21.549781572354593, - "seed": 1517103548, - "groupIds": [ - "2p9zjNkt9eVnuoxpnBka1" - ], - "boundElements": [], - "updated": 1761685666831, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 9.741371741017304, - 1.6861264404047913 - ], - [ - 21.9487128024392, - 21.549781572354593 - ], - [ - 37.772869676107796, - 9.328625461176804 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - } - ], - "created": 1659863323698, - "name": "Shrug" - }, - { - "id": "skUFCes5o14U8jiz5U2KF", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 2508, - "versionNonce": 1638019568, - "isDeleted": false, - "id": "X8SCIg7xkkeF_2dNisCzD", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 192.68312724646307, - "y": 407.75993902213855, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 55.62921974281601, - "height": 51.201385977351684, - "seed": 1246713148, - "groupIds": [ - "3ULB0TwSBN4rjnzOycsYQ", - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 2572, - "versionNonce": 642131216, - "isDeleted": false, - "id": "8Vlv2a3Iqqz5rkYLMnCUu", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 217.33297594296232, - "y": 458.6775482505007, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.7296292860039104, - "height": 62.07302017561529, - "seed": 1554599356, - "groupIds": [ - "3ULB0TwSBN4rjnzOycsYQ", - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.7296292860039104, - 62.07302017561529 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2525, - "versionNonce": 1684435952, - "isDeleted": false, - "id": "ZR-RCb2-qhB1Et1b_7Pbp", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 214.84681632895513, - "y": 522.3403143916174, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 24.57187279022971, - "height": 37.855374086622675, - "seed": 1915762236, - "groupIds": [ - "3ULB0TwSBN4rjnzOycsYQ", - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 24.57187279022971, - 37.855374086622675 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2502, - "versionNonce": 1381958416, - "isDeleted": false, - "id": "NNgEfJrDR_CUJ-aCEG8Dj", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 211.3505874086229, - "y": 519.8894993829036, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 21.02439656166357, - "height": 35.16741853017612, - "seed": 2009468604, - "groupIds": [ - "3ULB0TwSBN4rjnzOycsYQ", - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -21.02439656166357, - 35.16741853017612 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2563, - "versionNonce": 1230140912, - "isDeleted": false, - "id": "Gj1I0_20thh8cWgVP3Lf5", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 183.39876819034612, - "y": 493.9500533536417, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 32.48711994829731, - "height": 20.807832195149214, - "seed": 1846335292, - "groupIds": [ - "3ULB0TwSBN4rjnzOycsYQ", - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 32.48711994829731, - -20.807832195149214 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2606, - "versionNonce": 61612304, - "isDeleted": false, - "id": "g8Ongop04nfNwYIoRw7Lg", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 215.11444128480866, - "y": 471.94903733903527, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 23.240467669169806, - "height": 27.692151644718507, - "seed": 1902546876, - "groupIds": [ - "3ULB0TwSBN4rjnzOycsYQ", - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 23.240467669169806, - 27.692151644718507 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "text", - "version": 593, - "versionNonce": 1970157552, - "isDeleted": false, - "id": "htLK8Hw-F0vQNgIAzqJm1", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 193.99858496323645, - "y": 414.33073055593644, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 49, - "height": 22, - "seed": 1106589756, - "groupIds": [ - "QuKNoFztQXC5jKzO3UamN" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "fontSize": 15.282036963929505, - "fontFamily": 1, - "text": "。◕‿◕。", - "baseline": 16, - "textAlign": "left", - "verticalAlign": "top", - "containerId": null, - "originalText": "。◕‿◕。", - "index": "a6", - "frameId": null, - "roundness": null, - "rawText": "", - "autoResize": true, - "lineHeight": 1.43959866423089 - } - ], - "created": 1659863321820, - "name": "Happy" - }, - { - "id": "GeUtZJrkYjXBfTo_OTYg8", - "status": "published", - "elements": [ - { - "type": "ellipse", - "version": 2617, - "versionNonce": 161840912, - "isDeleted": false, - "id": "T8Dve0Uemwy2aWRC8JO-J", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 365.530207654248, - "y": 414.45479775023585, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 55.62921974281601, - "height": 51.201385977351684, - "seed": 1268437180, - "groupIds": [ - "l1VXlUTfySeu0HIZBpNoY", - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "index": "a0", - "frameId": null, - "roundness": null - }, - { - "type": "line", - "version": 2681, - "versionNonce": 1824635376, - "isDeleted": false, - "id": "zxc6iXU38JfaOve09KRNE", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 390.1800563507472, - "y": 465.372406978598, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 2.7296292860039104, - "height": 62.07302017561529, - "seed": 771316028, - "groupIds": [ - "l1VXlUTfySeu0HIZBpNoY", - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -2.7296292860039104, - 62.07302017561529 - ] - ], - "index": "a1", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2634, - "versionNonce": 79895824, - "isDeleted": false, - "id": "s2JGMMZJ3qf7YiVohnS3t", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 387.69389673674, - "y": 529.0351731197147, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 24.57187279022971, - "height": 37.855374086622675, - "seed": 1148375484, - "groupIds": [ - "l1VXlUTfySeu0HIZBpNoY", - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 24.57187279022971, - 37.855374086622675 - ] - ], - "index": "a2", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2611, - "versionNonce": 1918172144, - "isDeleted": false, - "id": "NB7AQQY0TCK6Dk66VWDhf", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 384.1976678164078, - "y": 526.5843581110009, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 21.02439656166357, - "height": 35.16741853017612, - "seed": 774453820, - "groupIds": [ - "l1VXlUTfySeu0HIZBpNoY", - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - -21.02439656166357, - 35.16741853017612 - ] - ], - "index": "a3", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2672, - "versionNonce": 1182595856, - "isDeleted": false, - "id": "yK2ReRy9K53n0M7qvePBL", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 356.2458485981308, - "y": 500.644912081739, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 32.48711994829731, - "height": 20.807832195149214, - "seed": 1442747068, - "groupIds": [ - "l1VXlUTfySeu0HIZBpNoY", - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 32.48711994829731, - -20.807832195149214 - ] - ], - "index": "a4", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "line", - "version": 2715, - "versionNonce": 674233840, - "isDeleted": false, - "id": "szI6gb39XnhElf95mIdSH", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 387.9615216925935, - "y": 478.6438960671326, - "strokeColor": "#000000", - "backgroundColor": "#ced4da", - "width": 23.240467669169806, - "height": 27.692151644718507, - "seed": 2056575804, - "groupIds": [ - "l1VXlUTfySeu0HIZBpNoY", - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "lastCommittedPoint": null, - "startArrowhead": null, - "endArrowhead": null, - "points": [ - [ - 0, - 0 - ], - [ - 23.240467669169806, - 27.692151644718507 - ] - ], - "index": "a5", - "frameId": null, - "roundness": { - "type": 2 - }, - "startBinding": null, - "endBinding": null, - "polygon": false - }, - { - "type": "text", - "version": 415, - "versionNonce": 827005200, - "isDeleted": false, - "id": "hp70GgiRDti1CeOwWKvnt", - "fillStyle": "solid", - "strokeWidth": 1, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 376.31309003619884, - "y": 438.46296285406726, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "width": 39.37890625, - "height": 26.082132711038955, - "seed": 911086524, - "groupIds": [ - "jbM6IKm3Y1mEONSQZ-C1r" - ], - "boundElements": [], - "updated": 1761685666832, - "link": null, - "locked": false, - "fontSize": 18.410917207792217, - "fontFamily": 1, - "text": "ಠ_ಠ", - "baseline": 16.082132711038955, - "textAlign": "left", - "verticalAlign": "top", - "containerId": null, - "originalText": "ಠ_ಠ", - "index": "a6", - "frameId": null, - "roundness": null, - "rawText": "", - "autoResize": true, - "lineHeight": 1.4166666666666656 - } - ], - "created": 1659863319427, - "name": "Sad" - } - ] - }, - "imageElementNotice": true, - "mdSVGwidth": 500, - "mdSVGmaxHeight": 800, - "mdFont": "Virgil", - "mdFontColor": "Black", - "mdBorderColor": "Black", - "mdCSS": "", - "scriptEngineSettings": {}, - "defaultTrayMode": true, - "compactModeOnTablets": true, - "previousRelease": "2.16.1", - "showReleaseNotes": false, - "compareManifestToPluginVersion": true, - "showNewVersionNotification": true, - "latexBoilerplate": "\\color{blue}", - "latexPreambleLocation": "preamble.sty", - "taskboneEnabled": false, - "taskboneAPIkey": "", - "pinnedScripts": [], - "customPens": [ - { - "type": "default", - "freedrawOnly": false, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0, - "roughness": 0, - "penOptions": { - "highlighter": false, - "constantPressure": false, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "thinning": 0.6, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "easeOutSine", - "start": { - "cap": true, - "taper": 0, - "easing": "linear" - }, - "end": { - "cap": true, - "taper": 0, - "easing": "linear" - } - } - } - }, - { - "type": "highlighter", - "freedrawOnly": true, - "strokeColor": "#FFC47C", - "backgroundColor": "#FFC47C", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": null, - "penOptions": { - "highlighter": true, - "constantPressure": true, - "hasOutline": true, - "outlineWidth": 4, - "options": { - "thinning": 1, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "linear", - "start": { - "taper": 0, - "cap": true, - "easing": "linear" - }, - "end": { - "taper": 0, - "cap": true, - "easing": "linear" - } - } - } - }, - { - "type": "finetip", - "freedrawOnly": false, - "strokeColor": "#3E6F8D", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0.5, - "roughness": 0, - "penOptions": { - "highlighter": false, - "hasOutline": false, - "outlineWidth": 1, - "constantPressure": true, - "options": { - "smoothing": 0.4, - "thinning": -0.5, - "streamline": 0.4, - "easing": "linear", - "start": { - "taper": 5, - "cap": false, - "easing": "linear" - }, - "end": { - "taper": 5, - "cap": false, - "easing": "linear" - } - } - } - }, - { - "type": "fountain", - "freedrawOnly": false, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 2, - "roughness": 0, - "penOptions": { - "highlighter": false, - "constantPressure": false, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "smoothing": 0.2, - "thinning": 0.6, - "streamline": 0.2, - "easing": "easeInOutSine", - "start": { - "taper": 150, - "cap": true, - "easing": "linear" - }, - "end": { - "taper": 1, - "cap": true, - "easing": "linear" - } - } - } - }, - { - "type": "marker", - "freedrawOnly": true, - "strokeColor": "#B83E3E", - "backgroundColor": "#FF7C7C", - "fillStyle": "dashed", - "strokeWidth": 2, - "roughness": 3, - "penOptions": { - "highlighter": false, - "constantPressure": true, - "hasOutline": true, - "outlineWidth": 4, - "options": { - "thinning": 1, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "linear", - "start": { - "taper": 0, - "cap": true, - "easing": "linear" - }, - "end": { - "taper": 0, - "cap": true, - "easing": "linear" - } - } - } - }, - { - "type": "thick-thin", - "freedrawOnly": true, - "strokeColor": "#CECDCC", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0, - "roughness": null, - "penOptions": { - "highlighter": true, - "constantPressure": true, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "thinning": 1, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "linear", - "start": { - "taper": 0, - "cap": true, - "easing": "linear" - }, - "end": { - "cap": true, - "taper": true, - "easing": "linear" - } - } - } - }, - { - "type": "thin-thick-thin", - "freedrawOnly": true, - "strokeColor": "#CECDCC", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0, - "roughness": null, - "penOptions": { - "highlighter": true, - "constantPressure": true, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "thinning": 1, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "linear", - "start": { - "cap": true, - "taper": true, - "easing": "linear" - }, - "end": { - "cap": true, - "taper": true, - "easing": "linear" - } - } - } - }, - { - "type": "default", - "freedrawOnly": false, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0, - "roughness": 0, - "penOptions": { - "highlighter": false, - "constantPressure": false, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "thinning": 0.6, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "easeOutSine", - "start": { - "cap": true, - "taper": 0, - "easing": "linear" - }, - "end": { - "cap": true, - "taper": 0, - "easing": "linear" - } - } - } - }, - { - "type": "default", - "freedrawOnly": false, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0, - "roughness": 0, - "penOptions": { - "highlighter": false, - "constantPressure": false, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "thinning": 0.6, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "easeOutSine", - "start": { - "cap": true, - "taper": 0, - "easing": "linear" - }, - "end": { - "cap": true, - "taper": 0, - "easing": "linear" - } - } - } - }, - { - "type": "default", - "freedrawOnly": false, - "strokeColor": "#000000", - "backgroundColor": "transparent", - "fillStyle": "hachure", - "strokeWidth": 0, - "roughness": 0, - "penOptions": { - "highlighter": false, - "constantPressure": false, - "hasOutline": false, - "outlineWidth": 1, - "options": { - "thinning": 0.6, - "smoothing": 0.5, - "streamline": 0.5, - "easing": "easeOutSine", - "start": { - "cap": true, - "taper": 0, - "easing": "linear" - }, - "end": { - "cap": true, - "taper": 0, - "easing": "linear" - } - } - } - } - ], - "numberOfCustomPens": 0, - "pdfScale": 4, - "pdfBorderBox": true, - "pdfFrame": false, - "pdfGapSize": 20, - "pdfGroupPages": false, - "pdfLockAfterImport": true, - "pdfNumColumns": 1, - "pdfNumRows": 1, - "pdfDirection": "right", - "pdfImportScale": 0.3, - "gridSettings": { - "DYNAMIC_COLOR": true, - "COLOR": "#000000", - "OPACITY": 50, - "GRID_DIRECTION": { - "horizontal": true, - "vertical": true - } - }, - "laserSettings": { - "DECAY_LENGTH": 50, - "DECAY_TIME": 1000, - "COLOR": "#ff0000" - }, - "embeddableMarkdownDefaults": { - "useObsidianDefaults": false, - "backgroundMatchCanvas": false, - "backgroundMatchElement": true, - "backgroundColor": "#fff", - "backgroundOpacity": 60, - "borderMatchElement": true, - "borderColor": "#fff", - "borderOpacity": 0, - "filenameVisible": false - }, - "markdownNodeOneClickEditing": false, - "canvasImmersiveEmbed": true, - "startupScriptPath": "", - "aiEnabled": false, - "openAIAPIToken": "", - "openAIDefaultTextModel": "gpt-3.5-turbo-1106", - "openAIDefaultVisionModel": "gpt-4o", - "openAIDefaultImageGenerationModel": "dall-e-3", - "openAIURL": "https://api.openai.com/v1/chat/completions", - "openAIImageGenerationURL": "https://api.openai.com/v1/images/generations", - "openAIImageEditsURL": "https://api.openai.com/v1/images/edits", - "openAIImageVariationURL": "https://api.openai.com/v1/images/variations", - "modifierKeyConfig": { - "Mac": { - "LocalFileDragAction": { - "defaultAction": "image-import", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-import" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": true, - "meta_ctrl": false, - "result": "link" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-url" - }, - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": true, - "meta_ctrl": false, - "result": "embeddable" - } - ] - }, - "WebBrowserDragAction": { - "defaultAction": "image-url", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-url" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": true, - "meta_ctrl": false, - "result": "link" - }, - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": true, - "meta_ctrl": false, - "result": "embeddable" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-import" - } - ] - }, - "InternalDragAction": { - "defaultAction": "link", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "link" - }, - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": true, - "result": "embeddable" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": true, - "result": "image-fullsize" - } - ] - }, - "LinkClickAction": { - "defaultAction": "new-tab", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "active-pane" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "new-tab" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": true, - "meta_ctrl": false, - "result": "new-pane" - }, - { - "shift": true, - "ctrl_cmd": true, - "alt_opt": true, - "meta_ctrl": false, - "result": "popout-window" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": true, - "result": "md-properties" - } - ] - } - }, - "Win": { - "LocalFileDragAction": { - "defaultAction": "image-import", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-import" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "link" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-url" - }, - { - "shift": true, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "embeddable" - } - ] - }, - "WebBrowserDragAction": { - "defaultAction": "image-url", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-url" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "link" - }, - { - "shift": true, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "embeddable" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image-import" - } - ] - }, - "InternalDragAction": { - "defaultAction": "link", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "link" - }, - { - "shift": true, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "embeddable" - }, - { - "shift": true, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "image" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": true, - "meta_ctrl": false, - "result": "image-fullsize" - } - ] - }, - "LinkClickAction": { - "defaultAction": "new-tab", - "rules": [ - { - "shift": false, - "ctrl_cmd": false, - "alt_opt": false, - "meta_ctrl": false, - "result": "active-pane" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": false, - "result": "new-tab" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": true, - "meta_ctrl": false, - "result": "new-pane" - }, - { - "shift": true, - "ctrl_cmd": true, - "alt_opt": true, - "meta_ctrl": false, - "result": "popout-window" - }, - { - "shift": false, - "ctrl_cmd": true, - "alt_opt": false, - "meta_ctrl": true, - "result": "md-properties" - } - ] - } - } - }, - "slidingPanesSupport": false, - "areaZoomLimit": 1, - "longPressDesktop": 500, - "longPressMobile": 500, - "doubleClickLinkOpenViewMode": true, - "isDebugMode": false, - "rank": "Bronze", - "modifierKeyOverrides": [ - { - "modifiers": [ - "Mod" - ], - "key": "Enter" - }, - { - "modifiers": [ - "Mod" - ], - "key": "k" - }, - { - "modifiers": [ - "Mod" - ], - "key": "G" - } - ], - "showSplashscreen": true, - "pdfSettings": { - "pageSize": "A4", - "pageOrientation": "portrait", - "fitToPage": 1, - "paperColor": "white", - "customPaperColor": "#ffffff", - "alignment": "center", - "margin": "normal" - } -} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-excalidraw-plugin/main.js b/.obsidian/plugins/obsidian-excalidraw-plugin/main.js deleted file mode 100644 index 4fd25ae..0000000 --- a/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";var obsidian_module=require("obsidian"),state=require("@codemirror/state"),view=require("@codemirror/view");const INITIAL_TIMESTAMP=Date.now();var LZString=function(){var r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e>=1}else{for(t=1,e=0;e>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e>=1}else{for(t=1,e=0;e>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m="",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return""}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return"";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString}); -let REACT_PACKAGES = `!function(){var e,t;e=this,t=function(e){function M(e){return null!==e&&"object"==typeof e&&"function"==typeof(e=te&&e[te]||e["@@iterator"])?e:null}function t(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function n(){}function r(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function o(e,t,n){var r,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)ae.call(t,r)&&!ie.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1>>1,o=e[r];if(!(0>>1;rt)||e&&!q());){var r,o=R.callback;"function"==typeof o?(R.callback=null,P=R.priorityLevel,r=o(R.expirationTime<=t),t=v(),"function"==typeof r?R.callback=r:R===i(C)&&l(C),y(t)):l(C),R=i(C)}var u,a=null!==R||(null!==(u=i(E))&&_(d,u.startTime-t),!1);return a}finally{R=null,P=n,$=!1}}function q(){return!(v()-de")?l.replace("",n.displayName):l}while(1<=u&&0<=i);break}}}finally{xo=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?Q(n):""}function $(e){switch(e.tag){case 5:return Q(e.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return e=j(e.type,!1);case 11:return e=j(e.type.render,!1);case 1:return e=j(e.type,!0);default:return""}}function q(e){if(null!=e){if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case co:return"Fragment";case so:return"Portal";case po:return"Profiler";case fo:return"StrictMode";case yo:return"Suspense";case vo:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ho:return(e.displayName||"Context")+".Consumer";case mo:return(e._context.displayName||"Context")+".Provider";case go:var n=e.render;return e=(e=e.displayName)?e:""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef";case bo:return null!==(n=e.displayName||null)?n:q(e.type)||"Memo";case ko:n=e._payload,e=e._init;try{return q(e(n))}catch(e){}}}return null}function K(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=n.render).displayName||e.name||"",n.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(n);case 8:return n===fo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof n)return n.displayName||n.name||null;if("string"==typeof n)return n}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function X(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function G(e){var n,t,r=X(e)?"checked":"value",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),a=""+e[r];if(!e.hasOwnProperty(r)&&void 0!==l&&"function"==typeof l.get&&"function"==typeof l.set)return n=l.get,t=l.set,Object.defineProperty(e,r,{configurable:!0,get:function(){return n.call(this)},set:function(e){a=""+e,t.call(this,e)}}),Object.defineProperty(e,r,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(e){a=""+e},stopTracking:function(){e._valueTracker=null,delete e[r]}}}function Z(e){e._valueTracker||(e._valueTracker=G(e))}function J(e){var n,t,r;return!(!e||(n=e._valueTracker)&&(t=n.getValue(),r="",(e=r=e?X(e)?e.checked?"true":"false":e.value:r)===t||(n.setValue(e),0)))}function ee(n){if(void 0===(n=n||("undefined"!=typeof document?document:void 0)))return null;try{return n.activeElement||n.body}catch(e){return n.body}}function ne(e,n){var t=n.checked;return g({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function te(e,n){var t=null==n.defaultValue?"":n.defaultValue,r=null!=n.checked?n.checked:n.defaultChecked,t=Y(null!=n.value?n.value:t);e._wrapperState={initialChecked:r,initialValue:t,controlled:"checkbox"===n.type||"radio"===n.type?null!=n.checked:null!=n.value}}function re(e,n){null!=(n=n.checked)&&B(e,"checked",n,!1)}function le(e,n){re(e,n);var t=Y(n.value),r=n.type;if(null!=t)"number"===r?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");n.hasOwnProperty("value")?oe(e,n.type,t):n.hasOwnProperty("defaultValue")&&oe(e,n.type,Y(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function ae(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(("submit"===r||"reset"===r)&&null==n.value)return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}""!==(t=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function oe(e,n,t){"number"===n&&ee(e.ownerDocument)===e||(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}function ue(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l>>=0)?32:31-(iu(e)/su|0)|0}function Re(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function De(e,n){var t=e.pendingLanes;if(0===t)return 0;var r,l=0,a=e.suspendedLanes,o=e.pingedLanes,u=268435455&t;if(0!==u?0!==(r=u&~a)?l=Re(r):0!==(o&=u)&&(l=Re(o)):0!==(u=t&~a)?l=Re(u):0!==o&&(l=Re(o)),0===l)return 0;if(0!==n&&n!==l&&0==(n&a)&&((o=n&-n)<=(a=l&-l)||16===a&&0!=(4194240&o)))return n;if(0!=(4&l)&&(l|=16&t),0!==(n=e.entangledLanes))for(e=e.entanglements,n&=l;0>=r,a-=r,Xi=1<<32-uu(n)+a|t<u?(i=o,o=null):i=o.sibling;var s=y(n,o,t[u],r);if(null===s){null===o&&(o=i);break}f&&o&&null===s.alternate&&d(n,o),e=h(s,e,u),null===a?l=s:a.sibling=s,a=s,o=i}if(u===t.length)p(n,o);else if(null===o)for(;uu?(i=o,o=null):i=o.sibling;var c=y(n,o,s.value,r);if(null===c){null===o&&(o=i);break}f&&o&&null===c.alternate&&d(n,o),e=h(c,e,u),null===a?l=c:a.sibling=c,a=c,o=i}if(s.done)p(n,o);else if(null===o)for(;!s.done;u++,s=t.next())null!==(s=g(n,s.value,r))&&(e=h(s,e,u),null===a?l=s:a.sibling=s,a=s);else{for(o=m(n,o);!s.done;u++,s=t.next())null!==(s=v(o,n,u,s.value,r))&&(f&&null!==s.alternate&&o.delete(null===s.key?u:s.key),e=h(s,e,u),null===a?l=s:a.sibling=s,a=s);f&&o.forEach(function(e){return d(n,e)})}return E&&vt(n,u),l}function w(e,n,t,r){if("object"==typeof(t="object"==typeof t&&null!==t&&t.type===co&&null===t.key?t.props.children:t)&&null!==t){switch(t.$$typeof){case io:e:{for(var l=t.key,a=n;null!==a;){if(a.key===l){if((l=t.type)===co){if(7===a.tag){p(e,a.sibling),(n=o(a,t.props.children)).return=e,e=n;break e}}else if(a.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===ko&&Mt(l)===a.type){p(e,a.sibling),(n=o(a,t.props)).ref=Lt(e,a,t),n.return=e,e=n;break e}p(e,a);break}d(e,a),a=a.sibling}e=t.type===co?((n=za(t.props.children,e.mode,r,t.key)).return=e,n):((r=Na(t.type,t.key,t.props,null,e.mode,r)).ref=Lt(e,n,t),r.return=e,r)}return u(e);case so:e:{for(a=t.key;null!==n;){if(n.key===a){if(4===n.tag&&n.stateNode.containerInfo===t.containerInfo&&n.stateNode.implementation===t.implementation){p(e,n.sibling),(n=o(n,t.children||[])).return=e,e=n;break e}p(e,n);break}d(e,n),n=n.sibling}(n=La(t,e.mode,r)).return=e,e=n}return u(e);case ko:return w(e,n,(a=t._init)(t._payload),r)}if(Eo(t))return b(e,n,t,r);if(H(t))return k(e,n,t,r);Tt(e,t)}return"string"==typeof t&&""!==t||"number"==typeof t?(t=""+t,(n=null!==n&&6===n.tag?(p(e,n.sibling),o(n,t)):(p(e,n),_a(t,e.mode,r))).return=e,u(e=n)):p(e,n)}return w}function Rt(){os=as=ls=null}function Dt(e,n){n=rs.current,s(rs),e._currentValue=n}function Ot(e,n,t){for(;null!==e;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,null!==r&&(r.childLanes|=n)):null!==r&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function It(e,n){(os=as=null)!==(e=(ls=e).dependencies)&&null!==e.firstContext&&(0!=(e.lanes&n)&&(_=!0),e.firstContext=null)}function Ut(e){var n=e._currentValue;if(os!==e)if(e={context:e,memoizedValue:n,next:null},null===as){if(null===ls)throw Error(S(308));as=e,ls.dependencies={lanes:0,firstContext:e}}else as=as.next=e;return n}function Vt(e){null===us?us=[e]:us.push(e)}function At(e,n,t,r){var l=n.interleaved;return null===l?(t.next=t,Vt(n)):(t.next=l.next,l.next=t),n.interleaved=t,Wt(e,r)}function Wt(e,n){e.lanes|=n;var t=e.alternate;for(null!==t&&(t.lanes|=n),e=(t=e).return;null!==e;)e.childLanes|=n,null!==(t=e.alternate)&&(t.childLanes|=n),e=(t=e).return;return 3===t.tag?t.stateNode:null}function Bt(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ht(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qt(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function jt(e,n,t){var r,l=e.updateQueue;return null===l?null:(l=l.shared,(0!=(2&F)?(null===(r=l.pending)?n.next=n:(n.next=r.next,r.next=n),l.pending=n,is):(null===(r=l.interleaved)?(n.next=n,Vt(l)):(n.next=r.next,r.next=n),l.interleaved=n,Wt))(e,t))}function $t(e,n,t){var r;null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194240&t))&&(r=n.lanes,r&=e.pendingLanes,He(e,n.lanes=t|=r))}function qt(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var l=null,a=null;if(null!==(t=t.firstBaseUpdate)){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null}}while(null===a?l=a=o:a=a.next=o,null!==(t=t.next));null===a?l=a=n:a=a.next=n}else l=a=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=t}else null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function Kt(e,n,t,r){var l,a,o=e.updateQueue,u=(ss=!1,o.firstBaseUpdate),i=o.lastBaseUpdate;if(null!==(f=o.shared.pending)&&(o.shared.pending=null,a=(l=f).next,(l.next=null)===i?u=a:i.next=a,i=l,null!==(c=e.alternate))&&(f=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===f?c.firstBaseUpdate=a:f.next=a,c.lastBaseUpdate=l),null!==u){for(var s=o.baseState,i=0,c=a=l=null,f=u;;){var d=f.lane,p=f.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var m=e,h=f,d=n,p=t;switch(h.tag){case 1:if("function"==typeof(m=h.payload)){s=m.call(p,s,d);break e}s=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(d="function"==typeof(m=h.payload)?m.call(p,s,d):m))break e;s=g({},s,d);break e;case 2:ss=!0}}null!==f.callback&&0!==f.lane&&(e.flags|=64,null===(d=o.effects)?o.effects=[f]:d.push(f))}else p={eventTime:p,lane:d,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===c?(a=c=p,l=s):c=c.next=p,i|=d;if(null===(f=f.next)){if(null===(f=o.shared.pending))break;f=(d=f).next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}if(null===c&&(l=s),o.baseState=l,o.firstBaseUpdate=a,o.lastBaseUpdate=c,null!==(n=o.shared.interleaved))for(o=n;i|=o.lane,(o=o.next)!==n;);else null===u&&(o.shared.lanes=0);Qs|=i,e.lanes=i,e.memoizedState=s}}function Yt(e,n,t){if(e=n.effects,(n.effects=null)!==e)for(n=0;n<\\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=o.createElement(t,{is:r.is}):(e=o.createElement(t),"select"===t&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,t),e[Li]=n,e[Ti]=r,Ls(e,n,!1,!1),n.stateNode=e;e:{switch(o=ye(t,r),t){case"dialog":c("cancel",e),c("close",e),a=r;break;case"iframe":case"object":case"embed":c("load",e),a=r;break;case"video":case"audio":for(a=0;aYs&&(n.flags|=128,wl(i,!(r=!0)),n.lanes=4194304)}else{if(!r)if(null!==(e=nr(o))){if(n.flags|=128,r=!0,null!==(t=e.updateQueue)&&(n.updateQueue=t,n.flags|=4),wl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!E)return p(n),null}else 2*y()-i.renderingStartTime>Ys&&1073741824!==t&&(n.flags|=128,wl(i,!(r=!0)),n.lanes=4194304);i.isBackwards?(o.sibling=n.child,n.child=o):(null!==(t=i.last)?t.sibling=o:n.child=o,i.last=o)}if(null!==i.tail)return n=i.tail,i.rendering=n,i.tail=n.sibling,i.renderingStartTime=y(),n.sibling=null,t=C.current,f(C,r?1&t|2:1&t),n}return p(n),null;case 22:case 23:return O=Bs.current,s(Bs),r=null!==n.memoizedState,null!==e&&null!==e.memoizedState!==r&&(n.flags|=8192),r&&0!=(1&n.mode)?0!=(1073741824&O)&&(p(n),6&n.subtreeFlags)&&(n.flags|=8192):p(n),null;case 24:case 25:return null}throw Error(S(156,n.tag))}function xl(e,n,t){switch(wt(n),n.tag){case 1:return h(n.type)&&(s(b),s(v)),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return Zt(),s(b),s(v),tr(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 5:return er(n),null;case 13:if(s(C),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(S(340));Pt()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return s(C),null;case 4:return Zt(),null;case 10:return Dt(n.type._context),null;case 22:case 23:return O=Bs.current,s(Bs),null;default:return null}}function El(n,t){var e=n.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){w(n,t,e)}else e.current=null}function Cl(n,t,e){try{e()}catch(e){w(n,t,e)}}function Nl(e,n){if(Ei=Su,Dn(e=Rn())){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:if((a=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection())&&0!==a.rangeCount){var t=a.anchorNode,r=a.anchorOffset,l=a.focusNode,a=a.focusOffset;try{t.nodeType,l.nodeType}catch(e){t=null;break e}var o,u=0,i=-1,s=-1,c=0,f=0,d=e,p=null;n:for(;;){for(;d!==t||0!==r&&3!==d.nodeType||(i=u+r),d!==l||0!==a&&3!==d.nodeType||(s=u+a),3===d.nodeType&&(u+=d.nodeValue.length),null!==(o=d.firstChild);)p=d,d=o;for(;;){if(d===e)break n;if(p===t&&++c===r&&(i=u),p===l&&++f===a&&(s=u),null!==(o=d.nextSibling))break;p=(d=p).parentNode}d=o}t=-1===i||-1===s?null:{start:i,end:s}}else t=null;t=t||{start:0,end:0}}else t=null;for(Su=!(Ci={focusedElem:e,selectionRange:t}),T=n;null!==T;)if(e=(n=T).child,0!=(1028&n.subtreeFlags)&&null!==e)e.return=n,T=e;else for(;null!==T;){n=T;try{var m,h,g,y,v=n.alternate;if(0!=(1024&n.flags))switch(n.tag){case 0:case 11:case 15:break;case 1:null!==v&&(m=v.memoizedProps,h=v.memoizedState,y=(g=n.stateNode).getSnapshotBeforeUpdate(n.elementType===n.type?m:Ar(n.type,m),h),g.__reactInternalSnapshotBeforeUpdate=y);break;case 3:var b=n.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(e){w(n,n.return,e)}if(null!==(e=n.sibling)){e.return=n.return,T=e;break}T=n.return}return v=Os,Os=!1,v}function zl(e,n,t){var r=n.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l,a=r=r.next;do{}while((a.tag&e)===e&&(l=a.destroy,(a.destroy=void 0)!==l)&&Cl(n,t,l),(a=a.next)!==r)}}function Pl(e,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var t,r=n=n.next;do{}while((r.tag&e)===e&&(t=r.create,r.destroy=t()),(r=r.next)!==n)}}function _l(e){var n,t=e.ref;null!==t&&(n=e.stateNode,e.tag,e=n,"function"==typeof t?t(e):t.current=e)}function Ll(e){var n=e.alternate;null!==n&&(e.alternate=null,Ll(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(n=e.stateNode)&&(delete n[Li],delete n[Ti],delete n[Fi],delete n[Ri],delete n[Di]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tl(e){return 5===e.tag||3===e.tag||4===e.tag}function Ml(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e=(e.child.return=e).child}if(!(2&e.flags))return e.stateNode}}function Fl(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?(8===t.nodeType?t.parentNode:t).insertBefore(e,n):(8===t.nodeType?(n=t.parentNode).insertBefore(e,t):(n=t).appendChild(e),null==(t=t._reactRootContainer)&&null===n.onclick&&(n.onclick=Jn));else if(4!==r&&null!==(e=e.child))for(Fl(e,n,t),e=e.sibling;null!==e;)Fl(e,n,t),e=e.sibling}function Rl(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Rl(e,n,t),e=e.sibling;null!==e;)Rl(e,n,t),e=e.sibling}function Dl(e,n,t){for(t=t.child;null!==t;)Ol(e,n,t),t=t.sibling}function Ol(e,n,t){if(ou&&"function"==typeof ou.onCommitFiberUnmount)try{ou.onCommitFiberUnmount(au,t)}catch(e){}switch(t.tag){case 5:L||El(t,n);case 6:var r=M,l=Is;M=null,Dl(e,n,t),Is=l,null!==(M=r)&&(Is?(e=M,t=t.stateNode,(8===e.nodeType?e.parentNode:e).removeChild(t)):M.removeChild(t.stateNode));break;case 18:null!==M&&(Is?(e=M,t=t.stateNode,8===e.nodeType?tt(e.parentNode,t):1===e.nodeType&&tt(e,t),Je(e)):tt(M,t.stateNode));break;case 4:r=M,l=Is,M=t.stateNode.containerInfo,Is=!0,Dl(e,n,t),M=r,Is=l;break;case 0:case 11:case 14:case 15:if(!L&&null!==(r=t.updateQueue)&&null!==(r=r.lastEffect)){l=r=r.next;do{var a=(o=l).destroy,o=o.tag}while(void 0===a||0==(2&o)&&0==(4&o)||Cl(t,n,a),(l=l.next)!==r)}Dl(e,n,t);break;case 1:if(!L&&(El(t,n),"function"==typeof(r=t.stateNode).componentWillUnmount))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(e){w(t,n,e)}Dl(e,n,t);break;case 21:Dl(e,n,t);break;case 22:1&t.mode?(L=(r=L)||null!==t.memoizedState,Dl(e,n,t),L=r):Dl(e,n,t);break;default:Dl(e,n,t)}}function Il(t){var r,e=t.updateQueue;null!==e&&((t.updateQueue=null)===(r=t.stateNode)&&(r=t.stateNode=new Ds),e.forEach(function(e){var n=ka.bind(null,t,e);r.has(e)||(r.add(e),e.then(n,n))}))}function Ul(e,n,t){if(null!==(t=n.deletions))for(var r=0;r